xref: /netbsd-src/external/gpl3/gdb/dist/libctf/aclocal.m4 (revision 12989c96ee862c63521a9ead8c44629b7a2ba9b1)
18dffb485Schristos# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
28dffb485Schristos
38dffb485Schristos# Copyright (C) 1996-2017 Free Software Foundation, Inc.
48dffb485Schristos
58dffb485Schristos# This file is free software; the Free Software Foundation
68dffb485Schristos# gives unlimited permission to copy and/or distribute it,
78dffb485Schristos# with or without modifications, as long as this notice is preserved.
88dffb485Schristos
98dffb485Schristos# This program is distributed in the hope that it will be useful,
108dffb485Schristos# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
118dffb485Schristos# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
128dffb485Schristos# PARTICULAR PURPOSE.
138dffb485Schristos
148dffb485Schristosm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
158dffb485Schristosm4_ifndef([AC_AUTOCONF_VERSION],
168dffb485Schristos  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
178dffb485Schristosm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
188dffb485Schristos[m4_warning([this file was generated for autoconf 2.69.
198dffb485SchristosYou have another version of autoconf.  It may work, but is not guaranteed to.
208dffb485SchristosIf you have problems, you may need to regenerate the build system entirely.
218dffb485SchristosTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
228dffb485Schristos
238dffb485Schristos# Copyright (C) 2002-2017 Free Software Foundation, Inc.
248dffb485Schristos#
258dffb485Schristos# This file is free software; the Free Software Foundation
268dffb485Schristos# gives unlimited permission to copy and/or distribute it,
278dffb485Schristos# with or without modifications, as long as this notice is preserved.
288dffb485Schristos
298dffb485Schristos# AM_AUTOMAKE_VERSION(VERSION)
308dffb485Schristos# ----------------------------
318dffb485Schristos# Automake X.Y traces this macro to ensure aclocal.m4 has been
328dffb485Schristos# generated from the m4 files accompanying Automake X.Y.
338dffb485Schristos# (This private macro should not be called outside this file.)
348dffb485SchristosAC_DEFUN([AM_AUTOMAKE_VERSION],
358dffb485Schristos[am__api_version='1.15'
368dffb485Schristosdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
378dffb485Schristosdnl require some minimum version.  Point them to the right macro.
388dffb485Schristosm4_if([$1], [1.15.1], [],
398dffb485Schristos      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
408dffb485Schristos])
418dffb485Schristos
428dffb485Schristos# _AM_AUTOCONF_VERSION(VERSION)
438dffb485Schristos# -----------------------------
448dffb485Schristos# aclocal traces this macro to find the Autoconf version.
458dffb485Schristos# This is a private macro too.  Using m4_define simplifies
468dffb485Schristos# the logic in aclocal, which can simply ignore this definition.
478dffb485Schristosm4_define([_AM_AUTOCONF_VERSION], [])
488dffb485Schristos
498dffb485Schristos# AM_SET_CURRENT_AUTOMAKE_VERSION
508dffb485Schristos# -------------------------------
518dffb485Schristos# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
528dffb485Schristos# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
538dffb485SchristosAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
548dffb485Schristos[AM_AUTOMAKE_VERSION([1.15.1])dnl
558dffb485Schristosm4_ifndef([AC_AUTOCONF_VERSION],
568dffb485Schristos  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
578dffb485Schristos_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
588dffb485Schristos
598dffb485Schristos# Copyright (C) 2011-2017 Free Software Foundation, Inc.
608dffb485Schristos#
618dffb485Schristos# This file is free software; the Free Software Foundation
628dffb485Schristos# gives unlimited permission to copy and/or distribute it,
638dffb485Schristos# with or without modifications, as long as this notice is preserved.
648dffb485Schristos
658dffb485Schristos# AM_PROG_AR([ACT-IF-FAIL])
668dffb485Schristos# -------------------------
678dffb485Schristos# Try to determine the archiver interface, and trigger the ar-lib wrapper
688dffb485Schristos# if it is needed.  If the detection of archiver interface fails, run
698dffb485Schristos# ACT-IF-FAIL (default is to abort configure with a proper error message).
708dffb485SchristosAC_DEFUN([AM_PROG_AR],
718dffb485Schristos[AC_BEFORE([$0], [LT_INIT])dnl
728dffb485SchristosAC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
738dffb485SchristosAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
748dffb485SchristosAC_REQUIRE_AUX_FILE([ar-lib])dnl
758dffb485SchristosAC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
768dffb485Schristos: ${AR=ar}
778dffb485Schristos
788dffb485SchristosAC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
798dffb485Schristos  [AC_LANG_PUSH([C])
808dffb485Schristos   am_cv_ar_interface=ar
818dffb485Schristos   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
828dffb485Schristos     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
838dffb485Schristos      AC_TRY_EVAL([am_ar_try])
848dffb485Schristos      if test "$ac_status" -eq 0; then
858dffb485Schristos        am_cv_ar_interface=ar
868dffb485Schristos      else
878dffb485Schristos        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
888dffb485Schristos        AC_TRY_EVAL([am_ar_try])
898dffb485Schristos        if test "$ac_status" -eq 0; then
908dffb485Schristos          am_cv_ar_interface=lib
918dffb485Schristos        else
928dffb485Schristos          am_cv_ar_interface=unknown
938dffb485Schristos        fi
948dffb485Schristos      fi
958dffb485Schristos      rm -f conftest.lib libconftest.a
968dffb485Schristos     ])
978dffb485Schristos   AC_LANG_POP([C])])
988dffb485Schristos
998dffb485Schristoscase $am_cv_ar_interface in
1008dffb485Schristosar)
1018dffb485Schristos  ;;
1028dffb485Schristoslib)
1038dffb485Schristos  # Microsoft lib, so override with the ar-lib wrapper script.
1048dffb485Schristos  # FIXME: It is wrong to rewrite AR.
1058dffb485Schristos  # But if we don't then we get into trouble of one sort or another.
1068dffb485Schristos  # A longer-term fix would be to have automake use am__AR in this case,
1078dffb485Schristos  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
1088dffb485Schristos  # similar.
1098dffb485Schristos  AR="$am_aux_dir/ar-lib $AR"
1108dffb485Schristos  ;;
1118dffb485Schristosunknown)
1128dffb485Schristos  m4_default([$1],
1138dffb485Schristos             [AC_MSG_ERROR([could not determine $AR interface])])
1148dffb485Schristos  ;;
1158dffb485Schristosesac
1168dffb485SchristosAC_SUBST([AR])dnl
1178dffb485Schristos])
1188dffb485Schristos
1198dffb485Schristos# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
1208dffb485Schristos
1218dffb485Schristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
1228dffb485Schristos#
1238dffb485Schristos# This file is free software; the Free Software Foundation
1248dffb485Schristos# gives unlimited permission to copy and/or distribute it,
1258dffb485Schristos# with or without modifications, as long as this notice is preserved.
1268dffb485Schristos
1278dffb485Schristos# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1288dffb485Schristos# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
1298dffb485Schristos# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
1308dffb485Schristos#
1318dffb485Schristos# Of course, Automake must honor this variable whenever it calls a
1328dffb485Schristos# tool from the auxiliary directory.  The problem is that $srcdir (and
1338dffb485Schristos# therefore $ac_aux_dir as well) can be either absolute or relative,
1348dffb485Schristos# depending on how configure is run.  This is pretty annoying, since
1358dffb485Schristos# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1368dffb485Schristos# source directory, any form will work fine, but in subdirectories a
1378dffb485Schristos# relative path needs to be adjusted first.
1388dffb485Schristos#
1398dffb485Schristos# $ac_aux_dir/missing
1408dffb485Schristos#    fails when called from a subdirectory if $ac_aux_dir is relative
1418dffb485Schristos# $top_srcdir/$ac_aux_dir/missing
1428dffb485Schristos#    fails if $ac_aux_dir is absolute,
1438dffb485Schristos#    fails when called from a subdirectory in a VPATH build with
1448dffb485Schristos#          a relative $ac_aux_dir
1458dffb485Schristos#
1468dffb485Schristos# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1478dffb485Schristos# are both prefixed by $srcdir.  In an in-source build this is usually
1488dffb485Schristos# harmless because $srcdir is '.', but things will broke when you
1498dffb485Schristos# start a VPATH build or use an absolute $srcdir.
1508dffb485Schristos#
1518dffb485Schristos# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1528dffb485Schristos# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
1538dffb485Schristos#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1548dffb485Schristos# and then we would define $MISSING as
1558dffb485Schristos#   MISSING="\${SHELL} $am_aux_dir/missing"
1568dffb485Schristos# This will work as long as MISSING is not called from configure, because
1578dffb485Schristos# unfortunately $(top_srcdir) has no meaning in configure.
1588dffb485Schristos# However there are other variables, like CC, which are often used in
1598dffb485Schristos# configure, and could therefore not use this "fixed" $ac_aux_dir.
1608dffb485Schristos#
1618dffb485Schristos# Another solution, used here, is to always expand $ac_aux_dir to an
1628dffb485Schristos# absolute PATH.  The drawback is that using absolute paths prevent a
1638dffb485Schristos# configured tree to be moved without reconfiguration.
1648dffb485Schristos
1658dffb485SchristosAC_DEFUN([AM_AUX_DIR_EXPAND],
1668dffb485Schristos[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1678dffb485Schristos# Expand $ac_aux_dir to an absolute path.
1688dffb485Schristosam_aux_dir=`cd "$ac_aux_dir" && pwd`
1698dffb485Schristos])
1708dffb485Schristos
1718dffb485Schristos# AM_CONDITIONAL                                            -*- Autoconf -*-
1728dffb485Schristos
1738dffb485Schristos# Copyright (C) 1997-2017 Free Software Foundation, Inc.
1748dffb485Schristos#
1758dffb485Schristos# This file is free software; the Free Software Foundation
1768dffb485Schristos# gives unlimited permission to copy and/or distribute it,
1778dffb485Schristos# with or without modifications, as long as this notice is preserved.
1788dffb485Schristos
1798dffb485Schristos# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1808dffb485Schristos# -------------------------------------
1818dffb485Schristos# Define a conditional.
1828dffb485SchristosAC_DEFUN([AM_CONDITIONAL],
1838dffb485Schristos[AC_PREREQ([2.52])dnl
1848dffb485Schristos m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1858dffb485Schristos       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1868dffb485SchristosAC_SUBST([$1_TRUE])dnl
1878dffb485SchristosAC_SUBST([$1_FALSE])dnl
1888dffb485Schristos_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1898dffb485Schristos_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1908dffb485Schristosm4_define([_AM_COND_VALUE_$1], [$2])dnl
1918dffb485Schristosif $2; then
1928dffb485Schristos  $1_TRUE=
1938dffb485Schristos  $1_FALSE='#'
1948dffb485Schristoselse
1958dffb485Schristos  $1_TRUE='#'
1968dffb485Schristos  $1_FALSE=
1978dffb485Schristosfi
1988dffb485SchristosAC_CONFIG_COMMANDS_PRE(
1998dffb485Schristos[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2008dffb485Schristos  AC_MSG_ERROR([[conditional "$1" was never defined.
2018dffb485SchristosUsually this means the macro was only invoked conditionally.]])
2028dffb485Schristosfi])])
2038dffb485Schristos
2048dffb485Schristos# Copyright (C) 1999-2017 Free Software Foundation, Inc.
2058dffb485Schristos#
2068dffb485Schristos# This file is free software; the Free Software Foundation
2078dffb485Schristos# gives unlimited permission to copy and/or distribute it,
2088dffb485Schristos# with or without modifications, as long as this notice is preserved.
2098dffb485Schristos
2108dffb485Schristos
2118dffb485Schristos# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
2128dffb485Schristos# written in clear, in which case automake, when reading aclocal.m4,
2138dffb485Schristos# will think it sees a *use*, and therefore will trigger all it's
2148dffb485Schristos# C support machinery.  Also note that it means that autoscan, seeing
2158dffb485Schristos# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2168dffb485Schristos
2178dffb485Schristos
2188dffb485Schristos# _AM_DEPENDENCIES(NAME)
2198dffb485Schristos# ----------------------
2208dffb485Schristos# See how the compiler implements dependency checking.
2218dffb485Schristos# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
2228dffb485Schristos# We try a few techniques and use that to set a single cache variable.
2238dffb485Schristos#
2248dffb485Schristos# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2258dffb485Schristos# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2268dffb485Schristos# dependency, and given that the user is not expected to run this macro,
2278dffb485Schristos# just rely on AC_PROG_CC.
2288dffb485SchristosAC_DEFUN([_AM_DEPENDENCIES],
2298dffb485Schristos[AC_REQUIRE([AM_SET_DEPDIR])dnl
2308dffb485SchristosAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2318dffb485SchristosAC_REQUIRE([AM_MAKE_INCLUDE])dnl
2328dffb485SchristosAC_REQUIRE([AM_DEP_TRACK])dnl
2338dffb485Schristos
2348dffb485Schristosm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
2358dffb485Schristos      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
2368dffb485Schristos      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2378dffb485Schristos      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
2388dffb485Schristos      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
2398dffb485Schristos      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
2408dffb485Schristos                    [depcc="$$1"   am_compiler_list=])
2418dffb485Schristos
2428dffb485SchristosAC_CACHE_CHECK([dependency style of $depcc],
2438dffb485Schristos               [am_cv_$1_dependencies_compiler_type],
2448dffb485Schristos[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2458dffb485Schristos  # We make a subdir and do the tests there.  Otherwise we can end up
2468dffb485Schristos  # making bogus files that we don't know about and never remove.  For
2478dffb485Schristos  # instance it was reported that on HP-UX the gcc test will end up
2488dffb485Schristos  # making a dummy file named 'D' -- because '-MD' means "put the output
2498dffb485Schristos  # in D".
2508dffb485Schristos  rm -rf conftest.dir
2518dffb485Schristos  mkdir conftest.dir
2528dffb485Schristos  # Copy depcomp to subdir because otherwise we won't find it if we're
2538dffb485Schristos  # using a relative directory.
2548dffb485Schristos  cp "$am_depcomp" conftest.dir
2558dffb485Schristos  cd conftest.dir
2568dffb485Schristos  # We will build objects and dependencies in a subdirectory because
2578dffb485Schristos  # it helps to detect inapplicable dependency modes.  For instance
2588dffb485Schristos  # both Tru64's cc and ICC support -MD to output dependencies as a
2598dffb485Schristos  # side effect of compilation, but ICC will put the dependencies in
2608dffb485Schristos  # the current directory while Tru64 will put them in the object
2618dffb485Schristos  # directory.
2628dffb485Schristos  mkdir sub
2638dffb485Schristos
2648dffb485Schristos  am_cv_$1_dependencies_compiler_type=none
2658dffb485Schristos  if test "$am_compiler_list" = ""; then
2668dffb485Schristos     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2678dffb485Schristos  fi
2688dffb485Schristos  am__universal=false
2698dffb485Schristos  m4_case([$1], [CC],
2708dffb485Schristos    [case " $depcc " in #(
2718dffb485Schristos     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2728dffb485Schristos     esac],
2738dffb485Schristos    [CXX],
2748dffb485Schristos    [case " $depcc " in #(
2758dffb485Schristos     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2768dffb485Schristos     esac])
2778dffb485Schristos
2788dffb485Schristos  for depmode in $am_compiler_list; do
2798dffb485Schristos    # Setup a source with many dependencies, because some compilers
2808dffb485Schristos    # like to wrap large dependency lists on column 80 (with \), and
2818dffb485Schristos    # we should not choose a depcomp mode which is confused by this.
2828dffb485Schristos    #
2838dffb485Schristos    # We need to recreate these files for each test, as the compiler may
2848dffb485Schristos    # overwrite some of them when testing with obscure command lines.
2858dffb485Schristos    # This happens at least with the AIX C compiler.
2868dffb485Schristos    : > sub/conftest.c
2878dffb485Schristos    for i in 1 2 3 4 5 6; do
2888dffb485Schristos      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2898dffb485Schristos      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
2908dffb485Schristos      # Solaris 10 /bin/sh.
2918dffb485Schristos      echo '/* dummy */' > sub/conftst$i.h
2928dffb485Schristos    done
2938dffb485Schristos    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2948dffb485Schristos
2958dffb485Schristos    # We check with '-c' and '-o' for the sake of the "dashmstdout"
2968dffb485Schristos    # mode.  It turns out that the SunPro C++ compiler does not properly
2978dffb485Schristos    # handle '-M -o', and we need to detect this.  Also, some Intel
2988dffb485Schristos    # versions had trouble with output in subdirs.
2998dffb485Schristos    am__obj=sub/conftest.${OBJEXT-o}
3008dffb485Schristos    am__minus_obj="-o $am__obj"
3018dffb485Schristos    case $depmode in
3028dffb485Schristos    gcc)
3038dffb485Schristos      # This depmode causes a compiler race in universal mode.
3048dffb485Schristos      test "$am__universal" = false || continue
3058dffb485Schristos      ;;
3068dffb485Schristos    nosideeffect)
3078dffb485Schristos      # After this tag, mechanisms are not by side-effect, so they'll
3088dffb485Schristos      # only be used when explicitly requested.
3098dffb485Schristos      if test "x$enable_dependency_tracking" = xyes; then
3108dffb485Schristos	continue
3118dffb485Schristos      else
3128dffb485Schristos	break
3138dffb485Schristos      fi
3148dffb485Schristos      ;;
3158dffb485Schristos    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3168dffb485Schristos      # This compiler won't grok '-c -o', but also, the minuso test has
3178dffb485Schristos      # not run yet.  These depmodes are late enough in the game, and
3188dffb485Schristos      # so weak that their functioning should not be impacted.
3198dffb485Schristos      am__obj=conftest.${OBJEXT-o}
3208dffb485Schristos      am__minus_obj=
3218dffb485Schristos      ;;
3228dffb485Schristos    none) break ;;
3238dffb485Schristos    esac
3248dffb485Schristos    if depmode=$depmode \
3258dffb485Schristos       source=sub/conftest.c object=$am__obj \
3268dffb485Schristos       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3278dffb485Schristos       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3288dffb485Schristos         >/dev/null 2>conftest.err &&
3298dffb485Schristos       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3308dffb485Schristos       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3318dffb485Schristos       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3328dffb485Schristos       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3338dffb485Schristos      # icc doesn't choke on unknown options, it will just issue warnings
3348dffb485Schristos      # or remarks (even with -Werror).  So we grep stderr for any message
3358dffb485Schristos      # that says an option was ignored or not supported.
3368dffb485Schristos      # When given -MP, icc 7.0 and 7.1 complain thusly:
3378dffb485Schristos      #   icc: Command line warning: ignoring option '-M'; no argument required
3388dffb485Schristos      # The diagnosis changed in icc 8.0:
3398dffb485Schristos      #   icc: Command line remark: option '-MP' not supported
3408dffb485Schristos      if (grep 'ignoring option' conftest.err ||
3418dffb485Schristos          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3428dffb485Schristos        am_cv_$1_dependencies_compiler_type=$depmode
3438dffb485Schristos        break
3448dffb485Schristos      fi
3458dffb485Schristos    fi
3468dffb485Schristos  done
3478dffb485Schristos
3488dffb485Schristos  cd ..
3498dffb485Schristos  rm -rf conftest.dir
3508dffb485Schristoselse
3518dffb485Schristos  am_cv_$1_dependencies_compiler_type=none
3528dffb485Schristosfi
3538dffb485Schristos])
3548dffb485SchristosAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3558dffb485SchristosAM_CONDITIONAL([am__fastdep$1], [
3568dffb485Schristos  test "x$enable_dependency_tracking" != xno \
3578dffb485Schristos  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3588dffb485Schristos])
3598dffb485Schristos
3608dffb485Schristos
3618dffb485Schristos# AM_SET_DEPDIR
3628dffb485Schristos# -------------
3638dffb485Schristos# Choose a directory name for dependency files.
3648dffb485Schristos# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3658dffb485SchristosAC_DEFUN([AM_SET_DEPDIR],
3668dffb485Schristos[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3678dffb485SchristosAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3688dffb485Schristos])
3698dffb485Schristos
3708dffb485Schristos
3718dffb485Schristos# AM_DEP_TRACK
3728dffb485Schristos# ------------
3738dffb485SchristosAC_DEFUN([AM_DEP_TRACK],
3748dffb485Schristos[AC_ARG_ENABLE([dependency-tracking], [dnl
3758dffb485SchristosAS_HELP_STRING(
3768dffb485Schristos  [--enable-dependency-tracking],
3778dffb485Schristos  [do not reject slow dependency extractors])
3788dffb485SchristosAS_HELP_STRING(
3798dffb485Schristos  [--disable-dependency-tracking],
3808dffb485Schristos  [speeds up one-time build])])
3818dffb485Schristosif test "x$enable_dependency_tracking" != xno; then
3828dffb485Schristos  am_depcomp="$ac_aux_dir/depcomp"
3838dffb485Schristos  AMDEPBACKSLASH='\'
3848dffb485Schristos  am__nodep='_no'
3858dffb485Schristosfi
3868dffb485SchristosAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3878dffb485SchristosAC_SUBST([AMDEPBACKSLASH])dnl
3888dffb485Schristos_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3898dffb485SchristosAC_SUBST([am__nodep])dnl
3908dffb485Schristos_AM_SUBST_NOTMAKE([am__nodep])dnl
3918dffb485Schristos])
3928dffb485Schristos
3938dffb485Schristos# Generate code to set up dependency tracking.              -*- Autoconf -*-
3948dffb485Schristos
3958dffb485Schristos# Copyright (C) 1999-2017 Free Software Foundation, Inc.
3968dffb485Schristos#
3978dffb485Schristos# This file is free software; the Free Software Foundation
3988dffb485Schristos# gives unlimited permission to copy and/or distribute it,
3998dffb485Schristos# with or without modifications, as long as this notice is preserved.
4008dffb485Schristos
4018dffb485Schristos
4028dffb485Schristos# _AM_OUTPUT_DEPENDENCY_COMMANDS
4038dffb485Schristos# ------------------------------
4048dffb485SchristosAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
4058dffb485Schristos[{
4068dffb485Schristos  # Older Autoconf quotes --file arguments for eval, but not when files
4078dffb485Schristos  # are listed without --file.  Let's play safe and only enable the eval
4088dffb485Schristos  # if we detect the quoting.
4098dffb485Schristos  case $CONFIG_FILES in
4108dffb485Schristos  *\'*) eval set x "$CONFIG_FILES" ;;
4118dffb485Schristos  *)   set x $CONFIG_FILES ;;
4128dffb485Schristos  esac
4138dffb485Schristos  shift
4148dffb485Schristos  for mf
4158dffb485Schristos  do
4168dffb485Schristos    # Strip MF so we end up with the name of the file.
4178dffb485Schristos    mf=`echo "$mf" | sed -e 's/:.*$//'`
4188dffb485Schristos    # Check whether this is an Automake generated Makefile or not.
4198dffb485Schristos    # We used to match only the files named 'Makefile.in', but
4208dffb485Schristos    # some people rename them; so instead we look at the file content.
4218dffb485Schristos    # Grep'ing the first line is not enough: some people post-process
4228dffb485Schristos    # each Makefile.in and add a new line on top of each file to say so.
4238dffb485Schristos    # Grep'ing the whole file is not good either: AIX grep has a line
4248dffb485Schristos    # limit of 2048, but all sed's we know have understand at least 4000.
4258dffb485Schristos    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
4268dffb485Schristos      dirpart=`AS_DIRNAME("$mf")`
4278dffb485Schristos    else
4288dffb485Schristos      continue
4298dffb485Schristos    fi
4308dffb485Schristos    # Extract the definition of DEPDIR, am__include, and am__quote
4318dffb485Schristos    # from the Makefile without running 'make'.
4328dffb485Schristos    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
4338dffb485Schristos    test -z "$DEPDIR" && continue
4348dffb485Schristos    am__include=`sed -n 's/^am__include = //p' < "$mf"`
4358dffb485Schristos    test -z "$am__include" && continue
4368dffb485Schristos    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
4378dffb485Schristos    # Find all dependency output files, they are included files with
4388dffb485Schristos    # $(DEPDIR) in their names.  We invoke sed twice because it is the
4398dffb485Schristos    # simplest approach to changing $(DEPDIR) to its actual value in the
4408dffb485Schristos    # expansion.
4418dffb485Schristos    for file in `sed -n "
4428dffb485Schristos      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
4438dffb485Schristos	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
4448dffb485Schristos      # Make sure the directory exists.
4458dffb485Schristos      test -f "$dirpart/$file" && continue
4468dffb485Schristos      fdir=`AS_DIRNAME(["$file"])`
4478dffb485Schristos      AS_MKDIR_P([$dirpart/$fdir])
4488dffb485Schristos      # echo "creating $dirpart/$file"
4498dffb485Schristos      echo '# dummy' > "$dirpart/$file"
4508dffb485Schristos    done
4518dffb485Schristos  done
4528dffb485Schristos}
4538dffb485Schristos])# _AM_OUTPUT_DEPENDENCY_COMMANDS
4548dffb485Schristos
4558dffb485Schristos
4568dffb485Schristos# AM_OUTPUT_DEPENDENCY_COMMANDS
4578dffb485Schristos# -----------------------------
4588dffb485Schristos# This macro should only be invoked once -- use via AC_REQUIRE.
4598dffb485Schristos#
4608dffb485Schristos# This code is only required when automatic dependency tracking
4618dffb485Schristos# is enabled.  FIXME.  This creates each '.P' file that we will
4628dffb485Schristos# need in order to bootstrap the dependency handling code.
4638dffb485SchristosAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
4648dffb485Schristos[AC_CONFIG_COMMANDS([depfiles],
4658dffb485Schristos     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
4668dffb485Schristos     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
4678dffb485Schristos])
4688dffb485Schristos
4698dffb485Schristos# Do all the work for Automake.                             -*- Autoconf -*-
4708dffb485Schristos
4718dffb485Schristos# Copyright (C) 1996-2017 Free Software Foundation, Inc.
4728dffb485Schristos#
4738dffb485Schristos# This file is free software; the Free Software Foundation
4748dffb485Schristos# gives unlimited permission to copy and/or distribute it,
4758dffb485Schristos# with or without modifications, as long as this notice is preserved.
4768dffb485Schristos
4778dffb485Schristos# This macro actually does too much.  Some checks are only needed if
4788dffb485Schristos# your package does certain things.  But this isn't really a big deal.
4798dffb485Schristos
4808dffb485Schristosdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
4818dffb485Schristosm4_define([AC_PROG_CC],
4828dffb485Schristosm4_defn([AC_PROG_CC])
4838dffb485Schristos[_AM_PROG_CC_C_O
4848dffb485Schristos])
4858dffb485Schristos
4868dffb485Schristos# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4878dffb485Schristos# AM_INIT_AUTOMAKE([OPTIONS])
4888dffb485Schristos# -----------------------------------------------
4898dffb485Schristos# The call with PACKAGE and VERSION arguments is the old style
4908dffb485Schristos# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4918dffb485Schristos# and VERSION should now be passed to AC_INIT and removed from
4928dffb485Schristos# the call to AM_INIT_AUTOMAKE.
4938dffb485Schristos# We support both call styles for the transition.  After
4948dffb485Schristos# the next Automake release, Autoconf can make the AC_INIT
4958dffb485Schristos# arguments mandatory, and then we can depend on a new Autoconf
4968dffb485Schristos# release and drop the old call support.
4978dffb485SchristosAC_DEFUN([AM_INIT_AUTOMAKE],
4988dffb485Schristos[AC_PREREQ([2.65])dnl
4998dffb485Schristosdnl Autoconf wants to disallow AM_ names.  We explicitly allow
5008dffb485Schristosdnl the ones we care about.
5018dffb485Schristosm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
5028dffb485SchristosAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
5038dffb485SchristosAC_REQUIRE([AC_PROG_INSTALL])dnl
5048dffb485Schristosif test "`cd $srcdir && pwd`" != "`pwd`"; then
5058dffb485Schristos  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5068dffb485Schristos  # is not polluted with repeated "-I."
5078dffb485Schristos  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
5088dffb485Schristos  # test to see if srcdir already configured
5098dffb485Schristos  if test -f $srcdir/config.status; then
5108dffb485Schristos    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
5118dffb485Schristos  fi
5128dffb485Schristosfi
5138dffb485Schristos
5148dffb485Schristos# test whether we have cygpath
5158dffb485Schristosif test -z "$CYGPATH_W"; then
5168dffb485Schristos  if (cygpath --version) >/dev/null 2>/dev/null; then
5178dffb485Schristos    CYGPATH_W='cygpath -w'
5188dffb485Schristos  else
5198dffb485Schristos    CYGPATH_W=echo
5208dffb485Schristos  fi
5218dffb485Schristosfi
5228dffb485SchristosAC_SUBST([CYGPATH_W])
5238dffb485Schristos
5248dffb485Schristos# Define the identity of the package.
5258dffb485Schristosdnl Distinguish between old-style and new-style calls.
5268dffb485Schristosm4_ifval([$2],
5278dffb485Schristos[AC_DIAGNOSE([obsolete],
5288dffb485Schristos             [$0: two- and three-arguments forms are deprecated.])
5298dffb485Schristosm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
5308dffb485Schristos AC_SUBST([PACKAGE], [$1])dnl
5318dffb485Schristos AC_SUBST([VERSION], [$2])],
5328dffb485Schristos[_AM_SET_OPTIONS([$1])dnl
5338dffb485Schristosdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
5348dffb485Schristosm4_if(
5358dffb485Schristos  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
5368dffb485Schristos  [ok:ok],,
5378dffb485Schristos  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
5388dffb485Schristos AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
5398dffb485Schristos AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
5408dffb485Schristos
5418dffb485Schristos_AM_IF_OPTION([no-define],,
5428dffb485Schristos[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
5438dffb485Schristos AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
5448dffb485Schristos
5458dffb485Schristos# Some tools Automake needs.
5468dffb485SchristosAC_REQUIRE([AM_SANITY_CHECK])dnl
5478dffb485SchristosAC_REQUIRE([AC_ARG_PROGRAM])dnl
5488dffb485SchristosAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
5498dffb485SchristosAM_MISSING_PROG([AUTOCONF], [autoconf])
5508dffb485SchristosAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
5518dffb485SchristosAM_MISSING_PROG([AUTOHEADER], [autoheader])
5528dffb485SchristosAM_MISSING_PROG([MAKEINFO], [makeinfo])
5538dffb485SchristosAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
5548dffb485SchristosAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
5558dffb485SchristosAC_REQUIRE([AC_PROG_MKDIR_P])dnl
5568dffb485Schristos# For better backward compatibility.  To be removed once Automake 1.9.x
5578dffb485Schristos# dies out for good.  For more background, see:
5588dffb485Schristos# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
5598dffb485Schristos# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
5608dffb485SchristosAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
5618dffb485Schristos# We need awk for the "check" target (and possibly the TAP driver).  The
5628dffb485Schristos# system "awk" is bad on some platforms.
5638dffb485SchristosAC_REQUIRE([AC_PROG_AWK])dnl
5648dffb485SchristosAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5658dffb485SchristosAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5668dffb485Schristos_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5678dffb485Schristos	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5688dffb485Schristos			     [_AM_PROG_TAR([v7])])])
5698dffb485Schristos_AM_IF_OPTION([no-dependencies],,
5708dffb485Schristos[AC_PROVIDE_IFELSE([AC_PROG_CC],
5718dffb485Schristos		  [_AM_DEPENDENCIES([CC])],
5728dffb485Schristos		  [m4_define([AC_PROG_CC],
5738dffb485Schristos			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
5748dffb485SchristosAC_PROVIDE_IFELSE([AC_PROG_CXX],
5758dffb485Schristos		  [_AM_DEPENDENCIES([CXX])],
5768dffb485Schristos		  [m4_define([AC_PROG_CXX],
5778dffb485Schristos			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
5788dffb485SchristosAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5798dffb485Schristos		  [_AM_DEPENDENCIES([OBJC])],
5808dffb485Schristos		  [m4_define([AC_PROG_OBJC],
5818dffb485Schristos			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
5828dffb485SchristosAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
5838dffb485Schristos		  [_AM_DEPENDENCIES([OBJCXX])],
5848dffb485Schristos		  [m4_define([AC_PROG_OBJCXX],
5858dffb485Schristos			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
5868dffb485Schristos])
5878dffb485SchristosAC_REQUIRE([AM_SILENT_RULES])dnl
5888dffb485Schristosdnl The testsuite driver may need to know about EXEEXT, so add the
5898dffb485Schristosdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
5908dffb485Schristosdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
5918dffb485SchristosAC_CONFIG_COMMANDS_PRE(dnl
5928dffb485Schristos[m4_provide_if([_AM_COMPILER_EXEEXT],
5938dffb485Schristos  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
5948dffb485Schristos
5958dffb485Schristos# POSIX will say in a future version that running "rm -f" with no argument
5968dffb485Schristos# is OK; and we want to be able to make that assumption in our Makefile
5978dffb485Schristos# recipes.  So use an aggressive probe to check that the usage we want is
5988dffb485Schristos# actually supported "in the wild" to an acceptable degree.
5998dffb485Schristos# See automake bug#10828.
6008dffb485Schristos# To make any issue more visible, cause the running configure to be aborted
6018dffb485Schristos# by default if the 'rm' program in use doesn't match our expectations; the
6028dffb485Schristos# user can still override this though.
6038dffb485Schristosif rm -f && rm -fr && rm -rf; then : OK; else
6048dffb485Schristos  cat >&2 <<'END'
6058dffb485SchristosOops!
6068dffb485Schristos
6078dffb485SchristosYour 'rm' program seems unable to run without file operands specified
6088dffb485Schristoson the command line, even when the '-f' option is present.  This is contrary
6098dffb485Schristosto the behaviour of most rm programs out there, and not conforming with
6108dffb485Schristosthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
6118dffb485Schristos
6128dffb485SchristosPlease tell bug-automake@gnu.org about your system, including the value
6138dffb485Schristosof your $PATH and any error possibly output before this message.  This
6148dffb485Schristoscan help us improve future automake versions.
6158dffb485Schristos
6168dffb485SchristosEND
6178dffb485Schristos  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
6188dffb485Schristos    echo 'Configuration will proceed anyway, since you have set the' >&2
6198dffb485Schristos    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
6208dffb485Schristos    echo >&2
6218dffb485Schristos  else
6228dffb485Schristos    cat >&2 <<'END'
6238dffb485SchristosAborting the configuration process, to ensure you take notice of the issue.
6248dffb485Schristos
6258dffb485SchristosYou can download and install GNU coreutils to get an 'rm' implementation
6268dffb485Schristosthat behaves properly: <http://www.gnu.org/software/coreutils/>.
6278dffb485Schristos
6288dffb485SchristosIf you want to complete the configuration process using your problematic
6298dffb485Schristos'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
6308dffb485Schristosto "yes", and re-run configure.
6318dffb485Schristos
6328dffb485SchristosEND
6338dffb485Schristos    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
6348dffb485Schristos  fi
6358dffb485Schristosfi
6368dffb485Schristosdnl The trailing newline in this macro's definition is deliberate, for
6378dffb485Schristosdnl backward compatibility and to allow trailing 'dnl'-style comments
6388dffb485Schristosdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
6398dffb485Schristos])
6408dffb485Schristos
6418dffb485Schristosdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
6428dffb485Schristosdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
6438dffb485Schristosdnl mangled by Autoconf and run in a shell conditional statement.
6448dffb485Schristosm4_define([_AC_COMPILER_EXEEXT],
6458dffb485Schristosm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
6468dffb485Schristos
6478dffb485Schristos# When config.status generates a header, we must update the stamp-h file.
6488dffb485Schristos# This file resides in the same directory as the config header
6498dffb485Schristos# that is generated.  The stamp files are numbered to have different names.
6508dffb485Schristos
6518dffb485Schristos# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6528dffb485Schristos# loop where config.status creates the headers, so we can generate
6538dffb485Schristos# our stamp files there.
6548dffb485SchristosAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6558dffb485Schristos[# Compute $1's index in $config_headers.
6568dffb485Schristos_am_arg=$1
6578dffb485Schristos_am_stamp_count=1
6588dffb485Schristosfor _am_header in $config_headers :; do
6598dffb485Schristos  case $_am_header in
6608dffb485Schristos    $_am_arg | $_am_arg:* )
6618dffb485Schristos      break ;;
6628dffb485Schristos    * )
6638dffb485Schristos      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6648dffb485Schristos  esac
6658dffb485Schristosdone
6668dffb485Schristosecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
6678dffb485Schristos
6688dffb485Schristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
6698dffb485Schristos#
6708dffb485Schristos# This file is free software; the Free Software Foundation
6718dffb485Schristos# gives unlimited permission to copy and/or distribute it,
6728dffb485Schristos# with or without modifications, as long as this notice is preserved.
6738dffb485Schristos
6748dffb485Schristos# AM_PROG_INSTALL_SH
6758dffb485Schristos# ------------------
6768dffb485Schristos# Define $install_sh.
6778dffb485SchristosAC_DEFUN([AM_PROG_INSTALL_SH],
6788dffb485Schristos[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6798dffb485Schristosif test x"${install_sh+set}" != xset; then
6808dffb485Schristos  case $am_aux_dir in
6818dffb485Schristos  *\ * | *\	*)
6828dffb485Schristos    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6838dffb485Schristos  *)
6848dffb485Schristos    install_sh="\${SHELL} $am_aux_dir/install-sh"
6858dffb485Schristos  esac
6868dffb485Schristosfi
6878dffb485SchristosAC_SUBST([install_sh])])
6888dffb485Schristos
6898dffb485Schristos# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
6908dffb485Schristos# From Jim Meyering
6918dffb485Schristos
6928dffb485Schristos# Copyright (C) 1996-2017 Free Software Foundation, Inc.
6938dffb485Schristos#
6948dffb485Schristos# This file is free software; the Free Software Foundation
6958dffb485Schristos# gives unlimited permission to copy and/or distribute it,
6968dffb485Schristos# with or without modifications, as long as this notice is preserved.
6978dffb485Schristos
6988dffb485Schristos# AM_MAINTAINER_MODE([DEFAULT-MODE])
6998dffb485Schristos# ----------------------------------
7008dffb485Schristos# Control maintainer-specific portions of Makefiles.
7018dffb485Schristos# Default is to disable them, unless 'enable' is passed literally.
7028dffb485Schristos# For symmetry, 'disable' may be passed as well.  Anyway, the user
7038dffb485Schristos# can override the default with the --enable/--disable switch.
7048dffb485SchristosAC_DEFUN([AM_MAINTAINER_MODE],
7058dffb485Schristos[m4_case(m4_default([$1], [disable]),
7068dffb485Schristos       [enable], [m4_define([am_maintainer_other], [disable])],
7078dffb485Schristos       [disable], [m4_define([am_maintainer_other], [enable])],
7088dffb485Schristos       [m4_define([am_maintainer_other], [enable])
7098dffb485Schristos        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
7108dffb485SchristosAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7118dffb485Schristos  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
7128dffb485Schristos  AC_ARG_ENABLE([maintainer-mode],
7138dffb485Schristos    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
7148dffb485Schristos      am_maintainer_other[ make rules and dependencies not useful
7158dffb485Schristos      (and sometimes confusing) to the casual installer])],
7168dffb485Schristos    [USE_MAINTAINER_MODE=$enableval],
7178dffb485Schristos    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
7188dffb485Schristos  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7198dffb485Schristos  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
7208dffb485Schristos  MAINT=$MAINTAINER_MODE_TRUE
7218dffb485Schristos  AC_SUBST([MAINT])dnl
7228dffb485Schristos]
7238dffb485Schristos)
7248dffb485Schristos
7258dffb485Schristos# Check to see how 'make' treats includes.	            -*- Autoconf -*-
7268dffb485Schristos
7278dffb485Schristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
7288dffb485Schristos#
7298dffb485Schristos# This file is free software; the Free Software Foundation
7308dffb485Schristos# gives unlimited permission to copy and/or distribute it,
7318dffb485Schristos# with or without modifications, as long as this notice is preserved.
7328dffb485Schristos
7338dffb485Schristos# AM_MAKE_INCLUDE()
7348dffb485Schristos# -----------------
7358dffb485Schristos# Check to see how make treats includes.
7368dffb485SchristosAC_DEFUN([AM_MAKE_INCLUDE],
7378dffb485Schristos[am_make=${MAKE-make}
7388dffb485Schristoscat > confinc << 'END'
7398dffb485Schristosam__doit:
7408dffb485Schristos	@echo this is the am__doit target
7418dffb485Schristos.PHONY: am__doit
7428dffb485SchristosEND
7438dffb485Schristos# If we don't find an include directive, just comment out the code.
7448dffb485SchristosAC_MSG_CHECKING([for style of include used by $am_make])
7458dffb485Schristosam__include="#"
7468dffb485Schristosam__quote=
7478dffb485Schristos_am_result=none
7488dffb485Schristos# First try GNU make style include.
7498dffb485Schristosecho "include confinc" > confmf
7508dffb485Schristos# Ignore all kinds of additional output from 'make'.
7518dffb485Schristoscase `$am_make -s -f confmf 2> /dev/null` in #(
7528dffb485Schristos*the\ am__doit\ target*)
7538dffb485Schristos  am__include=include
7548dffb485Schristos  am__quote=
7558dffb485Schristos  _am_result=GNU
7568dffb485Schristos  ;;
7578dffb485Schristosesac
7588dffb485Schristos# Now try BSD make style include.
7598dffb485Schristosif test "$am__include" = "#"; then
7608dffb485Schristos   echo '.include "confinc"' > confmf
7618dffb485Schristos   case `$am_make -s -f confmf 2> /dev/null` in #(
7628dffb485Schristos   *the\ am__doit\ target*)
7638dffb485Schristos     am__include=.include
7648dffb485Schristos     am__quote="\""
7658dffb485Schristos     _am_result=BSD
7668dffb485Schristos     ;;
7678dffb485Schristos   esac
7688dffb485Schristosfi
7698dffb485SchristosAC_SUBST([am__include])
7708dffb485SchristosAC_SUBST([am__quote])
7718dffb485SchristosAC_MSG_RESULT([$_am_result])
7728dffb485Schristosrm -f confinc confmf
7738dffb485Schristos])
7748dffb485Schristos
7758dffb485Schristos# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7768dffb485Schristos
7778dffb485Schristos# Copyright (C) 1997-2017 Free Software Foundation, Inc.
7788dffb485Schristos#
7798dffb485Schristos# This file is free software; the Free Software Foundation
7808dffb485Schristos# gives unlimited permission to copy and/or distribute it,
7818dffb485Schristos# with or without modifications, as long as this notice is preserved.
7828dffb485Schristos
7838dffb485Schristos# AM_MISSING_PROG(NAME, PROGRAM)
7848dffb485Schristos# ------------------------------
7858dffb485SchristosAC_DEFUN([AM_MISSING_PROG],
7868dffb485Schristos[AC_REQUIRE([AM_MISSING_HAS_RUN])
7878dffb485Schristos$1=${$1-"${am_missing_run}$2"}
7888dffb485SchristosAC_SUBST($1)])
7898dffb485Schristos
7908dffb485Schristos# AM_MISSING_HAS_RUN
7918dffb485Schristos# ------------------
7928dffb485Schristos# Define MISSING if not defined so far and test if it is modern enough.
7938dffb485Schristos# If it is, set am_missing_run to use it, otherwise, to nothing.
7948dffb485SchristosAC_DEFUN([AM_MISSING_HAS_RUN],
7958dffb485Schristos[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7968dffb485SchristosAC_REQUIRE_AUX_FILE([missing])dnl
7978dffb485Schristosif test x"${MISSING+set}" != xset; then
7988dffb485Schristos  case $am_aux_dir in
7998dffb485Schristos  *\ * | *\	*)
8008dffb485Schristos    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8018dffb485Schristos  *)
8028dffb485Schristos    MISSING="\${SHELL} $am_aux_dir/missing" ;;
8038dffb485Schristos  esac
8048dffb485Schristosfi
8058dffb485Schristos# Use eval to expand $SHELL
8068dffb485Schristosif eval "$MISSING --is-lightweight"; then
8078dffb485Schristos  am_missing_run="$MISSING "
8088dffb485Schristoselse
8098dffb485Schristos  am_missing_run=
8108dffb485Schristos  AC_MSG_WARN(['missing' script is too old or missing])
8118dffb485Schristosfi
8128dffb485Schristos])
8138dffb485Schristos
8148dffb485Schristos# Helper functions for option handling.                     -*- Autoconf -*-
8158dffb485Schristos
8168dffb485Schristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
8178dffb485Schristos#
8188dffb485Schristos# This file is free software; the Free Software Foundation
8198dffb485Schristos# gives unlimited permission to copy and/or distribute it,
8208dffb485Schristos# with or without modifications, as long as this notice is preserved.
8218dffb485Schristos
8228dffb485Schristos# _AM_MANGLE_OPTION(NAME)
8238dffb485Schristos# -----------------------
8248dffb485SchristosAC_DEFUN([_AM_MANGLE_OPTION],
8258dffb485Schristos[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8268dffb485Schristos
8278dffb485Schristos# _AM_SET_OPTION(NAME)
8288dffb485Schristos# --------------------
8298dffb485Schristos# Set option NAME.  Presently that only means defining a flag for this option.
8308dffb485SchristosAC_DEFUN([_AM_SET_OPTION],
8318dffb485Schristos[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
8328dffb485Schristos
8338dffb485Schristos# _AM_SET_OPTIONS(OPTIONS)
8348dffb485Schristos# ------------------------
8358dffb485Schristos# OPTIONS is a space-separated list of Automake options.
8368dffb485SchristosAC_DEFUN([_AM_SET_OPTIONS],
8378dffb485Schristos[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8388dffb485Schristos
8398dffb485Schristos# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8408dffb485Schristos# -------------------------------------------
8418dffb485Schristos# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8428dffb485SchristosAC_DEFUN([_AM_IF_OPTION],
8438dffb485Schristos[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8448dffb485Schristos
8458dffb485Schristos# Copyright (C) 1999-2017 Free Software Foundation, Inc.
8468dffb485Schristos#
8478dffb485Schristos# This file is free software; the Free Software Foundation
8488dffb485Schristos# gives unlimited permission to copy and/or distribute it,
8498dffb485Schristos# with or without modifications, as long as this notice is preserved.
8508dffb485Schristos
8518dffb485Schristos# _AM_PROG_CC_C_O
8528dffb485Schristos# ---------------
8538dffb485Schristos# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
8548dffb485Schristos# to automatically call this.
8558dffb485SchristosAC_DEFUN([_AM_PROG_CC_C_O],
8568dffb485Schristos[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8578dffb485SchristosAC_REQUIRE_AUX_FILE([compile])dnl
8588dffb485SchristosAC_LANG_PUSH([C])dnl
8598dffb485SchristosAC_CACHE_CHECK(
8608dffb485Schristos  [whether $CC understands -c and -o together],
8618dffb485Schristos  [am_cv_prog_cc_c_o],
8628dffb485Schristos  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
8638dffb485Schristos  # Make sure it works both with $CC and with simple cc.
8648dffb485Schristos  # Following AC_PROG_CC_C_O, we do the test twice because some
8658dffb485Schristos  # compilers refuse to overwrite an existing .o file with -o,
8668dffb485Schristos  # though they will create one.
8678dffb485Schristos  am_cv_prog_cc_c_o=yes
8688dffb485Schristos  for am_i in 1 2; do
8698dffb485Schristos    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
8708dffb485Schristos         && test -f conftest2.$ac_objext; then
8718dffb485Schristos      : OK
8728dffb485Schristos    else
8738dffb485Schristos      am_cv_prog_cc_c_o=no
8748dffb485Schristos      break
8758dffb485Schristos    fi
8768dffb485Schristos  done
8778dffb485Schristos  rm -f core conftest*
8788dffb485Schristos  unset am_i])
8798dffb485Schristosif test "$am_cv_prog_cc_c_o" != yes; then
8808dffb485Schristos   # Losing compiler, so override with the script.
8818dffb485Schristos   # FIXME: It is wrong to rewrite CC.
8828dffb485Schristos   # But if we don't then we get into trouble of one sort or another.
8838dffb485Schristos   # A longer-term fix would be to have automake use am__CC in this case,
8848dffb485Schristos   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
8858dffb485Schristos   CC="$am_aux_dir/compile $CC"
8868dffb485Schristosfi
8878dffb485SchristosAC_LANG_POP([C])])
8888dffb485Schristos
8898dffb485Schristos# For backward compatibility.
8908dffb485SchristosAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
8918dffb485Schristos
8928dffb485Schristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
8938dffb485Schristos#
8948dffb485Schristos# This file is free software; the Free Software Foundation
8958dffb485Schristos# gives unlimited permission to copy and/or distribute it,
8968dffb485Schristos# with or without modifications, as long as this notice is preserved.
8978dffb485Schristos
8988dffb485Schristos# AM_RUN_LOG(COMMAND)
8998dffb485Schristos# -------------------
9008dffb485Schristos# Run COMMAND, save the exit status in ac_status, and log it.
9018dffb485Schristos# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
9028dffb485SchristosAC_DEFUN([AM_RUN_LOG],
9038dffb485Schristos[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
9048dffb485Schristos   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
9058dffb485Schristos   ac_status=$?
9068dffb485Schristos   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
9078dffb485Schristos   (exit $ac_status); }])
9088dffb485Schristos
9098dffb485Schristos# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9108dffb485Schristos
9118dffb485Schristos# Copyright (C) 1996-2017 Free Software Foundation, Inc.
9128dffb485Schristos#
9138dffb485Schristos# This file is free software; the Free Software Foundation
9148dffb485Schristos# gives unlimited permission to copy and/or distribute it,
9158dffb485Schristos# with or without modifications, as long as this notice is preserved.
9168dffb485Schristos
9178dffb485Schristos# AM_SANITY_CHECK
9188dffb485Schristos# ---------------
9198dffb485SchristosAC_DEFUN([AM_SANITY_CHECK],
9208dffb485Schristos[AC_MSG_CHECKING([whether build environment is sane])
9218dffb485Schristos# Reject unsafe characters in $srcdir or the absolute working directory
9228dffb485Schristos# name.  Accept space and tab only in the latter.
9238dffb485Schristosam_lf='
9248dffb485Schristos'
9258dffb485Schristoscase `pwd` in
9268dffb485Schristos  *[[\\\"\#\$\&\'\`$am_lf]]*)
9278dffb485Schristos    AC_MSG_ERROR([unsafe absolute working directory name]);;
9288dffb485Schristosesac
9298dffb485Schristoscase $srcdir in
9308dffb485Schristos  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
9318dffb485Schristos    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
9328dffb485Schristosesac
9338dffb485Schristos
9348dffb485Schristos# Do 'set' in a subshell so we don't clobber the current shell's
9358dffb485Schristos# arguments.  Must try -L first in case configure is actually a
9368dffb485Schristos# symlink; some systems play weird games with the mod time of symlinks
9378dffb485Schristos# (eg FreeBSD returns the mod time of the symlink's containing
9388dffb485Schristos# directory).
9398dffb485Schristosif (
9408dffb485Schristos   am_has_slept=no
9418dffb485Schristos   for am_try in 1 2; do
9428dffb485Schristos     echo "timestamp, slept: $am_has_slept" > conftest.file
9438dffb485Schristos     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9448dffb485Schristos     if test "$[*]" = "X"; then
9458dffb485Schristos	# -L didn't work.
9468dffb485Schristos	set X `ls -t "$srcdir/configure" conftest.file`
9478dffb485Schristos     fi
9488dffb485Schristos     if test "$[*]" != "X $srcdir/configure conftest.file" \
9498dffb485Schristos	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
9508dffb485Schristos
9518dffb485Schristos	# If neither matched, then we have a broken ls.  This can happen
9528dffb485Schristos	# if, for instance, CONFIG_SHELL is bash and it inherits a
9538dffb485Schristos	# broken ls alias from the environment.  This has actually
9548dffb485Schristos	# happened.  Such a system could not be considered "sane".
9558dffb485Schristos	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9568dffb485Schristos  alias in your environment])
9578dffb485Schristos     fi
9588dffb485Schristos     if test "$[2]" = conftest.file || test $am_try -eq 2; then
9598dffb485Schristos       break
9608dffb485Schristos     fi
9618dffb485Schristos     # Just in case.
9628dffb485Schristos     sleep 1
9638dffb485Schristos     am_has_slept=yes
9648dffb485Schristos   done
9658dffb485Schristos   test "$[2]" = conftest.file
9668dffb485Schristos   )
9678dffb485Schristosthen
9688dffb485Schristos   # Ok.
9698dffb485Schristos   :
9708dffb485Schristoselse
9718dffb485Schristos   AC_MSG_ERROR([newly created file is older than distributed files!
9728dffb485SchristosCheck your system clock])
9738dffb485Schristosfi
9748dffb485SchristosAC_MSG_RESULT([yes])
9758dffb485Schristos# If we didn't sleep, we still need to ensure time stamps of config.status and
9768dffb485Schristos# generated files are strictly newer.
9778dffb485Schristosam_sleep_pid=
9788dffb485Schristosif grep 'slept: no' conftest.file >/dev/null 2>&1; then
9798dffb485Schristos  ( sleep 1 ) &
9808dffb485Schristos  am_sleep_pid=$!
9818dffb485Schristosfi
9828dffb485SchristosAC_CONFIG_COMMANDS_PRE(
9838dffb485Schristos  [AC_MSG_CHECKING([that generated files are newer than configure])
9848dffb485Schristos   if test -n "$am_sleep_pid"; then
9858dffb485Schristos     # Hide warnings about reused PIDs.
9868dffb485Schristos     wait $am_sleep_pid 2>/dev/null
9878dffb485Schristos   fi
9888dffb485Schristos   AC_MSG_RESULT([done])])
9898dffb485Schristosrm -f conftest.file
9908dffb485Schristos])
9918dffb485Schristos
9928dffb485Schristos# Copyright (C) 2009-2017 Free Software Foundation, Inc.
9938dffb485Schristos#
9948dffb485Schristos# This file is free software; the Free Software Foundation
9958dffb485Schristos# gives unlimited permission to copy and/or distribute it,
9968dffb485Schristos# with or without modifications, as long as this notice is preserved.
9978dffb485Schristos
9988dffb485Schristos# AM_SILENT_RULES([DEFAULT])
9998dffb485Schristos# --------------------------
10008dffb485Schristos# Enable less verbose build rules; with the default set to DEFAULT
10018dffb485Schristos# ("yes" being less verbose, "no" or empty being verbose).
10028dffb485SchristosAC_DEFUN([AM_SILENT_RULES],
10038dffb485Schristos[AC_ARG_ENABLE([silent-rules], [dnl
10048dffb485SchristosAS_HELP_STRING(
10058dffb485Schristos  [--enable-silent-rules],
10068dffb485Schristos  [less verbose build output (undo: "make V=1")])
10078dffb485SchristosAS_HELP_STRING(
10088dffb485Schristos  [--disable-silent-rules],
10098dffb485Schristos  [verbose build output (undo: "make V=0")])dnl
10108dffb485Schristos])
10118dffb485Schristoscase $enable_silent_rules in @%:@ (((
10128dffb485Schristos  yes) AM_DEFAULT_VERBOSITY=0;;
10138dffb485Schristos   no) AM_DEFAULT_VERBOSITY=1;;
10148dffb485Schristos    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
10158dffb485Schristosesac
10168dffb485Schristosdnl
10178dffb485Schristosdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
10188dffb485Schristosdnl do not support nested variable expansions.
10198dffb485Schristosdnl See automake bug#9928 and bug#10237.
10208dffb485Schristosam_make=${MAKE-make}
10218dffb485SchristosAC_CACHE_CHECK([whether $am_make supports nested variables],
10228dffb485Schristos   [am_cv_make_support_nested_variables],
10238dffb485Schristos   [if AS_ECHO([['TRUE=$(BAR$(V))
10248dffb485SchristosBAR0=false
10258dffb485SchristosBAR1=true
10268dffb485SchristosV=1
10278dffb485Schristosam__doit:
10288dffb485Schristos	@$(TRUE)
10298dffb485Schristos.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10308dffb485Schristos  am_cv_make_support_nested_variables=yes
10318dffb485Schristoselse
10328dffb485Schristos  am_cv_make_support_nested_variables=no
10338dffb485Schristosfi])
10348dffb485Schristosif test $am_cv_make_support_nested_variables = yes; then
10358dffb485Schristos  dnl Using '$V' instead of '$(V)' breaks IRIX make.
10368dffb485Schristos  AM_V='$(V)'
10378dffb485Schristos  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10388dffb485Schristoselse
10398dffb485Schristos  AM_V=$AM_DEFAULT_VERBOSITY
10408dffb485Schristos  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10418dffb485Schristosfi
10428dffb485SchristosAC_SUBST([AM_V])dnl
10438dffb485SchristosAM_SUBST_NOTMAKE([AM_V])dnl
10448dffb485SchristosAC_SUBST([AM_DEFAULT_V])dnl
10458dffb485SchristosAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10468dffb485SchristosAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10478dffb485SchristosAM_BACKSLASH='\'
10488dffb485SchristosAC_SUBST([AM_BACKSLASH])dnl
10498dffb485Schristos_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10508dffb485Schristos])
10518dffb485Schristos
10528dffb485Schristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
10538dffb485Schristos#
10548dffb485Schristos# This file is free software; the Free Software Foundation
10558dffb485Schristos# gives unlimited permission to copy and/or distribute it,
10568dffb485Schristos# with or without modifications, as long as this notice is preserved.
10578dffb485Schristos
10588dffb485Schristos# AM_PROG_INSTALL_STRIP
10598dffb485Schristos# ---------------------
10608dffb485Schristos# One issue with vendor 'install' (even GNU) is that you can't
10618dffb485Schristos# specify the program used to strip binaries.  This is especially
10628dffb485Schristos# annoying in cross-compiling environments, where the build's strip
10638dffb485Schristos# is unlikely to handle the host's binaries.
10648dffb485Schristos# Fortunately install-sh will honor a STRIPPROG variable, so we
10658dffb485Schristos# always use install-sh in "make install-strip", and initialize
10668dffb485Schristos# STRIPPROG with the value of the STRIP variable (set by the user).
10678dffb485SchristosAC_DEFUN([AM_PROG_INSTALL_STRIP],
10688dffb485Schristos[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10698dffb485Schristos# Installed binaries are usually stripped using 'strip' when the user
10708dffb485Schristos# run "make install-strip".  However 'strip' might not be the right
10718dffb485Schristos# tool to use in cross-compilation environments, therefore Automake
10728dffb485Schristos# will honor the 'STRIP' environment variable to overrule this program.
10738dffb485Schristosdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10748dffb485Schristosif test "$cross_compiling" != no; then
10758dffb485Schristos  AC_CHECK_TOOL([STRIP], [strip], :)
10768dffb485Schristosfi
10778dffb485SchristosINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10788dffb485SchristosAC_SUBST([INSTALL_STRIP_PROGRAM])])
10798dffb485Schristos
10808dffb485Schristos# Copyright (C) 2006-2017 Free Software Foundation, Inc.
10818dffb485Schristos#
10828dffb485Schristos# This file is free software; the Free Software Foundation
10838dffb485Schristos# gives unlimited permission to copy and/or distribute it,
10848dffb485Schristos# with or without modifications, as long as this notice is preserved.
10858dffb485Schristos
10868dffb485Schristos# _AM_SUBST_NOTMAKE(VARIABLE)
10878dffb485Schristos# ---------------------------
10888dffb485Schristos# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10898dffb485Schristos# This macro is traced by Automake.
10908dffb485SchristosAC_DEFUN([_AM_SUBST_NOTMAKE])
10918dffb485Schristos
10928dffb485Schristos# AM_SUBST_NOTMAKE(VARIABLE)
10938dffb485Schristos# --------------------------
10948dffb485Schristos# Public sister of _AM_SUBST_NOTMAKE.
10958dffb485SchristosAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10968dffb485Schristos
10978dffb485Schristos# Check how to create a tarball.                            -*- Autoconf -*-
10988dffb485Schristos
10998dffb485Schristos# Copyright (C) 2004-2017 Free Software Foundation, Inc.
11008dffb485Schristos#
11018dffb485Schristos# This file is free software; the Free Software Foundation
11028dffb485Schristos# gives unlimited permission to copy and/or distribute it,
11038dffb485Schristos# with or without modifications, as long as this notice is preserved.
11048dffb485Schristos
11058dffb485Schristos# _AM_PROG_TAR(FORMAT)
11068dffb485Schristos# --------------------
11078dffb485Schristos# Check how to create a tarball in format FORMAT.
11088dffb485Schristos# FORMAT should be one of 'v7', 'ustar', or 'pax'.
11098dffb485Schristos#
11108dffb485Schristos# Substitute a variable $(am__tar) that is a command
11118dffb485Schristos# writing to stdout a FORMAT-tarball containing the directory
11128dffb485Schristos# $tardir.
11138dffb485Schristos#     tardir=directory && $(am__tar) > result.tar
11148dffb485Schristos#
11158dffb485Schristos# Substitute a variable $(am__untar) that extract such
11168dffb485Schristos# a tarball read from stdin.
11178dffb485Schristos#     $(am__untar) < result.tar
11188dffb485Schristos#
11198dffb485SchristosAC_DEFUN([_AM_PROG_TAR],
11208dffb485Schristos[# Always define AMTAR for backward compatibility.  Yes, it's still used
11218dffb485Schristos# in the wild :-(  We should find a proper way to deprecate it ...
11228dffb485SchristosAC_SUBST([AMTAR], ['$${TAR-tar}'])
11238dffb485Schristos
11248dffb485Schristos# We'll loop over all known methods to create a tar archive until one works.
11258dffb485Schristos_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11268dffb485Schristos
11278dffb485Schristosm4_if([$1], [v7],
11288dffb485Schristos  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
11298dffb485Schristos
11308dffb485Schristos  [m4_case([$1],
11318dffb485Schristos    [ustar],
11328dffb485Schristos     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
11338dffb485Schristos      # There is notably a 21 bits limit for the UID and the GID.  In fact,
11348dffb485Schristos      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
11358dffb485Schristos      # and bug#13588).
11368dffb485Schristos      am_max_uid=2097151 # 2^21 - 1
11378dffb485Schristos      am_max_gid=$am_max_uid
11388dffb485Schristos      # The $UID and $GID variables are not portable, so we need to resort
11398dffb485Schristos      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
11408dffb485Schristos      # below are definitely unexpected, so allow the users to see them
11418dffb485Schristos      # (that is, avoid stderr redirection).
11428dffb485Schristos      am_uid=`id -u || echo unknown`
11438dffb485Schristos      am_gid=`id -g || echo unknown`
11448dffb485Schristos      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11458dffb485Schristos      if test $am_uid -le $am_max_uid; then
11468dffb485Schristos         AC_MSG_RESULT([yes])
11478dffb485Schristos      else
11488dffb485Schristos         AC_MSG_RESULT([no])
11498dffb485Schristos         _am_tools=none
11508dffb485Schristos      fi
11518dffb485Schristos      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11528dffb485Schristos      if test $am_gid -le $am_max_gid; then
11538dffb485Schristos         AC_MSG_RESULT([yes])
11548dffb485Schristos      else
11558dffb485Schristos        AC_MSG_RESULT([no])
11568dffb485Schristos        _am_tools=none
11578dffb485Schristos      fi],
11588dffb485Schristos
11598dffb485Schristos  [pax],
11608dffb485Schristos    [],
11618dffb485Schristos
11628dffb485Schristos  [m4_fatal([Unknown tar format])])
11638dffb485Schristos
11648dffb485Schristos  AC_MSG_CHECKING([how to create a $1 tar archive])
11658dffb485Schristos
11668dffb485Schristos  # Go ahead even if we have the value already cached.  We do so because we
11678dffb485Schristos  # need to set the values for the 'am__tar' and 'am__untar' variables.
11688dffb485Schristos  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11698dffb485Schristos
11708dffb485Schristos  for _am_tool in $_am_tools; do
11718dffb485Schristos    case $_am_tool in
11728dffb485Schristos    gnutar)
11738dffb485Schristos      for _am_tar in tar gnutar gtar; do
11748dffb485Schristos        AM_RUN_LOG([$_am_tar --version]) && break
11758dffb485Schristos      done
11768dffb485Schristos      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11778dffb485Schristos      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11788dffb485Schristos      am__untar="$_am_tar -xf -"
11798dffb485Schristos      ;;
11808dffb485Schristos    plaintar)
11818dffb485Schristos      # Must skip GNU tar: if it does not support --format= it doesn't create
11828dffb485Schristos      # ustar tarball either.
11838dffb485Schristos      (tar --version) >/dev/null 2>&1 && continue
11848dffb485Schristos      am__tar='tar chf - "$$tardir"'
11858dffb485Schristos      am__tar_='tar chf - "$tardir"'
11868dffb485Schristos      am__untar='tar xf -'
11878dffb485Schristos      ;;
11888dffb485Schristos    pax)
11898dffb485Schristos      am__tar='pax -L -x $1 -w "$$tardir"'
11908dffb485Schristos      am__tar_='pax -L -x $1 -w "$tardir"'
11918dffb485Schristos      am__untar='pax -r'
11928dffb485Schristos      ;;
11938dffb485Schristos    cpio)
11948dffb485Schristos      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11958dffb485Schristos      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11968dffb485Schristos      am__untar='cpio -i -H $1 -d'
11978dffb485Schristos      ;;
11988dffb485Schristos    none)
11998dffb485Schristos      am__tar=false
12008dffb485Schristos      am__tar_=false
12018dffb485Schristos      am__untar=false
12028dffb485Schristos      ;;
12038dffb485Schristos    esac
12048dffb485Schristos
12058dffb485Schristos    # If the value was cached, stop now.  We just wanted to have am__tar
12068dffb485Schristos    # and am__untar set.
12078dffb485Schristos    test -n "${am_cv_prog_tar_$1}" && break
12088dffb485Schristos
12098dffb485Schristos    # tar/untar a dummy directory, and stop if the command works.
12108dffb485Schristos    rm -rf conftest.dir
12118dffb485Schristos    mkdir conftest.dir
12128dffb485Schristos    echo GrepMe > conftest.dir/file
12138dffb485Schristos    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
12148dffb485Schristos    rm -rf conftest.dir
12158dffb485Schristos    if test -s conftest.tar; then
12168dffb485Schristos      AM_RUN_LOG([$am__untar <conftest.tar])
12178dffb485Schristos      AM_RUN_LOG([cat conftest.dir/file])
12188dffb485Schristos      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
12198dffb485Schristos    fi
12208dffb485Schristos  done
12218dffb485Schristos  rm -rf conftest.dir
12228dffb485Schristos
12238dffb485Schristos  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
12248dffb485Schristos  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
12258dffb485Schristos
12268dffb485SchristosAC_SUBST([am__tar])
12278dffb485SchristosAC_SUBST([am__untar])
12288dffb485Schristos]) # _AM_PROG_TAR
12298dffb485Schristos
12308dffb485Schristosm4_include([../bfd/acinclude.m4])
12318dffb485Schristosm4_include([../config/acx.m4])
12328dffb485Schristosm4_include([../config/depstand.m4])
12338dffb485Schristosm4_include([../config/enable.m4])
12348dffb485Schristosm4_include([../config/gettext-sister.m4])
1235*12989c96Schristosm4_include([../config/gettext.m4])
1236*12989c96Schristosm4_include([../config/iconv.m4])
1237*12989c96Schristosm4_include([../config/intlmacosx.m4])
12384b169a6bSchristosm4_include([../config/jobserver.m4])
12398dffb485Schristosm4_include([../config/lead-dot.m4])
1240*12989c96Schristosm4_include([../config/lib-ld.m4])
1241*12989c96Schristosm4_include([../config/lib-link.m4])
1242*12989c96Schristosm4_include([../config/lib-prefix.m4])
1243*12989c96Schristosm4_include([../config/mmap.m4])
1244*12989c96Schristosm4_include([../config/nls.m4])
12458dffb485Schristosm4_include([../config/override.m4])
1246*12989c96Schristosm4_include([../config/po.m4])
1247*12989c96Schristosm4_include([../config/progtest.m4])
12488dffb485Schristosm4_include([../config/warnings.m4])
12498dffb485Schristosm4_include([../config/zlib.m4])
12508dffb485Schristosm4_include([../libtool.m4])
12518dffb485Schristosm4_include([../ltoptions.m4])
12528dffb485Schristosm4_include([../ltsugar.m4])
12538dffb485Schristosm4_include([../ltversion.m4])
12548dffb485Schristosm4_include([../lt~obsolete.m4])
1255