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