xref: /netbsd/external/bsd/ntp/dist/aclocal.m4 (revision dd2e700f)
1*dd2e700fSchristos# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
2abb0f93cSkardel
3*dd2e700fSchristos# Copyright (C) 1996-2017 Free Software Foundation, Inc.
4b76cdf5cSchristos
5abb0f93cSkardel# This file is free software; the Free Software Foundation
6abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
7abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
8abb0f93cSkardel
9abb0f93cSkardel# This program is distributed in the hope that it will be useful,
10abb0f93cSkardel# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11abb0f93cSkardel# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12abb0f93cSkardel# PARTICULAR PURPOSE.
13abb0f93cSkardel
14b76cdf5cSchristosm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15abb0f93cSkardelm4_ifndef([AC_AUTOCONF_VERSION],
16abb0f93cSkardel  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17b76cdf5cSchristosm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18b76cdf5cSchristos[m4_warning([this file was generated for autoconf 2.69.
19abb0f93cSkardelYou have another version of autoconf.  It may work, but is not guaranteed to.
20abb0f93cSkardelIf you have problems, you may need to regenerate the build system entirely.
21b76cdf5cSchristosTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22abb0f93cSkardel
23*dd2e700fSchristos# longlong.m4 serial 17
24*dd2e700fSchristosdnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
25*dd2e700fSchristosdnl This file is free software; the Free Software Foundation
26*dd2e700fSchristosdnl gives unlimited permission to copy and/or distribute it,
27*dd2e700fSchristosdnl with or without modifications, as long as this notice is preserved.
285c58df45Schristos
29*dd2e700fSchristosdnl From Paul Eggert.
305c58df45Schristos
31*dd2e700fSchristos# Define HAVE_LONG_LONG_INT if 'long long int' works.
32*dd2e700fSchristos# This fixes a bug in Autoconf 2.61, and can be faster
33*dd2e700fSchristos# than what's in Autoconf 2.62 through 2.68.
345c58df45Schristos
35*dd2e700fSchristos# Note: If the type 'long long int' exists but is only 32 bits large
36*dd2e700fSchristos# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
37*dd2e700fSchristos# defined. In this case you can treat 'long long int' like 'long int'.
385c58df45Schristos
39*dd2e700fSchristosAC_DEFUN([AC_TYPE_LONG_LONG_INT],
405c58df45Schristos[
41*dd2e700fSchristos  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
42*dd2e700fSchristos  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
43*dd2e700fSchristos     [ac_cv_type_long_long_int=yes
44*dd2e700fSchristos      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
45*dd2e700fSchristos        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
46*dd2e700fSchristos        if test $ac_cv_type_long_long_int = yes; then
47*dd2e700fSchristos          dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
48*dd2e700fSchristos          dnl If cross compiling, assume the bug is not important, since
49*dd2e700fSchristos          dnl nobody cross compiles for this platform as far as we know.
50*dd2e700fSchristos          AC_RUN_IFELSE(
51*dd2e700fSchristos            [AC_LANG_PROGRAM(
52*dd2e700fSchristos               [[@%:@include <limits.h>
53*dd2e700fSchristos                 @%:@ifndef LLONG_MAX
54*dd2e700fSchristos                 @%:@ define HALF \
55*dd2e700fSchristos                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
56*dd2e700fSchristos                 @%:@ define LLONG_MAX (HALF - 1 + HALF)
57*dd2e700fSchristos                 @%:@endif]],
58*dd2e700fSchristos               [[long long int n = 1;
59*dd2e700fSchristos                 int i;
60*dd2e700fSchristos                 for (i = 0; ; i++)
61*dd2e700fSchristos                   {
62*dd2e700fSchristos                     long long int m = n << i;
63*dd2e700fSchristos                     if (m >> i != n)
64*dd2e700fSchristos                       return 1;
65*dd2e700fSchristos                     if (LLONG_MAX / 2 < m)
66*dd2e700fSchristos                       break;
67*dd2e700fSchristos                   }
68*dd2e700fSchristos                 return 0;]])],
69*dd2e700fSchristos            [],
70*dd2e700fSchristos            [ac_cv_type_long_long_int=no],
71*dd2e700fSchristos            [:])
72*dd2e700fSchristos        fi
73*dd2e700fSchristos      fi])
74*dd2e700fSchristos  if test $ac_cv_type_long_long_int = yes; then
75*dd2e700fSchristos    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
76*dd2e700fSchristos      [Define to 1 if the system has the type 'long long int'.])
77*dd2e700fSchristos  fi
785c58df45Schristos])
795c58df45Schristos
80*dd2e700fSchristos# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
81*dd2e700fSchristos# This fixes a bug in Autoconf 2.61, and can be faster
82*dd2e700fSchristos# than what's in Autoconf 2.62 through 2.68.
83*dd2e700fSchristos
84*dd2e700fSchristos# Note: If the type 'unsigned long long int' exists but is only 32 bits
85*dd2e700fSchristos# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
86*dd2e700fSchristos# will not be defined. In this case you can treat 'unsigned long long int'
87*dd2e700fSchristos# like 'unsigned long int'.
88*dd2e700fSchristos
89*dd2e700fSchristosAC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
90*dd2e700fSchristos[
91*dd2e700fSchristos  AC_CACHE_CHECK([for unsigned long long int],
92*dd2e700fSchristos    [ac_cv_type_unsigned_long_long_int],
93*dd2e700fSchristos    [ac_cv_type_unsigned_long_long_int=yes
94*dd2e700fSchristos     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
95*dd2e700fSchristos       AC_LINK_IFELSE(
96*dd2e700fSchristos         [_AC_TYPE_LONG_LONG_SNIPPET],
97*dd2e700fSchristos         [],
98*dd2e700fSchristos         [ac_cv_type_unsigned_long_long_int=no])
99*dd2e700fSchristos     fi])
100*dd2e700fSchristos  if test $ac_cv_type_unsigned_long_long_int = yes; then
101*dd2e700fSchristos    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
102*dd2e700fSchristos      [Define to 1 if the system has the type 'unsigned long long int'.])
103*dd2e700fSchristos  fi
104*dd2e700fSchristos])
105*dd2e700fSchristos
106*dd2e700fSchristos# Expands to a C program that can be used to test for simultaneous support
107*dd2e700fSchristos# of 'long long' and 'unsigned long long'. We don't want to say that
108*dd2e700fSchristos# 'long long' is available if 'unsigned long long' is not, or vice versa,
109*dd2e700fSchristos# because too many programs rely on the symmetry between signed and unsigned
110*dd2e700fSchristos# integer types (excluding 'bool').
111*dd2e700fSchristosAC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
112*dd2e700fSchristos[
113*dd2e700fSchristos  AC_LANG_PROGRAM(
114*dd2e700fSchristos    [[/* For now, do not test the preprocessor; as of 2007 there are too many
115*dd2e700fSchristos         implementations with broken preprocessors.  Perhaps this can
116*dd2e700fSchristos         be revisited in 2012.  In the meantime, code should not expect
117*dd2e700fSchristos         #if to work with literals wider than 32 bits.  */
118*dd2e700fSchristos      /* Test literals.  */
119*dd2e700fSchristos      long long int ll = 9223372036854775807ll;
120*dd2e700fSchristos      long long int nll = -9223372036854775807LL;
121*dd2e700fSchristos      unsigned long long int ull = 18446744073709551615ULL;
122*dd2e700fSchristos      /* Test constant expressions.   */
123*dd2e700fSchristos      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
124*dd2e700fSchristos                     ? 1 : -1)];
125*dd2e700fSchristos      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
126*dd2e700fSchristos                     ? 1 : -1)];
127*dd2e700fSchristos      int i = 63;]],
128*dd2e700fSchristos    [[/* Test availability of runtime routines for shift and division.  */
129*dd2e700fSchristos      long long int llmax = 9223372036854775807ll;
130*dd2e700fSchristos      unsigned long long int ullmax = 18446744073709551615ull;
131*dd2e700fSchristos      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
132*dd2e700fSchristos              | (llmax / ll) | (llmax % ll)
133*dd2e700fSchristos              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
134*dd2e700fSchristos              | (ullmax / ull) | (ullmax % ull));]])
135*dd2e700fSchristos])
136*dd2e700fSchristos
137*dd2e700fSchristos# Copyright (C) 2002-2017 Free Software Foundation, Inc.
138abb0f93cSkardel#
139abb0f93cSkardel# This file is free software; the Free Software Foundation
140abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
141abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
142abb0f93cSkardel
143abb0f93cSkardel# AM_AUTOMAKE_VERSION(VERSION)
144abb0f93cSkardel# ----------------------------
145abb0f93cSkardel# Automake X.Y traces this macro to ensure aclocal.m4 has been
146abb0f93cSkardel# generated from the m4 files accompanying Automake X.Y.
147abb0f93cSkardel# (This private macro should not be called outside this file.)
148abb0f93cSkardelAC_DEFUN([AM_AUTOMAKE_VERSION],
149b76cdf5cSchristos[am__api_version='1.15'
150abb0f93cSkardeldnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
151abb0f93cSkardeldnl require some minimum version.  Point them to the right macro.
152*dd2e700fSchristosm4_if([$1], [1.15.1], [],
153abb0f93cSkardel      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
154abb0f93cSkardel])
155abb0f93cSkardel
156abb0f93cSkardel# _AM_AUTOCONF_VERSION(VERSION)
157abb0f93cSkardel# -----------------------------
158abb0f93cSkardel# aclocal traces this macro to find the Autoconf version.
159abb0f93cSkardel# This is a private macro too.  Using m4_define simplifies
160abb0f93cSkardel# the logic in aclocal, which can simply ignore this definition.
161abb0f93cSkardelm4_define([_AM_AUTOCONF_VERSION], [])
162abb0f93cSkardel
163abb0f93cSkardel# AM_SET_CURRENT_AUTOMAKE_VERSION
164abb0f93cSkardel# -------------------------------
165abb0f93cSkardel# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
166abb0f93cSkardel# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
167abb0f93cSkardelAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
168*dd2e700fSchristos[AM_AUTOMAKE_VERSION([1.15.1])dnl
169abb0f93cSkardelm4_ifndef([AC_AUTOCONF_VERSION],
170abb0f93cSkardel  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
171abb0f93cSkardel_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
172abb0f93cSkardel
173*dd2e700fSchristos# Copyright (C) 2011-2017 Free Software Foundation, Inc.
174b76cdf5cSchristos#
175b76cdf5cSchristos# This file is free software; the Free Software Foundation
176b76cdf5cSchristos# gives unlimited permission to copy and/or distribute it,
177b76cdf5cSchristos# with or without modifications, as long as this notice is preserved.
178b76cdf5cSchristos
179b76cdf5cSchristos# AM_PROG_AR([ACT-IF-FAIL])
180b76cdf5cSchristos# -------------------------
181b76cdf5cSchristos# Try to determine the archiver interface, and trigger the ar-lib wrapper
182b76cdf5cSchristos# if it is needed.  If the detection of archiver interface fails, run
183b76cdf5cSchristos# ACT-IF-FAIL (default is to abort configure with a proper error message).
184b76cdf5cSchristosAC_DEFUN([AM_PROG_AR],
185b76cdf5cSchristos[AC_BEFORE([$0], [LT_INIT])dnl
186b76cdf5cSchristosAC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
187b76cdf5cSchristosAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
188b76cdf5cSchristosAC_REQUIRE_AUX_FILE([ar-lib])dnl
189b76cdf5cSchristosAC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
190b76cdf5cSchristos: ${AR=ar}
191b76cdf5cSchristos
192b76cdf5cSchristosAC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
193b76cdf5cSchristos  [AC_LANG_PUSH([C])
194b76cdf5cSchristos   am_cv_ar_interface=ar
195b76cdf5cSchristos   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
196b76cdf5cSchristos     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
197b76cdf5cSchristos      AC_TRY_EVAL([am_ar_try])
198b76cdf5cSchristos      if test "$ac_status" -eq 0; then
199b76cdf5cSchristos        am_cv_ar_interface=ar
200b76cdf5cSchristos      else
201b76cdf5cSchristos        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
202b76cdf5cSchristos        AC_TRY_EVAL([am_ar_try])
203b76cdf5cSchristos        if test "$ac_status" -eq 0; then
204b76cdf5cSchristos          am_cv_ar_interface=lib
205b76cdf5cSchristos        else
206b76cdf5cSchristos          am_cv_ar_interface=unknown
207b76cdf5cSchristos        fi
208b76cdf5cSchristos      fi
209b76cdf5cSchristos      rm -f conftest.lib libconftest.a
210b76cdf5cSchristos     ])
211b76cdf5cSchristos   AC_LANG_POP([C])])
212b76cdf5cSchristos
213b76cdf5cSchristoscase $am_cv_ar_interface in
214b76cdf5cSchristosar)
215b76cdf5cSchristos  ;;
216b76cdf5cSchristoslib)
217b76cdf5cSchristos  # Microsoft lib, so override with the ar-lib wrapper script.
218b76cdf5cSchristos  # FIXME: It is wrong to rewrite AR.
219b76cdf5cSchristos  # But if we don't then we get into trouble of one sort or another.
220b76cdf5cSchristos  # A longer-term fix would be to have automake use am__AR in this case,
221b76cdf5cSchristos  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
222b76cdf5cSchristos  # similar.
223b76cdf5cSchristos  AR="$am_aux_dir/ar-lib $AR"
224b76cdf5cSchristos  ;;
225b76cdf5cSchristosunknown)
226b76cdf5cSchristos  m4_default([$1],
227b76cdf5cSchristos             [AC_MSG_ERROR([could not determine $AR interface])])
228b76cdf5cSchristos  ;;
229b76cdf5cSchristosesac
230b76cdf5cSchristosAC_SUBST([AR])dnl
231b76cdf5cSchristos])
232b76cdf5cSchristos
233abb0f93cSkardel# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
234abb0f93cSkardel
235*dd2e700fSchristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
236abb0f93cSkardel#
237abb0f93cSkardel# This file is free software; the Free Software Foundation
238abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
239abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
240abb0f93cSkardel
241abb0f93cSkardel# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
242b76cdf5cSchristos# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
243b76cdf5cSchristos# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
244abb0f93cSkardel#
245abb0f93cSkardel# Of course, Automake must honor this variable whenever it calls a
246abb0f93cSkardel# tool from the auxiliary directory.  The problem is that $srcdir (and
247abb0f93cSkardel# therefore $ac_aux_dir as well) can be either absolute or relative,
248abb0f93cSkardel# depending on how configure is run.  This is pretty annoying, since
249abb0f93cSkardel# it makes $ac_aux_dir quite unusable in subdirectories: in the top
250abb0f93cSkardel# source directory, any form will work fine, but in subdirectories a
251abb0f93cSkardel# relative path needs to be adjusted first.
252abb0f93cSkardel#
253abb0f93cSkardel# $ac_aux_dir/missing
254abb0f93cSkardel#    fails when called from a subdirectory if $ac_aux_dir is relative
255abb0f93cSkardel# $top_srcdir/$ac_aux_dir/missing
256abb0f93cSkardel#    fails if $ac_aux_dir is absolute,
257abb0f93cSkardel#    fails when called from a subdirectory in a VPATH build with
258abb0f93cSkardel#          a relative $ac_aux_dir
259abb0f93cSkardel#
260abb0f93cSkardel# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
261abb0f93cSkardel# are both prefixed by $srcdir.  In an in-source build this is usually
262b76cdf5cSchristos# harmless because $srcdir is '.', but things will broke when you
263abb0f93cSkardel# start a VPATH build or use an absolute $srcdir.
264abb0f93cSkardel#
265abb0f93cSkardel# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
266abb0f93cSkardel# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
267abb0f93cSkardel#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
268abb0f93cSkardel# and then we would define $MISSING as
269abb0f93cSkardel#   MISSING="\${SHELL} $am_aux_dir/missing"
270abb0f93cSkardel# This will work as long as MISSING is not called from configure, because
271abb0f93cSkardel# unfortunately $(top_srcdir) has no meaning in configure.
272abb0f93cSkardel# However there are other variables, like CC, which are often used in
273abb0f93cSkardel# configure, and could therefore not use this "fixed" $ac_aux_dir.
274abb0f93cSkardel#
275abb0f93cSkardel# Another solution, used here, is to always expand $ac_aux_dir to an
276abb0f93cSkardel# absolute PATH.  The drawback is that using absolute paths prevent a
277abb0f93cSkardel# configured tree to be moved without reconfiguration.
278abb0f93cSkardel
279abb0f93cSkardelAC_DEFUN([AM_AUX_DIR_EXPAND],
280b76cdf5cSchristos[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
281b76cdf5cSchristos# Expand $ac_aux_dir to an absolute path.
282b76cdf5cSchristosam_aux_dir=`cd "$ac_aux_dir" && pwd`
283abb0f93cSkardel])
284abb0f93cSkardel
285abb0f93cSkardel# AM_CONDITIONAL                                            -*- Autoconf -*-
286abb0f93cSkardel
287*dd2e700fSchristos# Copyright (C) 1997-2017 Free Software Foundation, Inc.
288abb0f93cSkardel#
289abb0f93cSkardel# This file is free software; the Free Software Foundation
290abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
291abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
292abb0f93cSkardel
293abb0f93cSkardel# AM_CONDITIONAL(NAME, SHELL-CONDITION)
294abb0f93cSkardel# -------------------------------------
295abb0f93cSkardel# Define a conditional.
296abb0f93cSkardelAC_DEFUN([AM_CONDITIONAL],
297b76cdf5cSchristos[AC_PREREQ([2.52])dnl
298b76cdf5cSchristos m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
299abb0f93cSkardel       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
300abb0f93cSkardelAC_SUBST([$1_TRUE])dnl
301abb0f93cSkardelAC_SUBST([$1_FALSE])dnl
302abb0f93cSkardel_AM_SUBST_NOTMAKE([$1_TRUE])dnl
303abb0f93cSkardel_AM_SUBST_NOTMAKE([$1_FALSE])dnl
304abb0f93cSkardelm4_define([_AM_COND_VALUE_$1], [$2])dnl
305abb0f93cSkardelif $2; then
306abb0f93cSkardel  $1_TRUE=
307abb0f93cSkardel  $1_FALSE='#'
308abb0f93cSkardelelse
309abb0f93cSkardel  $1_TRUE='#'
310abb0f93cSkardel  $1_FALSE=
311abb0f93cSkardelfi
312abb0f93cSkardelAC_CONFIG_COMMANDS_PRE(
313abb0f93cSkardel[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
314abb0f93cSkardel  AC_MSG_ERROR([[conditional "$1" was never defined.
315abb0f93cSkardelUsually this means the macro was only invoked conditionally.]])
316abb0f93cSkardelfi])])
317abb0f93cSkardel
318*dd2e700fSchristos# Copyright (C) 1999-2017 Free Software Foundation, Inc.
319abb0f93cSkardel#
320abb0f93cSkardel# This file is free software; the Free Software Foundation
321abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
322abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
323abb0f93cSkardel
324abb0f93cSkardel
325b76cdf5cSchristos# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
326abb0f93cSkardel# written in clear, in which case automake, when reading aclocal.m4,
327abb0f93cSkardel# will think it sees a *use*, and therefore will trigger all it's
328abb0f93cSkardel# C support machinery.  Also note that it means that autoscan, seeing
329abb0f93cSkardel# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
330abb0f93cSkardel
331abb0f93cSkardel
332abb0f93cSkardel# _AM_DEPENDENCIES(NAME)
333abb0f93cSkardel# ----------------------
334abb0f93cSkardel# See how the compiler implements dependency checking.
335b76cdf5cSchristos# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
336abb0f93cSkardel# We try a few techniques and use that to set a single cache variable.
337abb0f93cSkardel#
338abb0f93cSkardel# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
339abb0f93cSkardel# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
340abb0f93cSkardel# dependency, and given that the user is not expected to run this macro,
341abb0f93cSkardel# just rely on AC_PROG_CC.
342abb0f93cSkardelAC_DEFUN([_AM_DEPENDENCIES],
343abb0f93cSkardel[AC_REQUIRE([AM_SET_DEPDIR])dnl
344abb0f93cSkardelAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
345abb0f93cSkardelAC_REQUIRE([AM_MAKE_INCLUDE])dnl
346abb0f93cSkardelAC_REQUIRE([AM_DEP_TRACK])dnl
347abb0f93cSkardel
348b76cdf5cSchristosm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
349b76cdf5cSchristos      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
350b76cdf5cSchristos      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
351b76cdf5cSchristos      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
352b76cdf5cSchristos      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
353b76cdf5cSchristos      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
354abb0f93cSkardel                    [depcc="$$1"   am_compiler_list=])
355abb0f93cSkardel
356abb0f93cSkardelAC_CACHE_CHECK([dependency style of $depcc],
357abb0f93cSkardel               [am_cv_$1_dependencies_compiler_type],
358abb0f93cSkardel[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
359abb0f93cSkardel  # We make a subdir and do the tests there.  Otherwise we can end up
360abb0f93cSkardel  # making bogus files that we don't know about and never remove.  For
361abb0f93cSkardel  # instance it was reported that on HP-UX the gcc test will end up
362b76cdf5cSchristos  # making a dummy file named 'D' -- because '-MD' means "put the output
363b76cdf5cSchristos  # in D".
364b76cdf5cSchristos  rm -rf conftest.dir
365abb0f93cSkardel  mkdir conftest.dir
366abb0f93cSkardel  # Copy depcomp to subdir because otherwise we won't find it if we're
367abb0f93cSkardel  # using a relative directory.
368abb0f93cSkardel  cp "$am_depcomp" conftest.dir
369abb0f93cSkardel  cd conftest.dir
370abb0f93cSkardel  # We will build objects and dependencies in a subdirectory because
371abb0f93cSkardel  # it helps to detect inapplicable dependency modes.  For instance
372abb0f93cSkardel  # both Tru64's cc and ICC support -MD to output dependencies as a
373abb0f93cSkardel  # side effect of compilation, but ICC will put the dependencies in
374abb0f93cSkardel  # the current directory while Tru64 will put them in the object
375abb0f93cSkardel  # directory.
376abb0f93cSkardel  mkdir sub
377abb0f93cSkardel
378abb0f93cSkardel  am_cv_$1_dependencies_compiler_type=none
379abb0f93cSkardel  if test "$am_compiler_list" = ""; then
380abb0f93cSkardel     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
381abb0f93cSkardel  fi
382abb0f93cSkardel  am__universal=false
383abb0f93cSkardel  m4_case([$1], [CC],
384abb0f93cSkardel    [case " $depcc " in #(
385abb0f93cSkardel     *\ -arch\ *\ -arch\ *) am__universal=true ;;
386abb0f93cSkardel     esac],
387abb0f93cSkardel    [CXX],
388abb0f93cSkardel    [case " $depcc " in #(
389abb0f93cSkardel     *\ -arch\ *\ -arch\ *) am__universal=true ;;
390abb0f93cSkardel     esac])
391abb0f93cSkardel
392abb0f93cSkardel  for depmode in $am_compiler_list; do
393abb0f93cSkardel    # Setup a source with many dependencies, because some compilers
394abb0f93cSkardel    # like to wrap large dependency lists on column 80 (with \), and
395abb0f93cSkardel    # we should not choose a depcomp mode which is confused by this.
396abb0f93cSkardel    #
397abb0f93cSkardel    # We need to recreate these files for each test, as the compiler may
398abb0f93cSkardel    # overwrite some of them when testing with obscure command lines.
399abb0f93cSkardel    # This happens at least with the AIX C compiler.
400abb0f93cSkardel    : > sub/conftest.c
401abb0f93cSkardel    for i in 1 2 3 4 5 6; do
402abb0f93cSkardel      echo '#include "conftst'$i'.h"' >> sub/conftest.c
403b76cdf5cSchristos      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
404b76cdf5cSchristos      # Solaris 10 /bin/sh.
405b76cdf5cSchristos      echo '/* dummy */' > sub/conftst$i.h
406abb0f93cSkardel    done
407abb0f93cSkardel    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
408abb0f93cSkardel
409b76cdf5cSchristos    # We check with '-c' and '-o' for the sake of the "dashmstdout"
410abb0f93cSkardel    # mode.  It turns out that the SunPro C++ compiler does not properly
411b76cdf5cSchristos    # handle '-M -o', and we need to detect this.  Also, some Intel
412b76cdf5cSchristos    # versions had trouble with output in subdirs.
413abb0f93cSkardel    am__obj=sub/conftest.${OBJEXT-o}
414abb0f93cSkardel    am__minus_obj="-o $am__obj"
415abb0f93cSkardel    case $depmode in
416abb0f93cSkardel    gcc)
417abb0f93cSkardel      # This depmode causes a compiler race in universal mode.
418abb0f93cSkardel      test "$am__universal" = false || continue
419abb0f93cSkardel      ;;
420abb0f93cSkardel    nosideeffect)
421b76cdf5cSchristos      # After this tag, mechanisms are not by side-effect, so they'll
422b76cdf5cSchristos      # only be used when explicitly requested.
423abb0f93cSkardel      if test "x$enable_dependency_tracking" = xyes; then
424abb0f93cSkardel	continue
425abb0f93cSkardel      else
426abb0f93cSkardel	break
427abb0f93cSkardel      fi
428abb0f93cSkardel      ;;
429b76cdf5cSchristos    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
430b76cdf5cSchristos      # This compiler won't grok '-c -o', but also, the minuso test has
431abb0f93cSkardel      # not run yet.  These depmodes are late enough in the game, and
432abb0f93cSkardel      # so weak that their functioning should not be impacted.
433abb0f93cSkardel      am__obj=conftest.${OBJEXT-o}
434abb0f93cSkardel      am__minus_obj=
435abb0f93cSkardel      ;;
436abb0f93cSkardel    none) break ;;
437abb0f93cSkardel    esac
438abb0f93cSkardel    if depmode=$depmode \
439abb0f93cSkardel       source=sub/conftest.c object=$am__obj \
440abb0f93cSkardel       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
441abb0f93cSkardel       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
442abb0f93cSkardel         >/dev/null 2>conftest.err &&
443abb0f93cSkardel       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
444abb0f93cSkardel       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
445abb0f93cSkardel       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
446abb0f93cSkardel       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
447abb0f93cSkardel      # icc doesn't choke on unknown options, it will just issue warnings
448abb0f93cSkardel      # or remarks (even with -Werror).  So we grep stderr for any message
449abb0f93cSkardel      # that says an option was ignored or not supported.
450abb0f93cSkardel      # When given -MP, icc 7.0 and 7.1 complain thusly:
451abb0f93cSkardel      #   icc: Command line warning: ignoring option '-M'; no argument required
452abb0f93cSkardel      # The diagnosis changed in icc 8.0:
453abb0f93cSkardel      #   icc: Command line remark: option '-MP' not supported
454abb0f93cSkardel      if (grep 'ignoring option' conftest.err ||
455abb0f93cSkardel          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
456abb0f93cSkardel        am_cv_$1_dependencies_compiler_type=$depmode
457abb0f93cSkardel        break
458abb0f93cSkardel      fi
459abb0f93cSkardel    fi
460abb0f93cSkardel  done
461abb0f93cSkardel
462abb0f93cSkardel  cd ..
463abb0f93cSkardel  rm -rf conftest.dir
464abb0f93cSkardelelse
465abb0f93cSkardel  am_cv_$1_dependencies_compiler_type=none
466abb0f93cSkardelfi
467abb0f93cSkardel])
468abb0f93cSkardelAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
469abb0f93cSkardelAM_CONDITIONAL([am__fastdep$1], [
470abb0f93cSkardel  test "x$enable_dependency_tracking" != xno \
471abb0f93cSkardel  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
472abb0f93cSkardel])
473abb0f93cSkardel
474abb0f93cSkardel
475abb0f93cSkardel# AM_SET_DEPDIR
476abb0f93cSkardel# -------------
477abb0f93cSkardel# Choose a directory name for dependency files.
478b76cdf5cSchristos# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
479abb0f93cSkardelAC_DEFUN([AM_SET_DEPDIR],
480abb0f93cSkardel[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
481abb0f93cSkardelAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
482abb0f93cSkardel])
483abb0f93cSkardel
484abb0f93cSkardel
485abb0f93cSkardel# AM_DEP_TRACK
486abb0f93cSkardel# ------------
487abb0f93cSkardelAC_DEFUN([AM_DEP_TRACK],
488b76cdf5cSchristos[AC_ARG_ENABLE([dependency-tracking], [dnl
489b76cdf5cSchristosAS_HELP_STRING(
490b76cdf5cSchristos  [--enable-dependency-tracking],
491b76cdf5cSchristos  [do not reject slow dependency extractors])
492b76cdf5cSchristosAS_HELP_STRING(
493b76cdf5cSchristos  [--disable-dependency-tracking],
494b76cdf5cSchristos  [speeds up one-time build])])
495abb0f93cSkardelif test "x$enable_dependency_tracking" != xno; then
496abb0f93cSkardel  am_depcomp="$ac_aux_dir/depcomp"
497abb0f93cSkardel  AMDEPBACKSLASH='\'
498b76cdf5cSchristos  am__nodep='_no'
499abb0f93cSkardelfi
500abb0f93cSkardelAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
501abb0f93cSkardelAC_SUBST([AMDEPBACKSLASH])dnl
502abb0f93cSkardel_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
503b76cdf5cSchristosAC_SUBST([am__nodep])dnl
504b76cdf5cSchristos_AM_SUBST_NOTMAKE([am__nodep])dnl
505abb0f93cSkardel])
506abb0f93cSkardel
507abb0f93cSkardel# Generate code to set up dependency tracking.              -*- Autoconf -*-
508abb0f93cSkardel
509*dd2e700fSchristos# Copyright (C) 1999-2017 Free Software Foundation, Inc.
510abb0f93cSkardel#
511abb0f93cSkardel# This file is free software; the Free Software Foundation
512abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
513abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
514abb0f93cSkardel
515abb0f93cSkardel
516abb0f93cSkardel# _AM_OUTPUT_DEPENDENCY_COMMANDS
517abb0f93cSkardel# ------------------------------
518abb0f93cSkardelAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
519abb0f93cSkardel[{
520b76cdf5cSchristos  # Older Autoconf quotes --file arguments for eval, but not when files
521abb0f93cSkardel  # are listed without --file.  Let's play safe and only enable the eval
522abb0f93cSkardel  # if we detect the quoting.
523abb0f93cSkardel  case $CONFIG_FILES in
524abb0f93cSkardel  *\'*) eval set x "$CONFIG_FILES" ;;
525abb0f93cSkardel  *)   set x $CONFIG_FILES ;;
526abb0f93cSkardel  esac
527abb0f93cSkardel  shift
528abb0f93cSkardel  for mf
529abb0f93cSkardel  do
530abb0f93cSkardel    # Strip MF so we end up with the name of the file.
531abb0f93cSkardel    mf=`echo "$mf" | sed -e 's/:.*$//'`
532abb0f93cSkardel    # Check whether this is an Automake generated Makefile or not.
533b76cdf5cSchristos    # We used to match only the files named 'Makefile.in', but
534abb0f93cSkardel    # some people rename them; so instead we look at the file content.
535abb0f93cSkardel    # Grep'ing the first line is not enough: some people post-process
536abb0f93cSkardel    # each Makefile.in and add a new line on top of each file to say so.
537abb0f93cSkardel    # Grep'ing the whole file is not good either: AIX grep has a line
538abb0f93cSkardel    # limit of 2048, but all sed's we know have understand at least 4000.
539abb0f93cSkardel    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
540abb0f93cSkardel      dirpart=`AS_DIRNAME("$mf")`
541abb0f93cSkardel    else
542abb0f93cSkardel      continue
543abb0f93cSkardel    fi
544abb0f93cSkardel    # Extract the definition of DEPDIR, am__include, and am__quote
545b76cdf5cSchristos    # from the Makefile without running 'make'.
546abb0f93cSkardel    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
547abb0f93cSkardel    test -z "$DEPDIR" && continue
548abb0f93cSkardel    am__include=`sed -n 's/^am__include = //p' < "$mf"`
549b76cdf5cSchristos    test -z "$am__include" && continue
550abb0f93cSkardel    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
551abb0f93cSkardel    # Find all dependency output files, they are included files with
552abb0f93cSkardel    # $(DEPDIR) in their names.  We invoke sed twice because it is the
553abb0f93cSkardel    # simplest approach to changing $(DEPDIR) to its actual value in the
554abb0f93cSkardel    # expansion.
555abb0f93cSkardel    for file in `sed -n "
556abb0f93cSkardel      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
557b76cdf5cSchristos	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
558abb0f93cSkardel      # Make sure the directory exists.
559abb0f93cSkardel      test -f "$dirpart/$file" && continue
560abb0f93cSkardel      fdir=`AS_DIRNAME(["$file"])`
561abb0f93cSkardel      AS_MKDIR_P([$dirpart/$fdir])
562abb0f93cSkardel      # echo "creating $dirpart/$file"
563abb0f93cSkardel      echo '# dummy' > "$dirpart/$file"
564abb0f93cSkardel    done
565abb0f93cSkardel  done
566abb0f93cSkardel}
567abb0f93cSkardel])# _AM_OUTPUT_DEPENDENCY_COMMANDS
568abb0f93cSkardel
569abb0f93cSkardel
570abb0f93cSkardel# AM_OUTPUT_DEPENDENCY_COMMANDS
571abb0f93cSkardel# -----------------------------
572abb0f93cSkardel# This macro should only be invoked once -- use via AC_REQUIRE.
573abb0f93cSkardel#
574abb0f93cSkardel# This code is only required when automatic dependency tracking
575b76cdf5cSchristos# is enabled.  FIXME.  This creates each '.P' file that we will
576abb0f93cSkardel# need in order to bootstrap the dependency handling code.
577abb0f93cSkardelAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
578abb0f93cSkardel[AC_CONFIG_COMMANDS([depfiles],
579abb0f93cSkardel     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
580abb0f93cSkardel     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
581abb0f93cSkardel])
582abb0f93cSkardel
583abb0f93cSkardel# Do all the work for Automake.                             -*- Autoconf -*-
584abb0f93cSkardel
585*dd2e700fSchristos# Copyright (C) 1996-2017 Free Software Foundation, Inc.
586abb0f93cSkardel#
587abb0f93cSkardel# This file is free software; the Free Software Foundation
588abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
589abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
590abb0f93cSkardel
591abb0f93cSkardel# This macro actually does too much.  Some checks are only needed if
592abb0f93cSkardel# your package does certain things.  But this isn't really a big deal.
593abb0f93cSkardel
594b76cdf5cSchristosdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
595b76cdf5cSchristosm4_define([AC_PROG_CC],
596b76cdf5cSchristosm4_defn([AC_PROG_CC])
597b76cdf5cSchristos[_AM_PROG_CC_C_O
598b76cdf5cSchristos])
599b76cdf5cSchristos
600abb0f93cSkardel# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
601abb0f93cSkardel# AM_INIT_AUTOMAKE([OPTIONS])
602abb0f93cSkardel# -----------------------------------------------
603abb0f93cSkardel# The call with PACKAGE and VERSION arguments is the old style
604abb0f93cSkardel# call (pre autoconf-2.50), which is being phased out.  PACKAGE
605abb0f93cSkardel# and VERSION should now be passed to AC_INIT and removed from
606abb0f93cSkardel# the call to AM_INIT_AUTOMAKE.
607abb0f93cSkardel# We support both call styles for the transition.  After
608abb0f93cSkardel# the next Automake release, Autoconf can make the AC_INIT
609abb0f93cSkardel# arguments mandatory, and then we can depend on a new Autoconf
610abb0f93cSkardel# release and drop the old call support.
611abb0f93cSkardelAC_DEFUN([AM_INIT_AUTOMAKE],
612b76cdf5cSchristos[AC_PREREQ([2.65])dnl
613abb0f93cSkardeldnl Autoconf wants to disallow AM_ names.  We explicitly allow
614abb0f93cSkardeldnl the ones we care about.
615abb0f93cSkardelm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
616abb0f93cSkardelAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
617abb0f93cSkardelAC_REQUIRE([AC_PROG_INSTALL])dnl
618abb0f93cSkardelif test "`cd $srcdir && pwd`" != "`pwd`"; then
619abb0f93cSkardel  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
620abb0f93cSkardel  # is not polluted with repeated "-I."
621abb0f93cSkardel  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
622abb0f93cSkardel  # test to see if srcdir already configured
623abb0f93cSkardel  if test -f $srcdir/config.status; then
624abb0f93cSkardel    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
625abb0f93cSkardel  fi
626abb0f93cSkardelfi
627abb0f93cSkardel
628abb0f93cSkardel# test whether we have cygpath
629abb0f93cSkardelif test -z "$CYGPATH_W"; then
630abb0f93cSkardel  if (cygpath --version) >/dev/null 2>/dev/null; then
631abb0f93cSkardel    CYGPATH_W='cygpath -w'
632abb0f93cSkardel  else
633abb0f93cSkardel    CYGPATH_W=echo
634abb0f93cSkardel  fi
635abb0f93cSkardelfi
636abb0f93cSkardelAC_SUBST([CYGPATH_W])
637abb0f93cSkardel
638abb0f93cSkardel# Define the identity of the package.
639abb0f93cSkardeldnl Distinguish between old-style and new-style calls.
640abb0f93cSkardelm4_ifval([$2],
641b76cdf5cSchristos[AC_DIAGNOSE([obsolete],
642b76cdf5cSchristos             [$0: two- and three-arguments forms are deprecated.])
643b76cdf5cSchristosm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
644abb0f93cSkardel AC_SUBST([PACKAGE], [$1])dnl
645abb0f93cSkardel AC_SUBST([VERSION], [$2])],
646abb0f93cSkardel[_AM_SET_OPTIONS([$1])dnl
647abb0f93cSkardeldnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
648b76cdf5cSchristosm4_if(
649b76cdf5cSchristos  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
650b76cdf5cSchristos  [ok:ok],,
651abb0f93cSkardel  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
652abb0f93cSkardel AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
653abb0f93cSkardel AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
654abb0f93cSkardel
655abb0f93cSkardel_AM_IF_OPTION([no-define],,
656b76cdf5cSchristos[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
657b76cdf5cSchristos AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
658abb0f93cSkardel
659abb0f93cSkardel# Some tools Automake needs.
660abb0f93cSkardelAC_REQUIRE([AM_SANITY_CHECK])dnl
661abb0f93cSkardelAC_REQUIRE([AC_ARG_PROGRAM])dnl
662b76cdf5cSchristosAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
663b76cdf5cSchristosAM_MISSING_PROG([AUTOCONF], [autoconf])
664b76cdf5cSchristosAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
665b76cdf5cSchristosAM_MISSING_PROG([AUTOHEADER], [autoheader])
666b76cdf5cSchristosAM_MISSING_PROG([MAKEINFO], [makeinfo])
667abb0f93cSkardelAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
668abb0f93cSkardelAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
669b76cdf5cSchristosAC_REQUIRE([AC_PROG_MKDIR_P])dnl
670b76cdf5cSchristos# For better backward compatibility.  To be removed once Automake 1.9.x
671b76cdf5cSchristos# dies out for good.  For more background, see:
672b76cdf5cSchristos# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
673b76cdf5cSchristos# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
674b76cdf5cSchristosAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
675b76cdf5cSchristos# We need awk for the "check" target (and possibly the TAP driver).  The
676b76cdf5cSchristos# system "awk" is bad on some platforms.
677abb0f93cSkardelAC_REQUIRE([AC_PROG_AWK])dnl
678abb0f93cSkardelAC_REQUIRE([AC_PROG_MAKE_SET])dnl
679abb0f93cSkardelAC_REQUIRE([AM_SET_LEADING_DOT])dnl
680abb0f93cSkardel_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
681abb0f93cSkardel	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
682abb0f93cSkardel			     [_AM_PROG_TAR([v7])])])
683abb0f93cSkardel_AM_IF_OPTION([no-dependencies],,
684abb0f93cSkardel[AC_PROVIDE_IFELSE([AC_PROG_CC],
685b76cdf5cSchristos		  [_AM_DEPENDENCIES([CC])],
686b76cdf5cSchristos		  [m4_define([AC_PROG_CC],
687b76cdf5cSchristos			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
688abb0f93cSkardelAC_PROVIDE_IFELSE([AC_PROG_CXX],
689b76cdf5cSchristos		  [_AM_DEPENDENCIES([CXX])],
690b76cdf5cSchristos		  [m4_define([AC_PROG_CXX],
691b76cdf5cSchristos			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
692abb0f93cSkardelAC_PROVIDE_IFELSE([AC_PROG_OBJC],
693b76cdf5cSchristos		  [_AM_DEPENDENCIES([OBJC])],
694b76cdf5cSchristos		  [m4_define([AC_PROG_OBJC],
695b76cdf5cSchristos			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
696b76cdf5cSchristosAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
697b76cdf5cSchristos		  [_AM_DEPENDENCIES([OBJCXX])],
698b76cdf5cSchristos		  [m4_define([AC_PROG_OBJCXX],
699b76cdf5cSchristos			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
700abb0f93cSkardel])
701b76cdf5cSchristosAC_REQUIRE([AM_SILENT_RULES])dnl
702b76cdf5cSchristosdnl The testsuite driver may need to know about EXEEXT, so add the
703b76cdf5cSchristosdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
704b76cdf5cSchristosdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
705abb0f93cSkardelAC_CONFIG_COMMANDS_PRE(dnl
706abb0f93cSkardel[m4_provide_if([_AM_COMPILER_EXEEXT],
707abb0f93cSkardel  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
708b76cdf5cSchristos
709b76cdf5cSchristos# POSIX will say in a future version that running "rm -f" with no argument
710b76cdf5cSchristos# is OK; and we want to be able to make that assumption in our Makefile
711b76cdf5cSchristos# recipes.  So use an aggressive probe to check that the usage we want is
712b76cdf5cSchristos# actually supported "in the wild" to an acceptable degree.
713b76cdf5cSchristos# See automake bug#10828.
714b76cdf5cSchristos# To make any issue more visible, cause the running configure to be aborted
715b76cdf5cSchristos# by default if the 'rm' program in use doesn't match our expectations; the
716b76cdf5cSchristos# user can still override this though.
717b76cdf5cSchristosif rm -f && rm -fr && rm -rf; then : OK; else
718b76cdf5cSchristos  cat >&2 <<'END'
719b76cdf5cSchristosOops!
720b76cdf5cSchristos
721b76cdf5cSchristosYour 'rm' program seems unable to run without file operands specified
722b76cdf5cSchristoson the command line, even when the '-f' option is present.  This is contrary
723b76cdf5cSchristosto the behaviour of most rm programs out there, and not conforming with
724b76cdf5cSchristosthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
725b76cdf5cSchristos
726b76cdf5cSchristosPlease tell bug-automake@gnu.org about your system, including the value
727b76cdf5cSchristosof your $PATH and any error possibly output before this message.  This
728b76cdf5cSchristoscan help us improve future automake versions.
729b76cdf5cSchristos
730b76cdf5cSchristosEND
731b76cdf5cSchristos  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
732b76cdf5cSchristos    echo 'Configuration will proceed anyway, since you have set the' >&2
733b76cdf5cSchristos    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
734b76cdf5cSchristos    echo >&2
735b76cdf5cSchristos  else
736b76cdf5cSchristos    cat >&2 <<'END'
737b76cdf5cSchristosAborting the configuration process, to ensure you take notice of the issue.
738b76cdf5cSchristos
739b76cdf5cSchristosYou can download and install GNU coreutils to get an 'rm' implementation
740b76cdf5cSchristosthat behaves properly: <http://www.gnu.org/software/coreutils/>.
741b76cdf5cSchristos
742b76cdf5cSchristosIf you want to complete the configuration process using your problematic
743b76cdf5cSchristos'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
744b76cdf5cSchristosto "yes", and re-run configure.
745b76cdf5cSchristos
746b76cdf5cSchristosEND
747b76cdf5cSchristos    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
748b76cdf5cSchristos  fi
749b76cdf5cSchristosfi
750b76cdf5cSchristosdnl The trailing newline in this macro's definition is deliberate, for
751b76cdf5cSchristosdnl backward compatibility and to allow trailing 'dnl'-style comments
752b76cdf5cSchristosdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
753abb0f93cSkardel])
754abb0f93cSkardel
755b76cdf5cSchristosdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
756abb0f93cSkardeldnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
757abb0f93cSkardeldnl mangled by Autoconf and run in a shell conditional statement.
758abb0f93cSkardelm4_define([_AC_COMPILER_EXEEXT],
759abb0f93cSkardelm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
760abb0f93cSkardel
761abb0f93cSkardel# When config.status generates a header, we must update the stamp-h file.
762abb0f93cSkardel# This file resides in the same directory as the config header
763abb0f93cSkardel# that is generated.  The stamp files are numbered to have different names.
764abb0f93cSkardel
765abb0f93cSkardel# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
766abb0f93cSkardel# loop where config.status creates the headers, so we can generate
767abb0f93cSkardel# our stamp files there.
768abb0f93cSkardelAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
769abb0f93cSkardel[# Compute $1's index in $config_headers.
770abb0f93cSkardel_am_arg=$1
771abb0f93cSkardel_am_stamp_count=1
772abb0f93cSkardelfor _am_header in $config_headers :; do
773abb0f93cSkardel  case $_am_header in
774abb0f93cSkardel    $_am_arg | $_am_arg:* )
775abb0f93cSkardel      break ;;
776abb0f93cSkardel    * )
777abb0f93cSkardel      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
778abb0f93cSkardel  esac
779abb0f93cSkardeldone
780abb0f93cSkardelecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
781abb0f93cSkardel
782*dd2e700fSchristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
783abb0f93cSkardel#
784abb0f93cSkardel# This file is free software; the Free Software Foundation
785abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
786abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
787abb0f93cSkardel
788abb0f93cSkardel# AM_PROG_INSTALL_SH
789abb0f93cSkardel# ------------------
790abb0f93cSkardel# Define $install_sh.
791abb0f93cSkardelAC_DEFUN([AM_PROG_INSTALL_SH],
792abb0f93cSkardel[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
793b76cdf5cSchristosif test x"${install_sh+set}" != xset; then
794abb0f93cSkardel  case $am_aux_dir in
795abb0f93cSkardel  *\ * | *\	*)
796abb0f93cSkardel    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
797abb0f93cSkardel  *)
798abb0f93cSkardel    install_sh="\${SHELL} $am_aux_dir/install-sh"
799abb0f93cSkardel  esac
800abb0f93cSkardelfi
801b76cdf5cSchristosAC_SUBST([install_sh])])
802abb0f93cSkardel
803*dd2e700fSchristos# Copyright (C) 2003-2017 Free Software Foundation, Inc.
804abb0f93cSkardel#
805abb0f93cSkardel# This file is free software; the Free Software Foundation
806abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
807abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
808abb0f93cSkardel
809abb0f93cSkardel# Check whether the underlying file-system supports filenames
810abb0f93cSkardel# with a leading dot.  For instance MS-DOS doesn't.
811abb0f93cSkardelAC_DEFUN([AM_SET_LEADING_DOT],
812abb0f93cSkardel[rm -rf .tst 2>/dev/null
813abb0f93cSkardelmkdir .tst 2>/dev/null
814abb0f93cSkardelif test -d .tst; then
815abb0f93cSkardel  am__leading_dot=.
816abb0f93cSkardelelse
817abb0f93cSkardel  am__leading_dot=_
818abb0f93cSkardelfi
819abb0f93cSkardelrmdir .tst 2>/dev/null
820abb0f93cSkardelAC_SUBST([am__leading_dot])])
821abb0f93cSkardel
822abb0f93cSkardel# Check to see how 'make' treats includes.	            -*- Autoconf -*-
823abb0f93cSkardel
824*dd2e700fSchristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
825abb0f93cSkardel#
826abb0f93cSkardel# This file is free software; the Free Software Foundation
827abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
828abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
829abb0f93cSkardel
830abb0f93cSkardel# AM_MAKE_INCLUDE()
831abb0f93cSkardel# -----------------
832abb0f93cSkardel# Check to see how make treats includes.
833abb0f93cSkardelAC_DEFUN([AM_MAKE_INCLUDE],
834abb0f93cSkardel[am_make=${MAKE-make}
835abb0f93cSkardelcat > confinc << 'END'
836abb0f93cSkardelam__doit:
837abb0f93cSkardel	@echo this is the am__doit target
838abb0f93cSkardel.PHONY: am__doit
839abb0f93cSkardelEND
840abb0f93cSkardel# If we don't find an include directive, just comment out the code.
841abb0f93cSkardelAC_MSG_CHECKING([for style of include used by $am_make])
842abb0f93cSkardelam__include="#"
843abb0f93cSkardelam__quote=
844abb0f93cSkardel_am_result=none
845abb0f93cSkardel# First try GNU make style include.
846abb0f93cSkardelecho "include confinc" > confmf
847b76cdf5cSchristos# Ignore all kinds of additional output from 'make'.
848abb0f93cSkardelcase `$am_make -s -f confmf 2> /dev/null` in #(
849abb0f93cSkardel*the\ am__doit\ target*)
850abb0f93cSkardel  am__include=include
851abb0f93cSkardel  am__quote=
852abb0f93cSkardel  _am_result=GNU
853abb0f93cSkardel  ;;
854abb0f93cSkardelesac
855abb0f93cSkardel# Now try BSD make style include.
856abb0f93cSkardelif test "$am__include" = "#"; then
857abb0f93cSkardel   echo '.include "confinc"' > confmf
858abb0f93cSkardel   case `$am_make -s -f confmf 2> /dev/null` in #(
859abb0f93cSkardel   *the\ am__doit\ target*)
860abb0f93cSkardel     am__include=.include
861abb0f93cSkardel     am__quote="\""
862abb0f93cSkardel     _am_result=BSD
863abb0f93cSkardel     ;;
864abb0f93cSkardel   esac
865abb0f93cSkardelfi
866abb0f93cSkardelAC_SUBST([am__include])
867abb0f93cSkardelAC_SUBST([am__quote])
868abb0f93cSkardelAC_MSG_RESULT([$_am_result])
869abb0f93cSkardelrm -f confinc confmf
870abb0f93cSkardel])
871abb0f93cSkardel
872abb0f93cSkardel# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
873abb0f93cSkardel
874*dd2e700fSchristos# Copyright (C) 1997-2017 Free Software Foundation, Inc.
875abb0f93cSkardel#
876abb0f93cSkardel# This file is free software; the Free Software Foundation
877abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
878abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
879abb0f93cSkardel
880abb0f93cSkardel# AM_MISSING_PROG(NAME, PROGRAM)
881abb0f93cSkardel# ------------------------------
882abb0f93cSkardelAC_DEFUN([AM_MISSING_PROG],
883abb0f93cSkardel[AC_REQUIRE([AM_MISSING_HAS_RUN])
884abb0f93cSkardel$1=${$1-"${am_missing_run}$2"}
885abb0f93cSkardelAC_SUBST($1)])
886abb0f93cSkardel
887abb0f93cSkardel# AM_MISSING_HAS_RUN
888abb0f93cSkardel# ------------------
889b76cdf5cSchristos# Define MISSING if not defined so far and test if it is modern enough.
890b76cdf5cSchristos# If it is, set am_missing_run to use it, otherwise, to nothing.
891abb0f93cSkardelAC_DEFUN([AM_MISSING_HAS_RUN],
892abb0f93cSkardel[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
893abb0f93cSkardelAC_REQUIRE_AUX_FILE([missing])dnl
894abb0f93cSkardelif test x"${MISSING+set}" != xset; then
895abb0f93cSkardel  case $am_aux_dir in
896abb0f93cSkardel  *\ * | *\	*)
897abb0f93cSkardel    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
898abb0f93cSkardel  *)
899abb0f93cSkardel    MISSING="\${SHELL} $am_aux_dir/missing" ;;
900abb0f93cSkardel  esac
901abb0f93cSkardelfi
902abb0f93cSkardel# Use eval to expand $SHELL
903b76cdf5cSchristosif eval "$MISSING --is-lightweight"; then
904b76cdf5cSchristos  am_missing_run="$MISSING "
905abb0f93cSkardelelse
906abb0f93cSkardel  am_missing_run=
907b76cdf5cSchristos  AC_MSG_WARN(['missing' script is too old or missing])
908abb0f93cSkardelfi
909abb0f93cSkardel])
910abb0f93cSkardel
911abb0f93cSkardel# Helper functions for option handling.                     -*- Autoconf -*-
912abb0f93cSkardel
913*dd2e700fSchristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
914abb0f93cSkardel#
915abb0f93cSkardel# This file is free software; the Free Software Foundation
916abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
917abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
918abb0f93cSkardel
919abb0f93cSkardel# _AM_MANGLE_OPTION(NAME)
920abb0f93cSkardel# -----------------------
921abb0f93cSkardelAC_DEFUN([_AM_MANGLE_OPTION],
922abb0f93cSkardel[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
923abb0f93cSkardel
924abb0f93cSkardel# _AM_SET_OPTION(NAME)
925b76cdf5cSchristos# --------------------
926abb0f93cSkardel# Set option NAME.  Presently that only means defining a flag for this option.
927abb0f93cSkardelAC_DEFUN([_AM_SET_OPTION],
928b76cdf5cSchristos[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
929abb0f93cSkardel
930abb0f93cSkardel# _AM_SET_OPTIONS(OPTIONS)
931b76cdf5cSchristos# ------------------------
932abb0f93cSkardel# OPTIONS is a space-separated list of Automake options.
933abb0f93cSkardelAC_DEFUN([_AM_SET_OPTIONS],
934abb0f93cSkardel[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
935abb0f93cSkardel
936abb0f93cSkardel# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
937abb0f93cSkardel# -------------------------------------------
938abb0f93cSkardel# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
939abb0f93cSkardelAC_DEFUN([_AM_IF_OPTION],
940abb0f93cSkardel[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
941abb0f93cSkardel
942*dd2e700fSchristos# Copyright (C) 1999-2017 Free Software Foundation, Inc.
943abb0f93cSkardel#
944abb0f93cSkardel# This file is free software; the Free Software Foundation
945abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
946abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
947abb0f93cSkardel
948b76cdf5cSchristos# _AM_PROG_CC_C_O
949b76cdf5cSchristos# ---------------
950b76cdf5cSchristos# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
951b76cdf5cSchristos# to automatically call this.
952b76cdf5cSchristosAC_DEFUN([_AM_PROG_CC_C_O],
953b76cdf5cSchristos[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
954b76cdf5cSchristosAC_REQUIRE_AUX_FILE([compile])dnl
955b76cdf5cSchristosAC_LANG_PUSH([C])dnl
956b76cdf5cSchristosAC_CACHE_CHECK(
957b76cdf5cSchristos  [whether $CC understands -c and -o together],
958b76cdf5cSchristos  [am_cv_prog_cc_c_o],
959b76cdf5cSchristos  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
960b76cdf5cSchristos  # Make sure it works both with $CC and with simple cc.
961b76cdf5cSchristos  # Following AC_PROG_CC_C_O, we do the test twice because some
962b76cdf5cSchristos  # compilers refuse to overwrite an existing .o file with -o,
963b76cdf5cSchristos  # though they will create one.
964b76cdf5cSchristos  am_cv_prog_cc_c_o=yes
965b76cdf5cSchristos  for am_i in 1 2; do
966b76cdf5cSchristos    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
967b76cdf5cSchristos         && test -f conftest2.$ac_objext; then
968b76cdf5cSchristos      : OK
969b76cdf5cSchristos    else
970b76cdf5cSchristos      am_cv_prog_cc_c_o=no
971b76cdf5cSchristos      break
972b76cdf5cSchristos    fi
973b76cdf5cSchristos  done
974b76cdf5cSchristos  rm -f core conftest*
975b76cdf5cSchristos  unset am_i])
976b76cdf5cSchristosif test "$am_cv_prog_cc_c_o" != yes; then
977b76cdf5cSchristos   # Losing compiler, so override with the script.
978b76cdf5cSchristos   # FIXME: It is wrong to rewrite CC.
979b76cdf5cSchristos   # But if we don't then we get into trouble of one sort or another.
980b76cdf5cSchristos   # A longer-term fix would be to have automake use am__CC in this case,
981b76cdf5cSchristos   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
982b76cdf5cSchristos   CC="$am_aux_dir/compile $CC"
983b76cdf5cSchristosfi
984b76cdf5cSchristosAC_LANG_POP([C])])
985b76cdf5cSchristos
986b76cdf5cSchristos# For backward compatibility.
987b76cdf5cSchristosAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
988b76cdf5cSchristos
989*dd2e700fSchristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
990b76cdf5cSchristos#
991b76cdf5cSchristos# This file is free software; the Free Software Foundation
992b76cdf5cSchristos# gives unlimited permission to copy and/or distribute it,
993b76cdf5cSchristos# with or without modifications, as long as this notice is preserved.
994b76cdf5cSchristos
995b76cdf5cSchristos# AM_RUN_LOG(COMMAND)
996b76cdf5cSchristos# -------------------
997b76cdf5cSchristos# Run COMMAND, save the exit status in ac_status, and log it.
998b76cdf5cSchristos# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
999b76cdf5cSchristosAC_DEFUN([AM_RUN_LOG],
1000b76cdf5cSchristos[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1001b76cdf5cSchristos   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1002b76cdf5cSchristos   ac_status=$?
1003b76cdf5cSchristos   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1004b76cdf5cSchristos   (exit $ac_status); }])
1005b76cdf5cSchristos
1006b76cdf5cSchristos# Check to make sure that the build environment is sane.    -*- Autoconf -*-
1007b76cdf5cSchristos
1008*dd2e700fSchristos# Copyright (C) 1996-2017 Free Software Foundation, Inc.
1009b76cdf5cSchristos#
1010b76cdf5cSchristos# This file is free software; the Free Software Foundation
1011b76cdf5cSchristos# gives unlimited permission to copy and/or distribute it,
1012b76cdf5cSchristos# with or without modifications, as long as this notice is preserved.
1013abb0f93cSkardel
1014abb0f93cSkardel# AM_SANITY_CHECK
1015abb0f93cSkardel# ---------------
1016abb0f93cSkardelAC_DEFUN([AM_SANITY_CHECK],
1017abb0f93cSkardel[AC_MSG_CHECKING([whether build environment is sane])
1018abb0f93cSkardel# Reject unsafe characters in $srcdir or the absolute working directory
1019abb0f93cSkardel# name.  Accept space and tab only in the latter.
1020abb0f93cSkardelam_lf='
1021abb0f93cSkardel'
1022abb0f93cSkardelcase `pwd` in
1023abb0f93cSkardel  *[[\\\"\#\$\&\'\`$am_lf]]*)
1024abb0f93cSkardel    AC_MSG_ERROR([unsafe absolute working directory name]);;
1025abb0f93cSkardelesac
1026abb0f93cSkardelcase $srcdir in
1027abb0f93cSkardel  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
1028b76cdf5cSchristos    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1029abb0f93cSkardelesac
1030abb0f93cSkardel
1031b76cdf5cSchristos# Do 'set' in a subshell so we don't clobber the current shell's
1032abb0f93cSkardel# arguments.  Must try -L first in case configure is actually a
1033abb0f93cSkardel# symlink; some systems play weird games with the mod time of symlinks
1034abb0f93cSkardel# (eg FreeBSD returns the mod time of the symlink's containing
1035abb0f93cSkardel# directory).
1036abb0f93cSkardelif (
1037b76cdf5cSchristos   am_has_slept=no
1038b76cdf5cSchristos   for am_try in 1 2; do
1039b76cdf5cSchristos     echo "timestamp, slept: $am_has_slept" > conftest.file
1040abb0f93cSkardel     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1041abb0f93cSkardel     if test "$[*]" = "X"; then
1042abb0f93cSkardel	# -L didn't work.
1043abb0f93cSkardel	set X `ls -t "$srcdir/configure" conftest.file`
1044abb0f93cSkardel     fi
1045abb0f93cSkardel     if test "$[*]" != "X $srcdir/configure conftest.file" \
1046abb0f93cSkardel	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1047abb0f93cSkardel
1048abb0f93cSkardel	# If neither matched, then we have a broken ls.  This can happen
1049abb0f93cSkardel	# if, for instance, CONFIG_SHELL is bash and it inherits a
1050abb0f93cSkardel	# broken ls alias from the environment.  This has actually
1051abb0f93cSkardel	# happened.  Such a system could not be considered "sane".
1052abb0f93cSkardel	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1053abb0f93cSkardel  alias in your environment])
1054abb0f93cSkardel     fi
1055b76cdf5cSchristos     if test "$[2]" = conftest.file || test $am_try -eq 2; then
1056b76cdf5cSchristos       break
1057b76cdf5cSchristos     fi
1058b76cdf5cSchristos     # Just in case.
1059b76cdf5cSchristos     sleep 1
1060b76cdf5cSchristos     am_has_slept=yes
1061b76cdf5cSchristos   done
1062abb0f93cSkardel   test "$[2]" = conftest.file
1063abb0f93cSkardel   )
1064abb0f93cSkardelthen
1065abb0f93cSkardel   # Ok.
1066abb0f93cSkardel   :
1067abb0f93cSkardelelse
1068abb0f93cSkardel   AC_MSG_ERROR([newly created file is older than distributed files!
1069abb0f93cSkardelCheck your system clock])
1070abb0f93cSkardelfi
1071b76cdf5cSchristosAC_MSG_RESULT([yes])
1072b76cdf5cSchristos# If we didn't sleep, we still need to ensure time stamps of config.status and
1073b76cdf5cSchristos# generated files are strictly newer.
1074b76cdf5cSchristosam_sleep_pid=
1075b76cdf5cSchristosif grep 'slept: no' conftest.file >/dev/null 2>&1; then
1076b76cdf5cSchristos  ( sleep 1 ) &
1077b76cdf5cSchristos  am_sleep_pid=$!
1078b76cdf5cSchristosfi
1079b76cdf5cSchristosAC_CONFIG_COMMANDS_PRE(
1080b76cdf5cSchristos  [AC_MSG_CHECKING([that generated files are newer than configure])
1081b76cdf5cSchristos   if test -n "$am_sleep_pid"; then
1082b76cdf5cSchristos     # Hide warnings about reused PIDs.
1083b76cdf5cSchristos     wait $am_sleep_pid 2>/dev/null
1084b76cdf5cSchristos   fi
1085b76cdf5cSchristos   AC_MSG_RESULT([done])])
1086b76cdf5cSchristosrm -f conftest.file
1087b76cdf5cSchristos])
1088abb0f93cSkardel
1089*dd2e700fSchristos# Copyright (C) 2009-2017 Free Software Foundation, Inc.
10902b3787f6Schristos#
10912b3787f6Schristos# This file is free software; the Free Software Foundation
10922b3787f6Schristos# gives unlimited permission to copy and/or distribute it,
10932b3787f6Schristos# with or without modifications, as long as this notice is preserved.
10942b3787f6Schristos
10952b3787f6Schristos# AM_SILENT_RULES([DEFAULT])
10962b3787f6Schristos# --------------------------
10972b3787f6Schristos# Enable less verbose build rules; with the default set to DEFAULT
1098b76cdf5cSchristos# ("yes" being less verbose, "no" or empty being verbose).
10992b3787f6SchristosAC_DEFUN([AM_SILENT_RULES],
1100b76cdf5cSchristos[AC_ARG_ENABLE([silent-rules], [dnl
1101b76cdf5cSchristosAS_HELP_STRING(
1102b76cdf5cSchristos  [--enable-silent-rules],
1103b76cdf5cSchristos  [less verbose build output (undo: "make V=1")])
1104b76cdf5cSchristosAS_HELP_STRING(
1105b76cdf5cSchristos  [--disable-silent-rules],
1106b76cdf5cSchristos  [verbose build output (undo: "make V=0")])dnl
1107b76cdf5cSchristos])
1108b76cdf5cSchristoscase $enable_silent_rules in @%:@ (((
11092b3787f6Schristos  yes) AM_DEFAULT_VERBOSITY=0;;
11102b3787f6Schristos   no) AM_DEFAULT_VERBOSITY=1;;
11112b3787f6Schristos    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
11122b3787f6Schristosesac
1113b76cdf5cSchristosdnl
1114b76cdf5cSchristosdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1115b76cdf5cSchristosdnl do not support nested variable expansions.
1116b76cdf5cSchristosdnl See automake bug#9928 and bug#10237.
1117b76cdf5cSchristosam_make=${MAKE-make}
1118b76cdf5cSchristosAC_CACHE_CHECK([whether $am_make supports nested variables],
1119b76cdf5cSchristos   [am_cv_make_support_nested_variables],
1120b76cdf5cSchristos   [if AS_ECHO([['TRUE=$(BAR$(V))
1121b76cdf5cSchristosBAR0=false
1122b76cdf5cSchristosBAR1=true
1123b76cdf5cSchristosV=1
1124b76cdf5cSchristosam__doit:
1125b76cdf5cSchristos	@$(TRUE)
1126b76cdf5cSchristos.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1127b76cdf5cSchristos  am_cv_make_support_nested_variables=yes
1128b76cdf5cSchristoselse
1129b76cdf5cSchristos  am_cv_make_support_nested_variables=no
1130b76cdf5cSchristosfi])
1131b76cdf5cSchristosif test $am_cv_make_support_nested_variables = yes; then
1132b76cdf5cSchristos  dnl Using '$V' instead of '$(V)' breaks IRIX make.
1133b76cdf5cSchristos  AM_V='$(V)'
1134b76cdf5cSchristos  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1135b76cdf5cSchristoselse
1136b76cdf5cSchristos  AM_V=$AM_DEFAULT_VERBOSITY
1137b76cdf5cSchristos  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1138b76cdf5cSchristosfi
1139b76cdf5cSchristosAC_SUBST([AM_V])dnl
1140b76cdf5cSchristosAM_SUBST_NOTMAKE([AM_V])dnl
1141b76cdf5cSchristosAC_SUBST([AM_DEFAULT_V])dnl
1142b76cdf5cSchristosAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
11432b3787f6SchristosAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
11442b3787f6SchristosAM_BACKSLASH='\'
11452b3787f6SchristosAC_SUBST([AM_BACKSLASH])dnl
11462b3787f6Schristos_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
11472b3787f6Schristos])
11482b3787f6Schristos
1149*dd2e700fSchristos# Copyright (C) 2001-2017 Free Software Foundation, Inc.
1150abb0f93cSkardel#
1151abb0f93cSkardel# This file is free software; the Free Software Foundation
1152abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
1153abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
1154abb0f93cSkardel
1155abb0f93cSkardel# AM_PROG_INSTALL_STRIP
1156abb0f93cSkardel# ---------------------
1157b76cdf5cSchristos# One issue with vendor 'install' (even GNU) is that you can't
1158abb0f93cSkardel# specify the program used to strip binaries.  This is especially
1159abb0f93cSkardel# annoying in cross-compiling environments, where the build's strip
1160abb0f93cSkardel# is unlikely to handle the host's binaries.
1161abb0f93cSkardel# Fortunately install-sh will honor a STRIPPROG variable, so we
1162b76cdf5cSchristos# always use install-sh in "make install-strip", and initialize
1163abb0f93cSkardel# STRIPPROG with the value of the STRIP variable (set by the user).
1164abb0f93cSkardelAC_DEFUN([AM_PROG_INSTALL_STRIP],
1165abb0f93cSkardel[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1166b76cdf5cSchristos# Installed binaries are usually stripped using 'strip' when the user
1167b76cdf5cSchristos# run "make install-strip".  However 'strip' might not be the right
1168abb0f93cSkardel# tool to use in cross-compilation environments, therefore Automake
1169b76cdf5cSchristos# will honor the 'STRIP' environment variable to overrule this program.
1170b76cdf5cSchristosdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1171abb0f93cSkardelif test "$cross_compiling" != no; then
1172abb0f93cSkardel  AC_CHECK_TOOL([STRIP], [strip], :)
1173abb0f93cSkardelfi
1174abb0f93cSkardelINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1175abb0f93cSkardelAC_SUBST([INSTALL_STRIP_PROGRAM])])
1176abb0f93cSkardel
1177*dd2e700fSchristos# Copyright (C) 2006-2017 Free Software Foundation, Inc.
1178abb0f93cSkardel#
1179abb0f93cSkardel# This file is free software; the Free Software Foundation
1180abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
1181abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
1182abb0f93cSkardel
1183abb0f93cSkardel# _AM_SUBST_NOTMAKE(VARIABLE)
1184abb0f93cSkardel# ---------------------------
1185abb0f93cSkardel# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1186abb0f93cSkardel# This macro is traced by Automake.
1187abb0f93cSkardelAC_DEFUN([_AM_SUBST_NOTMAKE])
1188abb0f93cSkardel
1189abb0f93cSkardel# AM_SUBST_NOTMAKE(VARIABLE)
1190b76cdf5cSchristos# --------------------------
1191abb0f93cSkardel# Public sister of _AM_SUBST_NOTMAKE.
1192abb0f93cSkardelAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1193abb0f93cSkardel
1194abb0f93cSkardel# Check how to create a tarball.                            -*- Autoconf -*-
1195abb0f93cSkardel
1196*dd2e700fSchristos# Copyright (C) 2004-2017 Free Software Foundation, Inc.
1197abb0f93cSkardel#
1198abb0f93cSkardel# This file is free software; the Free Software Foundation
1199abb0f93cSkardel# gives unlimited permission to copy and/or distribute it,
1200abb0f93cSkardel# with or without modifications, as long as this notice is preserved.
1201abb0f93cSkardel
1202abb0f93cSkardel# _AM_PROG_TAR(FORMAT)
1203abb0f93cSkardel# --------------------
1204abb0f93cSkardel# Check how to create a tarball in format FORMAT.
1205b76cdf5cSchristos# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1206abb0f93cSkardel#
1207abb0f93cSkardel# Substitute a variable $(am__tar) that is a command
1208abb0f93cSkardel# writing to stdout a FORMAT-tarball containing the directory
1209abb0f93cSkardel# $tardir.
1210abb0f93cSkardel#     tardir=directory && $(am__tar) > result.tar
1211abb0f93cSkardel#
1212abb0f93cSkardel# Substitute a variable $(am__untar) that extract such
1213abb0f93cSkardel# a tarball read from stdin.
1214abb0f93cSkardel#     $(am__untar) < result.tar
1215b76cdf5cSchristos#
1216abb0f93cSkardelAC_DEFUN([_AM_PROG_TAR],
1217b76cdf5cSchristos[# Always define AMTAR for backward compatibility.  Yes, it's still used
1218b76cdf5cSchristos# in the wild :-(  We should find a proper way to deprecate it ...
1219b76cdf5cSchristosAC_SUBST([AMTAR], ['$${TAR-tar}'])
1220b76cdf5cSchristos
1221b76cdf5cSchristos# We'll loop over all known methods to create a tar archive until one works.
1222abb0f93cSkardel_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1223b76cdf5cSchristos
1224b76cdf5cSchristosm4_if([$1], [v7],
1225b76cdf5cSchristos  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1226b76cdf5cSchristos
1227b76cdf5cSchristos  [m4_case([$1],
1228b76cdf5cSchristos    [ustar],
1229b76cdf5cSchristos     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1230b76cdf5cSchristos      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1231b76cdf5cSchristos      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1232b76cdf5cSchristos      # and bug#13588).
1233b76cdf5cSchristos      am_max_uid=2097151 # 2^21 - 1
1234b76cdf5cSchristos      am_max_gid=$am_max_uid
1235b76cdf5cSchristos      # The $UID and $GID variables are not portable, so we need to resort
1236b76cdf5cSchristos      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1237b76cdf5cSchristos      # below are definitely unexpected, so allow the users to see them
1238b76cdf5cSchristos      # (that is, avoid stderr redirection).
1239b76cdf5cSchristos      am_uid=`id -u || echo unknown`
1240b76cdf5cSchristos      am_gid=`id -g || echo unknown`
1241b76cdf5cSchristos      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1242b76cdf5cSchristos      if test $am_uid -le $am_max_uid; then
1243b76cdf5cSchristos         AC_MSG_RESULT([yes])
1244b76cdf5cSchristos      else
1245b76cdf5cSchristos         AC_MSG_RESULT([no])
1246b76cdf5cSchristos         _am_tools=none
1247b76cdf5cSchristos      fi
1248b76cdf5cSchristos      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1249b76cdf5cSchristos      if test $am_gid -le $am_max_gid; then
1250b76cdf5cSchristos         AC_MSG_RESULT([yes])
1251b76cdf5cSchristos      else
1252b76cdf5cSchristos        AC_MSG_RESULT([no])
1253b76cdf5cSchristos        _am_tools=none
1254b76cdf5cSchristos      fi],
1255b76cdf5cSchristos
1256b76cdf5cSchristos  [pax],
1257b76cdf5cSchristos    [],
1258b76cdf5cSchristos
1259b76cdf5cSchristos  [m4_fatal([Unknown tar format])])
1260b76cdf5cSchristos
1261b76cdf5cSchristos  AC_MSG_CHECKING([how to create a $1 tar archive])
1262b76cdf5cSchristos
1263b76cdf5cSchristos  # Go ahead even if we have the value already cached.  We do so because we
1264b76cdf5cSchristos  # need to set the values for the 'am__tar' and 'am__untar' variables.
1265abb0f93cSkardel  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1266b76cdf5cSchristos
1267b76cdf5cSchristos  for _am_tool in $_am_tools; do
1268abb0f93cSkardel    case $_am_tool in
1269abb0f93cSkardel    gnutar)
1270b76cdf5cSchristos      for _am_tar in tar gnutar gtar; do
1271abb0f93cSkardel        AM_RUN_LOG([$_am_tar --version]) && break
1272abb0f93cSkardel      done
1273abb0f93cSkardel      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1274abb0f93cSkardel      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1275abb0f93cSkardel      am__untar="$_am_tar -xf -"
1276abb0f93cSkardel      ;;
1277abb0f93cSkardel    plaintar)
1278abb0f93cSkardel      # Must skip GNU tar: if it does not support --format= it doesn't create
1279abb0f93cSkardel      # ustar tarball either.
1280abb0f93cSkardel      (tar --version) >/dev/null 2>&1 && continue
1281abb0f93cSkardel      am__tar='tar chf - "$$tardir"'
1282abb0f93cSkardel      am__tar_='tar chf - "$tardir"'
1283abb0f93cSkardel      am__untar='tar xf -'
1284abb0f93cSkardel      ;;
1285abb0f93cSkardel    pax)
1286abb0f93cSkardel      am__tar='pax -L -x $1 -w "$$tardir"'
1287abb0f93cSkardel      am__tar_='pax -L -x $1 -w "$tardir"'
1288abb0f93cSkardel      am__untar='pax -r'
1289abb0f93cSkardel      ;;
1290abb0f93cSkardel    cpio)
1291abb0f93cSkardel      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1292abb0f93cSkardel      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1293abb0f93cSkardel      am__untar='cpio -i -H $1 -d'
1294abb0f93cSkardel      ;;
1295abb0f93cSkardel    none)
1296abb0f93cSkardel      am__tar=false
1297abb0f93cSkardel      am__tar_=false
1298abb0f93cSkardel      am__untar=false
1299abb0f93cSkardel      ;;
1300abb0f93cSkardel    esac
1301abb0f93cSkardel
1302abb0f93cSkardel    # If the value was cached, stop now.  We just wanted to have am__tar
1303abb0f93cSkardel    # and am__untar set.
1304abb0f93cSkardel    test -n "${am_cv_prog_tar_$1}" && break
1305abb0f93cSkardel
1306b76cdf5cSchristos    # tar/untar a dummy directory, and stop if the command works.
1307abb0f93cSkardel    rm -rf conftest.dir
1308abb0f93cSkardel    mkdir conftest.dir
1309abb0f93cSkardel    echo GrepMe > conftest.dir/file
1310abb0f93cSkardel    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1311abb0f93cSkardel    rm -rf conftest.dir
1312abb0f93cSkardel    if test -s conftest.tar; then
1313abb0f93cSkardel      AM_RUN_LOG([$am__untar <conftest.tar])
1314b76cdf5cSchristos      AM_RUN_LOG([cat conftest.dir/file])
1315abb0f93cSkardel      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1316abb0f93cSkardel    fi
1317abb0f93cSkardel  done
1318abb0f93cSkardel  rm -rf conftest.dir
1319abb0f93cSkardel
1320abb0f93cSkardel  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1321abb0f93cSkardel  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1322b76cdf5cSchristos
1323abb0f93cSkardelAC_SUBST([am__tar])
1324abb0f93cSkardelAC_SUBST([am__untar])
1325abb0f93cSkardel]) # _AM_PROG_TAR
1326abb0f93cSkardel
13274305584aSkardelm4_include([sntp/libopts/m4/libopts.m4])
13281b6f2cd4Schristosm4_include([sntp/libopts/m4/stdnoreturn.m4])
132920ef19a6Schristosm4_include([sntp/m4/ax_c99_struct_init.m4])
13302b3787f6Schristosm4_include([sntp/m4/define_dir.m4])
13312b3787f6Schristosm4_include([sntp/m4/hms_search_lib.m4])
13322b3787f6Schristosm4_include([sntp/m4/libtool.m4])
13332b3787f6Schristosm4_include([sntp/m4/ltoptions.m4])
13342b3787f6Schristosm4_include([sntp/m4/ltsugar.m4])
13352b3787f6Schristosm4_include([sntp/m4/ltversion.m4])
13362b3787f6Schristosm4_include([sntp/m4/lt~obsolete.m4])
1337611b30b4Schristosm4_include([sntp/m4/ntp_af_unspec.m4])
13382b3787f6Schristosm4_include([sntp/m4/ntp_cacheversion.m4])
13392b3787f6Schristosm4_include([sntp/m4/ntp_compiler.m4])
13402b3787f6Schristosm4_include([sntp/m4/ntp_crosscompile.m4])
13411b6f2cd4Schristosm4_include([sntp/m4/ntp_crypto_rand.m4])
13422b3787f6Schristosm4_include([sntp/m4/ntp_debug.m4])
13432b3787f6Schristosm4_include([sntp/m4/ntp_dir_sep.m4])
13442b3787f6Schristosm4_include([sntp/m4/ntp_facilitynames.m4])
13452b3787f6Schristosm4_include([sntp/m4/ntp_googletest.m4])
13460454d1b2Schristosm4_include([sntp/m4/ntp_harden.m4])
13472b3787f6Schristosm4_include([sntp/m4/ntp_ipv6.m4])
13482b3787f6Schristosm4_include([sntp/m4/ntp_lib_m.m4])
13492b3787f6Schristosm4_include([sntp/m4/ntp_libevent.m4])
13502b3787f6Schristosm4_include([sntp/m4/ntp_libntp.m4])
13512b3787f6Schristosm4_include([sntp/m4/ntp_lineeditlibs.m4])
13522b3787f6Schristosm4_include([sntp/m4/ntp_locinfo.m4])
13532b3787f6Schristosm4_include([sntp/m4/ntp_openssl.m4])
13542b3787f6Schristosm4_include([sntp/m4/ntp_pkg_config.m4])
13553468963bSchristosm4_include([sntp/m4/ntp_problemtests.m4])
13562b3787f6Schristosm4_include([sntp/m4/ntp_prog_cc.m4])
13572b3787f6Schristosm4_include([sntp/m4/ntp_rlimit.m4])
13582b3787f6Schristosm4_include([sntp/m4/ntp_sntp.m4])
1359b76cdf5cSchristosm4_include([sntp/m4/ntp_unitytest.m4])
13602b3787f6Schristosm4_include([sntp/m4/ntp_ver_suffix.m4])
13612b3787f6Schristosm4_include([sntp/m4/ntp_vpathhack.m4])
136220ef19a6Schristosm4_include([sntp/m4/openldap-thread-check.m4])
136320ef19a6Schristosm4_include([sntp/m4/openldap.m4])
13642b3787f6Schristosm4_include([sntp/m4/os_cflags.m4])
13652b3787f6Schristosm4_include([sntp/m4/snprintf.m4])
1366