1290001Sglebius# generated automatically by aclocal 1.15 -*- Autoconf -*-
2290001Sglebius
3290001Sglebius# Copyright (C) 1996-2014 Free Software Foundation, Inc.
4290001Sglebius
5290001Sglebius# This file is free software; the Free Software Foundation
6290001Sglebius# gives unlimited permission to copy and/or distribute it,
7290001Sglebius# with or without modifications, as long as this notice is preserved.
8290001Sglebius
9290001Sglebius# This program is distributed in the hope that it will be useful,
10290001Sglebius# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11290001Sglebius# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12290001Sglebius# PARTICULAR PURPOSE.
13290001Sglebius
14290001Sglebiusm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15290001Sglebiusm4_ifndef([AC_AUTOCONF_VERSION],
16290001Sglebius  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17290001Sglebiusm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18290001Sglebius[m4_warning([this file was generated for autoconf 2.69.
19290001SglebiusYou have another version of autoconf.  It may work, but is not guaranteed to.
20290001SglebiusIf you have problems, you may need to regenerate the build system entirely.
21290001SglebiusTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22290001Sglebius
23290001Sglebius# serial 9  -*- Autoconf -*-
24290001Sglebius# Enable extensions on systems that normally disable them.
25290001Sglebius
26290001Sglebius# Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc.
27290001Sglebius# This file is free software; the Free Software Foundation
28290001Sglebius# gives unlimited permission to copy and/or distribute it,
29290001Sglebius# with or without modifications, as long as this notice is preserved.
30290001Sglebius
31290001Sglebius# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
32290001Sglebius# Autoconf.  Perhaps we can remove this once we can assume Autoconf
33290001Sglebius# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
34290001Sglebius# enough in this area it's likely we'll need to redefine
35290001Sglebius# AC_USE_SYSTEM_EXTENSIONS for quite some time.
36290001Sglebius
37290001Sglebius# If autoconf reports a warning
38290001Sglebius#     warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
39290001Sglebius# or  warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
40290001Sglebius# the fix is
41290001Sglebius#   1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
42290001Sglebius#      but always AC_REQUIREd,
43290001Sglebius#   2) to ensure that for each occurrence of
44290001Sglebius#        AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
45290001Sglebius#      or
46290001Sglebius#        AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
47290001Sglebius#      the corresponding gnulib module description has 'extensions' among
48290001Sglebius#      its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
49290001Sglebius#      invocation occurs in gl_EARLY, not in gl_INIT.
50290001Sglebius
51290001Sglebius# AC_USE_SYSTEM_EXTENSIONS
52290001Sglebius# ------------------------
53290001Sglebius# Enable extensions on systems that normally disable them,
54290001Sglebius# typically due to standards-conformance issues.
55290001Sglebius# Remember that #undef in AH_VERBATIM gets replaced with #define by
56290001Sglebius# AC_DEFINE.  The goal here is to define all known feature-enabling
57290001Sglebius# macros, then, if reports of conflicts are made, disable macros that
58290001Sglebius# cause problems on some platforms (such as __EXTENSIONS__).
59290001SglebiusAC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
60290001Sglebius[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
61290001SglebiusAC_BEFORE([$0], [AC_RUN_IFELSE])dnl
62290001Sglebius
63290001Sglebius  AC_REQUIRE([AC_CANONICAL_HOST])
64290001Sglebius
65290001Sglebius  AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
66290001Sglebius  if test "$MINIX" = yes; then
67290001Sglebius    AC_DEFINE([_POSIX_SOURCE], [1],
68290001Sglebius      [Define to 1 if you need to in order for `stat' and other
69290001Sglebius       things to work.])
70290001Sglebius    AC_DEFINE([_POSIX_1_SOURCE], [2],
71290001Sglebius      [Define to 2 if the system does not provide POSIX.1 features
72290001Sglebius       except with this defined.])
73290001Sglebius    AC_DEFINE([_MINIX], [1],
74290001Sglebius      [Define to 1 if on MINIX.])
75290001Sglebius  fi
76290001Sglebius
77290001Sglebius  dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
78290001Sglebius  dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
79290001Sglebius  dnl provided.
80290001Sglebius  case "$host_os" in
81290001Sglebius    hpux*)
82290001Sglebius      AC_DEFINE([_XOPEN_SOURCE], [500],
83290001Sglebius        [Define to 500 only on HP-UX.])
84290001Sglebius      ;;
85290001Sglebius  esac
86290001Sglebius
87290001Sglebius  AH_VERBATIM([__EXTENSIONS__],
88290001Sglebius[/* Enable extensions on AIX 3, Interix.  */
89290001Sglebius#ifndef _ALL_SOURCE
90290001Sglebius# undef _ALL_SOURCE
91290001Sglebius#endif
92290001Sglebius/* Enable GNU extensions on systems that have them.  */
93290001Sglebius#ifndef _GNU_SOURCE
94290001Sglebius# undef _GNU_SOURCE
95290001Sglebius#endif
96290001Sglebius/* Enable threading extensions on Solaris.  */
97290001Sglebius#ifndef _POSIX_PTHREAD_SEMANTICS
98290001Sglebius# undef _POSIX_PTHREAD_SEMANTICS
99290001Sglebius#endif
100290001Sglebius/* Enable extensions on HP NonStop.  */
101290001Sglebius#ifndef _TANDEM_SOURCE
102290001Sglebius# undef _TANDEM_SOURCE
103290001Sglebius#endif
104290001Sglebius/* Enable general extensions on Solaris.  */
105290001Sglebius#ifndef __EXTENSIONS__
106290001Sglebius# undef __EXTENSIONS__
107290001Sglebius#endif
108290001Sglebius])
109290001Sglebius  AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
110290001Sglebius    [ac_cv_safe_to_define___extensions__],
111290001Sglebius    [AC_COMPILE_IFELSE(
112290001Sglebius       [AC_LANG_PROGRAM([[
113290001Sglebius#         define __EXTENSIONS__ 1
114290001Sglebius          ]AC_INCLUDES_DEFAULT])],
115290001Sglebius       [ac_cv_safe_to_define___extensions__=yes],
116290001Sglebius       [ac_cv_safe_to_define___extensions__=no])])
117290001Sglebius  test $ac_cv_safe_to_define___extensions__ = yes &&
118290001Sglebius    AC_DEFINE([__EXTENSIONS__])
119290001Sglebius  AC_DEFINE([_ALL_SOURCE])
120290001Sglebius  AC_DEFINE([_GNU_SOURCE])
121290001Sglebius  AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
122290001Sglebius  AC_DEFINE([_TANDEM_SOURCE])
123290001Sglebius])# AC_USE_SYSTEM_EXTENSIONS
124290001Sglebius
125290001Sglebius# gl_USE_SYSTEM_EXTENSIONS
126290001Sglebius# ------------------------
127290001Sglebius# Enable extensions on systems that normally disable them,
128290001Sglebius# typically due to standards-conformance issues.
129290001SglebiusAC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
130290001Sglebius[
131290001Sglebius  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
132290001Sglebius  dnl gnulib does not need it. But if it gets required by third-party macros
133290001Sglebius  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
134290001Sglebius  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
135290001Sglebius  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
136290001Sglebius  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
137290001Sglebius  AC_REQUIRE([AC_GNU_SOURCE])
138290001Sglebius
139290001Sglebius  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
140290001Sglebius])
141290001Sglebius
142290001Sglebius# Copyright (C) 2002-2014 Free Software Foundation, Inc.
143290001Sglebius#
144290001Sglebius# This file is free software; the Free Software Foundation
145290001Sglebius# gives unlimited permission to copy and/or distribute it,
146290001Sglebius# with or without modifications, as long as this notice is preserved.
147290001Sglebius
148290001Sglebius# AM_AUTOMAKE_VERSION(VERSION)
149290001Sglebius# ----------------------------
150290001Sglebius# Automake X.Y traces this macro to ensure aclocal.m4 has been
151290001Sglebius# generated from the m4 files accompanying Automake X.Y.
152290001Sglebius# (This private macro should not be called outside this file.)
153290001SglebiusAC_DEFUN([AM_AUTOMAKE_VERSION],
154290001Sglebius[am__api_version='1.15'
155290001Sglebiusdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
156290001Sglebiusdnl require some minimum version.  Point them to the right macro.
157290001Sglebiusm4_if([$1], [1.15], [],
158290001Sglebius      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
159290001Sglebius])
160290001Sglebius
161290001Sglebius# _AM_AUTOCONF_VERSION(VERSION)
162290001Sglebius# -----------------------------
163290001Sglebius# aclocal traces this macro to find the Autoconf version.
164290001Sglebius# This is a private macro too.  Using m4_define simplifies
165290001Sglebius# the logic in aclocal, which can simply ignore this definition.
166290001Sglebiusm4_define([_AM_AUTOCONF_VERSION], [])
167290001Sglebius
168290001Sglebius# AM_SET_CURRENT_AUTOMAKE_VERSION
169290001Sglebius# -------------------------------
170290001Sglebius# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
171290001Sglebius# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
172290001SglebiusAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
173290001Sglebius[AM_AUTOMAKE_VERSION([1.15])dnl
174290001Sglebiusm4_ifndef([AC_AUTOCONF_VERSION],
175290001Sglebius  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
176290001Sglebius_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
177290001Sglebius
178290001Sglebius# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
179290001Sglebius
180290001Sglebius# Copyright (C) 2001-2014 Free Software Foundation, Inc.
181290001Sglebius#
182290001Sglebius# This file is free software; the Free Software Foundation
183290001Sglebius# gives unlimited permission to copy and/or distribute it,
184290001Sglebius# with or without modifications, as long as this notice is preserved.
185290001Sglebius
186290001Sglebius# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
187290001Sglebius# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
188290001Sglebius# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
189290001Sglebius#
190290001Sglebius# Of course, Automake must honor this variable whenever it calls a
191290001Sglebius# tool from the auxiliary directory.  The problem is that $srcdir (and
192290001Sglebius# therefore $ac_aux_dir as well) can be either absolute or relative,
193290001Sglebius# depending on how configure is run.  This is pretty annoying, since
194290001Sglebius# it makes $ac_aux_dir quite unusable in subdirectories: in the top
195290001Sglebius# source directory, any form will work fine, but in subdirectories a
196290001Sglebius# relative path needs to be adjusted first.
197290001Sglebius#
198290001Sglebius# $ac_aux_dir/missing
199290001Sglebius#    fails when called from a subdirectory if $ac_aux_dir is relative
200290001Sglebius# $top_srcdir/$ac_aux_dir/missing
201290001Sglebius#    fails if $ac_aux_dir is absolute,
202290001Sglebius#    fails when called from a subdirectory in a VPATH build with
203290001Sglebius#          a relative $ac_aux_dir
204290001Sglebius#
205290001Sglebius# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
206290001Sglebius# are both prefixed by $srcdir.  In an in-source build this is usually
207290001Sglebius# harmless because $srcdir is '.', but things will broke when you
208290001Sglebius# start a VPATH build or use an absolute $srcdir.
209290001Sglebius#
210290001Sglebius# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
211290001Sglebius# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
212290001Sglebius#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
213290001Sglebius# and then we would define $MISSING as
214290001Sglebius#   MISSING="\${SHELL} $am_aux_dir/missing"
215290001Sglebius# This will work as long as MISSING is not called from configure, because
216290001Sglebius# unfortunately $(top_srcdir) has no meaning in configure.
217290001Sglebius# However there are other variables, like CC, which are often used in
218290001Sglebius# configure, and could therefore not use this "fixed" $ac_aux_dir.
219290001Sglebius#
220290001Sglebius# Another solution, used here, is to always expand $ac_aux_dir to an
221290001Sglebius# absolute PATH.  The drawback is that using absolute paths prevent a
222290001Sglebius# configured tree to be moved without reconfiguration.
223290001Sglebius
224290001SglebiusAC_DEFUN([AM_AUX_DIR_EXPAND],
225290001Sglebius[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
226290001Sglebius# Expand $ac_aux_dir to an absolute path.
227290001Sglebiusam_aux_dir=`cd "$ac_aux_dir" && pwd`
228290001Sglebius])
229290001Sglebius
230290001Sglebius# AM_CONDITIONAL                                            -*- Autoconf -*-
231290001Sglebius
232290001Sglebius# Copyright (C) 1997-2014 Free Software Foundation, Inc.
233290001Sglebius#
234290001Sglebius# This file is free software; the Free Software Foundation
235290001Sglebius# gives unlimited permission to copy and/or distribute it,
236290001Sglebius# with or without modifications, as long as this notice is preserved.
237290001Sglebius
238290001Sglebius# AM_CONDITIONAL(NAME, SHELL-CONDITION)
239290001Sglebius# -------------------------------------
240290001Sglebius# Define a conditional.
241290001SglebiusAC_DEFUN([AM_CONDITIONAL],
242290001Sglebius[AC_PREREQ([2.52])dnl
243290001Sglebius m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
244290001Sglebius       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
245290001SglebiusAC_SUBST([$1_TRUE])dnl
246290001SglebiusAC_SUBST([$1_FALSE])dnl
247290001Sglebius_AM_SUBST_NOTMAKE([$1_TRUE])dnl
248290001Sglebius_AM_SUBST_NOTMAKE([$1_FALSE])dnl
249290001Sglebiusm4_define([_AM_COND_VALUE_$1], [$2])dnl
250290001Sglebiusif $2; then
251290001Sglebius  $1_TRUE=
252290001Sglebius  $1_FALSE='#'
253290001Sglebiuselse
254290001Sglebius  $1_TRUE='#'
255290001Sglebius  $1_FALSE=
256290001Sglebiusfi
257290001SglebiusAC_CONFIG_COMMANDS_PRE(
258290001Sglebius[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
259290001Sglebius  AC_MSG_ERROR([[conditional "$1" was never defined.
260290001SglebiusUsually this means the macro was only invoked conditionally.]])
261290001Sglebiusfi])])
262290001Sglebius
263290001Sglebius# Copyright (C) 1999-2014 Free Software Foundation, Inc.
264290001Sglebius#
265290001Sglebius# This file is free software; the Free Software Foundation
266290001Sglebius# gives unlimited permission to copy and/or distribute it,
267290001Sglebius# with or without modifications, as long as this notice is preserved.
268290001Sglebius
269290001Sglebius
270290001Sglebius# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
271290001Sglebius# written in clear, in which case automake, when reading aclocal.m4,
272290001Sglebius# will think it sees a *use*, and therefore will trigger all it's
273290001Sglebius# C support machinery.  Also note that it means that autoscan, seeing
274290001Sglebius# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
275290001Sglebius
276290001Sglebius
277290001Sglebius# _AM_DEPENDENCIES(NAME)
278290001Sglebius# ----------------------
279290001Sglebius# See how the compiler implements dependency checking.
280290001Sglebius# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
281290001Sglebius# We try a few techniques and use that to set a single cache variable.
282290001Sglebius#
283290001Sglebius# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
284290001Sglebius# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
285290001Sglebius# dependency, and given that the user is not expected to run this macro,
286290001Sglebius# just rely on AC_PROG_CC.
287290001SglebiusAC_DEFUN([_AM_DEPENDENCIES],
288290001Sglebius[AC_REQUIRE([AM_SET_DEPDIR])dnl
289290001SglebiusAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
290290001SglebiusAC_REQUIRE([AM_MAKE_INCLUDE])dnl
291290001SglebiusAC_REQUIRE([AM_DEP_TRACK])dnl
292290001Sglebius
293290001Sglebiusm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
294290001Sglebius      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
295290001Sglebius      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
296290001Sglebius      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
297290001Sglebius      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
298290001Sglebius      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
299290001Sglebius                    [depcc="$$1"   am_compiler_list=])
300290001Sglebius
301290001SglebiusAC_CACHE_CHECK([dependency style of $depcc],
302290001Sglebius               [am_cv_$1_dependencies_compiler_type],
303290001Sglebius[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
304290001Sglebius  # We make a subdir and do the tests there.  Otherwise we can end up
305290001Sglebius  # making bogus files that we don't know about and never remove.  For
306290001Sglebius  # instance it was reported that on HP-UX the gcc test will end up
307290001Sglebius  # making a dummy file named 'D' -- because '-MD' means "put the output
308290001Sglebius  # in D".
309290001Sglebius  rm -rf conftest.dir
310290001Sglebius  mkdir conftest.dir
311290001Sglebius  # Copy depcomp to subdir because otherwise we won't find it if we're
312290001Sglebius  # using a relative directory.
313290001Sglebius  cp "$am_depcomp" conftest.dir
314290001Sglebius  cd conftest.dir
315290001Sglebius  # We will build objects and dependencies in a subdirectory because
316290001Sglebius  # it helps to detect inapplicable dependency modes.  For instance
317290001Sglebius  # both Tru64's cc and ICC support -MD to output dependencies as a
318290001Sglebius  # side effect of compilation, but ICC will put the dependencies in
319290001Sglebius  # the current directory while Tru64 will put them in the object
320290001Sglebius  # directory.
321290001Sglebius  mkdir sub
322290001Sglebius
323290001Sglebius  am_cv_$1_dependencies_compiler_type=none
324290001Sglebius  if test "$am_compiler_list" = ""; then
325290001Sglebius     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
326290001Sglebius  fi
327290001Sglebius  am__universal=false
328290001Sglebius  m4_case([$1], [CC],
329290001Sglebius    [case " $depcc " in #(
330290001Sglebius     *\ -arch\ *\ -arch\ *) am__universal=true ;;
331290001Sglebius     esac],
332290001Sglebius    [CXX],
333290001Sglebius    [case " $depcc " in #(
334290001Sglebius     *\ -arch\ *\ -arch\ *) am__universal=true ;;
335290001Sglebius     esac])
336290001Sglebius
337290001Sglebius  for depmode in $am_compiler_list; do
338290001Sglebius    # Setup a source with many dependencies, because some compilers
339290001Sglebius    # like to wrap large dependency lists on column 80 (with \), and
340290001Sglebius    # we should not choose a depcomp mode which is confused by this.
341290001Sglebius    #
342290001Sglebius    # We need to recreate these files for each test, as the compiler may
343290001Sglebius    # overwrite some of them when testing with obscure command lines.
344290001Sglebius    # This happens at least with the AIX C compiler.
345290001Sglebius    : > sub/conftest.c
346290001Sglebius    for i in 1 2 3 4 5 6; do
347290001Sglebius      echo '#include "conftst'$i'.h"' >> sub/conftest.c
348290001Sglebius      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
349290001Sglebius      # Solaris 10 /bin/sh.
350290001Sglebius      echo '/* dummy */' > sub/conftst$i.h
351290001Sglebius    done
352290001Sglebius    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
353290001Sglebius
354290001Sglebius    # We check with '-c' and '-o' for the sake of the "dashmstdout"
355290001Sglebius    # mode.  It turns out that the SunPro C++ compiler does not properly
356290001Sglebius    # handle '-M -o', and we need to detect this.  Also, some Intel
357290001Sglebius    # versions had trouble with output in subdirs.
358290001Sglebius    am__obj=sub/conftest.${OBJEXT-o}
359290001Sglebius    am__minus_obj="-o $am__obj"
360290001Sglebius    case $depmode in
361290001Sglebius    gcc)
362290001Sglebius      # This depmode causes a compiler race in universal mode.
363290001Sglebius      test "$am__universal" = false || continue
364290001Sglebius      ;;
365290001Sglebius    nosideeffect)
366290001Sglebius      # After this tag, mechanisms are not by side-effect, so they'll
367290001Sglebius      # only be used when explicitly requested.
368290001Sglebius      if test "x$enable_dependency_tracking" = xyes; then
369290001Sglebius	continue
370290001Sglebius      else
371290001Sglebius	break
372290001Sglebius      fi
373290001Sglebius      ;;
374290001Sglebius    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
375290001Sglebius      # This compiler won't grok '-c -o', but also, the minuso test has
376290001Sglebius      # not run yet.  These depmodes are late enough in the game, and
377290001Sglebius      # so weak that their functioning should not be impacted.
378290001Sglebius      am__obj=conftest.${OBJEXT-o}
379290001Sglebius      am__minus_obj=
380290001Sglebius      ;;
381290001Sglebius    none) break ;;
382290001Sglebius    esac
383290001Sglebius    if depmode=$depmode \
384290001Sglebius       source=sub/conftest.c object=$am__obj \
385290001Sglebius       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
386290001Sglebius       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
387290001Sglebius         >/dev/null 2>conftest.err &&
388290001Sglebius       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
389290001Sglebius       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
390290001Sglebius       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
391290001Sglebius       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
392290001Sglebius      # icc doesn't choke on unknown options, it will just issue warnings
393290001Sglebius      # or remarks (even with -Werror).  So we grep stderr for any message
394290001Sglebius      # that says an option was ignored or not supported.
395290001Sglebius      # When given -MP, icc 7.0 and 7.1 complain thusly:
396290001Sglebius      #   icc: Command line warning: ignoring option '-M'; no argument required
397290001Sglebius      # The diagnosis changed in icc 8.0:
398290001Sglebius      #   icc: Command line remark: option '-MP' not supported
399290001Sglebius      if (grep 'ignoring option' conftest.err ||
400290001Sglebius          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
401290001Sglebius        am_cv_$1_dependencies_compiler_type=$depmode
402290001Sglebius        break
403290001Sglebius      fi
404290001Sglebius    fi
405290001Sglebius  done
406290001Sglebius
407290001Sglebius  cd ..
408290001Sglebius  rm -rf conftest.dir
409290001Sglebiuselse
410290001Sglebius  am_cv_$1_dependencies_compiler_type=none
411290001Sglebiusfi
412290001Sglebius])
413290001SglebiusAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
414290001SglebiusAM_CONDITIONAL([am__fastdep$1], [
415290001Sglebius  test "x$enable_dependency_tracking" != xno \
416290001Sglebius  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
417290001Sglebius])
418290001Sglebius
419290001Sglebius
420290001Sglebius# AM_SET_DEPDIR
421290001Sglebius# -------------
422290001Sglebius# Choose a directory name for dependency files.
423290001Sglebius# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
424290001SglebiusAC_DEFUN([AM_SET_DEPDIR],
425290001Sglebius[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
426290001SglebiusAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
427290001Sglebius])
428290001Sglebius
429290001Sglebius
430290001Sglebius# AM_DEP_TRACK
431290001Sglebius# ------------
432290001SglebiusAC_DEFUN([AM_DEP_TRACK],
433290001Sglebius[AC_ARG_ENABLE([dependency-tracking], [dnl
434290001SglebiusAS_HELP_STRING(
435290001Sglebius  [--enable-dependency-tracking],
436290001Sglebius  [do not reject slow dependency extractors])
437290001SglebiusAS_HELP_STRING(
438290001Sglebius  [--disable-dependency-tracking],
439290001Sglebius  [speeds up one-time build])])
440290001Sglebiusif test "x$enable_dependency_tracking" != xno; then
441290001Sglebius  am_depcomp="$ac_aux_dir/depcomp"
442290001Sglebius  AMDEPBACKSLASH='\'
443290001Sglebius  am__nodep='_no'
444290001Sglebiusfi
445290001SglebiusAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
446290001SglebiusAC_SUBST([AMDEPBACKSLASH])dnl
447290001Sglebius_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
448290001SglebiusAC_SUBST([am__nodep])dnl
449290001Sglebius_AM_SUBST_NOTMAKE([am__nodep])dnl
450290001Sglebius])
451290001Sglebius
452290001Sglebius# Generate code to set up dependency tracking.              -*- Autoconf -*-
453290001Sglebius
454290001Sglebius# Copyright (C) 1999-2014 Free Software Foundation, Inc.
455290001Sglebius#
456290001Sglebius# This file is free software; the Free Software Foundation
457290001Sglebius# gives unlimited permission to copy and/or distribute it,
458290001Sglebius# with or without modifications, as long as this notice is preserved.
459290001Sglebius
460290001Sglebius
461290001Sglebius# _AM_OUTPUT_DEPENDENCY_COMMANDS
462290001Sglebius# ------------------------------
463290001SglebiusAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
464290001Sglebius[{
465290001Sglebius  # Older Autoconf quotes --file arguments for eval, but not when files
466290001Sglebius  # are listed without --file.  Let's play safe and only enable the eval
467290001Sglebius  # if we detect the quoting.
468290001Sglebius  case $CONFIG_FILES in
469290001Sglebius  *\'*) eval set x "$CONFIG_FILES" ;;
470290001Sglebius  *)   set x $CONFIG_FILES ;;
471290001Sglebius  esac
472290001Sglebius  shift
473290001Sglebius  for mf
474290001Sglebius  do
475290001Sglebius    # Strip MF so we end up with the name of the file.
476290001Sglebius    mf=`echo "$mf" | sed -e 's/:.*$//'`
477290001Sglebius    # Check whether this is an Automake generated Makefile or not.
478290001Sglebius    # We used to match only the files named 'Makefile.in', but
479290001Sglebius    # some people rename them; so instead we look at the file content.
480290001Sglebius    # Grep'ing the first line is not enough: some people post-process
481290001Sglebius    # each Makefile.in and add a new line on top of each file to say so.
482290001Sglebius    # Grep'ing the whole file is not good either: AIX grep has a line
483290001Sglebius    # limit of 2048, but all sed's we know have understand at least 4000.
484290001Sglebius    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
485290001Sglebius      dirpart=`AS_DIRNAME("$mf")`
486290001Sglebius    else
487290001Sglebius      continue
488290001Sglebius    fi
489290001Sglebius    # Extract the definition of DEPDIR, am__include, and am__quote
490290001Sglebius    # from the Makefile without running 'make'.
491290001Sglebius    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
492290001Sglebius    test -z "$DEPDIR" && continue
493290001Sglebius    am__include=`sed -n 's/^am__include = //p' < "$mf"`
494290001Sglebius    test -z "$am__include" && continue
495290001Sglebius    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
496290001Sglebius    # Find all dependency output files, they are included files with
497290001Sglebius    # $(DEPDIR) in their names.  We invoke sed twice because it is the
498290001Sglebius    # simplest approach to changing $(DEPDIR) to its actual value in the
499290001Sglebius    # expansion.
500290001Sglebius    for file in `sed -n "
501290001Sglebius      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
502290001Sglebius	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
503290001Sglebius      # Make sure the directory exists.
504290001Sglebius      test -f "$dirpart/$file" && continue
505290001Sglebius      fdir=`AS_DIRNAME(["$file"])`
506290001Sglebius      AS_MKDIR_P([$dirpart/$fdir])
507290001Sglebius      # echo "creating $dirpart/$file"
508290001Sglebius      echo '# dummy' > "$dirpart/$file"
509290001Sglebius    done
510290001Sglebius  done
511290001Sglebius}
512290001Sglebius])# _AM_OUTPUT_DEPENDENCY_COMMANDS
513290001Sglebius
514290001Sglebius
515290001Sglebius# AM_OUTPUT_DEPENDENCY_COMMANDS
516290001Sglebius# -----------------------------
517290001Sglebius# This macro should only be invoked once -- use via AC_REQUIRE.
518290001Sglebius#
519290001Sglebius# This code is only required when automatic dependency tracking
520290001Sglebius# is enabled.  FIXME.  This creates each '.P' file that we will
521290001Sglebius# need in order to bootstrap the dependency handling code.
522290001SglebiusAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
523290001Sglebius[AC_CONFIG_COMMANDS([depfiles],
524290001Sglebius     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
525290001Sglebius     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
526290001Sglebius])
527290001Sglebius
528290001Sglebius# Do all the work for Automake.                             -*- Autoconf -*-
529290001Sglebius
530290001Sglebius# Copyright (C) 1996-2014 Free Software Foundation, Inc.
531290001Sglebius#
532290001Sglebius# This file is free software; the Free Software Foundation
533290001Sglebius# gives unlimited permission to copy and/or distribute it,
534290001Sglebius# with or without modifications, as long as this notice is preserved.
535290001Sglebius
536290001Sglebius# This macro actually does too much.  Some checks are only needed if
537290001Sglebius# your package does certain things.  But this isn't really a big deal.
538290001Sglebius
539290001Sglebiusdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
540290001Sglebiusm4_define([AC_PROG_CC],
541290001Sglebiusm4_defn([AC_PROG_CC])
542290001Sglebius[_AM_PROG_CC_C_O
543290001Sglebius])
544290001Sglebius
545290001Sglebius# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
546290001Sglebius# AM_INIT_AUTOMAKE([OPTIONS])
547290001Sglebius# -----------------------------------------------
548290001Sglebius# The call with PACKAGE and VERSION arguments is the old style
549290001Sglebius# call (pre autoconf-2.50), which is being phased out.  PACKAGE
550290001Sglebius# and VERSION should now be passed to AC_INIT and removed from
551290001Sglebius# the call to AM_INIT_AUTOMAKE.
552290001Sglebius# We support both call styles for the transition.  After
553290001Sglebius# the next Automake release, Autoconf can make the AC_INIT
554290001Sglebius# arguments mandatory, and then we can depend on a new Autoconf
555290001Sglebius# release and drop the old call support.
556290001SglebiusAC_DEFUN([AM_INIT_AUTOMAKE],
557290001Sglebius[AC_PREREQ([2.65])dnl
558290001Sglebiusdnl Autoconf wants to disallow AM_ names.  We explicitly allow
559290001Sglebiusdnl the ones we care about.
560290001Sglebiusm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
561290001SglebiusAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
562290001SglebiusAC_REQUIRE([AC_PROG_INSTALL])dnl
563290001Sglebiusif test "`cd $srcdir && pwd`" != "`pwd`"; then
564290001Sglebius  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
565290001Sglebius  # is not polluted with repeated "-I."
566290001Sglebius  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
567290001Sglebius  # test to see if srcdir already configured
568290001Sglebius  if test -f $srcdir/config.status; then
569290001Sglebius    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
570290001Sglebius  fi
571290001Sglebiusfi
572290001Sglebius
573290001Sglebius# test whether we have cygpath
574290001Sglebiusif test -z "$CYGPATH_W"; then
575290001Sglebius  if (cygpath --version) >/dev/null 2>/dev/null; then
576290001Sglebius    CYGPATH_W='cygpath -w'
577290001Sglebius  else
578290001Sglebius    CYGPATH_W=echo
579290001Sglebius  fi
580290001Sglebiusfi
581290001SglebiusAC_SUBST([CYGPATH_W])
582290001Sglebius
583290001Sglebius# Define the identity of the package.
584290001Sglebiusdnl Distinguish between old-style and new-style calls.
585290001Sglebiusm4_ifval([$2],
586290001Sglebius[AC_DIAGNOSE([obsolete],
587290001Sglebius             [$0: two- and three-arguments forms are deprecated.])
588290001Sglebiusm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
589290001Sglebius AC_SUBST([PACKAGE], [$1])dnl
590290001Sglebius AC_SUBST([VERSION], [$2])],
591290001Sglebius[_AM_SET_OPTIONS([$1])dnl
592290001Sglebiusdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
593290001Sglebiusm4_if(
594290001Sglebius  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
595290001Sglebius  [ok:ok],,
596290001Sglebius  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
597290001Sglebius AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
598290001Sglebius AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
599290001Sglebius
600290001Sglebius_AM_IF_OPTION([no-define],,
601290001Sglebius[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
602290001Sglebius AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
603290001Sglebius
604290001Sglebius# Some tools Automake needs.
605290001SglebiusAC_REQUIRE([AM_SANITY_CHECK])dnl
606290001SglebiusAC_REQUIRE([AC_ARG_PROGRAM])dnl
607290001SglebiusAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
608290001SglebiusAM_MISSING_PROG([AUTOCONF], [autoconf])
609290001SglebiusAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
610290001SglebiusAM_MISSING_PROG([AUTOHEADER], [autoheader])
611290001SglebiusAM_MISSING_PROG([MAKEINFO], [makeinfo])
612290001SglebiusAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
613290001SglebiusAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
614290001SglebiusAC_REQUIRE([AC_PROG_MKDIR_P])dnl
615290001Sglebius# For better backward compatibility.  To be removed once Automake 1.9.x
616290001Sglebius# dies out for good.  For more background, see:
617290001Sglebius# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
618290001Sglebius# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
619290001SglebiusAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
620290001Sglebius# We need awk for the "check" target (and possibly the TAP driver).  The
621290001Sglebius# system "awk" is bad on some platforms.
622290001SglebiusAC_REQUIRE([AC_PROG_AWK])dnl
623290001SglebiusAC_REQUIRE([AC_PROG_MAKE_SET])dnl
624290001SglebiusAC_REQUIRE([AM_SET_LEADING_DOT])dnl
625290001Sglebius_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
626290001Sglebius	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
627290001Sglebius			     [_AM_PROG_TAR([v7])])])
628290001Sglebius_AM_IF_OPTION([no-dependencies],,
629290001Sglebius[AC_PROVIDE_IFELSE([AC_PROG_CC],
630290001Sglebius		  [_AM_DEPENDENCIES([CC])],
631290001Sglebius		  [m4_define([AC_PROG_CC],
632290001Sglebius			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
633290001SglebiusAC_PROVIDE_IFELSE([AC_PROG_CXX],
634290001Sglebius		  [_AM_DEPENDENCIES([CXX])],
635290001Sglebius		  [m4_define([AC_PROG_CXX],
636290001Sglebius			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
637290001SglebiusAC_PROVIDE_IFELSE([AC_PROG_OBJC],
638290001Sglebius		  [_AM_DEPENDENCIES([OBJC])],
639290001Sglebius		  [m4_define([AC_PROG_OBJC],
640290001Sglebius			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
641290001SglebiusAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
642290001Sglebius		  [_AM_DEPENDENCIES([OBJCXX])],
643290001Sglebius		  [m4_define([AC_PROG_OBJCXX],
644290001Sglebius			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
645290001Sglebius])
646290001SglebiusAC_REQUIRE([AM_SILENT_RULES])dnl
647290001Sglebiusdnl The testsuite driver may need to know about EXEEXT, so add the
648290001Sglebiusdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
649290001Sglebiusdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
650290001SglebiusAC_CONFIG_COMMANDS_PRE(dnl
651290001Sglebius[m4_provide_if([_AM_COMPILER_EXEEXT],
652290001Sglebius  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
653290001Sglebius
654290001Sglebius# POSIX will say in a future version that running "rm -f" with no argument
655290001Sglebius# is OK; and we want to be able to make that assumption in our Makefile
656290001Sglebius# recipes.  So use an aggressive probe to check that the usage we want is
657290001Sglebius# actually supported "in the wild" to an acceptable degree.
658290001Sglebius# See automake bug#10828.
659290001Sglebius# To make any issue more visible, cause the running configure to be aborted
660290001Sglebius# by default if the 'rm' program in use doesn't match our expectations; the
661290001Sglebius# user can still override this though.
662290001Sglebiusif rm -f && rm -fr && rm -rf; then : OK; else
663290001Sglebius  cat >&2 <<'END'
664290001SglebiusOops!
665290001Sglebius
666290001SglebiusYour 'rm' program seems unable to run without file operands specified
667290001Sglebiuson the command line, even when the '-f' option is present.  This is contrary
668290001Sglebiusto the behaviour of most rm programs out there, and not conforming with
669290001Sglebiusthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
670290001Sglebius
671290001SglebiusPlease tell bug-automake@gnu.org about your system, including the value
672290001Sglebiusof your $PATH and any error possibly output before this message.  This
673290001Sglebiuscan help us improve future automake versions.
674290001Sglebius
675290001SglebiusEND
676290001Sglebius  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
677290001Sglebius    echo 'Configuration will proceed anyway, since you have set the' >&2
678290001Sglebius    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
679290001Sglebius    echo >&2
680290001Sglebius  else
681290001Sglebius    cat >&2 <<'END'
682290001SglebiusAborting the configuration process, to ensure you take notice of the issue.
683290001Sglebius
684290001SglebiusYou can download and install GNU coreutils to get an 'rm' implementation
685290001Sglebiusthat behaves properly: <http://www.gnu.org/software/coreutils/>.
686290001Sglebius
687290001SglebiusIf you want to complete the configuration process using your problematic
688290001Sglebius'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
689290001Sglebiusto "yes", and re-run configure.
690290001Sglebius
691290001SglebiusEND
692290001Sglebius    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
693290001Sglebius  fi
694290001Sglebiusfi
695290001Sglebiusdnl The trailing newline in this macro's definition is deliberate, for
696290001Sglebiusdnl backward compatibility and to allow trailing 'dnl'-style comments
697290001Sglebiusdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
698290001Sglebius])
699290001Sglebius
700290001Sglebiusdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
701290001Sglebiusdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
702290001Sglebiusdnl mangled by Autoconf and run in a shell conditional statement.
703290001Sglebiusm4_define([_AC_COMPILER_EXEEXT],
704290001Sglebiusm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
705290001Sglebius
706290001Sglebius# When config.status generates a header, we must update the stamp-h file.
707290001Sglebius# This file resides in the same directory as the config header
708290001Sglebius# that is generated.  The stamp files are numbered to have different names.
709290001Sglebius
710290001Sglebius# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
711290001Sglebius# loop where config.status creates the headers, so we can generate
712290001Sglebius# our stamp files there.
713290001SglebiusAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
714290001Sglebius[# Compute $1's index in $config_headers.
715290001Sglebius_am_arg=$1
716290001Sglebius_am_stamp_count=1
717290001Sglebiusfor _am_header in $config_headers :; do
718290001Sglebius  case $_am_header in
719290001Sglebius    $_am_arg | $_am_arg:* )
720290001Sglebius      break ;;
721290001Sglebius    * )
722290001Sglebius      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
723290001Sglebius  esac
724290001Sglebiusdone
725290001Sglebiusecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
726290001Sglebius
727290001Sglebius# Copyright (C) 2001-2014 Free Software Foundation, Inc.
728290001Sglebius#
729290001Sglebius# This file is free software; the Free Software Foundation
730290001Sglebius# gives unlimited permission to copy and/or distribute it,
731290001Sglebius# with or without modifications, as long as this notice is preserved.
732290001Sglebius
733290001Sglebius# AM_PROG_INSTALL_SH
734290001Sglebius# ------------------
735290001Sglebius# Define $install_sh.
736290001SglebiusAC_DEFUN([AM_PROG_INSTALL_SH],
737290001Sglebius[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
738290001Sglebiusif test x"${install_sh+set}" != xset; then
739290001Sglebius  case $am_aux_dir in
740290001Sglebius  *\ * | *\	*)
741290001Sglebius    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
742290001Sglebius  *)
743290001Sglebius    install_sh="\${SHELL} $am_aux_dir/install-sh"
744290001Sglebius  esac
745290001Sglebiusfi
746290001SglebiusAC_SUBST([install_sh])])
747290001Sglebius
748290001Sglebius# Copyright (C) 2003-2014 Free Software Foundation, Inc.
749290001Sglebius#
750290001Sglebius# This file is free software; the Free Software Foundation
751290001Sglebius# gives unlimited permission to copy and/or distribute it,
752290001Sglebius# with or without modifications, as long as this notice is preserved.
753290001Sglebius
754290001Sglebius# Check whether the underlying file-system supports filenames
755290001Sglebius# with a leading dot.  For instance MS-DOS doesn't.
756290001SglebiusAC_DEFUN([AM_SET_LEADING_DOT],
757290001Sglebius[rm -rf .tst 2>/dev/null
758290001Sglebiusmkdir .tst 2>/dev/null
759290001Sglebiusif test -d .tst; then
760290001Sglebius  am__leading_dot=.
761290001Sglebiuselse
762290001Sglebius  am__leading_dot=_
763290001Sglebiusfi
764290001Sglebiusrmdir .tst 2>/dev/null
765290001SglebiusAC_SUBST([am__leading_dot])])
766290001Sglebius
767290001Sglebius# Check to see how 'make' treats includes.	            -*- Autoconf -*-
768290001Sglebius
769290001Sglebius# Copyright (C) 2001-2014 Free Software Foundation, Inc.
770290001Sglebius#
771290001Sglebius# This file is free software; the Free Software Foundation
772290001Sglebius# gives unlimited permission to copy and/or distribute it,
773290001Sglebius# with or without modifications, as long as this notice is preserved.
774290001Sglebius
775290001Sglebius# AM_MAKE_INCLUDE()
776290001Sglebius# -----------------
777290001Sglebius# Check to see how make treats includes.
778290001SglebiusAC_DEFUN([AM_MAKE_INCLUDE],
779290001Sglebius[am_make=${MAKE-make}
780290001Sglebiuscat > confinc << 'END'
781290001Sglebiusam__doit:
782290001Sglebius	@echo this is the am__doit target
783290001Sglebius.PHONY: am__doit
784290001SglebiusEND
785290001Sglebius# If we don't find an include directive, just comment out the code.
786290001SglebiusAC_MSG_CHECKING([for style of include used by $am_make])
787290001Sglebiusam__include="#"
788290001Sglebiusam__quote=
789290001Sglebius_am_result=none
790290001Sglebius# First try GNU make style include.
791290001Sglebiusecho "include confinc" > confmf
792290001Sglebius# Ignore all kinds of additional output from 'make'.
793290001Sglebiuscase `$am_make -s -f confmf 2> /dev/null` in #(
794290001Sglebius*the\ am__doit\ target*)
795290001Sglebius  am__include=include
796290001Sglebius  am__quote=
797290001Sglebius  _am_result=GNU
798290001Sglebius  ;;
799290001Sglebiusesac
800290001Sglebius# Now try BSD make style include.
801290001Sglebiusif test "$am__include" = "#"; then
802290001Sglebius   echo '.include "confinc"' > confmf
803290001Sglebius   case `$am_make -s -f confmf 2> /dev/null` in #(
804290001Sglebius   *the\ am__doit\ target*)
805290001Sglebius     am__include=.include
806290001Sglebius     am__quote="\""
807290001Sglebius     _am_result=BSD
808290001Sglebius     ;;
809290001Sglebius   esac
810290001Sglebiusfi
811290001SglebiusAC_SUBST([am__include])
812290001SglebiusAC_SUBST([am__quote])
813290001SglebiusAC_MSG_RESULT([$_am_result])
814290001Sglebiusrm -f confinc confmf
815290001Sglebius])
816290001Sglebius
817290001Sglebius# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
818290001Sglebius
819290001Sglebius# Copyright (C) 1997-2014 Free Software Foundation, Inc.
820290001Sglebius#
821290001Sglebius# This file is free software; the Free Software Foundation
822290001Sglebius# gives unlimited permission to copy and/or distribute it,
823290001Sglebius# with or without modifications, as long as this notice is preserved.
824290001Sglebius
825290001Sglebius# AM_MISSING_PROG(NAME, PROGRAM)
826290001Sglebius# ------------------------------
827290001SglebiusAC_DEFUN([AM_MISSING_PROG],
828290001Sglebius[AC_REQUIRE([AM_MISSING_HAS_RUN])
829290001Sglebius$1=${$1-"${am_missing_run}$2"}
830290001SglebiusAC_SUBST($1)])
831290001Sglebius
832290001Sglebius# AM_MISSING_HAS_RUN
833290001Sglebius# ------------------
834290001Sglebius# Define MISSING if not defined so far and test if it is modern enough.
835290001Sglebius# If it is, set am_missing_run to use it, otherwise, to nothing.
836290001SglebiusAC_DEFUN([AM_MISSING_HAS_RUN],
837290001Sglebius[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
838290001SglebiusAC_REQUIRE_AUX_FILE([missing])dnl
839290001Sglebiusif test x"${MISSING+set}" != xset; then
840290001Sglebius  case $am_aux_dir in
841290001Sglebius  *\ * | *\	*)
842290001Sglebius    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
843290001Sglebius  *)
844290001Sglebius    MISSING="\${SHELL} $am_aux_dir/missing" ;;
845290001Sglebius  esac
846290001Sglebiusfi
847290001Sglebius# Use eval to expand $SHELL
848290001Sglebiusif eval "$MISSING --is-lightweight"; then
849290001Sglebius  am_missing_run="$MISSING "
850290001Sglebiuselse
851290001Sglebius  am_missing_run=
852290001Sglebius  AC_MSG_WARN(['missing' script is too old or missing])
853290001Sglebiusfi
854290001Sglebius])
855290001Sglebius
856290001Sglebius# Helper functions for option handling.                     -*- Autoconf -*-
857290001Sglebius
858290001Sglebius# Copyright (C) 2001-2014 Free Software Foundation, Inc.
859290001Sglebius#
860290001Sglebius# This file is free software; the Free Software Foundation
861290001Sglebius# gives unlimited permission to copy and/or distribute it,
862290001Sglebius# with or without modifications, as long as this notice is preserved.
863290001Sglebius
864290001Sglebius# _AM_MANGLE_OPTION(NAME)
865290001Sglebius# -----------------------
866290001SglebiusAC_DEFUN([_AM_MANGLE_OPTION],
867290001Sglebius[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
868290001Sglebius
869290001Sglebius# _AM_SET_OPTION(NAME)
870290001Sglebius# --------------------
871290001Sglebius# Set option NAME.  Presently that only means defining a flag for this option.
872290001SglebiusAC_DEFUN([_AM_SET_OPTION],
873290001Sglebius[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
874290001Sglebius
875290001Sglebius# _AM_SET_OPTIONS(OPTIONS)
876290001Sglebius# ------------------------
877290001Sglebius# OPTIONS is a space-separated list of Automake options.
878290001SglebiusAC_DEFUN([_AM_SET_OPTIONS],
879290001Sglebius[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
880290001Sglebius
881290001Sglebius# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
882290001Sglebius# -------------------------------------------
883290001Sglebius# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
884290001SglebiusAC_DEFUN([_AM_IF_OPTION],
885290001Sglebius[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
886290001Sglebius
887290001Sglebius# Copyright (C) 1999-2014 Free Software Foundation, Inc.
888290001Sglebius#
889290001Sglebius# This file is free software; the Free Software Foundation
890290001Sglebius# gives unlimited permission to copy and/or distribute it,
891290001Sglebius# with or without modifications, as long as this notice is preserved.
892290001Sglebius
893290001Sglebius# _AM_PROG_CC_C_O
894290001Sglebius# ---------------
895290001Sglebius# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
896290001Sglebius# to automatically call this.
897290001SglebiusAC_DEFUN([_AM_PROG_CC_C_O],
898290001Sglebius[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
899290001SglebiusAC_REQUIRE_AUX_FILE([compile])dnl
900290001SglebiusAC_LANG_PUSH([C])dnl
901290001SglebiusAC_CACHE_CHECK(
902290001Sglebius  [whether $CC understands -c and -o together],
903290001Sglebius  [am_cv_prog_cc_c_o],
904290001Sglebius  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
905290001Sglebius  # Make sure it works both with $CC and with simple cc.
906290001Sglebius  # Following AC_PROG_CC_C_O, we do the test twice because some
907290001Sglebius  # compilers refuse to overwrite an existing .o file with -o,
908290001Sglebius  # though they will create one.
909290001Sglebius  am_cv_prog_cc_c_o=yes
910290001Sglebius  for am_i in 1 2; do
911290001Sglebius    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
912290001Sglebius         && test -f conftest2.$ac_objext; then
913290001Sglebius      : OK
914290001Sglebius    else
915290001Sglebius      am_cv_prog_cc_c_o=no
916290001Sglebius      break
917290001Sglebius    fi
918290001Sglebius  done
919290001Sglebius  rm -f core conftest*
920290001Sglebius  unset am_i])
921290001Sglebiusif test "$am_cv_prog_cc_c_o" != yes; then
922290001Sglebius   # Losing compiler, so override with the script.
923290001Sglebius   # FIXME: It is wrong to rewrite CC.
924290001Sglebius   # But if we don't then we get into trouble of one sort or another.
925290001Sglebius   # A longer-term fix would be to have automake use am__CC in this case,
926290001Sglebius   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
927290001Sglebius   CC="$am_aux_dir/compile $CC"
928290001Sglebiusfi
929290001SglebiusAC_LANG_POP([C])])
930290001Sglebius
931290001Sglebius# For backward compatibility.
932290001SglebiusAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
933290001Sglebius
934290001Sglebius# Copyright (C) 2001-2014 Free Software Foundation, Inc.
935290001Sglebius#
936290001Sglebius# This file is free software; the Free Software Foundation
937290001Sglebius# gives unlimited permission to copy and/or distribute it,
938290001Sglebius# with or without modifications, as long as this notice is preserved.
939290001Sglebius
940290001Sglebius# AM_RUN_LOG(COMMAND)
941290001Sglebius# -------------------
942290001Sglebius# Run COMMAND, save the exit status in ac_status, and log it.
943290001Sglebius# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
944290001SglebiusAC_DEFUN([AM_RUN_LOG],
945290001Sglebius[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
946290001Sglebius   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
947290001Sglebius   ac_status=$?
948290001Sglebius   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
949290001Sglebius   (exit $ac_status); }])
950290001Sglebius
951290001Sglebius# Check to make sure that the build environment is sane.    -*- Autoconf -*-
952290001Sglebius
953290001Sglebius# Copyright (C) 1996-2014 Free Software Foundation, Inc.
954290001Sglebius#
955290001Sglebius# This file is free software; the Free Software Foundation
956290001Sglebius# gives unlimited permission to copy and/or distribute it,
957290001Sglebius# with or without modifications, as long as this notice is preserved.
958290001Sglebius
959290001Sglebius# AM_SANITY_CHECK
960290001Sglebius# ---------------
961290001SglebiusAC_DEFUN([AM_SANITY_CHECK],
962290001Sglebius[AC_MSG_CHECKING([whether build environment is sane])
963290001Sglebius# Reject unsafe characters in $srcdir or the absolute working directory
964290001Sglebius# name.  Accept space and tab only in the latter.
965290001Sglebiusam_lf='
966290001Sglebius'
967290001Sglebiuscase `pwd` in
968290001Sglebius  *[[\\\"\#\$\&\'\`$am_lf]]*)
969290001Sglebius    AC_MSG_ERROR([unsafe absolute working directory name]);;
970290001Sglebiusesac
971290001Sglebiuscase $srcdir in
972290001Sglebius  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
973290001Sglebius    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
974290001Sglebiusesac
975290001Sglebius
976290001Sglebius# Do 'set' in a subshell so we don't clobber the current shell's
977290001Sglebius# arguments.  Must try -L first in case configure is actually a
978290001Sglebius# symlink; some systems play weird games with the mod time of symlinks
979290001Sglebius# (eg FreeBSD returns the mod time of the symlink's containing
980290001Sglebius# directory).
981290001Sglebiusif (
982290001Sglebius   am_has_slept=no
983290001Sglebius   for am_try in 1 2; do
984290001Sglebius     echo "timestamp, slept: $am_has_slept" > conftest.file
985290001Sglebius     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
986290001Sglebius     if test "$[*]" = "X"; then
987290001Sglebius	# -L didn't work.
988290001Sglebius	set X `ls -t "$srcdir/configure" conftest.file`
989290001Sglebius     fi
990290001Sglebius     if test "$[*]" != "X $srcdir/configure conftest.file" \
991290001Sglebius	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
992290001Sglebius
993290001Sglebius	# If neither matched, then we have a broken ls.  This can happen
994290001Sglebius	# if, for instance, CONFIG_SHELL is bash and it inherits a
995290001Sglebius	# broken ls alias from the environment.  This has actually
996290001Sglebius	# happened.  Such a system could not be considered "sane".
997290001Sglebius	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
998290001Sglebius  alias in your environment])
999290001Sglebius     fi
1000290001Sglebius     if test "$[2]" = conftest.file || test $am_try -eq 2; then
1001290001Sglebius       break
1002290001Sglebius     fi
1003290001Sglebius     # Just in case.
1004290001Sglebius     sleep 1
1005290001Sglebius     am_has_slept=yes
1006290001Sglebius   done
1007290001Sglebius   test "$[2]" = conftest.file
1008290001Sglebius   )
1009290001Sglebiusthen
1010290001Sglebius   # Ok.
1011290001Sglebius   :
1012290001Sglebiuselse
1013290001Sglebius   AC_MSG_ERROR([newly created file is older than distributed files!
1014290001SglebiusCheck your system clock])
1015290001Sglebiusfi
1016290001SglebiusAC_MSG_RESULT([yes])
1017290001Sglebius# If we didn't sleep, we still need to ensure time stamps of config.status and
1018290001Sglebius# generated files are strictly newer.
1019290001Sglebiusam_sleep_pid=
1020290001Sglebiusif grep 'slept: no' conftest.file >/dev/null 2>&1; then
1021290001Sglebius  ( sleep 1 ) &
1022290001Sglebius  am_sleep_pid=$!
1023290001Sglebiusfi
1024290001SglebiusAC_CONFIG_COMMANDS_PRE(
1025290001Sglebius  [AC_MSG_CHECKING([that generated files are newer than configure])
1026290001Sglebius   if test -n "$am_sleep_pid"; then
1027290001Sglebius     # Hide warnings about reused PIDs.
1028290001Sglebius     wait $am_sleep_pid 2>/dev/null
1029290001Sglebius   fi
1030290001Sglebius   AC_MSG_RESULT([done])])
1031290001Sglebiusrm -f conftest.file
1032290001Sglebius])
1033290001Sglebius
1034290001Sglebius# Copyright (C) 2009-2014 Free Software Foundation, Inc.
1035290001Sglebius#
1036290001Sglebius# This file is free software; the Free Software Foundation
1037290001Sglebius# gives unlimited permission to copy and/or distribute it,
1038290001Sglebius# with or without modifications, as long as this notice is preserved.
1039290001Sglebius
1040290001Sglebius# AM_SILENT_RULES([DEFAULT])
1041290001Sglebius# --------------------------
1042290001Sglebius# Enable less verbose build rules; with the default set to DEFAULT
1043290001Sglebius# ("yes" being less verbose, "no" or empty being verbose).
1044290001SglebiusAC_DEFUN([AM_SILENT_RULES],
1045290001Sglebius[AC_ARG_ENABLE([silent-rules], [dnl
1046290001SglebiusAS_HELP_STRING(
1047290001Sglebius  [--enable-silent-rules],
1048290001Sglebius  [less verbose build output (undo: "make V=1")])
1049290001SglebiusAS_HELP_STRING(
1050290001Sglebius  [--disable-silent-rules],
1051290001Sglebius  [verbose build output (undo: "make V=0")])dnl
1052290001Sglebius])
1053290001Sglebiuscase $enable_silent_rules in @%:@ (((
1054290001Sglebius  yes) AM_DEFAULT_VERBOSITY=0;;
1055290001Sglebius   no) AM_DEFAULT_VERBOSITY=1;;
1056290001Sglebius    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1057290001Sglebiusesac
1058290001Sglebiusdnl
1059290001Sglebiusdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1060290001Sglebiusdnl do not support nested variable expansions.
1061290001Sglebiusdnl See automake bug#9928 and bug#10237.
1062290001Sglebiusam_make=${MAKE-make}
1063290001SglebiusAC_CACHE_CHECK([whether $am_make supports nested variables],
1064290001Sglebius   [am_cv_make_support_nested_variables],
1065290001Sglebius   [if AS_ECHO([['TRUE=$(BAR$(V))
1066290001SglebiusBAR0=false
1067290001SglebiusBAR1=true
1068290001SglebiusV=1
1069290001Sglebiusam__doit:
1070290001Sglebius	@$(TRUE)
1071290001Sglebius.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1072290001Sglebius  am_cv_make_support_nested_variables=yes
1073290001Sglebiuselse
1074290001Sglebius  am_cv_make_support_nested_variables=no
1075290001Sglebiusfi])
1076290001Sglebiusif test $am_cv_make_support_nested_variables = yes; then
1077290001Sglebius  dnl Using '$V' instead of '$(V)' breaks IRIX make.
1078290001Sglebius  AM_V='$(V)'
1079290001Sglebius  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1080290001Sglebiuselse
1081290001Sglebius  AM_V=$AM_DEFAULT_VERBOSITY
1082290001Sglebius  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1083290001Sglebiusfi
1084290001SglebiusAC_SUBST([AM_V])dnl
1085290001SglebiusAM_SUBST_NOTMAKE([AM_V])dnl
1086290001SglebiusAC_SUBST([AM_DEFAULT_V])dnl
1087290001SglebiusAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1088290001SglebiusAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1089290001SglebiusAM_BACKSLASH='\'
1090290001SglebiusAC_SUBST([AM_BACKSLASH])dnl
1091290001Sglebius_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1092290001Sglebius])
1093290001Sglebius
1094290001Sglebius# Copyright (C) 2001-2014 Free Software Foundation, Inc.
1095290001Sglebius#
1096290001Sglebius# This file is free software; the Free Software Foundation
1097290001Sglebius# gives unlimited permission to copy and/or distribute it,
1098290001Sglebius# with or without modifications, as long as this notice is preserved.
1099290001Sglebius
1100290001Sglebius# AM_PROG_INSTALL_STRIP
1101290001Sglebius# ---------------------
1102290001Sglebius# One issue with vendor 'install' (even GNU) is that you can't
1103290001Sglebius# specify the program used to strip binaries.  This is especially
1104290001Sglebius# annoying in cross-compiling environments, where the build's strip
1105290001Sglebius# is unlikely to handle the host's binaries.
1106290001Sglebius# Fortunately install-sh will honor a STRIPPROG variable, so we
1107290001Sglebius# always use install-sh in "make install-strip", and initialize
1108290001Sglebius# STRIPPROG with the value of the STRIP variable (set by the user).
1109290001SglebiusAC_DEFUN([AM_PROG_INSTALL_STRIP],
1110290001Sglebius[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1111290001Sglebius# Installed binaries are usually stripped using 'strip' when the user
1112290001Sglebius# run "make install-strip".  However 'strip' might not be the right
1113290001Sglebius# tool to use in cross-compilation environments, therefore Automake
1114290001Sglebius# will honor the 'STRIP' environment variable to overrule this program.
1115290001Sglebiusdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1116290001Sglebiusif test "$cross_compiling" != no; then
1117290001Sglebius  AC_CHECK_TOOL([STRIP], [strip], :)
1118290001Sglebiusfi
1119290001SglebiusINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1120290001SglebiusAC_SUBST([INSTALL_STRIP_PROGRAM])])
1121290001Sglebius
1122290001Sglebius# Copyright (C) 2006-2014 Free Software Foundation, Inc.
1123290001Sglebius#
1124290001Sglebius# This file is free software; the Free Software Foundation
1125290001Sglebius# gives unlimited permission to copy and/or distribute it,
1126290001Sglebius# with or without modifications, as long as this notice is preserved.
1127290001Sglebius
1128290001Sglebius# _AM_SUBST_NOTMAKE(VARIABLE)
1129290001Sglebius# ---------------------------
1130290001Sglebius# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1131290001Sglebius# This macro is traced by Automake.
1132290001SglebiusAC_DEFUN([_AM_SUBST_NOTMAKE])
1133290001Sglebius
1134290001Sglebius# AM_SUBST_NOTMAKE(VARIABLE)
1135290001Sglebius# --------------------------
1136290001Sglebius# Public sister of _AM_SUBST_NOTMAKE.
1137290001SglebiusAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1138290001Sglebius
1139290001Sglebius# Check how to create a tarball.                            -*- Autoconf -*-
1140290001Sglebius
1141290001Sglebius# Copyright (C) 2004-2014 Free Software Foundation, Inc.
1142290001Sglebius#
1143290001Sglebius# This file is free software; the Free Software Foundation
1144290001Sglebius# gives unlimited permission to copy and/or distribute it,
1145290001Sglebius# with or without modifications, as long as this notice is preserved.
1146290001Sglebius
1147290001Sglebius# _AM_PROG_TAR(FORMAT)
1148290001Sglebius# --------------------
1149290001Sglebius# Check how to create a tarball in format FORMAT.
1150290001Sglebius# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1151290001Sglebius#
1152290001Sglebius# Substitute a variable $(am__tar) that is a command
1153290001Sglebius# writing to stdout a FORMAT-tarball containing the directory
1154290001Sglebius# $tardir.
1155290001Sglebius#     tardir=directory && $(am__tar) > result.tar
1156290001Sglebius#
1157290001Sglebius# Substitute a variable $(am__untar) that extract such
1158290001Sglebius# a tarball read from stdin.
1159290001Sglebius#     $(am__untar) < result.tar
1160290001Sglebius#
1161290001SglebiusAC_DEFUN([_AM_PROG_TAR],
1162290001Sglebius[# Always define AMTAR for backward compatibility.  Yes, it's still used
1163290001Sglebius# in the wild :-(  We should find a proper way to deprecate it ...
1164290001SglebiusAC_SUBST([AMTAR], ['$${TAR-tar}'])
1165290001Sglebius
1166290001Sglebius# We'll loop over all known methods to create a tar archive until one works.
1167290001Sglebius_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1168290001Sglebius
1169290001Sglebiusm4_if([$1], [v7],
1170290001Sglebius  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1171290001Sglebius
1172290001Sglebius  [m4_case([$1],
1173290001Sglebius    [ustar],
1174290001Sglebius     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1175290001Sglebius      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1176290001Sglebius      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1177290001Sglebius      # and bug#13588).
1178290001Sglebius      am_max_uid=2097151 # 2^21 - 1
1179290001Sglebius      am_max_gid=$am_max_uid
1180290001Sglebius      # The $UID and $GID variables are not portable, so we need to resort
1181290001Sglebius      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1182290001Sglebius      # below are definitely unexpected, so allow the users to see them
1183290001Sglebius      # (that is, avoid stderr redirection).
1184290001Sglebius      am_uid=`id -u || echo unknown`
1185290001Sglebius      am_gid=`id -g || echo unknown`
1186290001Sglebius      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1187290001Sglebius      if test $am_uid -le $am_max_uid; then
1188290001Sglebius         AC_MSG_RESULT([yes])
1189290001Sglebius      else
1190290001Sglebius         AC_MSG_RESULT([no])
1191290001Sglebius         _am_tools=none
1192290001Sglebius      fi
1193290001Sglebius      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1194290001Sglebius      if test $am_gid -le $am_max_gid; then
1195290001Sglebius         AC_MSG_RESULT([yes])
1196290001Sglebius      else
1197290001Sglebius        AC_MSG_RESULT([no])
1198290001Sglebius        _am_tools=none
1199290001Sglebius      fi],
1200290001Sglebius
1201290001Sglebius  [pax],
1202290001Sglebius    [],
1203290001Sglebius
1204290001Sglebius  [m4_fatal([Unknown tar format])])
1205290001Sglebius
1206290001Sglebius  AC_MSG_CHECKING([how to create a $1 tar archive])
1207290001Sglebius
1208290001Sglebius  # Go ahead even if we have the value already cached.  We do so because we
1209290001Sglebius  # need to set the values for the 'am__tar' and 'am__untar' variables.
1210290001Sglebius  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1211290001Sglebius
1212290001Sglebius  for _am_tool in $_am_tools; do
1213290001Sglebius    case $_am_tool in
1214290001Sglebius    gnutar)
1215290001Sglebius      for _am_tar in tar gnutar gtar; do
1216290001Sglebius        AM_RUN_LOG([$_am_tar --version]) && break
1217290001Sglebius      done
1218290001Sglebius      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1219290001Sglebius      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1220290001Sglebius      am__untar="$_am_tar -xf -"
1221290001Sglebius      ;;
1222290001Sglebius    plaintar)
1223290001Sglebius      # Must skip GNU tar: if it does not support --format= it doesn't create
1224290001Sglebius      # ustar tarball either.
1225290001Sglebius      (tar --version) >/dev/null 2>&1 && continue
1226290001Sglebius      am__tar='tar chf - "$$tardir"'
1227290001Sglebius      am__tar_='tar chf - "$tardir"'
1228290001Sglebius      am__untar='tar xf -'
1229290001Sglebius      ;;
1230290001Sglebius    pax)
1231290001Sglebius      am__tar='pax -L -x $1 -w "$$tardir"'
1232290001Sglebius      am__tar_='pax -L -x $1 -w "$tardir"'
1233290001Sglebius      am__untar='pax -r'
1234290001Sglebius      ;;
1235290001Sglebius    cpio)
1236290001Sglebius      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1237290001Sglebius      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1238290001Sglebius      am__untar='cpio -i -H $1 -d'
1239290001Sglebius      ;;
1240290001Sglebius    none)
1241290001Sglebius      am__tar=false
1242290001Sglebius      am__tar_=false
1243290001Sglebius      am__untar=false
1244290001Sglebius      ;;
1245290001Sglebius    esac
1246290001Sglebius
1247290001Sglebius    # If the value was cached, stop now.  We just wanted to have am__tar
1248290001Sglebius    # and am__untar set.
1249290001Sglebius    test -n "${am_cv_prog_tar_$1}" && break
1250290001Sglebius
1251290001Sglebius    # tar/untar a dummy directory, and stop if the command works.
1252290001Sglebius    rm -rf conftest.dir
1253290001Sglebius    mkdir conftest.dir
1254290001Sglebius    echo GrepMe > conftest.dir/file
1255290001Sglebius    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1256290001Sglebius    rm -rf conftest.dir
1257290001Sglebius    if test -s conftest.tar; then
1258290001Sglebius      AM_RUN_LOG([$am__untar <conftest.tar])
1259290001Sglebius      AM_RUN_LOG([cat conftest.dir/file])
1260290001Sglebius      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1261290001Sglebius    fi
1262290001Sglebius  done
1263290001Sglebius  rm -rf conftest.dir
1264290001Sglebius
1265290001Sglebius  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1266290001Sglebius  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1267290001Sglebius
1268290001SglebiusAC_SUBST([am__tar])
1269290001SglebiusAC_SUBST([am__untar])
1270290001Sglebius]) # _AM_PROG_TAR
1271290001Sglebius
1272290001Sglebiusm4_include([m4/ac_backport_259_ssizet.m4])
1273290001Sglebiusm4_include([m4/acx_pthread.m4])
1274290001Sglebiusm4_include([m4/libevent_openssl.m4])
1275290001Sglebiusm4_include([m4/libtool.m4])
1276290001Sglebiusm4_include([m4/ltoptions.m4])
1277290001Sglebiusm4_include([m4/ltsugar.m4])
1278290001Sglebiusm4_include([m4/ltversion.m4])
1279290001Sglebiusm4_include([m4/lt~obsolete.m4])
1280290001Sglebiusm4_include([m4/ntp_pkg_config.m4])
1281