aclocal.m4 revision 67e4e4de
167e4e4deSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*-
267e4e4deSmrg
367e4e4deSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc.
4ffab5952Smrg
5ffab5952Smrg# This file is free software; the Free Software Foundation
6ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
7ffab5952Smrg# with or without modifications, as long as this notice is preserved.
8ffab5952Smrg
9ffab5952Smrg# This program is distributed in the hope that it will be useful,
10ffab5952Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11ffab5952Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12ffab5952Smrg# PARTICULAR PURPOSE.
13ffab5952Smrg
1467e4e4deSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15ffab5952Smrgm4_ifndef([AC_AUTOCONF_VERSION],
16ffab5952Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1767e4e4deSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
1867e4e4deSmrg[m4_warning([this file was generated for autoconf 2.69.
19ffab5952SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
20ffab5952SmrgIf you have problems, you may need to regenerate the build system entirely.
2167e4e4deSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22ffab5952Smrg
2367e4e4deSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc.
24ffab5952Smrg#
25ffab5952Smrg# This file is free software; the Free Software Foundation
26ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
27ffab5952Smrg# with or without modifications, as long as this notice is preserved.
28ffab5952Smrg
29ffab5952Smrg# AM_AUTOMAKE_VERSION(VERSION)
30ffab5952Smrg# ----------------------------
31ffab5952Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
32ffab5952Smrg# generated from the m4 files accompanying Automake X.Y.
33ffab5952Smrg# (This private macro should not be called outside this file.)
34ffab5952SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
3567e4e4deSmrg[am__api_version='1.15'
36ffab5952Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37ffab5952Smrgdnl require some minimum version.  Point them to the right macro.
3867e4e4deSmrgm4_if([$1], [1.15], [],
39ffab5952Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40ffab5952Smrg])
41ffab5952Smrg
42ffab5952Smrg# _AM_AUTOCONF_VERSION(VERSION)
43ffab5952Smrg# -----------------------------
44ffab5952Smrg# aclocal traces this macro to find the Autoconf version.
45ffab5952Smrg# This is a private macro too.  Using m4_define simplifies
46ffab5952Smrg# the logic in aclocal, which can simply ignore this definition.
47ffab5952Smrgm4_define([_AM_AUTOCONF_VERSION], [])
48ffab5952Smrg
49ffab5952Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
50ffab5952Smrg# -------------------------------
51ffab5952Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52ffab5952Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53ffab5952SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5467e4e4deSmrg[AM_AUTOMAKE_VERSION([1.15])dnl
55ffab5952Smrgm4_ifndef([AC_AUTOCONF_VERSION],
56ffab5952Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57ffab5952Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58ffab5952Smrg
59ffab5952Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60ffab5952Smrg
6167e4e4deSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
62ffab5952Smrg#
63ffab5952Smrg# This file is free software; the Free Software Foundation
64ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
65ffab5952Smrg# with or without modifications, as long as this notice is preserved.
66ffab5952Smrg
67ffab5952Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6867e4e4deSmrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
6967e4e4deSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70ffab5952Smrg#
71ffab5952Smrg# Of course, Automake must honor this variable whenever it calls a
72ffab5952Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
73ffab5952Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
74ffab5952Smrg# depending on how configure is run.  This is pretty annoying, since
75ffab5952Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76ffab5952Smrg# source directory, any form will work fine, but in subdirectories a
77ffab5952Smrg# relative path needs to be adjusted first.
78ffab5952Smrg#
79ffab5952Smrg# $ac_aux_dir/missing
80ffab5952Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
81ffab5952Smrg# $top_srcdir/$ac_aux_dir/missing
82ffab5952Smrg#    fails if $ac_aux_dir is absolute,
83ffab5952Smrg#    fails when called from a subdirectory in a VPATH build with
84ffab5952Smrg#          a relative $ac_aux_dir
85ffab5952Smrg#
86ffab5952Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87ffab5952Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
8867e4e4deSmrg# harmless because $srcdir is '.', but things will broke when you
89ffab5952Smrg# start a VPATH build or use an absolute $srcdir.
90ffab5952Smrg#
91ffab5952Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92ffab5952Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93ffab5952Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94ffab5952Smrg# and then we would define $MISSING as
95ffab5952Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
96ffab5952Smrg# This will work as long as MISSING is not called from configure, because
97ffab5952Smrg# unfortunately $(top_srcdir) has no meaning in configure.
98ffab5952Smrg# However there are other variables, like CC, which are often used in
99ffab5952Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
100ffab5952Smrg#
101ffab5952Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
102ffab5952Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
103ffab5952Smrg# configured tree to be moved without reconfiguration.
104ffab5952Smrg
105ffab5952SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
10667e4e4deSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
10767e4e4deSmrg# Expand $ac_aux_dir to an absolute path.
10867e4e4deSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
109ffab5952Smrg])
110ffab5952Smrg
111ffab5952Smrg# Do all the work for Automake.                             -*- Autoconf -*-
112ffab5952Smrg
11367e4e4deSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc.
114ffab5952Smrg#
115ffab5952Smrg# This file is free software; the Free Software Foundation
116ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
117ffab5952Smrg# with or without modifications, as long as this notice is preserved.
118ffab5952Smrg
119ffab5952Smrg# This macro actually does too much.  Some checks are only needed if
120ffab5952Smrg# your package does certain things.  But this isn't really a big deal.
121ffab5952Smrg
12267e4e4deSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
12367e4e4deSmrgm4_define([AC_PROG_CC],
12467e4e4deSmrgm4_defn([AC_PROG_CC])
12567e4e4deSmrg[_AM_PROG_CC_C_O
12667e4e4deSmrg])
12767e4e4deSmrg
128ffab5952Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
129ffab5952Smrg# AM_INIT_AUTOMAKE([OPTIONS])
130ffab5952Smrg# -----------------------------------------------
131ffab5952Smrg# The call with PACKAGE and VERSION arguments is the old style
132ffab5952Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
133ffab5952Smrg# and VERSION should now be passed to AC_INIT and removed from
134ffab5952Smrg# the call to AM_INIT_AUTOMAKE.
135ffab5952Smrg# We support both call styles for the transition.  After
136ffab5952Smrg# the next Automake release, Autoconf can make the AC_INIT
137ffab5952Smrg# arguments mandatory, and then we can depend on a new Autoconf
138ffab5952Smrg# release and drop the old call support.
139ffab5952SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
14067e4e4deSmrg[AC_PREREQ([2.65])dnl
141ffab5952Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
142ffab5952Smrgdnl the ones we care about.
143ffab5952Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
144ffab5952SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
145ffab5952SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
146ffab5952Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
147ffab5952Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
148ffab5952Smrg  # is not polluted with repeated "-I."
149ffab5952Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
150ffab5952Smrg  # test to see if srcdir already configured
151ffab5952Smrg  if test -f $srcdir/config.status; then
152ffab5952Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
153ffab5952Smrg  fi
154ffab5952Smrgfi
155ffab5952Smrg
156ffab5952Smrg# test whether we have cygpath
157ffab5952Smrgif test -z "$CYGPATH_W"; then
158ffab5952Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
159ffab5952Smrg    CYGPATH_W='cygpath -w'
160ffab5952Smrg  else
161ffab5952Smrg    CYGPATH_W=echo
162ffab5952Smrg  fi
163ffab5952Smrgfi
164ffab5952SmrgAC_SUBST([CYGPATH_W])
165ffab5952Smrg
166ffab5952Smrg# Define the identity of the package.
167ffab5952Smrgdnl Distinguish between old-style and new-style calls.
168ffab5952Smrgm4_ifval([$2],
16967e4e4deSmrg[AC_DIAGNOSE([obsolete],
17067e4e4deSmrg             [$0: two- and three-arguments forms are deprecated.])
17167e4e4deSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
172ffab5952Smrg AC_SUBST([PACKAGE], [$1])dnl
173ffab5952Smrg AC_SUBST([VERSION], [$2])],
174ffab5952Smrg[_AM_SET_OPTIONS([$1])dnl
175ffab5952Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
17667e4e4deSmrgm4_if(
17767e4e4deSmrg  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
17867e4e4deSmrg  [ok:ok],,
179ffab5952Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
180ffab5952Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
181ffab5952Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
182ffab5952Smrg
183ffab5952Smrg_AM_IF_OPTION([no-define],,
18467e4e4deSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
18567e4e4deSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
186ffab5952Smrg
187ffab5952Smrg# Some tools Automake needs.
188ffab5952SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
189ffab5952SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
19067e4e4deSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
19167e4e4deSmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
19267e4e4deSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
19367e4e4deSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
19467e4e4deSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
195ffab5952SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
196ffab5952SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
19767e4e4deSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
19867e4e4deSmrg# For better backward compatibility.  To be removed once Automake 1.9.x
19967e4e4deSmrg# dies out for good.  For more background, see:
20067e4e4deSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
20167e4e4deSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
20267e4e4deSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
20367e4e4deSmrg# We need awk for the "check" target (and possibly the TAP driver).  The
20467e4e4deSmrg# system "awk" is bad on some platforms.
205ffab5952SmrgAC_REQUIRE([AC_PROG_AWK])dnl
206ffab5952SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
207ffab5952SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
208ffab5952Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
209ffab5952Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
210ffab5952Smrg			     [_AM_PROG_TAR([v7])])])
211ffab5952Smrg_AM_IF_OPTION([no-dependencies],,
212ffab5952Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
21367e4e4deSmrg		  [_AM_DEPENDENCIES([CC])],
21467e4e4deSmrg		  [m4_define([AC_PROG_CC],
21567e4e4deSmrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
216ffab5952SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
21767e4e4deSmrg		  [_AM_DEPENDENCIES([CXX])],
21867e4e4deSmrg		  [m4_define([AC_PROG_CXX],
21967e4e4deSmrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
220ffab5952SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
22167e4e4deSmrg		  [_AM_DEPENDENCIES([OBJC])],
22267e4e4deSmrg		  [m4_define([AC_PROG_OBJC],
22367e4e4deSmrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
22467e4e4deSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
22567e4e4deSmrg		  [_AM_DEPENDENCIES([OBJCXX])],
22667e4e4deSmrg		  [m4_define([AC_PROG_OBJCXX],
22767e4e4deSmrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
228ffab5952Smrg])
22967e4e4deSmrgAC_REQUIRE([AM_SILENT_RULES])dnl
23067e4e4deSmrgdnl The testsuite driver may need to know about EXEEXT, so add the
23167e4e4deSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
23267e4e4deSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
233ffab5952SmrgAC_CONFIG_COMMANDS_PRE(dnl
234ffab5952Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
235ffab5952Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
23667e4e4deSmrg
23767e4e4deSmrg# POSIX will say in a future version that running "rm -f" with no argument
23867e4e4deSmrg# is OK; and we want to be able to make that assumption in our Makefile
23967e4e4deSmrg# recipes.  So use an aggressive probe to check that the usage we want is
24067e4e4deSmrg# actually supported "in the wild" to an acceptable degree.
24167e4e4deSmrg# See automake bug#10828.
24267e4e4deSmrg# To make any issue more visible, cause the running configure to be aborted
24367e4e4deSmrg# by default if the 'rm' program in use doesn't match our expectations; the
24467e4e4deSmrg# user can still override this though.
24567e4e4deSmrgif rm -f && rm -fr && rm -rf; then : OK; else
24667e4e4deSmrg  cat >&2 <<'END'
24767e4e4deSmrgOops!
24867e4e4deSmrg
24967e4e4deSmrgYour 'rm' program seems unable to run without file operands specified
25067e4e4deSmrgon the command line, even when the '-f' option is present.  This is contrary
25167e4e4deSmrgto the behaviour of most rm programs out there, and not conforming with
25267e4e4deSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
25367e4e4deSmrg
25467e4e4deSmrgPlease tell bug-automake@gnu.org about your system, including the value
25567e4e4deSmrgof your $PATH and any error possibly output before this message.  This
25667e4e4deSmrgcan help us improve future automake versions.
25767e4e4deSmrg
25867e4e4deSmrgEND
25967e4e4deSmrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
26067e4e4deSmrg    echo 'Configuration will proceed anyway, since you have set the' >&2
26167e4e4deSmrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
26267e4e4deSmrg    echo >&2
26367e4e4deSmrg  else
26467e4e4deSmrg    cat >&2 <<'END'
26567e4e4deSmrgAborting the configuration process, to ensure you take notice of the issue.
26667e4e4deSmrg
26767e4e4deSmrgYou can download and install GNU coreutils to get an 'rm' implementation
26867e4e4deSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>.
26967e4e4deSmrg
27067e4e4deSmrgIf you want to complete the configuration process using your problematic
27167e4e4deSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
27267e4e4deSmrgto "yes", and re-run configure.
27367e4e4deSmrg
27467e4e4deSmrgEND
27567e4e4deSmrg    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
27667e4e4deSmrg  fi
27767e4e4deSmrgfi
27867e4e4deSmrgdnl The trailing newline in this macro's definition is deliberate, for
27967e4e4deSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments
28067e4e4deSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
281ffab5952Smrg])
282ffab5952Smrg
28367e4e4deSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
284ffab5952Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
285ffab5952Smrgdnl mangled by Autoconf and run in a shell conditional statement.
286ffab5952Smrgm4_define([_AC_COMPILER_EXEEXT],
287ffab5952Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
288ffab5952Smrg
289ffab5952Smrg# When config.status generates a header, we must update the stamp-h file.
290ffab5952Smrg# This file resides in the same directory as the config header
291ffab5952Smrg# that is generated.  The stamp files are numbered to have different names.
292ffab5952Smrg
293ffab5952Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
294ffab5952Smrg# loop where config.status creates the headers, so we can generate
295ffab5952Smrg# our stamp files there.
296ffab5952SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
297ffab5952Smrg[# Compute $1's index in $config_headers.
298ffab5952Smrg_am_arg=$1
299ffab5952Smrg_am_stamp_count=1
300ffab5952Smrgfor _am_header in $config_headers :; do
301ffab5952Smrg  case $_am_header in
302ffab5952Smrg    $_am_arg | $_am_arg:* )
303ffab5952Smrg      break ;;
304ffab5952Smrg    * )
305ffab5952Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
306ffab5952Smrg  esac
307ffab5952Smrgdone
308ffab5952Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
309ffab5952Smrg
31067e4e4deSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
311ffab5952Smrg#
312ffab5952Smrg# This file is free software; the Free Software Foundation
313ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
314ffab5952Smrg# with or without modifications, as long as this notice is preserved.
315ffab5952Smrg
316ffab5952Smrg# AM_PROG_INSTALL_SH
317ffab5952Smrg# ------------------
318ffab5952Smrg# Define $install_sh.
319ffab5952SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
320ffab5952Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
32167e4e4deSmrgif test x"${install_sh+set}" != xset; then
322ffab5952Smrg  case $am_aux_dir in
323ffab5952Smrg  *\ * | *\	*)
324ffab5952Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
325ffab5952Smrg  *)
326ffab5952Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
327ffab5952Smrg  esac
328ffab5952Smrgfi
32967e4e4deSmrgAC_SUBST([install_sh])])
330ffab5952Smrg
33167e4e4deSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc.
332ffab5952Smrg#
333ffab5952Smrg# This file is free software; the Free Software Foundation
334ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
335ffab5952Smrg# with or without modifications, as long as this notice is preserved.
336ffab5952Smrg
337ffab5952Smrg# Check whether the underlying file-system supports filenames
338ffab5952Smrg# with a leading dot.  For instance MS-DOS doesn't.
339ffab5952SmrgAC_DEFUN([AM_SET_LEADING_DOT],
340ffab5952Smrg[rm -rf .tst 2>/dev/null
341ffab5952Smrgmkdir .tst 2>/dev/null
342ffab5952Smrgif test -d .tst; then
343ffab5952Smrg  am__leading_dot=.
344ffab5952Smrgelse
345ffab5952Smrg  am__leading_dot=_
346ffab5952Smrgfi
347ffab5952Smrgrmdir .tst 2>/dev/null
348ffab5952SmrgAC_SUBST([am__leading_dot])])
349ffab5952Smrg
350ffab5952Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
351ffab5952Smrg
35267e4e4deSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc.
353ffab5952Smrg#
354ffab5952Smrg# This file is free software; the Free Software Foundation
355ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
356ffab5952Smrg# with or without modifications, as long as this notice is preserved.
357ffab5952Smrg
358ffab5952Smrg# AM_MISSING_PROG(NAME, PROGRAM)
359ffab5952Smrg# ------------------------------
360ffab5952SmrgAC_DEFUN([AM_MISSING_PROG],
361ffab5952Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
362ffab5952Smrg$1=${$1-"${am_missing_run}$2"}
363ffab5952SmrgAC_SUBST($1)])
364ffab5952Smrg
365ffab5952Smrg# AM_MISSING_HAS_RUN
366ffab5952Smrg# ------------------
36767e4e4deSmrg# Define MISSING if not defined so far and test if it is modern enough.
36867e4e4deSmrg# If it is, set am_missing_run to use it, otherwise, to nothing.
369ffab5952SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
370ffab5952Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
371ffab5952SmrgAC_REQUIRE_AUX_FILE([missing])dnl
372ffab5952Smrgif test x"${MISSING+set}" != xset; then
373ffab5952Smrg  case $am_aux_dir in
374ffab5952Smrg  *\ * | *\	*)
375ffab5952Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
376ffab5952Smrg  *)
377ffab5952Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
378ffab5952Smrg  esac
379ffab5952Smrgfi
380ffab5952Smrg# Use eval to expand $SHELL
38167e4e4deSmrgif eval "$MISSING --is-lightweight"; then
38267e4e4deSmrg  am_missing_run="$MISSING "
383ffab5952Smrgelse
384ffab5952Smrg  am_missing_run=
38567e4e4deSmrg  AC_MSG_WARN(['missing' script is too old or missing])
386ffab5952Smrgfi
387ffab5952Smrg])
388ffab5952Smrg
389ffab5952Smrg# Helper functions for option handling.                     -*- Autoconf -*-
390ffab5952Smrg
39167e4e4deSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
392ffab5952Smrg#
393ffab5952Smrg# This file is free software; the Free Software Foundation
394ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
395ffab5952Smrg# with or without modifications, as long as this notice is preserved.
396ffab5952Smrg
397ffab5952Smrg# _AM_MANGLE_OPTION(NAME)
398ffab5952Smrg# -----------------------
399ffab5952SmrgAC_DEFUN([_AM_MANGLE_OPTION],
400ffab5952Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
401ffab5952Smrg
402ffab5952Smrg# _AM_SET_OPTION(NAME)
40343c16309Smrg# --------------------
404ffab5952Smrg# Set option NAME.  Presently that only means defining a flag for this option.
405ffab5952SmrgAC_DEFUN([_AM_SET_OPTION],
40667e4e4deSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
407ffab5952Smrg
408ffab5952Smrg# _AM_SET_OPTIONS(OPTIONS)
40943c16309Smrg# ------------------------
410ffab5952Smrg# OPTIONS is a space-separated list of Automake options.
411ffab5952SmrgAC_DEFUN([_AM_SET_OPTIONS],
412ffab5952Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
413ffab5952Smrg
414ffab5952Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
415ffab5952Smrg# -------------------------------------------
416ffab5952Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
417ffab5952SmrgAC_DEFUN([_AM_IF_OPTION],
418ffab5952Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
419ffab5952Smrg
420ffab5952Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
421ffab5952Smrg
42267e4e4deSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc.
423ffab5952Smrg#
424ffab5952Smrg# This file is free software; the Free Software Foundation
425ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
426ffab5952Smrg# with or without modifications, as long as this notice is preserved.
427ffab5952Smrg
428ffab5952Smrg# AM_SANITY_CHECK
429ffab5952Smrg# ---------------
430ffab5952SmrgAC_DEFUN([AM_SANITY_CHECK],
431ffab5952Smrg[AC_MSG_CHECKING([whether build environment is sane])
432ffab5952Smrg# Reject unsafe characters in $srcdir or the absolute working directory
433ffab5952Smrg# name.  Accept space and tab only in the latter.
434ffab5952Smrgam_lf='
435ffab5952Smrg'
436ffab5952Smrgcase `pwd` in
437ffab5952Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
438ffab5952Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
439ffab5952Smrgesac
440ffab5952Smrgcase $srcdir in
441ffab5952Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
44267e4e4deSmrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
443ffab5952Smrgesac
444ffab5952Smrg
44567e4e4deSmrg# Do 'set' in a subshell so we don't clobber the current shell's
446ffab5952Smrg# arguments.  Must try -L first in case configure is actually a
447ffab5952Smrg# symlink; some systems play weird games with the mod time of symlinks
448ffab5952Smrg# (eg FreeBSD returns the mod time of the symlink's containing
449ffab5952Smrg# directory).
450ffab5952Smrgif (
45167e4e4deSmrg   am_has_slept=no
45267e4e4deSmrg   for am_try in 1 2; do
45367e4e4deSmrg     echo "timestamp, slept: $am_has_slept" > conftest.file
45467e4e4deSmrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
45567e4e4deSmrg     if test "$[*]" = "X"; then
45667e4e4deSmrg	# -L didn't work.
45767e4e4deSmrg	set X `ls -t "$srcdir/configure" conftest.file`
45867e4e4deSmrg     fi
45967e4e4deSmrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
46067e4e4deSmrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
46167e4e4deSmrg
46267e4e4deSmrg	# If neither matched, then we have a broken ls.  This can happen
46367e4e4deSmrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
46467e4e4deSmrg	# broken ls alias from the environment.  This has actually
46567e4e4deSmrg	# happened.  Such a system could not be considered "sane".
46667e4e4deSmrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
46767e4e4deSmrg  alias in your environment])
46867e4e4deSmrg     fi
46967e4e4deSmrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
47067e4e4deSmrg       break
47167e4e4deSmrg     fi
47267e4e4deSmrg     # Just in case.
47367e4e4deSmrg     sleep 1
47467e4e4deSmrg     am_has_slept=yes
47567e4e4deSmrg   done
476ffab5952Smrg   test "$[2]" = conftest.file
477ffab5952Smrg   )
478ffab5952Smrgthen
479ffab5952Smrg   # Ok.
480ffab5952Smrg   :
481ffab5952Smrgelse
482ffab5952Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
483ffab5952SmrgCheck your system clock])
484ffab5952Smrgfi
48567e4e4deSmrgAC_MSG_RESULT([yes])
48667e4e4deSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and
48767e4e4deSmrg# generated files are strictly newer.
48867e4e4deSmrgam_sleep_pid=
48967e4e4deSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
49067e4e4deSmrg  ( sleep 1 ) &
49167e4e4deSmrg  am_sleep_pid=$!
49267e4e4deSmrgfi
49367e4e4deSmrgAC_CONFIG_COMMANDS_PRE(
49467e4e4deSmrg  [AC_MSG_CHECKING([that generated files are newer than configure])
49567e4e4deSmrg   if test -n "$am_sleep_pid"; then
49667e4e4deSmrg     # Hide warnings about reused PIDs.
49767e4e4deSmrg     wait $am_sleep_pid 2>/dev/null
49867e4e4deSmrg   fi
49967e4e4deSmrg   AC_MSG_RESULT([done])])
50067e4e4deSmrgrm -f conftest.file
50167e4e4deSmrg])
502ffab5952Smrg
50367e4e4deSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc.
504ffab5952Smrg#
505ffab5952Smrg# This file is free software; the Free Software Foundation
506ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
507ffab5952Smrg# with or without modifications, as long as this notice is preserved.
508ffab5952Smrg
50967e4e4deSmrg# AM_SILENT_RULES([DEFAULT])
51067e4e4deSmrg# --------------------------
51167e4e4deSmrg# Enable less verbose build rules; with the default set to DEFAULT
51267e4e4deSmrg# ("yes" being less verbose, "no" or empty being verbose).
51367e4e4deSmrgAC_DEFUN([AM_SILENT_RULES],
51467e4e4deSmrg[AC_ARG_ENABLE([silent-rules], [dnl
51567e4e4deSmrgAS_HELP_STRING(
51667e4e4deSmrg  [--enable-silent-rules],
51767e4e4deSmrg  [less verbose build output (undo: "make V=1")])
51867e4e4deSmrgAS_HELP_STRING(
51967e4e4deSmrg  [--disable-silent-rules],
52067e4e4deSmrg  [verbose build output (undo: "make V=0")])dnl
52167e4e4deSmrg])
52267e4e4deSmrgcase $enable_silent_rules in @%:@ (((
52367e4e4deSmrg  yes) AM_DEFAULT_VERBOSITY=0;;
52467e4e4deSmrg   no) AM_DEFAULT_VERBOSITY=1;;
52567e4e4deSmrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
52667e4e4deSmrgesac
52767e4e4deSmrgdnl
52867e4e4deSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
52967e4e4deSmrgdnl do not support nested variable expansions.
53067e4e4deSmrgdnl See automake bug#9928 and bug#10237.
53167e4e4deSmrgam_make=${MAKE-make}
53267e4e4deSmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
53367e4e4deSmrg   [am_cv_make_support_nested_variables],
53467e4e4deSmrg   [if AS_ECHO([['TRUE=$(BAR$(V))
53567e4e4deSmrgBAR0=false
53667e4e4deSmrgBAR1=true
53767e4e4deSmrgV=1
53867e4e4deSmrgam__doit:
53967e4e4deSmrg	@$(TRUE)
54067e4e4deSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
54167e4e4deSmrg  am_cv_make_support_nested_variables=yes
54267e4e4deSmrgelse
54367e4e4deSmrg  am_cv_make_support_nested_variables=no
54467e4e4deSmrgfi])
54567e4e4deSmrgif test $am_cv_make_support_nested_variables = yes; then
54667e4e4deSmrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
54767e4e4deSmrg  AM_V='$(V)'
54867e4e4deSmrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
54967e4e4deSmrgelse
55067e4e4deSmrg  AM_V=$AM_DEFAULT_VERBOSITY
55167e4e4deSmrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
55267e4e4deSmrgfi
55367e4e4deSmrgAC_SUBST([AM_V])dnl
55467e4e4deSmrgAM_SUBST_NOTMAKE([AM_V])dnl
55567e4e4deSmrgAC_SUBST([AM_DEFAULT_V])dnl
55667e4e4deSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
55767e4e4deSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
55867e4e4deSmrgAM_BACKSLASH='\'
55967e4e4deSmrgAC_SUBST([AM_BACKSLASH])dnl
56067e4e4deSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
56167e4e4deSmrg])
56267e4e4deSmrg
56367e4e4deSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc.
56467e4e4deSmrg#
56567e4e4deSmrg# This file is free software; the Free Software Foundation
56667e4e4deSmrg# gives unlimited permission to copy and/or distribute it,
56767e4e4deSmrg# with or without modifications, as long as this notice is preserved.
56843c16309Smrg
569ffab5952Smrg# AM_PROG_INSTALL_STRIP
570ffab5952Smrg# ---------------------
57167e4e4deSmrg# One issue with vendor 'install' (even GNU) is that you can't
572ffab5952Smrg# specify the program used to strip binaries.  This is especially
573ffab5952Smrg# annoying in cross-compiling environments, where the build's strip
574ffab5952Smrg# is unlikely to handle the host's binaries.
575ffab5952Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
57667e4e4deSmrg# always use install-sh in "make install-strip", and initialize
577ffab5952Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
578ffab5952SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
579ffab5952Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
58067e4e4deSmrg# Installed binaries are usually stripped using 'strip' when the user
58167e4e4deSmrg# run "make install-strip".  However 'strip' might not be the right
582ffab5952Smrg# tool to use in cross-compilation environments, therefore Automake
58367e4e4deSmrg# will honor the 'STRIP' environment variable to overrule this program.
58467e4e4deSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
585ffab5952Smrgif test "$cross_compiling" != no; then
586ffab5952Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
587ffab5952Smrgfi
588ffab5952SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
589ffab5952SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
590ffab5952Smrg
59167e4e4deSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc.
592ffab5952Smrg#
593ffab5952Smrg# This file is free software; the Free Software Foundation
594ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
595ffab5952Smrg# with or without modifications, as long as this notice is preserved.
596ffab5952Smrg
597ffab5952Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
598ffab5952Smrg# ---------------------------
599ffab5952Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
600ffab5952Smrg# This macro is traced by Automake.
601ffab5952SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
602ffab5952Smrg
603ffab5952Smrg# AM_SUBST_NOTMAKE(VARIABLE)
60443c16309Smrg# --------------------------
605ffab5952Smrg# Public sister of _AM_SUBST_NOTMAKE.
606ffab5952SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
607ffab5952Smrg
608ffab5952Smrg# Check how to create a tarball.                            -*- Autoconf -*-
609ffab5952Smrg
61067e4e4deSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc.
611ffab5952Smrg#
612ffab5952Smrg# This file is free software; the Free Software Foundation
613ffab5952Smrg# gives unlimited permission to copy and/or distribute it,
614ffab5952Smrg# with or without modifications, as long as this notice is preserved.
615ffab5952Smrg
616ffab5952Smrg# _AM_PROG_TAR(FORMAT)
617ffab5952Smrg# --------------------
618ffab5952Smrg# Check how to create a tarball in format FORMAT.
61967e4e4deSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
620ffab5952Smrg#
621ffab5952Smrg# Substitute a variable $(am__tar) that is a command
622ffab5952Smrg# writing to stdout a FORMAT-tarball containing the directory
623ffab5952Smrg# $tardir.
624ffab5952Smrg#     tardir=directory && $(am__tar) > result.tar
625ffab5952Smrg#
626ffab5952Smrg# Substitute a variable $(am__untar) that extract such
627ffab5952Smrg# a tarball read from stdin.
628ffab5952Smrg#     $(am__untar) < result.tar
62967e4e4deSmrg#
630ffab5952SmrgAC_DEFUN([_AM_PROG_TAR],
63143c16309Smrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
63243c16309Smrg# in the wild :-(  We should find a proper way to deprecate it ...
63343c16309SmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
634ffab5952Smrg
63567e4e4deSmrg# We'll loop over all known methods to create a tar archive until one works.
63667e4e4deSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
637ffab5952Smrg
63867e4e4deSmrgm4_if([$1], [v7],
63967e4e4deSmrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
64067e4e4deSmrg
64167e4e4deSmrg  [m4_case([$1],
64267e4e4deSmrg    [ustar],
64367e4e4deSmrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
64467e4e4deSmrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
64567e4e4deSmrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
64667e4e4deSmrg      # and bug#13588).
64767e4e4deSmrg      am_max_uid=2097151 # 2^21 - 1
64867e4e4deSmrg      am_max_gid=$am_max_uid
64967e4e4deSmrg      # The $UID and $GID variables are not portable, so we need to resort
65067e4e4deSmrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
65167e4e4deSmrg      # below are definitely unexpected, so allow the users to see them
65267e4e4deSmrg      # (that is, avoid stderr redirection).
65367e4e4deSmrg      am_uid=`id -u || echo unknown`
65467e4e4deSmrg      am_gid=`id -g || echo unknown`
65567e4e4deSmrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
65667e4e4deSmrg      if test $am_uid -le $am_max_uid; then
65767e4e4deSmrg         AC_MSG_RESULT([yes])
65867e4e4deSmrg      else
65967e4e4deSmrg         AC_MSG_RESULT([no])
66067e4e4deSmrg         _am_tools=none
66167e4e4deSmrg      fi
66267e4e4deSmrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
66367e4e4deSmrg      if test $am_gid -le $am_max_gid; then
66467e4e4deSmrg         AC_MSG_RESULT([yes])
66567e4e4deSmrg      else
66667e4e4deSmrg        AC_MSG_RESULT([no])
66767e4e4deSmrg        _am_tools=none
66867e4e4deSmrg      fi],
66967e4e4deSmrg
67067e4e4deSmrg  [pax],
67167e4e4deSmrg    [],
67267e4e4deSmrg
67367e4e4deSmrg  [m4_fatal([Unknown tar format])])
67467e4e4deSmrg
67567e4e4deSmrg  AC_MSG_CHECKING([how to create a $1 tar archive])
67667e4e4deSmrg
67767e4e4deSmrg  # Go ahead even if we have the value already cached.  We do so because we
67867e4e4deSmrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
67967e4e4deSmrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
68067e4e4deSmrg
68167e4e4deSmrg  for _am_tool in $_am_tools; do
68267e4e4deSmrg    case $_am_tool in
68367e4e4deSmrg    gnutar)
68467e4e4deSmrg      for _am_tar in tar gnutar gtar; do
68567e4e4deSmrg        AM_RUN_LOG([$_am_tar --version]) && break
68667e4e4deSmrg      done
68767e4e4deSmrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
68867e4e4deSmrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
68967e4e4deSmrg      am__untar="$_am_tar -xf -"
69067e4e4deSmrg      ;;
69167e4e4deSmrg    plaintar)
69267e4e4deSmrg      # Must skip GNU tar: if it does not support --format= it doesn't create
69367e4e4deSmrg      # ustar tarball either.
69467e4e4deSmrg      (tar --version) >/dev/null 2>&1 && continue
69567e4e4deSmrg      am__tar='tar chf - "$$tardir"'
69667e4e4deSmrg      am__tar_='tar chf - "$tardir"'
69767e4e4deSmrg      am__untar='tar xf -'
69867e4e4deSmrg      ;;
69967e4e4deSmrg    pax)
70067e4e4deSmrg      am__tar='pax -L -x $1 -w "$$tardir"'
70167e4e4deSmrg      am__tar_='pax -L -x $1 -w "$tardir"'
70267e4e4deSmrg      am__untar='pax -r'
70367e4e4deSmrg      ;;
70467e4e4deSmrg    cpio)
70567e4e4deSmrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
70667e4e4deSmrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
70767e4e4deSmrg      am__untar='cpio -i -H $1 -d'
70867e4e4deSmrg      ;;
70967e4e4deSmrg    none)
71067e4e4deSmrg      am__tar=false
71167e4e4deSmrg      am__tar_=false
71267e4e4deSmrg      am__untar=false
71367e4e4deSmrg      ;;
71467e4e4deSmrg    esac
71567e4e4deSmrg
71667e4e4deSmrg    # If the value was cached, stop now.  We just wanted to have am__tar
71767e4e4deSmrg    # and am__untar set.
71867e4e4deSmrg    test -n "${am_cv_prog_tar_$1}" && break
71967e4e4deSmrg
72067e4e4deSmrg    # tar/untar a dummy directory, and stop if the command works.
72167e4e4deSmrg    rm -rf conftest.dir
72267e4e4deSmrg    mkdir conftest.dir
72367e4e4deSmrg    echo GrepMe > conftest.dir/file
72467e4e4deSmrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
72567e4e4deSmrg    rm -rf conftest.dir
72667e4e4deSmrg    if test -s conftest.tar; then
72767e4e4deSmrg      AM_RUN_LOG([$am__untar <conftest.tar])
72867e4e4deSmrg      AM_RUN_LOG([cat conftest.dir/file])
72967e4e4deSmrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
73067e4e4deSmrg    fi
73167e4e4deSmrg  done
732ffab5952Smrg  rm -rf conftest.dir
733ffab5952Smrg
73467e4e4deSmrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
73567e4e4deSmrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
73667e4e4deSmrg
737ffab5952SmrgAC_SUBST([am__tar])
738ffab5952SmrgAC_SUBST([am__untar])
739ffab5952Smrg]) # _AM_PROG_TAR
740ffab5952Smrg
741