aclocal.m4 revision fe605390
1fe605390Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
220d725fbSmrg
3fe605390Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
420d725fbSmrg
5fe605390Smrg# This file is free software; the Free Software Foundation
6fe605390Smrg# gives unlimited permission to copy and/or distribute it,
7fe605390Smrg# with or without modifications, as long as this notice is preserved.
863fbae1dSmrg
9fe605390Smrg# This program is distributed in the hope that it will be useful,
10fe605390Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11fe605390Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12fe605390Smrg# PARTICULAR PURPOSE.
1363fbae1dSmrg
14fe605390Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15fe605390Smrgm4_ifndef([AC_AUTOCONF_VERSION],
16fe605390Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17fe605390Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
18fe605390Smrg[m4_warning([this file was generated for autoconf 2.71.
19fe605390SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
20fe605390SmrgIf you have problems, you may need to regenerate the build system entirely.
21fe605390SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
2263fbae1dSmrg
23fe605390Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc.
2420d725fbSmrg#
2520d725fbSmrg# This file is free software; the Free Software Foundation
2620d725fbSmrg# gives unlimited permission to copy and/or distribute it,
2720d725fbSmrg# with or without modifications, as long as this notice is preserved.
2820d725fbSmrg
2920d725fbSmrg# AM_AUTOMAKE_VERSION(VERSION)
3020d725fbSmrg# ----------------------------
3120d725fbSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
3220d725fbSmrg# generated from the m4 files accompanying Automake X.Y.
3363fbae1dSmrg# (This private macro should not be called outside this file.)
3463fbae1dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
35fe605390Smrg[am__api_version='1.16'
3663fbae1dSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3763fbae1dSmrgdnl require some minimum version.  Point them to the right macro.
38fe605390Smrgm4_if([$1], [1.16.5], [],
3963fbae1dSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
4063fbae1dSmrg])
4163fbae1dSmrg
4263fbae1dSmrg# _AM_AUTOCONF_VERSION(VERSION)
4363fbae1dSmrg# -----------------------------
4463fbae1dSmrg# aclocal traces this macro to find the Autoconf version.
4563fbae1dSmrg# This is a private macro too.  Using m4_define simplifies
4663fbae1dSmrg# the logic in aclocal, which can simply ignore this definition.
4763fbae1dSmrgm4_define([_AM_AUTOCONF_VERSION], [])
4820d725fbSmrg
4920d725fbSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
5020d725fbSmrg# -------------------------------
5163fbae1dSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5263fbae1dSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5320d725fbSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54fe605390Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl
5563fbae1dSmrgm4_ifndef([AC_AUTOCONF_VERSION],
5663fbae1dSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5763fbae1dSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5820d725fbSmrg
5920d725fbSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6020d725fbSmrg
61fe605390Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6220d725fbSmrg#
6320d725fbSmrg# This file is free software; the Free Software Foundation
6420d725fbSmrg# gives unlimited permission to copy and/or distribute it,
6520d725fbSmrg# with or without modifications, as long as this notice is preserved.
6620d725fbSmrg
6720d725fbSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68fe605390Smrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
69fe605390Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
7020d725fbSmrg#
7120d725fbSmrg# Of course, Automake must honor this variable whenever it calls a
7220d725fbSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
7320d725fbSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
7420d725fbSmrg# depending on how configure is run.  This is pretty annoying, since
7520d725fbSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7620d725fbSmrg# source directory, any form will work fine, but in subdirectories a
7720d725fbSmrg# relative path needs to be adjusted first.
7820d725fbSmrg#
7920d725fbSmrg# $ac_aux_dir/missing
8020d725fbSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8120d725fbSmrg# $top_srcdir/$ac_aux_dir/missing
8220d725fbSmrg#    fails if $ac_aux_dir is absolute,
8320d725fbSmrg#    fails when called from a subdirectory in a VPATH build with
8420d725fbSmrg#          a relative $ac_aux_dir
8520d725fbSmrg#
8620d725fbSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8720d725fbSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
88fe605390Smrg# harmless because $srcdir is '.', but things will broke when you
8920d725fbSmrg# start a VPATH build or use an absolute $srcdir.
9020d725fbSmrg#
9120d725fbSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9220d725fbSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9320d725fbSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9420d725fbSmrg# and then we would define $MISSING as
9520d725fbSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
9620d725fbSmrg# This will work as long as MISSING is not called from configure, because
9720d725fbSmrg# unfortunately $(top_srcdir) has no meaning in configure.
9820d725fbSmrg# However there are other variables, like CC, which are often used in
9920d725fbSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
10020d725fbSmrg#
10120d725fbSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
10220d725fbSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
10320d725fbSmrg# configured tree to be moved without reconfiguration.
10420d725fbSmrg
10520d725fbSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
106fe605390Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
107fe605390Smrg# Expand $ac_aux_dir to an absolute path.
108fe605390Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
10920d725fbSmrg])
11020d725fbSmrg
11120d725fbSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
11220d725fbSmrg
113fe605390Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
11420d725fbSmrg#
11520d725fbSmrg# This file is free software; the Free Software Foundation
11620d725fbSmrg# gives unlimited permission to copy and/or distribute it,
11720d725fbSmrg# with or without modifications, as long as this notice is preserved.
11820d725fbSmrg
11920d725fbSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
12020d725fbSmrg# -------------------------------------
12120d725fbSmrg# Define a conditional.
12220d725fbSmrgAC_DEFUN([AM_CONDITIONAL],
123fe605390Smrg[AC_PREREQ([2.52])dnl
124fe605390Smrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
125fe605390Smrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
12663fbae1dSmrgAC_SUBST([$1_TRUE])dnl
12763fbae1dSmrgAC_SUBST([$1_FALSE])dnl
12863fbae1dSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
12963fbae1dSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
13063fbae1dSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
13120d725fbSmrgif $2; then
13220d725fbSmrg  $1_TRUE=
13320d725fbSmrg  $1_FALSE='#'
13420d725fbSmrgelse
13520d725fbSmrg  $1_TRUE='#'
13620d725fbSmrg  $1_FALSE=
13720d725fbSmrgfi
13820d725fbSmrgAC_CONFIG_COMMANDS_PRE(
13920d725fbSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
14020d725fbSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
14120d725fbSmrgUsually this means the macro was only invoked conditionally.]])
14220d725fbSmrgfi])])
14320d725fbSmrg
144fe605390Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
14520d725fbSmrg#
14620d725fbSmrg# This file is free software; the Free Software Foundation
14720d725fbSmrg# gives unlimited permission to copy and/or distribute it,
14820d725fbSmrg# with or without modifications, as long as this notice is preserved.
14920d725fbSmrg
15020d725fbSmrg
151fe605390Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
15220d725fbSmrg# written in clear, in which case automake, when reading aclocal.m4,
15320d725fbSmrg# will think it sees a *use*, and therefore will trigger all it's
15420d725fbSmrg# C support machinery.  Also note that it means that autoscan, seeing
15520d725fbSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
15620d725fbSmrg
15720d725fbSmrg
15820d725fbSmrg# _AM_DEPENDENCIES(NAME)
15920d725fbSmrg# ----------------------
16020d725fbSmrg# See how the compiler implements dependency checking.
161fe605390Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
16220d725fbSmrg# We try a few techniques and use that to set a single cache variable.
16320d725fbSmrg#
16420d725fbSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
16520d725fbSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
16620d725fbSmrg# dependency, and given that the user is not expected to run this macro,
16720d725fbSmrg# just rely on AC_PROG_CC.
16820d725fbSmrgAC_DEFUN([_AM_DEPENDENCIES],
16920d725fbSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
17020d725fbSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
17120d725fbSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
17220d725fbSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
17320d725fbSmrg
174fe605390Smrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
175fe605390Smrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
176fe605390Smrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
177fe605390Smrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
178fe605390Smrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
179fe605390Smrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
180fe605390Smrg                    [depcc="$$1"   am_compiler_list=])
18120d725fbSmrg
18220d725fbSmrgAC_CACHE_CHECK([dependency style of $depcc],
18320d725fbSmrg               [am_cv_$1_dependencies_compiler_type],
18420d725fbSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18520d725fbSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
18620d725fbSmrg  # making bogus files that we don't know about and never remove.  For
18720d725fbSmrg  # instance it was reported that on HP-UX the gcc test will end up
188fe605390Smrg  # making a dummy file named 'D' -- because '-MD' means "put the output
189fe605390Smrg  # in D".
190fe605390Smrg  rm -rf conftest.dir
19120d725fbSmrg  mkdir conftest.dir
19220d725fbSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
19320d725fbSmrg  # using a relative directory.
19420d725fbSmrg  cp "$am_depcomp" conftest.dir
19520d725fbSmrg  cd conftest.dir
19620d725fbSmrg  # We will build objects and dependencies in a subdirectory because
19720d725fbSmrg  # it helps to detect inapplicable dependency modes.  For instance
19820d725fbSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
19920d725fbSmrg  # side effect of compilation, but ICC will put the dependencies in
20020d725fbSmrg  # the current directory while Tru64 will put them in the object
20120d725fbSmrg  # directory.
20220d725fbSmrg  mkdir sub
20320d725fbSmrg
20420d725fbSmrg  am_cv_$1_dependencies_compiler_type=none
20520d725fbSmrg  if test "$am_compiler_list" = ""; then
20620d725fbSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
20720d725fbSmrg  fi
20863fbae1dSmrg  am__universal=false
20963fbae1dSmrg  m4_case([$1], [CC],
21063fbae1dSmrg    [case " $depcc " in #(
21163fbae1dSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21263fbae1dSmrg     esac],
21363fbae1dSmrg    [CXX],
21463fbae1dSmrg    [case " $depcc " in #(
21563fbae1dSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21663fbae1dSmrg     esac])
21763fbae1dSmrg
21820d725fbSmrg  for depmode in $am_compiler_list; do
21920d725fbSmrg    # Setup a source with many dependencies, because some compilers
22020d725fbSmrg    # like to wrap large dependency lists on column 80 (with \), and
22120d725fbSmrg    # we should not choose a depcomp mode which is confused by this.
22220d725fbSmrg    #
22320d725fbSmrg    # We need to recreate these files for each test, as the compiler may
22420d725fbSmrg    # overwrite some of them when testing with obscure command lines.
22520d725fbSmrg    # This happens at least with the AIX C compiler.
22620d725fbSmrg    : > sub/conftest.c
22720d725fbSmrg    for i in 1 2 3 4 5 6; do
22820d725fbSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
229fe605390Smrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
230fe605390Smrg      # Solaris 10 /bin/sh.
231fe605390Smrg      echo '/* dummy */' > sub/conftst$i.h
23220d725fbSmrg    done
23320d725fbSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
23420d725fbSmrg
235fe605390Smrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
23663fbae1dSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
237fe605390Smrg    # handle '-M -o', and we need to detect this.  Also, some Intel
238fe605390Smrg    # versions had trouble with output in subdirs.
23963fbae1dSmrg    am__obj=sub/conftest.${OBJEXT-o}
24063fbae1dSmrg    am__minus_obj="-o $am__obj"
24120d725fbSmrg    case $depmode in
24263fbae1dSmrg    gcc)
24363fbae1dSmrg      # This depmode causes a compiler race in universal mode.
24463fbae1dSmrg      test "$am__universal" = false || continue
24563fbae1dSmrg      ;;
24620d725fbSmrg    nosideeffect)
247fe605390Smrg      # After this tag, mechanisms are not by side-effect, so they'll
248fe605390Smrg      # only be used when explicitly requested.
24920d725fbSmrg      if test "x$enable_dependency_tracking" = xyes; then
25020d725fbSmrg	continue
25120d725fbSmrg      else
25220d725fbSmrg	break
25320d725fbSmrg      fi
25420d725fbSmrg      ;;
255fe605390Smrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
256fe605390Smrg      # This compiler won't grok '-c -o', but also, the minuso test has
25763fbae1dSmrg      # not run yet.  These depmodes are late enough in the game, and
25863fbae1dSmrg      # so weak that their functioning should not be impacted.
25963fbae1dSmrg      am__obj=conftest.${OBJEXT-o}
26063fbae1dSmrg      am__minus_obj=
26163fbae1dSmrg      ;;
26220d725fbSmrg    none) break ;;
26320d725fbSmrg    esac
26420d725fbSmrg    if depmode=$depmode \
26563fbae1dSmrg       source=sub/conftest.c object=$am__obj \
26620d725fbSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
26763fbae1dSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
26820d725fbSmrg         >/dev/null 2>conftest.err &&
26963fbae1dSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27020d725fbSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27163fbae1dSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27220d725fbSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27320d725fbSmrg      # icc doesn't choke on unknown options, it will just issue warnings
27420d725fbSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
27520d725fbSmrg      # that says an option was ignored or not supported.
27620d725fbSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
27720d725fbSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
27820d725fbSmrg      # The diagnosis changed in icc 8.0:
27920d725fbSmrg      #   icc: Command line remark: option '-MP' not supported
28020d725fbSmrg      if (grep 'ignoring option' conftest.err ||
28120d725fbSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28220d725fbSmrg        am_cv_$1_dependencies_compiler_type=$depmode
28320d725fbSmrg        break
28420d725fbSmrg      fi
28520d725fbSmrg    fi
28620d725fbSmrg  done
28720d725fbSmrg
28820d725fbSmrg  cd ..
28920d725fbSmrg  rm -rf conftest.dir
29020d725fbSmrgelse
29120d725fbSmrg  am_cv_$1_dependencies_compiler_type=none
29220d725fbSmrgfi
29320d725fbSmrg])
29420d725fbSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
29520d725fbSmrgAM_CONDITIONAL([am__fastdep$1], [
29620d725fbSmrg  test "x$enable_dependency_tracking" != xno \
29720d725fbSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
29820d725fbSmrg])
29920d725fbSmrg
30020d725fbSmrg
30120d725fbSmrg# AM_SET_DEPDIR
30220d725fbSmrg# -------------
30320d725fbSmrg# Choose a directory name for dependency files.
304fe605390Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
30520d725fbSmrgAC_DEFUN([AM_SET_DEPDIR],
30620d725fbSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
30720d725fbSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
30820d725fbSmrg])
30920d725fbSmrg
31020d725fbSmrg
31120d725fbSmrg# AM_DEP_TRACK
31220d725fbSmrg# ------------
31320d725fbSmrgAC_DEFUN([AM_DEP_TRACK],
314fe605390Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl
315fe605390SmrgAS_HELP_STRING(
316fe605390Smrg  [--enable-dependency-tracking],
317fe605390Smrg  [do not reject slow dependency extractors])
318fe605390SmrgAS_HELP_STRING(
319fe605390Smrg  [--disable-dependency-tracking],
320fe605390Smrg  [speeds up one-time build])])
32120d725fbSmrgif test "x$enable_dependency_tracking" != xno; then
32220d725fbSmrg  am_depcomp="$ac_aux_dir/depcomp"
32320d725fbSmrg  AMDEPBACKSLASH='\'
324fe605390Smrg  am__nodep='_no'
32520d725fbSmrgfi
32620d725fbSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
32763fbae1dSmrgAC_SUBST([AMDEPBACKSLASH])dnl
32863fbae1dSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329fe605390SmrgAC_SUBST([am__nodep])dnl
330fe605390Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl
33120d725fbSmrg])
33220d725fbSmrg
33320d725fbSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
33420d725fbSmrg
335fe605390Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
33620d725fbSmrg#
33720d725fbSmrg# This file is free software; the Free Software Foundation
33820d725fbSmrg# gives unlimited permission to copy and/or distribute it,
33920d725fbSmrg# with or without modifications, as long as this notice is preserved.
34020d725fbSmrg
34120d725fbSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
34220d725fbSmrg# ------------------------------
34320d725fbSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
34463fbae1dSmrg[{
345fe605390Smrg  # Older Autoconf quotes --file arguments for eval, but not when files
34663fbae1dSmrg  # are listed without --file.  Let's play safe and only enable the eval
34763fbae1dSmrg  # if we detect the quoting.
348fe605390Smrg  # TODO: see whether this extra hack can be removed once we start
349fe605390Smrg  # requiring Autoconf 2.70 or later.
350fe605390Smrg  AS_CASE([$CONFIG_FILES],
351fe605390Smrg          [*\'*], [eval set x "$CONFIG_FILES"],
352fe605390Smrg          [*], [set x $CONFIG_FILES])
35363fbae1dSmrg  shift
354fe605390Smrg  # Used to flag and report bootstrapping failures.
355fe605390Smrg  am_rc=0
356fe605390Smrg  for am_mf
35763fbae1dSmrg  do
35863fbae1dSmrg    # Strip MF so we end up with the name of the file.
359fe605390Smrg    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
360fe605390Smrg    # Check whether this is an Automake generated Makefile which includes
361fe605390Smrg    # dependency-tracking related rules and includes.
362fe605390Smrg    # Grep'ing the whole file directly is not great: AIX grep has a line
36363fbae1dSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
364fe605390Smrg    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
365fe605390Smrg      || continue
366fe605390Smrg    am_dirpart=`AS_DIRNAME(["$am_mf"])`
367fe605390Smrg    am_filepart=`AS_BASENAME(["$am_mf"])`
368fe605390Smrg    AM_RUN_LOG([cd "$am_dirpart" \
369fe605390Smrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
370fe605390Smrg        | $MAKE -f - am--depfiles]) || am_rc=$?
37120d725fbSmrg  done
372fe605390Smrg  if test $am_rc -ne 0; then
373fe605390Smrg    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
374fe605390Smrg    for automatic dependency tracking.  If GNU make was not used, consider
375fe605390Smrg    re-running the configure script with MAKE="gmake" (or whatever is
376fe605390Smrg    necessary).  You can also try re-running configure with the
377fe605390Smrg    '--disable-dependency-tracking' option to at least be able to build
378fe605390Smrg    the package (albeit without support for automatic dependency tracking).])
379fe605390Smrg  fi
380fe605390Smrg  AS_UNSET([am_dirpart])
381fe605390Smrg  AS_UNSET([am_filepart])
382fe605390Smrg  AS_UNSET([am_mf])
383fe605390Smrg  AS_UNSET([am_rc])
384fe605390Smrg  rm -f conftest-deps.mk
38563fbae1dSmrg}
38620d725fbSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
38720d725fbSmrg
38820d725fbSmrg
38920d725fbSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
39020d725fbSmrg# -----------------------------
39120d725fbSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
39220d725fbSmrg#
393fe605390Smrg# This code is only required when automatic dependency tracking is enabled.
394fe605390Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
395fe605390Smrg# order to bootstrap the dependency handling code.
39620d725fbSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
39720d725fbSmrg[AC_CONFIG_COMMANDS([depfiles],
39820d725fbSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
399fe605390Smrg     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
40020d725fbSmrg
40120d725fbSmrg# Do all the work for Automake.                             -*- Autoconf -*-
40220d725fbSmrg
403fe605390Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
40420d725fbSmrg#
40520d725fbSmrg# This file is free software; the Free Software Foundation
40620d725fbSmrg# gives unlimited permission to copy and/or distribute it,
40720d725fbSmrg# with or without modifications, as long as this notice is preserved.
40820d725fbSmrg
40920d725fbSmrg# This macro actually does too much.  Some checks are only needed if
41020d725fbSmrg# your package does certain things.  But this isn't really a big deal.
41120d725fbSmrg
412fe605390Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
413fe605390Smrgm4_define([AC_PROG_CC],
414fe605390Smrgm4_defn([AC_PROG_CC])
415fe605390Smrg[_AM_PROG_CC_C_O
416fe605390Smrg])
417fe605390Smrg
41820d725fbSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
41920d725fbSmrg# AM_INIT_AUTOMAKE([OPTIONS])
42020d725fbSmrg# -----------------------------------------------
42120d725fbSmrg# The call with PACKAGE and VERSION arguments is the old style
42220d725fbSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
42320d725fbSmrg# and VERSION should now be passed to AC_INIT and removed from
42420d725fbSmrg# the call to AM_INIT_AUTOMAKE.
42520d725fbSmrg# We support both call styles for the transition.  After
42620d725fbSmrg# the next Automake release, Autoconf can make the AC_INIT
42720d725fbSmrg# arguments mandatory, and then we can depend on a new Autoconf
42820d725fbSmrg# release and drop the old call support.
42920d725fbSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
430fe605390Smrg[AC_PREREQ([2.65])dnl
431fe605390Smrgm4_ifdef([_$0_ALREADY_INIT],
432fe605390Smrg  [m4_fatal([$0 expanded multiple times
433fe605390Smrg]m4_defn([_$0_ALREADY_INIT]))],
434fe605390Smrg  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
43520d725fbSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
43620d725fbSmrgdnl the ones we care about.
43720d725fbSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
43820d725fbSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
43920d725fbSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
44063fbae1dSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
44163fbae1dSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
44263fbae1dSmrg  # is not polluted with repeated "-I."
44363fbae1dSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
44463fbae1dSmrg  # test to see if srcdir already configured
44563fbae1dSmrg  if test -f $srcdir/config.status; then
44663fbae1dSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
44763fbae1dSmrg  fi
44820d725fbSmrgfi
44920d725fbSmrg
45020d725fbSmrg# test whether we have cygpath
45120d725fbSmrgif test -z "$CYGPATH_W"; then
45220d725fbSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
45320d725fbSmrg    CYGPATH_W='cygpath -w'
45420d725fbSmrg  else
45520d725fbSmrg    CYGPATH_W=echo
45620d725fbSmrg  fi
45720d725fbSmrgfi
45820d725fbSmrgAC_SUBST([CYGPATH_W])
45920d725fbSmrg
46020d725fbSmrg# Define the identity of the package.
46120d725fbSmrgdnl Distinguish between old-style and new-style calls.
46220d725fbSmrgm4_ifval([$2],
463fe605390Smrg[AC_DIAGNOSE([obsolete],
464fe605390Smrg             [$0: two- and three-arguments forms are deprecated.])
465fe605390Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
46620d725fbSmrg AC_SUBST([PACKAGE], [$1])dnl
46720d725fbSmrg AC_SUBST([VERSION], [$2])],
46820d725fbSmrg[_AM_SET_OPTIONS([$1])dnl
46963fbae1dSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
470fe605390Smrgm4_if(
471fe605390Smrg  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
472fe605390Smrg  [ok:ok],,
47363fbae1dSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
47420d725fbSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
47520d725fbSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
47620d725fbSmrg
47720d725fbSmrg_AM_IF_OPTION([no-define],,
478fe605390Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
479fe605390Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
48020d725fbSmrg
48120d725fbSmrg# Some tools Automake needs.
48220d725fbSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
48320d725fbSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
484fe605390SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
485fe605390SmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
486fe605390SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
487fe605390SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
488fe605390SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
48963fbae1dSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
49063fbae1dSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
491fe605390SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
492fe605390Smrg# For better backward compatibility.  To be removed once Automake 1.9.x
493fe605390Smrg# dies out for good.  For more background, see:
494fe605390Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
495fe605390Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
496fe605390SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
497fe605390Smrg# We need awk for the "check" target (and possibly the TAP driver).  The
498fe605390Smrg# system "awk" is bad on some platforms.
49920d725fbSmrgAC_REQUIRE([AC_PROG_AWK])dnl
50020d725fbSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
50120d725fbSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
50220d725fbSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
50363fbae1dSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
50463fbae1dSmrg			     [_AM_PROG_TAR([v7])])])
50520d725fbSmrg_AM_IF_OPTION([no-dependencies],,
50620d725fbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
507fe605390Smrg		  [_AM_DEPENDENCIES([CC])],
508fe605390Smrg		  [m4_define([AC_PROG_CC],
509fe605390Smrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
51020d725fbSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
511fe605390Smrg		  [_AM_DEPENDENCIES([CXX])],
512fe605390Smrg		  [m4_define([AC_PROG_CXX],
513fe605390Smrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
51463fbae1dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
515fe605390Smrg		  [_AM_DEPENDENCIES([OBJC])],
516fe605390Smrg		  [m4_define([AC_PROG_OBJC],
517fe605390Smrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
518fe605390SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
519fe605390Smrg		  [_AM_DEPENDENCIES([OBJCXX])],
520fe605390Smrg		  [m4_define([AC_PROG_OBJCXX],
521fe605390Smrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
52220d725fbSmrg])
523fe605390Smrg# Variables for tags utilities; see am/tags.am
524fe605390Smrgif test -z "$CTAGS"; then
525fe605390Smrg  CTAGS=ctags
526fe605390Smrgfi
527fe605390SmrgAC_SUBST([CTAGS])
528fe605390Smrgif test -z "$ETAGS"; then
529fe605390Smrg  ETAGS=etags
530fe605390Smrgfi
531fe605390SmrgAC_SUBST([ETAGS])
532fe605390Smrgif test -z "$CSCOPE"; then
533fe605390Smrg  CSCOPE=cscope
534fe605390Smrgfi
535fe605390SmrgAC_SUBST([CSCOPE])
536fe605390Smrg
537fe605390SmrgAC_REQUIRE([AM_SILENT_RULES])dnl
538fe605390Smrgdnl The testsuite driver may need to know about EXEEXT, so add the
539fe605390Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
540fe605390Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
54163fbae1dSmrgAC_CONFIG_COMMANDS_PRE(dnl
54263fbae1dSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
54363fbae1dSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
544fe605390Smrg
545fe605390Smrg# POSIX will say in a future version that running "rm -f" with no argument
546fe605390Smrg# is OK; and we want to be able to make that assumption in our Makefile
547fe605390Smrg# recipes.  So use an aggressive probe to check that the usage we want is
548fe605390Smrg# actually supported "in the wild" to an acceptable degree.
549fe605390Smrg# See automake bug#10828.
550fe605390Smrg# To make any issue more visible, cause the running configure to be aborted
551fe605390Smrg# by default if the 'rm' program in use doesn't match our expectations; the
552fe605390Smrg# user can still override this though.
553fe605390Smrgif rm -f && rm -fr && rm -rf; then : OK; else
554fe605390Smrg  cat >&2 <<'END'
555fe605390SmrgOops!
556fe605390Smrg
557fe605390SmrgYour 'rm' program seems unable to run without file operands specified
558fe605390Smrgon the command line, even when the '-f' option is present.  This is contrary
559fe605390Smrgto the behaviour of most rm programs out there, and not conforming with
560fe605390Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
561fe605390Smrg
562fe605390SmrgPlease tell bug-automake@gnu.org about your system, including the value
563fe605390Smrgof your $PATH and any error possibly output before this message.  This
564fe605390Smrgcan help us improve future automake versions.
565fe605390Smrg
566fe605390SmrgEND
567fe605390Smrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
568fe605390Smrg    echo 'Configuration will proceed anyway, since you have set the' >&2
569fe605390Smrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
570fe605390Smrg    echo >&2
571fe605390Smrg  else
572fe605390Smrg    cat >&2 <<'END'
573fe605390SmrgAborting the configuration process, to ensure you take notice of the issue.
574fe605390Smrg
575fe605390SmrgYou can download and install GNU coreutils to get an 'rm' implementation
576fe605390Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>.
577fe605390Smrg
578fe605390SmrgIf you want to complete the configuration process using your problematic
579fe605390Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
580fe605390Smrgto "yes", and re-run configure.
581fe605390Smrg
582fe605390SmrgEND
583fe605390Smrg    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
584fe605390Smrg  fi
585fe605390Smrgfi
586fe605390Smrgdnl The trailing newline in this macro's definition is deliberate, for
587fe605390Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments
588fe605390Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
58920d725fbSmrg])
59020d725fbSmrg
591fe605390Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
59263fbae1dSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
59363fbae1dSmrgdnl mangled by Autoconf and run in a shell conditional statement.
59463fbae1dSmrgm4_define([_AC_COMPILER_EXEEXT],
59563fbae1dSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
59663fbae1dSmrg
59720d725fbSmrg# When config.status generates a header, we must update the stamp-h file.
59820d725fbSmrg# This file resides in the same directory as the config header
59920d725fbSmrg# that is generated.  The stamp files are numbered to have different names.
60020d725fbSmrg
60120d725fbSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
60220d725fbSmrg# loop where config.status creates the headers, so we can generate
60320d725fbSmrg# our stamp files there.
60420d725fbSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
60520d725fbSmrg[# Compute $1's index in $config_headers.
60663fbae1dSmrg_am_arg=$1
60720d725fbSmrg_am_stamp_count=1
60820d725fbSmrgfor _am_header in $config_headers :; do
60920d725fbSmrg  case $_am_header in
61063fbae1dSmrg    $_am_arg | $_am_arg:* )
61120d725fbSmrg      break ;;
61220d725fbSmrg    * )
61320d725fbSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
61420d725fbSmrg  esac
61520d725fbSmrgdone
61663fbae1dSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
61720d725fbSmrg
618fe605390Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
61920d725fbSmrg#
62020d725fbSmrg# This file is free software; the Free Software Foundation
62120d725fbSmrg# gives unlimited permission to copy and/or distribute it,
62220d725fbSmrg# with or without modifications, as long as this notice is preserved.
62320d725fbSmrg
62420d725fbSmrg# AM_PROG_INSTALL_SH
62520d725fbSmrg# ------------------
62620d725fbSmrg# Define $install_sh.
62720d725fbSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
62820d725fbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
629fe605390Smrgif test x"${install_sh+set}" != xset; then
63063fbae1dSmrg  case $am_aux_dir in
63163fbae1dSmrg  *\ * | *\	*)
63263fbae1dSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
63363fbae1dSmrg  *)
63463fbae1dSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
63563fbae1dSmrg  esac
63663fbae1dSmrgfi
637fe605390SmrgAC_SUBST([install_sh])])
63820d725fbSmrg
639fe605390Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc.
64020d725fbSmrg#
64120d725fbSmrg# This file is free software; the Free Software Foundation
64220d725fbSmrg# gives unlimited permission to copy and/or distribute it,
64320d725fbSmrg# with or without modifications, as long as this notice is preserved.
64420d725fbSmrg
64520d725fbSmrg# Check whether the underlying file-system supports filenames
64620d725fbSmrg# with a leading dot.  For instance MS-DOS doesn't.
64720d725fbSmrgAC_DEFUN([AM_SET_LEADING_DOT],
64820d725fbSmrg[rm -rf .tst 2>/dev/null
64920d725fbSmrgmkdir .tst 2>/dev/null
65020d725fbSmrgif test -d .tst; then
65120d725fbSmrg  am__leading_dot=.
65220d725fbSmrgelse
65320d725fbSmrg  am__leading_dot=_
65420d725fbSmrgfi
65520d725fbSmrgrmdir .tst 2>/dev/null
65620d725fbSmrgAC_SUBST([am__leading_dot])])
65720d725fbSmrg
65820d725fbSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
65920d725fbSmrg
660fe605390Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
66120d725fbSmrg#
66220d725fbSmrg# This file is free software; the Free Software Foundation
66320d725fbSmrg# gives unlimited permission to copy and/or distribute it,
66420d725fbSmrg# with or without modifications, as long as this notice is preserved.
66520d725fbSmrg
66620d725fbSmrg# AM_MAKE_INCLUDE()
66720d725fbSmrg# -----------------
668fe605390Smrg# Check whether make has an 'include' directive that can support all
669fe605390Smrg# the idioms we need for our automatic dependency tracking code.
67020d725fbSmrgAC_DEFUN([AM_MAKE_INCLUDE],
671fe605390Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
672fe605390Smrgcat > confinc.mk << 'END'
67320d725fbSmrgam__doit:
674fe605390Smrg	@echo this is the am__doit target >confinc.out
67520d725fbSmrg.PHONY: am__doit
67620d725fbSmrgEND
67720d725fbSmrgam__include="#"
67820d725fbSmrgam__quote=
679fe605390Smrg# BSD make does it like this.
680fe605390Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD
681fe605390Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this.
682fe605390Smrgecho 'include confinc.mk # ignored' > confmf.GNU
683fe605390Smrg_am_result=no
684fe605390Smrgfor s in GNU BSD; do
685fe605390Smrg  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
686fe605390Smrg  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
687fe605390Smrg      ['0:this is the am__doit target'],
688fe605390Smrg      [AS_CASE([$s],
689fe605390Smrg          [BSD], [am__include='.include' am__quote='"'],
690fe605390Smrg          [am__include='include' am__quote=''])])
691fe605390Smrg  if test "$am__include" != "#"; then
692fe605390Smrg    _am_result="yes ($s style)"
693fe605390Smrg    break
694fe605390Smrg  fi
695fe605390Smrgdone
696fe605390Smrgrm -f confinc.* confmf.*
697fe605390SmrgAC_MSG_RESULT([${_am_result}])
698fe605390SmrgAC_SUBST([am__include])])
699fe605390SmrgAC_SUBST([am__quote])])
70020d725fbSmrg
70120d725fbSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
70220d725fbSmrg
703fe605390Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
70420d725fbSmrg#
70520d725fbSmrg# This file is free software; the Free Software Foundation
70620d725fbSmrg# gives unlimited permission to copy and/or distribute it,
70720d725fbSmrg# with or without modifications, as long as this notice is preserved.
70820d725fbSmrg
70920d725fbSmrg# AM_MISSING_PROG(NAME, PROGRAM)
71020d725fbSmrg# ------------------------------
71120d725fbSmrgAC_DEFUN([AM_MISSING_PROG],
71220d725fbSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
71320d725fbSmrg$1=${$1-"${am_missing_run}$2"}
71420d725fbSmrgAC_SUBST($1)])
71520d725fbSmrg
71620d725fbSmrg# AM_MISSING_HAS_RUN
71720d725fbSmrg# ------------------
718fe605390Smrg# Define MISSING if not defined so far and test if it is modern enough.
719fe605390Smrg# If it is, set am_missing_run to use it, otherwise, to nothing.
72020d725fbSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
72120d725fbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
72263fbae1dSmrgAC_REQUIRE_AUX_FILE([missing])dnl
72363fbae1dSmrgif test x"${MISSING+set}" != xset; then
724fe605390Smrg  MISSING="\${SHELL} '$am_aux_dir/missing'"
72563fbae1dSmrgfi
72620d725fbSmrg# Use eval to expand $SHELL
727fe605390Smrgif eval "$MISSING --is-lightweight"; then
728fe605390Smrg  am_missing_run="$MISSING "
72920d725fbSmrgelse
73020d725fbSmrg  am_missing_run=
731fe605390Smrg  AC_MSG_WARN(['missing' script is too old or missing])
73220d725fbSmrgfi
73320d725fbSmrg])
73420d725fbSmrg
73520d725fbSmrg# Helper functions for option handling.                     -*- Autoconf -*-
73620d725fbSmrg
737fe605390Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
73820d725fbSmrg#
73920d725fbSmrg# This file is free software; the Free Software Foundation
74020d725fbSmrg# gives unlimited permission to copy and/or distribute it,
74120d725fbSmrg# with or without modifications, as long as this notice is preserved.
74220d725fbSmrg
74320d725fbSmrg# _AM_MANGLE_OPTION(NAME)
74420d725fbSmrg# -----------------------
74520d725fbSmrgAC_DEFUN([_AM_MANGLE_OPTION],
74620d725fbSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
74720d725fbSmrg
74820d725fbSmrg# _AM_SET_OPTION(NAME)
749fe605390Smrg# --------------------
75020d725fbSmrg# Set option NAME.  Presently that only means defining a flag for this option.
75120d725fbSmrgAC_DEFUN([_AM_SET_OPTION],
752fe605390Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
75320d725fbSmrg
75420d725fbSmrg# _AM_SET_OPTIONS(OPTIONS)
755fe605390Smrg# ------------------------
75620d725fbSmrg# OPTIONS is a space-separated list of Automake options.
75720d725fbSmrgAC_DEFUN([_AM_SET_OPTIONS],
75863fbae1dSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
75920d725fbSmrg
76020d725fbSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
76120d725fbSmrg# -------------------------------------------
76220d725fbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
76320d725fbSmrgAC_DEFUN([_AM_IF_OPTION],
76420d725fbSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
76520d725fbSmrg
766fe605390Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
767fe605390Smrg#
768fe605390Smrg# This file is free software; the Free Software Foundation
769fe605390Smrg# gives unlimited permission to copy and/or distribute it,
770fe605390Smrg# with or without modifications, as long as this notice is preserved.
771fe605390Smrg
772fe605390Smrg# _AM_PROG_CC_C_O
773fe605390Smrg# ---------------
774fe605390Smrg# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
775fe605390Smrg# to automatically call this.
776fe605390SmrgAC_DEFUN([_AM_PROG_CC_C_O],
777fe605390Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
778fe605390SmrgAC_REQUIRE_AUX_FILE([compile])dnl
779fe605390SmrgAC_LANG_PUSH([C])dnl
780fe605390SmrgAC_CACHE_CHECK(
781fe605390Smrg  [whether $CC understands -c and -o together],
782fe605390Smrg  [am_cv_prog_cc_c_o],
783fe605390Smrg  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
784fe605390Smrg  # Make sure it works both with $CC and with simple cc.
785fe605390Smrg  # Following AC_PROG_CC_C_O, we do the test twice because some
786fe605390Smrg  # compilers refuse to overwrite an existing .o file with -o,
787fe605390Smrg  # though they will create one.
788fe605390Smrg  am_cv_prog_cc_c_o=yes
789fe605390Smrg  for am_i in 1 2; do
790fe605390Smrg    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
791fe605390Smrg         && test -f conftest2.$ac_objext; then
792fe605390Smrg      : OK
793fe605390Smrg    else
794fe605390Smrg      am_cv_prog_cc_c_o=no
795fe605390Smrg      break
796fe605390Smrg    fi
797fe605390Smrg  done
798fe605390Smrg  rm -f core conftest*
799fe605390Smrg  unset am_i])
800fe605390Smrgif test "$am_cv_prog_cc_c_o" != yes; then
801fe605390Smrg   # Losing compiler, so override with the script.
802fe605390Smrg   # FIXME: It is wrong to rewrite CC.
803fe605390Smrg   # But if we don't then we get into trouble of one sort or another.
804fe605390Smrg   # A longer-term fix would be to have automake use am__CC in this case,
805fe605390Smrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
806fe605390Smrg   CC="$am_aux_dir/compile $CC"
807fe605390Smrgfi
808fe605390SmrgAC_LANG_POP([C])])
809fe605390Smrg
810fe605390Smrg# For backward compatibility.
811fe605390SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
81220d725fbSmrg
813fe605390Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
81420d725fbSmrg#
81520d725fbSmrg# This file is free software; the Free Software Foundation
81620d725fbSmrg# gives unlimited permission to copy and/or distribute it,
81720d725fbSmrg# with or without modifications, as long as this notice is preserved.
81820d725fbSmrg
819fe605390Smrg# AM_RUN_LOG(COMMAND)
820fe605390Smrg# -------------------
821fe605390Smrg# Run COMMAND, save the exit status in ac_status, and log it.
822fe605390Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
823fe605390SmrgAC_DEFUN([AM_RUN_LOG],
824fe605390Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
825fe605390Smrg   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
826fe605390Smrg   ac_status=$?
827fe605390Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
828fe605390Smrg   (exit $ac_status); }])
829fe605390Smrg
830fe605390Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
831fe605390Smrg
832fe605390Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
833fe605390Smrg#
834fe605390Smrg# This file is free software; the Free Software Foundation
835fe605390Smrg# gives unlimited permission to copy and/or distribute it,
836fe605390Smrg# with or without modifications, as long as this notice is preserved.
83720d725fbSmrg
83820d725fbSmrg# AM_SANITY_CHECK
83920d725fbSmrg# ---------------
84020d725fbSmrgAC_DEFUN([AM_SANITY_CHECK],
84120d725fbSmrg[AC_MSG_CHECKING([whether build environment is sane])
84263fbae1dSmrg# Reject unsafe characters in $srcdir or the absolute working directory
84363fbae1dSmrg# name.  Accept space and tab only in the latter.
84463fbae1dSmrgam_lf='
84563fbae1dSmrg'
84663fbae1dSmrgcase `pwd` in
84763fbae1dSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
84863fbae1dSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
84963fbae1dSmrgesac
85063fbae1dSmrgcase $srcdir in
85163fbae1dSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
852fe605390Smrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
85363fbae1dSmrgesac
85463fbae1dSmrg
855fe605390Smrg# Do 'set' in a subshell so we don't clobber the current shell's
85620d725fbSmrg# arguments.  Must try -L first in case configure is actually a
85720d725fbSmrg# symlink; some systems play weird games with the mod time of symlinks
85820d725fbSmrg# (eg FreeBSD returns the mod time of the symlink's containing
85920d725fbSmrg# directory).
86020d725fbSmrgif (
861fe605390Smrg   am_has_slept=no
862fe605390Smrg   for am_try in 1 2; do
863fe605390Smrg     echo "timestamp, slept: $am_has_slept" > conftest.file
864fe605390Smrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
865fe605390Smrg     if test "$[*]" = "X"; then
866fe605390Smrg	# -L didn't work.
867fe605390Smrg	set X `ls -t "$srcdir/configure" conftest.file`
868fe605390Smrg     fi
869fe605390Smrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
870fe605390Smrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
871fe605390Smrg
872fe605390Smrg	# If neither matched, then we have a broken ls.  This can happen
873fe605390Smrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
874fe605390Smrg	# broken ls alias from the environment.  This has actually
875fe605390Smrg	# happened.  Such a system could not be considered "sane".
876fe605390Smrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
877fe605390Smrg  alias in your environment])
878fe605390Smrg     fi
879fe605390Smrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
880fe605390Smrg       break
881fe605390Smrg     fi
882fe605390Smrg     # Just in case.
883fe605390Smrg     sleep 1
884fe605390Smrg     am_has_slept=yes
885fe605390Smrg   done
88620d725fbSmrg   test "$[2]" = conftest.file
88720d725fbSmrg   )
88820d725fbSmrgthen
88920d725fbSmrg   # Ok.
89020d725fbSmrg   :
89120d725fbSmrgelse
89220d725fbSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
89320d725fbSmrgCheck your system clock])
89420d725fbSmrgfi
895fe605390SmrgAC_MSG_RESULT([yes])
896fe605390Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and
897fe605390Smrg# generated files are strictly newer.
898fe605390Smrgam_sleep_pid=
899fe605390Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
900fe605390Smrg  ( sleep 1 ) &
901fe605390Smrg  am_sleep_pid=$!
902fe605390Smrgfi
903fe605390SmrgAC_CONFIG_COMMANDS_PRE(
904fe605390Smrg  [AC_MSG_CHECKING([that generated files are newer than configure])
905fe605390Smrg   if test -n "$am_sleep_pid"; then
906fe605390Smrg     # Hide warnings about reused PIDs.
907fe605390Smrg     wait $am_sleep_pid 2>/dev/null
908fe605390Smrg   fi
909fe605390Smrg   AC_MSG_RESULT([done])])
910fe605390Smrgrm -f conftest.file
911fe605390Smrg])
912fe605390Smrg
913fe605390Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc.
914fe605390Smrg#
915fe605390Smrg# This file is free software; the Free Software Foundation
916fe605390Smrg# gives unlimited permission to copy and/or distribute it,
917fe605390Smrg# with or without modifications, as long as this notice is preserved.
918fe605390Smrg
919fe605390Smrg# AM_SILENT_RULES([DEFAULT])
920fe605390Smrg# --------------------------
921fe605390Smrg# Enable less verbose build rules; with the default set to DEFAULT
922fe605390Smrg# ("yes" being less verbose, "no" or empty being verbose).
923fe605390SmrgAC_DEFUN([AM_SILENT_RULES],
924fe605390Smrg[AC_ARG_ENABLE([silent-rules], [dnl
925fe605390SmrgAS_HELP_STRING(
926fe605390Smrg  [--enable-silent-rules],
927fe605390Smrg  [less verbose build output (undo: "make V=1")])
928fe605390SmrgAS_HELP_STRING(
929fe605390Smrg  [--disable-silent-rules],
930fe605390Smrg  [verbose build output (undo: "make V=0")])dnl
931fe605390Smrg])
932fe605390Smrgcase $enable_silent_rules in @%:@ (((
933fe605390Smrg  yes) AM_DEFAULT_VERBOSITY=0;;
934fe605390Smrg   no) AM_DEFAULT_VERBOSITY=1;;
935fe605390Smrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
936fe605390Smrgesac
937fe605390Smrgdnl
938fe605390Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
939fe605390Smrgdnl do not support nested variable expansions.
940fe605390Smrgdnl See automake bug#9928 and bug#10237.
941fe605390Smrgam_make=${MAKE-make}
942fe605390SmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
943fe605390Smrg   [am_cv_make_support_nested_variables],
944fe605390Smrg   [if AS_ECHO([['TRUE=$(BAR$(V))
945fe605390SmrgBAR0=false
946fe605390SmrgBAR1=true
947fe605390SmrgV=1
948fe605390Smrgam__doit:
949fe605390Smrg	@$(TRUE)
950fe605390Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
951fe605390Smrg  am_cv_make_support_nested_variables=yes
952fe605390Smrgelse
953fe605390Smrg  am_cv_make_support_nested_variables=no
954fe605390Smrgfi])
955fe605390Smrgif test $am_cv_make_support_nested_variables = yes; then
956fe605390Smrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
957fe605390Smrg  AM_V='$(V)'
958fe605390Smrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
959fe605390Smrgelse
960fe605390Smrg  AM_V=$AM_DEFAULT_VERBOSITY
961fe605390Smrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
962fe605390Smrgfi
963fe605390SmrgAC_SUBST([AM_V])dnl
964fe605390SmrgAM_SUBST_NOTMAKE([AM_V])dnl
965fe605390SmrgAC_SUBST([AM_DEFAULT_V])dnl
966fe605390SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
967fe605390SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
968fe605390SmrgAM_BACKSLASH='\'
969fe605390SmrgAC_SUBST([AM_BACKSLASH])dnl
970fe605390Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
971fe605390Smrg])
97220d725fbSmrg
973fe605390Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
97420d725fbSmrg#
97520d725fbSmrg# This file is free software; the Free Software Foundation
97620d725fbSmrg# gives unlimited permission to copy and/or distribute it,
97720d725fbSmrg# with or without modifications, as long as this notice is preserved.
97820d725fbSmrg
97920d725fbSmrg# AM_PROG_INSTALL_STRIP
98020d725fbSmrg# ---------------------
981fe605390Smrg# One issue with vendor 'install' (even GNU) is that you can't
98220d725fbSmrg# specify the program used to strip binaries.  This is especially
98320d725fbSmrg# annoying in cross-compiling environments, where the build's strip
98420d725fbSmrg# is unlikely to handle the host's binaries.
98520d725fbSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
986fe605390Smrg# always use install-sh in "make install-strip", and initialize
98720d725fbSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
98820d725fbSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
98920d725fbSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
990fe605390Smrg# Installed binaries are usually stripped using 'strip' when the user
991fe605390Smrg# run "make install-strip".  However 'strip' might not be the right
99220d725fbSmrg# tool to use in cross-compilation environments, therefore Automake
993fe605390Smrg# will honor the 'STRIP' environment variable to overrule this program.
994fe605390Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
99520d725fbSmrgif test "$cross_compiling" != no; then
99620d725fbSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
99720d725fbSmrgfi
99863fbae1dSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
99920d725fbSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
100020d725fbSmrg
1001fe605390Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc.
100263fbae1dSmrg#
100363fbae1dSmrg# This file is free software; the Free Software Foundation
100463fbae1dSmrg# gives unlimited permission to copy and/or distribute it,
100563fbae1dSmrg# with or without modifications, as long as this notice is preserved.
100663fbae1dSmrg
100763fbae1dSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
100863fbae1dSmrg# ---------------------------
100963fbae1dSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
101063fbae1dSmrg# This macro is traced by Automake.
101163fbae1dSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
101263fbae1dSmrg
101363fbae1dSmrg# AM_SUBST_NOTMAKE(VARIABLE)
1014fe605390Smrg# --------------------------
101563fbae1dSmrg# Public sister of _AM_SUBST_NOTMAKE.
101663fbae1dSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
101763fbae1dSmrg
101820d725fbSmrg# Check how to create a tarball.                            -*- Autoconf -*-
101920d725fbSmrg
1020fe605390Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc.
102120d725fbSmrg#
102220d725fbSmrg# This file is free software; the Free Software Foundation
102320d725fbSmrg# gives unlimited permission to copy and/or distribute it,
102420d725fbSmrg# with or without modifications, as long as this notice is preserved.
102520d725fbSmrg
102620d725fbSmrg# _AM_PROG_TAR(FORMAT)
102720d725fbSmrg# --------------------
102820d725fbSmrg# Check how to create a tarball in format FORMAT.
1029fe605390Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
103020d725fbSmrg#
103120d725fbSmrg# Substitute a variable $(am__tar) that is a command
103220d725fbSmrg# writing to stdout a FORMAT-tarball containing the directory
103320d725fbSmrg# $tardir.
103420d725fbSmrg#     tardir=directory && $(am__tar) > result.tar
103520d725fbSmrg#
103620d725fbSmrg# Substitute a variable $(am__untar) that extract such
103720d725fbSmrg# a tarball read from stdin.
103820d725fbSmrg#     $(am__untar) < result.tar
1039fe605390Smrg#
104020d725fbSmrgAC_DEFUN([_AM_PROG_TAR],
1041fe605390Smrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
1042fe605390Smrg# in the wild :-(  We should find a proper way to deprecate it ...
1043fe605390SmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
1044fe605390Smrg
1045fe605390Smrg# We'll loop over all known methods to create a tar archive until one works.
104620d725fbSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
104720d725fbSmrg
1048fe605390Smrgm4_if([$1], [v7],
1049fe605390Smrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1050fe605390Smrg
1051fe605390Smrg  [m4_case([$1],
1052fe605390Smrg    [ustar],
1053fe605390Smrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1054fe605390Smrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1055fe605390Smrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1056fe605390Smrg      # and bug#13588).
1057fe605390Smrg      am_max_uid=2097151 # 2^21 - 1
1058fe605390Smrg      am_max_gid=$am_max_uid
1059fe605390Smrg      # The $UID and $GID variables are not portable, so we need to resort
1060fe605390Smrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1061fe605390Smrg      # below are definitely unexpected, so allow the users to see them
1062fe605390Smrg      # (that is, avoid stderr redirection).
1063fe605390Smrg      am_uid=`id -u || echo unknown`
1064fe605390Smrg      am_gid=`id -g || echo unknown`
1065fe605390Smrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1066fe605390Smrg      if test $am_uid -le $am_max_uid; then
1067fe605390Smrg         AC_MSG_RESULT([yes])
1068fe605390Smrg      else
1069fe605390Smrg         AC_MSG_RESULT([no])
1070fe605390Smrg         _am_tools=none
1071fe605390Smrg      fi
1072fe605390Smrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1073fe605390Smrg      if test $am_gid -le $am_max_gid; then
1074fe605390Smrg         AC_MSG_RESULT([yes])
1075fe605390Smrg      else
1076fe605390Smrg        AC_MSG_RESULT([no])
1077fe605390Smrg        _am_tools=none
1078fe605390Smrg      fi],
1079fe605390Smrg
1080fe605390Smrg  [pax],
1081fe605390Smrg    [],
108220d725fbSmrg
1083fe605390Smrg  [m4_fatal([Unknown tar format])])
1084fe605390Smrg
1085fe605390Smrg  AC_MSG_CHECKING([how to create a $1 tar archive])
1086fe605390Smrg
1087fe605390Smrg  # Go ahead even if we have the value already cached.  We do so because we
1088fe605390Smrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
1089fe605390Smrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1090fe605390Smrg
1091fe605390Smrg  for _am_tool in $_am_tools; do
1092fe605390Smrg    case $_am_tool in
1093fe605390Smrg    gnutar)
1094fe605390Smrg      for _am_tar in tar gnutar gtar; do
1095fe605390Smrg        AM_RUN_LOG([$_am_tar --version]) && break
1096fe605390Smrg      done
1097fe605390Smrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1098fe605390Smrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1099fe605390Smrg      am__untar="$_am_tar -xf -"
1100fe605390Smrg      ;;
1101fe605390Smrg    plaintar)
1102fe605390Smrg      # Must skip GNU tar: if it does not support --format= it doesn't create
1103fe605390Smrg      # ustar tarball either.
1104fe605390Smrg      (tar --version) >/dev/null 2>&1 && continue
1105fe605390Smrg      am__tar='tar chf - "$$tardir"'
1106fe605390Smrg      am__tar_='tar chf - "$tardir"'
1107fe605390Smrg      am__untar='tar xf -'
1108fe605390Smrg      ;;
1109fe605390Smrg    pax)
1110fe605390Smrg      am__tar='pax -L -x $1 -w "$$tardir"'
1111fe605390Smrg      am__tar_='pax -L -x $1 -w "$tardir"'
1112fe605390Smrg      am__untar='pax -r'
1113fe605390Smrg      ;;
1114fe605390Smrg    cpio)
1115fe605390Smrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1116fe605390Smrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1117fe605390Smrg      am__untar='cpio -i -H $1 -d'
1118fe605390Smrg      ;;
1119fe605390Smrg    none)
1120fe605390Smrg      am__tar=false
1121fe605390Smrg      am__tar_=false
1122fe605390Smrg      am__untar=false
1123fe605390Smrg      ;;
1124fe605390Smrg    esac
1125fe605390Smrg
1126fe605390Smrg    # If the value was cached, stop now.  We just wanted to have am__tar
1127fe605390Smrg    # and am__untar set.
1128fe605390Smrg    test -n "${am_cv_prog_tar_$1}" && break
1129fe605390Smrg
1130fe605390Smrg    # tar/untar a dummy directory, and stop if the command works.
1131fe605390Smrg    rm -rf conftest.dir
1132fe605390Smrg    mkdir conftest.dir
1133fe605390Smrg    echo GrepMe > conftest.dir/file
1134fe605390Smrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1135fe605390Smrg    rm -rf conftest.dir
1136fe605390Smrg    if test -s conftest.tar; then
1137fe605390Smrg      AM_RUN_LOG([$am__untar <conftest.tar])
1138fe605390Smrg      AM_RUN_LOG([cat conftest.dir/file])
1139fe605390Smrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1140fe605390Smrg    fi
1141fe605390Smrg  done
114220d725fbSmrg  rm -rf conftest.dir
114320d725fbSmrg
1144fe605390Smrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1145fe605390Smrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1146fe605390Smrg
114720d725fbSmrgAC_SUBST([am__tar])
114820d725fbSmrgAC_SUBST([am__untar])
114920d725fbSmrg]) # _AM_PROG_TAR
115020d725fbSmrg
1151