1 # generated automatically by aclocal 1.11.5 -*- 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.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
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 # Configure paths for SDL
24 # Sam Lantinga 9/21/99
25 # stolen from Manish Singh
26 # stolen back from Frank Belew
27 # stolen from Manish Singh
28 # Shamelessly stolen from Owen Taylor
30 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
31 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
33 AC_DEFUN([AM_PATH_SDL],
35 dnl Get the cflags and libraries from the sdl-config script
37 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
38 sdl_prefix="$withval", sdl_prefix="")
39 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
40 sdl_exec_prefix="$withval", sdl_exec_prefix="")
41 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
44 if test x$sdl_exec_prefix != x ; then
45 sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
46 if test x${SDL_CONFIG+set} != xset ; then
47 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
50 if test x$sdl_prefix != x ; then
51 sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
52 if test x${SDL_CONFIG+set} != xset ; then
53 SDL_CONFIG=$sdl_prefix/bin/sdl-config
58 if test "x$prefix" != xNONE; then
59 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
61 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
63 min_sdl_version=ifelse([$1], ,0.11.0,$1)
64 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
66 if test "$SDL_CONFIG" = "no" ; then
69 SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
70 SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
72 sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
73 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
74 sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
75 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
76 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
77 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
78 if test "x$enable_sdltest" = "xyes" ; then
79 ac_save_CFLAGS="$CFLAGS"
80 ac_save_CXXFLAGS="$CXXFLAGS"
82 CFLAGS="$CFLAGS $SDL_CFLAGS"
83 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
84 LIBS="$LIBS $SDL_LIBS"
86 dnl Now check if the installed SDL is sufficiently new. (Also sanity
87 dnl checks the results of sdl-config to some extent
103 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
104 strcpy (new_str, str);
112 int main (int argc, char *argv[])
114 int major, minor, micro;
117 /* This hangs on some systems (?)
118 system ("touch conf.sdltest");
120 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
122 /* HP/UX 9 (%@#!) writes to sscanf strings */
123 tmp_version = my_strdup("$min_sdl_version");
124 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
125 printf("%s, bad version string\n", "$min_sdl_version");
129 if (($sdl_major_version > major) ||
130 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
131 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
137 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
138 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
139 printf("*** best to upgrade to the required version.\n");
140 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
141 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
142 printf("*** config.cache before re-running configure\n");
147 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
148 CFLAGS="$ac_save_CFLAGS"
149 CXXFLAGS="$ac_save_CXXFLAGS"
153 if test "x$no_sdl" = x ; then
155 ifelse([$2], , :, [$2])
158 if test "$SDL_CONFIG" = "no" ; then
159 echo "*** The sdl-config script installed by SDL could not be found"
160 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
161 echo "*** your path, or set the SDL_CONFIG environment variable to the"
162 echo "*** full path to sdl-config."
164 if test -f conf.sdltest ; then
167 echo "*** Could not run SDL test program, checking why..."
168 CFLAGS="$CFLAGS $SDL_CFLAGS"
169 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
170 LIBS="$LIBS $SDL_LIBS"
175 int main(int argc, char *argv[])
178 #define main K_and_R_C_main
180 [ echo "*** The test program compiled, but did not run. This usually means"
181 echo "*** that the run-time linker is not finding SDL or finding the wrong"
182 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
183 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
184 echo "*** to the installed location Also, make sure you have run ldconfig if that"
185 echo "*** is required on your system"
187 echo "*** If you have an old version installed, it is best to remove it, although"
188 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
189 [ echo "*** The test program failed to compile or link. See the file config.log for the"
190 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
191 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
192 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
193 CFLAGS="$ac_save_CFLAGS"
194 CXXFLAGS="$ac_save_CXXFLAGS"
200 ifelse([$3], , :, [$3])
207 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
210 # This file is free software; the Free Software Foundation
211 # gives unlimited permission to copy and/or distribute it,
212 # with or without modifications, as long as this notice is preserved.
216 # AM_AUTOMAKE_VERSION(VERSION)
217 # ----------------------------
218 # Automake X.Y traces this macro to ensure aclocal.m4 has been
219 # generated from the m4 files accompanying Automake X.Y.
220 # (This private macro should not be called outside this file.)
221 AC_DEFUN([AM_AUTOMAKE_VERSION],
222 [am__api_version='1.11'
223 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
224 dnl require some minimum version. Point them to the right macro.
225 m4_if([$1], [1.11.5], [],
226 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
229 # _AM_AUTOCONF_VERSION(VERSION)
230 # -----------------------------
231 # aclocal traces this macro to find the Autoconf version.
232 # This is a private macro too. Using m4_define simplifies
233 # the logic in aclocal, which can simply ignore this definition.
234 m4_define([_AM_AUTOCONF_VERSION], [])
236 # AM_SET_CURRENT_AUTOMAKE_VERSION
237 # -------------------------------
238 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
239 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
240 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
241 [AM_AUTOMAKE_VERSION([1.11.5])dnl
242 m4_ifndef([AC_AUTOCONF_VERSION],
243 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
244 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
246 # Figure out how to run the assembler. -*- Autoconf -*-
248 # Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
250 # This file is free software; the Free Software Foundation
251 # gives unlimited permission to copy and/or distribute it,
252 # with or without modifications, as long as this notice is preserved.
258 AC_DEFUN([AM_PROG_AS],
259 [# By default we simply use the C compiler to build assembly code.
260 AC_REQUIRE([AC_PROG_CC])
261 test "${CCAS+set}" = set || CCAS=$CC
262 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
263 AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
264 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
265 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
268 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
270 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
272 # This file is free software; the Free Software Foundation
273 # gives unlimited permission to copy and/or distribute it,
274 # with or without modifications, as long as this notice is preserved.
278 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
279 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
280 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
282 # Of course, Automake must honor this variable whenever it calls a
283 # tool from the auxiliary directory. The problem is that $srcdir (and
284 # therefore $ac_aux_dir as well) can be either absolute or relative,
285 # depending on how configure is run. This is pretty annoying, since
286 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
287 # source directory, any form will work fine, but in subdirectories a
288 # relative path needs to be adjusted first.
290 # $ac_aux_dir/missing
291 # fails when called from a subdirectory if $ac_aux_dir is relative
292 # $top_srcdir/$ac_aux_dir/missing
293 # fails if $ac_aux_dir is absolute,
294 # fails when called from a subdirectory in a VPATH build with
295 # a relative $ac_aux_dir
297 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
298 # are both prefixed by $srcdir. In an in-source build this is usually
299 # harmless because $srcdir is `.', but things will broke when you
300 # start a VPATH build or use an absolute $srcdir.
302 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
303 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
304 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
305 # and then we would define $MISSING as
306 # MISSING="\${SHELL} $am_aux_dir/missing"
307 # This will work as long as MISSING is not called from configure, because
308 # unfortunately $(top_srcdir) has no meaning in configure.
309 # However there are other variables, like CC, which are often used in
310 # configure, and could therefore not use this "fixed" $ac_aux_dir.
312 # Another solution, used here, is to always expand $ac_aux_dir to an
313 # absolute PATH. The drawback is that using absolute paths prevent a
314 # configured tree to be moved without reconfiguration.
316 AC_DEFUN([AM_AUX_DIR_EXPAND],
317 [dnl Rely on autoconf to set up CDPATH properly.
319 # expand $ac_aux_dir to an absolute path
320 am_aux_dir=`cd $ac_aux_dir && pwd`
323 # AM_COND_IF -*- Autoconf -*-
325 # Copyright (C) 2008, 2010 Free Software Foundation, Inc.
327 # This file is free software; the Free Software Foundation
328 # gives unlimited permission to copy and/or distribute it,
329 # with or without modifications, as long as this notice is preserved.
337 # These macros are only used for tracing.
338 m4_define([_AM_COND_IF])
339 m4_define([_AM_COND_ELSE])
340 m4_define([_AM_COND_ENDIF])
343 # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
344 # ---------------------------------------
345 # If the shell condition COND is true, execute IF-TRUE, otherwise execute
346 # IF-FALSE. Allow automake to learn about conditional instantiating macros
347 # (the AC_CONFIG_FOOS).
348 AC_DEFUN([AM_COND_IF],
349 [m4_ifndef([_AM_COND_VALUE_$1],
350 [m4_fatal([$0: no such condition "$1"])])dnl
352 if test -z "$$1_TRUE"; then :
355 [_AM_COND_ELSE([$1])dnl
359 _AM_COND_ENDIF([$1])dnl
363 # AM_CONDITIONAL -*- Autoconf -*-
365 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
366 # 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 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
375 # -------------------------------------
376 # Define a conditional.
377 AC_DEFUN([AM_CONDITIONAL],
379 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
380 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
381 AC_SUBST([$1_TRUE])dnl
382 AC_SUBST([$1_FALSE])dnl
383 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
384 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
385 m4_define([_AM_COND_VALUE_$1], [$2])dnl
393 AC_CONFIG_COMMANDS_PRE(
394 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
395 AC_MSG_ERROR([[conditional "$1" was never defined.
396 Usually this means the macro was only invoked conditionally.]])
399 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
400 # 2010, 2011 Free Software Foundation, Inc.
402 # This file is free software; the Free Software Foundation
403 # gives unlimited permission to copy and/or distribute it,
404 # with or without modifications, as long as this notice is preserved.
408 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
409 # written in clear, in which case automake, when reading aclocal.m4,
410 # will think it sees a *use*, and therefore will trigger all it's
411 # C support machinery. Also note that it means that autoscan, seeing
412 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
415 # _AM_DEPENDENCIES(NAME)
416 # ----------------------
417 # See how the compiler implements dependency checking.
418 # NAME is "CC", "CXX", "GCJ", or "OBJC".
419 # We try a few techniques and use that to set a single cache variable.
421 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
422 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
423 # dependency, and given that the user is not expected to run this macro,
424 # just rely on AC_PROG_CC.
425 AC_DEFUN([_AM_DEPENDENCIES],
426 [AC_REQUIRE([AM_SET_DEPDIR])dnl
427 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
428 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
429 AC_REQUIRE([AM_DEP_TRACK])dnl
431 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
432 [$1], CXX, [depcc="$CXX" am_compiler_list=],
433 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
434 [$1], UPC, [depcc="$UPC" am_compiler_list=],
435 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
436 [depcc="$$1" am_compiler_list=])
438 AC_CACHE_CHECK([dependency style of $depcc],
439 [am_cv_$1_dependencies_compiler_type],
440 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
441 # We make a subdir and do the tests there. Otherwise we can end up
442 # making bogus files that we don't know about and never remove. For
443 # instance it was reported that on HP-UX the gcc test will end up
444 # making a dummy file named `D' -- because `-MD' means `put the output
448 # Copy depcomp to subdir because otherwise we won't find it if we're
449 # using a relative directory.
450 cp "$am_depcomp" conftest.dir
452 # We will build objects and dependencies in a subdirectory because
453 # it helps to detect inapplicable dependency modes. For instance
454 # both Tru64's cc and ICC support -MD to output dependencies as a
455 # side effect of compilation, but ICC will put the dependencies in
456 # the current directory while Tru64 will put them in the object
460 am_cv_$1_dependencies_compiler_type=none
461 if test "$am_compiler_list" = ""; then
462 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
466 [case " $depcc " in #(
467 *\ -arch\ *\ -arch\ *) am__universal=true ;;
470 [case " $depcc " in #(
471 *\ -arch\ *\ -arch\ *) am__universal=true ;;
474 for depmode in $am_compiler_list; do
475 # Setup a source with many dependencies, because some compilers
476 # like to wrap large dependency lists on column 80 (with \), and
477 # we should not choose a depcomp mode which is confused by this.
479 # We need to recreate these files for each test, as the compiler may
480 # overwrite some of them when testing with obscure command lines.
481 # This happens at least with the AIX C compiler.
483 for i in 1 2 3 4 5 6; do
484 echo '#include "conftst'$i'.h"' >> sub/conftest.c
485 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
486 # Solaris 8's {/usr,}/bin/sh.
487 touch sub/conftst$i.h
489 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
491 # We check with `-c' and `-o' for the sake of the "dashmstdout"
492 # mode. It turns out that the SunPro C++ compiler does not properly
493 # handle `-M -o', and we need to detect this. Also, some Intel
494 # versions had trouble with output in subdirs
495 am__obj=sub/conftest.${OBJEXT-o}
496 am__minus_obj="-o $am__obj"
499 # This depmode causes a compiler race in universal mode.
500 test "$am__universal" = false || continue
503 # after this tag, mechanisms are not by side-effect, so they'll
504 # only be used when explicitly requested
505 if test "x$enable_dependency_tracking" = xyes; then
511 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
512 # This compiler won't grok `-c -o', but also, the minuso test has
513 # not run yet. These depmodes are late enough in the game, and
514 # so weak that their functioning should not be impacted.
515 am__obj=conftest.${OBJEXT-o}
520 if depmode=$depmode \
521 source=sub/conftest.c object=$am__obj \
522 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
523 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
524 >/dev/null 2>conftest.err &&
525 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
526 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
527 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
528 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
529 # icc doesn't choke on unknown options, it will just issue warnings
530 # or remarks (even with -Werror). So we grep stderr for any message
531 # that says an option was ignored or not supported.
532 # When given -MP, icc 7.0 and 7.1 complain thusly:
533 # icc: Command line warning: ignoring option '-M'; no argument required
534 # The diagnosis changed in icc 8.0:
535 # icc: Command line remark: option '-MP' not supported
536 if (grep 'ignoring option' conftest.err ||
537 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
538 am_cv_$1_dependencies_compiler_type=$depmode
547 am_cv_$1_dependencies_compiler_type=none
550 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
551 AM_CONDITIONAL([am__fastdep$1], [
552 test "x$enable_dependency_tracking" != xno \
553 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
559 # Choose a directory name for dependency files.
560 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
561 AC_DEFUN([AM_SET_DEPDIR],
562 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
563 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
569 AC_DEFUN([AM_DEP_TRACK],
570 [AC_ARG_ENABLE(dependency-tracking,
571 [ --disable-dependency-tracking speeds up one-time build
572 --enable-dependency-tracking do not reject slow dependency extractors])
573 if test "x$enable_dependency_tracking" != xno; then
574 am_depcomp="$ac_aux_dir/depcomp"
578 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
579 AC_SUBST([AMDEPBACKSLASH])dnl
580 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
581 AC_SUBST([am__nodep])dnl
582 _AM_SUBST_NOTMAKE([am__nodep])dnl
585 # Generate code to set up dependency tracking. -*- Autoconf -*-
587 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
588 # Free Software Foundation, Inc.
590 # This file is free software; the Free Software Foundation
591 # gives unlimited permission to copy and/or distribute it,
592 # with or without modifications, as long as this notice is preserved.
596 # _AM_OUTPUT_DEPENDENCY_COMMANDS
597 # ------------------------------
598 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
600 # Autoconf 2.62 quotes --file arguments for eval, but not when files
601 # are listed without --file. Let's play safe and only enable the eval
602 # if we detect the quoting.
603 case $CONFIG_FILES in
604 *\'*) eval set x "$CONFIG_FILES" ;;
605 *) set x $CONFIG_FILES ;;
610 # Strip MF so we end up with the name of the file.
611 mf=`echo "$mf" | sed -e 's/:.*$//'`
612 # Check whether this is an Automake generated Makefile or not.
613 # We used to match only the files named `Makefile.in', but
614 # some people rename them; so instead we look at the file content.
615 # Grep'ing the first line is not enough: some people post-process
616 # each Makefile.in and add a new line on top of each file to say so.
617 # Grep'ing the whole file is not good either: AIX grep has a line
618 # limit of 2048, but all sed's we know have understand at least 4000.
619 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
620 dirpart=`AS_DIRNAME("$mf")`
624 # Extract the definition of DEPDIR, am__include, and am__quote
625 # from the Makefile without running `make'.
626 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
627 test -z "$DEPDIR" && continue
628 am__include=`sed -n 's/^am__include = //p' < "$mf"`
629 test -z "am__include" && continue
630 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
631 # When using ansi2knr, U may be empty or an underscore; expand it
632 U=`sed -n 's/^U = //p' < "$mf"`
633 # Find all dependency output files, they are included files with
634 # $(DEPDIR) in their names. We invoke sed twice because it is the
635 # simplest approach to changing $(DEPDIR) to its actual value in the
637 for file in `sed -n "
638 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
639 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
640 # Make sure the directory exists.
641 test -f "$dirpart/$file" && continue
642 fdir=`AS_DIRNAME(["$file"])`
643 AS_MKDIR_P([$dirpart/$fdir])
644 # echo "creating $dirpart/$file"
645 echo '# dummy' > "$dirpart/$file"
649 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
652 # AM_OUTPUT_DEPENDENCY_COMMANDS
653 # -----------------------------
654 # This macro should only be invoked once -- use via AC_REQUIRE.
656 # This code is only required when automatic dependency tracking
657 # is enabled. FIXME. This creates each `.P' file that we will
658 # need in order to bootstrap the dependency handling code.
659 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
660 [AC_CONFIG_COMMANDS([depfiles],
661 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
662 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
665 # Do all the work for Automake. -*- Autoconf -*-
667 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
668 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
670 # This file is free software; the Free Software Foundation
671 # gives unlimited permission to copy and/or distribute it,
672 # with or without modifications, as long as this notice is preserved.
676 # This macro actually does too much. Some checks are only needed if
677 # your package does certain things. But this isn't really a big deal.
679 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
680 # AM_INIT_AUTOMAKE([OPTIONS])
681 # -----------------------------------------------
682 # The call with PACKAGE and VERSION arguments is the old style
683 # call (pre autoconf-2.50), which is being phased out. PACKAGE
684 # and VERSION should now be passed to AC_INIT and removed from
685 # the call to AM_INIT_AUTOMAKE.
686 # We support both call styles for the transition. After
687 # the next Automake release, Autoconf can make the AC_INIT
688 # arguments mandatory, and then we can depend on a new Autoconf
689 # release and drop the old call support.
690 AC_DEFUN([AM_INIT_AUTOMAKE],
691 [AC_PREREQ([2.62])dnl
692 dnl Autoconf wants to disallow AM_ names. We explicitly allow
693 dnl the ones we care about.
694 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
695 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
696 AC_REQUIRE([AC_PROG_INSTALL])dnl
697 if test "`cd $srcdir && pwd`" != "`pwd`"; then
698 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
699 # is not polluted with repeated "-I."
700 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
701 # test to see if srcdir already configured
702 if test -f $srcdir/config.status; then
703 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
707 # test whether we have cygpath
708 if test -z "$CYGPATH_W"; then
709 if (cygpath --version) >/dev/null 2>/dev/null; then
710 CYGPATH_W='cygpath -w'
715 AC_SUBST([CYGPATH_W])
717 # Define the identity of the package.
718 dnl Distinguish between old-style and new-style calls.
720 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
721 AC_SUBST([PACKAGE], [$1])dnl
722 AC_SUBST([VERSION], [$2])],
723 [_AM_SET_OPTIONS([$1])dnl
724 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
725 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
726 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
727 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
728 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
730 _AM_IF_OPTION([no-define],,
731 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
732 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
734 # Some tools Automake needs.
735 AC_REQUIRE([AM_SANITY_CHECK])dnl
736 AC_REQUIRE([AC_ARG_PROGRAM])dnl
737 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
738 AM_MISSING_PROG(AUTOCONF, autoconf)
739 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
740 AM_MISSING_PROG(AUTOHEADER, autoheader)
741 AM_MISSING_PROG(MAKEINFO, makeinfo)
742 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
743 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
744 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
745 # We need awk for the "check" target. The system "awk" is bad on
747 AC_REQUIRE([AC_PROG_AWK])dnl
748 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
749 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
750 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
751 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
752 [_AM_PROG_TAR([v7])])])
753 _AM_IF_OPTION([no-dependencies],,
754 [AC_PROVIDE_IFELSE([AC_PROG_CC],
755 [_AM_DEPENDENCIES(CC)],
756 [define([AC_PROG_CC],
757 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
758 AC_PROVIDE_IFELSE([AC_PROG_CXX],
759 [_AM_DEPENDENCIES(CXX)],
760 [define([AC_PROG_CXX],
761 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
762 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
763 [_AM_DEPENDENCIES(OBJC)],
764 [define([AC_PROG_OBJC],
765 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
767 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
768 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
769 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
770 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
771 AC_CONFIG_COMMANDS_PRE(dnl
772 [m4_provide_if([_AM_COMPILER_EXEEXT],
773 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
776 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
777 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
778 dnl mangled by Autoconf and run in a shell conditional statement.
779 m4_define([_AC_COMPILER_EXEEXT],
780 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
783 # When config.status generates a header, we must update the stamp-h file.
784 # This file resides in the same directory as the config header
785 # that is generated. The stamp files are numbered to have different names.
787 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
788 # loop where config.status creates the headers, so we can generate
789 # our stamp files there.
790 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
791 [# Compute $1's index in $config_headers.
794 for _am_header in $config_headers :; do
796 $_am_arg | $_am_arg:* )
799 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
802 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
804 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
807 # This file is free software; the Free Software Foundation
808 # gives unlimited permission to copy and/or distribute it,
809 # with or without modifications, as long as this notice is preserved.
815 # Define $install_sh.
816 AC_DEFUN([AM_PROG_INSTALL_SH],
817 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
818 if test x"${install_sh}" != xset; then
821 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
823 install_sh="\${SHELL} $am_aux_dir/install-sh"
826 AC_SUBST(install_sh)])
828 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
830 # This file is free software; the Free Software Foundation
831 # gives unlimited permission to copy and/or distribute it,
832 # with or without modifications, as long as this notice is preserved.
836 # Check whether the underlying file-system supports filenames
837 # with a leading dot. For instance MS-DOS doesn't.
838 AC_DEFUN([AM_SET_LEADING_DOT],
839 [rm -rf .tst 2>/dev/null
840 mkdir .tst 2>/dev/null
841 if test -d .tst; then
846 rmdir .tst 2>/dev/null
847 AC_SUBST([am__leading_dot])])
849 # Check to see how 'make' treats includes. -*- Autoconf -*-
851 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
853 # This file is free software; the Free Software Foundation
854 # gives unlimited permission to copy and/or distribute it,
855 # with or without modifications, as long as this notice is preserved.
861 # Check to see how make treats includes.
862 AC_DEFUN([AM_MAKE_INCLUDE],
863 [am_make=${MAKE-make}
864 cat > confinc << 'END'
866 @echo this is the am__doit target
869 # If we don't find an include directive, just comment out the code.
870 AC_MSG_CHECKING([for style of include used by $am_make])
874 # First try GNU make style include.
875 echo "include confinc" > confmf
876 # Ignore all kinds of additional output from `make'.
877 case `$am_make -s -f confmf 2> /dev/null` in #(
878 *the\ am__doit\ target*)
884 # Now try BSD make style include.
885 if test "$am__include" = "#"; then
886 echo '.include "confinc"' > confmf
887 case `$am_make -s -f confmf 2> /dev/null` in #(
888 *the\ am__doit\ target*)
895 AC_SUBST([am__include])
896 AC_SUBST([am__quote])
897 AC_MSG_RESULT([$_am_result])
901 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
903 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
904 # Free Software Foundation, Inc.
906 # This file is free software; the Free Software Foundation
907 # gives unlimited permission to copy and/or distribute it,
908 # with or without modifications, as long as this notice is preserved.
912 # AM_MISSING_PROG(NAME, PROGRAM)
913 # ------------------------------
914 AC_DEFUN([AM_MISSING_PROG],
915 [AC_REQUIRE([AM_MISSING_HAS_RUN])
916 $1=${$1-"${am_missing_run}$2"}
922 # Define MISSING if not defined so far and test if it supports --run.
923 # If it does, set am_missing_run to use it, otherwise, to nothing.
924 AC_DEFUN([AM_MISSING_HAS_RUN],
925 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
926 AC_REQUIRE_AUX_FILE([missing])dnl
927 if test x"${MISSING+set}" != xset; then
930 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
932 MISSING="\${SHELL} $am_aux_dir/missing" ;;
935 # Use eval to expand $SHELL
936 if eval "$MISSING --run true"; then
937 am_missing_run="$MISSING --run "
940 AC_MSG_WARN([`missing' script is too old or missing])
944 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
947 # This file is free software; the Free Software Foundation
948 # gives unlimited permission to copy and/or distribute it,
949 # with or without modifications, as long as this notice is preserved.
955 # Check for `mkdir -p'.
956 AC_DEFUN([AM_PROG_MKDIR_P],
957 [AC_PREREQ([2.60])dnl
958 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
959 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
960 dnl while keeping a definition of mkdir_p for backward compatibility.
961 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
962 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
963 dnl Makefile.ins that do not define MKDIR_P, so we do our own
964 dnl adjustment using top_builddir (which is defined more often than
966 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
968 [[\\/$]]* | ?:[[\\/]]*) ;;
969 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
973 # Helper functions for option handling. -*- Autoconf -*-
975 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
978 # This file is free software; the Free Software Foundation
979 # gives unlimited permission to copy and/or distribute it,
980 # with or without modifications, as long as this notice is preserved.
984 # _AM_MANGLE_OPTION(NAME)
985 # -----------------------
986 AC_DEFUN([_AM_MANGLE_OPTION],
987 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
989 # _AM_SET_OPTION(NAME)
990 # --------------------
991 # Set option NAME. Presently that only means defining a flag for this option.
992 AC_DEFUN([_AM_SET_OPTION],
993 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
995 # _AM_SET_OPTIONS(OPTIONS)
996 # ------------------------
997 # OPTIONS is a space-separated list of Automake options.
998 AC_DEFUN([_AM_SET_OPTIONS],
999 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1001 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1002 # -------------------------------------------
1003 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1004 AC_DEFUN([_AM_IF_OPTION],
1005 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1007 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1009 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1010 # Free Software Foundation, Inc.
1012 # This file is free software; the Free Software Foundation
1013 # gives unlimited permission to copy and/or distribute it,
1014 # with or without modifications, as long as this notice is preserved.
1020 AC_DEFUN([AM_SANITY_CHECK],
1021 [AC_MSG_CHECKING([whether build environment is sane])
1024 echo timestamp > conftest.file
1025 # Reject unsafe characters in $srcdir or the absolute working directory
1026 # name. Accept space and tab only in the latter.
1030 *[[\\\"\#\$\&\'\`$am_lf]]*)
1031 AC_MSG_ERROR([unsafe absolute working directory name]);;
1034 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1035 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1038 # Do `set' in a subshell so we don't clobber the current shell's
1039 # arguments. Must try -L first in case configure is actually a
1040 # symlink; some systems play weird games with the mod time of symlinks
1041 # (eg FreeBSD returns the mod time of the symlink's containing
1044 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1045 if test "$[*]" = "X"; then
1047 set X `ls -t "$srcdir/configure" conftest.file`
1050 if test "$[*]" != "X $srcdir/configure conftest.file" \
1051 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1053 # If neither matched, then we have a broken ls. This can happen
1054 # if, for instance, CONFIG_SHELL is bash and it inherits a
1055 # broken ls alias from the environment. This has actually
1056 # happened. Such a system could not be considered "sane".
1057 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1058 alias in your environment])
1061 test "$[2]" = conftest.file
1067 AC_MSG_ERROR([newly created file is older than distributed files!
1068 Check your system clock])
1070 AC_MSG_RESULT(yes)])
1072 # Copyright (C) 2009, 2011 Free Software Foundation, Inc.
1074 # This file is free software; the Free Software Foundation
1075 # gives unlimited permission to copy and/or distribute it,
1076 # with or without modifications, as long as this notice is preserved.
1080 # AM_SILENT_RULES([DEFAULT])
1081 # --------------------------
1082 # Enable less verbose build rules; with the default set to DEFAULT
1083 # (`yes' being less verbose, `no' or empty being verbose).
1084 AC_DEFUN([AM_SILENT_RULES],
1085 [AC_ARG_ENABLE([silent-rules],
1086 [ --enable-silent-rules less verbose build output (undo: `make V=1')
1087 --disable-silent-rules verbose build output (undo: `make V=0')])
1088 case $enable_silent_rules in
1089 yes) AM_DEFAULT_VERBOSITY=0;;
1090 no) AM_DEFAULT_VERBOSITY=1;;
1091 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1094 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
1095 dnl do not support nested variable expansions.
1096 dnl See automake bug#9928 and bug#10237.
1097 am_make=${MAKE-make}
1098 AC_CACHE_CHECK([whether $am_make supports nested variables],
1099 [am_cv_make_support_nested_variables],
1100 [if AS_ECHO([['TRUE=$(BAR$(V))
1106 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1107 am_cv_make_support_nested_variables=yes
1109 am_cv_make_support_nested_variables=no
1111 if test $am_cv_make_support_nested_variables = yes; then
1112 dnl Using `$V' instead of `$(V)' breaks IRIX make.
1114 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1116 AM_V=$AM_DEFAULT_VERBOSITY
1117 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1120 AM_SUBST_NOTMAKE([AM_V])dnl
1121 AC_SUBST([AM_DEFAULT_V])dnl
1122 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1123 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1125 AC_SUBST([AM_BACKSLASH])dnl
1126 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1129 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1131 # This file is free software; the Free Software Foundation
1132 # gives unlimited permission to copy and/or distribute it,
1133 # with or without modifications, as long as this notice is preserved.
1137 # AM_PROG_INSTALL_STRIP
1138 # ---------------------
1139 # One issue with vendor `install' (even GNU) is that you can't
1140 # specify the program used to strip binaries. This is especially
1141 # annoying in cross-compiling environments, where the build's strip
1142 # is unlikely to handle the host's binaries.
1143 # Fortunately install-sh will honor a STRIPPROG variable, so we
1144 # always use install-sh in `make install-strip', and initialize
1145 # STRIPPROG with the value of the STRIP variable (set by the user).
1146 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1147 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1148 # Installed binaries are usually stripped using `strip' when the user
1149 # run `make install-strip'. However `strip' might not be the right
1150 # tool to use in cross-compilation environments, therefore Automake
1151 # will honor the `STRIP' environment variable to overrule this program.
1152 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1153 if test "$cross_compiling" != no; then
1154 AC_CHECK_TOOL([STRIP], [strip], :)
1156 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1157 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1159 # Copyright (C) 2006, 2008, 2010 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 # _AM_SUBST_NOTMAKE(VARIABLE)
1168 # ---------------------------
1169 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1170 # This macro is traced by Automake.
1171 AC_DEFUN([_AM_SUBST_NOTMAKE])
1173 # AM_SUBST_NOTMAKE(VARIABLE)
1174 # --------------------------
1175 # Public sister of _AM_SUBST_NOTMAKE.
1176 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1178 # Check how to create a tarball. -*- Autoconf -*-
1180 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1182 # This file is free software; the Free Software Foundation
1183 # gives unlimited permission to copy and/or distribute it,
1184 # with or without modifications, as long as this notice is preserved.
1188 # _AM_PROG_TAR(FORMAT)
1189 # --------------------
1190 # Check how to create a tarball in format FORMAT.
1191 # FORMAT should be one of `v7', `ustar', or `pax'.
1193 # Substitute a variable $(am__tar) that is a command
1194 # writing to stdout a FORMAT-tarball containing the directory
1196 # tardir=directory && $(am__tar) > result.tar
1198 # Substitute a variable $(am__untar) that extract such
1199 # a tarball read from stdin.
1200 # $(am__untar) < result.tar
1201 AC_DEFUN([_AM_PROG_TAR],
1202 [# Always define AMTAR for backward compatibility. Yes, it's still used
1203 # in the wild :-( We should find a proper way to deprecate it ...
1204 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1206 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1207 [m4_case([$1], [ustar],, [pax],,
1208 [m4_fatal([Unknown tar format])])
1209 AC_MSG_CHECKING([how to create a $1 tar archive])
1210 # Loop over all known methods to create a tar archive until one works.
1211 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1212 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1213 # Do not fold the above two line into one, because Tru64 sh and
1214 # Solaris sh will not grok spaces in the rhs of `-'.
1215 for _am_tool in $_am_tools
1219 for _am_tar in tar gnutar gtar;
1221 AM_RUN_LOG([$_am_tar --version]) && break
1223 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1224 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1225 am__untar="$_am_tar -xf -"
1228 # Must skip GNU tar: if it does not support --format= it doesn't create
1229 # ustar tarball either.
1230 (tar --version) >/dev/null 2>&1 && continue
1231 am__tar='tar chf - "$$tardir"'
1232 am__tar_='tar chf - "$tardir"'
1233 am__untar='tar xf -'
1236 am__tar='pax -L -x $1 -w "$$tardir"'
1237 am__tar_='pax -L -x $1 -w "$tardir"'
1241 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1242 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1243 am__untar='cpio -i -H $1 -d'
1252 # If the value was cached, stop now. We just wanted to have am__tar
1253 # and am__untar set.
1254 test -n "${am_cv_prog_tar_$1}" && break
1256 # tar/untar a dummy directory, and stop if the command works
1259 echo GrepMe > conftest.dir/file
1260 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1262 if test -s conftest.tar; then
1263 AM_RUN_LOG([$am__untar <conftest.tar])
1264 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1269 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1270 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1272 AC_SUBST([am__untar])