12
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13
12
# PARTICULAR PURPOSE.
14
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15
15
m4_ifndef([AC_AUTOCONF_VERSION],
16
16
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18
18
[m4_warning([this file was generated for autoconf 2.69.
19
19
You have another version of autoconf. It may work, but is not guaranteed to.
20
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'.])])
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
23
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
23
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
26
25
# This file is free software; the Free Software Foundation
27
26
# gives unlimited permission to copy and/or distribute it,
28
27
# with or without modifications, as long as this notice is preserved.
32
29
# AM_AUTOMAKE_VERSION(VERSION)
33
30
# ----------------------------
34
31
# Automake X.Y traces this macro to ensure aclocal.m4 has been
35
32
# generated from the m4 files accompanying Automake X.Y.
36
33
# (This private macro should not be called outside this file.)
37
34
AC_DEFUN([AM_AUTOMAKE_VERSION],
38
[am__api_version='1.11'
35
[am__api_version='1.13'
39
36
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
40
37
dnl require some minimum version. Point them to the right macro.
41
m4_if([$1], [1.11.6], [],
38
m4_if([$1], [1.13.3], [],
42
39
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
54
51
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
55
52
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
56
53
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
57
[AM_AUTOMAKE_VERSION([1.11.6])dnl
54
[AM_AUTOMAKE_VERSION([1.13.3])dnl
58
55
m4_ifndef([AC_AUTOCONF_VERSION],
59
56
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
60
57
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
62
59
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
64
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
61
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
66
63
# This file is free software; the Free Software Foundation
67
64
# gives unlimited permission to copy and/or distribute it,
68
65
# with or without modifications, as long as this notice is preserved.
72
67
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
73
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
74
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
68
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
69
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
76
71
# Of course, Automake must honor this variable whenever it calls a
77
72
# tool from the auxiliary directory. The problem is that $srcdir (and
117
112
# AM_CONDITIONAL -*- Autoconf -*-
119
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
120
# Free Software Foundation, Inc.
114
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
122
116
# This file is free software; the Free Software Foundation
123
117
# gives unlimited permission to copy and/or distribute it,
124
118
# with or without modifications, as long as this notice is preserved.
128
120
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
129
121
# -------------------------------------
130
122
# Define a conditional.
131
123
AC_DEFUN([AM_CONDITIONAL],
133
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
134
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
124
[AC_PREREQ([2.52])dnl
125
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
126
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
135
127
AC_SUBST([$1_TRUE])dnl
136
128
AC_SUBST([$1_FALSE])dnl
137
129
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
205
194
# Define the identity of the package.
206
195
dnl Distinguish between old-style and new-style calls.
208
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
197
[AC_DIAGNOSE([obsolete],
198
[$0: two- and three-arguments forms are deprecated.])
199
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
209
200
AC_SUBST([PACKAGE], [$1])dnl
210
201
AC_SUBST([VERSION], [$2])],
211
202
[_AM_SET_OPTIONS([$1])dnl
212
203
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
213
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
205
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
214
207
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
215
208
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
216
209
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
218
211
_AM_IF_OPTION([no-define],,
219
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
220
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
212
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
213
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
222
215
# Some tools Automake needs.
223
216
AC_REQUIRE([AM_SANITY_CHECK])dnl
224
217
AC_REQUIRE([AC_ARG_PROGRAM])dnl
225
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
226
AM_MISSING_PROG(AUTOCONF, autoconf)
227
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
228
AM_MISSING_PROG(AUTOHEADER, autoheader)
229
AM_MISSING_PROG(MAKEINFO, makeinfo)
218
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
219
AM_MISSING_PROG([AUTOCONF], [autoconf])
220
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
221
AM_MISSING_PROG([AUTOHEADER], [autoheader])
222
AM_MISSING_PROG([MAKEINFO], [makeinfo])
230
223
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
231
224
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
232
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
225
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
226
# For better backward compatibility. To be removed once Automake 1.9.x
227
# dies out for good. For more background, see:
228
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
229
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
230
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
233
231
# We need awk for the "check" target. The system "awk" is bad on
234
232
# some platforms.
235
233
AC_REQUIRE([AC_PROG_AWK])dnl
240
238
[_AM_PROG_TAR([v7])])])
241
239
_AM_IF_OPTION([no-dependencies],,
242
240
[AC_PROVIDE_IFELSE([AC_PROG_CC],
243
[_AM_DEPENDENCIES(CC)],
244
[define([AC_PROG_CC],
245
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
241
[_AM_DEPENDENCIES([CC])],
242
[m4_define([AC_PROG_CC],
243
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
246
244
AC_PROVIDE_IFELSE([AC_PROG_CXX],
247
[_AM_DEPENDENCIES(CXX)],
248
[define([AC_PROG_CXX],
249
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
245
[_AM_DEPENDENCIES([CXX])],
246
[m4_define([AC_PROG_CXX],
247
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
250
248
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
251
[_AM_DEPENDENCIES(OBJC)],
252
[define([AC_PROG_OBJC],
253
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
249
[_AM_DEPENDENCIES([OBJC])],
250
[m4_define([AC_PROG_OBJC],
251
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
252
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
253
[_AM_DEPENDENCIES([OBJCXX])],
254
[m4_define([AC_PROG_OBJCXX],
255
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
255
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
256
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
257
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
258
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
257
AC_REQUIRE([AM_SILENT_RULES])dnl
258
dnl The testsuite driver may need to know about EXEEXT, so add the
259
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
260
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
259
261
AC_CONFIG_COMMANDS_PRE(dnl
260
262
[m4_provide_if([_AM_COMPILER_EXEEXT],
261
263
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
264
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
266
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
265
267
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
266
268
dnl mangled by Autoconf and run in a shell conditional statement.
267
269
m4_define([_AC_COMPILER_EXEEXT],
337
334
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
338
335
# From Jim Meyering
340
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
341
# 2011 Free Software Foundation, Inc.
337
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
343
339
# This file is free software; the Free Software Foundation
344
340
# gives unlimited permission to copy and/or distribute it,
345
341
# with or without modifications, as long as this notice is preserved.
349
343
# AM_MAINTAINER_MODE([DEFAULT-MODE])
350
344
# ----------------------------------
351
345
# Control maintainer-specific portions of Makefiles.
352
# Default is to disable them, unless `enable' is passed literally.
353
# For symmetry, `disable' may be passed as well. Anyway, the user
346
# Default is to disable them, unless 'enable' is passed literally.
347
# For symmetry, 'disable' may be passed as well. Anyway, the user
354
348
# can override the default with the --enable/--disable switch.
355
349
AC_DEFUN([AM_MAINTAINER_MODE],
356
350
[m4_case(m4_default([$1], [disable]),
361
355
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
362
356
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
363
357
AC_ARG_ENABLE([maintainer-mode],
364
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
365
(and sometimes confusing) to the casual installer],
366
[USE_MAINTAINER_MODE=$enableval],
367
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
358
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
359
am_maintainer_other[ make rules and dependencies not useful
360
(and sometimes confusing) to the casual installer])],
361
[USE_MAINTAINER_MODE=$enableval],
362
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
368
363
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
369
364
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
370
365
MAINT=$MAINTAINER_MODE_TRUE
411
400
# Use eval to expand $SHELL
412
if eval "$MISSING --run true"; then
413
am_missing_run="$MISSING --run "
401
if eval "$MISSING --is-lightweight"; then
402
am_missing_run="$MISSING "
416
AC_MSG_WARN([`missing' script is too old or missing])
405
AC_MSG_WARN(['missing' script is too old or missing])
420
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
423
# This file is free software; the Free Software Foundation
424
# gives unlimited permission to copy and/or distribute it,
425
# with or without modifications, as long as this notice is preserved.
431
# Check for `mkdir -p'.
432
AC_DEFUN([AM_PROG_MKDIR_P],
433
[AC_PREREQ([2.60])dnl
434
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
435
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
436
dnl while keeping a definition of mkdir_p for backward compatibility.
437
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
438
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
439
dnl Makefile.ins that do not define MKDIR_P, so we do our own
440
dnl adjustment using top_builddir (which is defined more often than
442
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
444
[[\\/$]]* | ?:[[\\/]]*) ;;
445
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
449
409
# Helper functions for option handling. -*- Autoconf -*-
451
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
411
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
454
413
# This file is free software; the Free Software Foundation
455
414
# gives unlimited permission to copy and/or distribute it,
456
415
# with or without modifications, as long as this notice is preserved.
460
417
# _AM_MANGLE_OPTION(NAME)
461
418
# -----------------------
462
419
AC_DEFUN([_AM_MANGLE_OPTION],
510
461
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
511
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
462
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
514
# Do `set' in a subshell so we don't clobber the current shell's
465
# Do 'set' in a subshell so we don't clobber the current shell's
515
466
# arguments. Must try -L first in case configure is actually a
516
467
# symlink; some systems play weird games with the mod time of symlinks
517
468
# (eg FreeBSD returns the mod time of the symlink's containing
520
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
521
if test "$[*]" = "X"; then
523
set X `ls -t "$srcdir/configure" conftest.file`
526
if test "$[*]" != "X $srcdir/configure conftest.file" \
527
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
529
# If neither matched, then we have a broken ls. This can happen
530
# if, for instance, CONFIG_SHELL is bash and it inherits a
531
# broken ls alias from the environment. This has actually
532
# happened. Such a system could not be considered "sane".
533
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
534
alias in your environment])
472
for am_try in 1 2; do
473
echo "timestamp, slept: $am_has_slept" > conftest.file
474
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
475
if test "$[*]" = "X"; then
477
set X `ls -t "$srcdir/configure" conftest.file`
479
if test "$[*]" != "X $srcdir/configure conftest.file" \
480
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
482
# If neither matched, then we have a broken ls. This can happen
483
# if, for instance, CONFIG_SHELL is bash and it inherits a
484
# broken ls alias from the environment. This has actually
485
# happened. Such a system could not be considered "sane".
486
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
487
alias in your environment])
489
if test "$[2]" = conftest.file || test $am_try -eq 2; then
537
496
test "$[2]" = conftest.file
543
502
AC_MSG_ERROR([newly created file is older than distributed files!
544
503
Check your system clock])
548
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
550
# This file is free software; the Free Software Foundation
551
# gives unlimited permission to copy and/or distribute it,
552
# with or without modifications, as long as this notice is preserved.
506
# If we didn't sleep, we still need to ensure time stamps of config.status and
507
# generated files are strictly newer.
509
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
513
AC_CONFIG_COMMANDS_PRE(
514
[AC_MSG_CHECKING([that generated files are newer than configure])
515
if test -n "$am_sleep_pid"; then
516
# Hide warnings about reused PIDs.
517
wait $am_sleep_pid 2>/dev/null
519
AC_MSG_RESULT([done])])
523
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
525
# This file is free software; the Free Software Foundation
526
# gives unlimited permission to copy and/or distribute it,
527
# with or without modifications, as long as this notice is preserved.
529
# AM_SILENT_RULES([DEFAULT])
530
# --------------------------
531
# Enable less verbose build rules; with the default set to DEFAULT
532
# ("yes" being less verbose, "no" or empty being verbose).
533
AC_DEFUN([AM_SILENT_RULES],
534
[AC_ARG_ENABLE([silent-rules], [dnl
536
[--enable-silent-rules],
537
[less verbose build output (undo: "make V=1")])
539
[--disable-silent-rules],
540
[verbose build output (undo: "make V=0")])dnl
542
case $enable_silent_rules in @%:@ (((
543
yes) AM_DEFAULT_VERBOSITY=0;;
544
no) AM_DEFAULT_VERBOSITY=1;;
545
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
548
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
549
dnl do not support nested variable expansions.
550
dnl See automake bug#9928 and bug#10237.
552
AC_CACHE_CHECK([whether $am_make supports nested variables],
553
[am_cv_make_support_nested_variables],
554
[if AS_ECHO([['TRUE=$(BAR$(V))
560
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
561
am_cv_make_support_nested_variables=yes
563
am_cv_make_support_nested_variables=no
565
if test $am_cv_make_support_nested_variables = yes; then
566
dnl Using '$V' instead of '$(V)' breaks IRIX make.
568
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
570
AM_V=$AM_DEFAULT_VERBOSITY
571
AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
574
AM_SUBST_NOTMAKE([AM_V])dnl
575
AC_SUBST([AM_DEFAULT_V])dnl
576
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
577
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
579
AC_SUBST([AM_BACKSLASH])dnl
580
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
583
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
585
# This file is free software; the Free Software Foundation
586
# gives unlimited permission to copy and/or distribute it,
587
# with or without modifications, as long as this notice is preserved.
556
589
# AM_PROG_INSTALL_STRIP
557
590
# ---------------------
558
# One issue with vendor `install' (even GNU) is that you can't
591
# One issue with vendor 'install' (even GNU) is that you can't
559
592
# specify the program used to strip binaries. This is especially
560
593
# annoying in cross-compiling environments, where the build's strip
561
594
# is unlikely to handle the host's binaries.
562
595
# Fortunately install-sh will honor a STRIPPROG variable, so we
563
# always use install-sh in `make install-strip', and initialize
596
# always use install-sh in "make install-strip", and initialize
564
597
# STRIPPROG with the value of the STRIP variable (set by the user).
565
598
AC_DEFUN([AM_PROG_INSTALL_STRIP],
566
599
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
567
# Installed binaries are usually stripped using `strip' when the user
568
# run `make install-strip'. However `strip' might not be the right
600
# Installed binaries are usually stripped using 'strip' when the user
601
# run "make install-strip". However 'strip' might not be the right
569
602
# tool to use in cross-compilation environments, therefore Automake
570
# will honor the `STRIP' environment variable to overrule this program.
571
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
603
# will honor the 'STRIP' environment variable to overrule this program.
604
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
572
605
if test "$cross_compiling" != no; then
573
606
AC_CHECK_TOOL([STRIP], [strip], :)
575
608
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
576
609
AC_SUBST([INSTALL_STRIP_PROGRAM])])
578
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
611
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
580
613
# This file is free software; the Free Software Foundation
581
614
# gives unlimited permission to copy and/or distribute it,
582
615
# with or without modifications, as long as this notice is preserved.
586
617
# _AM_SUBST_NOTMAKE(VARIABLE)
587
618
# ---------------------------
588
619
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
617
646
# Substitute a variable $(am__untar) that extract such
618
647
# a tarball read from stdin.
619
648
# $(am__untar) < result.tar
620
650
AC_DEFUN([_AM_PROG_TAR],
621
651
[# Always define AMTAR for backward compatibility. Yes, it's still used
622
652
# in the wild :-( We should find a proper way to deprecate it ...
623
653
AC_SUBST([AMTAR], ['$${TAR-tar}'])
655
# We'll loop over all known methods to create a tar archive until one works.
656
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
624
658
m4_if([$1], [v7],
625
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
626
[m4_case([$1], [ustar],, [pax],,
627
[m4_fatal([Unknown tar format])])
628
AC_MSG_CHECKING([how to create a $1 tar archive])
629
# Loop over all known methods to create a tar archive until one works.
630
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
631
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
632
# Do not fold the above two line into one, because Tru64 sh and
633
# Solaris sh will not grok spaces in the rhs of `-'.
634
for _am_tool in $_am_tools
638
for _am_tar in tar gnutar gtar;
640
AM_RUN_LOG([$_am_tar --version]) && break
642
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
643
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
644
am__untar="$_am_tar -xf -"
647
# Must skip GNU tar: if it does not support --format= it doesn't create
648
# ustar tarball either.
649
(tar --version) >/dev/null 2>&1 && continue
650
am__tar='tar chf - "$$tardir"'
651
am__tar_='tar chf - "$tardir"'
655
am__tar='pax -L -x $1 -w "$$tardir"'
656
am__tar_='pax -L -x $1 -w "$tardir"'
660
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
661
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
662
am__untar='cpio -i -H $1 -d'
671
# If the value was cached, stop now. We just wanted to have am__tar
673
test -n "${am_cv_prog_tar_$1}" && break
675
# tar/untar a dummy directory, and stop if the command works
678
echo GrepMe > conftest.dir/file
679
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
681
if test -s conftest.tar; then
682
AM_RUN_LOG([$am__untar <conftest.tar])
683
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
688
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
689
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
659
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
663
[# The POSIX 1988 'ustar' format is defined with fixed-size fields.
664
# There is notably a 21 bits limit for the UID and the GID. In fact,
665
# the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
667
am_max_uid=2097151 # 2^21 - 1
668
am_max_gid=$am_max_uid
669
# The $UID and $GID variables are not portable, so we need to resort
670
# to the POSIX-mandated id(1) utility. Errors in the 'id' calls
671
# below are definitely unexpected, so allow the users to see them
672
# (that is, avoid stderr redirection).
673
am_uid=`id -u || echo unknown`
674
am_gid=`id -g || echo unknown`
675
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
676
if test $am_uid -le $am_max_uid; then
682
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
683
if test $am_gid -le $am_max_gid; then
693
[m4_fatal([Unknown tar format])])
695
AC_MSG_CHECKING([how to create a $1 tar archive])
697
# Go ahead even if we have the value already cached. We do so because we
698
# need to set the values for the 'am__tar' and 'am__untar' variables.
699
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
701
for _am_tool in $_am_tools; do
704
for _am_tar in tar gnutar gtar; do
705
AM_RUN_LOG([$_am_tar --version]) && break
707
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
708
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
709
am__untar="$_am_tar -xf -"
712
# Must skip GNU tar: if it does not support --format= it doesn't create
713
# ustar tarball either.
714
(tar --version) >/dev/null 2>&1 && continue
715
am__tar='tar chf - "$$tardir"'
716
am__tar_='tar chf - "$tardir"'
720
am__tar='pax -L -x $1 -w "$$tardir"'
721
am__tar_='pax -L -x $1 -w "$tardir"'
725
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
726
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
727
am__untar='cpio -i -H $1 -d'
736
# If the value was cached, stop now. We just wanted to have am__tar
738
test -n "${am_cv_prog_tar_$1}" && break
740
# tar/untar a dummy directory, and stop if the command works.
743
echo GrepMe > conftest.dir/file
744
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
746
if test -s conftest.tar; then
747
AM_RUN_LOG([$am__untar <conftest.tar])
748
AM_RUN_LOG([cat conftest.dir/file])
749
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
754
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
755
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
690
757
AC_SUBST([am__tar])
691
758
AC_SUBST([am__untar])
692
759
]) # _AM_PROG_TAR