1 # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18 [m4_warning([this file was generated for autoconf 2.68.
19 You have another version of autoconf. It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
23 # intlmacosx.m4 serial 3 (gettext-0.18)
24 dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
25 dnl This file is free software; the Free Software Foundation
26 dnl gives unlimited permission to copy and/or distribute it,
27 dnl with or without modifications, as long as this notice is preserved.
29 dnl This file can can be used in projects which are not available under
30 dnl the GNU General Public License or the GNU Library General Public
31 dnl License but which still want to provide support for the GNU gettext
33 dnl Please note that the actual code of the GNU gettext library is covered
34 dnl by the GNU Library General Public License, and the rest of the GNU
35 dnl gettext package package is covered by the GNU General Public License.
36 dnl They are *not* in the public domain.
38 dnl Checks for special options needed on MacOS X.
39 dnl Defines INTL_MACOSX_LIBS.
40 AC_DEFUN([gt_INTL_MACOSX],
42 dnl Check for API introduced in MacOS X 10.2.
43 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
44 [gt_cv_func_CFPreferencesCopyAppValue],
46 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
47 AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
48 [CFPreferencesCopyAppValue(NULL, NULL)],
49 [gt_cv_func_CFPreferencesCopyAppValue=yes],
50 [gt_cv_func_CFPreferencesCopyAppValue=no])
51 LIBS="$gt_save_LIBS"])
52 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
53 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
54 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
56 dnl Check for API introduced in MacOS X 10.3.
57 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
59 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
60 AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
61 [gt_cv_func_CFLocaleCopyCurrent=yes],
62 [gt_cv_func_CFLocaleCopyCurrent=no])
63 LIBS="$gt_save_LIBS"])
64 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
65 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
66 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
69 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
70 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
72 AC_SUBST([INTL_MACOSX_LIBS])
75 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
76 # serial 1 (pkg-config-0.24)
78 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
80 # This program is free software; you can redistribute it and/or modify
81 # it under the terms of the GNU General Public License as published by
82 # the Free Software Foundation; either version 2 of the License, or
83 # (at your option) any later version.
85 # This program is distributed in the hope that it will be useful, but
86 # WITHOUT ANY WARRANTY; without even the implied warranty of
87 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
88 # General Public License for more details.
90 # You should have received a copy of the GNU General Public License
91 # along with this program; if not, write to the Free Software
92 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
94 # As a special exception to the GNU General Public License, if you
95 # distribute this file as part of a program that contains a
96 # configuration script generated by Autoconf, you may include it under
97 # the same distribution terms that you use for the rest of that program.
99 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
100 # ----------------------------------
101 AC_DEFUN([PKG_PROG_PKG_CONFIG],
102 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
103 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
104 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
105 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
106 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
107 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
109 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
110 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
112 if test -n "$PKG_CONFIG"; then
113 _pkg_min_version=m4_default([$1], [0.9.0])
114 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
115 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
122 ])# PKG_PROG_PKG_CONFIG
124 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
126 # Check to see whether a particular set of modules exists. Similar
127 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
129 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
130 # only at the first occurence in configure.ac, so if the first place
131 # it's called might be skipped (such as if it is within an "if", you
132 # have to call PKG_CHECK_EXISTS manually
133 # --------------------------------------------------------------
134 AC_DEFUN([PKG_CHECK_EXISTS],
135 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
136 if test -n "$PKG_CONFIG" && \
137 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
138 m4_default([$2], [:])
139 m4_ifvaln([$3], [else
143 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
144 # ---------------------------------------------
145 m4_define([_PKG_CONFIG],
146 [if test -n "$$1"; then
148 elif test -n "$PKG_CONFIG"; then
149 PKG_CHECK_EXISTS([$3],
150 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
151 test "x$?" != "x0" && pkg_failed=yes ],
158 # _PKG_SHORT_ERRORS_SUPPORTED
159 # -----------------------------
160 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
161 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
162 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
163 _pkg_short_errors_supported=yes
165 _pkg_short_errors_supported=no
167 ])# _PKG_SHORT_ERRORS_SUPPORTED
170 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
171 # [ACTION-IF-NOT-FOUND])
174 # Note that if there is a possibility the first call to
175 # PKG_CHECK_MODULES might not happen, you should be sure to include an
176 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
179 # --------------------------------------------------------------
180 AC_DEFUN([PKG_CHECK_MODULES],
181 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
182 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
183 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
186 AC_MSG_CHECKING([for $1])
188 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
189 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
191 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
192 and $1[]_LIBS to avoid the need to call pkg-config.
193 See the pkg-config man page for more details.])
195 if test $pkg_failed = yes; then
197 _PKG_SHORT_ERRORS_SUPPORTED
198 if test $_pkg_short_errors_supported = yes; then
199 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
201 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
203 # Put the nasty error message in config.log where it belongs
204 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
206 m4_default([$4], [AC_MSG_ERROR(
207 [Package requirements ($2) were not met:
211 Consider adjusting the PKG_CONFIG_PATH environment variable if you
212 installed software in a non-standard prefix.
216 elif test $pkg_failed = untried; then
218 m4_default([$4], [AC_MSG_FAILURE(
219 [The pkg-config script could not be found or is too old. Make sure it
220 is in your PATH or set the PKG_CONFIG environment variable to the full
225 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
228 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
229 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
233 ])# PKG_CHECK_MODULES
235 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
238 # This file is free software; the Free Software Foundation
239 # gives unlimited permission to copy and/or distribute it,
240 # with or without modifications, as long as this notice is preserved.
244 # AM_AUTOMAKE_VERSION(VERSION)
245 # ----------------------------
246 # Automake X.Y traces this macro to ensure aclocal.m4 has been
247 # generated from the m4 files accompanying Automake X.Y.
248 # (This private macro should not be called outside this file.)
249 AC_DEFUN([AM_AUTOMAKE_VERSION],
250 [am__api_version='1.11'
251 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
252 dnl require some minimum version. Point them to the right macro.
253 m4_if([$1], [1.11.3], [],
254 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
257 # _AM_AUTOCONF_VERSION(VERSION)
258 # -----------------------------
259 # aclocal traces this macro to find the Autoconf version.
260 # This is a private macro too. Using m4_define simplifies
261 # the logic in aclocal, which can simply ignore this definition.
262 m4_define([_AM_AUTOCONF_VERSION], [])
264 # AM_SET_CURRENT_AUTOMAKE_VERSION
265 # -------------------------------
266 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
267 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
268 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
269 [AM_AUTOMAKE_VERSION([1.11.3])dnl
270 m4_ifndef([AC_AUTOCONF_VERSION],
271 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
272 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
274 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
276 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
278 # This file is free software; the Free Software Foundation
279 # gives unlimited permission to copy and/or distribute it,
280 # with or without modifications, as long as this notice is preserved.
284 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
285 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
286 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
288 # Of course, Automake must honor this variable whenever it calls a
289 # tool from the auxiliary directory. The problem is that $srcdir (and
290 # therefore $ac_aux_dir as well) can be either absolute or relative,
291 # depending on how configure is run. This is pretty annoying, since
292 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
293 # source directory, any form will work fine, but in subdirectories a
294 # relative path needs to be adjusted first.
296 # $ac_aux_dir/missing
297 # fails when called from a subdirectory if $ac_aux_dir is relative
298 # $top_srcdir/$ac_aux_dir/missing
299 # fails if $ac_aux_dir is absolute,
300 # fails when called from a subdirectory in a VPATH build with
301 # a relative $ac_aux_dir
303 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
304 # are both prefixed by $srcdir. In an in-source build this is usually
305 # harmless because $srcdir is `.', but things will broke when you
306 # start a VPATH build or use an absolute $srcdir.
308 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
309 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
310 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
311 # and then we would define $MISSING as
312 # MISSING="\${SHELL} $am_aux_dir/missing"
313 # This will work as long as MISSING is not called from configure, because
314 # unfortunately $(top_srcdir) has no meaning in configure.
315 # However there are other variables, like CC, which are often used in
316 # configure, and could therefore not use this "fixed" $ac_aux_dir.
318 # Another solution, used here, is to always expand $ac_aux_dir to an
319 # absolute PATH. The drawback is that using absolute paths prevent a
320 # configured tree to be moved without reconfiguration.
322 AC_DEFUN([AM_AUX_DIR_EXPAND],
323 [dnl Rely on autoconf to set up CDPATH properly.
325 # expand $ac_aux_dir to an absolute path
326 am_aux_dir=`cd $ac_aux_dir && pwd`
329 # AM_CONDITIONAL -*- Autoconf -*-
331 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
332 # Free Software Foundation, Inc.
334 # This file is free software; the Free Software Foundation
335 # gives unlimited permission to copy and/or distribute it,
336 # with or without modifications, as long as this notice is preserved.
340 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
341 # -------------------------------------
342 # Define a conditional.
343 AC_DEFUN([AM_CONDITIONAL],
345 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
346 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
347 AC_SUBST([$1_TRUE])dnl
348 AC_SUBST([$1_FALSE])dnl
349 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
350 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
351 m4_define([_AM_COND_VALUE_$1], [$2])dnl
359 AC_CONFIG_COMMANDS_PRE(
360 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
361 AC_MSG_ERROR([[conditional "$1" was never defined.
362 Usually this means the macro was only invoked conditionally.]])
365 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
366 # 2010, 2011 Free Software Foundation, Inc.
368 # This file is free software; the Free Software Foundation
369 # gives unlimited permission to copy and/or distribute it,
370 # with or without modifications, as long as this notice is preserved.
374 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
375 # written in clear, in which case automake, when reading aclocal.m4,
376 # will think it sees a *use*, and therefore will trigger all it's
377 # C support machinery. Also note that it means that autoscan, seeing
378 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
381 # _AM_DEPENDENCIES(NAME)
382 # ----------------------
383 # See how the compiler implements dependency checking.
384 # NAME is "CC", "CXX", "GCJ", or "OBJC".
385 # We try a few techniques and use that to set a single cache variable.
387 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
388 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
389 # dependency, and given that the user is not expected to run this macro,
390 # just rely on AC_PROG_CC.
391 AC_DEFUN([_AM_DEPENDENCIES],
392 [AC_REQUIRE([AM_SET_DEPDIR])dnl
393 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
394 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
395 AC_REQUIRE([AM_DEP_TRACK])dnl
397 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
398 [$1], CXX, [depcc="$CXX" am_compiler_list=],
399 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
400 [$1], UPC, [depcc="$UPC" am_compiler_list=],
401 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
402 [depcc="$$1" am_compiler_list=])
404 AC_CACHE_CHECK([dependency style of $depcc],
405 [am_cv_$1_dependencies_compiler_type],
406 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
407 # We make a subdir and do the tests there. Otherwise we can end up
408 # making bogus files that we don't know about and never remove. For
409 # instance it was reported that on HP-UX the gcc test will end up
410 # making a dummy file named `D' -- because `-MD' means `put the output
414 # Copy depcomp to subdir because otherwise we won't find it if we're
415 # using a relative directory.
416 cp "$am_depcomp" conftest.dir
418 # We will build objects and dependencies in a subdirectory because
419 # it helps to detect inapplicable dependency modes. For instance
420 # both Tru64's cc and ICC support -MD to output dependencies as a
421 # side effect of compilation, but ICC will put the dependencies in
422 # the current directory while Tru64 will put them in the object
426 am_cv_$1_dependencies_compiler_type=none
427 if test "$am_compiler_list" = ""; then
428 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
432 [case " $depcc " in #(
433 *\ -arch\ *\ -arch\ *) am__universal=true ;;
436 [case " $depcc " in #(
437 *\ -arch\ *\ -arch\ *) am__universal=true ;;
440 for depmode in $am_compiler_list; do
441 # Setup a source with many dependencies, because some compilers
442 # like to wrap large dependency lists on column 80 (with \), and
443 # we should not choose a depcomp mode which is confused by this.
445 # We need to recreate these files for each test, as the compiler may
446 # overwrite some of them when testing with obscure command lines.
447 # This happens at least with the AIX C compiler.
449 for i in 1 2 3 4 5 6; do
450 echo '#include "conftst'$i'.h"' >> sub/conftest.c
451 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
452 # Solaris 8's {/usr,}/bin/sh.
453 touch sub/conftst$i.h
455 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
457 # We check with `-c' and `-o' for the sake of the "dashmstdout"
458 # mode. It turns out that the SunPro C++ compiler does not properly
459 # handle `-M -o', and we need to detect this. Also, some Intel
460 # versions had trouble with output in subdirs
461 am__obj=sub/conftest.${OBJEXT-o}
462 am__minus_obj="-o $am__obj"
465 # This depmode causes a compiler race in universal mode.
466 test "$am__universal" = false || continue
469 # after this tag, mechanisms are not by side-effect, so they'll
470 # only be used when explicitly requested
471 if test "x$enable_dependency_tracking" = xyes; then
477 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
478 # This compiler won't grok `-c -o', but also, the minuso test has
479 # not run yet. These depmodes are late enough in the game, and
480 # so weak that their functioning should not be impacted.
481 am__obj=conftest.${OBJEXT-o}
486 if depmode=$depmode \
487 source=sub/conftest.c object=$am__obj \
488 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
489 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
490 >/dev/null 2>conftest.err &&
491 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
492 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
493 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
494 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
495 # icc doesn't choke on unknown options, it will just issue warnings
496 # or remarks (even with -Werror). So we grep stderr for any message
497 # that says an option was ignored or not supported.
498 # When given -MP, icc 7.0 and 7.1 complain thusly:
499 # icc: Command line warning: ignoring option '-M'; no argument required
500 # The diagnosis changed in icc 8.0:
501 # icc: Command line remark: option '-MP' not supported
502 if (grep 'ignoring option' conftest.err ||
503 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
504 am_cv_$1_dependencies_compiler_type=$depmode
513 am_cv_$1_dependencies_compiler_type=none
516 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
517 AM_CONDITIONAL([am__fastdep$1], [
518 test "x$enable_dependency_tracking" != xno \
519 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
525 # Choose a directory name for dependency files.
526 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
527 AC_DEFUN([AM_SET_DEPDIR],
528 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
529 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
535 AC_DEFUN([AM_DEP_TRACK],
536 [AC_ARG_ENABLE(dependency-tracking,
537 [ --disable-dependency-tracking speeds up one-time build
538 --enable-dependency-tracking do not reject slow dependency extractors])
539 if test "x$enable_dependency_tracking" != xno; then
540 am_depcomp="$ac_aux_dir/depcomp"
544 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
545 AC_SUBST([AMDEPBACKSLASH])dnl
546 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
547 AC_SUBST([am__nodep])dnl
548 _AM_SUBST_NOTMAKE([am__nodep])dnl
551 # Generate code to set up dependency tracking. -*- Autoconf -*-
553 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
554 # Free Software Foundation, Inc.
556 # This file is free software; the Free Software Foundation
557 # gives unlimited permission to copy and/or distribute it,
558 # with or without modifications, as long as this notice is preserved.
562 # _AM_OUTPUT_DEPENDENCY_COMMANDS
563 # ------------------------------
564 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
566 # Autoconf 2.62 quotes --file arguments for eval, but not when files
567 # are listed without --file. Let's play safe and only enable the eval
568 # if we detect the quoting.
569 case $CONFIG_FILES in
570 *\'*) eval set x "$CONFIG_FILES" ;;
571 *) set x $CONFIG_FILES ;;
576 # Strip MF so we end up with the name of the file.
577 mf=`echo "$mf" | sed -e 's/:.*$//'`
578 # Check whether this is an Automake generated Makefile or not.
579 # We used to match only the files named `Makefile.in', but
580 # some people rename them; so instead we look at the file content.
581 # Grep'ing the first line is not enough: some people post-process
582 # each Makefile.in and add a new line on top of each file to say so.
583 # Grep'ing the whole file is not good either: AIX grep has a line
584 # limit of 2048, but all sed's we know have understand at least 4000.
585 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
586 dirpart=`AS_DIRNAME("$mf")`
590 # Extract the definition of DEPDIR, am__include, and am__quote
591 # from the Makefile without running `make'.
592 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
593 test -z "$DEPDIR" && continue
594 am__include=`sed -n 's/^am__include = //p' < "$mf"`
595 test -z "am__include" && continue
596 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
597 # When using ansi2knr, U may be empty or an underscore; expand it
598 U=`sed -n 's/^U = //p' < "$mf"`
599 # Find all dependency output files, they are included files with
600 # $(DEPDIR) in their names. We invoke sed twice because it is the
601 # simplest approach to changing $(DEPDIR) to its actual value in the
603 for file in `sed -n "
604 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
605 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
606 # Make sure the directory exists.
607 test -f "$dirpart/$file" && continue
608 fdir=`AS_DIRNAME(["$file"])`
609 AS_MKDIR_P([$dirpart/$fdir])
610 # echo "creating $dirpart/$file"
611 echo '# dummy' > "$dirpart/$file"
615 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
618 # AM_OUTPUT_DEPENDENCY_COMMANDS
619 # -----------------------------
620 # This macro should only be invoked once -- use via AC_REQUIRE.
622 # This code is only required when automatic dependency tracking
623 # is enabled. FIXME. This creates each `.P' file that we will
624 # need in order to bootstrap the dependency handling code.
625 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
626 [AC_CONFIG_COMMANDS([depfiles],
627 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
628 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
631 # Do all the work for Automake. -*- Autoconf -*-
633 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
634 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
636 # This file is free software; the Free Software Foundation
637 # gives unlimited permission to copy and/or distribute it,
638 # with or without modifications, as long as this notice is preserved.
642 # This macro actually does too much. Some checks are only needed if
643 # your package does certain things. But this isn't really a big deal.
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.62])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then
664 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
665 # is not polluted with repeated "-I."
666 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
667 # test to see if srcdir already configured
668 if test -f $srcdir/config.status; then
669 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
673 # test whether we have cygpath
674 if test -z "$CYGPATH_W"; then
675 if (cygpath --version) >/dev/null 2>/dev/null; then
676 CYGPATH_W='cygpath -w'
681 AC_SUBST([CYGPATH_W])
683 # Define the identity of the package.
684 dnl Distinguish between old-style and new-style calls.
686 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
687 AC_SUBST([PACKAGE], [$1])dnl
688 AC_SUBST([VERSION], [$2])],
689 [_AM_SET_OPTIONS([$1])dnl
690 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
691 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
692 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
693 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
694 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
696 _AM_IF_OPTION([no-define],,
697 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
698 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
700 # Some tools Automake needs.
701 AC_REQUIRE([AM_SANITY_CHECK])dnl
702 AC_REQUIRE([AC_ARG_PROGRAM])dnl
703 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
704 AM_MISSING_PROG(AUTOCONF, autoconf)
705 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
706 AM_MISSING_PROG(AUTOHEADER, autoheader)
707 AM_MISSING_PROG(MAKEINFO, makeinfo)
708 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
709 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
710 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
711 # We need awk for the "check" target. The system "awk" is bad on
713 AC_REQUIRE([AC_PROG_AWK])dnl
714 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
715 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
716 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
717 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
718 [_AM_PROG_TAR([v7])])])
719 _AM_IF_OPTION([no-dependencies],,
720 [AC_PROVIDE_IFELSE([AC_PROG_CC],
721 [_AM_DEPENDENCIES(CC)],
722 [define([AC_PROG_CC],
723 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
724 AC_PROVIDE_IFELSE([AC_PROG_CXX],
725 [_AM_DEPENDENCIES(CXX)],
726 [define([AC_PROG_CXX],
727 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
728 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
729 [_AM_DEPENDENCIES(OBJC)],
730 [define([AC_PROG_OBJC],
731 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
733 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
734 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
735 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
736 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
737 AC_CONFIG_COMMANDS_PRE(dnl
738 [m4_provide_if([_AM_COMPILER_EXEEXT],
739 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
742 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
743 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
744 dnl mangled by Autoconf and run in a shell conditional statement.
745 m4_define([_AC_COMPILER_EXEEXT],
746 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
749 # When config.status generates a header, we must update the stamp-h file.
750 # This file resides in the same directory as the config header
751 # that is generated. The stamp files are numbered to have different names.
753 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
754 # loop where config.status creates the headers, so we can generate
755 # our stamp files there.
756 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
757 [# Compute $1's index in $config_headers.
760 for _am_header in $config_headers :; do
762 $_am_arg | $_am_arg:* )
765 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
768 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
770 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
773 # This file is free software; the Free Software Foundation
774 # gives unlimited permission to copy and/or distribute it,
775 # with or without modifications, as long as this notice is preserved.
781 # Define $install_sh.
782 AC_DEFUN([AM_PROG_INSTALL_SH],
783 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
784 if test x"${install_sh}" != xset; then
787 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
789 install_sh="\${SHELL} $am_aux_dir/install-sh"
792 AC_SUBST(install_sh)])
794 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
796 # This file is free software; the Free Software Foundation
797 # gives unlimited permission to copy and/or distribute it,
798 # with or without modifications, as long as this notice is preserved.
802 # Check whether the underlying file-system supports filenames
803 # with a leading dot. For instance MS-DOS doesn't.
804 AC_DEFUN([AM_SET_LEADING_DOT],
805 [rm -rf .tst 2>/dev/null
806 mkdir .tst 2>/dev/null
807 if test -d .tst; then
812 rmdir .tst 2>/dev/null
813 AC_SUBST([am__leading_dot])])
815 # Check to see how 'make' treats includes. -*- Autoconf -*-
817 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
819 # This file is free software; the Free Software Foundation
820 # gives unlimited permission to copy and/or distribute it,
821 # with or without modifications, as long as this notice is preserved.
827 # Check to see how make treats includes.
828 AC_DEFUN([AM_MAKE_INCLUDE],
829 [am_make=${MAKE-make}
830 cat > confinc << 'END'
832 @echo this is the am__doit target
835 # If we don't find an include directive, just comment out the code.
836 AC_MSG_CHECKING([for style of include used by $am_make])
840 # First try GNU make style include.
841 echo "include confinc" > confmf
842 # Ignore all kinds of additional output from `make'.
843 case `$am_make -s -f confmf 2> /dev/null` in #(
844 *the\ am__doit\ target*)
850 # Now try BSD make style include.
851 if test "$am__include" = "#"; then
852 echo '.include "confinc"' > confmf
853 case `$am_make -s -f confmf 2> /dev/null` in #(
854 *the\ am__doit\ target*)
861 AC_SUBST([am__include])
862 AC_SUBST([am__quote])
863 AC_MSG_RESULT([$_am_result])
867 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
868 # Free Software Foundation, Inc.
870 # This file is free software; the Free Software Foundation
871 # gives unlimited permission to copy and/or distribute it,
872 # with or without modifications, as long as this notice is preserved.
878 # Like AC_PROG_CC_C_O, but changed for automake.
879 AC_DEFUN([AM_PROG_CC_C_O],
880 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
881 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
882 AC_REQUIRE_AUX_FILE([compile])dnl
883 # FIXME: we rely on the cache variable name because
884 # there is no other way.
886 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
887 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
888 if test "$am_t" != yes; then
889 # Losing compiler, so override with the script.
890 # FIXME: It is wrong to rewrite CC.
891 # But if we don't then we get into trouble of one sort or another.
892 # A longer-term fix would be to have automake use am__CC in this case,
893 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
894 CC="$am_aux_dir/compile $CC"
896 dnl Make sure AC_PROG_CC is never called again, or it will override our
898 m4_define([AC_PROG_CC],
899 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
902 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
904 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
905 # Free Software Foundation, Inc.
907 # This file is free software; the Free Software Foundation
908 # gives unlimited permission to copy and/or distribute it,
909 # with or without modifications, as long as this notice is preserved.
913 # AM_MISSING_PROG(NAME, PROGRAM)
914 # ------------------------------
915 AC_DEFUN([AM_MISSING_PROG],
916 [AC_REQUIRE([AM_MISSING_HAS_RUN])
917 $1=${$1-"${am_missing_run}$2"}
923 # Define MISSING if not defined so far and test if it supports --run.
924 # If it does, set am_missing_run to use it, otherwise, to nothing.
925 AC_DEFUN([AM_MISSING_HAS_RUN],
926 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
927 AC_REQUIRE_AUX_FILE([missing])dnl
928 if test x"${MISSING+set}" != xset; then
931 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
933 MISSING="\${SHELL} $am_aux_dir/missing" ;;
936 # Use eval to expand $SHELL
937 if eval "$MISSING --run true"; then
938 am_missing_run="$MISSING --run "
941 AC_MSG_WARN([`missing' script is too old or missing])
945 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
948 # This file is free software; the Free Software Foundation
949 # gives unlimited permission to copy and/or distribute it,
950 # with or without modifications, as long as this notice is preserved.
956 # Check for `mkdir -p'.
957 AC_DEFUN([AM_PROG_MKDIR_P],
958 [AC_PREREQ([2.60])dnl
959 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
960 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
961 dnl while keeping a definition of mkdir_p for backward compatibility.
962 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
963 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
964 dnl Makefile.ins that do not define MKDIR_P, so we do our own
965 dnl adjustment using top_builddir (which is defined more often than
967 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
969 [[\\/$]]* | ?:[[\\/]]*) ;;
970 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
974 # Helper functions for option handling. -*- Autoconf -*-
976 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
979 # This file is free software; the Free Software Foundation
980 # gives unlimited permission to copy and/or distribute it,
981 # with or without modifications, as long as this notice is preserved.
985 # _AM_MANGLE_OPTION(NAME)
986 # -----------------------
987 AC_DEFUN([_AM_MANGLE_OPTION],
988 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
990 # _AM_SET_OPTION(NAME)
991 # --------------------
992 # Set option NAME. Presently that only means defining a flag for this option.
993 AC_DEFUN([_AM_SET_OPTION],
994 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
996 # _AM_SET_OPTIONS(OPTIONS)
997 # ------------------------
998 # OPTIONS is a space-separated list of Automake options.
999 AC_DEFUN([_AM_SET_OPTIONS],
1000 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1002 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1003 # -------------------------------------------
1004 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1005 AC_DEFUN([_AM_IF_OPTION],
1006 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1008 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1010 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1011 # Free Software Foundation, Inc.
1013 # This file is free software; the Free Software Foundation
1014 # gives unlimited permission to copy and/or distribute it,
1015 # with or without modifications, as long as this notice is preserved.
1021 AC_DEFUN([AM_SANITY_CHECK],
1022 [AC_MSG_CHECKING([whether build environment is sane])
1025 echo timestamp > conftest.file
1026 # Reject unsafe characters in $srcdir or the absolute working directory
1027 # name. Accept space and tab only in the latter.
1031 *[[\\\"\#\$\&\'\`$am_lf]]*)
1032 AC_MSG_ERROR([unsafe absolute working directory name]);;
1035 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1036 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1039 # Do `set' in a subshell so we don't clobber the current shell's
1040 # arguments. Must try -L first in case configure is actually a
1041 # symlink; some systems play weird games with the mod time of symlinks
1042 # (eg FreeBSD returns the mod time of the symlink's containing
1045 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1046 if test "$[*]" = "X"; then
1048 set X `ls -t "$srcdir/configure" conftest.file`
1051 if test "$[*]" != "X $srcdir/configure conftest.file" \
1052 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1054 # If neither matched, then we have a broken ls. This can happen
1055 # if, for instance, CONFIG_SHELL is bash and it inherits a
1056 # broken ls alias from the environment. This has actually
1057 # happened. Such a system could not be considered "sane".
1058 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1059 alias in your environment])
1062 test "$[2]" = conftest.file
1068 AC_MSG_ERROR([newly created file is older than distributed files!
1069 Check your system clock])
1071 AC_MSG_RESULT(yes)])
1073 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1075 # This file is free software; the Free Software Foundation
1076 # gives unlimited permission to copy and/or distribute it,
1077 # with or without modifications, as long as this notice is preserved.
1081 # AM_PROG_INSTALL_STRIP
1082 # ---------------------
1083 # One issue with vendor `install' (even GNU) is that you can't
1084 # specify the program used to strip binaries. This is especially
1085 # annoying in cross-compiling environments, where the build's strip
1086 # is unlikely to handle the host's binaries.
1087 # Fortunately install-sh will honor a STRIPPROG variable, so we
1088 # always use install-sh in `make install-strip', and initialize
1089 # STRIPPROG with the value of the STRIP variable (set by the user).
1090 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1091 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1092 # Installed binaries are usually stripped using `strip' when the user
1093 # run `make install-strip'. However `strip' might not be the right
1094 # tool to use in cross-compilation environments, therefore Automake
1095 # will honor the `STRIP' environment variable to overrule this program.
1096 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1097 if test "$cross_compiling" != no; then
1098 AC_CHECK_TOOL([STRIP], [strip], :)
1100 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1101 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1103 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1105 # This file is free software; the Free Software Foundation
1106 # gives unlimited permission to copy and/or distribute it,
1107 # with or without modifications, as long as this notice is preserved.
1111 # _AM_SUBST_NOTMAKE(VARIABLE)
1112 # ---------------------------
1113 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1114 # This macro is traced by Automake.
1115 AC_DEFUN([_AM_SUBST_NOTMAKE])
1117 # AM_SUBST_NOTMAKE(VARIABLE)
1118 # --------------------------
1119 # Public sister of _AM_SUBST_NOTMAKE.
1120 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1122 # Check how to create a tarball. -*- Autoconf -*-
1124 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1126 # This file is free software; the Free Software Foundation
1127 # gives unlimited permission to copy and/or distribute it,
1128 # with or without modifications, as long as this notice is preserved.
1132 # _AM_PROG_TAR(FORMAT)
1133 # --------------------
1134 # Check how to create a tarball in format FORMAT.
1135 # FORMAT should be one of `v7', `ustar', or `pax'.
1137 # Substitute a variable $(am__tar) that is a command
1138 # writing to stdout a FORMAT-tarball containing the directory
1140 # tardir=directory && $(am__tar) > result.tar
1142 # Substitute a variable $(am__untar) that extract such
1143 # a tarball read from stdin.
1144 # $(am__untar) < result.tar
1145 AC_DEFUN([_AM_PROG_TAR],
1146 [# Always define AMTAR for backward compatibility. Yes, it's still used
1147 # in the wild :-( We should find a proper way to deprecate it ...
1148 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1150 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1151 [m4_case([$1], [ustar],, [pax],,
1152 [m4_fatal([Unknown tar format])])
1153 AC_MSG_CHECKING([how to create a $1 tar archive])
1154 # Loop over all known methods to create a tar archive until one works.
1155 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1156 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1157 # Do not fold the above two line into one, because Tru64 sh and
1158 # Solaris sh will not grok spaces in the rhs of `-'.
1159 for _am_tool in $_am_tools
1163 for _am_tar in tar gnutar gtar;
1165 AM_RUN_LOG([$_am_tar --version]) && break
1167 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1168 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1169 am__untar="$_am_tar -xf -"
1172 # Must skip GNU tar: if it does not support --format= it doesn't create
1173 # ustar tarball either.
1174 (tar --version) >/dev/null 2>&1 && continue
1175 am__tar='tar chf - "$$tardir"'
1176 am__tar_='tar chf - "$tardir"'
1177 am__untar='tar xf -'
1180 am__tar='pax -L -x $1 -w "$$tardir"'
1181 am__tar_='pax -L -x $1 -w "$tardir"'
1185 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1186 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1187 am__untar='cpio -i -H $1 -d'
1196 # If the value was cached, stop now. We just wanted to have am__tar
1197 # and am__untar set.
1198 test -n "${am_cv_prog_tar_$1}" && break
1200 # tar/untar a dummy directory, and stop if the command works
1203 echo GrepMe > conftest.dir/file
1204 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1206 if test -s conftest.tar; then
1207 AM_RUN_LOG([$am__untar <conftest.tar])
1208 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1213 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1214 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1216 AC_SUBST([am__untar])
1219 m4_include([m4/gettext.m4])
1220 m4_include([m4/iconv.m4])
1221 m4_include([m4/lib-ld.m4])
1222 m4_include([m4/lib-link.m4])
1223 m4_include([m4/lib-prefix.m4])
1224 m4_include([m4/nls.m4])
1225 m4_include([m4/po.m4])
1226 m4_include([m4/progtest.m4])