1a4e54154Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
2c9710b42Smrg
3a4e54154Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
42c393a42Smrg
52c393a42Smrg# This file is free software; the Free Software Foundation
62c393a42Smrg# gives unlimited permission to copy and/or distribute it,
72c393a42Smrg# with or without modifications, as long as this notice is preserved.
82c393a42Smrg
92c393a42Smrg# This program is distributed in the hope that it will be useful,
102c393a42Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
112c393a42Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
122c393a42Smrg# PARTICULAR PURPOSE.
132c393a42Smrg
146fc018e4Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15a6844aabSmrgm4_ifndef([AC_AUTOCONF_VERSION],
16a6844aabSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17a4e54154Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
18a4e54154Smrg[m4_warning([this file was generated for autoconf 2.71.
19a6844aabSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
20a6844aabSmrgIf you have problems, you may need to regenerate the build system entirely.
21c9710b42SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22a6844aabSmrg
23a4e54154Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc.
242c393a42Smrg#
252c393a42Smrg# This file is free software; the Free Software Foundation
262c393a42Smrg# gives unlimited permission to copy and/or distribute it,
272c393a42Smrg# with or without modifications, as long as this notice is preserved.
282c393a42Smrg
292c393a42Smrg# AM_AUTOMAKE_VERSION(VERSION)
302c393a42Smrg# ----------------------------
312c393a42Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
322c393a42Smrg# generated from the m4 files accompanying Automake X.Y.
33a6844aabSmrg# (This private macro should not be called outside this file.)
34a6844aabSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
35a32e9e42Smrg[am__api_version='1.16'
36a6844aabSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37a6844aabSmrgdnl require some minimum version.  Point them to the right macro.
38a4e54154Smrgm4_if([$1], [1.16.5], [],
39a6844aabSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40a6844aabSmrg])
41a6844aabSmrg
42a6844aabSmrg# _AM_AUTOCONF_VERSION(VERSION)
43a6844aabSmrg# -----------------------------
44a6844aabSmrg# aclocal traces this macro to find the Autoconf version.
45a6844aabSmrg# This is a private macro too.  Using m4_define simplifies
46a6844aabSmrg# the logic in aclocal, which can simply ignore this definition.
47a6844aabSmrgm4_define([_AM_AUTOCONF_VERSION], [])
482c393a42Smrg
492c393a42Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
502c393a42Smrg# -------------------------------
51a6844aabSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52a6844aabSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
532c393a42SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54a4e54154Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl
55a6844aabSmrgm4_ifndef([AC_AUTOCONF_VERSION],
56a6844aabSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57a6844aabSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
582c393a42Smrg
592c393a42Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
602c393a42Smrg
61a4e54154Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
622c393a42Smrg#
632c393a42Smrg# This file is free software; the Free Software Foundation
642c393a42Smrg# gives unlimited permission to copy and/or distribute it,
652c393a42Smrg# with or without modifications, as long as this notice is preserved.
662c393a42Smrg
672c393a42Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68c9710b42Smrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
69c9710b42Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
702c393a42Smrg#
712c393a42Smrg# Of course, Automake must honor this variable whenever it calls a
722c393a42Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
732c393a42Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
742c393a42Smrg# depending on how configure is run.  This is pretty annoying, since
752c393a42Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
762c393a42Smrg# source directory, any form will work fine, but in subdirectories a
772c393a42Smrg# relative path needs to be adjusted first.
782c393a42Smrg#
792c393a42Smrg# $ac_aux_dir/missing
802c393a42Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
812c393a42Smrg# $top_srcdir/$ac_aux_dir/missing
822c393a42Smrg#    fails if $ac_aux_dir is absolute,
832c393a42Smrg#    fails when called from a subdirectory in a VPATH build with
842c393a42Smrg#          a relative $ac_aux_dir
852c393a42Smrg#
862c393a42Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
872c393a42Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
88c9710b42Smrg# harmless because $srcdir is '.', but things will broke when you
892c393a42Smrg# start a VPATH build or use an absolute $srcdir.
902c393a42Smrg#
912c393a42Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
922c393a42Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
932c393a42Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
942c393a42Smrg# and then we would define $MISSING as
952c393a42Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
962c393a42Smrg# This will work as long as MISSING is not called from configure, because
972c393a42Smrg# unfortunately $(top_srcdir) has no meaning in configure.
982c393a42Smrg# However there are other variables, like CC, which are often used in
992c393a42Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
1002c393a42Smrg#
1012c393a42Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
1022c393a42Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
1032c393a42Smrg# configured tree to be moved without reconfiguration.
1042c393a42Smrg
1052c393a42SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
106953daebaSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
107953daebaSmrg# Expand $ac_aux_dir to an absolute path.
108953daebaSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
1092c393a42Smrg])
1102c393a42Smrg
1112c393a42Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
1122c393a42Smrg
113a4e54154Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
1142c393a42Smrg#
1152c393a42Smrg# This file is free software; the Free Software Foundation
1162c393a42Smrg# gives unlimited permission to copy and/or distribute it,
1172c393a42Smrg# with or without modifications, as long as this notice is preserved.
1182c393a42Smrg
1192c393a42Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1202c393a42Smrg# -------------------------------------
1212c393a42Smrg# Define a conditional.
1222c393a42SmrgAC_DEFUN([AM_CONDITIONAL],
123c9710b42Smrg[AC_PREREQ([2.52])dnl
124c9710b42Smrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
125c9710b42Smrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
126a6844aabSmrgAC_SUBST([$1_TRUE])dnl
127a6844aabSmrgAC_SUBST([$1_FALSE])dnl
128a6844aabSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
129a6844aabSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
130a6844aabSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1312c393a42Smrgif $2; then
1322c393a42Smrg  $1_TRUE=
1332c393a42Smrg  $1_FALSE='#'
1342c393a42Smrgelse
1352c393a42Smrg  $1_TRUE='#'
1362c393a42Smrg  $1_FALSE=
1372c393a42Smrgfi
1382c393a42SmrgAC_CONFIG_COMMANDS_PRE(
1392c393a42Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1402c393a42Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1412c393a42SmrgUsually this means the macro was only invoked conditionally.]])
1422c393a42Smrgfi])])
1432c393a42Smrg
144a4e54154Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1452c393a42Smrg#
1462c393a42Smrg# This file is free software; the Free Software Foundation
1472c393a42Smrg# gives unlimited permission to copy and/or distribute it,
1482c393a42Smrg# with or without modifications, as long as this notice is preserved.
1492c393a42Smrg
1502c393a42Smrg
151c9710b42Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1522c393a42Smrg# written in clear, in which case automake, when reading aclocal.m4,
1532c393a42Smrg# will think it sees a *use*, and therefore will trigger all it's
1542c393a42Smrg# C support machinery.  Also note that it means that autoscan, seeing
1552c393a42Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1562c393a42Smrg
1572c393a42Smrg
1582c393a42Smrg# _AM_DEPENDENCIES(NAME)
1592c393a42Smrg# ----------------------
1602c393a42Smrg# See how the compiler implements dependency checking.
161c9710b42Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1622c393a42Smrg# We try a few techniques and use that to set a single cache variable.
1632c393a42Smrg#
1642c393a42Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1652c393a42Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1662c393a42Smrg# dependency, and given that the user is not expected to run this macro,
1672c393a42Smrg# just rely on AC_PROG_CC.
1682c393a42SmrgAC_DEFUN([_AM_DEPENDENCIES],
1692c393a42Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1702c393a42SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1712c393a42SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1722c393a42SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1732c393a42Smrg
174c9710b42Smrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
175c9710b42Smrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
176c9710b42Smrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
177c9710b42Smrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
178c9710b42Smrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
179c9710b42Smrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
180c9710b42Smrg                    [depcc="$$1"   am_compiler_list=])
1812c393a42Smrg
1822c393a42SmrgAC_CACHE_CHECK([dependency style of $depcc],
1832c393a42Smrg               [am_cv_$1_dependencies_compiler_type],
1842c393a42Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1852c393a42Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
1862c393a42Smrg  # making bogus files that we don't know about and never remove.  For
1872c393a42Smrg  # instance it was reported that on HP-UX the gcc test will end up
188c9710b42Smrg  # making a dummy file named 'D' -- because '-MD' means "put the output
189c9710b42Smrg  # in D".
190ca08ab68Smrg  rm -rf conftest.dir
1912c393a42Smrg  mkdir conftest.dir
1922c393a42Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1932c393a42Smrg  # using a relative directory.
1942c393a42Smrg  cp "$am_depcomp" conftest.dir
1952c393a42Smrg  cd conftest.dir
1962c393a42Smrg  # We will build objects and dependencies in a subdirectory because
1972c393a42Smrg  # it helps to detect inapplicable dependency modes.  For instance
1982c393a42Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
1992c393a42Smrg  # side effect of compilation, but ICC will put the dependencies in
2002c393a42Smrg  # the current directory while Tru64 will put them in the object
2012c393a42Smrg  # directory.
2022c393a42Smrg  mkdir sub
2032c393a42Smrg
2042c393a42Smrg  am_cv_$1_dependencies_compiler_type=none
2052c393a42Smrg  if test "$am_compiler_list" = ""; then
2062c393a42Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2072c393a42Smrg  fi
208a6844aabSmrg  am__universal=false
209a6844aabSmrg  m4_case([$1], [CC],
210a6844aabSmrg    [case " $depcc " in #(
211a6844aabSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
212a6844aabSmrg     esac],
213a6844aabSmrg    [CXX],
214a6844aabSmrg    [case " $depcc " in #(
215a6844aabSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
216a6844aabSmrg     esac])
217a6844aabSmrg
2182c393a42Smrg  for depmode in $am_compiler_list; do
2192c393a42Smrg    # Setup a source with many dependencies, because some compilers
2202c393a42Smrg    # like to wrap large dependency lists on column 80 (with \), and
2212c393a42Smrg    # we should not choose a depcomp mode which is confused by this.
2222c393a42Smrg    #
2232c393a42Smrg    # We need to recreate these files for each test, as the compiler may
2242c393a42Smrg    # overwrite some of them when testing with obscure command lines.
2252c393a42Smrg    # This happens at least with the AIX C compiler.
2262c393a42Smrg    : > sub/conftest.c
2272c393a42Smrg    for i in 1 2 3 4 5 6; do
2282c393a42Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
229c9710b42Smrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
230c9710b42Smrg      # Solaris 10 /bin/sh.
231c9710b42Smrg      echo '/* dummy */' > sub/conftst$i.h
2322c393a42Smrg    done
2332c393a42Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2342c393a42Smrg
235c9710b42Smrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
236a6844aabSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
237c9710b42Smrg    # handle '-M -o', and we need to detect this.  Also, some Intel
238c9710b42Smrg    # versions had trouble with output in subdirs.
239a6844aabSmrg    am__obj=sub/conftest.${OBJEXT-o}
240a6844aabSmrg    am__minus_obj="-o $am__obj"
2412c393a42Smrg    case $depmode in
242a6844aabSmrg    gcc)
243a6844aabSmrg      # This depmode causes a compiler race in universal mode.
244a6844aabSmrg      test "$am__universal" = false || continue
245a6844aabSmrg      ;;
2462c393a42Smrg    nosideeffect)
247c9710b42Smrg      # After this tag, mechanisms are not by side-effect, so they'll
248c9710b42Smrg      # only be used when explicitly requested.
2492c393a42Smrg      if test "x$enable_dependency_tracking" = xyes; then
2502c393a42Smrg	continue
2512c393a42Smrg      else
2522c393a42Smrg	break
2532c393a42Smrg      fi
2542c393a42Smrg      ;;
255ca08ab68Smrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
256c9710b42Smrg      # This compiler won't grok '-c -o', but also, the minuso test has
257a6844aabSmrg      # not run yet.  These depmodes are late enough in the game, and
258a6844aabSmrg      # so weak that their functioning should not be impacted.
259a6844aabSmrg      am__obj=conftest.${OBJEXT-o}
260a6844aabSmrg      am__minus_obj=
261a6844aabSmrg      ;;
2622c393a42Smrg    none) break ;;
2632c393a42Smrg    esac
2642c393a42Smrg    if depmode=$depmode \
265a6844aabSmrg       source=sub/conftest.c object=$am__obj \
2662c393a42Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
267a6844aabSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2682c393a42Smrg         >/dev/null 2>conftest.err &&
269a6844aabSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2702c393a42Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
271a6844aabSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2722c393a42Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2732c393a42Smrg      # icc doesn't choke on unknown options, it will just issue warnings
2742c393a42Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
2752c393a42Smrg      # that says an option was ignored or not supported.
2762c393a42Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
2772c393a42Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
2782c393a42Smrg      # The diagnosis changed in icc 8.0:
2792c393a42Smrg      #   icc: Command line remark: option '-MP' not supported
2802c393a42Smrg      if (grep 'ignoring option' conftest.err ||
2812c393a42Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2822c393a42Smrg        am_cv_$1_dependencies_compiler_type=$depmode
2832c393a42Smrg        break
2842c393a42Smrg      fi
2852c393a42Smrg    fi
2862c393a42Smrg  done
2872c393a42Smrg
2882c393a42Smrg  cd ..
2892c393a42Smrg  rm -rf conftest.dir
2902c393a42Smrgelse
2912c393a42Smrg  am_cv_$1_dependencies_compiler_type=none
2922c393a42Smrgfi
2932c393a42Smrg])
2942c393a42SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2952c393a42SmrgAM_CONDITIONAL([am__fastdep$1], [
2962c393a42Smrg  test "x$enable_dependency_tracking" != xno \
2972c393a42Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2982c393a42Smrg])
2992c393a42Smrg
3002c393a42Smrg
3012c393a42Smrg# AM_SET_DEPDIR
3022c393a42Smrg# -------------
3032c393a42Smrg# Choose a directory name for dependency files.
304c9710b42Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3052c393a42SmrgAC_DEFUN([AM_SET_DEPDIR],
3062c393a42Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3072c393a42SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3082c393a42Smrg])
3092c393a42Smrg
3102c393a42Smrg
3112c393a42Smrg# AM_DEP_TRACK
3122c393a42Smrg# ------------
3132c393a42SmrgAC_DEFUN([AM_DEP_TRACK],
314c9710b42Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl
315c9710b42SmrgAS_HELP_STRING(
316c9710b42Smrg  [--enable-dependency-tracking],
317c9710b42Smrg  [do not reject slow dependency extractors])
318c9710b42SmrgAS_HELP_STRING(
319c9710b42Smrg  [--disable-dependency-tracking],
320c9710b42Smrg  [speeds up one-time build])])
3212c393a42Smrgif test "x$enable_dependency_tracking" != xno; then
3222c393a42Smrg  am_depcomp="$ac_aux_dir/depcomp"
3232c393a42Smrg  AMDEPBACKSLASH='\'
324ca08ab68Smrg  am__nodep='_no'
3252c393a42Smrgfi
3262c393a42SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
327a6844aabSmrgAC_SUBST([AMDEPBACKSLASH])dnl
328a6844aabSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329ca08ab68SmrgAC_SUBST([am__nodep])dnl
330ca08ab68Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl
3312c393a42Smrg])
3322c393a42Smrg
3332c393a42Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
3342c393a42Smrg
335a4e54154Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
3362c393a42Smrg#
3372c393a42Smrg# This file is free software; the Free Software Foundation
3382c393a42Smrg# gives unlimited permission to copy and/or distribute it,
3392c393a42Smrg# with or without modifications, as long as this notice is preserved.
3402c393a42Smrg
3412c393a42Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3422c393a42Smrg# ------------------------------
3432c393a42SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344a6844aabSmrg[{
3456fc018e4Smrg  # Older Autoconf quotes --file arguments for eval, but not when files
346a6844aabSmrg  # are listed without --file.  Let's play safe and only enable the eval
347a6844aabSmrg  # if we detect the quoting.
348a32e9e42Smrg  # TODO: see whether this extra hack can be removed once we start
349a32e9e42Smrg  # requiring Autoconf 2.70 or later.
350a32e9e42Smrg  AS_CASE([$CONFIG_FILES],
351a32e9e42Smrg          [*\'*], [eval set x "$CONFIG_FILES"],
352a32e9e42Smrg          [*], [set x $CONFIG_FILES])
353a6844aabSmrg  shift
354a32e9e42Smrg  # Used to flag and report bootstrapping failures.
355a32e9e42Smrg  am_rc=0
356a32e9e42Smrg  for am_mf
357a6844aabSmrg  do
358a6844aabSmrg    # Strip MF so we end up with the name of the file.
359a32e9e42Smrg    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
360a32e9e42Smrg    # Check whether this is an Automake generated Makefile which includes
361a32e9e42Smrg    # dependency-tracking related rules and includes.
362a32e9e42Smrg    # Grep'ing the whole file directly is not great: AIX grep has a line
363a6844aabSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
364a32e9e42Smrg    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
365a32e9e42Smrg      || continue
366a32e9e42Smrg    am_dirpart=`AS_DIRNAME(["$am_mf"])`
367a32e9e42Smrg    am_filepart=`AS_BASENAME(["$am_mf"])`
368a32e9e42Smrg    AM_RUN_LOG([cd "$am_dirpart" \
369a32e9e42Smrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
370a32e9e42Smrg        | $MAKE -f - am--depfiles]) || am_rc=$?
3712c393a42Smrg  done
372a32e9e42Smrg  if test $am_rc -ne 0; then
373a32e9e42Smrg    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
374a4e54154Smrg    for automatic dependency tracking.  If GNU make was not used, consider
375a4e54154Smrg    re-running the configure script with MAKE="gmake" (or whatever is
376a4e54154Smrg    necessary).  You can also try re-running configure with the
377a32e9e42Smrg    '--disable-dependency-tracking' option to at least be able to build
378a32e9e42Smrg    the package (albeit without support for automatic dependency tracking).])
379a32e9e42Smrg  fi
380a32e9e42Smrg  AS_UNSET([am_dirpart])
381a32e9e42Smrg  AS_UNSET([am_filepart])
382a32e9e42Smrg  AS_UNSET([am_mf])
383a32e9e42Smrg  AS_UNSET([am_rc])
384a32e9e42Smrg  rm -f conftest-deps.mk
385a6844aabSmrg}
3862c393a42Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3872c393a42Smrg
3882c393a42Smrg
3892c393a42Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
3902c393a42Smrg# -----------------------------
3912c393a42Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
3922c393a42Smrg#
393a32e9e42Smrg# This code is only required when automatic dependency tracking is enabled.
394a32e9e42Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
395a32e9e42Smrg# order to bootstrap the dependency handling code.
3962c393a42SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3972c393a42Smrg[AC_CONFIG_COMMANDS([depfiles],
3982c393a42Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
399a32e9e42Smrg     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
4002c393a42Smrg
4012c393a42Smrg# Do all the work for Automake.                             -*- Autoconf -*-
4022c393a42Smrg
403a4e54154Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4042c393a42Smrg#
4052c393a42Smrg# This file is free software; the Free Software Foundation
4062c393a42Smrg# gives unlimited permission to copy and/or distribute it,
4072c393a42Smrg# with or without modifications, as long as this notice is preserved.
4082c393a42Smrg
4092c393a42Smrg# This macro actually does too much.  Some checks are only needed if
4102c393a42Smrg# your package does certain things.  But this isn't really a big deal.
4112c393a42Smrg
412953daebaSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
413953daebaSmrgm4_define([AC_PROG_CC],
414953daebaSmrgm4_defn([AC_PROG_CC])
415953daebaSmrg[_AM_PROG_CC_C_O
416953daebaSmrg])
417953daebaSmrg
4182c393a42Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4192c393a42Smrg# AM_INIT_AUTOMAKE([OPTIONS])
4202c393a42Smrg# -----------------------------------------------
4212c393a42Smrg# The call with PACKAGE and VERSION arguments is the old style
4222c393a42Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4232c393a42Smrg# and VERSION should now be passed to AC_INIT and removed from
4242c393a42Smrg# the call to AM_INIT_AUTOMAKE.
4252c393a42Smrg# We support both call styles for the transition.  After
4262c393a42Smrg# the next Automake release, Autoconf can make the AC_INIT
4272c393a42Smrg# arguments mandatory, and then we can depend on a new Autoconf
4282c393a42Smrg# release and drop the old call support.
4292c393a42SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4306fc018e4Smrg[AC_PREREQ([2.65])dnl
431a4e54154Smrgm4_ifdef([_$0_ALREADY_INIT],
432a4e54154Smrg  [m4_fatal([$0 expanded multiple times
433a4e54154Smrg]m4_defn([_$0_ALREADY_INIT]))],
434a4e54154Smrg  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
4352c393a42Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4362c393a42Smrgdnl the ones we care about.
4372c393a42Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4382c393a42SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4392c393a42SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
440a6844aabSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
441a6844aabSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
442a6844aabSmrg  # is not polluted with repeated "-I."
443a6844aabSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
444a6844aabSmrg  # test to see if srcdir already configured
445a6844aabSmrg  if test -f $srcdir/config.status; then
446a6844aabSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
447a6844aabSmrg  fi
4482c393a42Smrgfi
4492c393a42Smrg
4502c393a42Smrg# test whether we have cygpath
4512c393a42Smrgif test -z "$CYGPATH_W"; then
4522c393a42Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4532c393a42Smrg    CYGPATH_W='cygpath -w'
4542c393a42Smrg  else
4552c393a42Smrg    CYGPATH_W=echo
4562c393a42Smrg  fi
4572c393a42Smrgfi
4582c393a42SmrgAC_SUBST([CYGPATH_W])
4592c393a42Smrg
4602c393a42Smrg# Define the identity of the package.
4612c393a42Smrgdnl Distinguish between old-style and new-style calls.
4622c393a42Smrgm4_ifval([$2],
463c9710b42Smrg[AC_DIAGNOSE([obsolete],
4646fc018e4Smrg             [$0: two- and three-arguments forms are deprecated.])
465c9710b42Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4662c393a42Smrg AC_SUBST([PACKAGE], [$1])dnl
4672c393a42Smrg AC_SUBST([VERSION], [$2])],
4682c393a42Smrg[_AM_SET_OPTIONS([$1])dnl
469a6844aabSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
470c9710b42Smrgm4_if(
471a4e54154Smrg  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
472c9710b42Smrg  [ok:ok],,
473a6844aabSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4742c393a42Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4752c393a42Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4762c393a42Smrg
4772c393a42Smrg_AM_IF_OPTION([no-define],,
478c9710b42Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
479c9710b42Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
4802c393a42Smrg
4812c393a42Smrg# Some tools Automake needs.
4822c393a42SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
4832c393a42SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
484c9710b42SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
485c9710b42SmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
486c9710b42SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
487c9710b42SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
488c9710b42SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
489a6844aabSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
490a6844aabSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
491c9710b42SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
492c9710b42Smrg# For better backward compatibility.  To be removed once Automake 1.9.x
493c9710b42Smrg# dies out for good.  For more background, see:
494a32e9e42Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
495a32e9e42Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
496c9710b42SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
497953daebaSmrg# We need awk for the "check" target (and possibly the TAP driver).  The
498953daebaSmrg# system "awk" is bad on some platforms.
4992c393a42SmrgAC_REQUIRE([AC_PROG_AWK])dnl
5002c393a42SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5012c393a42SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5022c393a42Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
503a6844aabSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
504a6844aabSmrg			     [_AM_PROG_TAR([v7])])])
5052c393a42Smrg_AM_IF_OPTION([no-dependencies],,
5062c393a42Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
507c9710b42Smrg		  [_AM_DEPENDENCIES([CC])],
508c9710b42Smrg		  [m4_define([AC_PROG_CC],
509c9710b42Smrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
5102c393a42SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
511c9710b42Smrg		  [_AM_DEPENDENCIES([CXX])],
512c9710b42Smrg		  [m4_define([AC_PROG_CXX],
513c9710b42Smrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
514a6844aabSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
515c9710b42Smrg		  [_AM_DEPENDENCIES([OBJC])],
516c9710b42Smrg		  [m4_define([AC_PROG_OBJC],
517c9710b42Smrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
5186fc018e4SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
519c9710b42Smrg		  [_AM_DEPENDENCIES([OBJCXX])],
520c9710b42Smrg		  [m4_define([AC_PROG_OBJCXX],
5216fc018e4Smrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
5222c393a42Smrg])
523a4e54154Smrg# Variables for tags utilities; see am/tags.am
524a4e54154Smrgif test -z "$CTAGS"; then
525a4e54154Smrg  CTAGS=ctags
526a4e54154Smrgfi
527a4e54154SmrgAC_SUBST([CTAGS])
528a4e54154Smrgif test -z "$ETAGS"; then
529a4e54154Smrg  ETAGS=etags
530a4e54154Smrgfi
531a4e54154SmrgAC_SUBST([ETAGS])
532a4e54154Smrgif test -z "$CSCOPE"; then
533a4e54154Smrg  CSCOPE=cscope
534a4e54154Smrgfi
535a4e54154SmrgAC_SUBST([CSCOPE])
536a4e54154Smrg
5376fc018e4SmrgAC_REQUIRE([AM_SILENT_RULES])dnl
5386fc018e4Smrgdnl The testsuite driver may need to know about EXEEXT, so add the
5396fc018e4Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
5406fc018e4Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
541a6844aabSmrgAC_CONFIG_COMMANDS_PRE(dnl
542a6844aabSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
543a6844aabSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
544953daebaSmrg
545953daebaSmrg# POSIX will say in a future version that running "rm -f" with no argument
546953daebaSmrg# is OK; and we want to be able to make that assumption in our Makefile
547953daebaSmrg# recipes.  So use an aggressive probe to check that the usage we want is
548953daebaSmrg# actually supported "in the wild" to an acceptable degree.
549953daebaSmrg# See automake bug#10828.
550953daebaSmrg# To make any issue more visible, cause the running configure to be aborted
551953daebaSmrg# by default if the 'rm' program in use doesn't match our expectations; the
552953daebaSmrg# user can still override this though.
553953daebaSmrgif rm -f && rm -fr && rm -rf; then : OK; else
554953daebaSmrg  cat >&2 <<'END'
555953daebaSmrgOops!
556953daebaSmrg
557953daebaSmrgYour 'rm' program seems unable to run without file operands specified
558953daebaSmrgon the command line, even when the '-f' option is present.  This is contrary
559953daebaSmrgto the behaviour of most rm programs out there, and not conforming with
560953daebaSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
561953daebaSmrg
562953daebaSmrgPlease tell bug-automake@gnu.org about your system, including the value
563953daebaSmrgof your $PATH and any error possibly output before this message.  This
564953daebaSmrgcan help us improve future automake versions.
565953daebaSmrg
566953daebaSmrgEND
567953daebaSmrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
568953daebaSmrg    echo 'Configuration will proceed anyway, since you have set the' >&2
569953daebaSmrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
570953daebaSmrg    echo >&2
571953daebaSmrg  else
572953daebaSmrg    cat >&2 <<'END'
573953daebaSmrgAborting the configuration process, to ensure you take notice of the issue.
574953daebaSmrg
575953daebaSmrgYou can download and install GNU coreutils to get an 'rm' implementation
576a32e9e42Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>.
577953daebaSmrg
578953daebaSmrgIf you want to complete the configuration process using your problematic
579953daebaSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
580953daebaSmrgto "yes", and re-run configure.
581953daebaSmrg
582953daebaSmrgEND
583953daebaSmrg    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
584953daebaSmrg  fi
585953daebaSmrgfi
586953daebaSmrgdnl The trailing newline in this macro's definition is deliberate, for
587953daebaSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments
588953daebaSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
5892c393a42Smrg])
5902c393a42Smrg
591c9710b42Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
592a6844aabSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
593a6844aabSmrgdnl mangled by Autoconf and run in a shell conditional statement.
594a6844aabSmrgm4_define([_AC_COMPILER_EXEEXT],
595a6844aabSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
596a6844aabSmrg
5972c393a42Smrg# When config.status generates a header, we must update the stamp-h file.
5982c393a42Smrg# This file resides in the same directory as the config header
5992c393a42Smrg# that is generated.  The stamp files are numbered to have different names.
6002c393a42Smrg
6012c393a42Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6022c393a42Smrg# loop where config.status creates the headers, so we can generate
6032c393a42Smrg# our stamp files there.
6042c393a42SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6052c393a42Smrg[# Compute $1's index in $config_headers.
606a6844aabSmrg_am_arg=$1
6072c393a42Smrg_am_stamp_count=1
6082c393a42Smrgfor _am_header in $config_headers :; do
6092c393a42Smrg  case $_am_header in
610a6844aabSmrg    $_am_arg | $_am_arg:* )
6112c393a42Smrg      break ;;
6122c393a42Smrg    * )
6132c393a42Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6142c393a42Smrg  esac
6152c393a42Smrgdone
616a6844aabSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
6172c393a42Smrg
618a4e54154Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6192c393a42Smrg#
6202c393a42Smrg# This file is free software; the Free Software Foundation
6212c393a42Smrg# gives unlimited permission to copy and/or distribute it,
6222c393a42Smrg# with or without modifications, as long as this notice is preserved.
6232c393a42Smrg
6242c393a42Smrg# AM_PROG_INSTALL_SH
6252c393a42Smrg# ------------------
6262c393a42Smrg# Define $install_sh.
6272c393a42SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
6282c393a42Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
629953daebaSmrgif test x"${install_sh+set}" != xset; then
630a6844aabSmrg  case $am_aux_dir in
631a6844aabSmrg  *\ * | *\	*)
632a6844aabSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
633a6844aabSmrg  *)
634a6844aabSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
635a6844aabSmrg  esac
636a6844aabSmrgfi
637c9710b42SmrgAC_SUBST([install_sh])])
6382c393a42Smrg
639a4e54154Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc.
6402c393a42Smrg#
6412c393a42Smrg# This file is free software; the Free Software Foundation
6422c393a42Smrg# gives unlimited permission to copy and/or distribute it,
6432c393a42Smrg# with or without modifications, as long as this notice is preserved.
6442c393a42Smrg
6452c393a42Smrg# Check whether the underlying file-system supports filenames
6462c393a42Smrg# with a leading dot.  For instance MS-DOS doesn't.
6472c393a42SmrgAC_DEFUN([AM_SET_LEADING_DOT],
6482c393a42Smrg[rm -rf .tst 2>/dev/null
6492c393a42Smrgmkdir .tst 2>/dev/null
6502c393a42Smrgif test -d .tst; then
6512c393a42Smrg  am__leading_dot=.
6522c393a42Smrgelse
6532c393a42Smrg  am__leading_dot=_
6542c393a42Smrgfi
6552c393a42Smrgrmdir .tst 2>/dev/null
6562c393a42SmrgAC_SUBST([am__leading_dot])])
6572c393a42Smrg
6582c393a42Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6592c393a42Smrg
660a4e54154Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6612c393a42Smrg#
6622c393a42Smrg# This file is free software; the Free Software Foundation
6632c393a42Smrg# gives unlimited permission to copy and/or distribute it,
6642c393a42Smrg# with or without modifications, as long as this notice is preserved.
6652c393a42Smrg
6662c393a42Smrg# AM_MAKE_INCLUDE()
6672c393a42Smrg# -----------------
668a32e9e42Smrg# Check whether make has an 'include' directive that can support all
669a32e9e42Smrg# the idioms we need for our automatic dependency tracking code.
6702c393a42SmrgAC_DEFUN([AM_MAKE_INCLUDE],
671a32e9e42Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
672a32e9e42Smrgcat > confinc.mk << 'END'
6732c393a42Smrgam__doit:
674a32e9e42Smrg	@echo this is the am__doit target >confinc.out
6752c393a42Smrg.PHONY: am__doit
6762c393a42SmrgEND
6772c393a42Smrgam__include="#"
6782c393a42Smrgam__quote=
679a32e9e42Smrg# BSD make does it like this.
680a32e9e42Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD
681a32e9e42Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this.
682a32e9e42Smrgecho 'include confinc.mk # ignored' > confmf.GNU
683a32e9e42Smrg_am_result=no
684a32e9e42Smrgfor s in GNU BSD; do
685a32e9e42Smrg  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
686a32e9e42Smrg  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
687a32e9e42Smrg      ['0:this is the am__doit target'],
688a32e9e42Smrg      [AS_CASE([$s],
689a32e9e42Smrg          [BSD], [am__include='.include' am__quote='"'],
690a32e9e42Smrg          [am__include='include' am__quote=''])])
691a32e9e42Smrg  if test "$am__include" != "#"; then
692a32e9e42Smrg    _am_result="yes ($s style)"
693a32e9e42Smrg    break
694a32e9e42Smrg  fi
695a32e9e42Smrgdone
696a32e9e42Smrgrm -f confinc.* confmf.*
697a32e9e42SmrgAC_MSG_RESULT([${_am_result}])
698a32e9e42SmrgAC_SUBST([am__include])])
699a32e9e42SmrgAC_SUBST([am__quote])])
7002c393a42Smrg
7012c393a42Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7022c393a42Smrg
703a4e54154Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
7042c393a42Smrg#
7052c393a42Smrg# This file is free software; the Free Software Foundation
7062c393a42Smrg# gives unlimited permission to copy and/or distribute it,
7072c393a42Smrg# with or without modifications, as long as this notice is preserved.
7082c393a42Smrg
7092c393a42Smrg# AM_MISSING_PROG(NAME, PROGRAM)
7102c393a42Smrg# ------------------------------
7112c393a42SmrgAC_DEFUN([AM_MISSING_PROG],
7122c393a42Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7132c393a42Smrg$1=${$1-"${am_missing_run}$2"}
7142c393a42SmrgAC_SUBST($1)])
7152c393a42Smrg
7162c393a42Smrg# AM_MISSING_HAS_RUN
7172c393a42Smrg# ------------------
7186fc018e4Smrg# Define MISSING if not defined so far and test if it is modern enough.
7196fc018e4Smrg# If it is, set am_missing_run to use it, otherwise, to nothing.
7202c393a42SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7212c393a42Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
722a6844aabSmrgAC_REQUIRE_AUX_FILE([missing])dnl
723a6844aabSmrgif test x"${MISSING+set}" != xset; then
724a4e54154Smrg  MISSING="\${SHELL} '$am_aux_dir/missing'"
725a6844aabSmrgfi
7262c393a42Smrg# Use eval to expand $SHELL
7276fc018e4Smrgif eval "$MISSING --is-lightweight"; then
7286fc018e4Smrg  am_missing_run="$MISSING "
7292c393a42Smrgelse
7302c393a42Smrg  am_missing_run=
731c9710b42Smrg  AC_MSG_WARN(['missing' script is too old or missing])
7322c393a42Smrgfi
7332c393a42Smrg])
7342c393a42Smrg
7352c393a42Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7362c393a42Smrg
737a4e54154Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
7382c393a42Smrg#
7392c393a42Smrg# This file is free software; the Free Software Foundation
7402c393a42Smrg# gives unlimited permission to copy and/or distribute it,
7412c393a42Smrg# with or without modifications, as long as this notice is preserved.
7422c393a42Smrg
7432c393a42Smrg# _AM_MANGLE_OPTION(NAME)
7442c393a42Smrg# -----------------------
7452c393a42SmrgAC_DEFUN([_AM_MANGLE_OPTION],
7462c393a42Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7472c393a42Smrg
7482c393a42Smrg# _AM_SET_OPTION(NAME)
749ca08ab68Smrg# --------------------
7502c393a42Smrg# Set option NAME.  Presently that only means defining a flag for this option.
7512c393a42SmrgAC_DEFUN([_AM_SET_OPTION],
752c9710b42Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
7532c393a42Smrg
7542c393a42Smrg# _AM_SET_OPTIONS(OPTIONS)
755ca08ab68Smrg# ------------------------
7562c393a42Smrg# OPTIONS is a space-separated list of Automake options.
7572c393a42SmrgAC_DEFUN([_AM_SET_OPTIONS],
758a6844aabSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7592c393a42Smrg
7602c393a42Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7612c393a42Smrg# -------------------------------------------
7622c393a42Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7632c393a42SmrgAC_DEFUN([_AM_IF_OPTION],
7642c393a42Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7652c393a42Smrg
766a4e54154Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
767953daebaSmrg#
768953daebaSmrg# This file is free software; the Free Software Foundation
769953daebaSmrg# gives unlimited permission to copy and/or distribute it,
770953daebaSmrg# with or without modifications, as long as this notice is preserved.
771953daebaSmrg
772953daebaSmrg# _AM_PROG_CC_C_O
773953daebaSmrg# ---------------
774953daebaSmrg# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
775953daebaSmrg# to automatically call this.
776953daebaSmrgAC_DEFUN([_AM_PROG_CC_C_O],
777953daebaSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
778953daebaSmrgAC_REQUIRE_AUX_FILE([compile])dnl
779953daebaSmrgAC_LANG_PUSH([C])dnl
780953daebaSmrgAC_CACHE_CHECK(
781953daebaSmrg  [whether $CC understands -c and -o together],
782953daebaSmrg  [am_cv_prog_cc_c_o],
783953daebaSmrg  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
784953daebaSmrg  # Make sure it works both with $CC and with simple cc.
785953daebaSmrg  # Following AC_PROG_CC_C_O, we do the test twice because some
786953daebaSmrg  # compilers refuse to overwrite an existing .o file with -o,
787953daebaSmrg  # though they will create one.
788953daebaSmrg  am_cv_prog_cc_c_o=yes
789953daebaSmrg  for am_i in 1 2; do
790953daebaSmrg    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
791953daebaSmrg         && test -f conftest2.$ac_objext; then
792953daebaSmrg      : OK
793953daebaSmrg    else
794953daebaSmrg      am_cv_prog_cc_c_o=no
795953daebaSmrg      break
796953daebaSmrg    fi
797953daebaSmrg  done
798953daebaSmrg  rm -f core conftest*
799953daebaSmrg  unset am_i])
800953daebaSmrgif test "$am_cv_prog_cc_c_o" != yes; then
801953daebaSmrg   # Losing compiler, so override with the script.
802953daebaSmrg   # FIXME: It is wrong to rewrite CC.
803953daebaSmrg   # But if we don't then we get into trouble of one sort or another.
804953daebaSmrg   # A longer-term fix would be to have automake use am__CC in this case,
805953daebaSmrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
806953daebaSmrg   CC="$am_aux_dir/compile $CC"
807953daebaSmrgfi
808953daebaSmrgAC_LANG_POP([C])])
809953daebaSmrg
810953daebaSmrg# For backward compatibility.
811953daebaSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
812953daebaSmrg
813a4e54154Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
814a4e54154Smrg#
815a4e54154Smrg# This file is free software; the Free Software Foundation
816a4e54154Smrg# gives unlimited permission to copy and/or distribute it,
817a4e54154Smrg# with or without modifications, as long as this notice is preserved.
818a4e54154Smrg
819a4e54154Smrg
820a4e54154Smrg# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
821a4e54154Smrg# ---------------------------------------------------------------------------
822a4e54154Smrg# Adds support for distributing Python modules and packages.  To
823a4e54154Smrg# install modules, copy them to $(pythondir), using the python_PYTHON
824a4e54154Smrg# automake variable.  To install a package with the same name as the
825a4e54154Smrg# automake package, install to $(pkgpythondir), or use the
826a4e54154Smrg# pkgpython_PYTHON automake variable.
827a4e54154Smrg#
828a4e54154Smrg# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
829a4e54154Smrg# locations to install python extension modules (shared libraries).
830a4e54154Smrg# Another macro is required to find the appropriate flags to compile
831a4e54154Smrg# extension modules.
832a4e54154Smrg#
833a4e54154Smrg# If your package is configured with a different prefix to python,
834a4e54154Smrg# users will have to add the install directory to the PYTHONPATH
835a4e54154Smrg# environment variable, or create a .pth file (see the python
836a4e54154Smrg# documentation for details).
837a4e54154Smrg#
838a4e54154Smrg# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
839a4e54154Smrg# cause an error if the version of python installed on the system
840a4e54154Smrg# doesn't meet the requirement.  MINIMUM-VERSION should consist of
841a4e54154Smrg# numbers and dots only.
842a4e54154SmrgAC_DEFUN([AM_PATH_PYTHON],
843a4e54154Smrg [
844a4e54154Smrg  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
845a4e54154Smrg  dnl supported. (2.0 was released on October 16, 2000).
846a4e54154Smrg  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
847a4e54154Smrg[python python2 python3 dnl
848a4e54154Smrg python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
849a4e54154Smrg python3.2 python3.1 python3.0 dnl
850a4e54154Smrg python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
851a4e54154Smrg python2.0])
852a4e54154Smrg
853a4e54154Smrg  AC_ARG_VAR([PYTHON], [the Python interpreter])
854a4e54154Smrg
855a4e54154Smrg  m4_if([$1],[],[
856a4e54154Smrg    dnl No version check is needed.
857a4e54154Smrg    # Find any Python interpreter.
858a4e54154Smrg    if test -z "$PYTHON"; then
859a4e54154Smrg      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
860a4e54154Smrg    fi
861a4e54154Smrg    am_display_PYTHON=python
862a4e54154Smrg  ], [
863a4e54154Smrg    dnl A version check is needed.
864a4e54154Smrg    if test -n "$PYTHON"; then
865a4e54154Smrg      # If the user set $PYTHON, use it and don't search something else.
866a4e54154Smrg      AC_MSG_CHECKING([whether $PYTHON version is >= $1])
867a4e54154Smrg      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
868a4e54154Smrg			      [AC_MSG_RESULT([yes])],
869a4e54154Smrg			      [AC_MSG_RESULT([no])
870a4e54154Smrg			       AC_MSG_ERROR([Python interpreter is too old])])
871a4e54154Smrg      am_display_PYTHON=$PYTHON
872a4e54154Smrg    else
873a4e54154Smrg      # Otherwise, try each interpreter until we find one that satisfies
874a4e54154Smrg      # VERSION.
875a4e54154Smrg      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
876a4e54154Smrg	[am_cv_pathless_PYTHON],[
877a4e54154Smrg	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
878a4e54154Smrg	  test "$am_cv_pathless_PYTHON" = none && break
879a4e54154Smrg	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
880a4e54154Smrg	done])
881a4e54154Smrg      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
882a4e54154Smrg      if test "$am_cv_pathless_PYTHON" = none; then
883a4e54154Smrg	PYTHON=:
884a4e54154Smrg      else
885a4e54154Smrg        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
886a4e54154Smrg      fi
887a4e54154Smrg      am_display_PYTHON=$am_cv_pathless_PYTHON
888a4e54154Smrg    fi
889a4e54154Smrg  ])
890a4e54154Smrg
891a4e54154Smrg  if test "$PYTHON" = :; then
892a4e54154Smrg    dnl Run any user-specified action, or abort.
893a4e54154Smrg    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
894a4e54154Smrg  else
895a4e54154Smrg
896a4e54154Smrg  dnl Query Python for its version number.  Although site.py simply uses
897a4e54154Smrg  dnl sys.version[:3], printing that failed with Python 3.10, since the
898a4e54154Smrg  dnl trailing zero was eliminated. So now we output just the major
899a4e54154Smrg  dnl and minor version numbers, as numbers. Apparently the tertiary
900a4e54154Smrg  dnl version is not of interest.
901a4e54154Smrg  dnl
902a4e54154Smrg  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
903a4e54154Smrg    [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`])
904a4e54154Smrg  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
905a4e54154Smrg
906a4e54154Smrg  dnl At times, e.g., when building shared libraries, you may want
907a4e54154Smrg  dnl to know which OS platform Python thinks this is.
908a4e54154Smrg  dnl
909a4e54154Smrg  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
910a4e54154Smrg    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
911a4e54154Smrg  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
912a4e54154Smrg
913a4e54154Smrg  dnl emacs-page
914a4e54154Smrg  dnl If --with-python-sys-prefix is given, use the values of sys.prefix
915a4e54154Smrg  dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX
916a4e54154Smrg  dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and
917a4e54154Smrg  dnl ${exec_prefix} variables.
918a4e54154Smrg  dnl
919a4e54154Smrg  dnl The two are made distinct variables so they can be overridden if
920a4e54154Smrg  dnl need be, although general consensus is that you shouldn't need
921a4e54154Smrg  dnl this separation.
922a4e54154Smrg  dnl
923a4e54154Smrg  dnl Also allow directly setting the prefixes via configure options,
924a4e54154Smrg  dnl overriding any default.
925a4e54154Smrg  dnl
926a4e54154Smrg  if test "x$prefix" = xNONE; then
927a4e54154Smrg    am__usable_prefix=$ac_default_prefix
928a4e54154Smrg  else
929a4e54154Smrg    am__usable_prefix=$prefix
930a4e54154Smrg  fi
931a4e54154Smrg
932a4e54154Smrg  # Allow user to request using sys.* values from Python,
933a4e54154Smrg  # instead of the GNU $prefix values.
934a4e54154Smrg  AC_ARG_WITH([python-sys-prefix],
935a4e54154Smrg  [AS_HELP_STRING([--with-python-sys-prefix],
936a4e54154Smrg                  [use Python's sys.prefix and sys.exec_prefix values])],
937a4e54154Smrg  [am_use_python_sys=:],
938a4e54154Smrg  [am_use_python_sys=false])
939a4e54154Smrg
940a4e54154Smrg  # Allow user to override whatever the default Python prefix is.
941a4e54154Smrg  AC_ARG_WITH([python_prefix],
942a4e54154Smrg  [AS_HELP_STRING([--with-python_prefix],
943a4e54154Smrg                  [override the default PYTHON_PREFIX])],
944a4e54154Smrg  [am_python_prefix_subst=$withval
945a4e54154Smrg   am_cv_python_prefix=$withval
946a4e54154Smrg   AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix])
947a4e54154Smrg   AC_MSG_RESULT([$am_cv_python_prefix])],
948a4e54154Smrg  [
949a4e54154Smrg   if $am_use_python_sys; then
950a4e54154Smrg     # using python sys.prefix value, not GNU
951a4e54154Smrg     AC_CACHE_CHECK([for python default $am_display_PYTHON prefix],
952a4e54154Smrg     [am_cv_python_prefix],
953a4e54154Smrg     [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`])
954a4e54154Smrg
955a4e54154Smrg     dnl If sys.prefix is a subdir of $prefix, replace the literal value of
956a4e54154Smrg     dnl $prefix with a variable reference so it can be overridden.
957a4e54154Smrg     case $am_cv_python_prefix in
958a4e54154Smrg     $am__usable_prefix*)
959a4e54154Smrg       am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'`
960a4e54154Smrg       am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"`
961a4e54154Smrg       ;;
962a4e54154Smrg     *)
963a4e54154Smrg       am_python_prefix_subst=$am_cv_python_prefix
964a4e54154Smrg       ;;
965a4e54154Smrg     esac
966a4e54154Smrg   else # using GNU prefix value, not python sys.prefix
967a4e54154Smrg     am_python_prefix_subst='${prefix}'
968a4e54154Smrg     am_python_prefix=$am_python_prefix_subst
969a4e54154Smrg     AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix])
970a4e54154Smrg     AC_MSG_RESULT([$am_python_prefix])
971a4e54154Smrg   fi])
972a4e54154Smrg  # Substituting python_prefix_subst value.
973a4e54154Smrg  AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst])
974a4e54154Smrg
975a4e54154Smrg  # emacs-page Now do it all over again for Python exec_prefix, but with yet
976a4e54154Smrg  # another conditional: fall back to regular prefix if that was specified.
977a4e54154Smrg  AC_ARG_WITH([python_exec_prefix],
978a4e54154Smrg  [AS_HELP_STRING([--with-python_exec_prefix],
979a4e54154Smrg                  [override the default PYTHON_EXEC_PREFIX])],
980a4e54154Smrg  [am_python_exec_prefix_subst=$withval
981a4e54154Smrg   am_cv_python_exec_prefix=$withval
982a4e54154Smrg   AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix])
983a4e54154Smrg   AC_MSG_RESULT([$am_cv_python_exec_prefix])],
984a4e54154Smrg  [
985a4e54154Smrg   # no explicit --with-python_exec_prefix, but if
986a4e54154Smrg   # --with-python_prefix was given, use its value for python_exec_prefix too.
987a4e54154Smrg   AS_IF([test -n "$with_python_prefix"],
988a4e54154Smrg   [am_python_exec_prefix_subst=$with_python_prefix
989a4e54154Smrg    am_cv_python_exec_prefix=$with_python_prefix
990a4e54154Smrg    AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix])
991a4e54154Smrg    AC_MSG_RESULT([$am_cv_python_exec_prefix])],
992a4e54154Smrg   [
993a4e54154Smrg    # Set am__usable_exec_prefix whether using GNU or Python values,
994a4e54154Smrg    # since we use that variable for pyexecdir.
995a4e54154Smrg    if test "x$exec_prefix" = xNONE; then
996a4e54154Smrg      am__usable_exec_prefix=$am__usable_prefix
997a4e54154Smrg    else
998a4e54154Smrg      am__usable_exec_prefix=$exec_prefix
999a4e54154Smrg    fi
1000a4e54154Smrg    #
1001a4e54154Smrg    if $am_use_python_sys; then # using python sys.exec_prefix, not GNU
1002a4e54154Smrg      AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix],
1003a4e54154Smrg      [am_cv_python_exec_prefix],
1004a4e54154Smrg      [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`])
1005a4e54154Smrg      dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the
1006a4e54154Smrg      dnl literal value of $exec_prefix with a variable reference so it can
1007a4e54154Smrg      dnl be overridden.
1008a4e54154Smrg      case $am_cv_python_exec_prefix in
1009a4e54154Smrg      $am__usable_exec_prefix*)
1010a4e54154Smrg        am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'`
1011a4e54154Smrg        am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"`
1012a4e54154Smrg        ;;
1013a4e54154Smrg      *)
1014a4e54154Smrg        am_python_exec_prefix_subst=$am_cv_python_exec_prefix
1015a4e54154Smrg        ;;
1016a4e54154Smrg     esac
1017a4e54154Smrg   else # using GNU $exec_prefix, not python sys.exec_prefix
1018a4e54154Smrg     am_python_exec_prefix_subst='${exec_prefix}'
1019a4e54154Smrg     am_python_exec_prefix=$am_python_exec_prefix_subst
1020a4e54154Smrg     AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix])
1021a4e54154Smrg     AC_MSG_RESULT([$am_python_exec_prefix])
1022a4e54154Smrg   fi])])
1023a4e54154Smrg  # Substituting python_exec_prefix_subst.
1024a4e54154Smrg  AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst])
1025a4e54154Smrg
1026a4e54154Smrg  # Factor out some code duplication into this shell variable.
1027a4e54154Smrg  am_python_setup_sysconfig="\
1028a4e54154Smrgimport sys
1029a4e54154Smrg# Prefer sysconfig over distutils.sysconfig, for better compatibility
1030a4e54154Smrg# with python 3.x.  See automake bug#10227.
1031a4e54154Smrgtry:
1032a4e54154Smrg    import sysconfig
1033a4e54154Smrgexcept ImportError:
1034a4e54154Smrg    can_use_sysconfig = 0
1035a4e54154Smrgelse:
1036a4e54154Smrg    can_use_sysconfig = 1
1037a4e54154Smrg# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
1038a4e54154Smrg# <https://github.com/pypa/virtualenv/issues/118>
1039a4e54154Smrgtry:
1040a4e54154Smrg    from platform import python_implementation
1041a4e54154Smrg    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
1042a4e54154Smrg        can_use_sysconfig = 0
1043a4e54154Smrgexcept ImportError:
1044a4e54154Smrg    pass"
1045a4e54154Smrg
1046a4e54154Smrg  dnl emacs-page Set up 4 directories:
1047a4e54154Smrg
1048a4e54154Smrg  dnl 1. pythondir: where to install python scripts.  This is the
1049a4e54154Smrg  dnl    site-packages directory, not the python standard library
1050a4e54154Smrg  dnl    directory like in previous automake betas.  This behavior
1051a4e54154Smrg  dnl    is more consistent with lispdir.m4 for example.
1052a4e54154Smrg  dnl Query distutils for this directory.
1053a4e54154Smrg  dnl
1054a4e54154Smrg  AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)],
1055a4e54154Smrg  [am_cv_python_pythondir],
1056a4e54154Smrg  [if test "x$am_cv_python_prefix" = x; then
1057a4e54154Smrg     am_py_prefix=$am__usable_prefix
1058a4e54154Smrg   else
1059a4e54154Smrg     am_py_prefix=$am_cv_python_prefix
1060a4e54154Smrg   fi
1061a4e54154Smrg   am_cv_python_pythondir=`$PYTHON -c "
1062a4e54154Smrg$am_python_setup_sysconfig
1063a4e54154Smrgif can_use_sysconfig:
1064a4e54154Smrg  sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
1065a4e54154Smrgelse:
1066a4e54154Smrg  from distutils import sysconfig
1067a4e54154Smrg  sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
1068a4e54154Smrgsys.stdout.write(sitedir)"`
1069a4e54154Smrg   #
1070a4e54154Smrg   case $am_cv_python_pythondir in
1071a4e54154Smrg   $am_py_prefix*)
1072a4e54154Smrg     am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1073a4e54154Smrg     am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
1074a4e54154Smrg     ;;
1075a4e54154Smrg   *)
1076a4e54154Smrg     case $am_py_prefix in
1077a4e54154Smrg       /usr|/System*) ;;
1078a4e54154Smrg       *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
1079a4e54154Smrg          ;;
1080a4e54154Smrg     esac
1081a4e54154Smrg     ;;
1082a4e54154Smrg   esac
1083a4e54154Smrg  ])
1084a4e54154Smrg  AC_SUBST([pythondir], [$am_cv_python_pythondir])
1085a4e54154Smrg
1086a4e54154Smrg  dnl 2. pkgpythondir: $PACKAGE directory under pythondir.  Was
1087a4e54154Smrg  dnl    PYTHON_SITE_PACKAGE in previous betas, but this naming is
1088a4e54154Smrg  dnl    more consistent with the rest of automake.
1089a4e54154Smrg  dnl
1090a4e54154Smrg  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
1091a4e54154Smrg
1092a4e54154Smrg  dnl 3. pyexecdir: directory for installing python extension modules
1093a4e54154Smrg  dnl    (shared libraries).
1094a4e54154Smrg  dnl Query distutils for this directory.
1095a4e54154Smrg  dnl
1096a4e54154Smrg  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)],
1097a4e54154Smrg  [am_cv_python_pyexecdir],
1098a4e54154Smrg  [if test "x$am_cv_python_exec_prefix" = x; then
1099a4e54154Smrg     am_py_exec_prefix=$am__usable_exec_prefix
1100a4e54154Smrg   else
1101a4e54154Smrg     am_py_exec_prefix=$am_cv_python_exec_prefix
1102a4e54154Smrg   fi
1103a4e54154Smrg   am_cv_python_pyexecdir=`$PYTHON -c "
1104a4e54154Smrg$am_python_setup_sysconfig
1105a4e54154Smrgif can_use_sysconfig:
1106a4e54154Smrg  sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'})
1107a4e54154Smrgelse:
1108a4e54154Smrg  from distutils import sysconfig
1109a4e54154Smrg  sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
1110a4e54154Smrgsys.stdout.write(sitedir)"`
1111a4e54154Smrg   #
1112a4e54154Smrg   case $am_cv_python_pyexecdir in
1113a4e54154Smrg   $am_py_exec_prefix*)
1114a4e54154Smrg     am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1115a4e54154Smrg     am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"`
1116a4e54154Smrg     ;;
1117a4e54154Smrg   *)
1118a4e54154Smrg     case $am_py_exec_prefix in
1119a4e54154Smrg       /usr|/System*) ;;
1120a4e54154Smrg       *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
1121a4e54154Smrg          ;;
1122a4e54154Smrg     esac
1123a4e54154Smrg     ;;
1124a4e54154Smrg   esac
1125a4e54154Smrg  ])
1126a4e54154Smrg  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
1127a4e54154Smrg
1128a4e54154Smrg  dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE)
1129a4e54154Smrg  dnl
1130a4e54154Smrg  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
1131a4e54154Smrg
1132a4e54154Smrg  dnl Run any user-specified action.
1133a4e54154Smrg  $2
1134a4e54154Smrg  fi
1135a4e54154Smrg])
1136a4e54154Smrg
1137a4e54154Smrg
1138a4e54154Smrg# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1139a4e54154Smrg# ---------------------------------------------------------------------------
1140a4e54154Smrg# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
1141a4e54154Smrg# Run ACTION-IF-FALSE otherwise.
1142a4e54154Smrg# This test uses sys.hexversion instead of the string equivalent (first
1143a4e54154Smrg# word of sys.version), in order to cope with versions such as 2.2c1.
1144a4e54154Smrg# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
1145a4e54154SmrgAC_DEFUN([AM_PYTHON_CHECK_VERSION],
1146a4e54154Smrg [prog="import sys
1147a4e54154Smrg# split strings by '.' and convert to numeric.  Append some zeros
1148a4e54154Smrg# because we need at least 4 digits for the hex conversion.
1149a4e54154Smrg# map returns an iterator in Python 3.0 and a list in 2.x
1150a4e54154Smrgminver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
1151a4e54154Smrgminverhex = 0
1152a4e54154Smrg# xrange is not present in Python 3.0 and range returns an iterator
1153a4e54154Smrgfor i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
1154a4e54154Smrgsys.exit(sys.hexversion < minverhex)"
1155a4e54154Smrg  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
1156a4e54154Smrg
1157a4e54154Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1158953daebaSmrg#
1159953daebaSmrg# This file is free software; the Free Software Foundation
1160953daebaSmrg# gives unlimited permission to copy and/or distribute it,
1161953daebaSmrg# with or without modifications, as long as this notice is preserved.
1162953daebaSmrg
1163953daebaSmrg# AM_RUN_LOG(COMMAND)
1164953daebaSmrg# -------------------
1165953daebaSmrg# Run COMMAND, save the exit status in ac_status, and log it.
1166953daebaSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1167953daebaSmrgAC_DEFUN([AM_RUN_LOG],
1168953daebaSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1169953daebaSmrg   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1170953daebaSmrg   ac_status=$?
1171953daebaSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1172953daebaSmrg   (exit $ac_status); }])
1173953daebaSmrg
11742c393a42Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
11752c393a42Smrg
1176a4e54154Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
11772c393a42Smrg#
11782c393a42Smrg# This file is free software; the Free Software Foundation
11792c393a42Smrg# gives unlimited permission to copy and/or distribute it,
11802c393a42Smrg# with or without modifications, as long as this notice is preserved.
11812c393a42Smrg
11822c393a42Smrg# AM_SANITY_CHECK
11832c393a42Smrg# ---------------
11842c393a42SmrgAC_DEFUN([AM_SANITY_CHECK],
11852c393a42Smrg[AC_MSG_CHECKING([whether build environment is sane])
1186a6844aabSmrg# Reject unsafe characters in $srcdir or the absolute working directory
1187a6844aabSmrg# name.  Accept space and tab only in the latter.
1188a6844aabSmrgam_lf='
1189a6844aabSmrg'
1190a6844aabSmrgcase `pwd` in
1191a6844aabSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
1192a6844aabSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
1193a6844aabSmrgesac
1194a6844aabSmrgcase $srcdir in
1195a6844aabSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1196c9710b42Smrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1197a6844aabSmrgesac
1198a6844aabSmrg
1199c9710b42Smrg# Do 'set' in a subshell so we don't clobber the current shell's
12002c393a42Smrg# arguments.  Must try -L first in case configure is actually a
12012c393a42Smrg# symlink; some systems play weird games with the mod time of symlinks
12022c393a42Smrg# (eg FreeBSD returns the mod time of the symlink's containing
12032c393a42Smrg# directory).
12042c393a42Smrgif (
1205c9710b42Smrg   am_has_slept=no
1206c9710b42Smrg   for am_try in 1 2; do
1207c9710b42Smrg     echo "timestamp, slept: $am_has_slept" > conftest.file
1208c9710b42Smrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1209c9710b42Smrg     if test "$[*]" = "X"; then
1210c9710b42Smrg	# -L didn't work.
1211c9710b42Smrg	set X `ls -t "$srcdir/configure" conftest.file`
1212c9710b42Smrg     fi
1213c9710b42Smrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
1214c9710b42Smrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1215c9710b42Smrg
1216c9710b42Smrg	# If neither matched, then we have a broken ls.  This can happen
1217c9710b42Smrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
1218c9710b42Smrg	# broken ls alias from the environment.  This has actually
1219c9710b42Smrg	# happened.  Such a system could not be considered "sane".
1220c9710b42Smrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1221c9710b42Smrg  alias in your environment])
1222c9710b42Smrg     fi
1223c9710b42Smrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
1224c9710b42Smrg       break
1225c9710b42Smrg     fi
1226c9710b42Smrg     # Just in case.
1227c9710b42Smrg     sleep 1
1228c9710b42Smrg     am_has_slept=yes
1229c9710b42Smrg   done
12302c393a42Smrg   test "$[2]" = conftest.file
12312c393a42Smrg   )
12322c393a42Smrgthen
12332c393a42Smrg   # Ok.
12342c393a42Smrg   :
12352c393a42Smrgelse
12362c393a42Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
12372c393a42SmrgCheck your system clock])
12382c393a42Smrgfi
1239c9710b42SmrgAC_MSG_RESULT([yes])
1240c9710b42Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and
1241c9710b42Smrg# generated files are strictly newer.
1242c9710b42Smrgam_sleep_pid=
1243c9710b42Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
1244c9710b42Smrg  ( sleep 1 ) &
1245c9710b42Smrg  am_sleep_pid=$!
1246c9710b42Smrgfi
1247c9710b42SmrgAC_CONFIG_COMMANDS_PRE(
1248c9710b42Smrg  [AC_MSG_CHECKING([that generated files are newer than configure])
1249c9710b42Smrg   if test -n "$am_sleep_pid"; then
1250c9710b42Smrg     # Hide warnings about reused PIDs.
1251c9710b42Smrg     wait $am_sleep_pid 2>/dev/null
1252c9710b42Smrg   fi
1253c9710b42Smrg   AC_MSG_RESULT([done])])
1254c9710b42Smrgrm -f conftest.file
1255c9710b42Smrg])
12562c393a42Smrg
1257a4e54154Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc.
1258a6844aabSmrg#
1259a6844aabSmrg# This file is free software; the Free Software Foundation
1260a6844aabSmrg# gives unlimited permission to copy and/or distribute it,
1261a6844aabSmrg# with or without modifications, as long as this notice is preserved.
1262a6844aabSmrg
1263a6844aabSmrg# AM_SILENT_RULES([DEFAULT])
1264a6844aabSmrg# --------------------------
1265a6844aabSmrg# Enable less verbose build rules; with the default set to DEFAULT
1266c9710b42Smrg# ("yes" being less verbose, "no" or empty being verbose).
1267a6844aabSmrgAC_DEFUN([AM_SILENT_RULES],
1268c9710b42Smrg[AC_ARG_ENABLE([silent-rules], [dnl
1269c9710b42SmrgAS_HELP_STRING(
1270c9710b42Smrg  [--enable-silent-rules],
1271c9710b42Smrg  [less verbose build output (undo: "make V=1")])
1272c9710b42SmrgAS_HELP_STRING(
1273c9710b42Smrg  [--disable-silent-rules],
1274c9710b42Smrg  [verbose build output (undo: "make V=0")])dnl
1275c9710b42Smrg])
1276c9710b42Smrgcase $enable_silent_rules in @%:@ (((
1277c9710b42Smrg  yes) AM_DEFAULT_VERBOSITY=0;;
1278c9710b42Smrg   no) AM_DEFAULT_VERBOSITY=1;;
1279c9710b42Smrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1280a6844aabSmrgesac
1281ca08ab68Smrgdnl
1282c9710b42Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1283ca08ab68Smrgdnl do not support nested variable expansions.
1284ca08ab68Smrgdnl See automake bug#9928 and bug#10237.
1285ca08ab68Smrgam_make=${MAKE-make}
1286ca08ab68SmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
1287ca08ab68Smrg   [am_cv_make_support_nested_variables],
1288ca08ab68Smrg   [if AS_ECHO([['TRUE=$(BAR$(V))
1289ca08ab68SmrgBAR0=false
1290ca08ab68SmrgBAR1=true
1291ca08ab68SmrgV=1
1292ca08ab68Smrgam__doit:
1293ca08ab68Smrg	@$(TRUE)
1294ca08ab68Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1295ca08ab68Smrg  am_cv_make_support_nested_variables=yes
1296ca08ab68Smrgelse
1297ca08ab68Smrg  am_cv_make_support_nested_variables=no
1298ca08ab68Smrgfi])
1299ca08ab68Smrgif test $am_cv_make_support_nested_variables = yes; then
1300c9710b42Smrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
1301ca08ab68Smrg  AM_V='$(V)'
1302ca08ab68Smrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1303ca08ab68Smrgelse
1304ca08ab68Smrg  AM_V=$AM_DEFAULT_VERBOSITY
1305ca08ab68Smrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1306ca08ab68Smrgfi
1307ca08ab68SmrgAC_SUBST([AM_V])dnl
1308ca08ab68SmrgAM_SUBST_NOTMAKE([AM_V])dnl
1309ca08ab68SmrgAC_SUBST([AM_DEFAULT_V])dnl
1310ca08ab68SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1311a6844aabSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1312a6844aabSmrgAM_BACKSLASH='\'
1313a6844aabSmrgAC_SUBST([AM_BACKSLASH])dnl
1314a6844aabSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1315a6844aabSmrg])
1316a6844aabSmrg
1317a4e54154Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
13182c393a42Smrg#
13192c393a42Smrg# This file is free software; the Free Software Foundation
13202c393a42Smrg# gives unlimited permission to copy and/or distribute it,
13212c393a42Smrg# with or without modifications, as long as this notice is preserved.
13222c393a42Smrg
13232c393a42Smrg# AM_PROG_INSTALL_STRIP
13242c393a42Smrg# ---------------------
1325c9710b42Smrg# One issue with vendor 'install' (even GNU) is that you can't
13262c393a42Smrg# specify the program used to strip binaries.  This is especially
13272c393a42Smrg# annoying in cross-compiling environments, where the build's strip
13282c393a42Smrg# is unlikely to handle the host's binaries.
13292c393a42Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
1330c9710b42Smrg# always use install-sh in "make install-strip", and initialize
13312c393a42Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
13322c393a42SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
13332c393a42Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1334c9710b42Smrg# Installed binaries are usually stripped using 'strip' when the user
1335c9710b42Smrg# run "make install-strip".  However 'strip' might not be the right
13362c393a42Smrg# tool to use in cross-compilation environments, therefore Automake
1337c9710b42Smrg# will honor the 'STRIP' environment variable to overrule this program.
1338c9710b42Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
13392c393a42Smrgif test "$cross_compiling" != no; then
13402c393a42Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
13412c393a42Smrgfi
1342a6844aabSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
13432c393a42SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
13442c393a42Smrg
1345a4e54154Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc.
1346a6844aabSmrg#
1347a6844aabSmrg# This file is free software; the Free Software Foundation
1348a6844aabSmrg# gives unlimited permission to copy and/or distribute it,
1349a6844aabSmrg# with or without modifications, as long as this notice is preserved.
1350a6844aabSmrg
1351a6844aabSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
1352a6844aabSmrg# ---------------------------
1353a6844aabSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1354a6844aabSmrg# This macro is traced by Automake.
1355a6844aabSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
1356a6844aabSmrg
1357a6844aabSmrg# AM_SUBST_NOTMAKE(VARIABLE)
1358ca08ab68Smrg# --------------------------
1359a6844aabSmrg# Public sister of _AM_SUBST_NOTMAKE.
1360a6844aabSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1361a6844aabSmrg
13622c393a42Smrg# Check how to create a tarball.                            -*- Autoconf -*-
13632c393a42Smrg
1364a4e54154Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc.
13652c393a42Smrg#
13662c393a42Smrg# This file is free software; the Free Software Foundation
13672c393a42Smrg# gives unlimited permission to copy and/or distribute it,
13682c393a42Smrg# with or without modifications, as long as this notice is preserved.
13692c393a42Smrg
13702c393a42Smrg# _AM_PROG_TAR(FORMAT)
13712c393a42Smrg# --------------------
13722c393a42Smrg# Check how to create a tarball in format FORMAT.
1373c9710b42Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
13742c393a42Smrg#
13752c393a42Smrg# Substitute a variable $(am__tar) that is a command
13762c393a42Smrg# writing to stdout a FORMAT-tarball containing the directory
13772c393a42Smrg# $tardir.
13782c393a42Smrg#     tardir=directory && $(am__tar) > result.tar
13792c393a42Smrg#
13802c393a42Smrg# Substitute a variable $(am__untar) that extract such
13812c393a42Smrg# a tarball read from stdin.
13822c393a42Smrg#     $(am__untar) < result.tar
13836fc018e4Smrg#
13842c393a42SmrgAC_DEFUN([_AM_PROG_TAR],
1385ca08ab68Smrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
1386ca08ab68Smrg# in the wild :-(  We should find a proper way to deprecate it ...
1387ca08ab68SmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
13886fc018e4Smrg
13896fc018e4Smrg# We'll loop over all known methods to create a tar archive until one works.
13902c393a42Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
13912c393a42Smrg
13926fc018e4Smrgm4_if([$1], [v7],
13936fc018e4Smrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
13946fc018e4Smrg
13956fc018e4Smrg  [m4_case([$1],
13966fc018e4Smrg    [ustar],
13976fc018e4Smrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
13986fc018e4Smrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
13996fc018e4Smrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
14006fc018e4Smrg      # and bug#13588).
14016fc018e4Smrg      am_max_uid=2097151 # 2^21 - 1
14026fc018e4Smrg      am_max_gid=$am_max_uid
14036fc018e4Smrg      # The $UID and $GID variables are not portable, so we need to resort
14046fc018e4Smrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
14056fc018e4Smrg      # below are definitely unexpected, so allow the users to see them
14066fc018e4Smrg      # (that is, avoid stderr redirection).
14076fc018e4Smrg      am_uid=`id -u || echo unknown`
14086fc018e4Smrg      am_gid=`id -g || echo unknown`
14096fc018e4Smrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
14106fc018e4Smrg      if test $am_uid -le $am_max_uid; then
14116fc018e4Smrg         AC_MSG_RESULT([yes])
14126fc018e4Smrg      else
14136fc018e4Smrg         AC_MSG_RESULT([no])
14146fc018e4Smrg         _am_tools=none
14156fc018e4Smrg      fi
14166fc018e4Smrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
14176fc018e4Smrg      if test $am_gid -le $am_max_gid; then
14186fc018e4Smrg         AC_MSG_RESULT([yes])
14196fc018e4Smrg      else
14206fc018e4Smrg        AC_MSG_RESULT([no])
14216fc018e4Smrg        _am_tools=none
14226fc018e4Smrg      fi],
14236fc018e4Smrg
14246fc018e4Smrg  [pax],
14256fc018e4Smrg    [],
14266fc018e4Smrg
14276fc018e4Smrg  [m4_fatal([Unknown tar format])])
14286fc018e4Smrg
14296fc018e4Smrg  AC_MSG_CHECKING([how to create a $1 tar archive])
14306fc018e4Smrg
14316fc018e4Smrg  # Go ahead even if we have the value already cached.  We do so because we
14326fc018e4Smrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
14336fc018e4Smrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
14346fc018e4Smrg
14356fc018e4Smrg  for _am_tool in $_am_tools; do
14366fc018e4Smrg    case $_am_tool in
14376fc018e4Smrg    gnutar)
14386fc018e4Smrg      for _am_tar in tar gnutar gtar; do
14396fc018e4Smrg        AM_RUN_LOG([$_am_tar --version]) && break
14406fc018e4Smrg      done
14416fc018e4Smrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
14426fc018e4Smrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
14436fc018e4Smrg      am__untar="$_am_tar -xf -"
14446fc018e4Smrg      ;;
14456fc018e4Smrg    plaintar)
14466fc018e4Smrg      # Must skip GNU tar: if it does not support --format= it doesn't create
14476fc018e4Smrg      # ustar tarball either.
14486fc018e4Smrg      (tar --version) >/dev/null 2>&1 && continue
14496fc018e4Smrg      am__tar='tar chf - "$$tardir"'
14506fc018e4Smrg      am__tar_='tar chf - "$tardir"'
14516fc018e4Smrg      am__untar='tar xf -'
14526fc018e4Smrg      ;;
14536fc018e4Smrg    pax)
14546fc018e4Smrg      am__tar='pax -L -x $1 -w "$$tardir"'
14556fc018e4Smrg      am__tar_='pax -L -x $1 -w "$tardir"'
14566fc018e4Smrg      am__untar='pax -r'
14576fc018e4Smrg      ;;
14586fc018e4Smrg    cpio)
14596fc018e4Smrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
14606fc018e4Smrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
14616fc018e4Smrg      am__untar='cpio -i -H $1 -d'
14626fc018e4Smrg      ;;
14636fc018e4Smrg    none)
14646fc018e4Smrg      am__tar=false
14656fc018e4Smrg      am__tar_=false
14666fc018e4Smrg      am__untar=false
14676fc018e4Smrg      ;;
14686fc018e4Smrg    esac
14692c393a42Smrg
14706fc018e4Smrg    # If the value was cached, stop now.  We just wanted to have am__tar
14716fc018e4Smrg    # and am__untar set.
14726fc018e4Smrg    test -n "${am_cv_prog_tar_$1}" && break
14736fc018e4Smrg
14746fc018e4Smrg    # tar/untar a dummy directory, and stop if the command works.
14756fc018e4Smrg    rm -rf conftest.dir
14766fc018e4Smrg    mkdir conftest.dir
14776fc018e4Smrg    echo GrepMe > conftest.dir/file
14786fc018e4Smrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
14796fc018e4Smrg    rm -rf conftest.dir
14806fc018e4Smrg    if test -s conftest.tar; then
14816fc018e4Smrg      AM_RUN_LOG([$am__untar <conftest.tar])
14826fc018e4Smrg      AM_RUN_LOG([cat conftest.dir/file])
14836fc018e4Smrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
14846fc018e4Smrg    fi
14856fc018e4Smrg  done
14862c393a42Smrg  rm -rf conftest.dir
14872c393a42Smrg
14886fc018e4Smrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
14896fc018e4Smrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
14906fc018e4Smrg
14912c393a42SmrgAC_SUBST([am__tar])
14922c393a42SmrgAC_SUBST([am__untar])
14932c393a42Smrg]) # _AM_PROG_TAR
14942c393a42Smrg
1495b09479dcSmrgm4_include([m4/ac_check_symbol.m4])
1496c9710b42Smrgm4_include([m4/ax_cc_for_build.m4])
1497c9710b42Smrgm4_include([m4/ax_create_stdint_h.m4])
1498c9710b42Smrgm4_include([m4/ax_pthread.m4])
1499a32e9e42Smrgm4_include([m4/gettext.m4])
1500a32e9e42Smrgm4_include([m4/iconv.m4])
1501a32e9e42Smrgm4_include([m4/intlmacosx.m4])
1502a32e9e42Smrgm4_include([m4/lib-ld.m4])
1503a32e9e42Smrgm4_include([m4/lib-link.m4])
1504a32e9e42Smrgm4_include([m4/lib-prefix.m4])
1505ca08ab68Smrgm4_include([m4/libtool.m4])
1506ca08ab68Smrgm4_include([m4/ltoptions.m4])
1507ca08ab68Smrgm4_include([m4/ltsugar.m4])
1508ca08ab68Smrgm4_include([m4/ltversion.m4])
1509ca08ab68Smrgm4_include([m4/lt~obsolete.m4])
1510a32e9e42Smrgm4_include([m4/nls.m4])
1511953daebaSmrgm4_include([m4/pkg.m4])
1512a32e9e42Smrgm4_include([m4/po.m4])
1513a32e9e42Smrgm4_include([m4/progtest.m4])
1514