1 # generated automatically by aclocal 1.8.3 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 # Configure paths for GLIB
17 dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
18 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
19 dnl gthread is specified in MODULES, pass to glib-config
21 AC_DEFUN(AM_PATH_GLIB,
23 dnl Get the cflags and libraries from the glib-config script
25 AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
26 glib_config_prefix="$withval", glib_config_prefix="")
27 AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
28 glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
29 AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
30 , enable_glibtest=yes)
32 if test x$glib_config_exec_prefix != x ; then
33 glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
34 if test x${GLIB_CONFIG+set} != xset ; then
35 GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
38 if test x$glib_config_prefix != x ; then
39 glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
40 if test x${GLIB_CONFIG+set} != xset ; then
41 GLIB_CONFIG=$glib_config_prefix/bin/glib-config
49 glib_config_args="$glib_config_args gmodule"
52 glib_config_args="$glib_config_args gthread"
57 AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
58 min_glib_version=ifelse([$1], ,0.99.7,$1)
59 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
61 if test "$GLIB_CONFIG" = "no" ; then
64 GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
65 GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
66 glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
67 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
68 glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
69 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
70 glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
71 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
72 if test "x$enable_glibtest" = "xyes" ; then
73 ac_save_CFLAGS="$CFLAGS"
75 CFLAGS="$CFLAGS $GLIB_CFLAGS"
76 LIBS="$GLIB_LIBS $LIBS"
78 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
79 dnl checks the results of glib-config to some extent
90 int major, minor, micro;
93 system ("touch conf.glibtest");
95 /* HP/UX 9 (%@#!) writes to sscanf strings */
96 tmp_version = g_strdup("$min_glib_version");
97 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
98 printf("%s, bad version string\n", "$min_glib_version");
102 if ((glib_major_version != $glib_config_major_version) ||
103 (glib_minor_version != $glib_config_minor_version) ||
104 (glib_micro_version != $glib_config_micro_version))
106 printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
107 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
108 glib_major_version, glib_minor_version, glib_micro_version);
109 printf ("*** was found! If glib-config was correct, then it is best\n");
110 printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
111 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
112 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
113 printf("*** required on your system.\n");
114 printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
115 printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
116 printf("*** before re-running configure\n");
118 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
119 (glib_minor_version != GLIB_MINOR_VERSION) ||
120 (glib_micro_version != GLIB_MICRO_VERSION))
122 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
123 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
124 printf("*** library (version %d.%d.%d)\n",
125 glib_major_version, glib_minor_version, glib_micro_version);
129 if ((glib_major_version > major) ||
130 ((glib_major_version == major) && (glib_minor_version > minor)) ||
131 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
137 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
138 glib_major_version, glib_minor_version, glib_micro_version);
139 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
140 major, minor, micro);
141 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
143 printf("*** If you have already installed a sufficiently new version, this error\n");
144 printf("*** probably means that the wrong copy of the glib-config shell script is\n");
145 printf("*** being found. The easiest way to fix this is to remove the old version\n");
146 printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
147 printf("*** correct copy of glib-config. (In this case, you will have to\n");
148 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
149 printf("*** so that the correct libraries are found at run-time))\n");
154 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
155 CFLAGS="$ac_save_CFLAGS"
159 if test "x$no_glib" = x ; then
161 ifelse([$2], , :, [$2])
164 if test "$GLIB_CONFIG" = "no" ; then
165 echo "*** The glib-config script installed by GLIB could not be found"
166 echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
167 echo "*** your path, or set the GLIB_CONFIG environment variable to the"
168 echo "*** full path to glib-config."
170 if test -f conf.glibtest ; then
173 echo "*** Could not run GLIB test program, checking why..."
174 CFLAGS="$CFLAGS $GLIB_CFLAGS"
175 LIBS="$LIBS $GLIB_LIBS"
179 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
180 [ echo "*** The test program compiled, but did not run. This usually means"
181 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
182 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
183 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
184 echo "*** to the installed location Also, make sure you have run ldconfig if that"
185 echo "*** is required on your system"
187 echo "*** If you have an old version installed, it is best to remove it, although"
188 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
190 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
191 echo "*** came with the system with the command"
193 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
194 [ echo "*** The test program failed to compile or link. See the file config.log for the"
195 echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
196 echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
197 echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
198 CFLAGS="$ac_save_CFLAGS"
204 ifelse([$3], , :, [$3])
206 AC_SUBST(GLIB_CFLAGS)
212 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
213 # Generated from amversion.in; do not edit by hand.
215 # This program is free software; you can redistribute it and/or modify
216 # it under the terms of the GNU General Public License as published by
217 # the Free Software Foundation; either version 2, or (at your option)
220 # This program is distributed in the hope that it will be useful,
221 # but WITHOUT ANY WARRANTY; without even the implied warranty of
222 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
223 # GNU General Public License for more details.
225 # You should have received a copy of the GNU General Public License
226 # along with this program; if not, write to the Free Software
227 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
229 # AM_AUTOMAKE_VERSION(VERSION)
230 # ----------------------------
231 # Automake X.Y traces this macro to ensure aclocal.m4 has been
232 # generated from the m4 files accompanying Automake X.Y.
233 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
235 # AM_SET_CURRENT_AUTOMAKE_VERSION
236 # -------------------------------
237 # Call AM_AUTOMAKE_VERSION so it can be traced.
238 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
239 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
240 [AM_AUTOMAKE_VERSION([1.8.3])])
244 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
246 # This program is free software; you can redistribute it and/or modify
247 # it under the terms of the GNU General Public License as published by
248 # the Free Software Foundation; either version 2, or (at your option)
251 # This program is distributed in the hope that it will be useful,
252 # but WITHOUT ANY WARRANTY; without even the implied warranty of
253 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
254 # GNU General Public License for more details.
256 # You should have received a copy of the GNU General Public License
257 # along with this program; if not, write to the Free Software
258 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
261 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
262 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
263 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
265 # Of course, Automake must honor this variable whenever it calls a
266 # tool from the auxiliary directory. The problem is that $srcdir (and
267 # therefore $ac_aux_dir as well) can be either absolute or relative,
268 # depending on how configure is run. This is pretty annoying, since
269 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
270 # source directory, any form will work fine, but in subdirectories a
271 # relative path needs to be adjusted first.
273 # $ac_aux_dir/missing
274 # fails when called from a subdirectory if $ac_aux_dir is relative
275 # $top_srcdir/$ac_aux_dir/missing
276 # fails if $ac_aux_dir is absolute,
277 # fails when called from a subdirectory in a VPATH build with
278 # a relative $ac_aux_dir
280 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
281 # are both prefixed by $srcdir. In an in-source build this is usually
282 # harmless because $srcdir is `.', but things will broke when you
283 # start a VPATH build or use an absolute $srcdir.
285 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
286 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
287 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
288 # and then we would define $MISSING as
289 # MISSING="\${SHELL} $am_aux_dir/missing"
290 # This will work as long as MISSING is not called from configure, because
291 # unfortunately $(top_srcdir) has no meaning in configure.
292 # However there are other variables, like CC, which are often used in
293 # configure, and could therefore not use this "fixed" $ac_aux_dir.
295 # Another solution, used here, is to always expand $ac_aux_dir to an
296 # absolute PATH. The drawback is that using absolute paths prevent a
297 # configured tree to be moved without reconfiguration.
299 AC_DEFUN([AM_AUX_DIR_EXPAND],
300 [dnl Rely on autoconf to set up CDPATH properly.
302 # expand $ac_aux_dir to an absolute path
303 am_aux_dir=`cd $ac_aux_dir && pwd`
306 # AM_CONDITIONAL -*- Autoconf -*-
308 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
310 # This program is free software; you can redistribute it and/or modify
311 # it under the terms of the GNU General Public License as published by
312 # the Free Software Foundation; either version 2, or (at your option)
315 # This program is distributed in the hope that it will be useful,
316 # but WITHOUT ANY WARRANTY; without even the implied warranty of
317 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
318 # GNU General Public License for more details.
320 # You should have received a copy of the GNU General Public License
321 # along with this program; if not, write to the Free Software
322 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
327 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
328 # -------------------------------------
329 # Define a conditional.
330 AC_DEFUN([AM_CONDITIONAL],
332 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
333 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
343 AC_CONFIG_COMMANDS_PRE(
344 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
345 AC_MSG_ERROR([conditional "$1" was never defined.
346 Usually this means the macro was only invoked conditionally.])
349 # serial 7 -*- Autoconf -*-
351 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
352 # Free Software Foundation, Inc.
354 # This program is free software; you can redistribute it and/or modify
355 # it under the terms of the GNU General Public License as published by
356 # the Free Software Foundation; either version 2, or (at your option)
359 # This program is distributed in the hope that it will be useful,
360 # but WITHOUT ANY WARRANTY; without even the implied warranty of
361 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
362 # GNU General Public License for more details.
364 # You should have received a copy of the GNU General Public License
365 # along with this program; if not, write to the Free Software
366 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
370 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
371 # written in clear, in which case automake, when reading aclocal.m4,
372 # will think it sees a *use*, and therefore will trigger all it's
373 # C support machinery. Also note that it means that autoscan, seeing
374 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
378 # _AM_DEPENDENCIES(NAME)
379 # ----------------------
380 # See how the compiler implements dependency checking.
381 # NAME is "CC", "CXX", "GCJ", or "OBJC".
382 # We try a few techniques and use that to set a single cache variable.
384 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
385 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
386 # dependency, and given that the user is not expected to run this macro,
387 # just rely on AC_PROG_CC.
388 AC_DEFUN([_AM_DEPENDENCIES],
389 [AC_REQUIRE([AM_SET_DEPDIR])dnl
390 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
391 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
392 AC_REQUIRE([AM_DEP_TRACK])dnl
394 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
395 [$1], CXX, [depcc="$CXX" am_compiler_list=],
396 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
397 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
398 [depcc="$$1" am_compiler_list=])
400 AC_CACHE_CHECK([dependency style of $depcc],
401 [am_cv_$1_dependencies_compiler_type],
402 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
403 # We make a subdir and do the tests there. Otherwise we can end up
404 # making bogus files that we don't know about and never remove. For
405 # instance it was reported that on HP-UX the gcc test will end up
406 # making a dummy file named `D' -- because `-MD' means `put the output
409 # Copy depcomp to subdir because otherwise we won't find it if we're
410 # using a relative directory.
411 cp "$am_depcomp" conftest.dir
413 # We will build objects and dependencies in a subdirectory because
414 # it helps to detect inapplicable dependency modes. For instance
415 # both Tru64's cc and ICC support -MD to output dependencies as a
416 # side effect of compilation, but ICC will put the dependencies in
417 # the current directory while Tru64 will put them in the object
421 am_cv_$1_dependencies_compiler_type=none
422 if test "$am_compiler_list" = ""; then
423 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
425 for depmode in $am_compiler_list; do
426 # Setup a source with many dependencies, because some compilers
427 # like to wrap large dependency lists on column 80 (with \), and
428 # we should not choose a depcomp mode which is confused by this.
430 # We need to recreate these files for each test, as the compiler may
431 # overwrite some of them when testing with obscure command lines.
432 # This happens at least with the AIX C compiler.
434 for i in 1 2 3 4 5 6; do
435 echo '#include "conftst'$i'.h"' >> sub/conftest.c
436 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
437 # Solaris 8's {/usr,}/bin/sh.
438 touch sub/conftst$i.h
440 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
444 # after this tag, mechanisms are not by side-effect, so they'll
445 # only be used when explicitly requested
446 if test "x$enable_dependency_tracking" = xyes; then
454 # We check with `-c' and `-o' for the sake of the "dashmstdout"
455 # mode. It turns out that the SunPro C++ compiler does not properly
456 # handle `-M -o', and we need to detect this.
457 if depmode=$depmode \
458 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
459 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
460 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
461 >/dev/null 2>conftest.err &&
462 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
463 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
464 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
465 # icc doesn't choke on unknown options, it will just issue warnings
466 # (even with -Werror). So we grep stderr for any message
467 # that says an option was ignored.
468 if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
469 am_cv_$1_dependencies_compiler_type=$depmode
478 am_cv_$1_dependencies_compiler_type=none
481 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
482 AM_CONDITIONAL([am__fastdep$1], [
483 test "x$enable_dependency_tracking" != xno \
484 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
490 # Choose a directory name for dependency files.
491 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
492 AC_DEFUN([AM_SET_DEPDIR],
493 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
500 AC_DEFUN([AM_DEP_TRACK],
501 [AC_ARG_ENABLE(dependency-tracking,
502 [ --disable-dependency-tracking speeds up one-time build
503 --enable-dependency-tracking do not reject slow dependency extractors])
504 if test "x$enable_dependency_tracking" != xno; then
505 am_depcomp="$ac_aux_dir/depcomp"
508 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
509 AC_SUBST([AMDEPBACKSLASH])
512 # Generate code to set up dependency tracking. -*- Autoconf -*-
514 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
516 # This program is free software; you can redistribute it and/or modify
517 # it under the terms of the GNU General Public License as published by
518 # the Free Software Foundation; either version 2, or (at your option)
521 # This program is distributed in the hope that it will be useful,
522 # but WITHOUT ANY WARRANTY; without even the implied warranty of
523 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
524 # GNU General Public License for more details.
526 # You should have received a copy of the GNU General Public License
527 # along with this program; if not, write to the Free Software
528 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
533 # _AM_OUTPUT_DEPENDENCY_COMMANDS
534 # ------------------------------
535 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
536 [for mf in $CONFIG_FILES; do
537 # Strip MF so we end up with the name of the file.
538 mf=`echo "$mf" | sed -e 's/:.*$//'`
539 # Check whether this is an Automake generated Makefile or not.
540 # We used to match only the files named `Makefile.in', but
541 # some people rename them; so instead we look at the file content.
542 # Grep'ing the first line is not enough: some people post-process
543 # each Makefile.in and add a new line on top of each file to say so.
544 # So let's grep whole file.
545 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
546 dirpart=`AS_DIRNAME("$mf")`
550 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
551 # Extract the definition of DEP_FILES from the Makefile without
553 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
554 test -z "$DEPDIR" && continue
555 # When using ansi2knr, U may be empty or an underscore; expand it
556 U=`sed -n 's/^U = //p' < "$mf"`
557 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
558 # We invoke sed twice because it is the simplest approach to
559 # changing $(DEPDIR) to its actual value in the expansion.
560 for file in `sed -n '
561 /^DEP_FILES = .*\\\\$/ {
570 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
571 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
572 # Make sure the directory exists.
573 test -f "$dirpart/$file" && continue
574 fdir=`AS_DIRNAME(["$file"])`
575 AS_MKDIR_P([$dirpart/$fdir])
576 # echo "creating $dirpart/$file"
577 echo '# dummy' > "$dirpart/$file"
580 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
583 # AM_OUTPUT_DEPENDENCY_COMMANDS
584 # -----------------------------
585 # This macro should only be invoked once -- use via AC_REQUIRE.
587 # This code is only required when automatic dependency tracking
588 # is enabled. FIXME. This creates each `.P' file that we will
589 # need in order to bootstrap the dependency handling code.
590 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
591 [AC_CONFIG_COMMANDS([depfiles],
592 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
593 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
596 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
598 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
600 # This program is free software; you can redistribute it and/or modify
601 # it under the terms of the GNU General Public License as published by
602 # the Free Software Foundation; either version 2, or (at your option)
605 # This program is distributed in the hope that it will be useful,
606 # but WITHOUT ANY WARRANTY; without even the implied warranty of
607 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
608 # GNU General Public License for more details.
610 # You should have received a copy of the GNU General Public License
611 # along with this program; if not, write to the Free Software
612 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
617 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
618 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
620 # Do all the work for Automake. -*- Autoconf -*-
622 # This macro actually does too much some checks are only needed if
623 # your package does certain things. But this isn't really a big deal.
625 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
626 # Free Software Foundation, Inc.
628 # This program is free software; you can redistribute it and/or modify
629 # it under the terms of the GNU General Public License as published by
630 # the Free Software Foundation; either version 2, or (at your option)
633 # This program is distributed in the hope that it will be useful,
634 # but WITHOUT ANY WARRANTY; without even the implied warranty of
635 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
636 # GNU General Public License for more details.
638 # You should have received a copy of the GNU General Public License
639 # along with this program; if not, write to the Free Software
640 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
645 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
646 # AM_INIT_AUTOMAKE([OPTIONS])
647 # -----------------------------------------------
648 # The call with PACKAGE and VERSION arguments is the old style
649 # call (pre autoconf-2.50), which is being phased out. PACKAGE
650 # and VERSION should now be passed to AC_INIT and removed from
651 # the call to AM_INIT_AUTOMAKE.
652 # We support both call styles for the transition. After
653 # the next Automake release, Autoconf can make the AC_INIT
654 # arguments mandatory, and then we can depend on a new Autoconf
655 # release and drop the old call support.
656 AC_DEFUN([AM_INIT_AUTOMAKE],
657 [AC_PREREQ([2.58])dnl
658 dnl Autoconf wants to disallow AM_ names. We explicitly allow
659 dnl the ones we care about.
660 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
661 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
662 AC_REQUIRE([AC_PROG_INSTALL])dnl
663 # test to see if srcdir already configured
664 if test "`cd $srcdir && pwd`" != "`pwd`" &&
665 test -f $srcdir/config.status; then
666 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
669 # test whether we have cygpath
670 if test -z "$CYGPATH_W"; then
671 if (cygpath --version) >/dev/null 2>/dev/null; then
672 CYGPATH_W='cygpath -w'
677 AC_SUBST([CYGPATH_W])
679 # Define the identity of the package.
680 dnl Distinguish between old-style and new-style calls.
682 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
683 AC_SUBST([PACKAGE], [$1])dnl
684 AC_SUBST([VERSION], [$2])],
685 [_AM_SET_OPTIONS([$1])dnl
686 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
687 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
689 _AM_IF_OPTION([no-define],,
690 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
691 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
693 # Some tools Automake needs.
694 AC_REQUIRE([AM_SANITY_CHECK])dnl
695 AC_REQUIRE([AC_ARG_PROGRAM])dnl
696 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
697 AM_MISSING_PROG(AUTOCONF, autoconf)
698 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
699 AM_MISSING_PROG(AUTOHEADER, autoheader)
700 AM_MISSING_PROG(MAKEINFO, makeinfo)
701 AM_MISSING_PROG(AMTAR, tar)
703 AM_PROG_INSTALL_STRIP
704 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
705 # We need awk for the "check" target. The system "awk" is bad on
707 AC_REQUIRE([AC_PROG_AWK])dnl
708 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
709 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
711 _AM_IF_OPTION([no-dependencies],,
712 [AC_PROVIDE_IFELSE([AC_PROG_CC],
713 [_AM_DEPENDENCIES(CC)],
714 [define([AC_PROG_CC],
715 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
716 AC_PROVIDE_IFELSE([AC_PROG_CXX],
717 [_AM_DEPENDENCIES(CXX)],
718 [define([AC_PROG_CXX],
719 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
724 # When config.status generates a header, we must update the stamp-h file.
725 # This file resides in the same directory as the config header
726 # that is generated. The stamp files are numbered to have different names.
728 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
729 # loop where config.status creates the headers, so we can generate
730 # our stamp files there.
731 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
732 [# Compute $1's index in $config_headers.
734 for _am_header in $config_headers :; do
739 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
742 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
746 # Define $install_sh.
748 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
750 # This program is free software; you can redistribute it and/or modify
751 # it under the terms of the GNU General Public License as published by
752 # the Free Software Foundation; either version 2, or (at your option)
755 # This program is distributed in the hope that it will be useful,
756 # but WITHOUT ANY WARRANTY; without even the implied warranty of
757 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
758 # GNU General Public License for more details.
760 # You should have received a copy of the GNU General Public License
761 # along with this program; if not, write to the Free Software
762 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
765 AC_DEFUN([AM_PROG_INSTALL_SH],
766 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
767 install_sh=${install_sh-"$am_aux_dir/install-sh"}
768 AC_SUBST(install_sh)])
771 # Copyright (C) 2003 Free Software Foundation, Inc.
773 # This program is free software; you can redistribute it and/or modify
774 # it under the terms of the GNU General Public License as published by
775 # the Free Software Foundation; either version 2, or (at your option)
778 # This program is distributed in the hope that it will be useful,
779 # but WITHOUT ANY WARRANTY; without even the implied warranty of
780 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
781 # GNU General Public License for more details.
783 # You should have received a copy of the GNU General Public License
784 # along with this program; if not, write to the Free Software
785 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
790 # Check whether the underlying file-system supports filenames
791 # with a leading dot. For instance MS-DOS doesn't.
792 AC_DEFUN([AM_SET_LEADING_DOT],
793 [rm -rf .tst 2>/dev/null
794 mkdir .tst 2>/dev/null
795 if test -d .tst; then
800 rmdir .tst 2>/dev/null
801 AC_SUBST([am__leading_dot])])
803 # Add --enable-maintainer-mode option to configure.
806 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
807 # Free Software Foundation, Inc.
809 # This program is free software; you can redistribute it and/or modify
810 # it under the terms of the GNU General Public License as published by
811 # the Free Software Foundation; either version 2, or (at your option)
814 # This program is distributed in the hope that it will be useful,
815 # but WITHOUT ANY WARRANTY; without even the implied warranty of
816 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
817 # GNU General Public License for more details.
819 # You should have received a copy of the GNU General Public License
820 # along with this program; if not, write to the Free Software
821 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
826 AC_DEFUN([AM_MAINTAINER_MODE],
827 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
828 dnl maintainer-mode is disabled by default
829 AC_ARG_ENABLE(maintainer-mode,
830 [ --enable-maintainer-mode enable make rules and dependencies not useful
831 (and sometimes confusing) to the casual installer],
832 USE_MAINTAINER_MODE=$enableval,
833 USE_MAINTAINER_MODE=no)
834 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
835 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
836 MAINT=$MAINTAINER_MODE_TRUE
841 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
843 # Check to see how 'make' treats includes. -*- Autoconf -*-
845 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
847 # This program is free software; you can redistribute it and/or modify
848 # it under the terms of the GNU General Public License as published by
849 # the Free Software Foundation; either version 2, or (at your option)
852 # This program is distributed in the hope that it will be useful,
853 # but WITHOUT ANY WARRANTY; without even the implied warranty of
854 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
855 # GNU General Public License for more details.
857 # You should have received a copy of the GNU General Public License
858 # along with this program; if not, write to the Free Software
859 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
866 # Check to see how make treats includes.
867 AC_DEFUN([AM_MAKE_INCLUDE],
868 [am_make=${MAKE-make}
869 cat > confinc << 'END'
874 # If we don't find an include directive, just comment out the code.
875 AC_MSG_CHECKING([for style of include used by $am_make])
879 # First try GNU make style include.
880 echo "include confinc" > confmf
881 # We grep out `Entering directory' and `Leaving directory'
882 # messages which can occur if `w' ends up in MAKEFLAGS.
883 # In particular we don't look at `^make:' because GNU make might
884 # be invoked under some other name (usually "gmake"), in which
885 # case it prints its new name instead of `make'.
886 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
891 # Now try BSD make style include.
892 if test "$am__include" = "#"; then
893 echo '.include "confinc"' > confmf
894 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
900 AC_SUBST([am__include])
901 AC_SUBST([am__quote])
902 AC_MSG_RESULT([$_am_result])
909 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
911 # This program is free software; you can redistribute it and/or modify
912 # it under the terms of the GNU General Public License as published by
913 # the Free Software Foundation; either version 2, or (at your option)
916 # This program is distributed in the hope that it will be useful,
917 # but WITHOUT ANY WARRANTY; without even the implied warranty of
918 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
919 # GNU General Public License for more details.
921 # You should have received a copy of the GNU General Public License
922 # along with this program; if not, write to the Free Software
923 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
928 # AM_MISSING_PROG(NAME, PROGRAM)
929 # ------------------------------
930 AC_DEFUN([AM_MISSING_PROG],
931 [AC_REQUIRE([AM_MISSING_HAS_RUN])
932 $1=${$1-"${am_missing_run}$2"}
938 # Define MISSING if not defined so far and test if it supports --run.
939 # If it does, set am_missing_run to use it, otherwise, to nothing.
940 AC_DEFUN([AM_MISSING_HAS_RUN],
941 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
942 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
943 # Use eval to expand $SHELL
944 if eval "$MISSING --run true"; then
945 am_missing_run="$MISSING --run "
948 AC_MSG_WARN([`missing' script is too old or missing])
954 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
956 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
958 # This program is free software; you can redistribute it and/or modify
959 # it under the terms of the GNU General Public License as published by
960 # the Free Software Foundation; either version 2, or (at your option)
963 # This program is distributed in the hope that it will be useful,
964 # but WITHOUT ANY WARRANTY; without even the implied warranty of
965 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
966 # GNU General Public License for more details.
968 # You should have received a copy of the GNU General Public License
969 # along with this program; if not, write to the Free Software
970 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
973 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
974 # created by `make install' are always world readable, even if the
975 # installer happens to have an overly restrictive umask (e.g. 077).
976 # This was a mistake. There are at least two reasons why we must not
978 # - it causes special bits like SGID to be ignored,
979 # - it may be too restrictive (some setups expect 775 directories).
981 # Do not use -m 0755 and let people choose whatever they expect by
984 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
985 # Some implementations (such as Solaris 8's) are not thread-safe: if a
986 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
987 # concurrently, both version can detect that a/ is missing, but only
988 # one can create it and the other will error out. Consequently we
989 # restrict ourselves to GNU make (using the --version option ensures
991 AC_DEFUN([AM_PROG_MKDIR_P],
992 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
993 # Keeping the `.' argument allows $(mkdir_p) to be used without
994 # argument. Indeed, we sometimes output rules like
995 # $(mkdir_p) $(somedir)
996 # where $(somedir) is conditionally defined.
997 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
998 # expensive solution, as it forces Make to start a sub-shell.)
999 mkdir_p='mkdir -p -- .'
1001 # On NextStep and OpenStep, the `mkdir' command does not
1002 # recognize any option. It will interpret all options as
1003 # directories to create, and then abort because `.' already
1005 for d in ./-p ./--version;
1007 test -d $d && rmdir $d
1009 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1010 if test -f "$ac_aux_dir/mkinstalldirs"; then
1011 mkdir_p='$(mkinstalldirs)'
1013 mkdir_p='$(install_sh) -d'
1016 AC_SUBST([mkdir_p])])
1018 # Helper functions for option handling. -*- Autoconf -*-
1020 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1022 # This program is free software; you can redistribute it and/or modify
1023 # it under the terms of the GNU General Public License as published by
1024 # the Free Software Foundation; either version 2, or (at your option)
1025 # any later version.
1027 # This program is distributed in the hope that it will be useful,
1028 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1029 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1030 # GNU General Public License for more details.
1032 # You should have received a copy of the GNU General Public License
1033 # along with this program; if not, write to the Free Software
1034 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1039 # _AM_MANGLE_OPTION(NAME)
1040 # -----------------------
1041 AC_DEFUN([_AM_MANGLE_OPTION],
1042 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1044 # _AM_SET_OPTION(NAME)
1045 # ------------------------------
1046 # Set option NAME. Presently that only means defining a flag for this option.
1047 AC_DEFUN([_AM_SET_OPTION],
1048 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1050 # _AM_SET_OPTIONS(OPTIONS)
1051 # ----------------------------------
1052 # OPTIONS is a space-separated list of Automake options.
1053 AC_DEFUN([_AM_SET_OPTIONS],
1054 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1056 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1057 # -------------------------------------------
1058 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1059 AC_DEFUN([_AM_IF_OPTION],
1060 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1063 # Check to make sure that the build environment is sane.
1066 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
1068 # This program is free software; you can redistribute it and/or modify
1069 # it under the terms of the GNU General Public License as published by
1070 # the Free Software Foundation; either version 2, or (at your option)
1071 # any later version.
1073 # This program is distributed in the hope that it will be useful,
1074 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1075 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1076 # GNU General Public License for more details.
1078 # You should have received a copy of the GNU General Public License
1079 # along with this program; if not, write to the Free Software
1080 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1087 AC_DEFUN([AM_SANITY_CHECK],
1088 [AC_MSG_CHECKING([whether build environment is sane])
1091 echo timestamp > conftest.file
1092 # Do `set' in a subshell so we don't clobber the current shell's
1093 # arguments. Must try -L first in case configure is actually a
1094 # symlink; some systems play weird games with the mod time of symlinks
1095 # (eg FreeBSD returns the mod time of the symlink's containing
1098 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1099 if test "$[*]" = "X"; then
1101 set X `ls -t $srcdir/configure conftest.file`
1104 if test "$[*]" != "X $srcdir/configure conftest.file" \
1105 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1107 # If neither matched, then we have a broken ls. This can happen
1108 # if, for instance, CONFIG_SHELL is bash and it inherits a
1109 # broken ls alias from the environment. This has actually
1110 # happened. Such a system could not be considered "sane".
1111 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1112 alias in your environment])
1115 test "$[2]" = conftest.file
1121 AC_MSG_ERROR([newly created file is older than distributed files!
1122 Check your system clock])
1124 AC_MSG_RESULT(yes)])
1126 # AM_PROG_INSTALL_STRIP
1128 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
1130 # This program is free software; you can redistribute it and/or modify
1131 # it under the terms of the GNU General Public License as published by
1132 # the Free Software Foundation; either version 2, or (at your option)
1133 # any later version.
1135 # This program is distributed in the hope that it will be useful,
1136 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1137 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1138 # GNU General Public License for more details.
1140 # You should have received a copy of the GNU General Public License
1141 # along with this program; if not, write to the Free Software
1142 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1145 # One issue with vendor `install' (even GNU) is that you can't
1146 # specify the program used to strip binaries. This is especially
1147 # annoying in cross-compiling environments, where the build's strip
1148 # is unlikely to handle the host's binaries.
1149 # Fortunately install-sh will honor a STRIPPROG variable, so we
1150 # always use install-sh in `make install-strip', and initialize
1151 # STRIPPROG with the value of the STRIP variable (set by the user).
1152 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1153 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1154 # Installed binaries are usually stripped using `strip' when the user
1155 # run `make install-strip'. However `strip' might not be the right
1156 # tool to use in cross-compilation environments, therefore Automake
1157 # will honor the `STRIP' environment variable to overrule this program.
1158 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1159 if test "$cross_compiling" != no; then
1160 AC_CHECK_TOOL([STRIP], [strip], :)
1162 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1163 AC_SUBST([INSTALL_STRIP_PROGRAM])])