xref: /freebsd/contrib/libevent/aclocal.m4 (revision b50261e2)
1*b50261e2SCy Schubert# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
2c43e99fdSEd Maste
3*b50261e2SCy Schubert# Copyright (C) 1996-2020 Free Software Foundation, Inc.
4c43e99fdSEd Maste
5c43e99fdSEd Maste# This file is free software; the Free Software Foundation
6c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
7c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
8c43e99fdSEd Maste
9c43e99fdSEd Maste# This program is distributed in the hope that it will be useful,
10c43e99fdSEd Maste# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11c43e99fdSEd Maste# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12c43e99fdSEd Maste# PARTICULAR PURPOSE.
13c43e99fdSEd Maste
14c43e99fdSEd Mastem4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15c43e99fdSEd Mastem4_ifndef([AC_AUTOCONF_VERSION],
16c43e99fdSEd Maste  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17c43e99fdSEd Mastem4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18c43e99fdSEd Maste[m4_warning([this file was generated for autoconf 2.69.
19c43e99fdSEd MasteYou have another version of autoconf.  It may work, but is not guaranteed to.
20c43e99fdSEd MasteIf you have problems, you may need to regenerate the build system entirely.
21c43e99fdSEd MasteTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22c43e99fdSEd Maste
23*b50261e2SCy Schubert# Copyright (C) 2002-2020 Free Software Foundation, Inc.
24c43e99fdSEd Maste#
25c43e99fdSEd Maste# This file is free software; the Free Software Foundation
26c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
27c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
28c43e99fdSEd Maste
29c43e99fdSEd Maste# AM_AUTOMAKE_VERSION(VERSION)
30c43e99fdSEd Maste# ----------------------------
31c43e99fdSEd Maste# Automake X.Y traces this macro to ensure aclocal.m4 has been
32c43e99fdSEd Maste# generated from the m4 files accompanying Automake X.Y.
33c43e99fdSEd Maste# (This private macro should not be called outside this file.)
34c43e99fdSEd MasteAC_DEFUN([AM_AUTOMAKE_VERSION],
35*b50261e2SCy Schubert[am__api_version='1.16'
36c43e99fdSEd Mastednl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37c43e99fdSEd Mastednl require some minimum version.  Point them to the right macro.
38*b50261e2SCy Schubertm4_if([$1], [1.16.2], [],
39c43e99fdSEd Maste      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40c43e99fdSEd Maste])
41c43e99fdSEd Maste
42c43e99fdSEd Maste# _AM_AUTOCONF_VERSION(VERSION)
43c43e99fdSEd Maste# -----------------------------
44c43e99fdSEd Maste# aclocal traces this macro to find the Autoconf version.
45c43e99fdSEd Maste# This is a private macro too.  Using m4_define simplifies
46c43e99fdSEd Maste# the logic in aclocal, which can simply ignore this definition.
47c43e99fdSEd Mastem4_define([_AM_AUTOCONF_VERSION], [])
48c43e99fdSEd Maste
49c43e99fdSEd Maste# AM_SET_CURRENT_AUTOMAKE_VERSION
50c43e99fdSEd Maste# -------------------------------
51c43e99fdSEd Maste# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52c43e99fdSEd Maste# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53c43e99fdSEd MasteAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54*b50261e2SCy Schubert[AM_AUTOMAKE_VERSION([1.16.2])dnl
55c43e99fdSEd Mastem4_ifndef([AC_AUTOCONF_VERSION],
56c43e99fdSEd Maste  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57c43e99fdSEd Maste_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58c43e99fdSEd Maste
59c43e99fdSEd Maste# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60c43e99fdSEd Maste
61*b50261e2SCy Schubert# Copyright (C) 2001-2020 Free Software Foundation, Inc.
62c43e99fdSEd Maste#
63c43e99fdSEd Maste# This file is free software; the Free Software Foundation
64c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
65c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
66c43e99fdSEd Maste
67c43e99fdSEd Maste# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68c43e99fdSEd Maste# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
69c43e99fdSEd Maste# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70c43e99fdSEd Maste#
71c43e99fdSEd Maste# Of course, Automake must honor this variable whenever it calls a
72c43e99fdSEd Maste# tool from the auxiliary directory.  The problem is that $srcdir (and
73c43e99fdSEd Maste# therefore $ac_aux_dir as well) can be either absolute or relative,
74c43e99fdSEd Maste# depending on how configure is run.  This is pretty annoying, since
75c43e99fdSEd Maste# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76c43e99fdSEd Maste# source directory, any form will work fine, but in subdirectories a
77c43e99fdSEd Maste# relative path needs to be adjusted first.
78c43e99fdSEd Maste#
79c43e99fdSEd Maste# $ac_aux_dir/missing
80c43e99fdSEd Maste#    fails when called from a subdirectory if $ac_aux_dir is relative
81c43e99fdSEd Maste# $top_srcdir/$ac_aux_dir/missing
82c43e99fdSEd Maste#    fails if $ac_aux_dir is absolute,
83c43e99fdSEd Maste#    fails when called from a subdirectory in a VPATH build with
84c43e99fdSEd Maste#          a relative $ac_aux_dir
85c43e99fdSEd Maste#
86c43e99fdSEd Maste# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87c43e99fdSEd Maste# are both prefixed by $srcdir.  In an in-source build this is usually
88c43e99fdSEd Maste# harmless because $srcdir is '.', but things will broke when you
89c43e99fdSEd Maste# start a VPATH build or use an absolute $srcdir.
90c43e99fdSEd Maste#
91c43e99fdSEd Maste# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92c43e99fdSEd Maste# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93c43e99fdSEd Maste#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94c43e99fdSEd Maste# and then we would define $MISSING as
95c43e99fdSEd Maste#   MISSING="\${SHELL} $am_aux_dir/missing"
96c43e99fdSEd Maste# This will work as long as MISSING is not called from configure, because
97c43e99fdSEd Maste# unfortunately $(top_srcdir) has no meaning in configure.
98c43e99fdSEd Maste# However there are other variables, like CC, which are often used in
99c43e99fdSEd Maste# configure, and could therefore not use this "fixed" $ac_aux_dir.
100c43e99fdSEd Maste#
101c43e99fdSEd Maste# Another solution, used here, is to always expand $ac_aux_dir to an
102c43e99fdSEd Maste# absolute PATH.  The drawback is that using absolute paths prevent a
103c43e99fdSEd Maste# configured tree to be moved without reconfiguration.
104c43e99fdSEd Maste
105c43e99fdSEd MasteAC_DEFUN([AM_AUX_DIR_EXPAND],
106c43e99fdSEd Maste[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
107c43e99fdSEd Maste# Expand $ac_aux_dir to an absolute path.
108c43e99fdSEd Masteam_aux_dir=`cd "$ac_aux_dir" && pwd`
109c43e99fdSEd Maste])
110c43e99fdSEd Maste
111c43e99fdSEd Maste# AM_CONDITIONAL                                            -*- Autoconf -*-
112c43e99fdSEd Maste
113*b50261e2SCy Schubert# Copyright (C) 1997-2020 Free Software Foundation, Inc.
114c43e99fdSEd Maste#
115c43e99fdSEd Maste# This file is free software; the Free Software Foundation
116c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
117c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
118c43e99fdSEd Maste
119c43e99fdSEd Maste# AM_CONDITIONAL(NAME, SHELL-CONDITION)
120c43e99fdSEd Maste# -------------------------------------
121c43e99fdSEd Maste# Define a conditional.
122c43e99fdSEd MasteAC_DEFUN([AM_CONDITIONAL],
123c43e99fdSEd Maste[AC_PREREQ([2.52])dnl
124c43e99fdSEd Maste m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
125c43e99fdSEd Maste       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
126c43e99fdSEd MasteAC_SUBST([$1_TRUE])dnl
127c43e99fdSEd MasteAC_SUBST([$1_FALSE])dnl
128c43e99fdSEd Maste_AM_SUBST_NOTMAKE([$1_TRUE])dnl
129c43e99fdSEd Maste_AM_SUBST_NOTMAKE([$1_FALSE])dnl
130c43e99fdSEd Mastem4_define([_AM_COND_VALUE_$1], [$2])dnl
131c43e99fdSEd Masteif $2; then
132c43e99fdSEd Maste  $1_TRUE=
133c43e99fdSEd Maste  $1_FALSE='#'
134c43e99fdSEd Masteelse
135c43e99fdSEd Maste  $1_TRUE='#'
136c43e99fdSEd Maste  $1_FALSE=
137c43e99fdSEd Mastefi
138c43e99fdSEd MasteAC_CONFIG_COMMANDS_PRE(
139c43e99fdSEd Maste[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
140c43e99fdSEd Maste  AC_MSG_ERROR([[conditional "$1" was never defined.
141c43e99fdSEd MasteUsually this means the macro was only invoked conditionally.]])
142c43e99fdSEd Mastefi])])
143c43e99fdSEd Maste
144*b50261e2SCy Schubert# Copyright (C) 1999-2020 Free Software Foundation, Inc.
145c43e99fdSEd Maste#
146c43e99fdSEd Maste# This file is free software; the Free Software Foundation
147c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
148c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
149c43e99fdSEd Maste
150c43e99fdSEd Maste
151c43e99fdSEd Maste# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
152c43e99fdSEd Maste# written in clear, in which case automake, when reading aclocal.m4,
153c43e99fdSEd Maste# will think it sees a *use*, and therefore will trigger all it's
154c43e99fdSEd Maste# C support machinery.  Also note that it means that autoscan, seeing
155c43e99fdSEd Maste# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
156c43e99fdSEd Maste
157c43e99fdSEd Maste
158c43e99fdSEd Maste# _AM_DEPENDENCIES(NAME)
159c43e99fdSEd Maste# ----------------------
160c43e99fdSEd Maste# See how the compiler implements dependency checking.
161c43e99fdSEd Maste# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
162c43e99fdSEd Maste# We try a few techniques and use that to set a single cache variable.
163c43e99fdSEd Maste#
164c43e99fdSEd Maste# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
165c43e99fdSEd Maste# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
166c43e99fdSEd Maste# dependency, and given that the user is not expected to run this macro,
167c43e99fdSEd Maste# just rely on AC_PROG_CC.
168c43e99fdSEd MasteAC_DEFUN([_AM_DEPENDENCIES],
169c43e99fdSEd Maste[AC_REQUIRE([AM_SET_DEPDIR])dnl
170c43e99fdSEd MasteAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
171c43e99fdSEd MasteAC_REQUIRE([AM_MAKE_INCLUDE])dnl
172c43e99fdSEd MasteAC_REQUIRE([AM_DEP_TRACK])dnl
173c43e99fdSEd Maste
174c43e99fdSEd Mastem4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
175c43e99fdSEd Maste      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
176c43e99fdSEd Maste      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
177c43e99fdSEd Maste      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
178c43e99fdSEd Maste      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
179c43e99fdSEd Maste      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
180c43e99fdSEd Maste                    [depcc="$$1"   am_compiler_list=])
181c43e99fdSEd Maste
182c43e99fdSEd MasteAC_CACHE_CHECK([dependency style of $depcc],
183c43e99fdSEd Maste               [am_cv_$1_dependencies_compiler_type],
184c43e99fdSEd Maste[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
185c43e99fdSEd Maste  # We make a subdir and do the tests there.  Otherwise we can end up
186c43e99fdSEd Maste  # making bogus files that we don't know about and never remove.  For
187c43e99fdSEd Maste  # instance it was reported that on HP-UX the gcc test will end up
188c43e99fdSEd Maste  # making a dummy file named 'D' -- because '-MD' means "put the output
189c43e99fdSEd Maste  # in D".
190c43e99fdSEd Maste  rm -rf conftest.dir
191c43e99fdSEd Maste  mkdir conftest.dir
192c43e99fdSEd Maste  # Copy depcomp to subdir because otherwise we won't find it if we're
193c43e99fdSEd Maste  # using a relative directory.
194c43e99fdSEd Maste  cp "$am_depcomp" conftest.dir
195c43e99fdSEd Maste  cd conftest.dir
196c43e99fdSEd Maste  # We will build objects and dependencies in a subdirectory because
197c43e99fdSEd Maste  # it helps to detect inapplicable dependency modes.  For instance
198c43e99fdSEd Maste  # both Tru64's cc and ICC support -MD to output dependencies as a
199c43e99fdSEd Maste  # side effect of compilation, but ICC will put the dependencies in
200c43e99fdSEd Maste  # the current directory while Tru64 will put them in the object
201c43e99fdSEd Maste  # directory.
202c43e99fdSEd Maste  mkdir sub
203c43e99fdSEd Maste
204c43e99fdSEd Maste  am_cv_$1_dependencies_compiler_type=none
205c43e99fdSEd Maste  if test "$am_compiler_list" = ""; then
206c43e99fdSEd Maste     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
207c43e99fdSEd Maste  fi
208c43e99fdSEd Maste  am__universal=false
209c43e99fdSEd Maste  m4_case([$1], [CC],
210c43e99fdSEd Maste    [case " $depcc " in #(
211c43e99fdSEd Maste     *\ -arch\ *\ -arch\ *) am__universal=true ;;
212c43e99fdSEd Maste     esac],
213c43e99fdSEd Maste    [CXX],
214c43e99fdSEd Maste    [case " $depcc " in #(
215c43e99fdSEd Maste     *\ -arch\ *\ -arch\ *) am__universal=true ;;
216c43e99fdSEd Maste     esac])
217c43e99fdSEd Maste
218c43e99fdSEd Maste  for depmode in $am_compiler_list; do
219c43e99fdSEd Maste    # Setup a source with many dependencies, because some compilers
220c43e99fdSEd Maste    # like to wrap large dependency lists on column 80 (with \), and
221c43e99fdSEd Maste    # we should not choose a depcomp mode which is confused by this.
222c43e99fdSEd Maste    #
223c43e99fdSEd Maste    # We need to recreate these files for each test, as the compiler may
224c43e99fdSEd Maste    # overwrite some of them when testing with obscure command lines.
225c43e99fdSEd Maste    # This happens at least with the AIX C compiler.
226c43e99fdSEd Maste    : > sub/conftest.c
227c43e99fdSEd Maste    for i in 1 2 3 4 5 6; do
228c43e99fdSEd Maste      echo '#include "conftst'$i'.h"' >> sub/conftest.c
229c43e99fdSEd Maste      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
230c43e99fdSEd Maste      # Solaris 10 /bin/sh.
231c43e99fdSEd Maste      echo '/* dummy */' > sub/conftst$i.h
232c43e99fdSEd Maste    done
233c43e99fdSEd Maste    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
234c43e99fdSEd Maste
235c43e99fdSEd Maste    # We check with '-c' and '-o' for the sake of the "dashmstdout"
236c43e99fdSEd Maste    # mode.  It turns out that the SunPro C++ compiler does not properly
237c43e99fdSEd Maste    # handle '-M -o', and we need to detect this.  Also, some Intel
238c43e99fdSEd Maste    # versions had trouble with output in subdirs.
239c43e99fdSEd Maste    am__obj=sub/conftest.${OBJEXT-o}
240c43e99fdSEd Maste    am__minus_obj="-o $am__obj"
241c43e99fdSEd Maste    case $depmode in
242c43e99fdSEd Maste    gcc)
243c43e99fdSEd Maste      # This depmode causes a compiler race in universal mode.
244c43e99fdSEd Maste      test "$am__universal" = false || continue
245c43e99fdSEd Maste      ;;
246c43e99fdSEd Maste    nosideeffect)
247c43e99fdSEd Maste      # After this tag, mechanisms are not by side-effect, so they'll
248c43e99fdSEd Maste      # only be used when explicitly requested.
249c43e99fdSEd Maste      if test "x$enable_dependency_tracking" = xyes; then
250c43e99fdSEd Maste	continue
251c43e99fdSEd Maste      else
252c43e99fdSEd Maste	break
253c43e99fdSEd Maste      fi
254c43e99fdSEd Maste      ;;
255c43e99fdSEd Maste    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
256c43e99fdSEd Maste      # This compiler won't grok '-c -o', but also, the minuso test has
257c43e99fdSEd Maste      # not run yet.  These depmodes are late enough in the game, and
258c43e99fdSEd Maste      # so weak that their functioning should not be impacted.
259c43e99fdSEd Maste      am__obj=conftest.${OBJEXT-o}
260c43e99fdSEd Maste      am__minus_obj=
261c43e99fdSEd Maste      ;;
262c43e99fdSEd Maste    none) break ;;
263c43e99fdSEd Maste    esac
264c43e99fdSEd Maste    if depmode=$depmode \
265c43e99fdSEd Maste       source=sub/conftest.c object=$am__obj \
266c43e99fdSEd Maste       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
267c43e99fdSEd Maste       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
268c43e99fdSEd Maste         >/dev/null 2>conftest.err &&
269c43e99fdSEd Maste       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
270c43e99fdSEd Maste       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
271c43e99fdSEd Maste       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
272c43e99fdSEd Maste       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
273c43e99fdSEd Maste      # icc doesn't choke on unknown options, it will just issue warnings
274c43e99fdSEd Maste      # or remarks (even with -Werror).  So we grep stderr for any message
275c43e99fdSEd Maste      # that says an option was ignored or not supported.
276c43e99fdSEd Maste      # When given -MP, icc 7.0 and 7.1 complain thusly:
277c43e99fdSEd Maste      #   icc: Command line warning: ignoring option '-M'; no argument required
278c43e99fdSEd Maste      # The diagnosis changed in icc 8.0:
279c43e99fdSEd Maste      #   icc: Command line remark: option '-MP' not supported
280c43e99fdSEd Maste      if (grep 'ignoring option' conftest.err ||
281c43e99fdSEd Maste          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
282c43e99fdSEd Maste        am_cv_$1_dependencies_compiler_type=$depmode
283c43e99fdSEd Maste        break
284c43e99fdSEd Maste      fi
285c43e99fdSEd Maste    fi
286c43e99fdSEd Maste  done
287c43e99fdSEd Maste
288c43e99fdSEd Maste  cd ..
289c43e99fdSEd Maste  rm -rf conftest.dir
290c43e99fdSEd Masteelse
291c43e99fdSEd Maste  am_cv_$1_dependencies_compiler_type=none
292c43e99fdSEd Mastefi
293c43e99fdSEd Maste])
294c43e99fdSEd MasteAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
295c43e99fdSEd MasteAM_CONDITIONAL([am__fastdep$1], [
296c43e99fdSEd Maste  test "x$enable_dependency_tracking" != xno \
297c43e99fdSEd Maste  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
298c43e99fdSEd Maste])
299c43e99fdSEd Maste
300c43e99fdSEd Maste
301c43e99fdSEd Maste# AM_SET_DEPDIR
302c43e99fdSEd Maste# -------------
303c43e99fdSEd Maste# Choose a directory name for dependency files.
304c43e99fdSEd Maste# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
305c43e99fdSEd MasteAC_DEFUN([AM_SET_DEPDIR],
306c43e99fdSEd Maste[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
307c43e99fdSEd MasteAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
308c43e99fdSEd Maste])
309c43e99fdSEd Maste
310c43e99fdSEd Maste
311c43e99fdSEd Maste# AM_DEP_TRACK
312c43e99fdSEd Maste# ------------
313c43e99fdSEd MasteAC_DEFUN([AM_DEP_TRACK],
314c43e99fdSEd Maste[AC_ARG_ENABLE([dependency-tracking], [dnl
315c43e99fdSEd MasteAS_HELP_STRING(
316c43e99fdSEd Maste  [--enable-dependency-tracking],
317c43e99fdSEd Maste  [do not reject slow dependency extractors])
318c43e99fdSEd MasteAS_HELP_STRING(
319c43e99fdSEd Maste  [--disable-dependency-tracking],
320c43e99fdSEd Maste  [speeds up one-time build])])
321c43e99fdSEd Masteif test "x$enable_dependency_tracking" != xno; then
322c43e99fdSEd Maste  am_depcomp="$ac_aux_dir/depcomp"
323c43e99fdSEd Maste  AMDEPBACKSLASH='\'
324c43e99fdSEd Maste  am__nodep='_no'
325c43e99fdSEd Mastefi
326c43e99fdSEd MasteAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
327c43e99fdSEd MasteAC_SUBST([AMDEPBACKSLASH])dnl
328c43e99fdSEd Maste_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329c43e99fdSEd MasteAC_SUBST([am__nodep])dnl
330c43e99fdSEd Maste_AM_SUBST_NOTMAKE([am__nodep])dnl
331c43e99fdSEd Maste])
332c43e99fdSEd Maste
333c43e99fdSEd Maste# Generate code to set up dependency tracking.              -*- Autoconf -*-
334c43e99fdSEd Maste
335*b50261e2SCy Schubert# Copyright (C) 1999-2020 Free Software Foundation, Inc.
336c43e99fdSEd Maste#
337c43e99fdSEd Maste# This file is free software; the Free Software Foundation
338c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
339c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
340c43e99fdSEd Maste
341c43e99fdSEd Maste# _AM_OUTPUT_DEPENDENCY_COMMANDS
342c43e99fdSEd Maste# ------------------------------
343c43e99fdSEd MasteAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344c43e99fdSEd Maste[{
345c43e99fdSEd Maste  # Older Autoconf quotes --file arguments for eval, but not when files
346c43e99fdSEd Maste  # are listed without --file.  Let's play safe and only enable the eval
347c43e99fdSEd Maste  # if we detect the quoting.
348*b50261e2SCy Schubert  # TODO: see whether this extra hack can be removed once we start
349*b50261e2SCy Schubert  # requiring Autoconf 2.70 or later.
350*b50261e2SCy Schubert  AS_CASE([$CONFIG_FILES],
351*b50261e2SCy Schubert          [*\'*], [eval set x "$CONFIG_FILES"],
352*b50261e2SCy Schubert          [*], [set x $CONFIG_FILES])
353c43e99fdSEd Maste  shift
354*b50261e2SCy Schubert  # Used to flag and report bootstrapping failures.
355*b50261e2SCy Schubert  am_rc=0
356*b50261e2SCy Schubert  for am_mf
357c43e99fdSEd Maste  do
358c43e99fdSEd Maste    # Strip MF so we end up with the name of the file.
359*b50261e2SCy Schubert    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
360*b50261e2SCy Schubert    # Check whether this is an Automake generated Makefile which includes
361*b50261e2SCy Schubert    # dependency-tracking related rules and includes.
362*b50261e2SCy Schubert    # Grep'ing the whole file directly is not great: AIX grep has a line
363c43e99fdSEd Maste    # limit of 2048, but all sed's we know have understand at least 4000.
364*b50261e2SCy Schubert    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
365*b50261e2SCy Schubert      || continue
366*b50261e2SCy Schubert    am_dirpart=`AS_DIRNAME(["$am_mf"])`
367*b50261e2SCy Schubert    am_filepart=`AS_BASENAME(["$am_mf"])`
368*b50261e2SCy Schubert    AM_RUN_LOG([cd "$am_dirpart" \
369*b50261e2SCy Schubert      && sed -e '/# am--include-marker/d' "$am_filepart" \
370*b50261e2SCy Schubert        | $MAKE -f - am--depfiles]) || am_rc=$?
371*b50261e2SCy Schubert  done
372*b50261e2SCy Schubert  if test $am_rc -ne 0; then
373*b50261e2SCy Schubert    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
374*b50261e2SCy Schubert    for automatic dependency tracking.  If GNU make was not used, consider
375*b50261e2SCy Schubert    re-running the configure script with MAKE="gmake" (or whatever is
376*b50261e2SCy Schubert    necessary).  You can also try re-running configure with the
377*b50261e2SCy Schubert    '--disable-dependency-tracking' option to at least be able to build
378*b50261e2SCy Schubert    the package (albeit without support for automatic dependency tracking).])
379c43e99fdSEd Maste  fi
380*b50261e2SCy Schubert  AS_UNSET([am_dirpart])
381*b50261e2SCy Schubert  AS_UNSET([am_filepart])
382*b50261e2SCy Schubert  AS_UNSET([am_mf])
383*b50261e2SCy Schubert  AS_UNSET([am_rc])
384*b50261e2SCy Schubert  rm -f conftest-deps.mk
385c43e99fdSEd Maste}
386c43e99fdSEd Maste])# _AM_OUTPUT_DEPENDENCY_COMMANDS
387c43e99fdSEd Maste
388c43e99fdSEd Maste
389c43e99fdSEd Maste# AM_OUTPUT_DEPENDENCY_COMMANDS
390c43e99fdSEd Maste# -----------------------------
391c43e99fdSEd Maste# This macro should only be invoked once -- use via AC_REQUIRE.
392c43e99fdSEd Maste#
393*b50261e2SCy Schubert# This code is only required when automatic dependency tracking is enabled.
394*b50261e2SCy Schubert# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
395*b50261e2SCy Schubert# order to bootstrap the dependency handling code.
396c43e99fdSEd MasteAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
397c43e99fdSEd Maste[AC_CONFIG_COMMANDS([depfiles],
398c43e99fdSEd Maste     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
399*b50261e2SCy Schubert     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
400c43e99fdSEd Maste
401c43e99fdSEd Maste# Do all the work for Automake.                             -*- Autoconf -*-
402c43e99fdSEd Maste
403*b50261e2SCy Schubert# Copyright (C) 1996-2020 Free Software Foundation, Inc.
404c43e99fdSEd Maste#
405c43e99fdSEd Maste# This file is free software; the Free Software Foundation
406c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
407c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
408c43e99fdSEd Maste
409c43e99fdSEd Maste# This macro actually does too much.  Some checks are only needed if
410c43e99fdSEd Maste# your package does certain things.  But this isn't really a big deal.
411c43e99fdSEd Maste
412c43e99fdSEd Mastednl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
413c43e99fdSEd Mastem4_define([AC_PROG_CC],
414c43e99fdSEd Mastem4_defn([AC_PROG_CC])
415c43e99fdSEd Maste[_AM_PROG_CC_C_O
416c43e99fdSEd Maste])
417c43e99fdSEd Maste
418c43e99fdSEd Maste# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
419c43e99fdSEd Maste# AM_INIT_AUTOMAKE([OPTIONS])
420c43e99fdSEd Maste# -----------------------------------------------
421c43e99fdSEd Maste# The call with PACKAGE and VERSION arguments is the old style
422c43e99fdSEd Maste# call (pre autoconf-2.50), which is being phased out.  PACKAGE
423c43e99fdSEd Maste# and VERSION should now be passed to AC_INIT and removed from
424c43e99fdSEd Maste# the call to AM_INIT_AUTOMAKE.
425c43e99fdSEd Maste# We support both call styles for the transition.  After
426c43e99fdSEd Maste# the next Automake release, Autoconf can make the AC_INIT
427c43e99fdSEd Maste# arguments mandatory, and then we can depend on a new Autoconf
428c43e99fdSEd Maste# release and drop the old call support.
429c43e99fdSEd MasteAC_DEFUN([AM_INIT_AUTOMAKE],
430c43e99fdSEd Maste[AC_PREREQ([2.65])dnl
431c43e99fdSEd Mastednl Autoconf wants to disallow AM_ names.  We explicitly allow
432c43e99fdSEd Mastednl the ones we care about.
433c43e99fdSEd Mastem4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
434c43e99fdSEd MasteAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
435c43e99fdSEd MasteAC_REQUIRE([AC_PROG_INSTALL])dnl
436c43e99fdSEd Masteif test "`cd $srcdir && pwd`" != "`pwd`"; then
437c43e99fdSEd Maste  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
438c43e99fdSEd Maste  # is not polluted with repeated "-I."
439c43e99fdSEd Maste  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
440c43e99fdSEd Maste  # test to see if srcdir already configured
441c43e99fdSEd Maste  if test -f $srcdir/config.status; then
442c43e99fdSEd Maste    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
443c43e99fdSEd Maste  fi
444c43e99fdSEd Mastefi
445c43e99fdSEd Maste
446c43e99fdSEd Maste# test whether we have cygpath
447c43e99fdSEd Masteif test -z "$CYGPATH_W"; then
448c43e99fdSEd Maste  if (cygpath --version) >/dev/null 2>/dev/null; then
449c43e99fdSEd Maste    CYGPATH_W='cygpath -w'
450c43e99fdSEd Maste  else
451c43e99fdSEd Maste    CYGPATH_W=echo
452c43e99fdSEd Maste  fi
453c43e99fdSEd Mastefi
454c43e99fdSEd MasteAC_SUBST([CYGPATH_W])
455c43e99fdSEd Maste
456c43e99fdSEd Maste# Define the identity of the package.
457c43e99fdSEd Mastednl Distinguish between old-style and new-style calls.
458c43e99fdSEd Mastem4_ifval([$2],
459c43e99fdSEd Maste[AC_DIAGNOSE([obsolete],
460c43e99fdSEd Maste             [$0: two- and three-arguments forms are deprecated.])
461c43e99fdSEd Mastem4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
462c43e99fdSEd Maste AC_SUBST([PACKAGE], [$1])dnl
463c43e99fdSEd Maste AC_SUBST([VERSION], [$2])],
464c43e99fdSEd Maste[_AM_SET_OPTIONS([$1])dnl
465c43e99fdSEd Mastednl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
466c43e99fdSEd Mastem4_if(
467c43e99fdSEd Maste  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
468c43e99fdSEd Maste  [ok:ok],,
469c43e99fdSEd Maste  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
470c43e99fdSEd Maste AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
471c43e99fdSEd Maste AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
472c43e99fdSEd Maste
473c43e99fdSEd Maste_AM_IF_OPTION([no-define],,
474c43e99fdSEd Maste[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
475c43e99fdSEd Maste AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
476c43e99fdSEd Maste
477c43e99fdSEd Maste# Some tools Automake needs.
478c43e99fdSEd MasteAC_REQUIRE([AM_SANITY_CHECK])dnl
479c43e99fdSEd MasteAC_REQUIRE([AC_ARG_PROGRAM])dnl
480c43e99fdSEd MasteAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
481c43e99fdSEd MasteAM_MISSING_PROG([AUTOCONF], [autoconf])
482c43e99fdSEd MasteAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
483c43e99fdSEd MasteAM_MISSING_PROG([AUTOHEADER], [autoheader])
484c43e99fdSEd MasteAM_MISSING_PROG([MAKEINFO], [makeinfo])
485c43e99fdSEd MasteAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
486c43e99fdSEd MasteAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
487c43e99fdSEd MasteAC_REQUIRE([AC_PROG_MKDIR_P])dnl
488c43e99fdSEd Maste# For better backward compatibility.  To be removed once Automake 1.9.x
489c43e99fdSEd Maste# dies out for good.  For more background, see:
490*b50261e2SCy Schubert# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
491*b50261e2SCy Schubert# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
492c43e99fdSEd MasteAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
493c43e99fdSEd Maste# We need awk for the "check" target (and possibly the TAP driver).  The
494c43e99fdSEd Maste# system "awk" is bad on some platforms.
495c43e99fdSEd MasteAC_REQUIRE([AC_PROG_AWK])dnl
496c43e99fdSEd MasteAC_REQUIRE([AC_PROG_MAKE_SET])dnl
497c43e99fdSEd MasteAC_REQUIRE([AM_SET_LEADING_DOT])dnl
498c43e99fdSEd Maste_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
499c43e99fdSEd Maste	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
500c43e99fdSEd Maste			     [_AM_PROG_TAR([v7])])])
501c43e99fdSEd Maste_AM_IF_OPTION([no-dependencies],,
502c43e99fdSEd Maste[AC_PROVIDE_IFELSE([AC_PROG_CC],
503c43e99fdSEd Maste		  [_AM_DEPENDENCIES([CC])],
504c43e99fdSEd Maste		  [m4_define([AC_PROG_CC],
505c43e99fdSEd Maste			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
506c43e99fdSEd MasteAC_PROVIDE_IFELSE([AC_PROG_CXX],
507c43e99fdSEd Maste		  [_AM_DEPENDENCIES([CXX])],
508c43e99fdSEd Maste		  [m4_define([AC_PROG_CXX],
509c43e99fdSEd Maste			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
510c43e99fdSEd MasteAC_PROVIDE_IFELSE([AC_PROG_OBJC],
511c43e99fdSEd Maste		  [_AM_DEPENDENCIES([OBJC])],
512c43e99fdSEd Maste		  [m4_define([AC_PROG_OBJC],
513c43e99fdSEd Maste			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
514c43e99fdSEd MasteAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
515c43e99fdSEd Maste		  [_AM_DEPENDENCIES([OBJCXX])],
516c43e99fdSEd Maste		  [m4_define([AC_PROG_OBJCXX],
517c43e99fdSEd Maste			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
518c43e99fdSEd Maste])
519c43e99fdSEd MasteAC_REQUIRE([AM_SILENT_RULES])dnl
520c43e99fdSEd Mastednl The testsuite driver may need to know about EXEEXT, so add the
521c43e99fdSEd Mastednl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
522c43e99fdSEd Mastednl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
523c43e99fdSEd MasteAC_CONFIG_COMMANDS_PRE(dnl
524c43e99fdSEd Maste[m4_provide_if([_AM_COMPILER_EXEEXT],
525c43e99fdSEd Maste  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
526c43e99fdSEd Maste
527c43e99fdSEd Maste# POSIX will say in a future version that running "rm -f" with no argument
528c43e99fdSEd Maste# is OK; and we want to be able to make that assumption in our Makefile
529c43e99fdSEd Maste# recipes.  So use an aggressive probe to check that the usage we want is
530c43e99fdSEd Maste# actually supported "in the wild" to an acceptable degree.
531c43e99fdSEd Maste# See automake bug#10828.
532c43e99fdSEd Maste# To make any issue more visible, cause the running configure to be aborted
533c43e99fdSEd Maste# by default if the 'rm' program in use doesn't match our expectations; the
534c43e99fdSEd Maste# user can still override this though.
535c43e99fdSEd Masteif rm -f && rm -fr && rm -rf; then : OK; else
536c43e99fdSEd Maste  cat >&2 <<'END'
537c43e99fdSEd MasteOops!
538c43e99fdSEd Maste
539c43e99fdSEd MasteYour 'rm' program seems unable to run without file operands specified
540c43e99fdSEd Masteon the command line, even when the '-f' option is present.  This is contrary
541c43e99fdSEd Masteto the behaviour of most rm programs out there, and not conforming with
542c43e99fdSEd Mastethe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
543c43e99fdSEd Maste
544c43e99fdSEd MastePlease tell bug-automake@gnu.org about your system, including the value
545c43e99fdSEd Masteof your $PATH and any error possibly output before this message.  This
546c43e99fdSEd Mastecan help us improve future automake versions.
547c43e99fdSEd Maste
548c43e99fdSEd MasteEND
549c43e99fdSEd Maste  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
550c43e99fdSEd Maste    echo 'Configuration will proceed anyway, since you have set the' >&2
551c43e99fdSEd Maste    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
552c43e99fdSEd Maste    echo >&2
553c43e99fdSEd Maste  else
554c43e99fdSEd Maste    cat >&2 <<'END'
555c43e99fdSEd MasteAborting the configuration process, to ensure you take notice of the issue.
556c43e99fdSEd Maste
557c43e99fdSEd MasteYou can download and install GNU coreutils to get an 'rm' implementation
558*b50261e2SCy Schubertthat behaves properly: <https://www.gnu.org/software/coreutils/>.
559c43e99fdSEd Maste
560c43e99fdSEd MasteIf you want to complete the configuration process using your problematic
561c43e99fdSEd Maste'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
562c43e99fdSEd Masteto "yes", and re-run configure.
563c43e99fdSEd Maste
564c43e99fdSEd MasteEND
565c43e99fdSEd Maste    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
566c43e99fdSEd Maste  fi
567c43e99fdSEd Mastefi
568c43e99fdSEd Mastednl The trailing newline in this macro's definition is deliberate, for
569c43e99fdSEd Mastednl backward compatibility and to allow trailing 'dnl'-style comments
570c43e99fdSEd Mastednl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
571c43e99fdSEd Maste])
572c43e99fdSEd Maste
573c43e99fdSEd Mastednl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
574c43e99fdSEd Mastednl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
575c43e99fdSEd Mastednl mangled by Autoconf and run in a shell conditional statement.
576c43e99fdSEd Mastem4_define([_AC_COMPILER_EXEEXT],
577c43e99fdSEd Mastem4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
578c43e99fdSEd Maste
579c43e99fdSEd Maste# When config.status generates a header, we must update the stamp-h file.
580c43e99fdSEd Maste# This file resides in the same directory as the config header
581c43e99fdSEd Maste# that is generated.  The stamp files are numbered to have different names.
582c43e99fdSEd Maste
583c43e99fdSEd Maste# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
584c43e99fdSEd Maste# loop where config.status creates the headers, so we can generate
585c43e99fdSEd Maste# our stamp files there.
586c43e99fdSEd MasteAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
587c43e99fdSEd Maste[# Compute $1's index in $config_headers.
588c43e99fdSEd Maste_am_arg=$1
589c43e99fdSEd Maste_am_stamp_count=1
590c43e99fdSEd Mastefor _am_header in $config_headers :; do
591c43e99fdSEd Maste  case $_am_header in
592c43e99fdSEd Maste    $_am_arg | $_am_arg:* )
593c43e99fdSEd Maste      break ;;
594c43e99fdSEd Maste    * )
595c43e99fdSEd Maste      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
596c43e99fdSEd Maste  esac
597c43e99fdSEd Mastedone
598c43e99fdSEd Masteecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
599c43e99fdSEd Maste
600*b50261e2SCy Schubert# Copyright (C) 2001-2020 Free Software Foundation, Inc.
601c43e99fdSEd Maste#
602c43e99fdSEd Maste# This file is free software; the Free Software Foundation
603c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
604c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
605c43e99fdSEd Maste
606c43e99fdSEd Maste# AM_PROG_INSTALL_SH
607c43e99fdSEd Maste# ------------------
608c43e99fdSEd Maste# Define $install_sh.
609c43e99fdSEd MasteAC_DEFUN([AM_PROG_INSTALL_SH],
610c43e99fdSEd Maste[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
611c43e99fdSEd Masteif test x"${install_sh+set}" != xset; then
612c43e99fdSEd Maste  case $am_aux_dir in
613c43e99fdSEd Maste  *\ * | *\	*)
614c43e99fdSEd Maste    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
615c43e99fdSEd Maste  *)
616c43e99fdSEd Maste    install_sh="\${SHELL} $am_aux_dir/install-sh"
617c43e99fdSEd Maste  esac
618c43e99fdSEd Mastefi
619c43e99fdSEd MasteAC_SUBST([install_sh])])
620c43e99fdSEd Maste
621*b50261e2SCy Schubert# Copyright (C) 2003-2020 Free Software Foundation, Inc.
622c43e99fdSEd Maste#
623c43e99fdSEd Maste# This file is free software; the Free Software Foundation
624c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
625c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
626c43e99fdSEd Maste
627c43e99fdSEd Maste# Check whether the underlying file-system supports filenames
628c43e99fdSEd Maste# with a leading dot.  For instance MS-DOS doesn't.
629c43e99fdSEd MasteAC_DEFUN([AM_SET_LEADING_DOT],
630c43e99fdSEd Maste[rm -rf .tst 2>/dev/null
631c43e99fdSEd Mastemkdir .tst 2>/dev/null
632c43e99fdSEd Masteif test -d .tst; then
633c43e99fdSEd Maste  am__leading_dot=.
634c43e99fdSEd Masteelse
635c43e99fdSEd Maste  am__leading_dot=_
636c43e99fdSEd Mastefi
637c43e99fdSEd Mastermdir .tst 2>/dev/null
638c43e99fdSEd MasteAC_SUBST([am__leading_dot])])
639c43e99fdSEd Maste
640c43e99fdSEd Maste# Check to see how 'make' treats includes.	            -*- Autoconf -*-
641c43e99fdSEd Maste
642*b50261e2SCy Schubert# Copyright (C) 2001-2020 Free Software Foundation, Inc.
643c43e99fdSEd Maste#
644c43e99fdSEd Maste# This file is free software; the Free Software Foundation
645c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
646c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
647c43e99fdSEd Maste
648c43e99fdSEd Maste# AM_MAKE_INCLUDE()
649c43e99fdSEd Maste# -----------------
650*b50261e2SCy Schubert# Check whether make has an 'include' directive that can support all
651*b50261e2SCy Schubert# the idioms we need for our automatic dependency tracking code.
652c43e99fdSEd MasteAC_DEFUN([AM_MAKE_INCLUDE],
653*b50261e2SCy Schubert[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
654*b50261e2SCy Schubertcat > confinc.mk << 'END'
655c43e99fdSEd Masteam__doit:
656*b50261e2SCy Schubert	@echo this is the am__doit target >confinc.out
657c43e99fdSEd Maste.PHONY: am__doit
658c43e99fdSEd MasteEND
659c43e99fdSEd Masteam__include="#"
660c43e99fdSEd Masteam__quote=
661*b50261e2SCy Schubert# BSD make does it like this.
662*b50261e2SCy Schubertecho '.include "confinc.mk" # ignored' > confmf.BSD
663*b50261e2SCy Schubert# Other make implementations (GNU, Solaris 10, AIX) do it like this.
664*b50261e2SCy Schubertecho 'include confinc.mk # ignored' > confmf.GNU
665*b50261e2SCy Schubert_am_result=no
666*b50261e2SCy Schubertfor s in GNU BSD; do
667*b50261e2SCy Schubert  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
668*b50261e2SCy Schubert  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
669*b50261e2SCy Schubert      ['0:this is the am__doit target'],
670*b50261e2SCy Schubert      [AS_CASE([$s],
671*b50261e2SCy Schubert          [BSD], [am__include='.include' am__quote='"'],
672*b50261e2SCy Schubert          [am__include='include' am__quote=''])])
673*b50261e2SCy Schubert  if test "$am__include" != "#"; then
674*b50261e2SCy Schubert    _am_result="yes ($s style)"
675*b50261e2SCy Schubert    break
676c43e99fdSEd Maste  fi
677*b50261e2SCy Schubertdone
678*b50261e2SCy Schubertrm -f confinc.* confmf.*
679*b50261e2SCy SchubertAC_MSG_RESULT([${_am_result}])
680*b50261e2SCy SchubertAC_SUBST([am__include])])
681*b50261e2SCy SchubertAC_SUBST([am__quote])])
682c43e99fdSEd Maste
683c43e99fdSEd Maste# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
684c43e99fdSEd Maste
685*b50261e2SCy Schubert# Copyright (C) 1997-2020 Free Software Foundation, Inc.
686c43e99fdSEd Maste#
687c43e99fdSEd Maste# This file is free software; the Free Software Foundation
688c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
689c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
690c43e99fdSEd Maste
691c43e99fdSEd Maste# AM_MISSING_PROG(NAME, PROGRAM)
692c43e99fdSEd Maste# ------------------------------
693c43e99fdSEd MasteAC_DEFUN([AM_MISSING_PROG],
694c43e99fdSEd Maste[AC_REQUIRE([AM_MISSING_HAS_RUN])
695c43e99fdSEd Maste$1=${$1-"${am_missing_run}$2"}
696c43e99fdSEd MasteAC_SUBST($1)])
697c43e99fdSEd Maste
698c43e99fdSEd Maste# AM_MISSING_HAS_RUN
699c43e99fdSEd Maste# ------------------
700c43e99fdSEd Maste# Define MISSING if not defined so far and test if it is modern enough.
701c43e99fdSEd Maste# If it is, set am_missing_run to use it, otherwise, to nothing.
702c43e99fdSEd MasteAC_DEFUN([AM_MISSING_HAS_RUN],
703c43e99fdSEd Maste[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
704c43e99fdSEd MasteAC_REQUIRE_AUX_FILE([missing])dnl
705c43e99fdSEd Masteif test x"${MISSING+set}" != xset; then
706c43e99fdSEd Maste  case $am_aux_dir in
707c43e99fdSEd Maste  *\ * | *\	*)
708c43e99fdSEd Maste    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
709c43e99fdSEd Maste  *)
710c43e99fdSEd Maste    MISSING="\${SHELL} $am_aux_dir/missing" ;;
711c43e99fdSEd Maste  esac
712c43e99fdSEd Mastefi
713c43e99fdSEd Maste# Use eval to expand $SHELL
714c43e99fdSEd Masteif eval "$MISSING --is-lightweight"; then
715c43e99fdSEd Maste  am_missing_run="$MISSING "
716c43e99fdSEd Masteelse
717c43e99fdSEd Maste  am_missing_run=
718c43e99fdSEd Maste  AC_MSG_WARN(['missing' script is too old or missing])
719c43e99fdSEd Mastefi
720c43e99fdSEd Maste])
721c43e99fdSEd Maste
722c43e99fdSEd Maste# Helper functions for option handling.                     -*- Autoconf -*-
723c43e99fdSEd Maste
724*b50261e2SCy Schubert# Copyright (C) 2001-2020 Free Software Foundation, Inc.
725c43e99fdSEd Maste#
726c43e99fdSEd Maste# This file is free software; the Free Software Foundation
727c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
728c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
729c43e99fdSEd Maste
730c43e99fdSEd Maste# _AM_MANGLE_OPTION(NAME)
731c43e99fdSEd Maste# -----------------------
732c43e99fdSEd MasteAC_DEFUN([_AM_MANGLE_OPTION],
733c43e99fdSEd Maste[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
734c43e99fdSEd Maste
735c43e99fdSEd Maste# _AM_SET_OPTION(NAME)
736c43e99fdSEd Maste# --------------------
737c43e99fdSEd Maste# Set option NAME.  Presently that only means defining a flag for this option.
738c43e99fdSEd MasteAC_DEFUN([_AM_SET_OPTION],
739c43e99fdSEd Maste[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
740c43e99fdSEd Maste
741c43e99fdSEd Maste# _AM_SET_OPTIONS(OPTIONS)
742c43e99fdSEd Maste# ------------------------
743c43e99fdSEd Maste# OPTIONS is a space-separated list of Automake options.
744c43e99fdSEd MasteAC_DEFUN([_AM_SET_OPTIONS],
745c43e99fdSEd Maste[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
746c43e99fdSEd Maste
747c43e99fdSEd Maste# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
748c43e99fdSEd Maste# -------------------------------------------
749c43e99fdSEd Maste# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
750c43e99fdSEd MasteAC_DEFUN([_AM_IF_OPTION],
751c43e99fdSEd Maste[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
752c43e99fdSEd Maste
753*b50261e2SCy Schubert# Copyright (C) 1999-2020 Free Software Foundation, Inc.
754c43e99fdSEd Maste#
755c43e99fdSEd Maste# This file is free software; the Free Software Foundation
756c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
757c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
758c43e99fdSEd Maste
759c43e99fdSEd Maste# _AM_PROG_CC_C_O
760c43e99fdSEd Maste# ---------------
761c43e99fdSEd Maste# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
762c43e99fdSEd Maste# to automatically call this.
763c43e99fdSEd MasteAC_DEFUN([_AM_PROG_CC_C_O],
764c43e99fdSEd Maste[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
765c43e99fdSEd MasteAC_REQUIRE_AUX_FILE([compile])dnl
766c43e99fdSEd MasteAC_LANG_PUSH([C])dnl
767c43e99fdSEd MasteAC_CACHE_CHECK(
768c43e99fdSEd Maste  [whether $CC understands -c and -o together],
769c43e99fdSEd Maste  [am_cv_prog_cc_c_o],
770c43e99fdSEd Maste  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
771c43e99fdSEd Maste  # Make sure it works both with $CC and with simple cc.
772c43e99fdSEd Maste  # Following AC_PROG_CC_C_O, we do the test twice because some
773c43e99fdSEd Maste  # compilers refuse to overwrite an existing .o file with -o,
774c43e99fdSEd Maste  # though they will create one.
775c43e99fdSEd Maste  am_cv_prog_cc_c_o=yes
776c43e99fdSEd Maste  for am_i in 1 2; do
777c43e99fdSEd Maste    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
778c43e99fdSEd Maste         && test -f conftest2.$ac_objext; then
779c43e99fdSEd Maste      : OK
780c43e99fdSEd Maste    else
781c43e99fdSEd Maste      am_cv_prog_cc_c_o=no
782c43e99fdSEd Maste      break
783c43e99fdSEd Maste    fi
784c43e99fdSEd Maste  done
785c43e99fdSEd Maste  rm -f core conftest*
786c43e99fdSEd Maste  unset am_i])
787c43e99fdSEd Masteif test "$am_cv_prog_cc_c_o" != yes; then
788c43e99fdSEd Maste   # Losing compiler, so override with the script.
789c43e99fdSEd Maste   # FIXME: It is wrong to rewrite CC.
790c43e99fdSEd Maste   # But if we don't then we get into trouble of one sort or another.
791c43e99fdSEd Maste   # A longer-term fix would be to have automake use am__CC in this case,
792c43e99fdSEd Maste   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
793c43e99fdSEd Maste   CC="$am_aux_dir/compile $CC"
794c43e99fdSEd Mastefi
795c43e99fdSEd MasteAC_LANG_POP([C])])
796c43e99fdSEd Maste
797c43e99fdSEd Maste# For backward compatibility.
798c43e99fdSEd MasteAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
799c43e99fdSEd Maste
800*b50261e2SCy Schubert# Copyright (C) 2001-2020 Free Software Foundation, Inc.
801c43e99fdSEd Maste#
802c43e99fdSEd Maste# This file is free software; the Free Software Foundation
803c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
804c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
805c43e99fdSEd Maste
806c43e99fdSEd Maste# AM_RUN_LOG(COMMAND)
807c43e99fdSEd Maste# -------------------
808c43e99fdSEd Maste# Run COMMAND, save the exit status in ac_status, and log it.
809c43e99fdSEd Maste# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
810c43e99fdSEd MasteAC_DEFUN([AM_RUN_LOG],
811c43e99fdSEd Maste[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
812c43e99fdSEd Maste   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
813c43e99fdSEd Maste   ac_status=$?
814c43e99fdSEd Maste   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
815c43e99fdSEd Maste   (exit $ac_status); }])
816c43e99fdSEd Maste
817c43e99fdSEd Maste# Check to make sure that the build environment is sane.    -*- Autoconf -*-
818c43e99fdSEd Maste
819*b50261e2SCy Schubert# Copyright (C) 1996-2020 Free Software Foundation, Inc.
820c43e99fdSEd Maste#
821c43e99fdSEd Maste# This file is free software; the Free Software Foundation
822c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
823c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
824c43e99fdSEd Maste
825c43e99fdSEd Maste# AM_SANITY_CHECK
826c43e99fdSEd Maste# ---------------
827c43e99fdSEd MasteAC_DEFUN([AM_SANITY_CHECK],
828c43e99fdSEd Maste[AC_MSG_CHECKING([whether build environment is sane])
829c43e99fdSEd Maste# Reject unsafe characters in $srcdir or the absolute working directory
830c43e99fdSEd Maste# name.  Accept space and tab only in the latter.
831c43e99fdSEd Masteam_lf='
832c43e99fdSEd Maste'
833c43e99fdSEd Mastecase `pwd` in
834c43e99fdSEd Maste  *[[\\\"\#\$\&\'\`$am_lf]]*)
835c43e99fdSEd Maste    AC_MSG_ERROR([unsafe absolute working directory name]);;
836c43e99fdSEd Masteesac
837c43e99fdSEd Mastecase $srcdir in
838c43e99fdSEd Maste  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
839c43e99fdSEd Maste    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
840c43e99fdSEd Masteesac
841c43e99fdSEd Maste
842c43e99fdSEd Maste# Do 'set' in a subshell so we don't clobber the current shell's
843c43e99fdSEd Maste# arguments.  Must try -L first in case configure is actually a
844c43e99fdSEd Maste# symlink; some systems play weird games with the mod time of symlinks
845c43e99fdSEd Maste# (eg FreeBSD returns the mod time of the symlink's containing
846c43e99fdSEd Maste# directory).
847c43e99fdSEd Masteif (
848c43e99fdSEd Maste   am_has_slept=no
849c43e99fdSEd Maste   for am_try in 1 2; do
850c43e99fdSEd Maste     echo "timestamp, slept: $am_has_slept" > conftest.file
851c43e99fdSEd Maste     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
852c43e99fdSEd Maste     if test "$[*]" = "X"; then
853c43e99fdSEd Maste	# -L didn't work.
854c43e99fdSEd Maste	set X `ls -t "$srcdir/configure" conftest.file`
855c43e99fdSEd Maste     fi
856c43e99fdSEd Maste     if test "$[*]" != "X $srcdir/configure conftest.file" \
857c43e99fdSEd Maste	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
858c43e99fdSEd Maste
859c43e99fdSEd Maste	# If neither matched, then we have a broken ls.  This can happen
860c43e99fdSEd Maste	# if, for instance, CONFIG_SHELL is bash and it inherits a
861c43e99fdSEd Maste	# broken ls alias from the environment.  This has actually
862c43e99fdSEd Maste	# happened.  Such a system could not be considered "sane".
863c43e99fdSEd Maste	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
864c43e99fdSEd Maste  alias in your environment])
865c43e99fdSEd Maste     fi
866c43e99fdSEd Maste     if test "$[2]" = conftest.file || test $am_try -eq 2; then
867c43e99fdSEd Maste       break
868c43e99fdSEd Maste     fi
869c43e99fdSEd Maste     # Just in case.
870c43e99fdSEd Maste     sleep 1
871c43e99fdSEd Maste     am_has_slept=yes
872c43e99fdSEd Maste   done
873c43e99fdSEd Maste   test "$[2]" = conftest.file
874c43e99fdSEd Maste   )
875c43e99fdSEd Mastethen
876c43e99fdSEd Maste   # Ok.
877c43e99fdSEd Maste   :
878c43e99fdSEd Masteelse
879c43e99fdSEd Maste   AC_MSG_ERROR([newly created file is older than distributed files!
880c43e99fdSEd MasteCheck your system clock])
881c43e99fdSEd Mastefi
882c43e99fdSEd MasteAC_MSG_RESULT([yes])
883c43e99fdSEd Maste# If we didn't sleep, we still need to ensure time stamps of config.status and
884c43e99fdSEd Maste# generated files are strictly newer.
885c43e99fdSEd Masteam_sleep_pid=
886c43e99fdSEd Masteif grep 'slept: no' conftest.file >/dev/null 2>&1; then
887c43e99fdSEd Maste  ( sleep 1 ) &
888c43e99fdSEd Maste  am_sleep_pid=$!
889c43e99fdSEd Mastefi
890c43e99fdSEd MasteAC_CONFIG_COMMANDS_PRE(
891c43e99fdSEd Maste  [AC_MSG_CHECKING([that generated files are newer than configure])
892c43e99fdSEd Maste   if test -n "$am_sleep_pid"; then
893c43e99fdSEd Maste     # Hide warnings about reused PIDs.
894c43e99fdSEd Maste     wait $am_sleep_pid 2>/dev/null
895c43e99fdSEd Maste   fi
896c43e99fdSEd Maste   AC_MSG_RESULT([done])])
897c43e99fdSEd Masterm -f conftest.file
898c43e99fdSEd Maste])
899c43e99fdSEd Maste
900*b50261e2SCy Schubert# Copyright (C) 2009-2020 Free Software Foundation, Inc.
901c43e99fdSEd Maste#
902c43e99fdSEd Maste# This file is free software; the Free Software Foundation
903c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
904c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
905c43e99fdSEd Maste
906c43e99fdSEd Maste# AM_SILENT_RULES([DEFAULT])
907c43e99fdSEd Maste# --------------------------
908c43e99fdSEd Maste# Enable less verbose build rules; with the default set to DEFAULT
909c43e99fdSEd Maste# ("yes" being less verbose, "no" or empty being verbose).
910c43e99fdSEd MasteAC_DEFUN([AM_SILENT_RULES],
911c43e99fdSEd Maste[AC_ARG_ENABLE([silent-rules], [dnl
912c43e99fdSEd MasteAS_HELP_STRING(
913c43e99fdSEd Maste  [--enable-silent-rules],
914c43e99fdSEd Maste  [less verbose build output (undo: "make V=1")])
915c43e99fdSEd MasteAS_HELP_STRING(
916c43e99fdSEd Maste  [--disable-silent-rules],
917c43e99fdSEd Maste  [verbose build output (undo: "make V=0")])dnl
918c43e99fdSEd Maste])
919c43e99fdSEd Mastecase $enable_silent_rules in @%:@ (((
920c43e99fdSEd Maste  yes) AM_DEFAULT_VERBOSITY=0;;
921c43e99fdSEd Maste   no) AM_DEFAULT_VERBOSITY=1;;
922c43e99fdSEd Maste    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
923c43e99fdSEd Masteesac
924c43e99fdSEd Mastednl
925c43e99fdSEd Mastednl A few 'make' implementations (e.g., NonStop OS and NextStep)
926c43e99fdSEd Mastednl do not support nested variable expansions.
927c43e99fdSEd Mastednl See automake bug#9928 and bug#10237.
928c43e99fdSEd Masteam_make=${MAKE-make}
929c43e99fdSEd MasteAC_CACHE_CHECK([whether $am_make supports nested variables],
930c43e99fdSEd Maste   [am_cv_make_support_nested_variables],
931c43e99fdSEd Maste   [if AS_ECHO([['TRUE=$(BAR$(V))
932c43e99fdSEd MasteBAR0=false
933c43e99fdSEd MasteBAR1=true
934c43e99fdSEd MasteV=1
935c43e99fdSEd Masteam__doit:
936c43e99fdSEd Maste	@$(TRUE)
937c43e99fdSEd Maste.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
938c43e99fdSEd Maste  am_cv_make_support_nested_variables=yes
939c43e99fdSEd Masteelse
940c43e99fdSEd Maste  am_cv_make_support_nested_variables=no
941c43e99fdSEd Mastefi])
942c43e99fdSEd Masteif test $am_cv_make_support_nested_variables = yes; then
943c43e99fdSEd Maste  dnl Using '$V' instead of '$(V)' breaks IRIX make.
944c43e99fdSEd Maste  AM_V='$(V)'
945c43e99fdSEd Maste  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
946c43e99fdSEd Masteelse
947c43e99fdSEd Maste  AM_V=$AM_DEFAULT_VERBOSITY
948c43e99fdSEd Maste  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
949c43e99fdSEd Mastefi
950c43e99fdSEd MasteAC_SUBST([AM_V])dnl
951c43e99fdSEd MasteAM_SUBST_NOTMAKE([AM_V])dnl
952c43e99fdSEd MasteAC_SUBST([AM_DEFAULT_V])dnl
953c43e99fdSEd MasteAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
954c43e99fdSEd MasteAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
955c43e99fdSEd MasteAM_BACKSLASH='\'
956c43e99fdSEd MasteAC_SUBST([AM_BACKSLASH])dnl
957c43e99fdSEd Maste_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
958c43e99fdSEd Maste])
959c43e99fdSEd Maste
960*b50261e2SCy Schubert# Copyright (C) 2001-2020 Free Software Foundation, Inc.
961c43e99fdSEd Maste#
962c43e99fdSEd Maste# This file is free software; the Free Software Foundation
963c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
964c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
965c43e99fdSEd Maste
966c43e99fdSEd Maste# AM_PROG_INSTALL_STRIP
967c43e99fdSEd Maste# ---------------------
968c43e99fdSEd Maste# One issue with vendor 'install' (even GNU) is that you can't
969c43e99fdSEd Maste# specify the program used to strip binaries.  This is especially
970c43e99fdSEd Maste# annoying in cross-compiling environments, where the build's strip
971c43e99fdSEd Maste# is unlikely to handle the host's binaries.
972c43e99fdSEd Maste# Fortunately install-sh will honor a STRIPPROG variable, so we
973c43e99fdSEd Maste# always use install-sh in "make install-strip", and initialize
974c43e99fdSEd Maste# STRIPPROG with the value of the STRIP variable (set by the user).
975c43e99fdSEd MasteAC_DEFUN([AM_PROG_INSTALL_STRIP],
976c43e99fdSEd Maste[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
977c43e99fdSEd Maste# Installed binaries are usually stripped using 'strip' when the user
978c43e99fdSEd Maste# run "make install-strip".  However 'strip' might not be the right
979c43e99fdSEd Maste# tool to use in cross-compilation environments, therefore Automake
980c43e99fdSEd Maste# will honor the 'STRIP' environment variable to overrule this program.
981c43e99fdSEd Mastednl Don't test for $cross_compiling = yes, because it might be 'maybe'.
982c43e99fdSEd Masteif test "$cross_compiling" != no; then
983c43e99fdSEd Maste  AC_CHECK_TOOL([STRIP], [strip], :)
984c43e99fdSEd Mastefi
985c43e99fdSEd MasteINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
986c43e99fdSEd MasteAC_SUBST([INSTALL_STRIP_PROGRAM])])
987c43e99fdSEd Maste
988*b50261e2SCy Schubert# Copyright (C) 2006-2020 Free Software Foundation, Inc.
989c43e99fdSEd Maste#
990c43e99fdSEd Maste# This file is free software; the Free Software Foundation
991c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
992c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
993c43e99fdSEd Maste
994c43e99fdSEd Maste# _AM_SUBST_NOTMAKE(VARIABLE)
995c43e99fdSEd Maste# ---------------------------
996c43e99fdSEd Maste# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
997c43e99fdSEd Maste# This macro is traced by Automake.
998c43e99fdSEd MasteAC_DEFUN([_AM_SUBST_NOTMAKE])
999c43e99fdSEd Maste
1000c43e99fdSEd Maste# AM_SUBST_NOTMAKE(VARIABLE)
1001c43e99fdSEd Maste# --------------------------
1002c43e99fdSEd Maste# Public sister of _AM_SUBST_NOTMAKE.
1003c43e99fdSEd MasteAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1004c43e99fdSEd Maste
1005c43e99fdSEd Maste# Check how to create a tarball.                            -*- Autoconf -*-
1006c43e99fdSEd Maste
1007*b50261e2SCy Schubert# Copyright (C) 2004-2020 Free Software Foundation, Inc.
1008c43e99fdSEd Maste#
1009c43e99fdSEd Maste# This file is free software; the Free Software Foundation
1010c43e99fdSEd Maste# gives unlimited permission to copy and/or distribute it,
1011c43e99fdSEd Maste# with or without modifications, as long as this notice is preserved.
1012c43e99fdSEd Maste
1013c43e99fdSEd Maste# _AM_PROG_TAR(FORMAT)
1014c43e99fdSEd Maste# --------------------
1015c43e99fdSEd Maste# Check how to create a tarball in format FORMAT.
1016c43e99fdSEd Maste# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1017c43e99fdSEd Maste#
1018c43e99fdSEd Maste# Substitute a variable $(am__tar) that is a command
1019c43e99fdSEd Maste# writing to stdout a FORMAT-tarball containing the directory
1020c43e99fdSEd Maste# $tardir.
1021c43e99fdSEd Maste#     tardir=directory && $(am__tar) > result.tar
1022c43e99fdSEd Maste#
1023c43e99fdSEd Maste# Substitute a variable $(am__untar) that extract such
1024c43e99fdSEd Maste# a tarball read from stdin.
1025c43e99fdSEd Maste#     $(am__untar) < result.tar
1026c43e99fdSEd Maste#
1027c43e99fdSEd MasteAC_DEFUN([_AM_PROG_TAR],
1028c43e99fdSEd Maste[# Always define AMTAR for backward compatibility.  Yes, it's still used
1029c43e99fdSEd Maste# in the wild :-(  We should find a proper way to deprecate it ...
1030c43e99fdSEd MasteAC_SUBST([AMTAR], ['$${TAR-tar}'])
1031c43e99fdSEd Maste
1032c43e99fdSEd Maste# We'll loop over all known methods to create a tar archive until one works.
1033c43e99fdSEd Maste_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1034c43e99fdSEd Maste
1035c43e99fdSEd Mastem4_if([$1], [v7],
1036c43e99fdSEd Maste  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1037c43e99fdSEd Maste
1038c43e99fdSEd Maste  [m4_case([$1],
1039c43e99fdSEd Maste    [ustar],
1040c43e99fdSEd Maste     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1041c43e99fdSEd Maste      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1042c43e99fdSEd Maste      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1043c43e99fdSEd Maste      # and bug#13588).
1044c43e99fdSEd Maste      am_max_uid=2097151 # 2^21 - 1
1045c43e99fdSEd Maste      am_max_gid=$am_max_uid
1046c43e99fdSEd Maste      # The $UID and $GID variables are not portable, so we need to resort
1047c43e99fdSEd Maste      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1048c43e99fdSEd Maste      # below are definitely unexpected, so allow the users to see them
1049c43e99fdSEd Maste      # (that is, avoid stderr redirection).
1050c43e99fdSEd Maste      am_uid=`id -u || echo unknown`
1051c43e99fdSEd Maste      am_gid=`id -g || echo unknown`
1052c43e99fdSEd Maste      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1053c43e99fdSEd Maste      if test $am_uid -le $am_max_uid; then
1054c43e99fdSEd Maste         AC_MSG_RESULT([yes])
1055c43e99fdSEd Maste      else
1056c43e99fdSEd Maste         AC_MSG_RESULT([no])
1057c43e99fdSEd Maste         _am_tools=none
1058c43e99fdSEd Maste      fi
1059c43e99fdSEd Maste      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1060c43e99fdSEd Maste      if test $am_gid -le $am_max_gid; then
1061c43e99fdSEd Maste         AC_MSG_RESULT([yes])
1062c43e99fdSEd Maste      else
1063c43e99fdSEd Maste        AC_MSG_RESULT([no])
1064c43e99fdSEd Maste        _am_tools=none
1065c43e99fdSEd Maste      fi],
1066c43e99fdSEd Maste
1067c43e99fdSEd Maste  [pax],
1068c43e99fdSEd Maste    [],
1069c43e99fdSEd Maste
1070c43e99fdSEd Maste  [m4_fatal([Unknown tar format])])
1071c43e99fdSEd Maste
1072c43e99fdSEd Maste  AC_MSG_CHECKING([how to create a $1 tar archive])
1073c43e99fdSEd Maste
1074c43e99fdSEd Maste  # Go ahead even if we have the value already cached.  We do so because we
1075c43e99fdSEd Maste  # need to set the values for the 'am__tar' and 'am__untar' variables.
1076c43e99fdSEd Maste  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1077c43e99fdSEd Maste
1078c43e99fdSEd Maste  for _am_tool in $_am_tools; do
1079c43e99fdSEd Maste    case $_am_tool in
1080c43e99fdSEd Maste    gnutar)
1081c43e99fdSEd Maste      for _am_tar in tar gnutar gtar; do
1082c43e99fdSEd Maste        AM_RUN_LOG([$_am_tar --version]) && break
1083c43e99fdSEd Maste      done
1084c43e99fdSEd Maste      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1085c43e99fdSEd Maste      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1086c43e99fdSEd Maste      am__untar="$_am_tar -xf -"
1087c43e99fdSEd Maste      ;;
1088c43e99fdSEd Maste    plaintar)
1089c43e99fdSEd Maste      # Must skip GNU tar: if it does not support --format= it doesn't create
1090c43e99fdSEd Maste      # ustar tarball either.
1091c43e99fdSEd Maste      (tar --version) >/dev/null 2>&1 && continue
1092c43e99fdSEd Maste      am__tar='tar chf - "$$tardir"'
1093c43e99fdSEd Maste      am__tar_='tar chf - "$tardir"'
1094c43e99fdSEd Maste      am__untar='tar xf -'
1095c43e99fdSEd Maste      ;;
1096c43e99fdSEd Maste    pax)
1097c43e99fdSEd Maste      am__tar='pax -L -x $1 -w "$$tardir"'
1098c43e99fdSEd Maste      am__tar_='pax -L -x $1 -w "$tardir"'
1099c43e99fdSEd Maste      am__untar='pax -r'
1100c43e99fdSEd Maste      ;;
1101c43e99fdSEd Maste    cpio)
1102c43e99fdSEd Maste      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1103c43e99fdSEd Maste      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1104c43e99fdSEd Maste      am__untar='cpio -i -H $1 -d'
1105c43e99fdSEd Maste      ;;
1106c43e99fdSEd Maste    none)
1107c43e99fdSEd Maste      am__tar=false
1108c43e99fdSEd Maste      am__tar_=false
1109c43e99fdSEd Maste      am__untar=false
1110c43e99fdSEd Maste      ;;
1111c43e99fdSEd Maste    esac
1112c43e99fdSEd Maste
1113c43e99fdSEd Maste    # If the value was cached, stop now.  We just wanted to have am__tar
1114c43e99fdSEd Maste    # and am__untar set.
1115c43e99fdSEd Maste    test -n "${am_cv_prog_tar_$1}" && break
1116c43e99fdSEd Maste
1117c43e99fdSEd Maste    # tar/untar a dummy directory, and stop if the command works.
1118c43e99fdSEd Maste    rm -rf conftest.dir
1119c43e99fdSEd Maste    mkdir conftest.dir
1120c43e99fdSEd Maste    echo GrepMe > conftest.dir/file
1121c43e99fdSEd Maste    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1122c43e99fdSEd Maste    rm -rf conftest.dir
1123c43e99fdSEd Maste    if test -s conftest.tar; then
1124c43e99fdSEd Maste      AM_RUN_LOG([$am__untar <conftest.tar])
1125c43e99fdSEd Maste      AM_RUN_LOG([cat conftest.dir/file])
1126c43e99fdSEd Maste      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1127c43e99fdSEd Maste    fi
1128c43e99fdSEd Maste  done
1129c43e99fdSEd Maste  rm -rf conftest.dir
1130c43e99fdSEd Maste
1131c43e99fdSEd Maste  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1132c43e99fdSEd Maste  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1133c43e99fdSEd Maste
1134c43e99fdSEd MasteAC_SUBST([am__tar])
1135c43e99fdSEd MasteAC_SUBST([am__untar])
1136c43e99fdSEd Maste]) # _AM_PROG_TAR
1137c43e99fdSEd Maste
1138c43e99fdSEd Mastem4_include([m4/ac_backport_259_ssizet.m4])
1139c43e99fdSEd Mastem4_include([m4/acx_pthread.m4])
1140*b50261e2SCy Schubertm4_include([m4/ax_check_funcs_ex.m4])
1141*b50261e2SCy Schubertm4_include([m4/ax_prog_doxygen.m4])
1142c43e99fdSEd Mastem4_include([m4/libevent_openssl.m4])
1143c43e99fdSEd Mastem4_include([m4/libtool.m4])
1144c43e99fdSEd Mastem4_include([m4/ltoptions.m4])
1145c43e99fdSEd Mastem4_include([m4/ltsugar.m4])
1146c43e99fdSEd Mastem4_include([m4/ltversion.m4])
1147c43e99fdSEd Mastem4_include([m4/lt~obsolete.m4])
1148c43e99fdSEd Mastem4_include([m4/ntp_pkg_config.m4])
1149