[20977] | 1 | dnl aclocal.m4 generated automatically by aclocal 1.4-p6 |
---|
[18379] | 2 | |
---|
| 3 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
---|
| 4 | dnl This file is free software; the Free Software Foundation |
---|
| 5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
| 6 | dnl with or without modifications, as long as this notice is preserved. |
---|
| 7 | |
---|
| 8 | dnl This program is distributed in the hope that it will be useful, |
---|
| 9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
| 10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
| 11 | dnl PARTICULAR PURPOSE. |
---|
| 12 | |
---|
| 13 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
---|
| 14 | |
---|
| 15 | AC_DEFUN([AM_CONFIG_HEADER], |
---|
| 16 | [AC_PREREQ([2.12]) |
---|
| 17 | AC_CONFIG_HEADER([$1]) |
---|
| 18 | dnl When config.status generates a header, we must update the stamp-h file. |
---|
| 19 | dnl This file resides in the same directory as the config header |
---|
| 20 | dnl that is generated. We must strip everything past the first ":", |
---|
| 21 | dnl and everything past the last "/". |
---|
| 22 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
---|
| 23 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
---|
| 24 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
---|
| 25 | <<am_indx=1 |
---|
| 26 | for am_file in <<$1>>; do |
---|
| 27 | case " <<$>>CONFIG_HEADERS " in |
---|
| 28 | *" <<$>>am_file "*<<)>> |
---|
| 29 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
---|
| 30 | ;; |
---|
| 31 | esac |
---|
| 32 | am_indx=`expr "<<$>>am_indx" + 1` |
---|
| 33 | done<<>>dnl>>) |
---|
| 34 | changequote([,]))]) |
---|
| 35 | |
---|
| 36 | # Do all the work for Automake. This macro actually does too much -- |
---|
| 37 | # some checks are only needed if your package does certain things. |
---|
| 38 | # But this isn't really a big deal. |
---|
| 39 | |
---|
| 40 | # serial 1 |
---|
| 41 | |
---|
| 42 | dnl Usage: |
---|
| 43 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
| 44 | |
---|
| 45 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
[20977] | 46 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
---|
| 47 | AC_REQUIRE([AC_PROG_INSTALL]) |
---|
[18379] | 48 | PACKAGE=[$1] |
---|
| 49 | AC_SUBST(PACKAGE) |
---|
| 50 | VERSION=[$2] |
---|
| 51 | AC_SUBST(VERSION) |
---|
| 52 | dnl test to see if srcdir already configured |
---|
| 53 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
| 54 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
| 55 | fi |
---|
| 56 | ifelse([$3],, |
---|
| 57 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
| 58 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
| 59 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
| 60 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
| 61 | dnl FIXME This is truly gross. |
---|
| 62 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
[20977] | 63 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) |
---|
[18379] | 64 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
[20977] | 65 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) |
---|
[18379] | 66 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
| 67 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
| 68 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
| 69 | |
---|
[20977] | 70 | # Copyright 2002 Free Software Foundation, Inc. |
---|
| 71 | |
---|
| 72 | # This program is free software; you can redistribute it and/or modify |
---|
| 73 | # it under the terms of the GNU General Public License as published by |
---|
| 74 | # the Free Software Foundation; either version 2, or (at your option) |
---|
| 75 | # any later version. |
---|
| 76 | |
---|
| 77 | # This program is distributed in the hope that it will be useful, |
---|
| 78 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 79 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 80 | # GNU General Public License for more details. |
---|
| 81 | |
---|
| 82 | # You should have received a copy of the GNU General Public License |
---|
| 83 | # along with this program; if not, write to the Free Software |
---|
| 84 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
| 85 | |
---|
| 86 | # AM_AUTOMAKE_VERSION(VERSION) |
---|
| 87 | # ---------------------------- |
---|
| 88 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
---|
| 89 | # generated from the m4 files accompanying Automake X.Y. |
---|
| 90 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) |
---|
| 91 | |
---|
| 92 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
---|
| 93 | # ------------------------------- |
---|
| 94 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
---|
| 95 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
---|
| 96 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
---|
| 97 | [AM_AUTOMAKE_VERSION([1.4-p6])]) |
---|
| 98 | |
---|
[18379] | 99 | # |
---|
| 100 | # Check to make sure that the build environment is sane. |
---|
| 101 | # |
---|
| 102 | |
---|
| 103 | AC_DEFUN([AM_SANITY_CHECK], |
---|
| 104 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
| 105 | # Just in case |
---|
| 106 | sleep 1 |
---|
| 107 | echo timestamp > conftestfile |
---|
| 108 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
| 109 | # arguments. Must try -L first in case configure is actually a |
---|
| 110 | # symlink; some systems play weird games with the mod time of symlinks |
---|
| 111 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
| 112 | # directory). |
---|
| 113 | if ( |
---|
| 114 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
| 115 | if test "[$]*" = "X"; then |
---|
| 116 | # -L didn't work. |
---|
| 117 | set X `ls -t $srcdir/configure conftestfile` |
---|
| 118 | fi |
---|
| 119 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
| 120 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
| 121 | |
---|
| 122 | # If neither matched, then we have a broken ls. This can happen |
---|
| 123 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
| 124 | # broken ls alias from the environment. This has actually |
---|
| 125 | # happened. Such a system could not be considered "sane". |
---|
| 126 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
| 127 | alias in your environment]) |
---|
| 128 | fi |
---|
| 129 | |
---|
| 130 | test "[$]2" = conftestfile |
---|
| 131 | ) |
---|
| 132 | then |
---|
| 133 | # Ok. |
---|
| 134 | : |
---|
| 135 | else |
---|
| 136 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
| 137 | Check your system clock]) |
---|
| 138 | fi |
---|
| 139 | rm -f conftest* |
---|
| 140 | AC_MSG_RESULT(yes)]) |
---|
| 141 | |
---|
| 142 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
| 143 | dnl The program must properly implement --version. |
---|
| 144 | AC_DEFUN([AM_MISSING_PROG], |
---|
| 145 | [AC_MSG_CHECKING(for working $2) |
---|
| 146 | # Run test in a subshell; some versions of sh will print an error if |
---|
| 147 | # an executable is not found, even if stderr is redirected. |
---|
| 148 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
| 149 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
| 150 | $1=$2 |
---|
| 151 | AC_MSG_RESULT(found) |
---|
| 152 | else |
---|
| 153 | $1="$3/missing $2" |
---|
| 154 | AC_MSG_RESULT(missing) |
---|
| 155 | fi |
---|
| 156 | AC_SUBST($1)]) |
---|
| 157 | |
---|
| 158 | # Add --enable-maintainer-mode option to configure. |
---|
| 159 | # From Jim Meyering |
---|
| 160 | |
---|
| 161 | # serial 1 |
---|
| 162 | |
---|
| 163 | AC_DEFUN([AM_MAINTAINER_MODE], |
---|
| 164 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
| 165 | dnl maintainer-mode is disabled by default |
---|
| 166 | AC_ARG_ENABLE(maintainer-mode, |
---|
| 167 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
| 168 | (and sometimes confusing) to the casual installer], |
---|
| 169 | USE_MAINTAINER_MODE=$enableval, |
---|
| 170 | USE_MAINTAINER_MODE=no) |
---|
| 171 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
| 172 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
| 173 | MAINT=$MAINTAINER_MODE_TRUE |
---|
| 174 | AC_SUBST(MAINT)dnl |
---|
| 175 | ] |
---|
| 176 | ) |
---|
| 177 | |
---|
| 178 | # Define a conditional. |
---|
| 179 | |
---|
| 180 | AC_DEFUN([AM_CONDITIONAL], |
---|
| 181 | [AC_SUBST($1_TRUE) |
---|
| 182 | AC_SUBST($1_FALSE) |
---|
| 183 | if $2; then |
---|
| 184 | $1_TRUE= |
---|
| 185 | $1_FALSE='#' |
---|
| 186 | else |
---|
| 187 | $1_TRUE='#' |
---|
| 188 | $1_FALSE= |
---|
| 189 | fi]) |
---|
| 190 | |
---|
[20977] | 191 | # isc-posix.m4 serial 2 (gettext-0.11.2) |
---|
[18659] | 192 | dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. |
---|
| 193 | dnl This file is free software, distributed under the terms of the GNU |
---|
| 194 | dnl General Public License. As a special exception to the GNU General |
---|
| 195 | dnl Public License, this file may be distributed as part of a program |
---|
| 196 | dnl that contains a configuration script generated by Autoconf, under |
---|
| 197 | dnl the same distribution terms as the rest of that program. |
---|
| 198 | |
---|
[20977] | 199 | # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. |
---|
| 200 | |
---|
[18379] | 201 | # This test replaces the one in autoconf. |
---|
| 202 | # Currently this macro should have the same name as the autoconf macro |
---|
| 203 | # because gettext's gettext.m4 (distributed in the automake package) |
---|
| 204 | # still uses it. Otherwise, the use in gettext.m4 makes autoheader |
---|
| 205 | # give these diagnostics: |
---|
| 206 | # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX |
---|
| 207 | # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX |
---|
| 208 | |
---|
| 209 | undefine([AC_ISC_POSIX]) |
---|
| 210 | |
---|
| 211 | AC_DEFUN([AC_ISC_POSIX], |
---|
| 212 | [ |
---|
| 213 | dnl This test replaces the obsolescent AC_ISC_POSIX kludge. |
---|
| 214 | AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) |
---|
| 215 | ] |
---|
| 216 | ) |
---|
| 217 | |
---|
[20977] | 218 | # Copyright (C) 1995-2002 Free Software Foundation, Inc. |
---|
| 219 | # Copyright (C) 2001-2003 Red Hat, Inc. |
---|
| 220 | # |
---|
| 221 | # This file is free software, distributed under the terms of the GNU |
---|
| 222 | # General Public License. As a special exception to the GNU General |
---|
| 223 | # Public License, this file may be distributed as part of a program |
---|
| 224 | # that contains a configuration script generated by Autoconf, under |
---|
| 225 | # the same distribution terms as the rest of that program. |
---|
| 226 | # |
---|
| 227 | # This file can be copied and used freely without restrictions. It can |
---|
| 228 | # be used in projects which are not available under the GNU Public License |
---|
| 229 | # but which still want to provide support for the GNU gettext functionality. |
---|
| 230 | # |
---|
[18379] | 231 | # Macro to add for using GNU gettext. |
---|
| 232 | # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
---|
| 233 | # |
---|
| 234 | # Modified to never use included libintl. |
---|
| 235 | # Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
---|
| 236 | # |
---|
[18659] | 237 | # Major rework to remove unused code |
---|
| 238 | # Owen Taylor <otaylor@redhat.com>, 12/11/2002 |
---|
[18379] | 239 | # |
---|
[20977] | 240 | # Added better handling of ALL_LINGUAS from GNU gettext version |
---|
| 241 | # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002 |
---|
[18659] | 242 | |
---|
[18379] | 243 | # |
---|
[18659] | 244 | # We need this here as well, since someone might use autoconf-2.5x |
---|
| 245 | # to configure GLib then an older version to configure a package |
---|
| 246 | # using AM_GLIB_GNU_GETTEXT |
---|
| 247 | AC_PREREQ(2.53) |
---|
[18379] | 248 | |
---|
[18659] | 249 | dnl |
---|
| 250 | dnl We go to great lengths to make sure that aclocal won't |
---|
| 251 | dnl try to pull in the installed version of these macros |
---|
| 252 | dnl when running aclocal in the glib directory. |
---|
| 253 | dnl |
---|
| 254 | m4_copy([AC_DEFUN],[glib_DEFUN]) |
---|
| 255 | m4_copy([AC_REQUIRE],[glib_REQUIRE]) |
---|
| 256 | dnl |
---|
| 257 | dnl At the end, if we're not within glib, we'll define the public |
---|
| 258 | dnl definitions in terms of our private definitions. |
---|
| 259 | dnl |
---|
| 260 | |
---|
| 261 | # GLIB_LC_MESSAGES |
---|
| 262 | #-------------------- |
---|
| 263 | glib_DEFUN([GLIB_LC_MESSAGES], |
---|
| 264 | [AC_CHECK_HEADERS([locale.h]) |
---|
| 265 | if test $ac_cv_header_locale_h = yes; then |
---|
[18379] | 266 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
---|
| 267 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
---|
| 268 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
---|
| 269 | if test $am_cv_val_LC_MESSAGES = yes; then |
---|
| 270 | AC_DEFINE(HAVE_LC_MESSAGES, 1, |
---|
| 271 | [Define if your <locale.h> file defines LC_MESSAGES.]) |
---|
| 272 | fi |
---|
| 273 | fi]) |
---|
| 274 | |
---|
[18659] | 275 | # GLIB_PATH_PROG_WITH_TEST |
---|
| 276 | #---------------------------- |
---|
| 277 | dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
---|
[18379] | 278 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
---|
[18659] | 279 | glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], |
---|
[18379] | 280 | [# Extract the first word of "$2", so it can be a program name with args. |
---|
| 281 | set dummy $2; ac_word=[$]2 |
---|
| 282 | AC_MSG_CHECKING([for $ac_word]) |
---|
| 283 | AC_CACHE_VAL(ac_cv_path_$1, |
---|
| 284 | [case "[$]$1" in |
---|
| 285 | /*) |
---|
| 286 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
---|
| 287 | ;; |
---|
| 288 | *) |
---|
| 289 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
---|
| 290 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
---|
| 291 | test -z "$ac_dir" && ac_dir=. |
---|
| 292 | if test -f $ac_dir/$ac_word; then |
---|
| 293 | if [$3]; then |
---|
| 294 | ac_cv_path_$1="$ac_dir/$ac_word" |
---|
| 295 | break |
---|
| 296 | fi |
---|
| 297 | fi |
---|
| 298 | done |
---|
| 299 | IFS="$ac_save_ifs" |
---|
| 300 | dnl If no 4th arg is given, leave the cache variable unset, |
---|
| 301 | dnl so AC_PATH_PROGS will keep looking. |
---|
| 302 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
---|
| 303 | ])dnl |
---|
| 304 | ;; |
---|
| 305 | esac])dnl |
---|
| 306 | $1="$ac_cv_path_$1" |
---|
| 307 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
---|
| 308 | AC_MSG_RESULT([$]$1) |
---|
| 309 | else |
---|
| 310 | AC_MSG_RESULT(no) |
---|
| 311 | fi |
---|
| 312 | AC_SUBST($1)dnl |
---|
| 313 | ]) |
---|
| 314 | |
---|
[18659] | 315 | # GLIB_WITH_NLS |
---|
| 316 | #----------------- |
---|
| 317 | glib_DEFUN([GLIB_WITH_NLS], |
---|
[18379] | 318 | dnl NLS is obligatory |
---|
| 319 | [USE_NLS=yes |
---|
| 320 | AC_SUBST(USE_NLS) |
---|
| 321 | |
---|
[18659] | 322 | gt_cv_have_gettext=no |
---|
[18379] | 323 | |
---|
[18659] | 324 | CATOBJEXT=NONE |
---|
| 325 | XGETTEXT=: |
---|
| 326 | INTLLIBS= |
---|
[18379] | 327 | |
---|
[18659] | 328 | AC_CHECK_HEADER(libintl.h, |
---|
| 329 | [gt_cv_func_dgettext_libintl="no" |
---|
| 330 | libintl_extra_libs="" |
---|
[18379] | 331 | |
---|
[18659] | 332 | # |
---|
| 333 | # First check in libc |
---|
| 334 | # |
---|
| 335 | AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
---|
| 336 | [AC_TRY_LINK([ |
---|
| 337 | #include <libintl.h> |
---|
| 338 | ], |
---|
| 339 | [return (int) dgettext ("","")], |
---|
| 340 | gt_cv_func_dgettext_libc=yes, |
---|
| 341 | gt_cv_func_dgettext_libc=no) |
---|
| 342 | ]) |
---|
| 343 | |
---|
| 344 | if test "$gt_cv_func_dgettext_libc" = "yes" ; then |
---|
| 345 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
| 346 | fi |
---|
[18379] | 347 | |
---|
[18659] | 348 | # |
---|
| 349 | # If we don't have everything we want, check in libintl |
---|
| 350 | # |
---|
| 351 | if test "$gt_cv_func_dgettext_libc" != "yes" \ |
---|
| 352 | || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then |
---|
| 353 | |
---|
| 354 | AC_CHECK_LIB(intl, bindtextdomain, |
---|
| 355 | [AC_CHECK_LIB(intl, dgettext, |
---|
| 356 | gt_cv_func_dgettext_libintl=yes)]) |
---|
[18379] | 357 | |
---|
[18659] | 358 | if test "$gt_cv_func_dgettext_libintl" != "yes" ; then |
---|
| 359 | AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
---|
| 360 | AC_MSG_RESULT([]) |
---|
| 361 | AC_CHECK_LIB(intl, dcgettext, |
---|
| 362 | [gt_cv_func_dgettext_libintl=yes |
---|
| 363 | libintl_extra_libs=-liconv], |
---|
| 364 | :,-liconv) |
---|
| 365 | fi |
---|
| 366 | |
---|
| 367 | # |
---|
| 368 | # If we found libintl, then check in it for bind_textdomain_codeset(); |
---|
| 369 | # we'll prefer libc if neither have bind_textdomain_codeset(), |
---|
| 370 | # and both have dgettext |
---|
| 371 | # |
---|
| 372 | if test "$gt_cv_func_dgettext_libintl" = "yes" ; then |
---|
| 373 | glib_save_LIBS="$LIBS" |
---|
| 374 | LIBS="$LIBS -lintl $libintl_extra_libs" |
---|
| 375 | unset ac_cv_func_bind_textdomain_codeset |
---|
| 376 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
| 377 | LIBS="$glib_save_LIBS" |
---|
| 378 | |
---|
| 379 | if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then |
---|
| 380 | gt_cv_func_dgettext_libc=no |
---|
| 381 | else |
---|
| 382 | if test "$gt_cv_func_dgettext_libc" = "yes"; then |
---|
| 383 | gt_cv_func_dgettext_libintl=no |
---|
[18379] | 384 | fi |
---|
| 385 | fi |
---|
[18659] | 386 | fi |
---|
| 387 | fi |
---|
[18379] | 388 | |
---|
[18659] | 389 | if test "$gt_cv_func_dgettext_libc" = "yes" \ |
---|
| 390 | || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
| 391 | gt_cv_have_gettext=yes |
---|
[18379] | 392 | fi |
---|
[18659] | 393 | |
---|
| 394 | if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
| 395 | INTLLIBS="-lintl $libintl_extra_libs" |
---|
| 396 | fi |
---|
| 397 | |
---|
| 398 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
| 399 | AC_DEFINE(HAVE_GETTEXT,1, |
---|
| 400 | [Define if the GNU gettext() function is already present or preinstalled.]) |
---|
| 401 | GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
---|
| 402 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
---|
| 403 | if test "$MSGFMT" != "no"; then |
---|
[20977] | 404 | glib_save_LIBS="$LIBS" |
---|
| 405 | LIBS="$LIBS $INTLLIBS" |
---|
[18659] | 406 | AC_CHECK_FUNCS(dcgettext) |
---|
| 407 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
---|
| 408 | GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
---|
| 409 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
---|
| 410 | AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
---|
| 411 | return _nl_msg_cat_cntr], |
---|
| 412 | [CATOBJEXT=.gmo |
---|
| 413 | DATADIRNAME=share], |
---|
[20977] | 414 | [case $host in |
---|
| 415 | *-*-solaris*) |
---|
| 416 | dnl On Solaris, if bind_textdomain_codeset is in libc, |
---|
| 417 | dnl GNU format message catalog is always supported, |
---|
| 418 | dnl since both are added to the libc all together. |
---|
| 419 | dnl Hence, we'd like to go with DATADIRNAME=share and |
---|
| 420 | dnl and CATOBJEXT=.gmo in this case. |
---|
| 421 | AC_CHECK_FUNC(bind_textdomain_codeset, |
---|
| 422 | [CATOBJEXT=.gmo |
---|
| 423 | DATADIRNAME=share], |
---|
| 424 | [CATOBJEXT=.mo |
---|
| 425 | DATADIRNAME=lib]) |
---|
| 426 | ;; |
---|
| 427 | *) |
---|
| 428 | CATOBJEXT=.mo |
---|
| 429 | DATADIRNAME=lib |
---|
| 430 | ;; |
---|
| 431 | esac]) |
---|
| 432 | LIBS="$glib_save_LIBS" |
---|
[18659] | 433 | INSTOBJEXT=.mo |
---|
[19172] | 434 | else |
---|
| 435 | gt_cv_have_gettext=no |
---|
[18659] | 436 | fi |
---|
| 437 | fi |
---|
| 438 | ]) |
---|
[18379] | 439 | |
---|
[18659] | 440 | if test "$gt_cv_have_gettext" = "yes" ; then |
---|
[18379] | 441 | AC_DEFINE(ENABLE_NLS, 1, |
---|
| 442 | [always defined to indicate that i18n is enabled]) |
---|
| 443 | fi |
---|
| 444 | |
---|
| 445 | dnl Test whether we really found GNU xgettext. |
---|
| 446 | if test "$XGETTEXT" != ":"; then |
---|
[18659] | 447 | dnl If it is not GNU xgettext we define it as : so that the |
---|
[18379] | 448 | dnl Makefiles still can work. |
---|
| 449 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
---|
| 450 | : ; |
---|
| 451 | else |
---|
| 452 | AC_MSG_RESULT( |
---|
| 453 | [found xgettext program is not GNU xgettext; ignore it]) |
---|
| 454 | XGETTEXT=":" |
---|
| 455 | fi |
---|
| 456 | fi |
---|
| 457 | |
---|
| 458 | # We need to process the po/ directory. |
---|
| 459 | POSUB=po |
---|
| 460 | |
---|
| 461 | AC_OUTPUT_COMMANDS( |
---|
| 462 | [case "$CONFIG_FILES" in *po/Makefile.in*) |
---|
| 463 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
---|
| 464 | esac]) |
---|
| 465 | |
---|
| 466 | dnl These rules are solely for the distribution goal. While doing this |
---|
| 467 | dnl we only have to keep exactly one list of the available catalogs |
---|
| 468 | dnl in configure.in. |
---|
| 469 | for lang in $ALL_LINGUAS; do |
---|
| 470 | GMOFILES="$GMOFILES $lang.gmo" |
---|
| 471 | POFILES="$POFILES $lang.po" |
---|
| 472 | done |
---|
| 473 | |
---|
| 474 | dnl Make all variables we use known to autoconf. |
---|
| 475 | AC_SUBST(CATALOGS) |
---|
| 476 | AC_SUBST(CATOBJEXT) |
---|
| 477 | AC_SUBST(DATADIRNAME) |
---|
| 478 | AC_SUBST(GMOFILES) |
---|
| 479 | AC_SUBST(INSTOBJEXT) |
---|
| 480 | AC_SUBST(INTLLIBS) |
---|
[18659] | 481 | AC_SUBST(PO_IN_DATADIR_TRUE) |
---|
| 482 | AC_SUBST(PO_IN_DATADIR_FALSE) |
---|
[18379] | 483 | AC_SUBST(POFILES) |
---|
| 484 | AC_SUBST(POSUB) |
---|
| 485 | ]) |
---|
| 486 | |
---|
[18659] | 487 | # AM_GLIB_GNU_GETTEXT |
---|
| 488 | # ------------------- |
---|
| 489 | # Do checks necessary for use of gettext. If a suitable implementation |
---|
| 490 | # of gettext is found in either in libintl or in the C library, |
---|
| 491 | # it will set INTLLIBS to the libraries needed for use of gettext |
---|
| 492 | # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable |
---|
| 493 | # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() |
---|
| 494 | # on various variables needed by the Makefile.in.in installed by |
---|
| 495 | # glib-gettextize. |
---|
| 496 | dnl |
---|
[20977] | 497 | glib_DEFUN([GLIB_GNU_GETTEXT], |
---|
[18659] | 498 | [AC_REQUIRE([AC_PROG_CC])dnl |
---|
[18379] | 499 | AC_REQUIRE([AC_HEADER_STDC])dnl |
---|
[18659] | 500 | |
---|
| 501 | GLIB_LC_MESSAGES |
---|
| 502 | GLIB_WITH_NLS |
---|
[18379] | 503 | |
---|
[18659] | 504 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
[18379] | 505 | if test "x$ALL_LINGUAS" = "x"; then |
---|
| 506 | LINGUAS= |
---|
| 507 | else |
---|
| 508 | AC_MSG_CHECKING(for catalogs to be installed) |
---|
| 509 | NEW_LINGUAS= |
---|
[20977] | 510 | for presentlang in $ALL_LINGUAS; do |
---|
| 511 | useit=no |
---|
| 512 | if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then |
---|
| 513 | desiredlanguages="$LINGUAS" |
---|
| 514 | else |
---|
| 515 | desiredlanguages="$ALL_LINGUAS" |
---|
| 516 | fi |
---|
| 517 | for desiredlang in $desiredlanguages; do |
---|
| 518 | # Use the presentlang catalog if desiredlang is |
---|
| 519 | # a. equal to presentlang, or |
---|
| 520 | # b. a variant of presentlang (because in this case, |
---|
| 521 | # presentlang can be used as a fallback for messages |
---|
| 522 | # which are not translated in the desiredlang catalog). |
---|
| 523 | case "$desiredlang" in |
---|
| 524 | "$presentlang"*) useit=yes;; |
---|
| 525 | esac |
---|
| 526 | done |
---|
| 527 | if test $useit = yes; then |
---|
| 528 | NEW_LINGUAS="$NEW_LINGUAS $presentlang" |
---|
| 529 | fi |
---|
[18379] | 530 | done |
---|
| 531 | LINGUAS=$NEW_LINGUAS |
---|
| 532 | AC_MSG_RESULT($LINGUAS) |
---|
| 533 | fi |
---|
| 534 | |
---|
| 535 | dnl Construct list of names of catalog files to be constructed. |
---|
| 536 | if test -n "$LINGUAS"; then |
---|
| 537 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
---|
| 538 | fi |
---|
| 539 | fi |
---|
| 540 | |
---|
| 541 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
---|
| 542 | dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
---|
| 543 | dnl Try to locate is. |
---|
| 544 | MKINSTALLDIRS= |
---|
| 545 | if test -n "$ac_aux_dir"; then |
---|
| 546 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
---|
| 547 | fi |
---|
| 548 | if test -z "$MKINSTALLDIRS"; then |
---|
| 549 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
---|
| 550 | fi |
---|
| 551 | AC_SUBST(MKINSTALLDIRS) |
---|
| 552 | |
---|
| 553 | dnl Generate list of files to be processed by xgettext which will |
---|
| 554 | dnl be included in po/Makefile. |
---|
| 555 | test -d po || mkdir po |
---|
| 556 | if test "x$srcdir" != "x."; then |
---|
| 557 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
---|
| 558 | posrcprefix="$srcdir/" |
---|
| 559 | else |
---|
| 560 | posrcprefix="../$srcdir/" |
---|
| 561 | fi |
---|
| 562 | else |
---|
| 563 | posrcprefix="../" |
---|
| 564 | fi |
---|
| 565 | rm -f po/POTFILES |
---|
| 566 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
---|
| 567 | < $srcdir/po/POTFILES.in > po/POTFILES |
---|
| 568 | ]) |
---|
| 569 | |
---|
[18659] | 570 | # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) |
---|
| 571 | # ------------------------------- |
---|
| 572 | # Define VARIABLE to the location where catalog files will |
---|
| 573 | # be installed by po/Makefile. |
---|
[20977] | 574 | glib_DEFUN([GLIB_DEFINE_LOCALEDIR], |
---|
[18659] | 575 | [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl |
---|
| 576 | glib_save_prefix="$prefix" |
---|
[20977] | 577 | glib_save_exec_prefix="$exec_prefix" |
---|
[18659] | 578 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
[20977] | 579 | test "x$exec_prefix" = xNONE && exec_prefix=$prefix |
---|
[18659] | 580 | if test "x$CATOBJEXT" = "x.mo" ; then |
---|
| 581 | localedir=`eval echo "${libdir}/locale"` |
---|
| 582 | else |
---|
| 583 | localedir=`eval echo "${datadir}/locale"` |
---|
| 584 | fi |
---|
| 585 | prefix="$glib_save_prefix" |
---|
[20977] | 586 | exec_prefix="$glib_save_exec_prefix" |
---|
[18659] | 587 | AC_DEFINE_UNQUOTED($1, "$localedir", |
---|
| 588 | [Define the location where the catalogs will be installed]) |
---|
| 589 | ]) |
---|
[18379] | 590 | |
---|
[18659] | 591 | dnl |
---|
| 592 | dnl Now the definitions that aclocal will find |
---|
| 593 | dnl |
---|
| 594 | ifdef(glib_configure_in,[],[ |
---|
[20977] | 595 | AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) |
---|
| 596 | AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) |
---|
[18659] | 597 | ])dnl |
---|
[18379] | 598 | |
---|
[20977] | 599 | ll## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- |
---|
[18659] | 600 | |
---|
[21326] | 601 | dnl AC_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) |
---|
[18379] | 602 | # serial 1 AC_PROG_INTLTOOL |
---|
[20977] | 603 | AC_DEFUN([AC_PROG_INTLTOOL], |
---|
[18379] | 604 | [ |
---|
| 605 | |
---|
| 606 | if test -n "$1"; then |
---|
| 607 | AC_MSG_CHECKING(for intltool >= $1) |
---|
| 608 | |
---|
| 609 | INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'` |
---|
[20977] | 610 | INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${ac_aux_dir}/intltool-update.in` |
---|
[18379] | 611 | changequote({{,}}) |
---|
[20977] | 612 | INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in` |
---|
[18379] | 613 | changequote([,]) |
---|
| 614 | |
---|
| 615 | if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then |
---|
| 616 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) |
---|
| 617 | else |
---|
| 618 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.]) |
---|
| 619 | exit 1 |
---|
| 620 | fi |
---|
| 621 | fi |
---|
| 622 | |
---|
[21326] | 623 | INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 624 | INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 625 | INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 626 | INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 627 | INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' |
---|
| 628 | INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 629 | INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 630 | INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 631 | INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 632 | INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 633 | INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 634 | INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 635 | INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 636 | INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 637 | INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
| 638 | INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
---|
[18379] | 639 | |
---|
| 640 | AC_SUBST(INTLTOOL_DESKTOP_RULE) |
---|
| 641 | AC_SUBST(INTLTOOL_DIRECTORY_RULE) |
---|
| 642 | AC_SUBST(INTLTOOL_KEYS_RULE) |
---|
[18659] | 643 | AC_SUBST(INTLTOOL_PROP_RULE) |
---|
[18379] | 644 | AC_SUBST(INTLTOOL_OAF_RULE) |
---|
| 645 | AC_SUBST(INTLTOOL_PONG_RULE) |
---|
| 646 | AC_SUBST(INTLTOOL_SERVER_RULE) |
---|
| 647 | AC_SUBST(INTLTOOL_SHEET_RULE) |
---|
| 648 | AC_SUBST(INTLTOOL_SOUNDLIST_RULE) |
---|
| 649 | AC_SUBST(INTLTOOL_UI_RULE) |
---|
[20977] | 650 | AC_SUBST(INTLTOOL_XAM_RULE) |
---|
| 651 | AC_SUBST(INTLTOOL_KBD_RULE) |
---|
[18379] | 652 | AC_SUBST(INTLTOOL_XML_RULE) |
---|
| 653 | AC_SUBST(INTLTOOL_CAVES_RULE) |
---|
| 654 | AC_SUBST(INTLTOOL_SCHEMAS_RULE) |
---|
[18659] | 655 | AC_SUBST(INTLTOOL_THEME_RULE) |
---|
[18379] | 656 | |
---|
| 657 | # Use the tools built into the package, not the ones that are installed. |
---|
| 658 | |
---|
| 659 | INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' |
---|
| 660 | INTLTOOL_MERGE='$(top_builddir)/intltool-merge' |
---|
| 661 | INTLTOOL_UPDATE='$(top_builddir)/intltool-update' |
---|
| 662 | |
---|
| 663 | AC_SUBST(INTLTOOL_EXTRACT) |
---|
| 664 | AC_SUBST(INTLTOOL_MERGE) |
---|
| 665 | AC_SUBST(INTLTOOL_UPDATE) |
---|
| 666 | |
---|
| 667 | AC_PATH_PROG(INTLTOOL_PERL, perl) |
---|
| 668 | if test -z "$INTLTOOL_PERL"; then |
---|
| 669 | AC_MSG_ERROR([perl not found; required for intltool]) |
---|
| 670 | fi |
---|
| 671 | if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then |
---|
| 672 | AC_MSG_ERROR([perl 5.x required for intltool]) |
---|
| 673 | fi |
---|
[21326] | 674 | if test "x$2" != "xno-xml"; then |
---|
| 675 | AC_MSG_CHECKING([for XML::Parser]) |
---|
| 676 | if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then |
---|
| 677 | AC_MSG_RESULT([ok]) |
---|
| 678 | else |
---|
| 679 | AC_MSG_ERROR([XML::Parser perl module is required for intltool]) |
---|
| 680 | fi |
---|
[20977] | 681 | fi |
---|
[18379] | 682 | |
---|
| 683 | # Remove file type tags (using []) from po/POTFILES. |
---|
| 684 | |
---|
| 685 | ifdef([AC_DIVERSION_ICMDS],[ |
---|
| 686 | AC_DIVERT_PUSH(AC_DIVERSION_ICMDS) |
---|
| 687 | changequote(,) |
---|
| 688 | mv -f po/POTFILES po/POTFILES.tmp |
---|
[20977] | 689 | sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
[18379] | 690 | rm -f po/POTFILES.tmp |
---|
| 691 | changequote([,]) |
---|
| 692 | AC_DIVERT_POP() |
---|
| 693 | ],[ |
---|
| 694 | ifdef([AC_CONFIG_COMMANDS_PRE],[ |
---|
| 695 | AC_CONFIG_COMMANDS_PRE([ |
---|
| 696 | changequote(,) |
---|
| 697 | mv -f po/POTFILES po/POTFILES.tmp |
---|
[20977] | 698 | sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
[18379] | 699 | rm -f po/POTFILES.tmp |
---|
| 700 | changequote([,]) |
---|
| 701 | ]) |
---|
| 702 | ]) |
---|
| 703 | ]) |
---|
| 704 | |
---|
| 705 | # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. |
---|
| 706 | |
---|
| 707 | AC_OUTPUT_COMMANDS([ |
---|
| 708 | |
---|
[20977] | 709 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${ac_aux_dir}/intltool-extract.in > intltool-extract.out |
---|
[18379] | 710 | if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then |
---|
| 711 | rm -f intltool-extract.out |
---|
| 712 | else |
---|
| 713 | mv -f intltool-extract.out intltool-extract |
---|
| 714 | fi |
---|
| 715 | chmod ugo+x intltool-extract |
---|
| 716 | chmod u+w intltool-extract |
---|
| 717 | |
---|
[20977] | 718 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" \ |
---|
| 719 | < ${ac_aux_dir}/intltool-merge.in > intltool-merge.out |
---|
[18379] | 720 | if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then |
---|
| 721 | rm -f intltool-merge.out |
---|
| 722 | else |
---|
| 723 | mv -f intltool-merge.out intltool-merge |
---|
| 724 | fi |
---|
| 725 | chmod ugo+x intltool-merge |
---|
| 726 | chmod u+w intltool-merge |
---|
| 727 | |
---|
[20977] | 728 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${ac_aux_dir}/intltool-update.in > intltool-update.out |
---|
[18379] | 729 | if cmp -s intltool-update intltool-update.out 2>/dev/null; then |
---|
| 730 | rm -f intltool-update.out |
---|
| 731 | else |
---|
| 732 | mv -f intltool-update.out intltool-update |
---|
| 733 | fi |
---|
| 734 | chmod ugo+x intltool-update |
---|
| 735 | chmod u+w intltool-update |
---|
| 736 | |
---|
[20977] | 737 | ], INTLTOOL_PERL=${INTLTOOL_PERL} ac_aux_dir=${ac_aux_dir}) |
---|
[18379] | 738 | |
---|
| 739 | ]) |
---|
| 740 | |
---|
[20977] | 741 | dnl GNOME_COMPILE_WARNINGS |
---|
| 742 | dnl Turn on many useful compiler warnings |
---|
| 743 | dnl For now, only works on GCC |
---|
| 744 | AC_DEFUN([GNOME_COMPILE_WARNINGS],[ |
---|
| 745 | dnl ****************************** |
---|
| 746 | dnl More compiler warnings |
---|
| 747 | dnl ****************************** |
---|
[18379] | 748 | |
---|
[20977] | 749 | if test -z "$1" ; then |
---|
| 750 | default_compile_warnings=no |
---|
| 751 | else |
---|
| 752 | default_compile_warnings="$1" |
---|
| 753 | fi |
---|
| 754 | |
---|
| 755 | AC_ARG_ENABLE(compile-warnings, |
---|
| 756 | [ --enable-compile-warnings=[no/minimum/yes/maximum/error] Turn on compiler warnings.], [enable_compile_warnings="$default_compile_warnings"], enable_compile_warnings=yes) |
---|
| 757 | |
---|
| 758 | warnCFLAGS= |
---|
| 759 | if test "x$GCC" != xyes; then |
---|
| 760 | enable_compile_warnings=no |
---|
| 761 | fi |
---|
| 762 | |
---|
| 763 | warning_flags= |
---|
| 764 | realsave_CFLAGS="$CFLAGS" |
---|
| 765 | |
---|
| 766 | case "$enable_compile_warnings" in |
---|
| 767 | no) |
---|
| 768 | warning_flags= |
---|
| 769 | ;; |
---|
| 770 | minimum) |
---|
| 771 | warning_flags="-Wall -Wunused" |
---|
| 772 | ;; |
---|
| 773 | yes) |
---|
| 774 | warning_flags="-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations" |
---|
| 775 | ;; |
---|
| 776 | maximum|error) |
---|
| 777 | warning_flags="-Wall -Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith" |
---|
| 778 | CFLAGS="$warning_flags $CFLAGS" |
---|
| 779 | for option in -Wsign-promo -Wno-sign-compare; do |
---|
| 780 | SAVE_CFLAGS="$CFLAGS" |
---|
| 781 | CFLAGS="$CFLAGS $option" |
---|
| 782 | AC_MSG_CHECKING([whether gcc understands $option]) |
---|
| 783 | AC_TRY_COMPILE([], [], |
---|
| 784 | has_option=yes, |
---|
| 785 | has_option=no,) |
---|
| 786 | CFLAGS="$SAVE_CFLAGS" |
---|
| 787 | AC_MSG_RESULT($has_option) |
---|
| 788 | if test $has_option = yes; then |
---|
| 789 | warning_flags="$warning_flags $option" |
---|
| 790 | fi |
---|
| 791 | unset has_option |
---|
| 792 | unset SAVE_CFLAGS |
---|
| 793 | done |
---|
| 794 | unset option |
---|
| 795 | if test "$enable_compile_warnings" = "error" ; then |
---|
| 796 | warning_flags="$warning_flags -Werror" |
---|
| 797 | fi |
---|
| 798 | ;; |
---|
| 799 | *) |
---|
| 800 | AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) |
---|
| 801 | ;; |
---|
| 802 | esac |
---|
| 803 | CFLAGS="$realsave_CFLAGS" |
---|
| 804 | AC_MSG_CHECKING(what warning flags to pass to the C compiler) |
---|
| 805 | AC_MSG_RESULT($warning_flags) |
---|
| 806 | |
---|
| 807 | AC_ARG_ENABLE(iso-c, |
---|
| 808 | [ --enable-iso-c Try to warn if code is not ISO C ],, |
---|
| 809 | enable_iso_c=no) |
---|
| 810 | |
---|
| 811 | AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) |
---|
| 812 | complCFLAGS= |
---|
| 813 | if test "x$enable_iso_c" != "xno"; then |
---|
| 814 | if test "x$GCC" = "xyes"; then |
---|
| 815 | case " $CFLAGS " in |
---|
| 816 | *[\ \ ]-ansi[\ \ ]*) ;; |
---|
| 817 | *) complCFLAGS="$complCFLAGS -ansi" ;; |
---|
| 818 | esac |
---|
| 819 | case " $CFLAGS " in |
---|
| 820 | *[\ \ ]-pedantic[\ \ ]*) ;; |
---|
| 821 | *) complCFLAGS="$complCFLAGS -pedantic" ;; |
---|
| 822 | esac |
---|
| 823 | fi |
---|
| 824 | fi |
---|
| 825 | AC_MSG_RESULT($complCFLAGS) |
---|
| 826 | |
---|
| 827 | WARN_CFLAGS="$warning_flags $complCFLAGS" |
---|
| 828 | AC_SUBST(WARN_CFLAGS) |
---|
| 829 | ]) |
---|
| 830 | |
---|
| 831 | dnl For C++, do basically the same thing. |
---|
| 832 | |
---|
| 833 | AC_DEFUN([GNOME_CXX_WARNINGS],[ |
---|
| 834 | AC_ARG_ENABLE(cxx-warnings, |
---|
| 835 | [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum) |
---|
| 836 | |
---|
| 837 | AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) |
---|
| 838 | warnCXXFLAGS= |
---|
| 839 | if test "x$GCC" != xyes; then |
---|
| 840 | enable_compile_warnings=no |
---|
| 841 | fi |
---|
| 842 | if test "x$enable_cxx_warnings" != "xno"; then |
---|
| 843 | if test "x$GCC" = "xyes"; then |
---|
| 844 | case " $CXXFLAGS " in |
---|
| 845 | *[\ \ ]-Wall[\ \ ]*) ;; |
---|
| 846 | *) warnCXXFLAGS="-Wall -Wno-unused" ;; |
---|
| 847 | esac |
---|
| 848 | |
---|
| 849 | ## -W is not all that useful. And it cannot be controlled |
---|
| 850 | ## with individual -Wno-xxx flags, unlike -Wall |
---|
| 851 | if test "x$enable_cxx_warnings" = "xyes"; then |
---|
| 852 | warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual" |
---|
| 853 | fi |
---|
| 854 | fi |
---|
| 855 | fi |
---|
| 856 | AC_MSG_RESULT($warnCXXFLAGS) |
---|
| 857 | |
---|
| 858 | AC_ARG_ENABLE(iso-cxx, |
---|
| 859 | [ --enable-iso-cxx Try to warn if code is not ISO C++ ],, |
---|
| 860 | enable_iso_cxx=no) |
---|
| 861 | |
---|
| 862 | AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) |
---|
| 863 | complCXXFLAGS= |
---|
| 864 | if test "x$enable_iso_cxx" != "xno"; then |
---|
| 865 | if test "x$GCC" = "xyes"; then |
---|
| 866 | case " $CXXFLAGS " in |
---|
| 867 | *[\ \ ]-ansi[\ \ ]*) ;; |
---|
| 868 | *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; |
---|
| 869 | esac |
---|
| 870 | |
---|
| 871 | case " $CXXFLAGS " in |
---|
| 872 | *[\ \ ]-pedantic[\ \ ]*) ;; |
---|
| 873 | *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; |
---|
| 874 | esac |
---|
| 875 | fi |
---|
| 876 | fi |
---|
| 877 | AC_MSG_RESULT($complCXXFLAGS) |
---|
| 878 | if test "x$cxxflags_set" != "xyes"; then |
---|
| 879 | CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" |
---|
| 880 | cxxflags_set=yes |
---|
| 881 | AC_SUBST(cxxflags_set) |
---|
| 882 | fi |
---|
| 883 | ]) |
---|
| 884 | |
---|
| 885 | |
---|
[18379] | 886 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
---|
| 887 | dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
---|
| 888 | dnl also defines GSTUFF_PKG_ERRORS on error |
---|
| 889 | AC_DEFUN(PKG_CHECK_MODULES, [ |
---|
| 890 | succeeded=no |
---|
| 891 | |
---|
| 892 | if test -z "$PKG_CONFIG"; then |
---|
| 893 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
| 894 | fi |
---|
| 895 | |
---|
| 896 | if test "$PKG_CONFIG" = "no" ; then |
---|
| 897 | echo "*** The pkg-config script could not be found. Make sure it is" |
---|
| 898 | echo "*** in your path, or set the PKG_CONFIG environment variable" |
---|
| 899 | echo "*** to the full path to pkg-config." |
---|
| 900 | echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
---|
| 901 | else |
---|
| 902 | PKG_CONFIG_MIN_VERSION=0.9.0 |
---|
| 903 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
---|
| 904 | AC_MSG_CHECKING(for $2) |
---|
| 905 | |
---|
| 906 | if $PKG_CONFIG --exists "$2" ; then |
---|
| 907 | AC_MSG_RESULT(yes) |
---|
| 908 | succeeded=yes |
---|
| 909 | |
---|
| 910 | AC_MSG_CHECKING($1_CFLAGS) |
---|
| 911 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` |
---|
| 912 | AC_MSG_RESULT($$1_CFLAGS) |
---|
| 913 | |
---|
| 914 | AC_MSG_CHECKING($1_LIBS) |
---|
| 915 | $1_LIBS=`$PKG_CONFIG --libs "$2"` |
---|
| 916 | AC_MSG_RESULT($$1_LIBS) |
---|
| 917 | else |
---|
| 918 | $1_CFLAGS="" |
---|
| 919 | $1_LIBS="" |
---|
| 920 | ## If we have a custom action on failure, don't print errors, but |
---|
| 921 | ## do set a variable so people can do so. |
---|
| 922 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
---|
| 923 | ifelse([$4], ,echo $$1_PKG_ERRORS,) |
---|
| 924 | fi |
---|
| 925 | |
---|
| 926 | AC_SUBST($1_CFLAGS) |
---|
| 927 | AC_SUBST($1_LIBS) |
---|
| 928 | else |
---|
| 929 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
---|
| 930 | echo "*** See http://www.freedesktop.org/software/pkgconfig" |
---|
| 931 | fi |
---|
| 932 | fi |
---|
| 933 | |
---|
| 934 | if test $succeeded = yes; then |
---|
| 935 | ifelse([$3], , :, [$3]) |
---|
| 936 | else |
---|
| 937 | ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) |
---|
| 938 | fi |
---|
| 939 | ]) |
---|
| 940 | |
---|
| 941 | |
---|
| 942 | |
---|
[20977] | 943 | dnl AM_GCONF_SOURCE_2 |
---|
| 944 | dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas |
---|
| 945 | dnl (i.e. pass to gconftool-2 |
---|
| 946 | dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where |
---|
| 947 | dnl you should install foo.schemas files |
---|
| 948 | dnl |
---|
| 949 | |
---|
[21326] | 950 | AC_DEFUN([AM_GCONF_SOURCE_2], |
---|
[20977] | 951 | [ |
---|
| 952 | if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then |
---|
| 953 | GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` |
---|
| 954 | else |
---|
| 955 | GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE |
---|
| 956 | fi |
---|
| 957 | |
---|
| 958 | AC_ARG_WITH(gconf-source, |
---|
| 959 | [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",) |
---|
| 960 | |
---|
| 961 | AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) |
---|
| 962 | AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) |
---|
| 963 | |
---|
| 964 | if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then |
---|
[21326] | 965 | GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' |
---|
[20977] | 966 | fi |
---|
| 967 | |
---|
| 968 | AC_ARG_WITH(gconf-schema-file-dir, |
---|
| 969 | [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",) |
---|
| 970 | |
---|
| 971 | AC_SUBST(GCONF_SCHEMA_FILE_DIR) |
---|
| 972 | AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) |
---|
| 973 | |
---|
| 974 | AC_ARG_ENABLE(schemas-install, |
---|
| 975 | [ --disable-schemas-install Disable the schemas installation], |
---|
| 976 | [case "${enableval}" in |
---|
| 977 | yes) schemas_install=true ;; |
---|
| 978 | no) schemas_install=false ;; |
---|
| 979 | *) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;; |
---|
| 980 | esac],[schemas_install=true]) |
---|
| 981 | AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue) |
---|
| 982 | ]) |
---|
| 983 | |
---|