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