18
18
You have another version of autoconf. It may work, but is not guaranteed to.
19
19
If you have problems, you may need to regenerate the build system entirely.
20
20
To do so, use the procedure documented by the package, typically `autoreconf'.])])
23
int major, minor, micro;
27
- ignored = system ("touch conf.glibtest");
28
+ fclose (fopen ("conf.glibtest", "w"));
30
/* HP/UX 9 (%@#!) writes to sscanf strings */
31
tmp_version = g_strdup("$min_glib_version");
33
[am__api_version='1.11'
34
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
35
dnl require some minimum version. Point them to the right macro.
22
-# nls.m4 serial 3 (gettext-0.15)
23
-dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
24
-dnl This file is free software; the Free Software Foundation
25
-dnl gives unlimited permission to copy and/or distribute it,
26
-dnl with or without modifications, as long as this notice is preserved.
27
+dnl AM_GCONF_SOURCE_2
28
+dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
29
+dnl (i.e. pass to gconftool-2
30
+dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
31
+dnl you should install foo.schemas files
33
-dnl This file can can be used in projects which are not available under
34
-dnl the GNU General Public License or the GNU Library General Public
35
-dnl License but which still want to provide support for the GNU gettext
37
-dnl Please note that the actual code of the GNU gettext library is covered
38
-dnl by the GNU Library General Public License, and the rest of the GNU
39
-dnl gettext package package is covered by the GNU General Public License.
40
-dnl They are *not* in the public domain.
43
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
44
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
49
+AC_DEFUN([AM_GCONF_SOURCE_2],
51
- AC_MSG_CHECKING([whether NLS is requested])
52
- dnl Default is enabled NLS
54
- [ --disable-nls do not use Native Language Support],
55
- USE_NLS=$enableval, USE_NLS=yes)
56
- AC_MSG_RESULT($USE_NLS)
60
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
62
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
64
-# This program is free software; you can redistribute it and/or modify
65
-# it under the terms of the GNU General Public License as published by
66
-# the Free Software Foundation; either version 2 of the License, or
67
-# (at your option) any later version.
69
-# This program is distributed in the hope that it will be useful, but
70
-# WITHOUT ANY WARRANTY; without even the implied warranty of
71
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
72
-# General Public License for more details.
74
-# You should have received a copy of the GNU General Public License
75
-# along with this program; if not, write to the Free Software
76
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
78
-# As a special exception to the GNU General Public License, if you
79
-# distribute this file as part of a program that contains a
80
-# configuration script generated by Autoconf, you may include it under
81
-# the same distribution terms that you use for the rest of that program.
82
+ if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
83
+ GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
85
+ GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
88
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
89
-# ----------------------------------
90
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
91
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
92
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
93
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
94
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
95
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
97
-if test -n "$PKG_CONFIG"; then
98
- _pkg_min_version=m4_default([$1], [0.9.0])
99
- AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
100
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
101
- AC_MSG_RESULT([yes])
103
- AC_MSG_RESULT([no])
108
-])# PKG_PROG_PKG_CONFIG
109
+ AC_ARG_WITH([gconf-source],
110
+ AC_HELP_STRING([--with-gconf-source=sourceaddress],
111
+ [Config database for installing schema files.]),
112
+ [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
114
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
116
-# Check to see whether a particular set of modules exists. Similar
117
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
120
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
121
-# this or PKG_CHECK_MODULES is called, or make sure to call
122
-# PKG_CHECK_EXISTS manually
123
-# --------------------------------------------------------------
124
-AC_DEFUN([PKG_CHECK_EXISTS],
125
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
126
-if test -n "$PKG_CONFIG" && \
127
- AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
128
- m4_ifval([$2], [$2], [:])
129
-m4_ifvaln([$3], [else
132
+ AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
133
+ AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
135
+ if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
136
+ GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
139
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
140
-# ---------------------------------------------
141
-m4_define([_PKG_CONFIG],
142
-[if test -n "$PKG_CONFIG"; then
143
- if test -n "$$1"; then
146
- PKG_CHECK_EXISTS([$3],
147
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
154
+ AC_ARG_WITH([gconf-schema-file-dir],
155
+ AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
156
+ [Directory for installing schema files.]),
157
+ [GCONF_SCHEMA_FILE_DIR="$withval"],)
159
-# _PKG_SHORT_ERRORS_SUPPORTED
160
-# -----------------------------
161
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
162
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
163
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
164
- _pkg_short_errors_supported=yes
166
- _pkg_short_errors_supported=no
168
-])# _PKG_SHORT_ERRORS_SUPPORTED
169
+ AC_SUBST(GCONF_SCHEMA_FILE_DIR)
170
+ AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
172
+ AC_ARG_ENABLE(schemas-install,
173
+ AC_HELP_STRING([--disable-schemas-install],
174
+ [Disable the schemas installation]),
175
+ [case ${enableval} in
177
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
179
+ AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
182
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
183
-# [ACTION-IF-NOT-FOUND])
186
-# Note that if there is a possibility the first call to
187
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
188
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
191
-# --------------------------------------------------------------
192
-AC_DEFUN([PKG_CHECK_MODULES],
193
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
194
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
195
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
196
+# Configure paths for GLIB
197
+# Owen Taylor 1997-2001
200
-AC_MSG_CHECKING([for $1])
201
+dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
202
+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
203
+dnl gthread, or gio is specified in MODULES, pass to pkg-config
205
+AC_DEFUN([AM_PATH_GLIB_2_0],
207
+dnl Get the cflags and libraries from pkg-config
209
+AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
210
+ , enable_glibtest=yes)
212
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
213
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
214
+ pkg_config_args=glib-2.0
219
+ pkg_config_args="$pkg_config_args gmodule-2.0"
222
+ pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
225
+ pkg_config_args="$pkg_config_args gobject-2.0"
228
+ pkg_config_args="$pkg_config_args gthread-2.0"
231
+ pkg_config_args="$pkg_config_args $module-2.0"
236
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
237
-and $1[]_LIBS to avoid the need to call pkg-config.
238
-See the pkg-config man page for more details.])
239
+ PKG_PROG_PKG_CONFIG([0.16])
241
-if test $pkg_failed = yes; then
242
- _PKG_SHORT_ERRORS_SUPPORTED
243
- if test $_pkg_short_errors_supported = yes; then
244
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
246
- $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
248
- # Put the nasty error message in config.log where it belongs
249
- echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
252
- ifelse([$4], , [AC_MSG_ERROR(dnl
253
-[Package requirements ($2) were not met:
254
+ if test "x$PKG_CONFIG" = x ; then
260
+ min_glib_version=ifelse([$1], ,2.0.0,$1)
261
+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
263
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
264
-installed software in a non-standard prefix.
265
+ if test x$PKG_CONFIG != xno ; then
266
+ ## don't try to run the test against uninstalled libtool libs
267
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
268
+ echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
274
- [AC_MSG_RESULT([no])
276
-elif test $pkg_failed = untried; then
277
- ifelse([$4], , [AC_MSG_FAILURE(dnl
278
-[The pkg-config script could not be found or is too old. Make sure it
279
-is in your PATH or set the PKG_CONFIG environment variable to the full
281
+ if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
289
+ if test x"$no_glib" = x ; then
290
+ GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
291
+ GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
292
+ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
294
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
297
- $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
298
- $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
299
- AC_MSG_RESULT([yes])
300
- ifelse([$3], , :, [$3])
302
-])# PKG_CHECK_MODULES
304
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
306
-# This file is free software; the Free Software Foundation
307
-# gives unlimited permission to copy and/or distribute it,
308
-# with or without modifications, as long as this notice is preserved.
309
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
310
+ GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
311
+ glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
312
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
313
+ glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
314
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
315
+ glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
316
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
317
+ if test "x$enable_glibtest" = "xyes" ; then
318
+ ac_save_CFLAGS="$CFLAGS"
319
+ ac_save_LIBS="$LIBS"
320
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
321
+ LIBS="$GLIB_LIBS $LIBS"
323
+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
324
+dnl checks the results of pkg-config to some extent)
326
+ rm -f conf.glibtest
332
-# AM_AUTOMAKE_VERSION(VERSION)
333
-# ----------------------------
334
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
335
-# generated from the m4 files accompanying Automake X.Y.
336
-# (This private macro should not be called outside this file.)
337
-AC_DEFUN([AM_AUTOMAKE_VERSION],
338
-[am__api_version='1.11'
339
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
340
-dnl require some minimum version. Point them to the right macro.
36
341
-m4_if([$1], [1.11], [],
342
- [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
347
+ int major, minor, micro;
350
-# _AM_AUTOCONF_VERSION(VERSION)
351
-# -----------------------------
352
-# aclocal traces this macro to find the Autoconf version.
353
-# This is a private macro too. Using m4_define simplifies
354
-# the logic in aclocal, which can simply ignore this definition.
355
-m4_define([_AM_AUTOCONF_VERSION], [])
356
+ fclose (fopen ("conf.glibtest", "w"));
358
-# AM_SET_CURRENT_AUTOMAKE_VERSION
359
-# -------------------------------
360
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
361
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
362
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
363
-[AM_AUTOMAKE_VERSION([1.11])dnl
364
-m4_ifndef([AC_AUTOCONF_VERSION],
365
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
366
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
367
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
368
+ tmp_version = g_strdup("$min_glib_version");
369
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
370
+ printf("%s, bad version string\n", "$min_glib_version");
374
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
375
+ if ((glib_major_version != $glib_config_major_version) ||
376
+ (glib_minor_version != $glib_config_minor_version) ||
377
+ (glib_micro_version != $glib_config_micro_version))
379
+ printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
380
+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
381
+ glib_major_version, glib_minor_version, glib_micro_version);
382
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
383
+ printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
384
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
385
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
386
+ printf("*** required on your system.\n");
387
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
388
+ printf("*** to point to the correct configuration files\n");
390
+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
391
+ (glib_minor_version != GLIB_MINOR_VERSION) ||
392
+ (glib_micro_version != GLIB_MICRO_VERSION))
394
+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
395
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
396
+ printf("*** library (version %d.%d.%d)\n",
397
+ glib_major_version, glib_minor_version, glib_micro_version);
401
+ if ((glib_major_version > major) ||
402
+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
403
+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
409
+ printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
410
+ glib_major_version, glib_minor_version, glib_micro_version);
411
+ printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
412
+ major, minor, micro);
413
+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
415
+ printf("*** If you have already installed a sufficiently new version, this error\n");
416
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
417
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
418
+ printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
419
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
420
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
421
+ printf("*** so that the correct libraries are found at run-time))\n");
426
+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
427
+ CFLAGS="$ac_save_CFLAGS"
428
+ LIBS="$ac_save_LIBS"
431
+ if test "x$no_glib" = x ; then
432
+ AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
433
+ ifelse([$2], , :, [$2])
436
+ if test "$PKG_CONFIG" = "no" ; then
437
+ echo "*** A new enough version of pkg-config was not found."
438
+ echo "*** See http://www.freedesktop.org/software/pkgconfig/"
440
+ if test -f conf.glibtest ; then
443
+ echo "*** Could not run GLIB test program, checking why..."
444
+ ac_save_CFLAGS="$CFLAGS"
445
+ ac_save_LIBS="$LIBS"
446
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
447
+ LIBS="$LIBS $GLIB_LIBS"
451
+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
452
+ [ echo "*** The test program compiled, but did not run. This usually means"
453
+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
454
+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
455
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
456
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
457
+ echo "*** is required on your system"
459
+ echo "*** If you have an old version installed, it is best to remove it, although"
460
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
461
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
462
+ echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
463
+ CFLAGS="$ac_save_CFLAGS"
464
+ LIBS="$ac_save_LIBS"
472
+ ifelse([$3], , :, [$3])
474
+ AC_SUBST(GLIB_CFLAGS)
475
+ AC_SUBST(GLIB_LIBS)
476
+ AC_SUBST(GLIB_GENMARSHAL)
477
+ AC_SUBST(GOBJECT_QUERY)
478
+ AC_SUBST(GLIB_MKENUMS)
479
+ rm -f conf.glibtest
482
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
483
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
484
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
486
-# This file is free software; the Free Software Foundation
487
-# gives unlimited permission to copy and/or distribute it,
488
-# with or without modifications, as long as this notice is preserved.
490
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
491
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
492
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
493
+# This file is free software, distributed under the terms of the GNU
494
+# General Public License. As a special exception to the GNU General
495
+# Public License, this file may be distributed as part of a program
496
+# that contains a configuration script generated by Autoconf, under
497
+# the same distribution terms as the rest of that program.
499
-# Of course, Automake must honor this variable whenever it calls a
500
-# tool from the auxiliary directory. The problem is that $srcdir (and
501
-# therefore $ac_aux_dir as well) can be either absolute or relative,
502
-# depending on how configure is run. This is pretty annoying, since
503
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
504
-# source directory, any form will work fine, but in subdirectories a
505
-# relative path needs to be adjusted first.
506
+# This file can be copied and used freely without restrictions. It can
507
+# be used in projects which are not available under the GNU Public License
508
+# but which still want to provide support for the GNU gettext functionality.
510
-# $ac_aux_dir/missing
511
-# fails when called from a subdirectory if $ac_aux_dir is relative
512
-# $top_srcdir/$ac_aux_dir/missing
513
-# fails if $ac_aux_dir is absolute,
514
-# fails when called from a subdirectory in a VPATH build with
515
-# a relative $ac_aux_dir
516
+# Macro to add for using GNU gettext.
517
+# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
519
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
520
-# are both prefixed by $srcdir. In an in-source build this is usually
521
-# harmless because $srcdir is `.', but things will broke when you
522
-# start a VPATH build or use an absolute $srcdir.
523
+# Modified to never use included libintl.
524
+# Owen Taylor <otaylor@redhat.com>, 12/15/1998
526
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
527
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
528
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
529
-# and then we would define $MISSING as
530
-# MISSING="\${SHELL} $am_aux_dir/missing"
531
-# This will work as long as MISSING is not called from configure, because
532
-# unfortunately $(top_srcdir) has no meaning in configure.
533
-# However there are other variables, like CC, which are often used in
534
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
535
+# Major rework to remove unused code
536
+# Owen Taylor <otaylor@redhat.com>, 12/11/2002
538
-# Another solution, used here, is to always expand $ac_aux_dir to an
539
-# absolute PATH. The drawback is that using absolute paths prevent a
540
-# configured tree to be moved without reconfiguration.
542
-AC_DEFUN([AM_AUX_DIR_EXPAND],
543
-[dnl Rely on autoconf to set up CDPATH properly.
544
-AC_PREREQ([2.50])dnl
545
-# expand $ac_aux_dir to an absolute path
546
-am_aux_dir=`cd $ac_aux_dir && pwd`
549
-# AM_CONDITIONAL -*- Autoconf -*-
551
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
552
-# Free Software Foundation, Inc.
553
+# Added better handling of ALL_LINGUAS from GNU gettext version
554
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
556
-# This file is free software; the Free Software Foundation
557
-# gives unlimited permission to copy and/or distribute it,
558
-# with or without modifications, as long as this notice is preserved.
561
+# Modified to require ngettext
562
+# Matthias Clasen <mclasen@redhat.com> 08/06/2004
564
+# We need this here as well, since someone might use autoconf-2.5x
565
+# to configure GLib then an older version to configure a package
566
+# using AM_GLIB_GNU_GETTEXT
569
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
570
-# -------------------------------------
571
-# Define a conditional.
572
-AC_DEFUN([AM_CONDITIONAL],
574
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
575
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
576
-AC_SUBST([$1_TRUE])dnl
577
-AC_SUBST([$1_FALSE])dnl
578
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
579
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
580
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
588
-AC_CONFIG_COMMANDS_PRE(
589
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
590
- AC_MSG_ERROR([[conditional "$1" was never defined.
591
-Usually this means the macro was only invoked conditionally.]])
594
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
595
-# Free Software Foundation, Inc.
597
-# This file is free software; the Free Software Foundation
598
-# gives unlimited permission to copy and/or distribute it,
599
-# with or without modifications, as long as this notice is preserved.
603
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
604
-# written in clear, in which case automake, when reading aclocal.m4,
605
-# will think it sees a *use*, and therefore will trigger all it's
606
-# C support machinery. Also note that it means that autoscan, seeing
607
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
610
-# _AM_DEPENDENCIES(NAME)
611
-# ----------------------
612
-# See how the compiler implements dependency checking.
613
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
614
-# We try a few techniques and use that to set a single cache variable.
616
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
617
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
618
-# dependency, and given that the user is not expected to run this macro,
619
-# just rely on AC_PROG_CC.
620
-AC_DEFUN([_AM_DEPENDENCIES],
621
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
622
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
623
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
624
-AC_REQUIRE([AM_DEP_TRACK])dnl
626
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
627
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
628
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
629
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
630
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
631
- [depcc="$$1" am_compiler_list=])
633
-AC_CACHE_CHECK([dependency style of $depcc],
634
- [am_cv_$1_dependencies_compiler_type],
635
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
636
- # We make a subdir and do the tests there. Otherwise we can end up
637
- # making bogus files that we don't know about and never remove. For
638
- # instance it was reported that on HP-UX the gcc test will end up
639
- # making a dummy file named `D' -- because `-MD' means `put the output
642
- # Copy depcomp to subdir because otherwise we won't find it if we're
643
- # using a relative directory.
644
- cp "$am_depcomp" conftest.dir
646
- # We will build objects and dependencies in a subdirectory because
647
- # it helps to detect inapplicable dependency modes. For instance
648
- # both Tru64's cc and ICC support -MD to output dependencies as a
649
- # side effect of compilation, but ICC will put the dependencies in
650
- # the current directory while Tru64 will put them in the object
654
- am_cv_$1_dependencies_compiler_type=none
655
- if test "$am_compiler_list" = ""; then
656
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
658
- am__universal=false
659
- m4_case([$1], [CC],
660
- [case " $depcc " in #(
661
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
664
- [case " $depcc " in #(
665
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
668
+dnl We go to great lengths to make sure that aclocal won't
669
+dnl try to pull in the installed version of these macros
670
+dnl when running aclocal in the glib directory.
672
+m4_copy([AC_DEFUN],[glib_DEFUN])
673
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
675
+dnl At the end, if we're not within glib, we'll define the public
676
+dnl definitions in terms of our private definitions.
679
- for depmode in $am_compiler_list; do
680
- # Setup a source with many dependencies, because some compilers
681
- # like to wrap large dependency lists on column 80 (with \), and
682
- # we should not choose a depcomp mode which is confused by this.
684
- # We need to recreate these files for each test, as the compiler may
685
- # overwrite some of them when testing with obscure command lines.
686
- # This happens at least with the AIX C compiler.
688
- for i in 1 2 3 4 5 6; do
689
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
690
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
691
- # Solaris 8's {/usr,}/bin/sh.
692
- touch sub/conftst$i.h
694
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
696
+#--------------------
697
+glib_DEFUN([GLIB_LC_MESSAGES],
698
+ [AC_CHECK_HEADERS([locale.h])
699
+ if test $ac_cv_header_locale_h = yes; then
700
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
701
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
702
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
703
+ if test $am_cv_val_LC_MESSAGES = yes; then
704
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
705
+ [Define if your <locale.h> file defines LC_MESSAGES.])
709
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
710
- # mode. It turns out that the SunPro C++ compiler does not properly
711
- # handle `-M -o', and we need to detect this. Also, some Intel
712
- # versions had trouble with output in subdirs
713
- am__obj=sub/conftest.${OBJEXT-o}
714
- am__minus_obj="-o $am__obj"
717
- # This depmode causes a compiler race in universal mode.
718
- test "$am__universal" = false || continue
721
- # after this tag, mechanisms are not by side-effect, so they'll
722
- # only be used when explicitly requested
723
- if test "x$enable_dependency_tracking" = xyes; then
726
+# GLIB_PATH_PROG_WITH_TEST
727
+#----------------------------
728
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
729
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
730
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
731
+[# Extract the first word of "$2", so it can be a program name with args.
732
+set dummy $2; ac_word=[$]2
733
+AC_MSG_CHECKING([for $ac_word])
734
+AC_CACHE_VAL(ac_cv_path_$1,
737
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
740
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
741
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
742
+ test -z "$ac_dir" && ac_dir=.
743
+ if test -f $ac_dir/$ac_word; then
745
+ ac_cv_path_$1="$ac_dir/$ac_word"
749
- msvisualcpp | msvcmsys)
750
- # This compiler won't grok `-c -o', but also, the minuso test has
751
- # not run yet. These depmodes are late enough in the game, and
752
- # so weak that their functioning should not be impacted.
753
- am__obj=conftest.${OBJEXT-o}
758
- if depmode=$depmode \
759
- source=sub/conftest.c object=$am__obj \
760
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
761
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
762
- >/dev/null 2>conftest.err &&
763
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
764
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
765
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
766
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
767
- # icc doesn't choke on unknown options, it will just issue warnings
768
- # or remarks (even with -Werror). So we grep stderr for any message
769
- # that says an option was ignored or not supported.
770
- # When given -MP, icc 7.0 and 7.1 complain thusly:
771
- # icc: Command line warning: ignoring option '-M'; no argument required
772
- # The diagnosis changed in icc 8.0:
773
- # icc: Command line remark: option '-MP' not supported
774
- if (grep 'ignoring option' conftest.err ||
775
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
776
- am_cv_$1_dependencies_compiler_type=$depmode
783
- rm -rf conftest.dir
785
+dnl If no 4th arg is given, leave the cache variable unset,
786
+dnl so AC_PATH_PROGS will keep looking.
787
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
792
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
793
+ AC_MSG_RESULT([$]$1)
795
- am_cv_$1_dependencies_compiler_type=none
799
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
800
-AM_CONDITIONAL([am__fastdep$1], [
801
- test "x$enable_dependency_tracking" != xno \
802
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
808
+glib_DEFUN([GLIB_WITH_NLS],
809
+ dnl NLS is obligatory
815
-# Choose a directory name for dependency files.
816
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
817
-AC_DEFUN([AM_SET_DEPDIR],
818
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
819
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
821
+ gt_cv_have_gettext=no
829
-AC_DEFUN([AM_DEP_TRACK],
830
-[AC_ARG_ENABLE(dependency-tracking,
831
-[ --disable-dependency-tracking speeds up one-time build
832
- --enable-dependency-tracking do not reject slow dependency extractors])
833
-if test "x$enable_dependency_tracking" != xno; then
834
- am_depcomp="$ac_aux_dir/depcomp"
837
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
838
-AC_SUBST([AMDEPBACKSLASH])dnl
839
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
842
-# Generate code to set up dependency tracking. -*- Autoconf -*-
844
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
845
-# Free Software Foundation, Inc.
847
-# This file is free software; the Free Software Foundation
848
-# gives unlimited permission to copy and/or distribute it,
849
-# with or without modifications, as long as this notice is preserved.
852
+ AC_CHECK_HEADER(libintl.h,
853
+ [gt_cv_func_dgettext_libintl="no"
854
+ libintl_extra_libs=""
856
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
857
-# ------------------------------
858
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
860
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
861
- # are listed without --file. Let's play safe and only enable the eval
862
- # if we detect the quoting.
863
- case $CONFIG_FILES in
864
- *\'*) eval set x "$CONFIG_FILES" ;;
865
- *) set x $CONFIG_FILES ;;
870
- # Strip MF so we end up with the name of the file.
871
- mf=`echo "$mf" | sed -e 's/:.*$//'`
872
- # Check whether this is an Automake generated Makefile or not.
873
- # We used to match only the files named `Makefile.in', but
874
- # some people rename them; so instead we look at the file content.
875
- # Grep'ing the first line is not enough: some people post-process
876
- # each Makefile.in and add a new line on top of each file to say so.
877
- # Grep'ing the whole file is not good either: AIX grep has a line
878
- # limit of 2048, but all sed's we know have understand at least 4000.
879
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
880
- dirpart=`AS_DIRNAME("$mf")`
884
- # Extract the definition of DEPDIR, am__include, and am__quote
885
- # from the Makefile without running `make'.
886
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
887
- test -z "$DEPDIR" && continue
888
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
889
- test -z "am__include" && continue
890
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
891
- # When using ansi2knr, U may be empty or an underscore; expand it
892
- U=`sed -n 's/^U = //p' < "$mf"`
893
- # Find all dependency output files, they are included files with
894
- # $(DEPDIR) in their names. We invoke sed twice because it is the
895
- # simplest approach to changing $(DEPDIR) to its actual value in the
897
- for file in `sed -n "
898
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
899
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
900
- # Make sure the directory exists.
901
- test -f "$dirpart/$file" && continue
902
- fdir=`AS_DIRNAME(["$file"])`
903
- AS_MKDIR_P([$dirpart/$fdir])
904
- # echo "creating $dirpart/$file"
905
- echo '# dummy' > "$dirpart/$file"
909
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
911
+ # First check in libc
913
+ AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
915
+#include <libintl.h>
917
+ [return !ngettext ("","", 1)],
918
+ gt_cv_func_ngettext_libc=yes,
919
+ gt_cv_func_ngettext_libc=no)
922
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
923
+ AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
925
+#include <libintl.h>
927
+ [return !dgettext ("","")],
928
+ gt_cv_func_dgettext_libc=yes,
929
+ gt_cv_func_dgettext_libc=no)
933
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
934
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
938
+ # If we don't have everything we want, check in libintl
940
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
941
+ || test "$gt_cv_func_ngettext_libc" != "yes" \
942
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
944
+ AC_CHECK_LIB(intl, bindtextdomain,
945
+ [AC_CHECK_LIB(intl, ngettext,
946
+ [AC_CHECK_LIB(intl, dgettext,
947
+ gt_cv_func_dgettext_libintl=yes)])])
949
-# AM_OUTPUT_DEPENDENCY_COMMANDS
950
-# -----------------------------
951
-# This macro should only be invoked once -- use via AC_REQUIRE.
953
-# This code is only required when automatic dependency tracking
954
-# is enabled. FIXME. This creates each `.P' file that we will
955
-# need in order to bootstrap the dependency handling code.
956
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
957
-[AC_CONFIG_COMMANDS([depfiles],
958
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
959
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
961
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
962
+ AC_MSG_CHECKING([if -liconv is needed to use gettext])
964
+ AC_CHECK_LIB(intl, ngettext,
965
+ [AC_CHECK_LIB(intl, dcgettext,
966
+ [gt_cv_func_dgettext_libintl=yes
967
+ libintl_extra_libs=-liconv],
972
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
973
-# Free Software Foundation, Inc.
975
-# This file is free software; the Free Software Foundation
976
-# gives unlimited permission to copy and/or distribute it,
977
-# with or without modifications, as long as this notice is preserved.
979
+ # If we found libintl, then check in it for bind_textdomain_codeset();
980
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
981
+ # and both have dgettext and ngettext
983
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
984
+ glib_save_LIBS="$LIBS"
985
+ LIBS="$LIBS -lintl $libintl_extra_libs"
986
+ unset ac_cv_func_bind_textdomain_codeset
987
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
988
+ LIBS="$glib_save_LIBS"
991
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
992
+ gt_cv_func_dgettext_libc=no
994
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
995
+ && test "$gt_cv_func_ngettext_libc" = "yes"; then
996
+ gt_cv_func_dgettext_libintl=no
1002
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1003
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1004
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
1005
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
1006
+ gt_cv_have_gettext=yes
1009
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1010
+ INTLLIBS="-lintl $libintl_extra_libs"
1013
+ if test "$gt_cv_have_gettext" = "yes"; then
1014
+ AC_DEFINE(HAVE_GETTEXT,1,
1015
+ [Define if the GNU gettext() function is already present or preinstalled.])
1016
+ GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1017
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1018
+ if test "$MSGFMT" != "no"; then
1019
+ glib_save_LIBS="$LIBS"
1020
+ LIBS="$LIBS $INTLLIBS"
1021
+ AC_CHECK_FUNCS(dcgettext)
1023
+ AC_MSG_CHECKING([if msgfmt accepts -c])
1024
+ GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1027
+"Content-Type: text/plain; charset=UTF-8\n"
1028
+"Project-Id-Version: test 1.0\n"
1029
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1030
+"Last-Translator: test <foo@bar.xx>\n"
1031
+"Language-Team: C <LL@li.org>\n"
1032
+"MIME-Version: 1.0\n"
1033
+"Content-Transfer-Encoding: 8bit\n"
1034
+], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1035
+ AC_SUBST(MSGFMT_OPTS)
1036
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1037
+ GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1038
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1039
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1040
+ return _nl_msg_cat_cntr],
1042
+ DATADIRNAME=share],
1045
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
1046
+ dnl GNU format message catalog is always supported,
1047
+ dnl since both are added to the libc all together.
1048
+ dnl Hence, we'd like to go with DATADIRNAME=share and
1049
+ dnl and CATOBJEXT=.gmo in this case.
1050
+ AC_CHECK_FUNC(bind_textdomain_codeset,
1052
+ DATADIRNAME=share],
1061
+ LIBS="$glib_save_LIBS"
1064
+ gt_cv_have_gettext=no
1069
-# Do all the work for Automake. -*- Autoconf -*-
1070
+ if test "$gt_cv_have_gettext" = "yes" ; then
1071
+ AC_DEFINE(ENABLE_NLS, 1,
1072
+ [always defined to indicate that i18n is enabled])
1075
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1076
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1078
-# This file is free software; the Free Software Foundation
1079
-# gives unlimited permission to copy and/or distribute it,
1080
-# with or without modifications, as long as this notice is preserved.
1081
+ dnl Test whether we really found GNU xgettext.
1082
+ if test "$XGETTEXT" != ":"; then
1083
+ dnl If it is not GNU xgettext we define it as : so that the
1084
+ dnl Makefiles still can work.
1085
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1089
+ [found xgettext program is not GNU xgettext; ignore it])
1095
+ # We need to process the po/ directory.
1098
-# This macro actually does too much. Some checks are only needed if
1099
-# your package does certain things. But this isn't really a big deal.
1100
+ AC_OUTPUT_COMMANDS(
1101
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
1102
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1105
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1106
-# AM_INIT_AUTOMAKE([OPTIONS])
1107
-# -----------------------------------------------
1108
-# The call with PACKAGE and VERSION arguments is the old style
1109
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
1110
-# and VERSION should now be passed to AC_INIT and removed from
1111
-# the call to AM_INIT_AUTOMAKE.
1112
-# We support both call styles for the transition. After
1113
-# the next Automake release, Autoconf can make the AC_INIT
1114
-# arguments mandatory, and then we can depend on a new Autoconf
1115
-# release and drop the old call support.
1116
-AC_DEFUN([AM_INIT_AUTOMAKE],
1117
-[AC_PREREQ([2.62])dnl
1118
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
1119
-dnl the ones we care about.
1120
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1121
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1122
-AC_REQUIRE([AC_PROG_INSTALL])dnl
1123
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
1124
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1125
- # is not polluted with repeated "-I."
1126
- AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1127
- # test to see if srcdir already configured
1128
- if test -f $srcdir/config.status; then
1129
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1133
-# test whether we have cygpath
1134
-if test -z "$CYGPATH_W"; then
1135
- if (cygpath --version) >/dev/null 2>/dev/null; then
1136
- CYGPATH_W='cygpath -w'
1141
-AC_SUBST([CYGPATH_W])
1143
-# Define the identity of the package.
1144
-dnl Distinguish between old-style and new-style calls.
1146
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1147
- AC_SUBST([PACKAGE], [$1])dnl
1148
- AC_SUBST([VERSION], [$2])],
1149
-[_AM_SET_OPTIONS([$1])dnl
1150
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1151
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1152
- [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1153
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1154
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1156
-_AM_IF_OPTION([no-define],,
1157
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1158
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1159
+ dnl These rules are solely for the distribution goal. While doing this
1160
+ dnl we only have to keep exactly one list of the available catalogs
1161
+ dnl in configure.in.
1162
+ for lang in $ALL_LINGUAS; do
1163
+ GMOFILES="$GMOFILES $lang.gmo"
1164
+ POFILES="$POFILES $lang.po"
1167
-# Some tools Automake needs.
1168
-AC_REQUIRE([AM_SANITY_CHECK])dnl
1169
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
1170
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1171
-AM_MISSING_PROG(AUTOCONF, autoconf)
1172
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1173
-AM_MISSING_PROG(AUTOHEADER, autoheader)
1174
-AM_MISSING_PROG(MAKEINFO, makeinfo)
1175
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1176
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1177
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1178
-# We need awk for the "check" target. The system "awk" is bad on
1180
-AC_REQUIRE([AC_PROG_AWK])dnl
1181
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1182
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1183
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1184
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1185
- [_AM_PROG_TAR([v7])])])
1186
-_AM_IF_OPTION([no-dependencies],,
1187
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
1188
- [_AM_DEPENDENCIES(CC)],
1189
- [define([AC_PROG_CC],
1190
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1191
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
1192
- [_AM_DEPENDENCIES(CXX)],
1193
- [define([AC_PROG_CXX],
1194
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1195
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1196
- [_AM_DEPENDENCIES(OBJC)],
1197
- [define([AC_PROG_OBJC],
1198
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1200
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1201
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1202
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1203
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1204
-AC_CONFIG_COMMANDS_PRE(dnl
1205
-[m4_provide_if([_AM_COMPILER_EXEEXT],
1206
- [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1208
+ dnl Make all variables we use known to autoconf.
1209
+ AC_SUBST(CATALOGS)
1210
+ AC_SUBST(CATOBJEXT)
1211
+ AC_SUBST(DATADIRNAME)
1212
+ AC_SUBST(GMOFILES)
1213
+ AC_SUBST(INSTOBJEXT)
1214
+ AC_SUBST(INTLLIBS)
1215
+ AC_SUBST(PO_IN_DATADIR_TRUE)
1216
+ AC_SUBST(PO_IN_DATADIR_FALSE)
1221
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1222
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1223
-dnl mangled by Autoconf and run in a shell conditional statement.
1224
-m4_define([_AC_COMPILER_EXEEXT],
1225
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1226
+# AM_GLIB_GNU_GETTEXT
1227
+# -------------------
1228
+# Do checks necessary for use of gettext. If a suitable implementation
1229
+# of gettext is found in either in libintl or in the C library,
1230
+# it will set INTLLIBS to the libraries needed for use of gettext
1231
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1232
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1233
+# on various variables needed by the Makefile.in.in installed by
1236
+glib_DEFUN([GLIB_GNU_GETTEXT],
1237
+ [AC_REQUIRE([AC_PROG_CC])dnl
1238
+ AC_REQUIRE([AC_HEADER_STDC])dnl
1243
+ if test "$gt_cv_have_gettext" = "yes"; then
1244
+ if test "x$ALL_LINGUAS" = "x"; then
1247
+ AC_MSG_CHECKING(for catalogs to be installed)
1249
+ for presentlang in $ALL_LINGUAS; do
1251
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1252
+ desiredlanguages="$LINGUAS"
1254
+ desiredlanguages="$ALL_LINGUAS"
1256
+ for desiredlang in $desiredlanguages; do
1257
+ # Use the presentlang catalog if desiredlang is
1258
+ # a. equal to presentlang, or
1259
+ # b. a variant of presentlang (because in this case,
1260
+ # presentlang can be used as a fallback for messages
1261
+ # which are not translated in the desiredlang catalog).
1262
+ case "$desiredlang" in
1263
+ "$presentlang"*) useit=yes;;
1266
+ if test $useit = yes; then
1267
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1270
+ LINGUAS=$NEW_LINGUAS
1271
+ AC_MSG_RESULT($LINGUAS)
1274
-# When config.status generates a header, we must update the stamp-h file.
1275
-# This file resides in the same directory as the config header
1276
-# that is generated. The stamp files are numbered to have different names.
1277
+ dnl Construct list of names of catalog files to be constructed.
1278
+ if test -n "$LINGUAS"; then
1279
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1283
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1284
-# loop where config.status creates the headers, so we can generate
1285
-# our stamp files there.
1286
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1287
-[# Compute $1's index in $config_headers.
1290
-for _am_header in $config_headers :; do
1291
- case $_am_header in
1292
- $_am_arg | $_am_arg:* )
1295
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1298
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1299
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1300
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1301
+ dnl Try to locate is.
1303
+ if test -n "$ac_aux_dir"; then
1304
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1306
+ if test -z "$MKINSTALLDIRS"; then
1307
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1309
+ AC_SUBST(MKINSTALLDIRS)
1311
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1313
-# This file is free software; the Free Software Foundation
1314
-# gives unlimited permission to copy and/or distribute it,
1315
-# with or without modifications, as long as this notice is preserved.
1316
+ dnl Generate list of files to be processed by xgettext which will
1317
+ dnl be included in po/Makefile.
1318
+ test -d po || mkdir po
1319
+ if test "x$srcdir" != "x."; then
1320
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1321
+ posrcprefix="$srcdir/"
1323
+ posrcprefix="../$srcdir/"
1329
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1330
+ < $srcdir/po/POTFILES.in > po/POTFILES
1333
-# AM_PROG_INSTALL_SH
1334
-# ------------------
1335
-# Define $install_sh.
1336
-AC_DEFUN([AM_PROG_INSTALL_SH],
1337
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1338
-if test x"${install_sh}" != xset; then
1339
- case $am_aux_dir in
1341
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1343
- install_sh="\${SHELL} $am_aux_dir/install-sh"
1345
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1346
+# -------------------------------
1347
+# Define VARIABLE to the location where catalog files will
1348
+# be installed by po/Makefile.
1349
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1350
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1351
+glib_save_prefix="$prefix"
1352
+glib_save_exec_prefix="$exec_prefix"
1353
+glib_save_datarootdir="$datarootdir"
1354
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
1355
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1356
+datarootdir=`eval echo "${datarootdir}"`
1357
+if test "x$CATOBJEXT" = "x.mo" ; then
1358
+ localedir=`eval echo "${libdir}/locale"`
1360
+ localedir=`eval echo "${datadir}/locale"`
1362
-AC_SUBST(install_sh)])
1363
+prefix="$glib_save_prefix"
1364
+exec_prefix="$glib_save_exec_prefix"
1365
+datarootdir="$glib_save_datarootdir"
1366
+AC_DEFINE_UNQUOTED($1, "$localedir",
1367
+ [Define the location where the catalogs will be installed])
1370
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1372
-# This file is free software; the Free Software Foundation
1373
-# gives unlimited permission to copy and/or distribute it,
1374
-# with or without modifications, as long as this notice is preserved.
1378
-# Check whether the underlying file-system supports filenames
1379
-# with a leading dot. For instance MS-DOS doesn't.
1380
-AC_DEFUN([AM_SET_LEADING_DOT],
1381
-[rm -rf .tst 2>/dev/null
1382
-mkdir .tst 2>/dev/null
1383
-if test -d .tst; then
1388
-rmdir .tst 2>/dev/null
1389
-AC_SUBST([am__leading_dot])])
1391
-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1392
-# From Jim Meyering
1394
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1395
-# Free Software Foundation, Inc.
1397
-# This file is free software; the Free Software Foundation
1398
-# gives unlimited permission to copy and/or distribute it,
1399
-# with or without modifications, as long as this notice is preserved.
1401
+dnl Now the definitions that aclocal will find
1403
+ifdef(glib_configure_in,[],[
1404
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1405
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1409
+# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1411
+# Create a temporary file with TEST-FILE as its contents and pass the
1412
+# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
1413
+# 0 and perform ACTION-IF-FAIL for any other exit status.
1414
+AC_DEFUN([GLIB_RUN_PROG],
1415
+[cat >conftest.foo <<_ACEOF
1418
+if AC_RUN_LOG([$1 conftest.foo]); then
1419
+ m4_ifval([$3], [$3], [:])
1420
+m4_ifvaln([$4], [else $4])dnl
1421
+echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1422
+sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1425
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
1426
-# ----------------------------------
1427
-# Control maintainer-specific portions of Makefiles.
1428
-# Default is to disable them, unless `enable' is passed literally.
1429
-# For symmetry, `disable' may be passed as well. Anyway, the user
1430
-# can override the default with the --enable/--disable switch.
1431
-AC_DEFUN([AM_MAINTAINER_MODE],
1432
-[m4_case(m4_default([$1], [disable]),
1433
- [enable], [m4_define([am_maintainer_other], [disable])],
1434
- [disable], [m4_define([am_maintainer_other], [enable])],
1435
- [m4_define([am_maintainer_other], [enable])
1436
- m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1437
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1438
- dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1439
- AC_ARG_ENABLE([maintainer-mode],
1440
-[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
1441
- (and sometimes confusing) to the casual installer],
1442
- [USE_MAINTAINER_MODE=$enableval],
1443
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1444
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1445
- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1446
- MAINT=$MAINTAINER_MODE_TRUE
1447
- AC_SUBST([MAINT])dnl
1451
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1455
-# Check to see how 'make' treats includes. -*- Autoconf -*-
1456
+dnl GNOME_COMMON_INIT
1458
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1460
-# This file is free software; the Free Software Foundation
1461
-# gives unlimited permission to copy and/or distribute it,
1462
-# with or without modifications, as long as this notice is preserved.
1463
+AC_DEFUN([GNOME_COMMON_INIT],
1465
+ dnl this macro should come after AC_CONFIG_MACRO_DIR
1466
+ AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
1469
+ dnl ensure that when the Automake generated makefile calls aclocal,
1470
+ dnl it honours the $ACLOCAL_FLAGS environment variable
1471
+ ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
1472
+ if test -n "$ac_macro_dir"; then
1473
+ ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
1476
-# AM_MAKE_INCLUDE()
1477
-# -----------------
1478
-# Check to see how make treats includes.
1479
-AC_DEFUN([AM_MAKE_INCLUDE],
1480
-[am_make=${MAKE-make}
1481
-cat > confinc << 'END'
1483
- @echo this is the am__doit target
1486
-# If we don't find an include directive, just comment out the code.
1487
-AC_MSG_CHECKING([for style of include used by $am_make])
1491
-# First try GNU make style include.
1492
-echo "include confinc" > confmf
1493
-# Ignore all kinds of additional output from `make'.
1494
-case `$am_make -s -f confmf 2> /dev/null` in #(
1495
-*the\ am__doit\ target*)
1496
- am__include=include
1501
-# Now try BSD make style include.
1502
-if test "$am__include" = "#"; then
1503
- echo '.include "confinc"' > confmf
1504
- case `$am_make -s -f confmf 2> /dev/null` in #(
1505
- *the\ am__doit\ target*)
1506
- am__include=.include
1512
-AC_SUBST([am__include])
1513
-AC_SUBST([am__quote])
1514
-AC_MSG_RESULT([$_am_result])
1515
-rm -f confinc confmf
1516
+ AC_SUBST([ACLOCAL_AMFLAGS])
1519
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1520
-# Free Software Foundation, Inc.
1522
-# This file is free software; the Free Software Foundation
1523
-# gives unlimited permission to copy and/or distribute it,
1524
-# with or without modifications, as long as this notice is preserved.
1527
+AC_DEFUN([GNOME_DEBUG_CHECK],
1529
+ AC_ARG_ENABLE([debug],
1530
+ AC_HELP_STRING([--enable-debug],
1531
+ [turn on debugging]),,
1532
+ [enable_debug=no])
1536
-# Like AC_PROG_CC_C_O, but changed for automake.
1537
-AC_DEFUN([AM_PROG_CC_C_O],
1538
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
1539
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1540
-AC_REQUIRE_AUX_FILE([compile])dnl
1541
-# FIXME: we rely on the cache variable name because
1542
-# there is no other way.
1544
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1545
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1546
-if test "$am_t" != yes; then
1547
- # Losing compiler, so override with the script.
1548
- # FIXME: It is wrong to rewrite CC.
1549
- # But if we don't then we get into trouble of one sort or another.
1550
- # A longer-term fix would be to have automake use am__CC in this case,
1551
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1552
- CC="$am_aux_dir/compile $CC"
1554
-dnl Make sure AC_PROG_CC is never called again, or it will override our
1556
-m4_define([AC_PROG_CC],
1557
- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1558
+ if test x$enable_debug = xyes ; then
1559
+ AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
1560
+ [Enable additional debugging at the expense of performance and size])
1564
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1565
+dnl GNOME_MAINTAINER_MODE_DEFINES ()
1566
+dnl define DISABLE_DEPRECATED
1568
+AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
1570
+ AC_REQUIRE([AM_MAINTAINER_MODE])
1572
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1573
-# Free Software Foundation, Inc.
1575
-# This file is free software; the Free Software Foundation
1576
-# gives unlimited permission to copy and/or distribute it,
1577
-# with or without modifications, as long as this notice is preserved.
1578
+ DISABLE_DEPRECATED=""
1579
+ if test $USE_MAINTAINER_MODE = yes; then
1580
+ DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK GCONF BONOBO BONOBO_UI GNOME LIBGLADE VTE GNOME_VFS WNCK LIBSOUP"
1581
+ for DOMAIN in $DOMAINS; do
1582
+ DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
1587
+ AC_SUBST(DISABLE_DEPRECATED)
1590
-# AM_MISSING_PROG(NAME, PROGRAM)
1591
-# ------------------------------
1592
-AC_DEFUN([AM_MISSING_PROG],
1593
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
1594
-$1=${$1-"${am_missing_run}$2"}
1596
+dnl GNOME_COMPILE_WARNINGS
1597
+dnl Turn on many useful compiler warnings
1598
+dnl For now, only works on GCC
1599
+AC_DEFUN([GNOME_COMPILE_WARNINGS],[
1600
+ dnl ******************************
1601
+ dnl More compiler warnings
1602
+ dnl ******************************
1604
+ AC_ARG_ENABLE(compile-warnings,
1605
+ AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
1606
+ [Turn on compiler warnings]),,
1607
+ [enable_compile_warnings="m4_default([$1],[yes])"])
1609
-# AM_MISSING_HAS_RUN
1610
-# ------------------
1611
-# Define MISSING if not defined so far and test if it supports --run.
1612
-# If it does, set am_missing_run to use it, otherwise, to nothing.
1613
-AC_DEFUN([AM_MISSING_HAS_RUN],
1614
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1615
-AC_REQUIRE_AUX_FILE([missing])dnl
1616
-if test x"${MISSING+set}" != xset; then
1617
- case $am_aux_dir in
1619
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1621
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
1624
-# Use eval to expand $SHELL
1625
-if eval "$MISSING --run true"; then
1626
- am_missing_run="$MISSING --run "
1629
- AC_MSG_WARN([`missing' script is too old or missing])
1633
+ if test "x$GCC" != xyes; then
1634
+ enable_compile_warnings=no
1637
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1639
-# This file is free software; the Free Software Foundation
1640
-# gives unlimited permission to copy and/or distribute it,
1641
-# with or without modifications, as long as this notice is preserved.
1643
+ realsave_CFLAGS="$CFLAGS"
1647
-# Check for `mkdir -p'.
1648
-AC_DEFUN([AM_PROG_MKDIR_P],
1649
-[AC_PREREQ([2.60])dnl
1650
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1651
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1652
-dnl while keeping a definition of mkdir_p for backward compatibility.
1653
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1654
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1655
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
1656
-dnl adjustment using top_builddir (which is defined more often than
1658
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1660
- [[\\/$]]* | ?:[[\\/]]*) ;;
1661
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1665
-# Helper functions for option handling. -*- Autoconf -*-
1667
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1669
-# This file is free software; the Free Software Foundation
1670
-# gives unlimited permission to copy and/or distribute it,
1671
-# with or without modifications, as long as this notice is preserved.
1674
+ case "$enable_compile_warnings" in
1679
+ warning_flags="-Wall"
1682
+ warning_flags="-Wall -Wmissing-prototypes"
1685
+ warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
1686
+ CFLAGS="$warning_flags $CFLAGS"
1687
+ for option in -Wno-sign-compare; do
1688
+ SAVE_CFLAGS="$CFLAGS"
1689
+ CFLAGS="$CFLAGS $option"
1690
+ AC_MSG_CHECKING([whether gcc understands $option])
1691
+ AC_TRY_COMPILE([], [],
1694
+ CFLAGS="$SAVE_CFLAGS"
1695
+ AC_MSG_RESULT($has_option)
1696
+ if test $has_option = yes; then
1697
+ warning_flags="$warning_flags $option"
1703
+ if test "$enable_compile_warnings" = "error" ; then
1704
+ warning_flags="$warning_flags -Werror"
1708
+ AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
1711
+ CFLAGS="$realsave_CFLAGS"
1712
+ AC_MSG_CHECKING(what warning flags to pass to the C compiler)
1713
+ AC_MSG_RESULT($warning_flags)
1715
-# _AM_MANGLE_OPTION(NAME)
1716
-# -----------------------
1717
-AC_DEFUN([_AM_MANGLE_OPTION],
1718
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1719
+ AC_ARG_ENABLE(iso-c,
1720
+ AC_HELP_STRING([--enable-iso-c],
1721
+ [Try to warn if code is not ISO C ]),,
1722
+ [enable_iso_c=no])
1724
-# _AM_SET_OPTION(NAME)
1725
-# ------------------------------
1726
-# Set option NAME. Presently that only means defining a flag for this option.
1727
-AC_DEFUN([_AM_SET_OPTION],
1728
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1729
+ AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
1731
+ if test "x$enable_iso_c" != "xno"; then
1732
+ if test "x$GCC" = "xyes"; then
1733
+ case " $CFLAGS " in
1734
+ *[\ \ ]-ansi[\ \ ]*) ;;
1735
+ *) complCFLAGS="$complCFLAGS -ansi" ;;
1737
+ case " $CFLAGS " in
1738
+ *[\ \ ]-pedantic[\ \ ]*) ;;
1739
+ *) complCFLAGS="$complCFLAGS -pedantic" ;;
1743
+ AC_MSG_RESULT($complCFLAGS)
1745
-# _AM_SET_OPTIONS(OPTIONS)
1746
-# ----------------------------------
1747
-# OPTIONS is a space-separated list of Automake options.
1748
-AC_DEFUN([_AM_SET_OPTIONS],
1749
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1750
+ WARN_CFLAGS="$warning_flags $complCFLAGS"
1751
+ AC_SUBST(WARN_CFLAGS)
1754
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1755
-# -------------------------------------------
1756
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1757
-AC_DEFUN([_AM_IF_OPTION],
1758
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1759
+dnl For C++, do basically the same thing.
1761
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
1762
-# Free Software Foundation, Inc.
1764
-# This file is free software; the Free Software Foundation
1765
-# gives unlimited permission to copy and/or distribute it,
1766
-# with or without modifications, as long as this notice is preserved.
1767
+AC_DEFUN([GNOME_CXX_WARNINGS],[
1768
+ AC_ARG_ENABLE(cxx-warnings,
1769
+ AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
1770
+ [Turn on compiler warnings.]),,
1771
+ [enable_cxx_warnings="m4_default([$1],[minimum])"])
1773
-# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1774
-# ---------------------------------------------------------------------------
1775
-# Adds support for distributing Python modules and packages. To
1776
-# install modules, copy them to $(pythondir), using the python_PYTHON
1777
-# automake variable. To install a package with the same name as the
1778
-# automake package, install to $(pkgpythondir), or use the
1779
-# pkgpython_PYTHON automake variable.
1781
-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
1782
-# locations to install python extension modules (shared libraries).
1783
-# Another macro is required to find the appropriate flags to compile
1784
-# extension modules.
1786
-# If your package is configured with a different prefix to python,
1787
-# users will have to add the install directory to the PYTHONPATH
1788
-# environment variable, or create a .pth file (see the python
1789
-# documentation for details).
1791
-# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
1792
-# cause an error if the version of python installed on the system
1793
-# doesn't meet the requirement. MINIMUM-VERSION should consist of
1794
-# numbers and dots only.
1795
-AC_DEFUN([AM_PATH_PYTHON],
1797
- dnl Find a Python interpreter. Python versions prior to 2.0 are not
1798
- dnl supported. (2.0 was released on October 16, 2000).
1799
- m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
1800
- [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
1801
-python2.1 python2.0])
1802
+ AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
1804
+ if test "x$GXX" != xyes; then
1805
+ enable_cxx_warnings=no
1807
+ if test "x$enable_cxx_warnings" != "xno"; then
1808
+ if test "x$GXX" = "xyes"; then
1809
+ case " $CXXFLAGS " in
1810
+ *[\ \ ]-Wall[\ \ ]*) ;;
1811
+ *) warnCXXFLAGS="-Wall -Wno-unused" ;;
1815
- dnl No version check is needed.
1816
- # Find any Python interpreter.
1817
- if test -z "$PYTHON"; then
1818
- AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
1820
- am_display_PYTHON=python
1822
- dnl A version check is needed.
1823
- if test -n "$PYTHON"; then
1824
- # If the user set $PYTHON, use it and don't search something else.
1825
- AC_MSG_CHECKING([whether $PYTHON version >= $1])
1826
- AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
1827
- [AC_MSG_RESULT(yes)],
1828
- [AC_MSG_ERROR(too old)])
1829
- am_display_PYTHON=$PYTHON
1831
- # Otherwise, try each interpreter until we find one that satisfies
1833
- AC_CACHE_CHECK([for a Python interpreter with version >= $1],
1834
- [am_cv_pathless_PYTHON],[
1835
- for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
1836
- test "$am_cv_pathless_PYTHON" = none && break
1837
- AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
1839
- # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
1840
- if test "$am_cv_pathless_PYTHON" = none; then
1843
- AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
1844
+ ## -W is not all that useful. And it cannot be controlled
1845
+ ## with individual -Wno-xxx flags, unlike -Wall
1846
+ if test "x$enable_cxx_warnings" = "xyes"; then
1847
+ warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
1849
- am_display_PYTHON=$am_cv_pathless_PYTHON
1853
- if test "$PYTHON" = :; then
1854
- dnl Run any user-specified action, or abort.
1855
- m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
1858
+ AC_MSG_RESULT($warnCXXFLAGS)
1860
- dnl Query Python for its version number. Getting [:3] seems to be
1861
- dnl the best way to do this; it's what "site.py" does in the standard
1863
+ AC_ARG_ENABLE(iso-cxx,
1864
+ AC_HELP_STRING([--enable-iso-cxx],
1865
+ [Try to warn if code is not ISO C++ ]),,
1866
+ [enable_iso_cxx=no])
1868
- AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
1869
- [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
1870
- AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
1871
+ AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
1873
+ if test "x$enable_iso_cxx" != "xno"; then
1874
+ if test "x$GXX" = "xyes"; then
1875
+ case " $CXXFLAGS " in
1876
+ *[\ \ ]-ansi[\ \ ]*) ;;
1877
+ *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
1880
- dnl Use the values of $prefix and $exec_prefix for the corresponding
1881
- dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
1882
- dnl distinct variables so they can be overridden if need be. However,
1883
- dnl general consensus is that you shouldn't need this ability.
1884
+ case " $CXXFLAGS " in
1885
+ *[\ \ ]-pedantic[\ \ ]*) ;;
1886
+ *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
1890
+ AC_MSG_RESULT($complCXXFLAGS)
1892
- AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
1893
- AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
1894
+ WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
1895
+ AC_SUBST(WARN_CXXFLAGS)
1898
- dnl At times (like when building shared libraries) you may want
1899
- dnl to know which OS platform Python thinks this is.
1900
+# nls.m4 serial 3 (gettext-0.15)
1901
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
1902
+dnl This file is free software; the Free Software Foundation
1903
+dnl gives unlimited permission to copy and/or distribute it,
1904
+dnl with or without modifications, as long as this notice is preserved.
1906
+dnl This file can can be used in projects which are not available under
1907
+dnl the GNU General Public License or the GNU Library General Public
1908
+dnl License but which still want to provide support for the GNU gettext
1910
+dnl Please note that the actual code of the GNU gettext library is covered
1911
+dnl by the GNU Library General Public License, and the rest of the GNU
1912
+dnl gettext package package is covered by the GNU General Public License.
1913
+dnl They are *not* in the public domain.
1915
- AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
1916
- [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
1917
- AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
1919
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1920
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1924
- dnl Set up 4 directories:
1927
+ AC_MSG_CHECKING([whether NLS is requested])
1928
+ dnl Default is enabled NLS
1929
+ AC_ARG_ENABLE(nls,
1930
+ [ --disable-nls do not use Native Language Support],
1931
+ USE_NLS=$enableval, USE_NLS=yes)
1932
+ AC_MSG_RESULT($USE_NLS)
1936
- dnl pythondir -- where to install python scripts. This is the
1937
- dnl site-packages directory, not the python standard library
1938
- dnl directory like in previous automake betas. This behavior
1939
- dnl is more consistent with lispdir.m4 for example.
1940
- dnl Query distutils for this directory. distutils does not exist in
1941
- dnl Python 1.5, so we fall back to the hardcoded directory if it
1943
- AC_CACHE_CHECK([for $am_display_PYTHON script directory],
1944
- [am_cv_python_pythondir],
1945
- [if test "x$prefix" = xNONE
1947
- am_py_prefix=$ac_default_prefix
1949
- am_py_prefix=$prefix
1951
- am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
1952
- echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
1953
- case $am_cv_python_pythondir in
1955
- am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1956
- am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1960
- AC_SUBST([pythondir], [$am_cv_python_pythondir])
1961
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1963
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1965
+# This program is free software; you can redistribute it and/or modify
1966
+# it under the terms of the GNU General Public License as published by
1967
+# the Free Software Foundation; either version 2 of the License, or
1968
+# (at your option) any later version.
1970
+# This program is distributed in the hope that it will be useful, but
1971
+# WITHOUT ANY WARRANTY; without even the implied warranty of
1972
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1973
+# General Public License for more details.
1975
+# You should have received a copy of the GNU General Public License
1976
+# along with this program; if not, write to the Free Software
1977
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1979
+# As a special exception to the GNU General Public License, if you
1980
+# distribute this file as part of a program that contains a
1981
+# configuration script generated by Autoconf, you may include it under
1982
+# the same distribution terms that you use for the rest of that program.
1984
- dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
1985
- dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
1986
- dnl more consistent with the rest of automake.
1987
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1988
+# ----------------------------------
1989
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
1990
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1991
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1992
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1993
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1994
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1996
+if test -n "$PKG_CONFIG"; then
1997
+ _pkg_min_version=m4_default([$1], [0.9.0])
1998
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1999
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2000
+ AC_MSG_RESULT([yes])
2002
+ AC_MSG_RESULT([no])
2007
+])# PKG_PROG_PKG_CONFIG
2009
- AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
2010
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2012
+# Check to see whether a particular set of modules exists. Similar
2013
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2016
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2017
+# this or PKG_CHECK_MODULES is called, or make sure to call
2018
+# PKG_CHECK_EXISTS manually
2019
+# --------------------------------------------------------------
2020
+AC_DEFUN([PKG_CHECK_EXISTS],
2021
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2022
+if test -n "$PKG_CONFIG" && \
2023
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2024
+ m4_ifval([$2], [$2], [:])
2025
+m4_ifvaln([$3], [else
2029
- dnl pyexecdir -- directory for installing python extension modules
2030
- dnl (shared libraries)
2031
- dnl Query distutils for this directory. distutils does not exist in
2032
- dnl Python 1.5, so we fall back to the hardcoded directory if it
2034
- AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
2035
- [am_cv_python_pyexecdir],
2036
- [if test "x$exec_prefix" = xNONE
2038
- am_py_exec_prefix=$am_py_prefix
2040
- am_py_exec_prefix=$exec_prefix
2042
- am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
2043
- echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
2044
- case $am_cv_python_pyexecdir in
2045
- $am_py_exec_prefix*)
2046
- am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
2047
- am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
2051
- AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
2053
- dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
2054
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2055
+# ---------------------------------------------
2056
+m4_define([_PKG_CONFIG],
2057
+[if test -n "$PKG_CONFIG"; then
2058
+ if test -n "$$1"; then
2061
+ PKG_CHECK_EXISTS([$3],
2062
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2066
+ pkg_failed=untried
2070
- AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
2071
+# _PKG_SHORT_ERRORS_SUPPORTED
2072
+# -----------------------------
2073
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2074
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2075
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2076
+ _pkg_short_errors_supported=yes
2078
+ _pkg_short_errors_supported=no
2080
+])# _PKG_SHORT_ERRORS_SUPPORTED
2082
- dnl Run any user-specified action.
2087
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2088
+# [ACTION-IF-NOT-FOUND])
2091
+# Note that if there is a possibility the first call to
2092
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
2093
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2096
+# --------------------------------------------------------------
2097
+AC_DEFUN([PKG_CHECK_MODULES],
2098
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2099
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2100
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2103
+AC_MSG_CHECKING([for $1])
2105
-# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2106
-# ---------------------------------------------------------------------------
2107
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
2108
-# Run ACTION-IF-FALSE otherwise.
2109
-# This test uses sys.hexversion instead of the string equivalent (first
2110
-# word of sys.version), in order to cope with versions such as 2.2c1.
2111
-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
2112
-AC_DEFUN([AM_PYTHON_CHECK_VERSION],
2114
-# split strings by '.' and convert to numeric. Append some zeros
2115
-# because we need at least 4 digits for the hex conversion.
2116
-# map returns an iterator in Python 3.0 and a list in 2.x
2117
-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
2119
-# xrange is not present in Python 3.0 and range returns an iterator
2120
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
2121
-sys.exit(sys.hexversion < minverhex)"
2122
- AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
2123
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2124
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2126
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
2127
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2128
+and $1[]_LIBS to avoid the need to call pkg-config.
2129
+See the pkg-config man page for more details.])
2131
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
2132
-# Free Software Foundation, Inc.
2133
+if test $pkg_failed = yes; then
2134
+ _PKG_SHORT_ERRORS_SUPPORTED
2135
+ if test $_pkg_short_errors_supported = yes; then
2136
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
2138
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
2140
+ # Put the nasty error message in config.log where it belongs
2141
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2143
+ ifelse([$4], , [AC_MSG_ERROR(dnl
2144
+[Package requirements ($2) were not met:
2148
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
2149
+installed software in a non-standard prefix.
2153
+ [AC_MSG_RESULT([no])
2155
+elif test $pkg_failed = untried; then
2156
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
2157
+[The pkg-config script could not be found or is too old. Make sure it
2158
+is in your PATH or set the PKG_CONFIG environment variable to the full
2159
+path to pkg-config.
2163
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2166
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2167
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2168
+ AC_MSG_RESULT([yes])
2169
+ ifelse([$3], , :, [$3])
2171
+])# PKG_CHECK_MODULES
2173
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
2175
# This file is free software; the Free Software Foundation
2176
# gives unlimited permission to copy and/or distribute it,
2177
# with or without modifications, as long as this notice is preserved.
2180
+# AM_AUTOMAKE_VERSION(VERSION)
2181
+# ----------------------------
2182
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
2183
+# generated from the m4 files accompanying Automake X.Y.
2184
+# (This private macro should not be called outside this file.)
2185
+AC_DEFUN([AM_AUTOMAKE_VERSION],
2186
+[am__api_version='1.11'
2187
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
2188
+dnl require some minimum version. Point them to the right macro.
37
2189
+m4_if([$1], [1.11.1], [],
38
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
42
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
43
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
44
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
45
-[AM_AUTOMAKE_VERSION([1.11])dnl
2190
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
2195
-AC_DEFUN([AM_SANITY_CHECK],
2196
-[AC_MSG_CHECKING([whether build environment is sane])
2199
-echo timestamp > conftest.file
2200
-# Reject unsafe characters in $srcdir or the absolute working directory
2201
-# name. Accept space and tab only in the latter.
2205
- *[[\\\"\#\$\&\'\`$am_lf]]*)
2206
- AC_MSG_ERROR([unsafe absolute working directory name]);;
2209
- *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2210
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
2213
-# Do `set' in a subshell so we don't clobber the current shell's
2214
-# arguments. Must try -L first in case configure is actually a
2215
-# symlink; some systems play weird games with the mod time of symlinks
2216
-# (eg FreeBSD returns the mod time of the symlink's containing
2219
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2220
- if test "$[*]" = "X"; then
2222
- set X `ls -t "$srcdir/configure" conftest.file`
2224
- rm -f conftest.file
2225
- if test "$[*]" != "X $srcdir/configure conftest.file" \
2226
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
2227
+# _AM_AUTOCONF_VERSION(VERSION)
2228
+# -----------------------------
2229
+# aclocal traces this macro to find the Autoconf version.
2230
+# This is a private macro too. Using m4_define simplifies
2231
+# the logic in aclocal, which can simply ignore this definition.
2232
+m4_define([_AM_AUTOCONF_VERSION], [])
2234
- # If neither matched, then we have a broken ls. This can happen
2235
- # if, for instance, CONFIG_SHELL is bash and it inherits a
2236
- # broken ls alias from the environment. This has actually
2237
- # happened. Such a system could not be considered "sane".
2238
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2239
-alias in your environment])
2241
+# AM_SET_CURRENT_AUTOMAKE_VERSION
2242
+# -------------------------------
2243
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2244
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
2245
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
46
2246
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
47
m4_ifndef([AC_AUTOCONF_VERSION],
48
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
49
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
50
@@ -2027,6 +2026,14 @@
51
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
52
am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
2247
+m4_ifndef([AC_AUTOCONF_VERSION],
2248
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
2249
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
2251
- test "$[2]" = conftest.file
2257
- AC_MSG_ERROR([newly created file is older than distributed files!
2258
-Check your system clock])
2260
-AC_MSG_RESULT(yes)])
2261
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
2263
-# Copyright (C) 2009 Free Software Foundation, Inc.
2264
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2266
# This file is free software; the Free Software Foundation
2267
# gives unlimited permission to copy and/or distribute it,
2268
# with or without modifications, as long as this notice is preserved.
2271
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2272
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
2273
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2275
+# Of course, Automake must honor this variable whenever it calls a
2276
+# tool from the auxiliary directory. The problem is that $srcdir (and
2277
+# therefore $ac_aux_dir as well) can be either absolute or relative,
2278
+# depending on how configure is run. This is pretty annoying, since
2279
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
2280
+# source directory, any form will work fine, but in subdirectories a
2281
+# relative path needs to be adjusted first.
2283
+# $ac_aux_dir/missing
2284
+# fails when called from a subdirectory if $ac_aux_dir is relative
2285
+# $top_srcdir/$ac_aux_dir/missing
2286
+# fails if $ac_aux_dir is absolute,
2287
+# fails when called from a subdirectory in a VPATH build with
2288
+# a relative $ac_aux_dir
2290
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2291
+# are both prefixed by $srcdir. In an in-source build this is usually
2292
+# harmless because $srcdir is `.', but things will broke when you
2293
+# start a VPATH build or use an absolute $srcdir.
2295
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2296
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
2297
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2298
+# and then we would define $MISSING as
2299
+# MISSING="\${SHELL} $am_aux_dir/missing"
2300
+# This will work as long as MISSING is not called from configure, because
2301
+# unfortunately $(top_srcdir) has no meaning in configure.
2302
+# However there are other variables, like CC, which are often used in
2303
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
2305
+# Another solution, used here, is to always expand $ac_aux_dir to an
2306
+# absolute PATH. The drawback is that using absolute paths prevent a
2307
+# configured tree to be moved without reconfiguration.
2309
-# AM_SILENT_RULES([DEFAULT])
2310
-# --------------------------
2311
-# Enable less verbose build rules; with the default set to DEFAULT
2312
-# (`yes' being less verbose, `no' or empty being verbose).
2313
-AC_DEFUN([AM_SILENT_RULES],
2314
-[AC_ARG_ENABLE([silent-rules],
2315
-[ --enable-silent-rules less verbose build output (undo: `make V=1')
2316
- --disable-silent-rules verbose build output (undo: `make V=0')])
2317
-case $enable_silent_rules in
2318
-yes) AM_DEFAULT_VERBOSITY=0;;
2319
-no) AM_DEFAULT_VERBOSITY=1;;
2320
-*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
2322
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
2324
-AC_SUBST([AM_BACKSLASH])dnl
2325
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
2326
+AC_DEFUN([AM_AUX_DIR_EXPAND],
2327
+[dnl Rely on autoconf to set up CDPATH properly.
2328
+AC_PREREQ([2.50])dnl
2329
+# expand $ac_aux_dir to an absolute path
2330
+am_aux_dir=`cd $ac_aux_dir && pwd`
2333
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2334
+# AM_CONDITIONAL -*- Autoconf -*-
2336
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
2337
+# Free Software Foundation, Inc.
2339
# This file is free software; the Free Software Foundation
2340
# gives unlimited permission to copy and/or distribute it,
2341
# with or without modifications, as long as this notice is preserved.
2343
-# AM_PROG_INSTALL_STRIP
2344
-# ---------------------
2345
-# One issue with vendor `install' (even GNU) is that you can't
2346
-# specify the program used to strip binaries. This is especially
2347
-# annoying in cross-compiling environments, where the build's strip
2348
-# is unlikely to handle the host's binaries.
2349
-# Fortunately install-sh will honor a STRIPPROG variable, so we
2350
-# always use install-sh in `make install-strip', and initialize
2351
-# STRIPPROG with the value of the STRIP variable (set by the user).
2352
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
2353
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2354
-# Installed binaries are usually stripped using `strip' when the user
2355
-# run `make install-strip'. However `strip' might not be the right
2356
-# tool to use in cross-compilation environments, therefore Automake
2357
-# will honor the `STRIP' environment variable to overrule this program.
2358
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2359
-if test "$cross_compiling" != no; then
2360
- AC_CHECK_TOOL([STRIP], [strip], :)
2363
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
2364
+# -------------------------------------
2365
+# Define a conditional.
2366
+AC_DEFUN([AM_CONDITIONAL],
2367
+[AC_PREREQ(2.52)dnl
2368
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
2369
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2370
+AC_SUBST([$1_TRUE])dnl
2371
+AC_SUBST([$1_FALSE])dnl
2372
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
2373
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
2374
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
2382
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2383
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
2384
+AC_CONFIG_COMMANDS_PRE(
2385
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2386
+ AC_MSG_ERROR([[conditional "$1" was never defined.
2387
+Usually this means the macro was only invoked conditionally.]])
2390
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
2391
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
2392
+# Free Software Foundation, Inc.
2394
# This file is free software; the Free Software Foundation
2395
# gives unlimited permission to copy and/or distribute it,
2396
# with or without modifications, as long as this notice is preserved.
2400
-# _AM_SUBST_NOTMAKE(VARIABLE)
2401
-# ---------------------------
2402
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2403
-# This macro is traced by Automake.
2404
-AC_DEFUN([_AM_SUBST_NOTMAKE])
2407
-# AM_SUBST_NOTMAKE(VARIABLE)
2408
-# ---------------------------
2409
-# Public sister of _AM_SUBST_NOTMAKE.
2410
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2411
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2412
+# written in clear, in which case automake, when reading aclocal.m4,
2413
+# will think it sees a *use*, and therefore will trigger all it's
2414
+# C support machinery. Also note that it means that autoscan, seeing
2415
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2417
-# Check how to create a tarball. -*- Autoconf -*-
2419
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
2420
+# _AM_DEPENDENCIES(NAME)
2421
+# ----------------------
2422
+# See how the compiler implements dependency checking.
2423
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
2424
+# We try a few techniques and use that to set a single cache variable.
2426
-# This file is free software; the Free Software Foundation
2427
-# gives unlimited permission to copy and/or distribute it,
2428
-# with or without modifications, as long as this notice is preserved.
2429
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2430
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2431
+# dependency, and given that the user is not expected to run this macro,
2432
+# just rely on AC_PROG_CC.
2433
+AC_DEFUN([_AM_DEPENDENCIES],
2434
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
2435
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2436
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2437
+AC_REQUIRE([AM_DEP_TRACK])dnl
2440
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
2441
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
2442
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2443
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
2444
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
2445
+ [depcc="$$1" am_compiler_list=])
2447
-# _AM_PROG_TAR(FORMAT)
2448
-# --------------------
2449
-# Check how to create a tarball in format FORMAT.
2450
-# FORMAT should be one of `v7', `ustar', or `pax'.
2452
-# Substitute a variable $(am__tar) that is a command
2453
-# writing to stdout a FORMAT-tarball containing the directory
2455
-# tardir=directory && $(am__tar) > result.tar
2457
-# Substitute a variable $(am__untar) that extract such
2458
-# a tarball read from stdin.
2459
-# $(am__untar) < result.tar
2460
-AC_DEFUN([_AM_PROG_TAR],
2461
-[# Always define AMTAR for backward compatibility.
2462
-AM_MISSING_PROG([AMTAR], [tar])
2464
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
2465
- [m4_case([$1], [ustar],, [pax],,
2466
- [m4_fatal([Unknown tar format])])
2467
-AC_MSG_CHECKING([how to create a $1 tar archive])
2468
-# Loop over all known methods to create a tar archive until one works.
2469
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2470
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
2471
-# Do not fold the above two line into one, because Tru64 sh and
2472
-# Solaris sh will not grok spaces in the rhs of `-'.
2473
-for _am_tool in $_am_tools
2477
- for _am_tar in tar gnutar gtar;
2479
- AM_RUN_LOG([$_am_tar --version]) && break
2481
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2482
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2483
- am__untar="$_am_tar -xf -"
2486
- # Must skip GNU tar: if it does not support --format= it doesn't create
2487
- # ustar tarball either.
2488
- (tar --version) >/dev/null 2>&1 && continue
2489
- am__tar='tar chf - "$$tardir"'
2490
- am__tar_='tar chf - "$tardir"'
2491
- am__untar='tar xf -'
2494
- am__tar='pax -L -x $1 -w "$$tardir"'
2495
- am__tar_='pax -L -x $1 -w "$tardir"'
2496
- am__untar='pax -r'
2499
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2500
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2501
- am__untar='cpio -i -H $1 -d'
2510
- # If the value was cached, stop now. We just wanted to have am__tar
2511
- # and am__untar set.
2512
- test -n "${am_cv_prog_tar_$1}" && break
2514
- # tar/untar a dummy directory, and stop if the command works
2515
- rm -rf conftest.dir
2516
+AC_CACHE_CHECK([dependency style of $depcc],
2517
+ [am_cv_$1_dependencies_compiler_type],
2518
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2519
+ # We make a subdir and do the tests there. Otherwise we can end up
2520
+ # making bogus files that we don't know about and never remove. For
2521
+ # instance it was reported that on HP-UX the gcc test will end up
2522
+ # making a dummy file named `D' -- because `-MD' means `put the output
2525
- echo GrepMe > conftest.dir/file
2526
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2527
- rm -rf conftest.dir
2528
- if test -s conftest.tar; then
2529
- AM_RUN_LOG([$am__untar <conftest.tar])
2530
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2533
-rm -rf conftest.dir
2535
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2536
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2537
-AC_SUBST([am__tar])
2538
-AC_SUBST([am__untar])
2541
-dnl AM_GCONF_SOURCE_2
2542
-dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas
2543
-dnl (i.e. pass to gconftool-2
2544
-dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where
2545
-dnl you should install foo.schemas files
2547
+ # Copy depcomp to subdir because otherwise we won't find it if we're
2548
+ # using a relative directory.
2549
+ cp "$am_depcomp" conftest.dir
2551
+ # We will build objects and dependencies in a subdirectory because
2552
+ # it helps to detect inapplicable dependency modes. For instance
2553
+ # both Tru64's cc and ICC support -MD to output dependencies as a
2554
+ # side effect of compilation, but ICC will put the dependencies in
2555
+ # the current directory while Tru64 will put them in the object
2559
-AC_DEFUN([AM_GCONF_SOURCE_2],
2561
- if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
2562
- GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source`
2564
- GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE
2565
+ am_cv_$1_dependencies_compiler_type=none
2566
+ if test "$am_compiler_list" = ""; then
2567
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2569
+ am__universal=false
2570
+ m4_case([$1], [CC],
2571
+ [case " $depcc " in #(
2572
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
2575
+ [case " $depcc " in #(
2576
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
2579
- AC_ARG_WITH([gconf-source],
2580
- AC_HELP_STRING([--with-gconf-source=sourceaddress],
2581
- [Config database for installing schema files.]),
2582
- [GCONF_SCHEMA_CONFIG_SOURCE="$withval"],)
2583
+ for depmode in $am_compiler_list; do
2584
+ # Setup a source with many dependencies, because some compilers
2585
+ # like to wrap large dependency lists on column 80 (with \), and
2586
+ # we should not choose a depcomp mode which is confused by this.
2588
+ # We need to recreate these files for each test, as the compiler may
2589
+ # overwrite some of them when testing with obscure command lines.
2590
+ # This happens at least with the AIX C compiler.
2591
+ : > sub/conftest.c
2592
+ for i in 1 2 3 4 5 6; do
2593
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
2594
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2595
+ # Solaris 8's {/usr,}/bin/sh.
2596
+ touch sub/conftst$i.h
2598
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2600
- AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE)
2601
- AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation])
2602
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
2603
+ # mode. It turns out that the SunPro C++ compiler does not properly
2604
+ # handle `-M -o', and we need to detect this. Also, some Intel
2605
+ # versions had trouble with output in subdirs
2606
+ am__obj=sub/conftest.${OBJEXT-o}
2607
+ am__minus_obj="-o $am__obj"
2610
+ # This depmode causes a compiler race in universal mode.
2611
+ test "$am__universal" = false || continue
2614
+ # after this tag, mechanisms are not by side-effect, so they'll
2615
+ # only be used when explicitly requested
2616
+ if test "x$enable_dependency_tracking" = xyes; then
2622
+ msvisualcpp | msvcmsys)
2623
+ # This compiler won't grok `-c -o', but also, the minuso test has
2624
+ # not run yet. These depmodes are late enough in the game, and
2625
+ # so weak that their functioning should not be impacted.
2626
+ am__obj=conftest.${OBJEXT-o}
2631
+ if depmode=$depmode \
2632
+ source=sub/conftest.c object=$am__obj \
2633
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2634
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2635
+ >/dev/null 2>conftest.err &&
2636
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2637
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2638
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2639
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2640
+ # icc doesn't choke on unknown options, it will just issue warnings
2641
+ # or remarks (even with -Werror). So we grep stderr for any message
2642
+ # that says an option was ignored or not supported.
2643
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
2644
+ # icc: Command line warning: ignoring option '-M'; no argument required
2645
+ # The diagnosis changed in icc 8.0:
2646
+ # icc: Command line remark: option '-MP' not supported
2647
+ if (grep 'ignoring option' conftest.err ||
2648
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2649
+ am_cv_$1_dependencies_compiler_type=$depmode
2655
- if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then
2656
- GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas'
2659
+ rm -rf conftest.dir
2661
+ am_cv_$1_dependencies_compiler_type=none
2664
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2665
+AM_CONDITIONAL([am__fastdep$1], [
2666
+ test "x$enable_dependency_tracking" != xno \
2667
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2670
- AC_ARG_WITH([gconf-schema-file-dir],
2671
- AC_HELP_STRING([--with-gconf-schema-file-dir=dir],
2672
- [Directory for installing schema files.]),
2673
- [GCONF_SCHEMA_FILE_DIR="$withval"],)
2675
- AC_SUBST(GCONF_SCHEMA_FILE_DIR)
2676
- AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
2679
+# Choose a directory name for dependency files.
2680
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
2681
+AC_DEFUN([AM_SET_DEPDIR],
2682
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2683
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2686
- AC_ARG_ENABLE(schemas-install,
2687
- AC_HELP_STRING([--disable-schemas-install],
2688
- [Disable the schemas installation]),
2689
- [case ${enableval} in
2691
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
2693
- AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
2697
+AC_DEFUN([AM_DEP_TRACK],
2698
+[AC_ARG_ENABLE(dependency-tracking,
2699
+[ --disable-dependency-tracking speeds up one-time build
2700
+ --enable-dependency-tracking do not reject slow dependency extractors])
2701
+if test "x$enable_dependency_tracking" != xno; then
2702
+ am_depcomp="$ac_aux_dir/depcomp"
2703
+ AMDEPBACKSLASH='\'
2705
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2706
+AC_SUBST([AMDEPBACKSLASH])dnl
2707
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
2710
-# Configure paths for GLIB
2711
-# Owen Taylor 1997-2001
2712
+# Generate code to set up dependency tracking. -*- Autoconf -*-
2714
-dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
2715
-dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
2716
-dnl gthread, or gio is specified in MODULES, pass to pkg-config
2718
-AC_DEFUN([AM_PATH_GLIB_2_0],
2720
-dnl Get the cflags and libraries from pkg-config
2722
-AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
2723
- , enable_glibtest=yes)
2724
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
2725
+# Free Software Foundation, Inc.
2727
+# This file is free software; the Free Software Foundation
2728
+# gives unlimited permission to copy and/or distribute it,
2729
+# with or without modifications, as long as this notice is preserved.
2731
- pkg_config_args=glib-2.0
2732
- for module in . $4
2735
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
2736
+# ------------------------------
2737
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2739
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
2740
+ # are listed without --file. Let's play safe and only enable the eval
2741
+ # if we detect the quoting.
2742
+ case $CONFIG_FILES in
2743
+ *\'*) eval set x "$CONFIG_FILES" ;;
2744
+ *) set x $CONFIG_FILES ;;
2751
- pkg_config_args="$pkg_config_args gmodule-2.0"
2753
- gmodule-no-export)
2754
- pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
2757
- pkg_config_args="$pkg_config_args gobject-2.0"
2760
- pkg_config_args="$pkg_config_args gthread-2.0"
2763
- pkg_config_args="$pkg_config_args $module-2.0"
2766
+ # Strip MF so we end up with the name of the file.
2767
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
2768
+ # Check whether this is an Automake generated Makefile or not.
2769
+ # We used to match only the files named `Makefile.in', but
2770
+ # some people rename them; so instead we look at the file content.
2771
+ # Grep'ing the first line is not enough: some people post-process
2772
+ # each Makefile.in and add a new line on top of each file to say so.
2773
+ # Grep'ing the whole file is not good either: AIX grep has a line
2774
+ # limit of 2048, but all sed's we know have understand at least 4000.
2775
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
2776
+ dirpart=`AS_DIRNAME("$mf")`
2780
+ # Extract the definition of DEPDIR, am__include, and am__quote
2781
+ # from the Makefile without running `make'.
2782
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
2783
+ test -z "$DEPDIR" && continue
2784
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
2785
+ test -z "am__include" && continue
2786
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
2787
+ # When using ansi2knr, U may be empty or an underscore; expand it
2788
+ U=`sed -n 's/^U = //p' < "$mf"`
2789
+ # Find all dependency output files, they are included files with
2790
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
2791
+ # simplest approach to changing $(DEPDIR) to its actual value in the
2793
+ for file in `sed -n "
2794
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
2795
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2796
+ # Make sure the directory exists.
2797
+ test -f "$dirpart/$file" && continue
2798
+ fdir=`AS_DIRNAME(["$file"])`
2799
+ AS_MKDIR_P([$dirpart/$fdir])
2800
+ # echo "creating $dirpart/$file"
2801
+ echo '# dummy' > "$dirpart/$file"
2805
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2807
- PKG_PROG_PKG_CONFIG([0.16])
2811
- if test "x$PKG_CONFIG" = x ; then
2815
+# AM_OUTPUT_DEPENDENCY_COMMANDS
2816
+# -----------------------------
2817
+# This macro should only be invoked once -- use via AC_REQUIRE.
2819
+# This code is only required when automatic dependency tracking
2820
+# is enabled. FIXME. This creates each `.P' file that we will
2821
+# need in order to bootstrap the dependency handling code.
2822
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2823
+[AC_CONFIG_COMMANDS([depfiles],
2824
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2825
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2828
- min_glib_version=ifelse([$1], ,2.0.0,$1)
2829
- AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
2830
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
2831
+# Free Software Foundation, Inc.
2833
+# This file is free software; the Free Software Foundation
2834
+# gives unlimited permission to copy and/or distribute it,
2835
+# with or without modifications, as long as this notice is preserved.
2837
- if test x$PKG_CONFIG != xno ; then
2838
- ## don't try to run the test against uninstalled libtool libs
2839
- if $PKG_CONFIG --uninstalled $pkg_config_args; then
2840
- echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
2841
- enable_glibtest=no
2845
- if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
2851
+# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
2852
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
2854
- if test x"$no_glib" = x ; then
2855
- GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
2856
- GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
2857
- GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
2858
+# Do all the work for Automake. -*- Autoconf -*-
2860
- GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
2861
- GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
2862
- glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
2863
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
2864
- glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
2865
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
2866
- glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
2867
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
2868
- if test "x$enable_glibtest" = "xyes" ; then
2869
- ac_save_CFLAGS="$CFLAGS"
2870
- ac_save_LIBS="$LIBS"
2871
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
2872
- LIBS="$GLIB_LIBS $LIBS"
2874
-dnl Now check if the installed GLIB is sufficiently new. (Also sanity
2875
-dnl checks the results of pkg-config to some extent)
2877
- rm -f conf.glibtest
2881
-#include <stdlib.h>
2882
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2883
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
2885
+# This file is free software; the Free Software Foundation
2886
+# gives unlimited permission to copy and/or distribute it,
2887
+# with or without modifications, as long as this notice is preserved.
2892
- int major, minor, micro;
2893
- char *tmp_version;
2896
- fclose (fopen ("conf.glibtest", "w"));
2897
+# This macro actually does too much. Some checks are only needed if
2898
+# your package does certain things. But this isn't really a big deal.
2900
- /* HP/UX 9 (%@#!) writes to sscanf strings */
2901
- tmp_version = g_strdup("$min_glib_version");
2902
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
2903
- printf("%s, bad version string\n", "$min_glib_version");
2906
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
2907
+# AM_INIT_AUTOMAKE([OPTIONS])
2908
+# -----------------------------------------------
2909
+# The call with PACKAGE and VERSION arguments is the old style
2910
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
2911
+# and VERSION should now be passed to AC_INIT and removed from
2912
+# the call to AM_INIT_AUTOMAKE.
2913
+# We support both call styles for the transition. After
2914
+# the next Automake release, Autoconf can make the AC_INIT
2915
+# arguments mandatory, and then we can depend on a new Autoconf
2916
+# release and drop the old call support.
2917
+AC_DEFUN([AM_INIT_AUTOMAKE],
2918
+[AC_PREREQ([2.62])dnl
2919
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
2920
+dnl the ones we care about.
2921
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
2922
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
2923
+AC_REQUIRE([AC_PROG_INSTALL])dnl
2924
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
2925
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2926
+ # is not polluted with repeated "-I."
2927
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
2928
+ # test to see if srcdir already configured
2929
+ if test -f $srcdir/config.status; then
2930
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
2934
- if ((glib_major_version != $glib_config_major_version) ||
2935
- (glib_minor_version != $glib_config_minor_version) ||
2936
- (glib_micro_version != $glib_config_micro_version))
2938
- printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
2939
- $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
2940
- glib_major_version, glib_minor_version, glib_micro_version);
2941
- printf ("*** was found! If pkg-config was correct, then it is best\n");
2942
- printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
2943
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
2944
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
2945
- printf("*** required on your system.\n");
2946
- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
2947
- printf("*** to point to the correct configuration files\n");
2949
- else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
2950
- (glib_minor_version != GLIB_MINOR_VERSION) ||
2951
- (glib_micro_version != GLIB_MICRO_VERSION))
2953
- printf("*** GLIB header files (version %d.%d.%d) do not match\n",
2954
- GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
2955
- printf("*** library (version %d.%d.%d)\n",
2956
- glib_major_version, glib_minor_version, glib_micro_version);
2958
+# test whether we have cygpath
2959
+if test -z "$CYGPATH_W"; then
2960
+ if (cygpath --version) >/dev/null 2>/dev/null; then
2961
+ CYGPATH_W='cygpath -w'
2964
- if ((glib_major_version > major) ||
2965
- ((glib_major_version == major) && (glib_minor_version > minor)) ||
2966
- ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
2972
- printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
2973
- glib_major_version, glib_minor_version, glib_micro_version);
2974
- printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
2975
- major, minor, micro);
2976
- printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
2978
- printf("*** If you have already installed a sufficiently new version, this error\n");
2979
- printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
2980
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
2981
- printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
2982
- printf("*** correct copy of pkg-config. (In this case, you will have to\n");
2983
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
2984
- printf("*** so that the correct libraries are found at run-time))\n");
2989
-],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
2990
- CFLAGS="$ac_save_CFLAGS"
2991
- LIBS="$ac_save_LIBS"
2995
- if test "x$no_glib" = x ; then
2996
- AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
2997
- ifelse([$2], , :, [$2])
3000
- if test "$PKG_CONFIG" = "no" ; then
3001
- echo "*** A new enough version of pkg-config was not found."
3002
- echo "*** See http://www.freedesktop.org/software/pkgconfig/"
3004
- if test -f conf.glibtest ; then
3007
- echo "*** Could not run GLIB test program, checking why..."
3008
- ac_save_CFLAGS="$CFLAGS"
3009
- ac_save_LIBS="$LIBS"
3010
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
3011
- LIBS="$LIBS $GLIB_LIBS"
3015
-], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
3016
- [ echo "*** The test program compiled, but did not run. This usually means"
3017
- echo "*** that the run-time linker is not finding GLIB or finding the wrong"
3018
- echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
3019
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
3020
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
3021
- echo "*** is required on your system"
3023
- echo "*** If you have an old version installed, it is best to remove it, although"
3024
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
3025
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
3026
- echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
3027
- CFLAGS="$ac_save_CFLAGS"
3028
- LIBS="$ac_save_LIBS"
3033
- GLIB_GENMARSHAL=""
3036
- ifelse([$3], , :, [$3])
3038
- AC_SUBST(GLIB_CFLAGS)
3039
- AC_SUBST(GLIB_LIBS)
3040
- AC_SUBST(GLIB_GENMARSHAL)
3041
- AC_SUBST(GOBJECT_QUERY)
3042
- AC_SUBST(GLIB_MKENUMS)
3043
- rm -f conf.glibtest
3045
+AC_SUBST([CYGPATH_W])
3047
+# Define the identity of the package.
3048
+dnl Distinguish between old-style and new-style calls.
3050
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
3051
+ AC_SUBST([PACKAGE], [$1])dnl
3052
+ AC_SUBST([VERSION], [$2])],
3053
+[_AM_SET_OPTIONS([$1])dnl
3054
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
3055
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
3056
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
3057
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
3058
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
3060
+_AM_IF_OPTION([no-define],,
3061
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
3062
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
3064
+# Some tools Automake needs.
3065
+AC_REQUIRE([AM_SANITY_CHECK])dnl
3066
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
3067
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
3068
+AM_MISSING_PROG(AUTOCONF, autoconf)
3069
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
3070
+AM_MISSING_PROG(AUTOHEADER, autoheader)
3071
+AM_MISSING_PROG(MAKEINFO, makeinfo)
3072
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
3073
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
3074
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
3075
+# We need awk for the "check" target. The system "awk" is bad on
3077
+AC_REQUIRE([AC_PROG_AWK])dnl
3078
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3079
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3080
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
3081
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
3082
+ [_AM_PROG_TAR([v7])])])
3083
+_AM_IF_OPTION([no-dependencies],,
3084
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
3085
+ [_AM_DEPENDENCIES(CC)],
3086
+ [define([AC_PROG_CC],
3087
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
3088
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
3089
+ [_AM_DEPENDENCIES(CXX)],
3090
+ [define([AC_PROG_CXX],
3091
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
3092
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
3093
+ [_AM_DEPENDENCIES(OBJC)],
3094
+ [define([AC_PROG_OBJC],
3095
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
3097
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
3098
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
3099
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
3100
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
3101
+AC_CONFIG_COMMANDS_PRE(dnl
3102
+[m4_provide_if([_AM_COMPILER_EXEEXT],
3103
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
3106
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
3107
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
3108
+dnl mangled by Autoconf and run in a shell conditional statement.
3109
+m4_define([_AC_COMPILER_EXEEXT],
3110
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
3113
+# When config.status generates a header, we must update the stamp-h file.
3114
+# This file resides in the same directory as the config header
3115
+# that is generated. The stamp files are numbered to have different names.
3117
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
3118
+# loop where config.status creates the headers, so we can generate
3119
+# our stamp files there.
3120
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
3121
+[# Compute $1's index in $config_headers.
3124
+for _am_header in $config_headers :; do
3125
+ case $_am_header in
3126
+ $_am_arg | $_am_arg:* )
3129
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
3132
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
3134
+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
3136
+# This file is free software; the Free Software Foundation
3137
+# gives unlimited permission to copy and/or distribute it,
3138
+# with or without modifications, as long as this notice is preserved.
3140
+# AM_PROG_INSTALL_SH
3141
+# ------------------
3142
+# Define $install_sh.
3143
+AC_DEFUN([AM_PROG_INSTALL_SH],
3144
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3145
+if test x"${install_sh}" != xset; then
3146
+ case $am_aux_dir in
3148
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3150
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
3153
+AC_SUBST(install_sh)])
3155
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
3157
+# This file is free software; the Free Software Foundation
3158
+# gives unlimited permission to copy and/or distribute it,
3159
+# with or without modifications, as long as this notice is preserved.
3163
+# Check whether the underlying file-system supports filenames
3164
+# with a leading dot. For instance MS-DOS doesn't.
3165
+AC_DEFUN([AM_SET_LEADING_DOT],
3166
+[rm -rf .tst 2>/dev/null
3167
+mkdir .tst 2>/dev/null
3168
+if test -d .tst; then
3173
+rmdir .tst 2>/dev/null
3174
+AC_SUBST([am__leading_dot])])
3176
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
3177
+# From Jim Meyering
3179
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
3180
+# Free Software Foundation, Inc.
3182
+# This file is free software; the Free Software Foundation
3183
+# gives unlimited permission to copy and/or distribute it,
3184
+# with or without modifications, as long as this notice is preserved.
3188
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
3189
+# ----------------------------------
3190
+# Control maintainer-specific portions of Makefiles.
3191
+# Default is to disable them, unless `enable' is passed literally.
3192
+# For symmetry, `disable' may be passed as well. Anyway, the user
3193
+# can override the default with the --enable/--disable switch.
3194
+AC_DEFUN([AM_MAINTAINER_MODE],
3195
+[m4_case(m4_default([$1], [disable]),
3196
+ [enable], [m4_define([am_maintainer_other], [disable])],
3197
+ [disable], [m4_define([am_maintainer_other], [enable])],
3198
+ [m4_define([am_maintainer_other], [enable])
3199
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
3200
+AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
3201
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
3202
+ AC_ARG_ENABLE([maintainer-mode],
3203
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
3204
+ (and sometimes confusing) to the casual installer],
3205
+ [USE_MAINTAINER_MODE=$enableval],
3206
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
3207
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
3208
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
3209
+ MAINT=$MAINTAINER_MODE_TRUE
3210
+ AC_SUBST([MAINT])dnl
3214
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
3216
+# Check to see how 'make' treats includes. -*- Autoconf -*-
3218
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
3220
+# This file is free software; the Free Software Foundation
3221
+# gives unlimited permission to copy and/or distribute it,
3222
+# with or without modifications, as long as this notice is preserved.
3226
+# AM_MAKE_INCLUDE()
3227
+# -----------------
3228
+# Check to see how make treats includes.
3229
+AC_DEFUN([AM_MAKE_INCLUDE],
3230
+[am_make=${MAKE-make}
3231
+cat > confinc << 'END'
3233
+ @echo this is the am__doit target
3236
+# If we don't find an include directive, just comment out the code.
3237
+AC_MSG_CHECKING([for style of include used by $am_make])
3241
+# First try GNU make style include.
3242
+echo "include confinc" > confmf
3243
+# Ignore all kinds of additional output from `make'.
3244
+case `$am_make -s -f confmf 2> /dev/null` in #(
3245
+*the\ am__doit\ target*)
3246
+ am__include=include
3251
+# Now try BSD make style include.
3252
+if test "$am__include" = "#"; then
3253
+ echo '.include "confinc"' > confmf
3254
+ case `$am_make -s -f confmf 2> /dev/null` in #(
3255
+ *the\ am__doit\ target*)
3256
+ am__include=.include
3262
+AC_SUBST([am__include])
3263
+AC_SUBST([am__quote])
3264
+AC_MSG_RESULT([$_am_result])
3265
+rm -f confinc confmf
3268
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
3269
+# Free Software Foundation, Inc.
3271
+# This file is free software; the Free Software Foundation
3272
+# gives unlimited permission to copy and/or distribute it,
3273
+# with or without modifications, as long as this notice is preserved.
3279
+# Like AC_PROG_CC_C_O, but changed for automake.
3280
+AC_DEFUN([AM_PROG_CC_C_O],
3281
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
3282
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3283
+AC_REQUIRE_AUX_FILE([compile])dnl
3284
+# FIXME: we rely on the cache variable name because
3285
+# there is no other way.
3287
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
3288
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
3289
+if test "$am_t" != yes; then
3290
+ # Losing compiler, so override with the script.
3291
+ # FIXME: It is wrong to rewrite CC.
3292
+ # But if we don't then we get into trouble of one sort or another.
3293
+ # A longer-term fix would be to have automake use am__CC in this case,
3294
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3295
+ CC="$am_aux_dir/compile $CC"
3297
+dnl Make sure AC_PROG_CC is never called again, or it will override our
3299
+m4_define([AC_PROG_CC],
3300
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
3303
-# Copyright (C) 1995-2002 Free Software Foundation, Inc.
3304
-# Copyright (C) 2001-2003,2004 Red Hat, Inc.
3306
-# This file is free software, distributed under the terms of the GNU
3307
-# General Public License. As a special exception to the GNU General
3308
-# Public License, this file may be distributed as part of a program
3309
-# that contains a configuration script generated by Autoconf, under
3310
-# the same distribution terms as the rest of that program.
3312
-# This file can be copied and used freely without restrictions. It can
3313
-# be used in projects which are not available under the GNU Public License
3314
-# but which still want to provide support for the GNU gettext functionality.
3316
-# Macro to add for using GNU gettext.
3317
-# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
3319
-# Modified to never use included libintl.
3320
-# Owen Taylor <otaylor@redhat.com>, 12/15/1998
3322
-# Major rework to remove unused code
3323
-# Owen Taylor <otaylor@redhat.com>, 12/11/2002
3325
-# Added better handling of ALL_LINGUAS from GNU gettext version
3326
-# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
3328
-# Modified to require ngettext
3329
-# Matthias Clasen <mclasen@redhat.com> 08/06/2004
3330
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3332
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
3333
+# Free Software Foundation, Inc.
3335
-# We need this here as well, since someone might use autoconf-2.5x
3336
-# to configure GLib then an older version to configure a package
3337
-# using AM_GLIB_GNU_GETTEXT
3339
+# This file is free software; the Free Software Foundation
3340
+# gives unlimited permission to copy and/or distribute it,
3341
+# with or without modifications, as long as this notice is preserved.
3344
-dnl We go to great lengths to make sure that aclocal won't
3345
-dnl try to pull in the installed version of these macros
3346
-dnl when running aclocal in the glib directory.
3348
-m4_copy([AC_DEFUN],[glib_DEFUN])
3349
-m4_copy([AC_REQUIRE],[glib_REQUIRE])
3351
-dnl At the end, if we're not within glib, we'll define the public
3352
-dnl definitions in terms of our private definitions.
3357
-#--------------------
3358
-glib_DEFUN([GLIB_LC_MESSAGES],
3359
- [AC_CHECK_HEADERS([locale.h])
3360
- if test $ac_cv_header_locale_h = yes; then
3361
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
3362
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
3363
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
3364
- if test $am_cv_val_LC_MESSAGES = yes; then
3365
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
3366
- [Define if your <locale.h> file defines LC_MESSAGES.])
3369
+# AM_MISSING_PROG(NAME, PROGRAM)
3370
+# ------------------------------
3371
+AC_DEFUN([AM_MISSING_PROG],
3372
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
3373
+$1=${$1-"${am_missing_run}$2"}
3376
-# GLIB_PATH_PROG_WITH_TEST
3377
-#----------------------------
3378
-dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
3379
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
3380
-glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
3381
-[# Extract the first word of "$2", so it can be a program name with args.
3382
-set dummy $2; ac_word=[$]2
3383
-AC_MSG_CHECKING([for $ac_word])
3384
-AC_CACHE_VAL(ac_cv_path_$1,
3387
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
3390
+# AM_MISSING_HAS_RUN
3391
+# ------------------
3392
+# Define MISSING if not defined so far and test if it supports --run.
3393
+# If it does, set am_missing_run to use it, otherwise, to nothing.
3394
+AC_DEFUN([AM_MISSING_HAS_RUN],
3395
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
3396
+AC_REQUIRE_AUX_FILE([missing])dnl
3397
+if test x"${MISSING+set}" != xset; then
3398
+ case $am_aux_dir in
3400
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3402
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3403
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
3404
- test -z "$ac_dir" && ac_dir=.
3405
- if test -f $ac_dir/$ac_word; then
3407
- ac_cv_path_$1="$ac_dir/$ac_word"
3412
- IFS="$ac_save_ifs"
3413
-dnl If no 4th arg is given, leave the cache variable unset,
3414
-dnl so AC_PATH_PROGS will keep looking.
3415
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
3419
-$1="$ac_cv_path_$1"
3420
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
3421
- AC_MSG_RESULT([$]$1)
3422
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
3425
+# Use eval to expand $SHELL
3426
+if eval "$MISSING --run true"; then
3427
+ am_missing_run="$MISSING --run "
3431
+ AC_MSG_WARN([`missing' script is too old or missing])
3438
-glib_DEFUN([GLIB_WITH_NLS],
3439
- dnl NLS is obligatory
3442
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
3444
+# This file is free software; the Free Software Foundation
3445
+# gives unlimited permission to copy and/or distribute it,
3446
+# with or without modifications, as long as this notice is preserved.
3448
- gt_cv_have_gettext=no
3451
+# Check for `mkdir -p'.
3452
+AC_DEFUN([AM_PROG_MKDIR_P],
3453
+[AC_PREREQ([2.60])dnl
3454
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
3455
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
3456
+dnl while keeping a definition of mkdir_p for backward compatibility.
3457
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
3458
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
3459
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
3460
+dnl adjustment using top_builddir (which is defined more often than
3462
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
3464
+ [[\\/$]]* | ?:[[\\/]]*) ;;
3465
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3472
+# Helper functions for option handling. -*- Autoconf -*-
3474
- AC_CHECK_HEADER(libintl.h,
3475
- [gt_cv_func_dgettext_libintl="no"
3476
- libintl_extra_libs=""
3477
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
3479
+# This file is free software; the Free Software Foundation
3480
+# gives unlimited permission to copy and/or distribute it,
3481
+# with or without modifications, as long as this notice is preserved.
3484
- # First check in libc
3486
- AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
3488
-#include <libintl.h>
3490
- [return !ngettext ("","", 1)],
3491
- gt_cv_func_ngettext_libc=yes,
3492
- gt_cv_func_ngettext_libc=no)
3495
- if test "$gt_cv_func_ngettext_libc" = "yes" ; then
3496
- AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
3498
-#include <libintl.h>
3500
- [return !dgettext ("","")],
3501
- gt_cv_func_dgettext_libc=yes,
3502
- gt_cv_func_dgettext_libc=no)
3506
- if test "$gt_cv_func_ngettext_libc" = "yes" ; then
3507
- AC_CHECK_FUNCS(bind_textdomain_codeset)
3512
- # If we don't have everything we want, check in libintl
3514
- if test "$gt_cv_func_dgettext_libc" != "yes" \
3515
- || test "$gt_cv_func_ngettext_libc" != "yes" \
3516
- || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
3518
- AC_CHECK_LIB(intl, bindtextdomain,
3519
- [AC_CHECK_LIB(intl, ngettext,
3520
- [AC_CHECK_LIB(intl, dgettext,
3521
- gt_cv_func_dgettext_libintl=yes)])])
3522
+# _AM_MANGLE_OPTION(NAME)
3523
+# -----------------------
3524
+AC_DEFUN([_AM_MANGLE_OPTION],
3525
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
3527
- if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
3528
- AC_MSG_CHECKING([if -liconv is needed to use gettext])
3530
- AC_CHECK_LIB(intl, ngettext,
3531
- [AC_CHECK_LIB(intl, dcgettext,
3532
- [gt_cv_func_dgettext_libintl=yes
3533
- libintl_extra_libs=-liconv],
3537
+# _AM_SET_OPTION(NAME)
3538
+# ------------------------------
3539
+# Set option NAME. Presently that only means defining a flag for this option.
3540
+AC_DEFUN([_AM_SET_OPTION],
3541
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
3544
- # If we found libintl, then check in it for bind_textdomain_codeset();
3545
- # we'll prefer libc if neither have bind_textdomain_codeset(),
3546
- # and both have dgettext and ngettext
3548
- if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
3549
- glib_save_LIBS="$LIBS"
3550
- LIBS="$LIBS -lintl $libintl_extra_libs"
3551
- unset ac_cv_func_bind_textdomain_codeset
3552
- AC_CHECK_FUNCS(bind_textdomain_codeset)
3553
- LIBS="$glib_save_LIBS"
3554
+# _AM_SET_OPTIONS(OPTIONS)
3555
+# ----------------------------------
3556
+# OPTIONS is a space-separated list of Automake options.
3557
+AC_DEFUN([_AM_SET_OPTIONS],
3558
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
3560
- if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
3561
- gt_cv_func_dgettext_libc=no
3563
- if test "$gt_cv_func_dgettext_libc" = "yes" \
3564
- && test "$gt_cv_func_ngettext_libc" = "yes"; then
3565
- gt_cv_func_dgettext_libintl=no
3570
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
3571
+# -------------------------------------------
3572
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
3573
+AC_DEFUN([_AM_IF_OPTION],
3574
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3576
- if test "$gt_cv_func_dgettext_libc" = "yes" \
3577
- || test "$gt_cv_func_dgettext_libintl" = "yes"; then
3578
- gt_cv_have_gettext=yes
3581
- if test "$gt_cv_func_dgettext_libintl" = "yes"; then
3582
- INTLLIBS="-lintl $libintl_extra_libs"
3585
- if test "$gt_cv_have_gettext" = "yes"; then
3586
- AC_DEFINE(HAVE_GETTEXT,1,
3587
- [Define if the GNU gettext() function is already present or preinstalled.])
3588
- GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
3589
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
3590
- if test "$MSGFMT" != "no"; then
3591
- glib_save_LIBS="$LIBS"
3592
- LIBS="$LIBS $INTLLIBS"
3593
- AC_CHECK_FUNCS(dcgettext)
3595
- AC_MSG_CHECKING([if msgfmt accepts -c])
3596
- GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
3599
-"Content-Type: text/plain; charset=UTF-8\n"
3600
-"Project-Id-Version: test 1.0\n"
3601
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
3602
-"Last-Translator: test <foo@bar.xx>\n"
3603
-"Language-Team: C <LL@li.org>\n"
3604
-"MIME-Version: 1.0\n"
3605
-"Content-Transfer-Encoding: 8bit\n"
3606
-], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
3607
- AC_SUBST(MSGFMT_OPTS)
3608
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3609
- GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
3610
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
3611
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
3612
- return _nl_msg_cat_cntr],
3614
- DATADIRNAME=share],
3617
- dnl On Solaris, if bind_textdomain_codeset is in libc,
3618
- dnl GNU format message catalog is always supported,
3619
- dnl since both are added to the libc all together.
3620
- dnl Hence, we'd like to go with DATADIRNAME=share and
3621
- dnl and CATOBJEXT=.gmo in this case.
3622
- AC_CHECK_FUNC(bind_textdomain_codeset,
3624
- DATADIRNAME=share],
3633
- LIBS="$glib_save_LIBS"
3636
- gt_cv_have_gettext=no
3640
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
3641
+# Free Software Foundation, Inc.
3643
+# This file is free software; the Free Software Foundation
3644
+# gives unlimited permission to copy and/or distribute it,
3645
+# with or without modifications, as long as this notice is preserved.
3647
- if test "$gt_cv_have_gettext" = "yes" ; then
3648
- AC_DEFINE(ENABLE_NLS, 1,
3649
- [always defined to indicate that i18n is enabled])
3651
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3652
+# ---------------------------------------------------------------------------
3653
+# Adds support for distributing Python modules and packages. To
3654
+# install modules, copy them to $(pythondir), using the python_PYTHON
3655
+# automake variable. To install a package with the same name as the
3656
+# automake package, install to $(pkgpythondir), or use the
3657
+# pkgpython_PYTHON automake variable.
3659
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
3660
+# locations to install python extension modules (shared libraries).
3661
+# Another macro is required to find the appropriate flags to compile
3662
+# extension modules.
3664
+# If your package is configured with a different prefix to python,
3665
+# users will have to add the install directory to the PYTHONPATH
3666
+# environment variable, or create a .pth file (see the python
3667
+# documentation for details).
3669
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
3670
+# cause an error if the version of python installed on the system
3671
+# doesn't meet the requirement. MINIMUM-VERSION should consist of
3672
+# numbers and dots only.
3673
+AC_DEFUN([AM_PATH_PYTHON],
3675
+ dnl Find a Python interpreter. Python versions prior to 2.0 are not
3676
+ dnl supported. (2.0 was released on October 16, 2000).
3677
+ m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
3678
+ [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
3679
+python2.1 python2.0])
3681
- dnl Test whether we really found GNU xgettext.
3682
- if test "$XGETTEXT" != ":"; then
3683
- dnl If it is not GNU xgettext we define it as : so that the
3684
- dnl Makefiles still can work.
3685
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3688
+ dnl No version check is needed.
3689
+ # Find any Python interpreter.
3690
+ if test -z "$PYTHON"; then
3691
+ AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
3693
+ am_display_PYTHON=python
3695
+ dnl A version check is needed.
3696
+ if test -n "$PYTHON"; then
3697
+ # If the user set $PYTHON, use it and don't search something else.
3698
+ AC_MSG_CHECKING([whether $PYTHON version >= $1])
3699
+ AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
3700
+ [AC_MSG_RESULT(yes)],
3701
+ [AC_MSG_ERROR(too old)])
3702
+ am_display_PYTHON=$PYTHON
3704
+ # Otherwise, try each interpreter until we find one that satisfies
3706
+ AC_CACHE_CHECK([for a Python interpreter with version >= $1],
3707
+ [am_cv_pathless_PYTHON],[
3708
+ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
3709
+ test "$am_cv_pathless_PYTHON" = none && break
3710
+ AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
3712
+ # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
3713
+ if test "$am_cv_pathless_PYTHON" = none; then
3717
- [found xgettext program is not GNU xgettext; ignore it])
3719
+ AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
3721
+ am_display_PYTHON=$am_cv_pathless_PYTHON
3725
- # We need to process the po/ directory.
3727
+ if test "$PYTHON" = :; then
3728
+ dnl Run any user-specified action, or abort.
3729
+ m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
3732
- AC_OUTPUT_COMMANDS(
3733
- [case "$CONFIG_FILES" in *po/Makefile.in*)
3734
- sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
3736
+ dnl Query Python for its version number. Getting [:3] seems to be
3737
+ dnl the best way to do this; it's what "site.py" does in the standard
3740
- dnl These rules are solely for the distribution goal. While doing this
3741
- dnl we only have to keep exactly one list of the available catalogs
3742
- dnl in configure.in.
3743
- for lang in $ALL_LINGUAS; do
3744
- GMOFILES="$GMOFILES $lang.gmo"
3745
- POFILES="$POFILES $lang.po"
3747
+ AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
3748
+ [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
3749
+ AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
3751
- dnl Make all variables we use known to autoconf.
3752
- AC_SUBST(CATALOGS)
3753
- AC_SUBST(CATOBJEXT)
3754
- AC_SUBST(DATADIRNAME)
3755
- AC_SUBST(GMOFILES)
3756
- AC_SUBST(INSTOBJEXT)
3757
- AC_SUBST(INTLLIBS)
3758
- AC_SUBST(PO_IN_DATADIR_TRUE)
3759
- AC_SUBST(PO_IN_DATADIR_FALSE)
3763
+ dnl Use the values of $prefix and $exec_prefix for the corresponding
3764
+ dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
3765
+ dnl distinct variables so they can be overridden if need be. However,
3766
+ dnl general consensus is that you shouldn't need this ability.
3768
-# AM_GLIB_GNU_GETTEXT
3769
-# -------------------
3770
-# Do checks necessary for use of gettext. If a suitable implementation
3771
-# of gettext is found in either in libintl or in the C library,
3772
-# it will set INTLLIBS to the libraries needed for use of gettext
3773
-# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
3774
-# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
3775
-# on various variables needed by the Makefile.in.in installed by
3778
-glib_DEFUN([GLIB_GNU_GETTEXT],
3779
- [AC_REQUIRE([AC_PROG_CC])dnl
3780
- AC_REQUIRE([AC_HEADER_STDC])dnl
3784
+ AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
3785
+ AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
3787
- if test "$gt_cv_have_gettext" = "yes"; then
3788
- if test "x$ALL_LINGUAS" = "x"; then
3790
+ dnl At times (like when building shared libraries) you may want
3791
+ dnl to know which OS platform Python thinks this is.
3793
+ AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
3794
+ [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
3795
+ AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
3798
+ dnl Set up 4 directories:
3800
+ dnl pythondir -- where to install python scripts. This is the
3801
+ dnl site-packages directory, not the python standard library
3802
+ dnl directory like in previous automake betas. This behavior
3803
+ dnl is more consistent with lispdir.m4 for example.
3804
+ dnl Query distutils for this directory. distutils does not exist in
3805
+ dnl Python 1.5, so we fall back to the hardcoded directory if it
3807
+ AC_CACHE_CHECK([for $am_display_PYTHON script directory],
3808
+ [am_cv_python_pythondir],
3809
+ [if test "x$prefix" = xNONE
3811
+ am_py_prefix=$ac_default_prefix
3813
- AC_MSG_CHECKING(for catalogs to be installed)
3815
- for presentlang in $ALL_LINGUAS; do
3817
- if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
3818
- desiredlanguages="$LINGUAS"
3820
- desiredlanguages="$ALL_LINGUAS"
3822
- for desiredlang in $desiredlanguages; do
3823
- # Use the presentlang catalog if desiredlang is
3824
- # a. equal to presentlang, or
3825
- # b. a variant of presentlang (because in this case,
3826
- # presentlang can be used as a fallback for messages
3827
- # which are not translated in the desiredlang catalog).
3828
- case "$desiredlang" in
3829
- "$presentlang"*) useit=yes;;
3832
- if test $useit = yes; then
3833
- NEW_LINGUAS="$NEW_LINGUAS $presentlang"
3836
- LINGUAS=$NEW_LINGUAS
3837
- AC_MSG_RESULT($LINGUAS)
3838
+ am_py_prefix=$prefix
3840
+ am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
3841
+ echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
3842
+ case $am_cv_python_pythondir in
3844
+ am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
3845
+ am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
55
3848
+ case $am_py_prefix in
56
3849
+ /usr|/System*) ;;