1 # generated automatically by aclocal 1.10 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006 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 m4_if(m4_PACKAGE_VERSION, [2.61],,
15 [m4_fatal([this file was generated for autoconf 2.61.
16 You have another version of autoconf. If you want to use that,
17 you should regenerate the build system entirely.], [63])])
19 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
20 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
22 # This file is free software, distributed under the terms of the GNU
23 # General Public License. As a special exception to the GNU General
24 # Public License, this file may be distributed as part of a program
25 # that contains a configuration script generated by Autoconf, under
26 # the same distribution terms as the rest of that program.
28 # This file can be copied and used freely without restrictions. It can
29 # be used in projects which are not available under the GNU Public License
30 # but which still want to provide support for the GNU gettext functionality.
32 # Macro to add for using GNU gettext.
33 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
35 # Modified to never use included libintl.
36 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
38 # Major rework to remove unused code
39 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
41 # Added better handling of ALL_LINGUAS from GNU gettext version
42 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
44 # Modified to require ngettext
45 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
47 # We need this here as well, since someone might use autoconf-2.5x
48 # to configure GLib then an older version to configure a package
49 # using AM_GLIB_GNU_GETTEXT
53 dnl We go to great lengths to make sure that aclocal won't
54 dnl try to pull in the installed version of these macros
55 dnl when running aclocal in the glib directory.
57 m4_copy([AC_DEFUN],[glib_DEFUN])
58 m4_copy([AC_REQUIRE],[glib_REQUIRE])
60 dnl At the end, if we're not within glib, we'll define the public
61 dnl definitions in terms of our private definitions.
66 glib_DEFUN([GLIB_LC_MESSAGES],
67 [AC_CHECK_HEADERS([locale.h])
68 if test $ac_cv_header_locale_h = yes; then
69 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
70 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
71 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
72 if test $am_cv_val_LC_MESSAGES = yes; then
73 AC_DEFINE(HAVE_LC_MESSAGES, 1,
74 [Define if your <locale.h> file defines LC_MESSAGES.])
78 # GLIB_PATH_PROG_WITH_TEST
79 #----------------------------
80 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
81 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
82 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
83 [# Extract the first word of "$2", so it can be a program name with args.
84 set dummy $2; ac_word=[$]2
85 AC_MSG_CHECKING([for $ac_word])
86 AC_CACHE_VAL(ac_cv_path_$1,
89 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
92 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
93 for ac_dir in ifelse([$5], , $PATH, [$5]); do
94 test -z "$ac_dir" && ac_dir=.
95 if test -f $ac_dir/$ac_word; then
97 ac_cv_path_$1="$ac_dir/$ac_word"
103 dnl If no 4th arg is given, leave the cache variable unset,
104 dnl so AC_PATH_PROGS will keep looking.
105 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
110 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
120 glib_DEFUN([GLIB_WITH_NLS],
121 dnl NLS is obligatory
122 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
126 gt_cv_have_gettext=no
132 AC_CHECK_HEADER(libintl.h,
133 [gt_cv_func_dgettext_libintl="no"
134 libintl_extra_libs=""
137 # First check in libc
139 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
143 [return !ngettext ("","", 1)],
144 gt_cv_func_ngettext_libc=yes,
145 gt_cv_func_ngettext_libc=no)
148 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
149 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
153 [return !dgettext ("","")],
154 gt_cv_func_dgettext_libc=yes,
155 gt_cv_func_dgettext_libc=no)
159 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
160 AC_CHECK_FUNCS(bind_textdomain_codeset)
164 # If we don't have everything we want, check in libintl
166 if test "$gt_cv_func_dgettext_libc" != "yes" \
167 || test "$gt_cv_func_ngettext_libc" != "yes" \
168 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
170 AC_CHECK_LIB(intl, bindtextdomain,
171 [AC_CHECK_LIB(intl, ngettext,
172 [AC_CHECK_LIB(intl, dgettext,
173 gt_cv_func_dgettext_libintl=yes)])])
175 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
176 AC_MSG_CHECKING([if -liconv is needed to use gettext])
178 AC_CHECK_LIB(intl, ngettext,
179 [AC_CHECK_LIB(intl, dcgettext,
180 [gt_cv_func_dgettext_libintl=yes
181 libintl_extra_libs=-liconv],
187 # If we found libintl, then check in it for bind_textdomain_codeset();
188 # we'll prefer libc if neither have bind_textdomain_codeset(),
189 # and both have dgettext and ngettext
191 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
192 glib_save_LIBS="$LIBS"
193 LIBS="$LIBS -lintl $libintl_extra_libs"
194 unset ac_cv_func_bind_textdomain_codeset
195 AC_CHECK_FUNCS(bind_textdomain_codeset)
196 LIBS="$glib_save_LIBS"
198 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
199 gt_cv_func_dgettext_libc=no
201 if test "$gt_cv_func_dgettext_libc" = "yes" \
202 && test "$gt_cv_func_ngettext_libc" = "yes"; then
203 gt_cv_func_dgettext_libintl=no
209 if test "$gt_cv_func_dgettext_libc" = "yes" \
210 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
211 gt_cv_have_gettext=yes
214 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
215 INTLLIBS="-lintl $libintl_extra_libs"
218 if test "$gt_cv_have_gettext" = "yes"; then
219 AC_DEFINE(HAVE_GETTEXT,1,
220 [Define if the GNU gettext() function is already present or preinstalled.])
221 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
222 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
223 if test "$MSGFMT" != "no"; then
224 glib_save_LIBS="$LIBS"
225 LIBS="$LIBS $INTLLIBS"
226 AC_CHECK_FUNCS(dcgettext)
228 AC_MSG_CHECKING([if msgfmt accepts -c])
229 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
232 "Content-Type: text/plain; charset=UTF-8\n"
233 "Project-Id-Version: test 1.0\n"
234 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
235 "Last-Translator: test <foo@bar.xx>\n"
236 "Language-Team: C <LL@li.org>\n"
237 "MIME-Version: 1.0\n"
238 "Content-Transfer-Encoding: 8bit\n"
239 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
240 AC_SUBST(MSGFMT_OPTS)
241 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
242 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
243 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
244 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
245 return _nl_msg_cat_cntr],
250 dnl On Solaris, if bind_textdomain_codeset is in libc,
251 dnl GNU format message catalog is always supported,
252 dnl since both are added to the libc all together.
253 dnl Hence, we'd like to go with DATADIRNAME=share and
254 dnl and CATOBJEXT=.gmo in this case.
255 AC_CHECK_FUNC(bind_textdomain_codeset,
266 LIBS="$glib_save_LIBS"
269 gt_cv_have_gettext=no
274 if test "$gt_cv_have_gettext" = "yes" ; then
275 AC_DEFINE(ENABLE_NLS, 1,
276 [always defined to indicate that i18n is enabled])
279 dnl Test whether we really found GNU xgettext.
280 if test "$XGETTEXT" != ":"; then
281 dnl If it is not GNU xgettext we define it as : so that the
282 dnl Makefiles still can work.
283 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
287 [found xgettext program is not GNU xgettext; ignore it])
292 # We need to process the po/ directory.
296 [case "$CONFIG_FILES" in *po/Makefile.in*)
297 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
300 dnl These rules are solely for the distribution goal. While doing this
301 dnl we only have to keep exactly one list of the available catalogs
303 for lang in $ALL_LINGUAS; do
304 GMOFILES="$GMOFILES $lang.gmo"
305 POFILES="$POFILES $lang.po"
308 dnl Make all variables we use known to autoconf.
311 AC_SUBST(DATADIRNAME)
315 AC_SUBST(PO_IN_DATADIR_TRUE)
316 AC_SUBST(PO_IN_DATADIR_FALSE)
321 # AM_GLIB_GNU_GETTEXT
322 # -------------------
323 # Do checks necessary for use of gettext. If a suitable implementation
324 # of gettext is found in either in libintl or in the C library,
325 # it will set INTLLIBS to the libraries needed for use of gettext
326 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
327 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
328 # on various variables needed by the Makefile.in.in installed by
331 glib_DEFUN([GLIB_GNU_GETTEXT],
332 [AC_REQUIRE([AC_PROG_CC])dnl
333 AC_REQUIRE([AC_HEADER_STDC])dnl
338 if test "$gt_cv_have_gettext" = "yes"; then
339 if test "x$ALL_LINGUAS" = "x"; then
342 AC_MSG_CHECKING(for catalogs to be installed)
344 for presentlang in $ALL_LINGUAS; do
346 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
347 desiredlanguages="$LINGUAS"
349 desiredlanguages="$ALL_LINGUAS"
351 for desiredlang in $desiredlanguages; do
352 # Use the presentlang catalog if desiredlang is
353 # a. equal to presentlang, or
354 # b. a variant of presentlang (because in this case,
355 # presentlang can be used as a fallback for messages
356 # which are not translated in the desiredlang catalog).
357 case "$desiredlang" in
358 "$presentlang"*) useit=yes;;
361 if test $useit = yes; then
362 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
366 AC_MSG_RESULT($LINGUAS)
369 dnl Construct list of names of catalog files to be constructed.
370 if test -n "$LINGUAS"; then
371 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
375 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
376 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
377 dnl Try to locate is.
379 if test -n "$ac_aux_dir"; then
380 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
382 if test -z "$MKINSTALLDIRS"; then
383 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
385 AC_SUBST(MKINSTALLDIRS)
387 dnl Generate list of files to be processed by xgettext which will
388 dnl be included in po/Makefile.
389 test -d po || mkdir po
390 if test "x$srcdir" != "x."; then
391 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
392 posrcprefix="$srcdir/"
394 posrcprefix="../$srcdir/"
400 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
401 < $srcdir/po/POTFILES.in > po/POTFILES
404 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
405 # -------------------------------
406 # Define VARIABLE to the location where catalog files will
407 # be installed by po/Makefile.
408 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
409 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
410 glib_save_prefix="$prefix"
411 glib_save_exec_prefix="$exec_prefix"
412 glib_save_datarootdir="$datarootdir"
413 test "x$prefix" = xNONE && prefix=$ac_default_prefix
414 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
415 datarootdir=`eval echo "${datarootdir}"`
416 if test "x$CATOBJEXT" = "x.mo" ; then
417 localedir=`eval echo "${libdir}/locale"`
419 localedir=`eval echo "${datadir}/locale"`
421 prefix="$glib_save_prefix"
422 exec_prefix="$glib_save_exec_prefix"
423 datarootdir="$glib_save_datarootdir"
424 AC_DEFINE_UNQUOTED($1, "$localedir",
425 [Define the location where the catalogs will be installed])
429 dnl Now the definitions that aclocal will find
431 ifdef(glib_configure_in,[],[
432 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
433 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
436 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
438 # Create a temporary file with TEST-FILE as its contents and pass the
439 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
440 # 0 and perform ACTION-IF-FAIL for any other exit status.
441 AC_DEFUN([GLIB_RUN_PROG],
442 [cat >conftest.foo <<_ACEOF
445 if AC_RUN_LOG([$1 conftest.foo]); then
446 m4_ifval([$3], [$3], [:])
447 m4_ifvaln([$4], [else $4])dnl
448 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
449 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
453 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
455 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
457 # This program is free software; you can redistribute it and/or modify
458 # it under the terms of the GNU General Public License as published by
459 # the Free Software Foundation; either version 2 of the License, or
460 # (at your option) any later version.
462 # This program is distributed in the hope that it will be useful, but
463 # WITHOUT ANY WARRANTY; without even the implied warranty of
464 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
465 # General Public License for more details.
467 # You should have received a copy of the GNU General Public License
468 # along with this program; if not, write to the Free Software
469 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
471 # As a special exception to the GNU General Public License, if you
472 # distribute this file as part of a program that contains a
473 # configuration script generated by Autoconf, you may include it under
474 # the same distribution terms that you use for the rest of that program.
476 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
477 # ----------------------------------
478 AC_DEFUN([PKG_PROG_PKG_CONFIG],
479 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
480 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
481 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
482 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
483 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
485 if test -n "$PKG_CONFIG"; then
486 _pkg_min_version=m4_default([$1], [0.9.0])
487 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
488 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
496 ])# PKG_PROG_PKG_CONFIG
498 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
500 # Check to see whether a particular set of modules exists. Similar
501 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
504 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
505 # this or PKG_CHECK_MODULES is called, or make sure to call
506 # PKG_CHECK_EXISTS manually
507 # --------------------------------------------------------------
508 AC_DEFUN([PKG_CHECK_EXISTS],
509 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
510 if test -n "$PKG_CONFIG" && \
511 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
512 m4_ifval([$2], [$2], [:])
513 m4_ifvaln([$3], [else
518 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
519 # ---------------------------------------------
520 m4_define([_PKG_CONFIG],
521 [if test -n "$PKG_CONFIG"; then
522 if test -n "$$1"; then
525 PKG_CHECK_EXISTS([$3],
526 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
534 # _PKG_SHORT_ERRORS_SUPPORTED
535 # -----------------------------
536 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
537 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
538 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
539 _pkg_short_errors_supported=yes
541 _pkg_short_errors_supported=no
543 ])# _PKG_SHORT_ERRORS_SUPPORTED
546 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
547 # [ACTION-IF-NOT-FOUND])
550 # Note that if there is a possibility the first call to
551 # PKG_CHECK_MODULES might not happen, you should be sure to include an
552 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
555 # --------------------------------------------------------------
556 AC_DEFUN([PKG_CHECK_MODULES],
557 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
558 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
559 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
562 AC_MSG_CHECKING([for $1])
564 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
565 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
567 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
568 and $1[]_LIBS to avoid the need to call pkg-config.
569 See the pkg-config man page for more details.])
571 if test $pkg_failed = yes; then
572 _PKG_SHORT_ERRORS_SUPPORTED
573 if test $_pkg_short_errors_supported = yes; then
574 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
576 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
578 # Put the nasty error message in config.log where it belongs
579 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
581 ifelse([$4], , [AC_MSG_ERROR(dnl
582 [Package requirements ($2) were not met:
586 Consider adjusting the PKG_CONFIG_PATH environment variable if you
587 installed software in a non-standard prefix.
593 elif test $pkg_failed = untried; then
594 ifelse([$4], , [AC_MSG_FAILURE(dnl
595 [The pkg-config script could not be found or is too old. Make sure it
596 is in your PATH or set the PKG_CONFIG environment variable to the full
601 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
604 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
605 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
607 ifelse([$3], , :, [$3])
609 ])# PKG_CHECK_MODULES
611 # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
613 # This file is free software; the Free Software Foundation
614 # gives unlimited permission to copy and/or distribute it,
615 # with or without modifications, as long as this notice is preserved.
617 # AM_AUTOMAKE_VERSION(VERSION)
618 # ----------------------------
619 # Automake X.Y traces this macro to ensure aclocal.m4 has been
620 # generated from the m4 files accompanying Automake X.Y.
621 # (This private macro should not be called outside this file.)
622 AC_DEFUN([AM_AUTOMAKE_VERSION],
623 [am__api_version='1.10'
624 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
625 dnl require some minimum version. Point them to the right macro.
626 m4_if([$1], [1.10], [],
627 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
630 # _AM_AUTOCONF_VERSION(VERSION)
631 # -----------------------------
632 # aclocal traces this macro to find the Autoconf version.
633 # This is a private macro too. Using m4_define simplifies
634 # the logic in aclocal, which can simply ignore this definition.
635 m4_define([_AM_AUTOCONF_VERSION], [])
637 # AM_SET_CURRENT_AUTOMAKE_VERSION
638 # -------------------------------
639 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
640 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
641 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
642 [AM_AUTOMAKE_VERSION([1.10])dnl
643 _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
645 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
647 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
649 # This file is free software; the Free Software Foundation
650 # gives unlimited permission to copy and/or distribute it,
651 # with or without modifications, as long as this notice is preserved.
653 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
654 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
655 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
657 # Of course, Automake must honor this variable whenever it calls a
658 # tool from the auxiliary directory. The problem is that $srcdir (and
659 # therefore $ac_aux_dir as well) can be either absolute or relative,
660 # depending on how configure is run. This is pretty annoying, since
661 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
662 # source directory, any form will work fine, but in subdirectories a
663 # relative path needs to be adjusted first.
665 # $ac_aux_dir/missing
666 # fails when called from a subdirectory if $ac_aux_dir is relative
667 # $top_srcdir/$ac_aux_dir/missing
668 # fails if $ac_aux_dir is absolute,
669 # fails when called from a subdirectory in a VPATH build with
670 # a relative $ac_aux_dir
672 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
673 # are both prefixed by $srcdir. In an in-source build this is usually
674 # harmless because $srcdir is `.', but things will broke when you
675 # start a VPATH build or use an absolute $srcdir.
677 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
678 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
679 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
680 # and then we would define $MISSING as
681 # MISSING="\${SHELL} $am_aux_dir/missing"
682 # This will work as long as MISSING is not called from configure, because
683 # unfortunately $(top_srcdir) has no meaning in configure.
684 # However there are other variables, like CC, which are often used in
685 # configure, and could therefore not use this "fixed" $ac_aux_dir.
687 # Another solution, used here, is to always expand $ac_aux_dir to an
688 # absolute PATH. The drawback is that using absolute paths prevent a
689 # configured tree to be moved without reconfiguration.
691 AC_DEFUN([AM_AUX_DIR_EXPAND],
692 [dnl Rely on autoconf to set up CDPATH properly.
694 # expand $ac_aux_dir to an absolute path
695 am_aux_dir=`cd $ac_aux_dir && pwd`
699 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
700 # Free Software Foundation, Inc.
702 # This file is free software; the Free Software Foundation
703 # gives unlimited permission to copy and/or distribute it,
704 # with or without modifications, as long as this notice is preserved.
708 # This was merged into AC_PROG_CC in Autoconf.
710 AU_DEFUN([AM_PROG_CC_STDC],
712 AC_DIAGNOSE([obsolete], [$0:
713 your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
714 `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
715 you adjust the code. You can also remove the above call to
716 AC_PROG_CC if you already called it elsewhere.])
717 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
719 AU_DEFUN([fp_PROG_CC_STDC])
721 # AM_CONDITIONAL -*- Autoconf -*-
723 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
724 # Free Software Foundation, Inc.
726 # This file is free software; the Free Software Foundation
727 # gives unlimited permission to copy and/or distribute it,
728 # with or without modifications, as long as this notice is preserved.
732 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
733 # -------------------------------------
734 # Define a conditional.
735 AC_DEFUN([AM_CONDITIONAL],
737 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
738 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
739 AC_SUBST([$1_TRUE])dnl
740 AC_SUBST([$1_FALSE])dnl
741 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
742 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
750 AC_CONFIG_COMMANDS_PRE(
751 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
752 AC_MSG_ERROR([[conditional "$1" was never defined.
753 Usually this means the macro was only invoked conditionally.]])
756 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
757 # Free Software Foundation, Inc.
759 # This file is free software; the Free Software Foundation
760 # gives unlimited permission to copy and/or distribute it,
761 # with or without modifications, as long as this notice is preserved.
765 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
766 # written in clear, in which case automake, when reading aclocal.m4,
767 # will think it sees a *use*, and therefore will trigger all it's
768 # C support machinery. Also note that it means that autoscan, seeing
769 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
772 # _AM_DEPENDENCIES(NAME)
773 # ----------------------
774 # See how the compiler implements dependency checking.
775 # NAME is "CC", "CXX", "GCJ", or "OBJC".
776 # We try a few techniques and use that to set a single cache variable.
778 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
779 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
780 # dependency, and given that the user is not expected to run this macro,
781 # just rely on AC_PROG_CC.
782 AC_DEFUN([_AM_DEPENDENCIES],
783 [AC_REQUIRE([AM_SET_DEPDIR])dnl
784 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
785 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
786 AC_REQUIRE([AM_DEP_TRACK])dnl
788 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
789 [$1], CXX, [depcc="$CXX" am_compiler_list=],
790 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
791 [$1], UPC, [depcc="$UPC" am_compiler_list=],
792 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
793 [depcc="$$1" am_compiler_list=])
795 AC_CACHE_CHECK([dependency style of $depcc],
796 [am_cv_$1_dependencies_compiler_type],
797 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
798 # We make a subdir and do the tests there. Otherwise we can end up
799 # making bogus files that we don't know about and never remove. For
800 # instance it was reported that on HP-UX the gcc test will end up
801 # making a dummy file named `D' -- because `-MD' means `put the output
804 # Copy depcomp to subdir because otherwise we won't find it if we're
805 # using a relative directory.
806 cp "$am_depcomp" conftest.dir
808 # We will build objects and dependencies in a subdirectory because
809 # it helps to detect inapplicable dependency modes. For instance
810 # both Tru64's cc and ICC support -MD to output dependencies as a
811 # side effect of compilation, but ICC will put the dependencies in
812 # the current directory while Tru64 will put them in the object
816 am_cv_$1_dependencies_compiler_type=none
817 if test "$am_compiler_list" = ""; then
818 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
820 for depmode in $am_compiler_list; do
821 # Setup a source with many dependencies, because some compilers
822 # like to wrap large dependency lists on column 80 (with \), and
823 # we should not choose a depcomp mode which is confused by this.
825 # We need to recreate these files for each test, as the compiler may
826 # overwrite some of them when testing with obscure command lines.
827 # This happens at least with the AIX C compiler.
829 for i in 1 2 3 4 5 6; do
830 echo '#include "conftst'$i'.h"' >> sub/conftest.c
831 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
832 # Solaris 8's {/usr,}/bin/sh.
833 touch sub/conftst$i.h
835 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
839 # after this tag, mechanisms are not by side-effect, so they'll
840 # only be used when explicitly requested
841 if test "x$enable_dependency_tracking" = xyes; then
849 # We check with `-c' and `-o' for the sake of the "dashmstdout"
850 # mode. It turns out that the SunPro C++ compiler does not properly
851 # handle `-M -o', and we need to detect this.
852 if depmode=$depmode \
853 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
854 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
855 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
856 >/dev/null 2>conftest.err &&
857 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
858 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
859 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
860 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
861 # icc doesn't choke on unknown options, it will just issue warnings
862 # or remarks (even with -Werror). So we grep stderr for any message
863 # that says an option was ignored or not supported.
864 # When given -MP, icc 7.0 and 7.1 complain thusly:
865 # icc: Command line warning: ignoring option '-M'; no argument required
866 # The diagnosis changed in icc 8.0:
867 # icc: Command line remark: option '-MP' not supported
868 if (grep 'ignoring option' conftest.err ||
869 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
870 am_cv_$1_dependencies_compiler_type=$depmode
879 am_cv_$1_dependencies_compiler_type=none
882 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
883 AM_CONDITIONAL([am__fastdep$1], [
884 test "x$enable_dependency_tracking" != xno \
885 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
891 # Choose a directory name for dependency files.
892 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
893 AC_DEFUN([AM_SET_DEPDIR],
894 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
895 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
901 AC_DEFUN([AM_DEP_TRACK],
902 [AC_ARG_ENABLE(dependency-tracking,
903 [ --disable-dependency-tracking speeds up one-time build
904 --enable-dependency-tracking do not reject slow dependency extractors])
905 if test "x$enable_dependency_tracking" != xno; then
906 am_depcomp="$ac_aux_dir/depcomp"
909 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
910 AC_SUBST([AMDEPBACKSLASH])dnl
911 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
914 # Generate code to set up dependency tracking. -*- Autoconf -*-
916 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
917 # Free Software Foundation, Inc.
919 # This file is free software; the Free Software Foundation
920 # gives unlimited permission to copy and/or distribute it,
921 # with or without modifications, as long as this notice is preserved.
925 # _AM_OUTPUT_DEPENDENCY_COMMANDS
926 # ------------------------------
927 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
928 [for mf in $CONFIG_FILES; do
929 # Strip MF so we end up with the name of the file.
930 mf=`echo "$mf" | sed -e 's/:.*$//'`
931 # Check whether this is an Automake generated Makefile or not.
932 # We used to match only the files named `Makefile.in', but
933 # some people rename them; so instead we look at the file content.
934 # Grep'ing the first line is not enough: some people post-process
935 # each Makefile.in and add a new line on top of each file to say so.
936 # Grep'ing the whole file is not good either: AIX grep has a line
937 # limit of 2048, but all sed's we know have understand at least 4000.
938 if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
939 dirpart=`AS_DIRNAME("$mf")`
943 # Extract the definition of DEPDIR, am__include, and am__quote
944 # from the Makefile without running `make'.
945 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
946 test -z "$DEPDIR" && continue
947 am__include=`sed -n 's/^am__include = //p' < "$mf"`
948 test -z "am__include" && continue
949 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
950 # When using ansi2knr, U may be empty or an underscore; expand it
951 U=`sed -n 's/^U = //p' < "$mf"`
952 # Find all dependency output files, they are included files with
953 # $(DEPDIR) in their names. We invoke sed twice because it is the
954 # simplest approach to changing $(DEPDIR) to its actual value in the
956 for file in `sed -n "
957 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
958 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
959 # Make sure the directory exists.
960 test -f "$dirpart/$file" && continue
961 fdir=`AS_DIRNAME(["$file"])`
962 AS_MKDIR_P([$dirpart/$fdir])
963 # echo "creating $dirpart/$file"
964 echo '# dummy' > "$dirpart/$file"
967 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
970 # AM_OUTPUT_DEPENDENCY_COMMANDS
971 # -----------------------------
972 # This macro should only be invoked once -- use via AC_REQUIRE.
974 # This code is only required when automatic dependency tracking
975 # is enabled. FIXME. This creates each `.P' file that we will
976 # need in order to bootstrap the dependency handling code.
977 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
978 [AC_CONFIG_COMMANDS([depfiles],
979 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
980 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
983 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
984 # Free Software Foundation, Inc.
986 # This file is free software; the Free Software Foundation
987 # gives unlimited permission to copy and/or distribute it,
988 # with or without modifications, as long as this notice is preserved.
992 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
993 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
995 # Do all the work for Automake. -*- Autoconf -*-
997 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
998 # 2005, 2006 Free Software Foundation, Inc.
1000 # This file is free software; the Free Software Foundation
1001 # gives unlimited permission to copy and/or distribute it,
1002 # with or without modifications, as long as this notice is preserved.
1006 # This macro actually does too much. Some checks are only needed if
1007 # your package does certain things. But this isn't really a big deal.
1009 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1010 # AM_INIT_AUTOMAKE([OPTIONS])
1011 # -----------------------------------------------
1012 # The call with PACKAGE and VERSION arguments is the old style
1013 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1014 # and VERSION should now be passed to AC_INIT and removed from
1015 # the call to AM_INIT_AUTOMAKE.
1016 # We support both call styles for the transition. After
1017 # the next Automake release, Autoconf can make the AC_INIT
1018 # arguments mandatory, and then we can depend on a new Autoconf
1019 # release and drop the old call support.
1020 AC_DEFUN([AM_INIT_AUTOMAKE],
1021 [AC_PREREQ([2.60])dnl
1022 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1023 dnl the ones we care about.
1024 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1025 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1026 AC_REQUIRE([AC_PROG_INSTALL])dnl
1027 if test "`cd $srcdir && pwd`" != "`pwd`"; then
1028 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1029 # is not polluted with repeated "-I."
1030 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1031 # test to see if srcdir already configured
1032 if test -f $srcdir/config.status; then
1033 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1037 # test whether we have cygpath
1038 if test -z "$CYGPATH_W"; then
1039 if (cygpath --version) >/dev/null 2>/dev/null; then
1040 CYGPATH_W='cygpath -w'
1045 AC_SUBST([CYGPATH_W])
1047 # Define the identity of the package.
1048 dnl Distinguish between old-style and new-style calls.
1050 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1051 AC_SUBST([PACKAGE], [$1])dnl
1052 AC_SUBST([VERSION], [$2])],
1053 [_AM_SET_OPTIONS([$1])dnl
1054 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1055 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1056 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1057 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1058 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1060 _AM_IF_OPTION([no-define],,
1061 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1062 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1064 # Some tools Automake needs.
1065 AC_REQUIRE([AM_SANITY_CHECK])dnl
1066 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1067 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1068 AM_MISSING_PROG(AUTOCONF, autoconf)
1069 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1070 AM_MISSING_PROG(AUTOHEADER, autoheader)
1071 AM_MISSING_PROG(MAKEINFO, makeinfo)
1073 AM_PROG_INSTALL_STRIP
1074 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1075 # We need awk for the "check" target. The system "awk" is bad on
1077 AC_REQUIRE([AC_PROG_AWK])dnl
1078 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1079 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1080 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1081 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1082 [_AM_PROG_TAR([v7])])])
1083 _AM_IF_OPTION([no-dependencies],,
1084 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1085 [_AM_DEPENDENCIES(CC)],
1086 [define([AC_PROG_CC],
1087 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1088 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1089 [_AM_DEPENDENCIES(CXX)],
1090 [define([AC_PROG_CXX],
1091 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1092 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1093 [_AM_DEPENDENCIES(OBJC)],
1094 [define([AC_PROG_OBJC],
1095 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1100 # When config.status generates a header, we must update the stamp-h file.
1101 # This file resides in the same directory as the config header
1102 # that is generated. The stamp files are numbered to have different names.
1104 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1105 # loop where config.status creates the headers, so we can generate
1106 # our stamp files there.
1107 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1108 [# Compute $1's index in $config_headers.
1110 for _am_header in $config_headers :; do
1115 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1118 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1120 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1122 # This file is free software; the Free Software Foundation
1123 # gives unlimited permission to copy and/or distribute it,
1124 # with or without modifications, as long as this notice is preserved.
1126 # AM_PROG_INSTALL_SH
1127 # ------------------
1128 # Define $install_sh.
1129 AC_DEFUN([AM_PROG_INSTALL_SH],
1130 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1131 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
1132 AC_SUBST(install_sh)])
1134 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1136 # This file is free software; the Free Software Foundation
1137 # gives unlimited permission to copy and/or distribute it,
1138 # with or without modifications, as long as this notice is preserved.
1142 # Check whether the underlying file-system supports filenames
1143 # with a leading dot. For instance MS-DOS doesn't.
1144 AC_DEFUN([AM_SET_LEADING_DOT],
1145 [rm -rf .tst 2>/dev/null
1146 mkdir .tst 2>/dev/null
1147 if test -d .tst; then
1152 rmdir .tst 2>/dev/null
1153 AC_SUBST([am__leading_dot])])
1155 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1158 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
1159 # Free Software Foundation, Inc.
1161 # This file is free software; the Free Software Foundation
1162 # gives unlimited permission to copy and/or distribute it,
1163 # with or without modifications, as long as this notice is preserved.
1167 AC_DEFUN([AM_MAINTAINER_MODE],
1168 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1169 dnl maintainer-mode is disabled by default
1170 AC_ARG_ENABLE(maintainer-mode,
1171 [ --enable-maintainer-mode enable make rules and dependencies not useful
1172 (and sometimes confusing) to the casual installer],
1173 USE_MAINTAINER_MODE=$enableval,
1174 USE_MAINTAINER_MODE=no)
1175 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1176 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1177 MAINT=$MAINTAINER_MODE_TRUE
1182 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1184 # Check to see how 'make' treats includes. -*- Autoconf -*-
1186 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1188 # This file is free software; the Free Software Foundation
1189 # gives unlimited permission to copy and/or distribute it,
1190 # with or without modifications, as long as this notice is preserved.
1196 # Check to see how make treats includes.
1197 AC_DEFUN([AM_MAKE_INCLUDE],
1198 [am_make=${MAKE-make}
1199 cat > confinc << 'END'
1204 # If we don't find an include directive, just comment out the code.
1205 AC_MSG_CHECKING([for style of include used by $am_make])
1209 # First try GNU make style include.
1210 echo "include confinc" > confmf
1211 # We grep out `Entering directory' and `Leaving directory'
1212 # messages which can occur if `w' ends up in MAKEFLAGS.
1213 # In particular we don't look at `^make:' because GNU make might
1214 # be invoked under some other name (usually "gmake"), in which
1215 # case it prints its new name instead of `make'.
1216 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1221 # Now try BSD make style include.
1222 if test "$am__include" = "#"; then
1223 echo '.include "confinc"' > confmf
1224 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1225 am__include=.include
1230 AC_SUBST([am__include])
1231 AC_SUBST([am__quote])
1232 AC_MSG_RESULT([$_am_result])
1233 rm -f confinc confmf
1236 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1238 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
1239 # Free Software Foundation, Inc.
1241 # This file is free software; the Free Software Foundation
1242 # gives unlimited permission to copy and/or distribute it,
1243 # with or without modifications, as long as this notice is preserved.
1247 # AM_MISSING_PROG(NAME, PROGRAM)
1248 # ------------------------------
1249 AC_DEFUN([AM_MISSING_PROG],
1250 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1251 $1=${$1-"${am_missing_run}$2"}
1255 # AM_MISSING_HAS_RUN
1256 # ------------------
1257 # Define MISSING if not defined so far and test if it supports --run.
1258 # If it does, set am_missing_run to use it, otherwise, to nothing.
1259 AC_DEFUN([AM_MISSING_HAS_RUN],
1260 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1261 AC_REQUIRE_AUX_FILE([missing])dnl
1262 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1263 # Use eval to expand $SHELL
1264 if eval "$MISSING --run true"; then
1265 am_missing_run="$MISSING --run "
1268 AC_MSG_WARN([`missing' script is too old or missing])
1272 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1274 # This file is free software; the Free Software Foundation
1275 # gives unlimited permission to copy and/or distribute it,
1276 # with or without modifications, as long as this notice is preserved.
1280 # Check for `mkdir -p'.
1281 AC_DEFUN([AM_PROG_MKDIR_P],
1282 [AC_PREREQ([2.60])dnl
1283 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1284 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1285 dnl while keeping a definition of mkdir_p for backward compatibility.
1286 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1287 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1288 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1289 dnl adjustment using top_builddir (which is defined more often than
1291 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1293 [[\\/$]]* | ?:[[\\/]]*) ;;
1294 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1298 # Helper functions for option handling. -*- Autoconf -*-
1300 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1302 # This file is free software; the Free Software Foundation
1303 # gives unlimited permission to copy and/or distribute it,
1304 # with or without modifications, as long as this notice is preserved.
1308 # _AM_MANGLE_OPTION(NAME)
1309 # -----------------------
1310 AC_DEFUN([_AM_MANGLE_OPTION],
1311 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1313 # _AM_SET_OPTION(NAME)
1314 # ------------------------------
1315 # Set option NAME. Presently that only means defining a flag for this option.
1316 AC_DEFUN([_AM_SET_OPTION],
1317 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1319 # _AM_SET_OPTIONS(OPTIONS)
1320 # ----------------------------------
1321 # OPTIONS is a space-separated list of Automake options.
1322 AC_DEFUN([_AM_SET_OPTIONS],
1323 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1325 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1326 # -------------------------------------------
1327 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1328 AC_DEFUN([_AM_IF_OPTION],
1329 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1331 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1333 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1334 # Free Software Foundation, Inc.
1336 # This file is free software; the Free Software Foundation
1337 # gives unlimited permission to copy and/or distribute it,
1338 # with or without modifications, as long as this notice is preserved.
1344 AC_DEFUN([AM_SANITY_CHECK],
1345 [AC_MSG_CHECKING([whether build environment is sane])
1348 echo timestamp > conftest.file
1349 # Do `set' in a subshell so we don't clobber the current shell's
1350 # arguments. Must try -L first in case configure is actually a
1351 # symlink; some systems play weird games with the mod time of symlinks
1352 # (eg FreeBSD returns the mod time of the symlink's containing
1355 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1356 if test "$[*]" = "X"; then
1358 set X `ls -t $srcdir/configure conftest.file`
1361 if test "$[*]" != "X $srcdir/configure conftest.file" \
1362 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1364 # If neither matched, then we have a broken ls. This can happen
1365 # if, for instance, CONFIG_SHELL is bash and it inherits a
1366 # broken ls alias from the environment. This has actually
1367 # happened. Such a system could not be considered "sane".
1368 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1369 alias in your environment])
1372 test "$[2]" = conftest.file
1378 AC_MSG_ERROR([newly created file is older than distributed files!
1379 Check your system clock])
1381 AC_MSG_RESULT(yes)])
1383 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1385 # This file is free software; the Free Software Foundation
1386 # gives unlimited permission to copy and/or distribute it,
1387 # with or without modifications, as long as this notice is preserved.
1389 # AM_PROG_INSTALL_STRIP
1390 # ---------------------
1391 # One issue with vendor `install' (even GNU) is that you can't
1392 # specify the program used to strip binaries. This is especially
1393 # annoying in cross-compiling environments, where the build's strip
1394 # is unlikely to handle the host's binaries.
1395 # Fortunately install-sh will honor a STRIPPROG variable, so we
1396 # always use install-sh in `make install-strip', and initialize
1397 # STRIPPROG with the value of the STRIP variable (set by the user).
1398 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1399 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1400 # Installed binaries are usually stripped using `strip' when the user
1401 # run `make install-strip'. However `strip' might not be the right
1402 # tool to use in cross-compilation environments, therefore Automake
1403 # will honor the `STRIP' environment variable to overrule this program.
1404 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1405 if test "$cross_compiling" != no; then
1406 AC_CHECK_TOOL([STRIP], [strip], :)
1408 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1409 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1411 # Copyright (C) 2006 Free Software Foundation, Inc.
1413 # This file is free software; the Free Software Foundation
1414 # gives unlimited permission to copy and/or distribute it,
1415 # with or without modifications, as long as this notice is preserved.
1417 # _AM_SUBST_NOTMAKE(VARIABLE)
1418 # ---------------------------
1419 # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
1420 # This macro is traced by Automake.
1421 AC_DEFUN([_AM_SUBST_NOTMAKE])
1423 # Check how to create a tarball. -*- Autoconf -*-
1425 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1427 # This file is free software; the Free Software Foundation
1428 # gives unlimited permission to copy and/or distribute it,
1429 # with or without modifications, as long as this notice is preserved.
1433 # _AM_PROG_TAR(FORMAT)
1434 # --------------------
1435 # Check how to create a tarball in format FORMAT.
1436 # FORMAT should be one of `v7', `ustar', or `pax'.
1438 # Substitute a variable $(am__tar) that is a command
1439 # writing to stdout a FORMAT-tarball containing the directory
1441 # tardir=directory && $(am__tar) > result.tar
1443 # Substitute a variable $(am__untar) that extract such
1444 # a tarball read from stdin.
1445 # $(am__untar) < result.tar
1446 AC_DEFUN([_AM_PROG_TAR],
1447 [# Always define AMTAR for backward compatibility.
1448 AM_MISSING_PROG([AMTAR], [tar])
1450 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1451 [m4_case([$1], [ustar],, [pax],,
1452 [m4_fatal([Unknown tar format])])
1453 AC_MSG_CHECKING([how to create a $1 tar archive])
1454 # Loop over all known methods to create a tar archive until one works.
1455 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1456 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1457 # Do not fold the above two line into one, because Tru64 sh and
1458 # Solaris sh will not grok spaces in the rhs of `-'.
1459 for _am_tool in $_am_tools
1463 for _am_tar in tar gnutar gtar;
1465 AM_RUN_LOG([$_am_tar --version]) && break
1467 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1468 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1469 am__untar="$_am_tar -xf -"
1472 # Must skip GNU tar: if it does not support --format= it doesn't create
1473 # ustar tarball either.
1474 (tar --version) >/dev/null 2>&1 && continue
1475 am__tar='tar chf - "$$tardir"'
1476 am__tar_='tar chf - "$tardir"'
1477 am__untar='tar xf -'
1480 am__tar='pax -L -x $1 -w "$$tardir"'
1481 am__tar_='pax -L -x $1 -w "$tardir"'
1485 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1486 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1487 am__untar='cpio -i -H $1 -d'
1496 # If the value was cached, stop now. We just wanted to have am__tar
1497 # and am__untar set.
1498 test -n "${am_cv_prog_tar_$1}" && break
1500 # tar/untar a dummy directory, and stop if the command works
1503 echo GrepMe > conftest.dir/file
1504 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1506 if test -s conftest.tar; then
1507 AM_RUN_LOG([$am__untar <conftest.tar])
1508 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1513 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1514 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1516 AC_SUBST([am__untar])