]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/aclocal.m4
Use __is_same_as for std::is_same and std::is_same_v
[thirdparty/gcc.git] / libstdc++-v3 / aclocal.m4
CommitLineData
f00f02a3 1# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2017 Free Software Foundation, Inc.
b9e8095b 4
68224f8d 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
b9e8095b 8
68224f8d 9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
f00f02a3 14m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
cd9a469c 15m4_ifndef([AC_AUTOCONF_VERSION],
16 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
f00f02a3 17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18[m4_warning([this file was generated for autoconf 2.69.
cd9a469c 19You have another version of autoconf. It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
f00f02a3 21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
cd9a469c 22
f00f02a3 23# Copyright (C) 2002-2017 Free Software Foundation, Inc.
5e143b6f 24#
25# This file is free software; the Free Software Foundation
26# gives unlimited permission to copy and/or distribute it,
27# with or without modifications, as long as this notice is preserved.
11764568 28
3d84907c 29# AM_AUTOMAKE_VERSION(VERSION)
30# ----------------------------
31# Automake X.Y traces this macro to ensure aclocal.m4 has been
32# generated from the m4 files accompanying Automake X.Y.
cd9a469c 33# (This private macro should not be called outside this file.)
34AC_DEFUN([AM_AUTOMAKE_VERSION],
f00f02a3 35[am__api_version='1.15'
cd9a469c 36dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37dnl require some minimum version. Point them to the right macro.
f00f02a3 38m4_if([$1], [1.15.1], [],
cd9a469c 39 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40])
41
42# _AM_AUTOCONF_VERSION(VERSION)
43# -----------------------------
44# aclocal traces this macro to find the Autoconf version.
45# This is a private macro too. Using m4_define simplifies
46# the logic in aclocal, which can simply ignore this definition.
47m4_define([_AM_AUTOCONF_VERSION], [])
11764568 48
3d84907c 49# AM_SET_CURRENT_AUTOMAKE_VERSION
50# -------------------------------
cd9a469c 51# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
3d84907c 53AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
f00f02a3 54[AM_AUTOMAKE_VERSION([1.15.1])dnl
cd9a469c 55m4_ifndef([AC_AUTOCONF_VERSION],
56 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
68224f8d 58
5e143b6f 59# AM_AUX_DIR_EXPAND -*- Autoconf -*-
68224f8d 60
f00f02a3 61# Copyright (C) 2001-2017 Free Software Foundation, Inc.
5e143b6f 62#
63# This file is free software; the Free Software Foundation
64# gives unlimited permission to copy and/or distribute it,
65# with or without modifications, as long as this notice is preserved.
68224f8d 66
3d84907c 67# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
f00f02a3 68# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
69# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
3d84907c 70#
71# Of course, Automake must honor this variable whenever it calls a
72# tool from the auxiliary directory. The problem is that $srcdir (and
73# therefore $ac_aux_dir as well) can be either absolute or relative,
74# depending on how configure is run. This is pretty annoying, since
75# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76# source directory, any form will work fine, but in subdirectories a
77# relative path needs to be adjusted first.
78#
79# $ac_aux_dir/missing
80# fails when called from a subdirectory if $ac_aux_dir is relative
81# $top_srcdir/$ac_aux_dir/missing
82# fails if $ac_aux_dir is absolute,
83# fails when called from a subdirectory in a VPATH build with
84# a relative $ac_aux_dir
85#
86# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87# are both prefixed by $srcdir. In an in-source build this is usually
f00f02a3 88# harmless because $srcdir is '.', but things will broke when you
3d84907c 89# start a VPATH build or use an absolute $srcdir.
90#
91# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
93# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94# and then we would define $MISSING as
95# MISSING="\${SHELL} $am_aux_dir/missing"
96# This will work as long as MISSING is not called from configure, because
97# unfortunately $(top_srcdir) has no meaning in configure.
98# However there are other variables, like CC, which are often used in
99# configure, and could therefore not use this "fixed" $ac_aux_dir.
100#
101# Another solution, used here, is to always expand $ac_aux_dir to an
102# absolute PATH. The drawback is that using absolute paths prevent a
103# configured tree to be moved without reconfiguration.
68224f8d 104
3d84907c 105AC_DEFUN([AM_AUX_DIR_EXPAND],
f00f02a3 106[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
107# Expand $ac_aux_dir to an absolute path.
108am_aux_dir=`cd "$ac_aux_dir" && pwd`
3d84907c 109])
1ea15ca4 110
5e143b6f 111# AM_CONDITIONAL -*- Autoconf -*-
68224f8d 112
f00f02a3 113# Copyright (C) 1997-2017 Free Software Foundation, Inc.
5e143b6f 114#
115# This file is free software; the Free Software Foundation
116# gives unlimited permission to copy and/or distribute it,
117# with or without modifications, as long as this notice is preserved.
68224f8d 118
3d84907c 119# AM_CONDITIONAL(NAME, SHELL-CONDITION)
120# -------------------------------------
121# Define a conditional.
122AC_DEFUN([AM_CONDITIONAL],
f00f02a3 123[AC_PREREQ([2.52])dnl
124 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
125 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
cd9a469c 126AC_SUBST([$1_TRUE])dnl
127AC_SUBST([$1_FALSE])dnl
128_AM_SUBST_NOTMAKE([$1_TRUE])dnl
129_AM_SUBST_NOTMAKE([$1_FALSE])dnl
130m4_define([_AM_COND_VALUE_$1], [$2])dnl
3d84907c 131if $2; then
132 $1_TRUE=
133 $1_FALSE='#'
0a127d2c 134else
3d84907c 135 $1_TRUE='#'
136 $1_FALSE=
0a127d2c 137fi
3d84907c 138AC_CONFIG_COMMANDS_PRE(
139[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1bd7aab1 140 AC_MSG_ERROR([[conditional "$1" was never defined.
141Usually this means the macro was only invoked conditionally.]])
3d84907c 142fi])])
68224f8d 143
5e143b6f 144# Do all the work for Automake. -*- Autoconf -*-
37d42dd9 145
f00f02a3 146# Copyright (C) 1996-2017 Free Software Foundation, Inc.
5e143b6f 147#
148# This file is free software; the Free Software Foundation
149# gives unlimited permission to copy and/or distribute it,
150# with or without modifications, as long as this notice is preserved.
68224f8d 151
5e143b6f 152# This macro actually does too much. Some checks are only needed if
153# your package does certain things. But this isn't really a big deal.
68224f8d 154
f00f02a3 155dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
156m4_define([AC_PROG_CC],
157m4_defn([AC_PROG_CC])
158[_AM_PROG_CC_C_O
159])
160
68224f8d 161# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
162# AM_INIT_AUTOMAKE([OPTIONS])
163# -----------------------------------------------
164# The call with PACKAGE and VERSION arguments is the old style
165# call (pre autoconf-2.50), which is being phased out. PACKAGE
166# and VERSION should now be passed to AC_INIT and removed from
167# the call to AM_INIT_AUTOMAKE.
168# We support both call styles for the transition. After
169# the next Automake release, Autoconf can make the AC_INIT
170# arguments mandatory, and then we can depend on a new Autoconf
171# release and drop the old call support.
fea8b765 172AC_DEFUN([AM_INIT_AUTOMAKE],
f00f02a3 173[AC_PREREQ([2.65])dnl
3d84907c 174dnl Autoconf wants to disallow AM_ names. We explicitly allow
175dnl the ones we care about.
176m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
177AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
178AC_REQUIRE([AC_PROG_INSTALL])dnl
cd9a469c 179if test "`cd $srcdir && pwd`" != "`pwd`"; then
180 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
181 # is not polluted with repeated "-I."
182 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
183 # test to see if srcdir already configured
184 if test -f $srcdir/config.status; then
185 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
186 fi
b9e8095b 187fi
68224f8d 188
189# test whether we have cygpath
190if test -z "$CYGPATH_W"; then
191 if (cygpath --version) >/dev/null 2>/dev/null; then
192 CYGPATH_W='cygpath -w'
193 else
194 CYGPATH_W=echo
195 fi
196fi
197AC_SUBST([CYGPATH_W])
198
199# Define the identity of the package.
200dnl Distinguish between old-style and new-style calls.
201m4_ifval([$2],
f00f02a3 202[AC_DIAGNOSE([obsolete],
203 [$0: two- and three-arguments forms are deprecated.])
204m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
68224f8d 205 AC_SUBST([PACKAGE], [$1])dnl
206 AC_SUBST([VERSION], [$2])],
207[_AM_SET_OPTIONS([$1])dnl
cd9a469c 208dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
f00f02a3 209m4_if(
210 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
211 [ok:ok],,
cd9a469c 212 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
68224f8d 213 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
214 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
215
216_AM_IF_OPTION([no-define],,
f00f02a3 217[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
218 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
68224f8d 219
220# Some tools Automake needs.
221AC_REQUIRE([AM_SANITY_CHECK])dnl
222AC_REQUIRE([AC_ARG_PROGRAM])dnl
f00f02a3 223AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
224AM_MISSING_PROG([AUTOCONF], [autoconf])
225AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
226AM_MISSING_PROG([AUTOHEADER], [autoheader])
227AM_MISSING_PROG([MAKEINFO], [makeinfo])
cd9a469c 228AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
229AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
f00f02a3 230AC_REQUIRE([AC_PROG_MKDIR_P])dnl
231# For better backward compatibility. To be removed once Automake 1.9.x
232# dies out for good. For more background, see:
233# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
234# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
235AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
236# We need awk for the "check" target (and possibly the TAP driver). The
237# system "awk" is bad on some platforms.
68224f8d 238AC_REQUIRE([AC_PROG_AWK])dnl
239AC_REQUIRE([AC_PROG_MAKE_SET])dnl
240AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1bd7aab1 241_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
cd9a469c 242 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
243 [_AM_PROG_TAR([v7])])])
68224f8d 244_AM_IF_OPTION([no-dependencies],,
245[AC_PROVIDE_IFELSE([AC_PROG_CC],
f00f02a3 246 [_AM_DEPENDENCIES([CC])],
247 [m4_define([AC_PROG_CC],
248 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
68224f8d 249AC_PROVIDE_IFELSE([AC_PROG_CXX],
f00f02a3 250 [_AM_DEPENDENCIES([CXX])],
251 [m4_define([AC_PROG_CXX],
252 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
cd9a469c 253AC_PROVIDE_IFELSE([AC_PROG_OBJC],
f00f02a3 254 [_AM_DEPENDENCIES([OBJC])],
255 [m4_define([AC_PROG_OBJC],
256 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
257AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
258 [_AM_DEPENDENCIES([OBJCXX])],
259 [m4_define([AC_PROG_OBJCXX],
260 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
68224f8d 261])
f00f02a3 262AC_REQUIRE([AM_SILENT_RULES])dnl
263dnl The testsuite driver may need to know about EXEEXT, so add the
264dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
265dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
cd9a469c 266AC_CONFIG_COMMANDS_PRE(dnl
267[m4_provide_if([_AM_COMPILER_EXEEXT],
268 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
f00f02a3 269
270# POSIX will say in a future version that running "rm -f" with no argument
271# is OK; and we want to be able to make that assumption in our Makefile
272# recipes. So use an aggressive probe to check that the usage we want is
273# actually supported "in the wild" to an acceptable degree.
274# See automake bug#10828.
275# To make any issue more visible, cause the running configure to be aborted
276# by default if the 'rm' program in use doesn't match our expectations; the
277# user can still override this though.
278if rm -f && rm -fr && rm -rf; then : OK; else
279 cat >&2 <<'END'
280Oops!
281
282Your 'rm' program seems unable to run without file operands specified
283on the command line, even when the '-f' option is present. This is contrary
284to the behaviour of most rm programs out there, and not conforming with
285the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
286
287Please tell bug-automake@gnu.org about your system, including the value
288of your $PATH and any error possibly output before this message. This
289can help us improve future automake versions.
290
291END
292 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
293 echo 'Configuration will proceed anyway, since you have set the' >&2
294 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
295 echo >&2
296 else
297 cat >&2 <<'END'
298Aborting the configuration process, to ensure you take notice of the issue.
299
300You can download and install GNU coreutils to get an 'rm' implementation
301that behaves properly: <http://www.gnu.org/software/coreutils/>.
302
303If you want to complete the configuration process using your problematic
304'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
305to "yes", and re-run configure.
306
307END
308 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
309 fi
310fi
311dnl The trailing newline in this macro's definition is deliberate, for
312dnl backward compatibility and to allow trailing 'dnl'-style comments
313dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
68224f8d 314])
315
f00f02a3 316dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
cd9a469c 317dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
318dnl mangled by Autoconf and run in a shell conditional statement.
319m4_define([_AC_COMPILER_EXEEXT],
320m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
321
68224f8d 322# When config.status generates a header, we must update the stamp-h file.
323# This file resides in the same directory as the config header
324# that is generated. The stamp files are numbered to have different names.
325
326# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
327# loop where config.status creates the headers, so we can generate
328# our stamp files there.
329AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
330[# Compute $1's index in $config_headers.
cd9a469c 331_am_arg=$1
68224f8d 332_am_stamp_count=1
333for _am_header in $config_headers :; do
334 case $_am_header in
cd9a469c 335 $_am_arg | $_am_arg:* )
68224f8d 336 break ;;
337 * )
338 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
339 esac
340done
cd9a469c 341echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
b9e8095b 342
f00f02a3 343# Copyright (C) 2001-2017 Free Software Foundation, Inc.
5e143b6f 344#
345# This file is free software; the Free Software Foundation
346# gives unlimited permission to copy and/or distribute it,
347# with or without modifications, as long as this notice is preserved.
348
3d84907c 349# AM_PROG_INSTALL_SH
350# ------------------
351# Define $install_sh.
3d84907c 352AC_DEFUN([AM_PROG_INSTALL_SH],
353[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
f00f02a3 354if test x"${install_sh+set}" != xset; then
cd9a469c 355 case $am_aux_dir in
356 *\ * | *\ *)
357 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
358 *)
359 install_sh="\${SHELL} $am_aux_dir/install-sh"
360 esac
361fi
f00f02a3 362AC_SUBST([install_sh])])
7c0ea95f 363
5e143b6f 364# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
3d84907c 365# From Jim Meyering
366
f00f02a3 367# Copyright (C) 1996-2017 Free Software Foundation, Inc.
5e143b6f 368#
369# This file is free software; the Free Software Foundation
370# gives unlimited permission to copy and/or distribute it,
371# with or without modifications, as long as this notice is preserved.
3d84907c 372
cd9a469c 373# AM_MAINTAINER_MODE([DEFAULT-MODE])
374# ----------------------------------
375# Control maintainer-specific portions of Makefiles.
f00f02a3 376# Default is to disable them, unless 'enable' is passed literally.
377# For symmetry, 'disable' may be passed as well. Anyway, the user
cd9a469c 378# can override the default with the --enable/--disable switch.
3d84907c 379AC_DEFUN([AM_MAINTAINER_MODE],
cd9a469c 380[m4_case(m4_default([$1], [disable]),
381 [enable], [m4_define([am_maintainer_other], [disable])],
382 [disable], [m4_define([am_maintainer_other], [enable])],
383 [m4_define([am_maintainer_other], [enable])
384 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
888655a4 385AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
cd9a469c 386 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
387 AC_ARG_ENABLE([maintainer-mode],
f00f02a3 388 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
389 am_maintainer_other[ make rules and dependencies not useful
390 (and sometimes confusing) to the casual installer])],
391 [USE_MAINTAINER_MODE=$enableval],
392 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
3d84907c 393 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
cd9a469c 394 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
3d84907c 395 MAINT=$MAINTAINER_MODE_TRUE
cd9a469c 396 AC_SUBST([MAINT])dnl
3d84907c 397]
398)
399
5e143b6f 400# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
37d42dd9 401
f00f02a3 402# Copyright (C) 1997-2017 Free Software Foundation, Inc.
5e143b6f 403#
404# This file is free software; the Free Software Foundation
405# gives unlimited permission to copy and/or distribute it,
406# with or without modifications, as long as this notice is preserved.
37d42dd9 407
3d84907c 408# AM_MISSING_PROG(NAME, PROGRAM)
409# ------------------------------
410AC_DEFUN([AM_MISSING_PROG],
411[AC_REQUIRE([AM_MISSING_HAS_RUN])
412$1=${$1-"${am_missing_run}$2"}
413AC_SUBST($1)])
414
3d84907c 415# AM_MISSING_HAS_RUN
416# ------------------
f00f02a3 417# Define MISSING if not defined so far and test if it is modern enough.
418# If it is, set am_missing_run to use it, otherwise, to nothing.
3d84907c 419AC_DEFUN([AM_MISSING_HAS_RUN],
420[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
cd9a469c 421AC_REQUIRE_AUX_FILE([missing])dnl
422if test x"${MISSING+set}" != xset; then
423 case $am_aux_dir in
424 *\ * | *\ *)
425 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
426 *)
427 MISSING="\${SHELL} $am_aux_dir/missing" ;;
428 esac
429fi
3d84907c 430# Use eval to expand $SHELL
f00f02a3 431if eval "$MISSING --is-lightweight"; then
432 am_missing_run="$MISSING "
3d84907c 433else
434 am_missing_run=
f00f02a3 435 AC_MSG_WARN(['missing' script is too old or missing])
3d84907c 436fi
437])
438
5e143b6f 439# Helper functions for option handling. -*- Autoconf -*-
68224f8d 440
f00f02a3 441# Copyright (C) 2001-2017 Free Software Foundation, Inc.
5e143b6f 442#
443# This file is free software; the Free Software Foundation
444# gives unlimited permission to copy and/or distribute it,
445# with or without modifications, as long as this notice is preserved.
37d42dd9 446
68224f8d 447# _AM_MANGLE_OPTION(NAME)
448# -----------------------
449AC_DEFUN([_AM_MANGLE_OPTION],
450[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
451
452# _AM_SET_OPTION(NAME)
888655a4 453# --------------------
68224f8d 454# Set option NAME. Presently that only means defining a flag for this option.
455AC_DEFUN([_AM_SET_OPTION],
f00f02a3 456[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
68224f8d 457
458# _AM_SET_OPTIONS(OPTIONS)
888655a4 459# ------------------------
68224f8d 460# OPTIONS is a space-separated list of Automake options.
461AC_DEFUN([_AM_SET_OPTIONS],
cd9a469c 462[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
68224f8d 463
464# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
465# -------------------------------------------
466# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
467AC_DEFUN([_AM_IF_OPTION],
468[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
e1465582 469
f00f02a3 470# Copyright (C) 1999-2017 Free Software Foundation, Inc.
471#
472# This file is free software; the Free Software Foundation
473# gives unlimited permission to copy and/or distribute it,
474# with or without modifications, as long as this notice is preserved.
37d42dd9 475
f00f02a3 476# _AM_PROG_CC_C_O
477# ---------------
478# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
479# to automatically call this.
480AC_DEFUN([_AM_PROG_CC_C_O],
481[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
482AC_REQUIRE_AUX_FILE([compile])dnl
483AC_LANG_PUSH([C])dnl
484AC_CACHE_CHECK(
485 [whether $CC understands -c and -o together],
486 [am_cv_prog_cc_c_o],
487 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
488 # Make sure it works both with $CC and with simple cc.
489 # Following AC_PROG_CC_C_O, we do the test twice because some
490 # compilers refuse to overwrite an existing .o file with -o,
491 # though they will create one.
492 am_cv_prog_cc_c_o=yes
493 for am_i in 1 2; do
494 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
495 && test -f conftest2.$ac_objext; then
496 : OK
497 else
498 am_cv_prog_cc_c_o=no
499 break
500 fi
501 done
502 rm -f core conftest*
503 unset am_i])
504if test "$am_cv_prog_cc_c_o" != yes; then
505 # Losing compiler, so override with the script.
506 # FIXME: It is wrong to rewrite CC.
507 # But if we don't then we get into trouble of one sort or another.
508 # A longer-term fix would be to have automake use am__CC in this case,
509 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
510 CC="$am_aux_dir/compile $CC"
511fi
512AC_LANG_POP([C])])
513
514# For backward compatibility.
515AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
516
517# Copyright (C) 2001-2017 Free Software Foundation, Inc.
5e143b6f 518#
519# This file is free software; the Free Software Foundation
520# gives unlimited permission to copy and/or distribute it,
521# with or without modifications, as long as this notice is preserved.
37d42dd9 522
f00f02a3 523# AM_RUN_LOG(COMMAND)
524# -------------------
525# Run COMMAND, save the exit status in ac_status, and log it.
526# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
527AC_DEFUN([AM_RUN_LOG],
528[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
529 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
530 ac_status=$?
531 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
532 (exit $ac_status); }])
533
534# Check to make sure that the build environment is sane. -*- Autoconf -*-
535
536# Copyright (C) 1996-2017 Free Software Foundation, Inc.
537#
538# This file is free software; the Free Software Foundation
539# gives unlimited permission to copy and/or distribute it,
540# with or without modifications, as long as this notice is preserved.
68224f8d 541
542# AM_SANITY_CHECK
543# ---------------
fea8b765 544AC_DEFUN([AM_SANITY_CHECK],
b9e8095b 545[AC_MSG_CHECKING([whether build environment is sane])
cd9a469c 546# Reject unsafe characters in $srcdir or the absolute working directory
547# name. Accept space and tab only in the latter.
548am_lf='
549'
550case `pwd` in
551 *[[\\\"\#\$\&\'\`$am_lf]]*)
552 AC_MSG_ERROR([unsafe absolute working directory name]);;
553esac
554case $srcdir in
555 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
f00f02a3 556 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
cd9a469c 557esac
558
f00f02a3 559# Do 'set' in a subshell so we don't clobber the current shell's
b9e8095b 560# arguments. Must try -L first in case configure is actually a
561# symlink; some systems play weird games with the mod time of symlinks
562# (eg FreeBSD returns the mod time of the symlink's containing
563# directory).
564if (
f00f02a3 565 am_has_slept=no
566 for am_try in 1 2; do
567 echo "timestamp, slept: $am_has_slept" > conftest.file
568 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
569 if test "$[*]" = "X"; then
570 # -L didn't work.
571 set X `ls -t "$srcdir/configure" conftest.file`
572 fi
573 if test "$[*]" != "X $srcdir/configure conftest.file" \
574 && test "$[*]" != "X conftest.file $srcdir/configure"; then
575
576 # If neither matched, then we have a broken ls. This can happen
577 # if, for instance, CONFIG_SHELL is bash and it inherits a
578 # broken ls alias from the environment. This has actually
579 # happened. Such a system could not be considered "sane".
580 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
581 alias in your environment])
582 fi
583 if test "$[2]" = conftest.file || test $am_try -eq 2; then
584 break
585 fi
586 # Just in case.
587 sleep 1
588 am_has_slept=yes
589 done
68224f8d 590 test "$[2]" = conftest.file
b9e8095b 591 )
592then
593 # Ok.
594 :
595else
596 AC_MSG_ERROR([newly created file is older than distributed files!
597Check your system clock])
598fi
f00f02a3 599AC_MSG_RESULT([yes])
600# If we didn't sleep, we still need to ensure time stamps of config.status and
601# generated files are strictly newer.
602am_sleep_pid=
603if grep 'slept: no' conftest.file >/dev/null 2>&1; then
604 ( sleep 1 ) &
605 am_sleep_pid=$!
606fi
607AC_CONFIG_COMMANDS_PRE(
608 [AC_MSG_CHECKING([that generated files are newer than configure])
609 if test -n "$am_sleep_pid"; then
610 # Hide warnings about reused PIDs.
611 wait $am_sleep_pid 2>/dev/null
612 fi
613 AC_MSG_RESULT([done])])
614rm -f conftest.file
615])
b9e8095b 616
f00f02a3 617# Copyright (C) 2009-2017 Free Software Foundation, Inc.
5e143b6f 618#
619# This file is free software; the Free Software Foundation
620# gives unlimited permission to copy and/or distribute it,
621# with or without modifications, as long as this notice is preserved.
37d42dd9 622
f00f02a3 623# AM_SILENT_RULES([DEFAULT])
624# --------------------------
625# Enable less verbose build rules; with the default set to DEFAULT
626# ("yes" being less verbose, "no" or empty being verbose).
627AC_DEFUN([AM_SILENT_RULES],
628[AC_ARG_ENABLE([silent-rules], [dnl
629AS_HELP_STRING(
630 [--enable-silent-rules],
631 [less verbose build output (undo: "make V=1")])
632AS_HELP_STRING(
633 [--disable-silent-rules],
634 [verbose build output (undo: "make V=0")])dnl
635])
636case $enable_silent_rules in @%:@ (((
637 yes) AM_DEFAULT_VERBOSITY=0;;
638 no) AM_DEFAULT_VERBOSITY=1;;
639 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
640esac
641dnl
642dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
643dnl do not support nested variable expansions.
644dnl See automake bug#9928 and bug#10237.
645am_make=${MAKE-make}
646AC_CACHE_CHECK([whether $am_make supports nested variables],
647 [am_cv_make_support_nested_variables],
648 [if AS_ECHO([['TRUE=$(BAR$(V))
649BAR0=false
650BAR1=true
651V=1
652am__doit:
653 @$(TRUE)
654.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
655 am_cv_make_support_nested_variables=yes
656else
657 am_cv_make_support_nested_variables=no
658fi])
659if test $am_cv_make_support_nested_variables = yes; then
660 dnl Using '$V' instead of '$(V)' breaks IRIX make.
661 AM_V='$(V)'
662 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
663else
664 AM_V=$AM_DEFAULT_VERBOSITY
665 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
666fi
667AC_SUBST([AM_V])dnl
668AM_SUBST_NOTMAKE([AM_V])dnl
669AC_SUBST([AM_DEFAULT_V])dnl
670AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
671AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
672AM_BACKSLASH='\'
673AC_SUBST([AM_BACKSLASH])dnl
674_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
675])
676
677# Copyright (C) 2001-2017 Free Software Foundation, Inc.
678#
679# This file is free software; the Free Software Foundation
680# gives unlimited permission to copy and/or distribute it,
681# with or without modifications, as long as this notice is preserved.
888655a4 682
5e143b6f 683# AM_PROG_INSTALL_STRIP
684# ---------------------
f00f02a3 685# One issue with vendor 'install' (even GNU) is that you can't
68224f8d 686# specify the program used to strip binaries. This is especially
687# annoying in cross-compiling environments, where the build's strip
688# is unlikely to handle the host's binaries.
689# Fortunately install-sh will honor a STRIPPROG variable, so we
f00f02a3 690# always use install-sh in "make install-strip", and initialize
68224f8d 691# STRIPPROG with the value of the STRIP variable (set by the user).
692AC_DEFUN([AM_PROG_INSTALL_STRIP],
693[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
f00f02a3 694# Installed binaries are usually stripped using 'strip' when the user
695# run "make install-strip". However 'strip' might not be the right
68224f8d 696# tool to use in cross-compilation environments, therefore Automake
f00f02a3 697# will honor the 'STRIP' environment variable to overrule this program.
698dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
68224f8d 699if test "$cross_compiling" != no; then
700 AC_CHECK_TOOL([STRIP], [strip], :)
701fi
cd9a469c 702INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
68224f8d 703AC_SUBST([INSTALL_STRIP_PROGRAM])])
704
f00f02a3 705# Copyright (C) 2006-2017 Free Software Foundation, Inc.
cd9a469c 706#
707# This file is free software; the Free Software Foundation
708# gives unlimited permission to copy and/or distribute it,
709# with or without modifications, as long as this notice is preserved.
710
cd9a469c 711# _AM_SUBST_NOTMAKE(VARIABLE)
712# ---------------------------
713# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
714# This macro is traced by Automake.
715AC_DEFUN([_AM_SUBST_NOTMAKE])
716
717# AM_SUBST_NOTMAKE(VARIABLE)
888655a4 718# --------------------------
cd9a469c 719# Public sister of _AM_SUBST_NOTMAKE.
720AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
721
1bd7aab1 722# Check how to create a tarball. -*- Autoconf -*-
723
f00f02a3 724# Copyright (C) 2004-2017 Free Software Foundation, Inc.
5e143b6f 725#
726# This file is free software; the Free Software Foundation
727# gives unlimited permission to copy and/or distribute it,
728# with or without modifications, as long as this notice is preserved.
1bd7aab1 729
1bd7aab1 730# _AM_PROG_TAR(FORMAT)
731# --------------------
732# Check how to create a tarball in format FORMAT.
f00f02a3 733# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1bd7aab1 734#
735# Substitute a variable $(am__tar) that is a command
736# writing to stdout a FORMAT-tarball containing the directory
737# $tardir.
738# tardir=directory && $(am__tar) > result.tar
739#
740# Substitute a variable $(am__untar) that extract such
741# a tarball read from stdin.
742# $(am__untar) < result.tar
f00f02a3 743#
1bd7aab1 744AC_DEFUN([_AM_PROG_TAR],
888655a4 745[# Always define AMTAR for backward compatibility. Yes, it's still used
746# in the wild :-( We should find a proper way to deprecate it ...
747AC_SUBST([AMTAR], ['$${TAR-tar}'])
1bd7aab1 748
f00f02a3 749# We'll loop over all known methods to create a tar archive until one works.
750_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1bd7aab1 751
f00f02a3 752m4_if([$1], [v7],
753 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
754
755 [m4_case([$1],
756 [ustar],
757 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
758 # There is notably a 21 bits limit for the UID and the GID. In fact,
759 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
760 # and bug#13588).
761 am_max_uid=2097151 # 2^21 - 1
762 am_max_gid=$am_max_uid
763 # The $UID and $GID variables are not portable, so we need to resort
764 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
765 # below are definitely unexpected, so allow the users to see them
766 # (that is, avoid stderr redirection).
767 am_uid=`id -u || echo unknown`
768 am_gid=`id -g || echo unknown`
769 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
770 if test $am_uid -le $am_max_uid; then
771 AC_MSG_RESULT([yes])
772 else
773 AC_MSG_RESULT([no])
774 _am_tools=none
775 fi
776 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
777 if test $am_gid -le $am_max_gid; then
778 AC_MSG_RESULT([yes])
779 else
780 AC_MSG_RESULT([no])
781 _am_tools=none
782 fi],
783
784 [pax],
785 [],
786
787 [m4_fatal([Unknown tar format])])
788
789 AC_MSG_CHECKING([how to create a $1 tar archive])
790
791 # Go ahead even if we have the value already cached. We do so because we
792 # need to set the values for the 'am__tar' and 'am__untar' variables.
793 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
794
795 for _am_tool in $_am_tools; do
796 case $_am_tool in
797 gnutar)
798 for _am_tar in tar gnutar gtar; do
799 AM_RUN_LOG([$_am_tar --version]) && break
800 done
801 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
802 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
803 am__untar="$_am_tar -xf -"
804 ;;
805 plaintar)
806 # Must skip GNU tar: if it does not support --format= it doesn't create
807 # ustar tarball either.
808 (tar --version) >/dev/null 2>&1 && continue
809 am__tar='tar chf - "$$tardir"'
810 am__tar_='tar chf - "$tardir"'
811 am__untar='tar xf -'
812 ;;
813 pax)
814 am__tar='pax -L -x $1 -w "$$tardir"'
815 am__tar_='pax -L -x $1 -w "$tardir"'
816 am__untar='pax -r'
817 ;;
818 cpio)
819 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
820 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
821 am__untar='cpio -i -H $1 -d'
822 ;;
823 none)
824 am__tar=false
825 am__tar_=false
826 am__untar=false
827 ;;
828 esac
829
830 # If the value was cached, stop now. We just wanted to have am__tar
831 # and am__untar set.
832 test -n "${am_cv_prog_tar_$1}" && break
833
834 # tar/untar a dummy directory, and stop if the command works.
835 rm -rf conftest.dir
836 mkdir conftest.dir
837 echo GrepMe > conftest.dir/file
838 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
839 rm -rf conftest.dir
840 if test -s conftest.tar; then
841 AM_RUN_LOG([$am__untar <conftest.tar])
842 AM_RUN_LOG([cat conftest.dir/file])
843 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
844 fi
845 done
1bd7aab1 846 rm -rf conftest.dir
1bd7aab1 847
f00f02a3 848 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
849 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
850
1bd7aab1 851AC_SUBST([am__tar])
852AC_SUBST([am__untar])
853]) # _AM_PROG_TAR
854
e95f1772 855m4_include([../config/acx.m4])
6b2678bb 856m4_include([../config/enable.m4])
94b7f973 857m4_include([../config/futex.m4])
bdb61f32 858m4_include([../config/hwcaps.m4])
d001ce5f 859m4_include([../config/iconv.m4])
233ccc2e 860m4_include([../config/lead-dot.m4])
d001ce5f 861m4_include([../config/lib-ld.m4])
862m4_include([../config/lib-link.m4])
863m4_include([../config/lib-prefix.m4])
8c35d268 864m4_include([../config/lthostflags.m4])
ff434425 865m4_include([../config/multi.m4])
2542439e 866m4_include([../config/no-executables.m4])
6a88da51 867m4_include([../config/override.m4])
12d6de4f 868m4_include([../config/stdint.m4])
ee7d0a6f 869m4_include([../config/unwind_ipinfo.m4])
d5514df7 870m4_include([../libtool.m4])
871m4_include([../ltoptions.m4])
872m4_include([../ltsugar.m4])
873m4_include([../ltversion.m4])
874m4_include([../lt~obsolete.m4])
875m4_include([crossconfig.m4])
876m4_include([linkage.m4])
3d84907c 877m4_include([acinclude.m4])