1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 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_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 dnl Configure Paths for Alsa
23 dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
24 dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
25 dnl Jaroslav Kysela <perex@perex.cz>
26 dnl Last modification: $Id: alsa.m4,v 1.24 2004/09/15 18:48:07 tiwai Exp $
27 dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
28 dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
29 dnl enables arguments --with-alsa-prefix=
30 dnl --with-alsa-enc-prefix=
31 dnl --disable-alsatest
33 dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
34 dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
36 AC_DEFUN([AM_PATH_ALSA],
37 [dnl Save the original CFLAGS, LDFLAGS, and LIBS
38 alsa_save_CFLAGS="$CFLAGS"
39 alsa_save_LDFLAGS="$LDFLAGS"
40 alsa_save_LIBS="$LIBS"
44 dnl Get the cflags and libraries for alsa
46 AC_ARG_WITH(alsa-prefix,
47 [ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)],
48 [alsa_prefix="$withval"], [alsa_prefix=""])
50 AC_ARG_WITH(alsa-inc-prefix,
51 [ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)],
52 [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
54 dnl FIXME: this is not yet implemented
55 AC_ARG_ENABLE(alsatest,
56 [ --disable-alsatest Do not try to compile and run a test Alsa program],
57 [enable_alsatest="$enableval"],
58 [enable_alsatest=yes])
60 dnl Add any special include directories
61 AC_MSG_CHECKING(for ALSA CFLAGS)
62 if test "$alsa_inc_prefix" != "" ; then
63 ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
64 CFLAGS="$CFLAGS -I$alsa_inc_prefix"
66 AC_MSG_RESULT($ALSA_CFLAGS)
68 dnl add any special lib dirs
69 AC_MSG_CHECKING(for ALSA LDFLAGS)
70 if test "$alsa_prefix" != "" ; then
71 ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
72 LDFLAGS="$LDFLAGS $ALSA_LIBS"
75 dnl add the alsa library
76 ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
77 LIBS="$ALSA_LIBS $LIBS"
78 AC_MSG_RESULT($ALSA_LIBS)
80 dnl Check for a working version of libasound that is of the right version.
81 min_alsa_version=ifelse([$1], ,0.1.1,$1)
82 AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
84 alsa_min_major_version=`echo $min_alsa_version | \
85 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
86 alsa_min_minor_version=`echo $min_alsa_version | \
87 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
88 alsa_min_micro_version=`echo $min_alsa_version | \
89 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
94 #include <alsa/asoundlib.h>
96 /* ensure backward compatibility */
97 #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
98 #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
100 #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
101 #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
103 #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
104 #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
107 # if(SND_LIB_MAJOR > $alsa_min_major_version)
110 # if(SND_LIB_MAJOR < $alsa_min_major_version)
114 # if(SND_LIB_MINOR > $alsa_min_minor_version)
117 # if(SND_LIB_MINOR < $alsa_min_minor_version)
121 # if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
128 [AC_MSG_RESULT(found.)],
129 [AC_MSG_RESULT(not present.)
130 ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
135 dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
136 if test "x$enable_alsatest" = "xyes"; then
137 AC_CHECK_LIB([asound], [snd_ctl_open],,
138 [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
143 if test "x$alsa_found" = "xyes" ; then
144 ifelse([$2], , :, [$2])
145 LIBS=`echo $LIBS | sed 's/-lasound//g'`
146 LIBS=`echo $LIBS | sed 's/ //'`
147 LIBS="-lasound $LIBS"
149 if test "x$alsa_found" = "xno" ; then
150 ifelse([$3], , :, [$3])
151 CFLAGS="$alsa_save_CFLAGS"
152 LDFLAGS="$alsa_save_LDFLAGS"
153 LIBS="$alsa_save_LIBS"
158 dnl That should be it. Now just export out symbols:
159 AC_SUBST(ALSA_CFLAGS)
164 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
166 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
168 # This program is free software; you can redistribute it and/or modify
169 # it under the terms of the GNU General Public License as published by
170 # the Free Software Foundation; either version 2 of the License, or
171 # (at your option) any later version.
173 # This program is distributed in the hope that it will be useful, but
174 # WITHOUT ANY WARRANTY; without even the implied warranty of
175 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
176 # General Public License for more details.
178 # You should have received a copy of the GNU General Public License
179 # along with this program; if not, write to the Free Software
180 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
182 # As a special exception to the GNU General Public License, if you
183 # distribute this file as part of a program that contains a
184 # configuration script generated by Autoconf, you may include it under
185 # the same distribution terms that you use for the rest of that program.
187 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
188 # ----------------------------------
189 AC_DEFUN([PKG_PROG_PKG_CONFIG],
190 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
191 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
192 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
193 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
194 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
196 if test -n "$PKG_CONFIG"; then
197 _pkg_min_version=m4_default([$1], [0.9.0])
198 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
199 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
207 ])# PKG_PROG_PKG_CONFIG
209 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
211 # Check to see whether a particular set of modules exists. Similar
212 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
215 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
216 # this or PKG_CHECK_MODULES is called, or make sure to call
217 # PKG_CHECK_EXISTS manually
218 # --------------------------------------------------------------
219 AC_DEFUN([PKG_CHECK_EXISTS],
220 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
221 if test -n "$PKG_CONFIG" && \
222 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
223 m4_ifval([$2], [$2], [:])
224 m4_ifvaln([$3], [else
229 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
230 # ---------------------------------------------
231 m4_define([_PKG_CONFIG],
232 [if test -n "$PKG_CONFIG"; then
233 if test -n "$$1"; then
236 PKG_CHECK_EXISTS([$3],
237 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
245 # _PKG_SHORT_ERRORS_SUPPORTED
246 # -----------------------------
247 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
248 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
249 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
250 _pkg_short_errors_supported=yes
252 _pkg_short_errors_supported=no
254 ])# _PKG_SHORT_ERRORS_SUPPORTED
257 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
258 # [ACTION-IF-NOT-FOUND])
261 # Note that if there is a possibility the first call to
262 # PKG_CHECK_MODULES might not happen, you should be sure to include an
263 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
266 # --------------------------------------------------------------
267 AC_DEFUN([PKG_CHECK_MODULES],
268 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
269 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
270 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
273 AC_MSG_CHECKING([for $1])
275 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
276 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
278 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
279 and $1[]_LIBS to avoid the need to call pkg-config.
280 See the pkg-config man page for more details.])
282 if test $pkg_failed = yes; then
283 _PKG_SHORT_ERRORS_SUPPORTED
284 if test $_pkg_short_errors_supported = yes; then
285 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
287 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
289 # Put the nasty error message in config.log where it belongs
290 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
292 ifelse([$4], , [AC_MSG_ERROR(dnl
293 [Package requirements ($2) were not met:
297 Consider adjusting the PKG_CONFIG_PATH environment variable if you
298 installed software in a non-standard prefix.
303 elif test $pkg_failed = untried; then
304 ifelse([$4], , [AC_MSG_FAILURE(dnl
305 [The pkg-config script could not be found or is too old. Make sure it
306 is in your PATH or set the PKG_CONFIG environment variable to the full
311 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
314 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
315 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
317 ifelse([$3], , :, [$3])
319 ])# PKG_CHECK_MODULES
321 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
323 # This file is free software; the Free Software Foundation
324 # gives unlimited permission to copy and/or distribute it,
325 # with or without modifications, as long as this notice is preserved.
327 # AM_AUTOMAKE_VERSION(VERSION)
328 # ----------------------------
329 # Automake X.Y traces this macro to ensure aclocal.m4 has been
330 # generated from the m4 files accompanying Automake X.Y.
331 # (This private macro should not be called outside this file.)
332 AC_DEFUN([AM_AUTOMAKE_VERSION],
333 [am__api_version='1.11'
334 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
335 dnl require some minimum version. Point them to the right macro.
336 m4_if([$1], [1.11.1], [],
337 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
340 # _AM_AUTOCONF_VERSION(VERSION)
341 # -----------------------------
342 # aclocal traces this macro to find the Autoconf version.
343 # This is a private macro too. Using m4_define simplifies
344 # the logic in aclocal, which can simply ignore this definition.
345 m4_define([_AM_AUTOCONF_VERSION], [])
347 # AM_SET_CURRENT_AUTOMAKE_VERSION
348 # -------------------------------
349 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
350 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
351 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
352 [AM_AUTOMAKE_VERSION([1.11.1])dnl
353 m4_ifndef([AC_AUTOCONF_VERSION],
354 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
355 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
357 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
359 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
361 # This file is free software; the Free Software Foundation
362 # gives unlimited permission to copy and/or distribute it,
363 # with or without modifications, as long as this notice is preserved.
365 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
366 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
367 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
369 # Of course, Automake must honor this variable whenever it calls a
370 # tool from the auxiliary directory. The problem is that $srcdir (and
371 # therefore $ac_aux_dir as well) can be either absolute or relative,
372 # depending on how configure is run. This is pretty annoying, since
373 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
374 # source directory, any form will work fine, but in subdirectories a
375 # relative path needs to be adjusted first.
377 # $ac_aux_dir/missing
378 # fails when called from a subdirectory if $ac_aux_dir is relative
379 # $top_srcdir/$ac_aux_dir/missing
380 # fails if $ac_aux_dir is absolute,
381 # fails when called from a subdirectory in a VPATH build with
382 # a relative $ac_aux_dir
384 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
385 # are both prefixed by $srcdir. In an in-source build this is usually
386 # harmless because $srcdir is `.', but things will broke when you
387 # start a VPATH build or use an absolute $srcdir.
389 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
390 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
391 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
392 # and then we would define $MISSING as
393 # MISSING="\${SHELL} $am_aux_dir/missing"
394 # This will work as long as MISSING is not called from configure, because
395 # unfortunately $(top_srcdir) has no meaning in configure.
396 # However there are other variables, like CC, which are often used in
397 # configure, and could therefore not use this "fixed" $ac_aux_dir.
399 # Another solution, used here, is to always expand $ac_aux_dir to an
400 # absolute PATH. The drawback is that using absolute paths prevent a
401 # configured tree to be moved without reconfiguration.
403 AC_DEFUN([AM_AUX_DIR_EXPAND],
404 [dnl Rely on autoconf to set up CDPATH properly.
406 # expand $ac_aux_dir to an absolute path
407 am_aux_dir=`cd $ac_aux_dir && pwd`
410 # AM_CONDITIONAL -*- Autoconf -*-
412 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
413 # Free Software Foundation, Inc.
415 # This file is free software; the Free Software Foundation
416 # gives unlimited permission to copy and/or distribute it,
417 # with or without modifications, as long as this notice is preserved.
421 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
422 # -------------------------------------
423 # Define a conditional.
424 AC_DEFUN([AM_CONDITIONAL],
426 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
427 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
428 AC_SUBST([$1_TRUE])dnl
429 AC_SUBST([$1_FALSE])dnl
430 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
431 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
432 m4_define([_AM_COND_VALUE_$1], [$2])dnl
440 AC_CONFIG_COMMANDS_PRE(
441 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
442 AC_MSG_ERROR([[conditional "$1" was never defined.
443 Usually this means the macro was only invoked conditionally.]])
446 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
447 # Free Software Foundation, Inc.
449 # This file is free software; the Free Software Foundation
450 # gives unlimited permission to copy and/or distribute it,
451 # with or without modifications, as long as this notice is preserved.
455 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
456 # written in clear, in which case automake, when reading aclocal.m4,
457 # will think it sees a *use*, and therefore will trigger all it's
458 # C support machinery. Also note that it means that autoscan, seeing
459 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
462 # _AM_DEPENDENCIES(NAME)
463 # ----------------------
464 # See how the compiler implements dependency checking.
465 # NAME is "CC", "CXX", "GCJ", or "OBJC".
466 # We try a few techniques and use that to set a single cache variable.
468 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
469 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
470 # dependency, and given that the user is not expected to run this macro,
471 # just rely on AC_PROG_CC.
472 AC_DEFUN([_AM_DEPENDENCIES],
473 [AC_REQUIRE([AM_SET_DEPDIR])dnl
474 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
475 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
476 AC_REQUIRE([AM_DEP_TRACK])dnl
478 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
479 [$1], CXX, [depcc="$CXX" am_compiler_list=],
480 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
481 [$1], UPC, [depcc="$UPC" am_compiler_list=],
482 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
483 [depcc="$$1" am_compiler_list=])
485 AC_CACHE_CHECK([dependency style of $depcc],
486 [am_cv_$1_dependencies_compiler_type],
487 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
488 # We make a subdir and do the tests there. Otherwise we can end up
489 # making bogus files that we don't know about and never remove. For
490 # instance it was reported that on HP-UX the gcc test will end up
491 # making a dummy file named `D' -- because `-MD' means `put the output
494 # Copy depcomp to subdir because otherwise we won't find it if we're
495 # using a relative directory.
496 cp "$am_depcomp" conftest.dir
498 # We will build objects and dependencies in a subdirectory because
499 # it helps to detect inapplicable dependency modes. For instance
500 # both Tru64's cc and ICC support -MD to output dependencies as a
501 # side effect of compilation, but ICC will put the dependencies in
502 # the current directory while Tru64 will put them in the object
506 am_cv_$1_dependencies_compiler_type=none
507 if test "$am_compiler_list" = ""; then
508 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
512 [case " $depcc " in #(
513 *\ -arch\ *\ -arch\ *) am__universal=true ;;
516 [case " $depcc " in #(
517 *\ -arch\ *\ -arch\ *) am__universal=true ;;
520 for depmode in $am_compiler_list; do
521 # Setup a source with many dependencies, because some compilers
522 # like to wrap large dependency lists on column 80 (with \), and
523 # we should not choose a depcomp mode which is confused by this.
525 # We need to recreate these files for each test, as the compiler may
526 # overwrite some of them when testing with obscure command lines.
527 # This happens at least with the AIX C compiler.
529 for i in 1 2 3 4 5 6; do
530 echo '#include "conftst'$i'.h"' >> sub/conftest.c
531 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
532 # Solaris 8's {/usr,}/bin/sh.
533 touch sub/conftst$i.h
535 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
537 # We check with `-c' and `-o' for the sake of the "dashmstdout"
538 # mode. It turns out that the SunPro C++ compiler does not properly
539 # handle `-M -o', and we need to detect this. Also, some Intel
540 # versions had trouble with output in subdirs
541 am__obj=sub/conftest.${OBJEXT-o}
542 am__minus_obj="-o $am__obj"
545 # This depmode causes a compiler race in universal mode.
546 test "$am__universal" = false || continue
549 # after this tag, mechanisms are not by side-effect, so they'll
550 # only be used when explicitly requested
551 if test "x$enable_dependency_tracking" = xyes; then
557 msvisualcpp | msvcmsys)
558 # This compiler won't grok `-c -o', but also, the minuso test has
559 # not run yet. These depmodes are late enough in the game, and
560 # so weak that their functioning should not be impacted.
561 am__obj=conftest.${OBJEXT-o}
566 if depmode=$depmode \
567 source=sub/conftest.c object=$am__obj \
568 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
569 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
570 >/dev/null 2>conftest.err &&
571 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
572 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
573 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
574 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
575 # icc doesn't choke on unknown options, it will just issue warnings
576 # or remarks (even with -Werror). So we grep stderr for any message
577 # that says an option was ignored or not supported.
578 # When given -MP, icc 7.0 and 7.1 complain thusly:
579 # icc: Command line warning: ignoring option '-M'; no argument required
580 # The diagnosis changed in icc 8.0:
581 # icc: Command line remark: option '-MP' not supported
582 if (grep 'ignoring option' conftest.err ||
583 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
584 am_cv_$1_dependencies_compiler_type=$depmode
593 am_cv_$1_dependencies_compiler_type=none
596 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
597 AM_CONDITIONAL([am__fastdep$1], [
598 test "x$enable_dependency_tracking" != xno \
599 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
605 # Choose a directory name for dependency files.
606 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
607 AC_DEFUN([AM_SET_DEPDIR],
608 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
609 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
615 AC_DEFUN([AM_DEP_TRACK],
616 [AC_ARG_ENABLE(dependency-tracking,
617 [ --disable-dependency-tracking speeds up one-time build
618 --enable-dependency-tracking do not reject slow dependency extractors])
619 if test "x$enable_dependency_tracking" != xno; then
620 am_depcomp="$ac_aux_dir/depcomp"
623 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
624 AC_SUBST([AMDEPBACKSLASH])dnl
625 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
628 # Generate code to set up dependency tracking. -*- Autoconf -*-
630 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
631 # Free Software Foundation, Inc.
633 # This file is free software; the Free Software Foundation
634 # gives unlimited permission to copy and/or distribute it,
635 # with or without modifications, as long as this notice is preserved.
639 # _AM_OUTPUT_DEPENDENCY_COMMANDS
640 # ------------------------------
641 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
643 # Autoconf 2.62 quotes --file arguments for eval, but not when files
644 # are listed without --file. Let's play safe and only enable the eval
645 # if we detect the quoting.
646 case $CONFIG_FILES in
647 *\'*) eval set x "$CONFIG_FILES" ;;
648 *) set x $CONFIG_FILES ;;
653 # Strip MF so we end up with the name of the file.
654 mf=`echo "$mf" | sed -e 's/:.*$//'`
655 # Check whether this is an Automake generated Makefile or not.
656 # We used to match only the files named `Makefile.in', but
657 # some people rename them; so instead we look at the file content.
658 # Grep'ing the first line is not enough: some people post-process
659 # each Makefile.in and add a new line on top of each file to say so.
660 # Grep'ing the whole file is not good either: AIX grep has a line
661 # limit of 2048, but all sed's we know have understand at least 4000.
662 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
663 dirpart=`AS_DIRNAME("$mf")`
667 # Extract the definition of DEPDIR, am__include, and am__quote
668 # from the Makefile without running `make'.
669 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
670 test -z "$DEPDIR" && continue
671 am__include=`sed -n 's/^am__include = //p' < "$mf"`
672 test -z "am__include" && continue
673 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
674 # When using ansi2knr, U may be empty or an underscore; expand it
675 U=`sed -n 's/^U = //p' < "$mf"`
676 # Find all dependency output files, they are included files with
677 # $(DEPDIR) in their names. We invoke sed twice because it is the
678 # simplest approach to changing $(DEPDIR) to its actual value in the
680 for file in `sed -n "
681 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
682 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
683 # Make sure the directory exists.
684 test -f "$dirpart/$file" && continue
685 fdir=`AS_DIRNAME(["$file"])`
686 AS_MKDIR_P([$dirpart/$fdir])
687 # echo "creating $dirpart/$file"
688 echo '# dummy' > "$dirpart/$file"
692 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
695 # AM_OUTPUT_DEPENDENCY_COMMANDS
696 # -----------------------------
697 # This macro should only be invoked once -- use via AC_REQUIRE.
699 # This code is only required when automatic dependency tracking
700 # is enabled. FIXME. This creates each `.P' file that we will
701 # need in order to bootstrap the dependency handling code.
702 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
703 [AC_CONFIG_COMMANDS([depfiles],
704 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
705 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
708 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
709 # Free Software Foundation, Inc.
711 # This file is free software; the Free Software Foundation
712 # gives unlimited permission to copy and/or distribute it,
713 # with or without modifications, as long as this notice is preserved.
717 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
718 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
720 # Do all the work for Automake. -*- Autoconf -*-
722 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
723 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
725 # This file is free software; the Free Software Foundation
726 # gives unlimited permission to copy and/or distribute it,
727 # with or without modifications, as long as this notice is preserved.
731 # This macro actually does too much. Some checks are only needed if
732 # your package does certain things. But this isn't really a big deal.
734 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
735 # AM_INIT_AUTOMAKE([OPTIONS])
736 # -----------------------------------------------
737 # The call with PACKAGE and VERSION arguments is the old style
738 # call (pre autoconf-2.50), which is being phased out. PACKAGE
739 # and VERSION should now be passed to AC_INIT and removed from
740 # the call to AM_INIT_AUTOMAKE.
741 # We support both call styles for the transition. After
742 # the next Automake release, Autoconf can make the AC_INIT
743 # arguments mandatory, and then we can depend on a new Autoconf
744 # release and drop the old call support.
745 AC_DEFUN([AM_INIT_AUTOMAKE],
746 [AC_PREREQ([2.62])dnl
747 dnl Autoconf wants to disallow AM_ names. We explicitly allow
748 dnl the ones we care about.
749 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
750 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
751 AC_REQUIRE([AC_PROG_INSTALL])dnl
752 if test "`cd $srcdir && pwd`" != "`pwd`"; then
753 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
754 # is not polluted with repeated "-I."
755 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
756 # test to see if srcdir already configured
757 if test -f $srcdir/config.status; then
758 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
762 # test whether we have cygpath
763 if test -z "$CYGPATH_W"; then
764 if (cygpath --version) >/dev/null 2>/dev/null; then
765 CYGPATH_W='cygpath -w'
770 AC_SUBST([CYGPATH_W])
772 # Define the identity of the package.
773 dnl Distinguish between old-style and new-style calls.
775 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
776 AC_SUBST([PACKAGE], [$1])dnl
777 AC_SUBST([VERSION], [$2])],
778 [_AM_SET_OPTIONS([$1])dnl
779 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
780 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
781 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
782 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
783 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
785 _AM_IF_OPTION([no-define],,
786 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
787 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
789 # Some tools Automake needs.
790 AC_REQUIRE([AM_SANITY_CHECK])dnl
791 AC_REQUIRE([AC_ARG_PROGRAM])dnl
792 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
793 AM_MISSING_PROG(AUTOCONF, autoconf)
794 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
795 AM_MISSING_PROG(AUTOHEADER, autoheader)
796 AM_MISSING_PROG(MAKEINFO, makeinfo)
797 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
798 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
799 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
800 # We need awk for the "check" target. The system "awk" is bad on
802 AC_REQUIRE([AC_PROG_AWK])dnl
803 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
804 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
805 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
806 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
807 [_AM_PROG_TAR([v7])])])
808 _AM_IF_OPTION([no-dependencies],,
809 [AC_PROVIDE_IFELSE([AC_PROG_CC],
810 [_AM_DEPENDENCIES(CC)],
811 [define([AC_PROG_CC],
812 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
813 AC_PROVIDE_IFELSE([AC_PROG_CXX],
814 [_AM_DEPENDENCIES(CXX)],
815 [define([AC_PROG_CXX],
816 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
817 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
818 [_AM_DEPENDENCIES(OBJC)],
819 [define([AC_PROG_OBJC],
820 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
822 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
823 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
824 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
825 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
826 AC_CONFIG_COMMANDS_PRE(dnl
827 [m4_provide_if([_AM_COMPILER_EXEEXT],
828 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
831 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
832 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
833 dnl mangled by Autoconf and run in a shell conditional statement.
834 m4_define([_AC_COMPILER_EXEEXT],
835 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
838 # When config.status generates a header, we must update the stamp-h file.
839 # This file resides in the same directory as the config header
840 # that is generated. The stamp files are numbered to have different names.
842 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
843 # loop where config.status creates the headers, so we can generate
844 # our stamp files there.
845 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
846 [# Compute $1's index in $config_headers.
849 for _am_header in $config_headers :; do
851 $_am_arg | $_am_arg:* )
854 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
857 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
859 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
861 # This file is free software; the Free Software Foundation
862 # gives unlimited permission to copy and/or distribute it,
863 # with or without modifications, as long as this notice is preserved.
867 # Define $install_sh.
868 AC_DEFUN([AM_PROG_INSTALL_SH],
869 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
870 if test x"${install_sh}" != xset; then
873 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
875 install_sh="\${SHELL} $am_aux_dir/install-sh"
878 AC_SUBST(install_sh)])
880 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
882 # This file is free software; the Free Software Foundation
883 # gives unlimited permission to copy and/or distribute it,
884 # with or without modifications, as long as this notice is preserved.
888 # Check whether the underlying file-system supports filenames
889 # with a leading dot. For instance MS-DOS doesn't.
890 AC_DEFUN([AM_SET_LEADING_DOT],
891 [rm -rf .tst 2>/dev/null
892 mkdir .tst 2>/dev/null
893 if test -d .tst; then
898 rmdir .tst 2>/dev/null
899 AC_SUBST([am__leading_dot])])
901 # Check to see how 'make' treats includes. -*- Autoconf -*-
903 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
905 # This file is free software; the Free Software Foundation
906 # gives unlimited permission to copy and/or distribute it,
907 # with or without modifications, as long as this notice is preserved.
913 # Check to see how make treats includes.
914 AC_DEFUN([AM_MAKE_INCLUDE],
915 [am_make=${MAKE-make}
916 cat > confinc << 'END'
918 @echo this is the am__doit target
921 # If we don't find an include directive, just comment out the code.
922 AC_MSG_CHECKING([for style of include used by $am_make])
926 # First try GNU make style include.
927 echo "include confinc" > confmf
928 # Ignore all kinds of additional output from `make'.
929 case `$am_make -s -f confmf 2> /dev/null` in #(
930 *the\ am__doit\ target*)
936 # Now try BSD make style include.
937 if test "$am__include" = "#"; then
938 echo '.include "confinc"' > confmf
939 case `$am_make -s -f confmf 2> /dev/null` in #(
940 *the\ am__doit\ target*)
947 AC_SUBST([am__include])
948 AC_SUBST([am__quote])
949 AC_MSG_RESULT([$_am_result])
953 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
955 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
956 # Free Software Foundation, Inc.
958 # This file is free software; the Free Software Foundation
959 # gives unlimited permission to copy and/or distribute it,
960 # with or without modifications, as long as this notice is preserved.
964 # AM_MISSING_PROG(NAME, PROGRAM)
965 # ------------------------------
966 AC_DEFUN([AM_MISSING_PROG],
967 [AC_REQUIRE([AM_MISSING_HAS_RUN])
968 $1=${$1-"${am_missing_run}$2"}
974 # Define MISSING if not defined so far and test if it supports --run.
975 # If it does, set am_missing_run to use it, otherwise, to nothing.
976 AC_DEFUN([AM_MISSING_HAS_RUN],
977 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
978 AC_REQUIRE_AUX_FILE([missing])dnl
979 if test x"${MISSING+set}" != xset; then
982 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
984 MISSING="\${SHELL} $am_aux_dir/missing" ;;
987 # Use eval to expand $SHELL
988 if eval "$MISSING --run true"; then
989 am_missing_run="$MISSING --run "
992 AC_MSG_WARN([`missing' script is too old or missing])
996 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
998 # This file is free software; the Free Software Foundation
999 # gives unlimited permission to copy and/or distribute it,
1000 # with or without modifications, as long as this notice is preserved.
1004 # Check for `mkdir -p'.
1005 AC_DEFUN([AM_PROG_MKDIR_P],
1006 [AC_PREREQ([2.60])dnl
1007 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1008 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1009 dnl while keeping a definition of mkdir_p for backward compatibility.
1010 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1011 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1012 dnl Makefile.ins that do not define MKDIR_P, so we do our own
1013 dnl adjustment using top_builddir (which is defined more often than
1015 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1017 [[\\/$]]* | ?:[[\\/]]*) ;;
1018 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1022 # Helper functions for option handling. -*- Autoconf -*-
1024 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1026 # This file is free software; the Free Software Foundation
1027 # gives unlimited permission to copy and/or distribute it,
1028 # with or without modifications, as long as this notice is preserved.
1032 # _AM_MANGLE_OPTION(NAME)
1033 # -----------------------
1034 AC_DEFUN([_AM_MANGLE_OPTION],
1035 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1037 # _AM_SET_OPTION(NAME)
1038 # ------------------------------
1039 # Set option NAME. Presently that only means defining a flag for this option.
1040 AC_DEFUN([_AM_SET_OPTION],
1041 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1043 # _AM_SET_OPTIONS(OPTIONS)
1044 # ----------------------------------
1045 # OPTIONS is a space-separated list of Automake options.
1046 AC_DEFUN([_AM_SET_OPTIONS],
1047 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1049 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1050 # -------------------------------------------
1051 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1052 AC_DEFUN([_AM_IF_OPTION],
1053 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1055 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1057 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1058 # Free Software Foundation, Inc.
1060 # This file is free software; the Free Software Foundation
1061 # gives unlimited permission to copy and/or distribute it,
1062 # with or without modifications, as long as this notice is preserved.
1068 AC_DEFUN([AM_SANITY_CHECK],
1069 [AC_MSG_CHECKING([whether build environment is sane])
1072 echo timestamp > conftest.file
1073 # Reject unsafe characters in $srcdir or the absolute working directory
1074 # name. Accept space and tab only in the latter.
1078 *[[\\\"\#\$\&\'\`$am_lf]]*)
1079 AC_MSG_ERROR([unsafe absolute working directory name]);;
1082 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1083 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1086 # Do `set' in a subshell so we don't clobber the current shell's
1087 # arguments. Must try -L first in case configure is actually a
1088 # symlink; some systems play weird games with the mod time of symlinks
1089 # (eg FreeBSD returns the mod time of the symlink's containing
1092 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1093 if test "$[*]" = "X"; then
1095 set X `ls -t "$srcdir/configure" conftest.file`
1098 if test "$[*]" != "X $srcdir/configure conftest.file" \
1099 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1101 # If neither matched, then we have a broken ls. This can happen
1102 # if, for instance, CONFIG_SHELL is bash and it inherits a
1103 # broken ls alias from the environment. This has actually
1104 # happened. Such a system could not be considered "sane".
1105 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1106 alias in your environment])
1109 test "$[2]" = conftest.file
1115 AC_MSG_ERROR([newly created file is older than distributed files!
1116 Check your system clock])
1118 AC_MSG_RESULT(yes)])
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_STRIP
1127 # ---------------------
1128 # One issue with vendor `install' (even GNU) is that you can't
1129 # specify the program used to strip binaries. This is especially
1130 # annoying in cross-compiling environments, where the build's strip
1131 # is unlikely to handle the host's binaries.
1132 # Fortunately install-sh will honor a STRIPPROG variable, so we
1133 # always use install-sh in `make install-strip', and initialize
1134 # STRIPPROG with the value of the STRIP variable (set by the user).
1135 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1136 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1137 # Installed binaries are usually stripped using `strip' when the user
1138 # run `make install-strip'. However `strip' might not be the right
1139 # tool to use in cross-compilation environments, therefore Automake
1140 # will honor the `STRIP' environment variable to overrule this program.
1141 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1142 if test "$cross_compiling" != no; then
1143 AC_CHECK_TOOL([STRIP], [strip], :)
1145 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1146 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1148 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1150 # This file is free software; the Free Software Foundation
1151 # gives unlimited permission to copy and/or distribute it,
1152 # with or without modifications, as long as this notice is preserved.
1156 # _AM_SUBST_NOTMAKE(VARIABLE)
1157 # ---------------------------
1158 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1159 # This macro is traced by Automake.
1160 AC_DEFUN([_AM_SUBST_NOTMAKE])
1162 # AM_SUBST_NOTMAKE(VARIABLE)
1163 # ---------------------------
1164 # Public sister of _AM_SUBST_NOTMAKE.
1165 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1167 # Check how to create a tarball. -*- Autoconf -*-
1169 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1171 # This file is free software; the Free Software Foundation
1172 # gives unlimited permission to copy and/or distribute it,
1173 # with or without modifications, as long as this notice is preserved.
1177 # _AM_PROG_TAR(FORMAT)
1178 # --------------------
1179 # Check how to create a tarball in format FORMAT.
1180 # FORMAT should be one of `v7', `ustar', or `pax'.
1182 # Substitute a variable $(am__tar) that is a command
1183 # writing to stdout a FORMAT-tarball containing the directory
1185 # tardir=directory && $(am__tar) > result.tar
1187 # Substitute a variable $(am__untar) that extract such
1188 # a tarball read from stdin.
1189 # $(am__untar) < result.tar
1190 AC_DEFUN([_AM_PROG_TAR],
1191 [# Always define AMTAR for backward compatibility.
1192 AM_MISSING_PROG([AMTAR], [tar])
1194 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1195 [m4_case([$1], [ustar],, [pax],,
1196 [m4_fatal([Unknown tar format])])
1197 AC_MSG_CHECKING([how to create a $1 tar archive])
1198 # Loop over all known methods to create a tar archive until one works.
1199 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1200 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1201 # Do not fold the above two line into one, because Tru64 sh and
1202 # Solaris sh will not grok spaces in the rhs of `-'.
1203 for _am_tool in $_am_tools
1207 for _am_tar in tar gnutar gtar;
1209 AM_RUN_LOG([$_am_tar --version]) && break
1211 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1212 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1213 am__untar="$_am_tar -xf -"
1216 # Must skip GNU tar: if it does not support --format= it doesn't create
1217 # ustar tarball either.
1218 (tar --version) >/dev/null 2>&1 && continue
1219 am__tar='tar chf - "$$tardir"'
1220 am__tar_='tar chf - "$tardir"'
1221 am__untar='tar xf -'
1224 am__tar='pax -L -x $1 -w "$$tardir"'
1225 am__tar_='pax -L -x $1 -w "$tardir"'
1229 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1230 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1231 am__untar='cpio -i -H $1 -d'
1240 # If the value was cached, stop now. We just wanted to have am__tar
1241 # and am__untar set.
1242 test -n "${am_cv_prog_tar_$1}" && break
1244 # tar/untar a dummy directory, and stop if the command works
1247 echo GrepMe > conftest.dir/file
1248 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1250 if test -s conftest.tar; then
1251 AM_RUN_LOG([$am__untar <conftest.tar])
1252 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1257 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1258 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1260 AC_SUBST([am__untar])
1263 m4_include([m4/gettext.m4])
1264 m4_include([m4/iconv.m4])
1265 m4_include([m4/lib-ld.m4])
1266 m4_include([m4/lib-link.m4])
1267 m4_include([m4/lib-prefix.m4])
1268 m4_include([m4/nls.m4])
1269 m4_include([m4/po.m4])
1270 m4_include([m4/progtest.m4])
1271 m4_include([acinclude.m4])