1 # This file is part of Autoconf. -*- Autoconf -*-
2 # Parameterized macros.
3 m4_define([_AC_COPYRIGHT_YEARS], [
4 Copyright (C) 1992-1996, 1998-2017, 2020-2022 Free Software Foundation,
8 # This file is part of Autoconf. This program is free
9 # software; you can redistribute it and/or modify it under the
10 # terms of the GNU General Public License as published by the
11 # Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # Under Section 7 of GPL version 3, you are granted additional
20 # permissions described in the Autoconf Configure Script Exception,
21 # version 3.0, as published by the Free Software Foundation.
23 # You should have received a copy of the GNU General Public License
24 # and a copy of the Autoconf Configure Script Exception along with
25 # this program; see the files COPYINGv3 and COPYING.EXCEPTION
26 # respectively. If not, see <https://www.gnu.org/licenses/>.
28 # Written by David MacKenzie, with help from
29 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
30 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
33 ## ---------------- ##
35 ## ---------------- ##
38 # We heavily use m4's diversions both for the initializations and for
39 # required macros (see AC_REQUIRE), because in both cases we have to
40 # issue high in 'configure' something which is discovered late.
42 # KILL is only used to suppress output.
44 # The layers of 'configure'. We let m4 undivert them by itself, when
45 # it reaches the end of 'configure.ac'.
52 # Purpose of the script.
56 # Initialization of bottom layers.
59 # early initializations (defaults)
61 # initialization code, option handling loop.
64 # Handling 'configure --help'.
66 # Help msg for AC_CANONICAL_*
68 # Help msg from AC_ARG_ENABLE.
70 # Help msg from AC_ARG_WITH.
72 # Help msg from AC_ARG_VAR.
74 # A small paragraph on the use of the variables.
76 # Tail of the handling of --help.
79 # Head of the handling of --version.
81 # FSF copyright notice for --version.
83 # User copyright notice for --version.
85 # Tail of the handling of --version.
91 # Tail of initialization code.
94 # the tests and output code
98 # _m4_divert(DIVERSION-NAME)
99 # --------------------------
100 # Convert a diversion name into its number. Otherwise, return
101 # DIVERSION-NAME which is supposed to be an actual diversion number.
102 # Of course it would be nicer to use m4_case here, instead of zillions
103 # of little macros, but it then takes twice longer to run 'autoconf'!
113 # 3. HEADER-COPYRIGHT
116 m4_define([_m4_divert(DEFAULTS)], 10)
117 m4_define([_m4_divert(PARSE_ARGS)], 20)
119 m4_define([_m4_divert(HELP_BEGIN)], 100)
120 m4_define([_m4_divert(HELP_CANON)], 101)
121 m4_define([_m4_divert(HELP_ENABLE)], 102)
122 m4_define([_m4_divert(HELP_WITH)], 103)
123 m4_define([_m4_divert(HELP_VAR)], 104)
124 m4_define([_m4_divert(HELP_VAR_END)], 105)
125 m4_define([_m4_divert(HELP_END)], 106)
127 m4_define([_m4_divert(VERSION_BEGIN)], 200)
128 m4_define([_m4_divert(VERSION_FSF)], 201)
129 m4_define([_m4_divert(VERSION_USER)], 202)
130 m4_define([_m4_divert(VERSION_END)], 203)
132 m4_define([_m4_divert(SHELL_FN)], 250)
134 m4_define([_m4_divert(INIT_PREPARE)], 300)
138 # AC_DIVERT_PUSH(DIVERSION-NAME)
140 # ------------------------------
141 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
142 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
146 ## ------------------------------------ ##
147 ## Defining/requiring Autoconf macros. ##
148 ## ------------------------------------ ##
151 # AC_DEFUN(NAME, EXPANSION)
152 # AC_DEFUN_ONCE(NAME, EXPANSION)
153 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
155 # AC_PROVIDE(MACRO-NAME)
156 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
157 # -----------------------------------------------------------
158 m4_copy([m4_defun], [AC_DEFUN])
159 m4_copy([m4_defun_once], [AC_DEFUN_ONCE])
160 m4_copy([m4_before], [AC_BEFORE])
161 m4_copy([m4_require], [AC_REQUIRE])
162 m4_copy([m4_provide], [AC_PROVIDE])
163 m4_copy([m4_provide_if], [AC_PROVIDE_IFELSE])
166 ## ----------------------------- ##
167 ## Implementing shell functions. ##
168 ## ----------------------------- ##
171 # AC_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY, [DIVERSION = SHELL_FN]
172 # ------------------------------------------------------------------------
173 # Same as AS_REQUIRE_SHELL_FN except that the default diversion comes
174 # later in the script (speeding up configure --help and --version).
175 AC_DEFUN([AC_REQUIRE_SHELL_FN],
176 [AS_REQUIRE_SHELL_FN([$1], [$2], [$3], m4_default_quoted([$4], [SHELL_FN]))])
180 ## ----------------------------- ##
181 ## Implementing Autoconf loops. ##
182 ## ----------------------------- ##
185 # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION)
186 # ------------------------------------------
187 # The double definition is necessary because autoupdate expands m4_
188 # macros, so we have to double-quote the replacement, but then it
189 # won't work in a normal autoconf run.
190 AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]])
191 AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl
192 m4_warn([obsolete], [The macro 'AC_FOREACH' is obsolete.
193 You should run autoupdate.])])
197 ## ----------------------------------- ##
198 ## Helping macros to display strings. ##
199 ## ----------------------------------- ##
202 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
203 # --------------------------------------
204 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
208 ## ---------------------------------------------- ##
209 ## Information on the package being Autoconf'ed. ##
210 ## ---------------------------------------------- ##
213 # It is suggested that the macros in this section appear before
214 # AC_INIT in 'configure.ac'. Nevertheless, this is just stylistic,
215 # and from the implementation point of view, AC_INIT *must* be expanded
216 # beforehand: it puts data in diversions which must appear before the
217 # data provided by the macros of this section.
219 # The solution is to require AC_INIT in each of these macros. AC_INIT
220 # has the needed magic so that it can't be expanded twice.
222 # _AC_INIT_LITERAL(STRING)
223 # ------------------------
224 # Reject STRING if it cannot be used as-is in single-quoted strings,
225 # double-quoted strings, and quoted and unquoted here-docs.
226 m4_define([_AC_INIT_LITERAL],
227 [m4_if(m4_index(m4_translit([[$1]], [""], ['']),
228 ['])AS_LITERAL_HEREDOC_IF([$1], [-]),
230 [m4_warn([syntax], [AC_INIT: not a literal: "$1"])])])
232 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
233 # ---------------------------------------------------------------------
234 # Set the values of AC_PACKAGE_{NAME,VERSION,STRING,BUGREPORT,TARNAME,URL}
235 # from the arguments.
236 m4_define([_AC_INIT_PACKAGE],
237 [_AC_INIT_PACKAGE_N(m4_normalize([$1]), m4_normalize([$2]), m4_normalize([$3]),
238 m4_normalize([$4]), m4_normalize([$5]))])
240 # _AC_INIT_PACKAGE_N(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
241 # -----------------------------------------------------------------------
242 # Subroutine of _AC_INIT_PACKAGE.
243 m4_define([_AC_INIT_PACKAGE_N],
244 [# PACKAGE-NAME, VERSION, BUGREPORT, and URL should all be safe for use
245 # in shell strings of all kinds.
246 _AC_INIT_LITERAL([$1])
247 _AC_INIT_LITERAL([$2])
248 _AC_INIT_LITERAL([$3])
249 _AC_INIT_LITERAL([$5])
251 # TARNAME is even more constrained: it should not contain any shell
252 # metacharacters or whitespace, because it is used to construct
254 AS_LITERAL_WORD_IF([$4], [],
256 [AC_INIT: unsafe as a filename: "$4"])])
258 m4_define_default([AC_PACKAGE_NAME], [$1])
259 m4_define_default([AC_PACKAGE_VERSION], [$2])
261 # The m4_strip makes AC_PACKAGE_STRING be [], not [ ], when
262 # both $1 and $2 are empty.
263 m4_define_default([AC_PACKAGE_STRING], m4_strip([$1 $2]))
264 m4_define_default([AC_PACKAGE_BUGREPORT], [$3])
266 # N.B. m4_ifnblank strips one layer of quotation from whichever of its
267 # second and third argument it evaluates to.
268 m4_define_default([AC_PACKAGE_TARNAME],
269 m4_ifnblank([$4], [[$4]],
270 [m4_quote(m4_bpatsubst(m4_tolower(m4_bpatsubst([$1], [^GNU ], [])),
271 [[^_abcdefghijklmnopqrstuvwxyz0123456789]], [-]))]))
272 m4_define_default([AC_PACKAGE_URL],
273 m4_ifnblank([$5], [[$5]],
274 [m4_if(m4_index([$1], [GNU ]), [0],
275 [[https://www.gnu.org/software/]m4_defn([AC_PACKAGE_TARNAME])[/]],
280 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER],
281 # [FILTER = m4_newline])
282 # ------------------------------------------------------
283 # Emit TEXT, a copyright notice, in the top of 'configure' and in
284 # --version output. Macros in TEXT are evaluated once. Process
285 # the --version output through FILTER (m4_newline, m4_do, and
286 # m4_copyright_condense are common filters).
287 m4_define([AC_COPYRIGHT],
288 [AS_COPYRIGHT([$1])[]]dnl
289 [m4_divert_text(m4_default_quoted([$2], [VERSION_USER]),
290 [m4_default([$3], [m4_newline])([$1])])])# AC_COPYRIGHT
293 # AC_REVISION(REVISION-INFO)
294 # --------------------------
295 # The second quote in the translit is just to cope with font-lock-mode
296 # which sees the opening of a string.
297 m4_define([AC_REVISION],
298 [m4_divert_text([HEADER-REVISION],
299 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
305 ## ---------------------------------------- ##
306 ## Requirements over the Autoconf version. ##
307 ## ---------------------------------------- ##
310 # AU::AC_PREREQ(VERSION)
311 # ----------------------
312 # Update this 'AC_PREREQ' statement to require the current version of
313 # Autoconf. But fail if ever this autoupdate is too old.
315 # Note that 'm4_defn([m4_PACKAGE_VERSION])' below are expanded before
316 # calling 'AU_DEFUN', i.e., it is hard coded. Otherwise it would be
317 # quite complex for autoupdate to import the value of
318 # 'm4_PACKAGE_VERSION'. We could 'AU_DEFUN' 'm4_PACKAGE_VERSION', but
319 # this would replace all its occurrences with the current version of
320 # Autoconf, which is certainly not what the user intended.
321 AU_DEFUN([AC_PREREQ],
322 [m4_version_prereq([$1])[]dnl
323 [AC_PREREQ(]]m4_dquote(m4_dquote(m4_defn([m4_PACKAGE_VERSION])))[[)]])
328 # Complain and exit if the Autoconf version is less than VERSION.
329 m4_undefine([AC_PREREQ])
330 m4_copy([m4_version_prereq], [AC_PREREQ])
333 # AC_AUTOCONF_VERSION
334 # -------------------
335 # The current version of Autoconf parsing this file.
336 m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])
342 ## ---------------- ##
343 ## Initialization. ##
344 ## ---------------- ##
347 # All the following macros are used by AC_INIT. Ideally, they should
348 # be presented in the order in which they are output. Please, help us
349 # sorting it, or at least, don't augment the entropy.
354 # Provide useful headers; override the HEADER-COMMENT created by M4sh.
355 m4_define([_AC_INIT_NOTICE],
356 [m4_cleardivert([HEADER-COMMENT])]dnl
357 [m4_divert_text([HEADER-COMMENT],
358 [@%:@ Guess values for system-dependent variables and create Makefiles.
359 @%:@ Generated by m4_PACKAGE_STRING[]dnl
360 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
362 m4_ifset([AC_PACKAGE_BUGREPORT],
363 [m4_divert_text([HEADER-COMMENT],
365 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
371 # We dump to VERSION_FSF to make sure we are inserted before the
372 # user copyrights, and after the setup of the --version handling.
373 m4_define([_AC_INIT_COPYRIGHT],
374 [AC_COPYRIGHT(m4_defn([_AC_COPYRIGHT_YEARS]), [VERSION_FSF], [
375 m4_copyright_condense])dnl
377 [This configure script is free software; the Free Software Foundation
378 gives unlimited permission to copy, distribute and modify it.],
379 [VERSION_FSF], [m4_echo])])
384 # Set up the file descriptors used by 'configure'.
385 # File descriptor usage:
386 # 0 standard input (/dev/null)
388 # 2 errors and warnings
389 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
390 # AS_MESSAGE_FD checking for... messages and results
391 # AS_ORIGINAL_STDIN_FD original standard input (still open)
393 # stdin is /dev/null because checks that run programs may
394 # inadvertently run interactive ones, which would stop configuration
395 # until someone typed an EOF.
396 m4_define([AS_MESSAGE_FD], 6)
397 m4_define([AS_ORIGINAL_STDIN_FD], 7)
398 # That's how they used to be named.
399 AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
400 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
405 # Values which defaults can be set from 'configure.ac'.
406 # '/bin/machine' is used in 'glibcbug'. The others are used in config.*
407 m4_define([_AC_INIT_DEFAULTS],
408 [m4_divert_push([DEFAULTS])dnl
410 test -n "$DJDIR" || exec AS_ORIGINAL_STDIN_FD<&0 </dev/null
411 exec AS_MESSAGE_FD>&1
414 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
415 # so uname gets run too.
416 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
421 ac_default_prefix=/usr/local
423 ac_config_libobj_dir=.
430 AC_SUBST([PATH_SEPARATOR])dnl
432 # Identity of this package.
433 AC_SUBST([PACKAGE_NAME],
434 [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
435 AC_SUBST([PACKAGE_TARNAME],
436 [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
437 AC_SUBST([PACKAGE_VERSION],
438 [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
439 AC_SUBST([PACKAGE_STRING],
440 [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
441 AC_SUBST([PACKAGE_BUGREPORT],
442 [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
443 AC_SUBST([PACKAGE_URL],
444 [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])dnl
446 m4_divert_pop([DEFAULTS])dnl
447 m4_wrap_lifo([m4_divert_text([DEFAULTS],
448 [ac_subst_vars='m4_set_dump([_AC_SUBST_VARS], m4_newline)'
449 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
451 enable_option_checking
452 m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
454 m4_ifdef([_AC_PRECIOUS_VARS],
455 [_AC_ARG_VAR_STORE[]dnl
456 _AC_ARG_VAR_VALIDATE[]dnl
457 ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
458 m4_ifdef([_AC_LIST_SUBDIRS],
459 [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
461 ])# _AC_INIT_DEFAULTS
464 # AC_PREFIX_DEFAULT(PREFIX)
465 # -------------------------
466 AC_DEFUN([AC_PREFIX_DEFAULT],
467 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
470 # AC_PREFIX_PROGRAM(PROGRAM)
471 # --------------------------
472 # Guess the value for the 'prefix' variable by looking for
473 # the argument program along PATH and taking its parent.
474 # Example: if the argument is 'gcc' and we find /usr/local/gnu/bin/gcc,
475 # set 'prefix' to /usr/local/gnu.
476 # This comes too late to find a site file based on the prefix,
477 # and it might use a cached value for the path.
478 # No big loss, I think, since most configures don't use this macro anyway.
479 AC_DEFUN([AC_PREFIX_PROGRAM],
480 [if test "x$prefix" = xNONE; then
481 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
482 _AS_ECHO_N([checking for prefix by ])
483 AC_PATH_PROG(ac_prefix_program, [$1])
484 if test -n "$ac_prefix_program"; then
485 prefix=`AS_DIRNAME(["$ac_prefix_program"])`
486 prefix=`AS_DIRNAME(["$prefix"])`
489 ])# AC_PREFIX_PROGRAM
492 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
493 # ---------------------------------------------
494 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
495 # relative to the directory that configure is in, which we can look
496 # for to find out if srcdir is correct.
497 AC_DEFUN([AC_CONFIG_SRCDIR],
498 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
503 # Set ac_pwd, and sanity-check it and the source and installation directories.
505 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
507 AC_DEFUN([_AC_INIT_DIRCHECK],
508 [m4_divert_push([PARSE_ARGS])dnl
510 ac_pwd=`pwd` && test -n "$ac_pwd" &&
511 ac_ls_di=`ls -di .` &&
512 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
513 AC_MSG_ERROR([working directory cannot be determined])
514 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
515 AC_MSG_ERROR([pwd does not report name of working directory])
517 m4_divert_pop([PARSE_ARGS])dnl
518 ])# _AC_INIT_DIRCHECK
522 # Compute 'srcdir' based on '$ac_unique_file'.
524 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
526 AC_DEFUN([_AC_INIT_SRCDIR],
527 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
528 m4_divert_push([PARSE_ARGS])dnl
530 # Find the source files, if location was not specified.
531 if test -z "$srcdir"; then
532 ac_srcdir_defaulted=yes
533 # Try the directory containing this script, then the parent directory.
534 ac_confdir=`AS_DIRNAME(["$as_myself"])`
536 if test ! -r "$srcdir/$ac_unique_file"; then
540 ac_srcdir_defaulted=no
542 if test ! -r "$srcdir/$ac_unique_file"; then
543 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
544 AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
546 ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
548 cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
550 # When building in place, set srcdir=.
551 if test "$ac_abs_confdir" = "$ac_pwd"; then
554 # Remove unnecessary trailing slashes from srcdir.
555 # Double slashes in file names in object file debugging info
556 # mess up M-x gdb in Emacs.
558 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
560 m4_divert_pop([PARSE_ARGS])dnl
564 # _AC_INIT_PARSE_ARGS
565 # -------------------
566 m4_define([_AC_INIT_PARSE_ARGS],
567 [m4_divert_push([PARSE_ARGS])dnl
569 # Initialize some variables set by options.
571 ac_init_version=false
572 ac_unrecognized_opts=
574 # The variables have the same names as the options, with
575 # dashes changed to underlines.
577 AC_SUBST(exec_prefix, NONE)dnl
580 AC_SUBST(prefix, NONE)dnl
583 AC_SUBST(program_transform_name, [s,x,x,])dnl
591 # Installation directory options.
592 # These are left unexpanded so users can "make install exec_prefix=/foo"
593 # and all the variables that are supposed to be based on exec_prefix
594 # by default will actually change.
595 # Use braces instead of parens because sh, perl, etc. also accept them.
596 # (The list follows the same order as the GNU Coding Standards.)
597 AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
598 AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
599 AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
600 AC_SUBST([datarootdir], ['${prefix}/share'])dnl
601 AC_SUBST([datadir], ['${datarootdir}'])dnl
602 AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
603 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
604 AC_SUBST([localstatedir], ['${prefix}/var'])dnl
605 AC_SUBST([runstatedir], ['${localstatedir}/run'])dnl
606 AC_SUBST([includedir], ['${prefix}/include'])dnl
607 AC_SUBST([oldincludedir], ['/usr/include'])dnl
608 AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
609 ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
610 ['${datarootdir}/doc/${PACKAGE}'])])dnl
611 AC_SUBST([infodir], ['${datarootdir}/info'])dnl
612 AC_SUBST([htmldir], ['${docdir}'])dnl
613 AC_SUBST([dvidir], ['${docdir}'])dnl
614 AC_SUBST([pdfdir], ['${docdir}'])dnl
615 AC_SUBST([psdir], ['${docdir}'])dnl
616 AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
617 AC_SUBST([localedir], ['${datarootdir}/locale'])dnl
618 AC_SUBST([mandir], ['${datarootdir}/man'])dnl
624 # If the previous option needs an argument, assign it.
625 if test -n "$ac_prev"; then
626 eval $ac_prev=\$ac_option
632 *=?*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
637 case $ac_dashdash$ac_option in
641 -bindir | --bindir | --bindi | --bind | --bin | --bi)
643 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
646 -build | --build | --buil | --bui | --bu)
647 ac_prev=build_alias ;;
648 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
649 build_alias=$ac_optarg ;;
651 -cache-file | --cache-file | --cache-fil | --cache-fi \
652 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
653 ac_prev=cache_file ;;
654 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
655 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
656 cache_file=$ac_optarg ;;
659 cache_file=config.cache ;;
661 -datadir | --datadir | --datadi | --datad)
663 -datadir=* | --datadir=* | --datadi=* | --datad=*)
664 datadir=$ac_optarg ;;
666 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
667 | --dataroo | --dataro | --datar)
668 ac_prev=datarootdir ;;
669 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
670 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
671 datarootdir=$ac_optarg ;;
673 _AC_INIT_PARSE_ENABLE([disable])
675 -docdir | --docdir | --docdi | --doc | --do)
677 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
680 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
682 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
685 _AC_INIT_PARSE_ENABLE([enable])
687 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
688 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
689 | --exec | --exe | --ex)
690 ac_prev=exec_prefix ;;
691 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
692 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
693 | --exec=* | --exe=* | --ex=*)
694 exec_prefix=$ac_optarg ;;
696 -gas | --gas | --ga | --g)
697 # Obsolete; use --with-gas.
700 -help | --help | --hel | --he | -h)
702 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
703 ac_init_help=recursive ;;
704 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
705 ac_init_help=short ;;
707 -host | --host | --hos | --ho)
708 ac_prev=host_alias ;;
709 -host=* | --host=* | --hos=* | --ho=*)
710 host_alias=$ac_optarg ;;
712 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
714 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
716 htmldir=$ac_optarg ;;
718 -includedir | --includedir | --includedi | --included | --include \
719 | --includ | --inclu | --incl | --inc)
720 ac_prev=includedir ;;
721 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
722 | --includ=* | --inclu=* | --incl=* | --inc=*)
723 includedir=$ac_optarg ;;
725 -infodir | --infodir | --infodi | --infod | --info | --inf)
727 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
728 infodir=$ac_optarg ;;
730 -libdir | --libdir | --libdi | --libd)
732 -libdir=* | --libdir=* | --libdi=* | --libd=*)
735 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
736 | --libexe | --libex | --libe)
737 ac_prev=libexecdir ;;
738 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
739 | --libexe=* | --libex=* | --libe=*)
740 libexecdir=$ac_optarg ;;
742 -localedir | --localedir | --localedi | --localed | --locale)
744 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
745 localedir=$ac_optarg ;;
747 -localstatedir | --localstatedir | --localstatedi | --localstated \
748 | --localstate | --localstat | --localsta | --localst | --locals)
749 ac_prev=localstatedir ;;
750 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
751 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
752 localstatedir=$ac_optarg ;;
754 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
756 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
760 # Obsolete; use --without-fp.
763 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
764 | --no-cr | --no-c | -n)
767 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
768 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
771 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
772 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
773 | --oldin | --oldi | --old | --ol | --o)
774 ac_prev=oldincludedir ;;
775 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
776 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
777 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
778 oldincludedir=$ac_optarg ;;
780 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
782 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
785 -program-prefix | --program-prefix | --program-prefi | --program-pref \
786 | --program-pre | --program-pr | --program-p)
787 ac_prev=program_prefix ;;
788 -program-prefix=* | --program-prefix=* | --program-prefi=* \
789 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
790 program_prefix=$ac_optarg ;;
792 -program-suffix | --program-suffix | --program-suffi | --program-suff \
793 | --program-suf | --program-su | --program-s)
794 ac_prev=program_suffix ;;
795 -program-suffix=* | --program-suffix=* | --program-suffi=* \
796 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
797 program_suffix=$ac_optarg ;;
799 -program-transform-name | --program-transform-name \
800 | --program-transform-nam | --program-transform-na \
801 | --program-transform-n | --program-transform- \
802 | --program-transform | --program-transfor \
803 | --program-transfo | --program-transf \
804 | --program-trans | --program-tran \
805 | --progr-tra | --program-tr | --program-t)
806 ac_prev=program_transform_name ;;
807 -program-transform-name=* | --program-transform-name=* \
808 | --program-transform-nam=* | --program-transform-na=* \
809 | --program-transform-n=* | --program-transform-=* \
810 | --program-transform=* | --program-transfor=* \
811 | --program-transfo=* | --program-transf=* \
812 | --program-trans=* | --program-tran=* \
813 | --progr-tra=* | --program-tr=* | --program-t=*)
814 program_transform_name=$ac_optarg ;;
816 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
818 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
821 -psdir | --psdir | --psdi | --psd | --ps)
823 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
826 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
827 | -silent | --silent | --silen | --sile | --sil)
830 -runstatedir | --runstatedir | --runstatedi | --runstated \
831 | --runstate | --runstat | --runsta | --runst | --runs \
832 | --run | --ru | --r)
833 ac_prev=runstatedir ;;
834 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
835 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
836 | --run=* | --ru=* | --r=*)
837 runstatedir=$ac_optarg ;;
839 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
841 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
843 sbindir=$ac_optarg ;;
845 -sharedstatedir | --sharedstatedir | --sharedstatedi \
846 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
847 | --sharedst | --shareds | --shared | --share | --shar \
849 ac_prev=sharedstatedir ;;
850 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
851 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
852 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
854 sharedstatedir=$ac_optarg ;;
856 -site | --site | --sit)
858 -site=* | --site=* | --sit=*)
861 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
863 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
866 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
867 | --syscon | --sysco | --sysc | --sys | --sy)
868 ac_prev=sysconfdir ;;
869 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
870 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
871 sysconfdir=$ac_optarg ;;
873 -target | --target | --targe | --targ | --tar | --ta | --t)
874 ac_prev=target_alias ;;
875 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
876 target_alias=$ac_optarg ;;
878 -v | -verbose | --verbose | --verbos | --verbo | --verb)
881 -version | --version | --versio | --versi | --vers | -V)
884 _AC_INIT_PARSE_ENABLE([with])
886 _AC_INIT_PARSE_ENABLE([without])
889 # Obsolete; use --with-x.
892 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
893 | --x-incl | --x-inc | --x-in | --x-i)
894 ac_prev=x_includes ;;
895 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
896 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
897 x_includes=$ac_optarg ;;
899 -x-libraries | --x-libraries | --x-librarie | --x-librari \
900 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
901 ac_prev=x_libraries ;;
902 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
903 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
904 x_libraries=$ac_optarg ;;
906 -*) AC_MSG_ERROR([unrecognized option: '$ac_option'
907 Try '$[0] --help' for more information])
911 ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
912 # Reject names that are not valid shell variable names.
913 case $ac_envvar in #(
914 '' | [[0-9]]* | *[[!_$as_cr_alnum]]* )
915 AC_MSG_ERROR([invalid variable name: '$ac_envvar']) ;;
917 eval $ac_envvar=\$ac_optarg
921 # FIXME: should be removed in autoconf 3.0.
922 AC_MSG_WARN([you should use --build, --host, --target])
923 expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
924 AC_MSG_WARN([invalid host type: $ac_option])
925 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
931 if test -n "$ac_prev"; then
932 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
933 AC_MSG_ERROR([missing argument to $ac_option])
936 if test -n "$ac_unrecognized_opts"; then
937 case $enable_option_checking in
939 fatal) AC_MSG_ERROR([unrecognized options: $ac_unrecognized_opts]) ;;
940 *) AC_MSG_WARN( [unrecognized options: $ac_unrecognized_opts]) ;;
944 # Check all directory arguments for consistency.
945 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
946 datadir sysconfdir sharedstatedir localstatedir includedir \
947 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
948 libdir localedir mandir runstatedir
950 eval ac_val=\$$ac_var
951 # Remove trailing slashes.
954 ac_val=`expr "X$ac_val" : 'X\(.*[[^/]]\)' \| "X$ac_val" : 'X\(.*\)'`
955 eval $ac_var=\$ac_val;;
957 # Be sure to have absolute directory names.
959 [[\\/$]]* | ?:[[\\/]]* ) continue;;
960 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
962 AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
965 # There might be people who depend on the old broken behavior: '$host'
966 # used to hold the argument of --host etc.
967 # FIXME: To remove some day.
972 # FIXME: To remove some day.
973 if test "x$host_alias" != x; then
974 if test "x$build_alias" = x; then
975 cross_compiling=maybe
976 elif test "x$build_alias" != "x$host_alias"; then
982 test -n "$host_alias" && ac_tool_prefix=$host_alias-
984 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
986 m4_divert_pop([PARSE_ARGS])dnl
987 ])# _AC_INIT_PARSE_ARGS
990 # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
991 # ----------------------------------
992 # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
994 m4_define([_AC_INIT_PARSE_ENABLE],
995 [m4_bmatch([$1], [^with],
996 [_AC_INIT_PARSE_ENABLE2([$1], [with])],
997 [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
1000 # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
1001 # --------------------------------------------------
1002 # Handle an '--enable' or a '--with' option.
1004 # OPTION-NAME is 'enable', 'disable', 'with', or 'without'.
1005 # POSITIVE-NAME is the corresponding positive variant, i.e. 'enable' or 'with'.
1007 # Positive variant of the option is recognized by the condition
1008 # OPTION-NAME == POSITIVE-NAME .
1010 m4_define([_AC_INIT_PARSE_ENABLE2],
1012 ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
1013 # Reject names that are not valid shell variable names.
1014 expr "x$ac_useropt" : "[.*[^-+._$as_cr_alnum]]" >/dev/null &&
1015 AC_MSG_ERROR([invalid ]m4_if([$2], [with],
1016 [package], [feature])[ name: '$ac_useropt'])
1017 ac_useropt_orig=$ac_useropt
1018 ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-+.]]/_/g'`
1019 case $ac_user_opts in
1023 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
1024 ac_unrecognized_sep=', ';;
1026 eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
1032 # Handle the 'configure --help' message.
1033 m4_define([_AC_INIT_HELP],
1034 [m4_divert_push([HELP_BEGIN])dnl
1037 # Report the --help message.
1039 if test "$ac_init_help" = "long"; then
1040 # Omit some internal or obsolete options to make the list less imposing.
1041 # This message is too long to be a string in the A/UX 3.1 sh.
1043 'configure' configures m4_ifset([AC_PACKAGE_STRING],
1044 [AC_PACKAGE_STRING],
1045 [this package]) to adapt to many kinds of systems.
1047 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1049 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
1050 VAR=VALUE. See below for descriptions of some of the useful variables.
1052 Defaults for the options are specified in brackets.
1055 -h, --help display this help and exit
1056 --help=short display options specific to this package
1057 --help=recursive display the short help of all the included packages
1058 -V, --version display version information and exit
1059 -q, --quiet, --silent do not print 'checking ...' messages
1060 --cache-file=FILE cache test results in FILE [disabled]
1061 -C, --config-cache alias for '--cache-file=config.cache'
1062 -n, --no-create do not create output files
1063 --srcdir=DIR find the sources in DIR [configure dir or '..']
1065 Installation directories:
1066 ]AS_HELP_STRING([--prefix=PREFIX],
1067 [install architecture-independent files in PREFIX [$ac_default_prefix]])
1068 AS_HELP_STRING([--exec-prefix=EPREFIX],
1069 [install architecture-dependent files in EPREFIX [PREFIX]])[
1071 By default, 'make install' will install all the files in
1072 '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify
1073 an installation prefix other than '$ac_default_prefix' using '--prefix',
1074 for instance '--prefix=\$HOME'.
1076 For better control, use the options below.
1078 Fine tuning of the installation directories:
1079 --bindir=DIR user executables [EPREFIX/bin]
1080 --sbindir=DIR system admin executables [EPREFIX/sbin]
1081 --libexecdir=DIR program executables [EPREFIX/libexec]
1082 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1083 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1084 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1085 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1086 --libdir=DIR object code libraries [EPREFIX/lib]
1087 --includedir=DIR C header files [PREFIX/include]
1088 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1089 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1090 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1091 --infodir=DIR info documentation [DATAROOTDIR/info]
1092 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1093 --mandir=DIR man documentation [DATAROOTDIR/man]
1094 ]AS_HELP_STRING([--docdir=DIR],
1095 [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME],
1096 [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[
1097 --htmldir=DIR html documentation [DOCDIR]
1098 --dvidir=DIR dvi documentation [DOCDIR]
1099 --pdfdir=DIR pdf documentation [DOCDIR]
1100 --psdir=DIR ps documentation [DOCDIR]
1104 m4_divert_pop([HELP_BEGIN])dnl
1105 dnl The order of the diversions here is
1107 dnl which may be extended by extra generic options such as with X or
1108 dnl AC_ARG_PROGRAM. Displayed only in long --help.
1111 dnl Support for cross compilation (--build, --host and --target).
1112 dnl Display only in long --help.
1115 dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1116 dnl then implements the header of the non generic options.
1125 dnl initialized below, in which we dump the trailer (handling of the
1126 dnl recursion for instance).
1127 m4_divert_push([HELP_ENABLE])dnl
1131 if test -n "$ac_init_help"; then
1132 m4_ifset([AC_PACKAGE_STRING],
1133 [ case $ac_init_help in
1134 short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1137 m4_divert_pop([HELP_ENABLE])dnl
1138 m4_divert_push([HELP_END])dnl
1140 Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
1141 [the package provider]).dnl
1142 m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
1143 AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
1144 m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
1145 General help using GNU software: <https://www.gnu.org/gethelp/>.])])
1150 if test "$ac_init_help" = "recursive"; then
1151 # If there are subdirs, report their specific --help.
1152 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1153 test -d "$ac_dir" ||
1154 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1156 _AC_SRCDIRS(["$ac_dir"])
1157 cd "$ac_dir" || { ac_status=$?; continue; }
1158 # Check for configure.gnu first; this name is used for a wrapper for
1159 # Metaconfig's "Configure" on case-insensitive file systems.
1160 if test -f "$ac_srcdir/configure.gnu"; then
1162 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1163 elif test -f "$ac_srcdir/configure"; then
1165 $SHELL "$ac_srcdir/configure" --help=recursive
1167 AC_MSG_WARN([no configuration information is in $ac_dir])
1169 cd "$ac_pwd" || { ac_status=$?; break; }
1173 test -n "$ac_init_help" && exit $ac_status
1174 m4_divert_pop([HELP_END])dnl
1180 # Handle the 'configure --version' message.
1181 m4_define([_AC_INIT_VERSION],
1182 [m4_divert_text([VERSION_BEGIN],
1183 [if $ac_init_version; then
1185 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1186 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1187 generated by m4_PACKAGE_STRING])
1188 m4_divert_text([VERSION_END],
1192 ])# _AC_INIT_VERSION
1195 # _AC_INIT_CONFIG_LOG
1196 # -------------------
1197 # Initialize the config.log file descriptor and write header to it.
1198 m4_define([_AC_INIT_CONFIG_LOG],
1199 [m4_divert_text([INIT_PREPARE],
1200 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1201 ac_configure_args_raw=
1206 ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1208 AS_VAR_APPEND([ac_configure_args_raw], [" '$ac_arg'"])
1211 case $ac_configure_args_raw in
1215 ac_unsafe_z='|&;<>()$`\\"*?@<:@ '' ' # This string ends in space, tab.
1216 ac_unsafe_a="$ac_unsafe_z#~"
1217 ac_safe_unquote="s/ '\\([[^$ac_unsafe_a]][[^$ac_unsafe_z]]*\\)'/ \\1/g"
1218 ac_configure_args_raw=`dnl
1219 AS_ECHO(["$ac_configure_args_raw"]) | sed "$ac_safe_unquote"`;;
1222 cat >config.log <<_ACEOF
1223 This file contains any messages produced by compilers while
1224 running configure, to aid debugging if configure makes a mistake.
1226 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1227 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1228 generated by m4_PACKAGE_STRING. Invocation command line was
1230 $ $[0]$ac_configure_args_raw
1233 exec AS_MESSAGE_LOG_FD>>config.log
1234 AS_UNAME >&AS_MESSAGE_LOG_FD
1236 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1239 m4_text_box([Core tests.])
1242 ])])# _AC_INIT_CONFIG_LOG
1247 # Called by AC_INIT to build the preamble of the 'configure' scripts.
1248 # 1. Trap and clean up various tmp files.
1249 # 2. Set up the fd and output files
1250 # 3. Remember the options given to 'configure' for 'config.status --recheck'.
1251 # 4. Initiates confdefs.h
1252 # 5. Loads site and cache files
1253 m4_define([_AC_INIT_PREPARE],
1254 [m4_divert_push([INIT_PREPARE])dnl
1256 # Keep a trace of the command line.
1257 # Strip out --no-create and --no-recursion so they do not pile up.
1258 # Strip out --silent because we don't want to record it for future runs.
1259 # Also quote any args containing shell meta-characters.
1260 # Make two passes to allow for proper duplicate-argument suppression.
1264 ac_must_keep_next=false
1270 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1271 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1272 | -silent | --silent | --silen | --sile | --sil)
1275 ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1278 1) AS_VAR_APPEND([ac_configure_args0], [" '$ac_arg'"]) ;;
1280 AS_VAR_APPEND([ac_configure_args1], [" '$ac_arg'"])
1281 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1282 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1283 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1284 dnl give --prefix foo bar).
1285 if test $ac_must_keep_next = true; then
1286 ac_must_keep_next=false # Got value, back to normal.
1289 dnl Use broad patterns, as arguments that would have already made configure
1290 dnl exit don't matter.
1291 *=* | --config-cache | -C | -disable-* | --disable-* \
1292 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1293 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1294 | -with-* | --with-* | -without-* | --without-* | --x)
1295 case "$ac_configure_args0 " in
1296 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1299 -* ) ac_must_keep_next=true ;;
1302 AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"])
1307 AS_UNSET(ac_configure_args0)
1308 AS_UNSET(ac_configure_args1)
1310 # When interrupted or exit'd, cleanup temporary files, and complete
1311 # config.log. We remove comments because anyway the quotes in there
1312 # would cause problems or look ugly.
1313 # WARNING: Use '\'' to represent an apostrophe within the trap.
1314 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1315 trap 'exit_status=$?
1318 # Save into config.log some information that might help in debugging.
1322 AS_BOX([Cache variables.])
1324 m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1330 AS_BOX([Output variables.])
1332 for ac_var in $ac_subst_vars
1334 eval ac_val=\$$ac_var
1336 *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1338 AS_ECHO(["$ac_var='\''$ac_val'\''"])
1342 if test -n "$ac_subst_files"; then
1343 AS_BOX([File substitutions.])
1345 for ac_var in $ac_subst_files
1347 eval ac_val=\$$ac_var
1349 *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1351 AS_ECHO(["$ac_var='\''$ac_val'\''"])
1356 if test -s confdefs.h; then
1357 AS_BOX([confdefs.h.])
1362 test "$ac_signal" != 0 &&
1363 AS_ECHO(["$as_me: caught signal $ac_signal"])
1364 AS_ECHO(["$as_me: exit $exit_status"])
1365 } >&AS_MESSAGE_LOG_FD
1366 rm -f core *.core core.conftest.* &&
1367 rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1370 for ac_signal in 1 2 13 15; do
1371 trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1375 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1376 rm -f -r conftest* confdefs.h
1378 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1379 dnl containing less than 14 bytes (including the newline).
1380 AS_ECHO(["/* confdefs.h */"]) > confdefs.h
1382 # Predefined preprocessor variables.
1383 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1384 [Define to the full name of this package.])dnl
1385 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1386 [Define to the one symbol short name of this package.])dnl
1387 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1388 [Define to the version of this package.])dnl
1389 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1390 [Define to the full name and version of this package.])dnl
1391 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1392 [Define to the address where bug reports for this package
1393 should be sent.])dnl
1394 AC_DEFINE_UNQUOTED([PACKAGE_URL], ["$PACKAGE_URL"],
1395 [Define to the home page for this package.])
1397 # Let the site file select an alternate cache file if it wants to.
1400 m4_divert_pop([INIT_PREPARE])dnl
1401 ])# _AC_INIT_PREPARE
1404 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1405 # ----------------------------------------
1406 # This macro is used only for Autoupdate.
1408 [m4_ifval([$2], [[AC_INIT($@)]],
1411 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1415 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
1416 # ----------------------------------------------------------
1417 # Include the user macro files, prepare the diversions, and output the
1418 # preamble of the 'configure' script.
1420 # If BUG-REPORT is omitted, do without (unless the user previously
1421 # defined the m4 macro AC_PACKAGE_BUGREPORT). If TARNAME is omitted,
1422 # use PACKAGE to seed it. If URL is omitted, use
1423 # 'https://www.gnu.org/software/TARNAME/' if PACKAGE begins with 'GNU',
1424 # otherwise, do without.
1426 # Note that the order is important: first initialize, then set the
1428 m4_define([AC_INIT],
1429 [# Forbidden tokens and exceptions.
1430 m4_pattern_forbid([^_?A[CHUM]_])
1431 m4_pattern_forbid([_AC_])
1432 m4_pattern_forbid([^LIBOBJS$],
1433 [do not use LIBOBJS directly, use AC_LIBOBJ (see section 'AC_LIBOBJ vs LIBOBJS'])
1434 # Actually reserved by M4sh.
1435 m4_pattern_allow([^AS_FLAGS$])
1436 # So that the autoconf-generated scripts will always re-execute
1437 # themselves with $CONFIG_SHELL, if that's set in the environment.
1438 m4_define([_AS_FORCE_REEXEC_WITH_CONFIG_SHELL], [yes])
1441 m4_divert_push([KILL])
1442 m4_ifval([$2], [_AC_INIT_PACKAGE($@)], [_AC_INIT_PACKAGE()])
1453 m4_divert_text([SHELL_FN], [
1454 m4_text_box([Autoconf initialization.])])
1456 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1458 dnl Substitute for predefined variables.
1460 AC_SUBST([ECHO_C])dnl
1461 AC_SUBST([ECHO_N])dnl
1462 AC_SUBST([ECHO_T])dnl
1464 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1465 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1466 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1470 dnl Record that AC_INIT has been called. It doesn't make sense to
1471 dnl AC_REQUIRE AC_INIT, but it _does_ make sense for macros to say
1472 dnl AC_BEFORE([self], [AC_INIT]) sometimes. Also, _AC_FINALIZE checks
1473 dnl for AC_INIT having been called.
1474 m4_provide([AC_INIT])dnl
1480 # Code to be run after the entire configure.ac is processed, but only
1481 # when generating configure. This macro should only be called from
1482 # trailer.m4, which is fed to m4 after configure.ac by autoconf (the
1483 # program). We don't just call m4_wrap([_AC_FINALIZE]), because then
1484 # it would run at freeze time and when tracing configure.ac for
1487 # Currently this doesn't emit anything; it just checks that AC_INIT
1488 # and AC_OUTPUT were expanded at some point. Leaving either of these
1489 # out of a configure script is likely to be a bug.
1490 m4_define([_AC_FINALIZE],
1491 [m4_provide_if([AC_INIT], [],
1492 [m4_warn([syntax], [AC_INIT was never used])])dnl
1493 m4_provide_if([AC_OUTPUT], [],
1494 [m4_warn([syntax], [AC_OUTPUT was never used])])])
1497 ## ------------------------------------------------------------- ##
1498 ## Selecting optional features, working with optional software. ##
1499 ## ------------------------------------------------------------- ##
1501 # AC_PRESERVE_HELP_ORDER
1502 # ----------------------
1503 # Emit help strings in the order given, rather than grouping all --enable-FOO
1504 # and all --with-BAR.
1505 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1506 [m4_divert_once([HELP_ENABLE], [[
1507 Optional Features and Packages:
1508 --disable-option-checking ignore unrecognized --enable/--with options
1509 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1510 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1511 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1512 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
1513 m4_define([_m4_divert(HELP_ENABLE)], _m4_divert(HELP_WITH))
1514 ])# AC_PRESERVE_HELP_ORDER
1516 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1517 # -------------------------------------------------------------------
1518 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1519 # OPTION is either "enable" or "with".
1521 m4_define([_AC_ENABLE_IF],
1522 [@%:@ Check whether --$1-$2 was given.
1523 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-+.], [___]), [$3], [$4])
1526 m4_define([_AC_ENABLE_IF_ACTION],
1527 [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
1529 AS_IF([test ${$1_$2+y}], [$1val=$$1_$2; $3], [$4])dnl
1532 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1533 # ------------------------------------------------------------------------
1534 AC_DEFUN([AC_ARG_ENABLE],
1535 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1537 [m4_divert_once([HELP_ENABLE], [[
1539 --disable-option-checking ignore unrecognized --enable/--with options
1540 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1541 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])])dnl
1542 m4_divert_once([HELP_ENABLE], [$2])dnl
1543 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1547 AU_DEFUN([AC_ENABLE],
1548 [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
1551 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1552 # --------------------------------------------------------------------
1553 AC_DEFUN([AC_ARG_WITH],
1554 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1556 [m4_divert_once([HELP_WITH], [[
1558 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1559 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])])
1560 m4_divert_once([HELP_WITH], [$2])dnl
1561 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1565 [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
1567 # AC_DISABLE_OPTION_CHECKING
1568 # --------------------------
1569 AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
1570 [m4_divert_once([DEFAULTS], [enable_option_checking=no])
1571 ])# AC_DISABLE_OPTION_CHECKING
1574 ## ----------------------------------------- ##
1575 ## Remembering variables for reconfiguring. ##
1576 ## ----------------------------------------- ##
1579 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1580 # ----------------------------------
1581 # Register VARNAME as a precious variable, and document it in
1582 # 'configure --help' (but only once).
1583 AC_DEFUN([AC_ARG_VAR],
1584 [m4_divert_once([HELP_VAR], [[
1585 Some influential environment variables:]])dnl
1586 m4_divert_once([HELP_VAR_END], [[
1587 Use these variables to override the choices made by 'configure' or to help
1588 it to find libraries and programs with nonstandard names/locations.]])dnl
1589 m4_expand_once([m4_divert_text([HELP_VAR],
1590 [AS_HELP_STRING([$1], [$2], [ ])])],
1593 _AC_ARG_VAR_PRECIOUS([$1])dnl
1597 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1598 # -----------------------------
1599 # Declare VARNAME is precious.
1600 m4_define([_AC_ARG_VAR_PRECIOUS],
1601 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1608 # We try to diagnose when precious variables have changed. To do this,
1609 # make two early snapshots (after the option processing to take
1610 # explicit variables into account) of those variables: one (ac_env_)
1611 # which represents the current run, and a second (ac_cv_env_) which,
1612 # at the first run, will be saved in the cache. As an exception to
1613 # the cache mechanism, its loading will override these variables (non
1614 # 'ac_cv_env_' cache value are only set when unset).
1616 # In subsequent runs, after having loaded the cache, compare
1617 # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
1618 m4_define([_AC_ARG_VAR_STORE],
1619 [m4_divert_text([PARSE_ARGS],
1620 [for ac_var in $ac_precious_vars; do
1621 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1622 eval ac_env_${ac_var}_value=\$${ac_var}
1623 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1624 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1629 # _AC_ARG_VAR_VALIDATE
1630 # --------------------
1631 # The precious variables are saved twice at the beginning of
1632 # configure. E.g., PRECIOUS is saved as 'ac_env_PRECIOUS_set' and
1633 # 'ac_env_PRECIOUS_value' on the one hand and 'ac_cv_env_PRECIOUS_set'
1634 # and 'ac_cv_env_PRECIOUS_value' on the other hand.
1636 # Now the cache has just been loaded, so 'ac_cv_env_' represents the
1637 # content of the cached values, while 'ac_env_' represents that of the
1640 # So we check that 'ac_env_' and 'ac_cv_env_' are consistent. If
1642 m4_define([_AC_ARG_VAR_VALIDATE],
1643 [m4_divert_text([INIT_PREPARE],
1644 [# Check that the precious variables saved in the cache have kept the same
1646 ac_cache_corrupted=false
1647 for ac_var in $ac_precious_vars; do
1648 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1649 eval ac_new_set=\$ac_env_${ac_var}_set
1650 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1651 eval ac_new_val=\$ac_env_${ac_var}_value
1652 case $ac_old_set,$ac_new_set in
1654 AS_MESSAGE([error: '$ac_var' was set to '$ac_old_val' in the previous run], 2)
1655 ac_cache_corrupted=: ;;
1657 AS_MESSAGE([error: '$ac_var' was not set in the previous run], 2)
1658 ac_cache_corrupted=: ;;
1661 if test "x$ac_old_val" != "x$ac_new_val"; then
1662 # differences in whitespace do not lead to failure.
1663 ac_old_val_w=`echo x $ac_old_val`
1664 ac_new_val_w=`echo x $ac_new_val`
1665 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1666 AS_MESSAGE([error: '$ac_var' has changed since the previous run:], 2)
1667 ac_cache_corrupted=:
1669 AS_MESSAGE([warning: ignoring whitespace changes in '$ac_var' since the previous run:], 2)
1670 eval $ac_var=\$ac_old_val
1672 AS_MESSAGE([ former value: '$ac_old_val'], 2)
1673 AS_MESSAGE([ current value: '$ac_new_val'], 2)
1676 # Pass precious variables to config.status.
1677 if test "$ac_new_set" = set; then
1679 *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1680 *) ac_arg=$ac_var=$ac_new_val ;;
1682 case " $ac_configure_args " in
1683 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1684 *) AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;;
1688 if $ac_cache_corrupted; then
1689 AS_MESSAGE([error: in '$ac_pwd':], 2)
1690 AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1691 AS_ERROR([run '${MAKE-make} distclean' and/or 'rm $cache_file'
1694 ])# _AC_ARG_VAR_VALIDATE
1700 ## ---------------------------- ##
1701 ## Transforming program names. ##
1702 ## ---------------------------- ##
1707 # This macro is expanded only once, to avoid that 'foo' ends up being
1708 # installed as 'ggfoo'.
1709 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1710 [dnl Document the options.
1711 m4_divert_push([HELP_BEGIN])dnl
1714 --program-prefix=PREFIX prepend PREFIX to installed program names
1715 --program-suffix=SUFFIX append SUFFIX to installed program names
1716 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1717 m4_divert_pop([HELP_BEGIN])dnl
1718 test "$program_prefix" != NONE &&
1719 program_transform_name="s&^&$program_prefix&;$program_transform_name"
1720 # Use a double $ so make ignores it.
1721 test "$program_suffix" != NONE &&
1722 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1723 # Double any \ or $.
1724 # By default was 's,x,x', remove it if useless.
1725 [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
1726 program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
1733 ## ------------------------- ##
1734 ## Finding auxiliary files. ##
1735 ## ------------------------- ##
1738 # AC_CONFIG_AUX_DIR(DIR)
1739 # ----------------------
1740 # Find auxiliary scripts (e.g. install-sh, config.sub, config.guess)
1741 # in DIR. If DIR is a literal shell word and not an absolute path,
1742 # it is interpreted relative to $srcdir; otherwise it is assumed to be
1743 # usable as-is. If this macro is used more than once, it builds up a
1744 # list of directories to search, first to last. If this macro is not
1745 # used at all, the default is to look in $srcdir and two levels of
1746 # parent directories above $srcdir; see _AC_INIT_SRCDIR.
1748 # This macro may be used as a trace hook by tools that wish to know
1749 # where the auxiliary files should be.
1751 # Note: paths starting with a DOS drive letter count as absolute, but
1752 # we do *not* check for backslash as a directory separator, because
1753 # anything with a backslash in it will be considered non-literal by
1754 # AS_LITERAL_WORD_IF and won't reach the m4_bmatch. This is correct
1755 # behavior, because DIR will wind up inside a double-quoted shell string.
1756 AC_DEFUN([AC_CONFIG_AUX_DIR],
1757 [m4_append_uniq([_AC_AUX_DIR_CANDIDATES],
1758 AS_LITERAL_WORD_IF([$1],
1764 [${PATH_SEPARATOR}])])
1767 # AC_CONFIG_AUX_DIRS(DIRS)
1768 # ------------------------
1769 # Find auxiliary scripts (e.g. install-sh, config.sub, config.guess)
1770 # in any of the whitespace-separated directories named DIRS.
1771 # This macro is not documented; it used to be an internal subroutine,
1772 # but its name didn't begin with an underscore, so we're preserving it
1773 # for the small number of configure scripts that used it themselves.
1774 # It might be promoted to an official interface in the future.
1775 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1776 [m4_map_args_w(m4_validate_w([$1]), [AC_CONFIG_AUX_DIR(], [)])])
1779 # AC_REQUIRE_AUX_FILE(FILE)
1780 # -------------------------
1781 # Declare that FILE is a required auxiliary file. FILE must be literal.
1782 # At configure time, if we cannot locate a directory containing all of the
1783 # required auxiliary files, the script will bomb out. This macro may also
1784 # be used as a trace hook by tools that wish to identify all of the required
1786 AC_DEFUN([AC_REQUIRE_AUX_FILE],
1787 [AS_LITERAL_WORD_IF([$1],
1789 [AC_REQUIRE([_AC_INIT_AUX_DIR])],
1790 [m4_set_add([_AC_AUX_FILES], [$1])]
1792 [m4_fatal([$0: requires a literal argument])])])
1795 # AC_CONFIG_AUX_DIR_DEFAULT
1796 # -------------------------
1797 # No longer needed (AC_REQUIRE_AUX_FILE now does the whole job) but
1798 # preserved for backward compatibility with third-party macros.
1799 # Not yet being removed by autoupdate, because we don't know if any
1800 # third-party macros used this without also using AC_REQUIRE_AUX_FILE.
1801 # That usage is now considered incorrect, but removing it would break
1803 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1804 [AC_REQUIRE([_AC_INIT_AUX_DIR])])
1809 # Internal subroutine: AC_REQUIREd by AC_REQUIRE_AUX_FILE and
1810 # AC_CONFIG_AUX_DIR_DEFAULT. Emits the shell code that actually
1811 # searches for the aux directory. If AC_REQUIRE_AUX_FILE has
1812 # been used at least once, the aux directory must contain all
1813 # of the files that were AC_REQUIRE_AUX_FILE'd. If it was never
1814 # used, fall back to the old behavior of looking only for install-sh.
1815 # (This fallback can be removed once we drop AC_CONFIG_AUX_DIR_DEFAULT.)
1816 AC_DEFUN([_AC_INIT_AUX_DIR],
1819 [m4_set_empty([_AC_AUX_FILES],
1822 [AC_CONFIG_AUX_DIR_DEFAULT used without AC_REQUIRE_AUX_FILE])],
1823 [m4_set_add([_AC_AUX_FILES], [install-sh])])])],
1824 [m4_divert_text([INIT_PREPARE],
1826 # Auxiliary files required by this configure script.
1827 ac_aux_files="m4_set_dump([_AC_AUX_FILES], [ ])"
1829 # Locations in which to look for auxiliary files.
1830 ac_aux_dir_candidates="m4_ifset([_AC_AUX_DIR_CANDIDATES],
1831 [m4_defn([_AC_AUX_DIR_CANDIDATES])],
1832 [${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../..])"
1834 # Search for a directory containing all of the required auxiliary files,
1835 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
1836 # If we don't find one directory that contains all the files we need,
1837 # we report the set of missing files from the *first* directory in
1838 # $ac_aux_dir_candidates and give up.
1839 ac_missing_aux_files=""
1840 ac_first_candidate=:
1841 _AS_ECHO_LOG([looking for aux files: $ac_aux_files])
1842 _AS_PATH_WALK([$ac_aux_dir_candidates], [
1843 _AS_ECHO_LOG([ trying $as_dir])
1844 ac_aux_dir_found=yes
1846 for ac_aux in $ac_aux_files
1848 # As a special case, if "install-sh" is required, that requirement
1849 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
1850 # and $ac_install_sh is set appropriately for whichever one is found.
1851 if test x"$ac_aux" = x"install-sh"
1853 if test -f "${as_dir}install-sh"; then
1854 _AS_ECHO_LOG([ ${as_dir}install-sh found])
1855 ac_install_sh="${as_dir}install-sh -c"
1856 elif test -f "${as_dir}install.sh"; then
1857 _AS_ECHO_LOG([ ${as_dir}install.sh found])
1858 ac_install_sh="${as_dir}install.sh -c"
1859 elif test -f "${as_dir}shtool"; then
1860 _AS_ECHO_LOG([ ${as_dir}shtool found])
1861 ac_install_sh="${as_dir}shtool install -c"
1864 if $ac_first_candidate; then
1865 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
1871 if test -f "${as_dir}${ac_aux}"; then
1872 _AS_ECHO_LOG([ ${as_dir}${ac_aux} found])
1875 if $ac_first_candidate; then
1876 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
1883 if test "$ac_aux_dir_found" = yes; then
1884 ac_aux_dir="$as_dir"
1887 ac_first_candidate=false
1889 [AC_MSG_ERROR([cannot find required auxiliary files:$ac_missing_aux_files])])
1891 # These three variables are undocumented and unsupported,
1892 # and are intended to be withdrawn in a future Autoconf release.
1893 # They can cause serious problems if a builder's source tree is in a directory
1894 # whose full name contains unusual characters.
1895 dnl The quadrigraphs prevent spurious deprecation warnings.
1896 if test -f "${ac_aux_dir}config.guess"; then
1897 ac_@&t@config_guess="$SHELL ${ac_aux_dir}config.guess"
1899 if test -f "${ac_aux_dir}config.sub"; then
1900 ac_@&t@config_sub="$SHELL ${ac_aux_dir}config.sub"
1902 if test -f "$ac_aux_dir/configure"; then
1903 ac_@&t@configure="$SHELL ${ac_aux_dir}configure"
1907 # Deprecation warnings for the unsupported variables above.
1908 m4_define([ac_config_guess],
1909 [m4_warn([obsolete],
1910 [$ac_config_guess is obsolete and unsafe. Please stop using it.
1911 Contact autoconf@gnu.org if you really need it.])ac_@&t@config_guess])
1913 m4_define([ac_config_sub],
1914 [m4_warn([obsolete],
1915 [$ac_config_sub is obsolete and unsafe. Please stop using it.
1916 Contact autoconf@gnu.org if you really need it.])ac_@&t@config_sub])
1918 m4_define([ac_configure],
1919 [m4_warn([obsolete],
1920 [$ac_configure is obsolete and unsafe. Please stop using it.
1921 Contact autoconf@gnu.org if you really need it.])ac_@&t@config_sub])
1925 ## ------------------------ ##
1926 ## Finding aclocal macros. ##
1927 ## ------------------------ ##
1930 # AC_CONFIG_MACRO_DIR_TRACE(DIR)
1931 # ------------------------------
1932 # This macro exists solely for tracing - never invoke it directly.
1933 # It will be called once per directory listed in either form of
1934 # AC_CONFIG_MACRO_DIR[S].
1935 m4_define([AC_CONFIG_MACRO_DIR_TRACE],
1936 [m4_fatal([Do not invoke $0 directly])])
1938 # _AC_CONFIG_MACRO_DIRS_USED
1939 # --------------------------
1940 # Internal witness macro, redefined to empty after first directory is traced.
1941 m4_define([_AC_CONFIG_MACRO_DIRS_USED], [-])
1943 # _AC_CONFIG_MACRO_DIRS(CALLER, DIR)
1944 # ----------------------------------
1945 # Internal workhorse macro to ensure a sane calling pattern of CALLER, and
1946 # eventually trace DIR through the documented public trace point.
1947 m4_define([_AC_CONFIG_MACRO_DIRS],
1948 [m4_if([$1], [-AC_CONFIG_MACRO_DIRS], [AC_CONFIG_MACRO_DIR([$2])],
1949 [$1], [AC_CONFIG_MACRO_DIR], [m4_fatal([$1 can only be used once])],
1950 [m4_define([$0_USED])m4_pushdef([AC_CONFIG_MACRO_DIR_TRACE])]]dnl
1951 [[AC_CONFIG_MACRO_DIR_TRACE([$2])m4_popdef([AC_CONFIG_MACRO_DIR_TRACE])])])
1953 # AC_CONFIG_MACRO_DIRS(DIR-1 [DIR-2 ... DIR-n])
1954 # --------------------------------------------
1955 # Declare directories containing additional macros for aclocal.
1956 # This macro can be called multiple times, and with multiple arguments.
1957 # Do not trace this macro; instead trace AC_CONFIG_MACRO_DIR_TRACE.
1958 # If no directory has been traced yet, then this macro also triggers
1959 # a trace of AC_CONFIG_MACRO_DIR on the first directory.
1960 AC_DEFUN([AC_CONFIG_MACRO_DIRS],
1961 [m4_map_args_w(m4_validate_w([$1]),
1962 [_$0(_$0_USED()[$0], ], [)])])
1964 # AC_CONFIG_MACRO_DIR(DIR)
1965 # ------------------------
1966 # Declare directory containing additional macros for aclocal.
1967 # This macro exists for backward compatibility; while tools can trace this,
1968 # we recommend tracing AC_CONFIG_MACRO_DIR_TRACE instead. This macro can
1969 # only be used once, and must not be used after AC_CONFIG_MACRO_DIRS.
1970 AC_DEFUN([AC_CONFIG_MACRO_DIR],
1971 [_$0S(_$0S_USED()[$0], [$1])])
1974 ## ----------------------------------- ##
1975 ## Getting the canonical system type. ##
1976 ## ----------------------------------- ##
1979 # configure --host=HOST --target=TARGET --build=BUILD
1982 # 1. Build defaults to the current platform, as determined by config.guess.
1983 # 2. Host defaults to build.
1984 # 3. Target defaults to host.
1987 # _AC_CANONICAL_SPLIT(THING)
1988 # --------------------------
1989 # Generate the variables THING, THING_{alias cpu vendor os}.
1990 m4_define([_AC_CANONICAL_SPLIT],
1993 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1995 AC_SUBST([$1], [$ac_cv_$1])dnl
1996 ac_save_IFS=$IFS; IFS='-'
1999 AC_SUBST([$1_cpu], [$[1]])dnl
2000 AC_SUBST([$1_vendor], [$[2]])dnl
2002 [# Remember, the first character of IFS is used to create $]*,
2003 # except with old shells:
2006 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
2007 AC_SUBST([$1_os])dnl
2008 ])# _AC_CANONICAL_SPLIT
2011 # AC_CANONICAL_BUILD
2012 # ------------------
2013 AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
2014 [AC_REQUIRE_AUX_FILE([config.sub])dnl
2015 AC_REQUIRE_AUX_FILE([config.guess])dnl
2016 m4_divert_once([HELP_CANON],
2019 --build=BUILD configure for building on BUILD [guessed]]])dnl
2020 # Make sure we can run config.sub.
2021 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
2022 AC_MSG_ERROR([cannot run $SHELL ${ac_aux_dir}config.sub])
2024 AC_CACHE_CHECK([build system type], [ac_cv_build],
2025 [ac_build_alias=$build_alias
2026 test "x$ac_build_alias" = x &&
2027 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
2028 test "x$ac_build_alias" = x &&
2029 AC_MSG_ERROR([cannot guess build type; you must specify one])
2030 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
2031 AC_MSG_ERROR([$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed])
2033 _AC_CANONICAL_SPLIT(build)
2034 ])# AC_CANONICAL_BUILD
2039 AC_DEFUN_ONCE([AC_CANONICAL_HOST],
2040 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2041 m4_divert_once([HELP_CANON],
2042 [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl
2043 AC_CACHE_CHECK([host system type], [ac_cv_host],
2044 [if test "x$host_alias" = x; then
2045 ac_cv_host=$ac_cv_build
2047 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
2048 AC_MSG_ERROR([$SHELL ${ac_aux_dir}config.sub $host_alias failed])
2051 _AC_CANONICAL_SPLIT([host])
2052 ])# AC_CANONICAL_HOST
2055 # AC_CANONICAL_TARGET
2056 # -------------------
2057 AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
2058 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2059 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
2060 m4_divert_once([HELP_CANON],
2061 [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
2062 AC_CACHE_CHECK([target system type], [ac_cv_target],
2063 [if test "x$target_alias" = x; then
2064 ac_cv_target=$ac_cv_host
2066 ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` ||
2067 AC_MSG_ERROR([$SHELL ${ac_aux_dir}config.sub $target_alias failed])
2070 _AC_CANONICAL_SPLIT([target])
2072 # The aliases save the names the user supplied, while $host etc.
2073 # will get canonicalized.
2074 test -n "$target_alias" &&
2075 test "$program_prefix$program_suffix$program_transform_name" = \
2077 program_prefix=${target_alias}-[]dnl
2078 ])# AC_CANONICAL_TARGET
2081 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
2084 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
2085 # ------------------------------------------
2086 # If the cache file is inconsistent with the current host,
2087 # target and build system types, execute CMD or print a default
2088 # error message. Now handled via _AC_ARG_VAR_PRECIOUS.
2089 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
2092 ## ---------------------- ##
2093 ## Caching test results. ##
2094 ## ---------------------- ##
2099 # Look for site- or system-specific initialization scripts.
2100 m4_define([AC_SITE_LOAD],
2101 [# Prefer an explicitly selected file to automatically selected ones.
2102 if test -n "$CONFIG_SITE"; then
2103 ac_site_files="$CONFIG_SITE"
2104 elif test "x$prefix" != xNONE; then
2105 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2107 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2110 for ac_site_file in $ac_site_files
2112 AS_CASE([$ac_site_file],
2114 [ac_site_file=./$ac_site_file])
2115 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2116 AC_MSG_NOTICE([loading site script $ac_site_file])
2117 sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
2119 || AC_MSG_FAILURE([failed to load site script $ac_site_file])
2127 m4_define([AC_CACHE_LOAD],
2128 [if test -r "$cache_file"; then
2129 # Some versions of bash will fail to source /dev/null (special files
2130 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2131 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2132 AC_MSG_NOTICE([loading cache $cache_file])
2134 [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
2135 *) . "./$cache_file";;
2139 AC_MSG_NOTICE([creating cache $cache_file])
2147 # Dump the cache to stdout. It can be in a pipe (this is a requirement).
2148 m4_define([_AC_CACHE_DUMP],
2149 [# The following way of writing the cache mishandles newlines in values,
2150 # but we know of no workaround that is simple, portable, and efficient.
2151 # So, we kill variables containing newlines.
2152 # Ultrix sh set writes to stderr and can't be redirected directly,
2153 # and sets the high bit in the cache file unless we assign to the vars.
2155 for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
2156 eval ac_val=\$$ac_var
2160 *_cv_*) AC_MSG_WARN([cache variable $ac_var contains a newline]) ;;
2163 _ | IFS | as_nl) ;; #(
2164 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2165 *) AS_UNSET([$ac_var]) ;;
2171 case $as_nl`(ac_space=' '; set) 2>&1` in #(
2172 *${as_nl}ac_space=\ *)
2173 # 'set' does not quote correctly, so add quotes: double-quote
2174 # substitution turns \\\\ into \\, and sed turns \\ into \.
2177 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
2180 # 'set' quotes correctly as required by POSIX, so do not add quotes.
2181 sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
2192 # Allow a site initialization script to override cache values.
2193 m4_define([AC_CACHE_SAVE],
2194 [cat >confcache <<\_ACEOF
2195 # This file is a shell script that caches the results of configure
2196 # tests run on this system so they can be shared between configure
2197 # scripts and configure runs, see configure's option --config-cache.
2198 # It is not useful on other systems. If it contains results you don't
2199 # want to keep, you may remove or edit it.
2201 # config.status only pays attention to the cache file if you give it
2202 # the --recheck option to rerun configure.
2204 # 'ac_cv_env_foo' variables (set or unset) will be overridden when
2205 # loading this file, other *unset* 'ac_cv_foo' will be assigned the
2215 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
2217 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
2219 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
2220 if test -w "$cache_file"; then
2221 if test "x$cache_file" != "x/dev/null"; then
2222 AC_MSG_NOTICE([updating cache $cache_file])
2223 if test ! -f "$cache_file" || test -h "$cache_file"; then
2224 cat confcache >"$cache_file"
2226 dnl Try to update the cache file atomically even on different mount points;
2227 dnl at the same time, avoid filename limitation issues in the common case.
2228 case $cache_file in #(
2230 mv -f confcache "$cache_file"$$ &&
2231 mv -f "$cache_file"$$ "$cache_file" ;; #(
2233 mv -f confcache "$cache_file" ;;
2238 AC_MSG_NOTICE([not updating unwritable cache $cache_file])
2241 rm -f confcache[]dnl
2245 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
2246 # ------------------------------------------
2247 # The name of shell var CACHE-ID must contain '_cv_' in order to get saved.
2248 # Should be dnl'ed. Try to catch common mistakes.
2249 m4_defun([AC_CACHE_VAL],
2250 [AS_LITERAL_WORD_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
2252 [$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl
2253 m4_if(m4_index([$2], [AC_DEFINE]), [-1], [],
2255 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
2256 [where no actions should be taken])])dnl
2257 m4_if(m4_index([$2], [AC_SUBST]), [-1], [],
2259 [$0($1, ...): suspicious presence of an AC_SUBST in the second argument, ]dnl
2260 [where no actions should be taken])])dnl
2262 [_AS_ECHO_N([(cached) ])],
2267 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
2268 # -------------------------------------------
2269 # Do not call this macro with a dnl right behind.
2270 m4_defun([AC_CACHE_CHECK],
2271 [AC_MSG_CHECKING([$1])
2272 AC_CACHE_VAL([$2], [$3])dnl
2273 AS_LITERAL_WORD_IF([$2],
2274 [AC_MSG_RESULT([$$2])],
2275 [AS_VAR_COPY([ac_res], [$2])
2276 AC_MSG_RESULT([$ac_res])])dnl
2279 # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
2280 # [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
2281 # --------------------------------------------------------------
2282 AC_DEFUN([_AC_CACHE_CHECK_INT],
2283 [AC_CACHE_CHECK([$1], [$2],
2284 [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
2285 ])# _AC_CACHE_CHECK_INT
2289 ## ---------------------- ##
2290 ## Defining CPP symbols. ##
2291 ## ---------------------- ##
2294 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
2295 # -------------------------------------------
2296 # Used by --trace to collect the list of AC_DEFINEd macros.
2297 m4_define([AC_DEFINE_TRACE_LITERAL],
2298 [m4_pattern_allow([^$1$])dnl
2299 AS_IDENTIFIER_IF([$1], [],
2300 [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
2301 ])# AC_DEFINE_TRACE_LITERAL
2304 # AC_DEFINE_TRACE(CPP-SYMBOL)
2305 # ---------------------------
2306 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
2307 # out non literal symbols. CPP-SYMBOL must not include any parameters.
2308 m4_define([AC_DEFINE_TRACE],
2309 [AS_LITERAL_WORD_IF([$1], [AC_DEFINE_TRACE_LITERAL(_m4_expand([$1]))])])
2312 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2313 # -------------------------------------------
2314 # Set VARIABLE to VALUE, verbatim, or 1. Remember the value
2315 # and if VARIABLE is affected the same VALUE, do nothing, else
2316 # die. The third argument is used by autoheader.
2317 m4_define([AC_DEFINE], [_AC_DEFINE_Q([_$0], $@)])
2319 # _AC_DEFINE(STRING)
2320 # ------------------
2321 # Append the pre-expanded STRING and a newline to confdefs.h, as if by
2322 # a quoted here-doc.
2323 m4_define([_AC_DEFINE],
2324 [AS_ECHO(["AS_ESCAPE([[$1]])"]) >>confdefs.h])
2327 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2328 # ----------------------------------------------------
2329 # Similar, but perform shell substitutions $ ` \ once on VALUE, as
2330 # in an unquoted here-doc.
2331 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([_$0], $@)])
2333 # _AC_DEFINE_UNQUOTED(STRING)
2334 # ---------------------------
2335 # Append the pre-expanded STRING and a newline to confdefs.h, as if
2336 # with an unquoted here-doc, but avoiding a fork in the common case of
2337 # no backslash, no command substitution, no complex variable
2338 # substitution (taking into account quadrigraphs as well). Also
2339 # avoid AS_ECHO if "#" is present to avoid confusing m4 with comments,
2340 # but quadrigraphs are fine in that case.
2341 m4_define([_AC_DEFINE_UNQUOTED],
2342 [m4_if(m4_bregexp([$1], [#\|\\\|`\|\(\$\|@S|@\)\((|{|@{:@\)]), [-1],
2343 [AS_ECHO(["AS_ESCAPE([$1], [""])"]) >>confdefs.h],
2344 [cat >>confdefs.h <<_ACEOF
2349 # _AC_DEFINE_Q(MACRO, VARIABLE, [VALUE], [DESCRIPTION])
2350 # -----------------------------------------------------
2351 # Internal function that performs common elements of AC_DEFINE{,_UNQUOTED}.
2352 # MACRO must take one argument, which is the fully expanded string to
2353 # append to confdefs.h as if by a possibly-quoted here-doc.
2355 # m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so we use
2356 # m4_format rather than regex to grab prefix up to first (). AC_name
2357 # is defined with over-quotation, so that we can avoid m4_defn; this
2358 # is only safe because the name should not contain $.
2360 # Guarantee a match in m4_index, so as to avoid a bug with precision
2361 # -1 in m4_format in older m4.
2362 m4_define([_AC_DEFINE_Q],
2363 [m4_pushdef([AC_name], m4_format([[[%.*s]]], m4_index([$2(], [(]), [$2]))]dnl
2364 [AC_DEFINE_TRACE(AC_name)]dnl
2365 [m4_cond([m4_index([$3], [
2367 [m4_bregexp([[$3]], [[^\\]
2369 [m4_warn([syntax], [AC_DEFINE]m4_if([$1], [_AC_DEFINE], [],
2370 [[_UNQUOTED]])[: '$3' is not a valid preprocessor define value])])]dnl
2371 [m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4])
2372 ])_m4_popdef([AC_name])]dnl
2373 [$1(m4_expand([[@%:@define] $2 ]m4_if([$#], 2, 1,
2374 [$3], [], [/**/], [[$3]])))
2379 ## -------------------------- ##
2380 ## Setting output variables. ##
2381 ## -------------------------- ##
2384 # AC_SUBST_TRACE(VARIABLE)
2385 # ------------------------
2386 # This macro is used with --trace to collect the list of substituted variables.
2387 m4_define([AC_SUBST_TRACE])
2390 # AC_SUBST(VARIABLE, [VALUE])
2391 # ---------------------------
2392 # Create an output variable from a shell VARIABLE. If VALUE is given
2393 # assign it to VARIABLE. Use '""' if you want to set VARIABLE to an
2394 # empty value, not an empty second argument.
2396 m4_define([AC_SUBST],
2397 [AS_IDENTIFIER_IF([$1], [],
2398 [m4_fatal([$0: '$1' is not a valid shell variable name])])]dnl
2399 [AC_SUBST_TRACE([$1])]dnl
2400 [m4_pattern_allow([^$1$])]dnl
2401 [m4_ifvaln([$2], [[$1]=$2])[]]dnl
2402 [m4_set_add([_AC_SUBST_VARS], [$1])])# AC_SUBST
2405 # AC_SUBST_FILE(VARIABLE)
2406 # -----------------------
2407 # Read the comments of the preceding macro.
2408 m4_define([AC_SUBST_FILE],
2409 [m4_pattern_allow([^$1$])dnl
2410 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2415 ## --------------------------------------- ##
2416 ## Printing messages at autoconf runtime. ##
2417 ## --------------------------------------- ##
2419 # AU::AC_DIAGNOSE(CATEGORY, MESSAGE)
2420 # AU::AC_FATAL(MESSAGE, [EXIT-STATUS])
2421 # AU::AC_WARNING(MESSAGE)
2422 # AU::AC_OBSOLETE(THIS-MACRO, [SUGGESTION])
2423 # --------------------------------
2424 # The double definitions are necessary because autoupdate expands m4_
2425 # macros, so we have to double-quote the replacements, but then they
2426 # won't work in a normal autoconf run.
2428 # 2020-10-06 / autoconf 2.70: Widely used third-party macros
2429 # (among others, from automake, libtool, and gettext) use AC_DIAGNOSE,
2430 # so we temporarily don't issue an obsoletion warning for it.
2431 # Revisit after third parties have had a chance to update their macros
2432 # and make releases.
2433 AU_DEFUN([AC_DIAGNOSE], [[m4_warn($@)]], [], [silent])
2434 AC_DEFUN([AC_DIAGNOSE], [m4_warn($@)])
2436 AU_DEFUN([AC_FATAL], [[m4_fatal($@)]])
2437 AC_DEFUN([AC_FATAL], [m4_fatal($@)dnl
2438 m4_warn([obsolete], [The macro '$0' is obsolete.
2439 You should run autoupdate.])])
2441 AU_DEFUN([AC_WARNING], [[m4_warn([syntax], [$1])]])
2442 AC_DEFUN([AC_WARNING], [m4_warn([syntax], [$1])dnl
2443 m4_warn([obsolete], [The macro '$0' is obsolete.
2444 You should run autoupdate.])])
2446 AU_DEFUN([AC_OBSOLETE], [[m4_warn([obsolete], [$1 is obsolete$2])]],
2447 [if possible, define this macro using AU_DEFUN.])
2448 AC_DEFUN([AC_OBSOLETE], [m4_warn([obsolete], [$1 is obsolete$2])dnl
2449 m4_warn([obsolete], [The macro '$0' is obsolete.
2450 You should run autoupdate.])])
2454 ## ---------------------------------------- ##
2455 ## Printing messages at configure runtime. ##
2456 ## ---------------------------------------- ##
2459 # AC_MSG_CHECKING(FEATURE)
2460 # ------------------------
2461 m4_define([AC_MSG_CHECKING],
2462 [{ _AS_ECHO_LOG([checking $1])
2463 _AS_ECHO_N([checking $1... ]); }dnl
2467 # AC_MSG_RESULT(RESULT)
2468 # ---------------------
2469 m4_define([AC_MSG_RESULT],
2470 [{ _AS_ECHO_LOG([result: $1])
2471 _AS_ECHO([$1]); }dnl
2475 # AC_MSG_WARN(PROBLEM)
2476 # AC_MSG_NOTICE(STRING)
2477 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2478 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2479 # ----------------------------------------
2480 m4_copy([AS_WARN], [AC_MSG_WARN])
2481 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2482 m4_copy([AS_ERROR], [AC_MSG_ERROR])
2483 m4_define([AC_MSG_FAILURE],
2484 [{ AS_MESSAGE([error: in '$ac_pwd':], 2)
2486 See 'config.log' for more details], [$2]); }])
2489 # _AC_MSG_LOG_CONFTEST
2490 # --------------------
2491 m4_define([_AC_MSG_LOG_CONFTEST],
2492 [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
2493 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2497 # AU::AC_CHECKING(FEATURE)
2498 # ------------------------
2499 AU_DEFUN([AC_CHECKING],
2500 [AS_MESSAGE([checking $1...])])
2503 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2504 # ----------------------------------
2505 # No escaping, so it performed also backtick substitution.
2506 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2507 [_AS_ECHO_UNQUOTED([$as_me:${as_lineno-$LINENO}: result: $1], AS_MESSAGE_LOG_FD)
2508 _AS_ECHO_UNQUOTED([$1])[]dnl
2512 # AU::AC_VERBOSE(STRING)
2513 # ----------------------
2514 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2521 ## ---------------------------- ##
2522 ## Compiler-running mechanics. ##
2523 ## ---------------------------- ##
2526 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2527 # ----------------------------------
2528 # Eval COMMAND, save the exit status in ac_status, and log it. The return
2529 # code is 0 if COMMAND succeeded, so that it can be used directly in AS_IF
2531 AC_DEFUN([_AC_RUN_LOG],
2532 [{ { $2; } >&AS_MESSAGE_LOG_FD
2533 ($1) 2>&AS_MESSAGE_LOG_FD
2535 _AS_ECHO_LOG([\$? = $ac_status])
2536 test $ac_status = 0; }])
2539 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2540 # -----------------------------------------
2541 # Run COMMAND, save its stderr into conftest.err, save the exit status
2542 # in ac_status, and log it. Don't forget to clean up conftest.err after
2544 # Note that when tracing, most shells will leave the traces in stderr
2545 # starting with "+": that's what this macro tries to address.
2546 # The return code is 0 if COMMAND succeeded, so that it can be used directly
2547 # in AS_IF constructs.
2548 AC_DEFUN([_AC_RUN_LOG_STDERR],
2549 [{ { $2; } >&AS_MESSAGE_LOG_FD
2552 if test -s conftest.err; then
2553 grep -v '^ *+' conftest.err >conftest.er1
2554 cat conftest.er1 >&AS_MESSAGE_LOG_FD
2555 mv -f conftest.er1 conftest.err
2557 _AS_ECHO_LOG([\$? = $ac_status])
2558 test $ac_status = 0; }])
2561 # _AC_RUN_LOG_LIMIT(COMMAND, LOG-COMMANDS, [LINES])
2562 # -------------------------------------------------
2563 # Like _AC_RUN_LOG, but only log LINES lines from stderr,
2564 # defaulting to 10 lines.
2565 AC_DEFUN([_AC_RUN_LOG_LIMIT],
2566 [{ { $2; } >&AS_MESSAGE_LOG_FD
2569 if test -s conftest.err; then
2570 sed 'm4_default([$3], [10])a\
2571 ... rest of stderr output deleted ...
2572 m4_default([$3], [10])q' conftest.err >conftest.er1
2573 cat conftest.er1 >&AS_MESSAGE_LOG_FD
2575 rm -f conftest.er1 conftest.err
2576 _AS_ECHO_LOG([\$? = $ac_status])
2577 test $ac_status = 0; }])
2580 # _AC_DO_ECHO(COMMAND)
2581 # --------------------
2582 # Echo COMMAND. This is designed to be used just before evaluating COMMAND.
2583 AC_DEFUN([_AC_DO_ECHO],
2584 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2586 dnl If the string contains '\"', '`', or '\\', then just echo it rather
2587 dnl than expanding it. This is a hack, but it is safer, while also
2588 dnl typically expanding simple substrings like '$CC', which is what we want.
2590 dnl Much of this macro body is quoted, to work around misuses like
2591 dnl 'AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2592 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2593 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2594 dnl underquoting misuses, such as
2595 dnl 'AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2596 dnl We normally wouldn't bother with this kind of workaround for invalid code
2597 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2598 dnl minimize the integration hassle.
2599 [[case "(($ac_try" in
2600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2601 *) ac_try_echo=$ac_try;;
2603 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""]
2604 AS_ECHO(["$ac_try_echo"])])
2608 # Eval COMMAND, save the exit status in ac_status, and log it.
2609 # For internal use only.
2611 [_AC_RUN_LOG([eval "$1"],
2612 [_AC_DO_ECHO([$1])])])
2615 # _AC_DO_STDERR(COMMAND)
2616 # ----------------------
2617 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2618 AC_DEFUN([_AC_DO_STDERR],
2619 [_AC_RUN_LOG_STDERR([eval "$1"],
2620 [_AC_DO_ECHO([$1])])])
2623 # _AC_DO_VAR(VARIABLE)
2624 # --------------------
2625 # Evaluate "$VARIABLE", which should be a valid shell command.
2626 # The purpose of this macro is to write "configure:123: command line"
2627 # into config.log for every test run.
2628 AC_DEFUN([_AC_DO_VAR],
2632 # _AC_DO_TOKENS(COMMAND)
2633 # ----------------------
2634 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2635 # tokens of the shell command language.
2636 AC_DEFUN([_AC_DO_TOKENS],
2638 _AC_DO([$ac_try]); }])
2641 # _AC_DO_LIMIT(COMMAND, [LINES])
2642 # ------------------------------
2643 # Like _AC_DO, but limit the amount of stderr lines logged to LINES.
2644 # For internal use only.
2645 AC_DEFUN([_AC_DO_LIMIT],
2646 [_AC_RUN_LOG_LIMIT([eval "$1"],
2647 [_AC_DO_ECHO([$1])], [$2])])
2652 # Eval COMMAND, save the exit status in ac_status, and log it.
2653 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2654 # It is present only for backward compatibility with previous Autoconf versions.
2655 AC_DEFUN([_AC_EVAL],
2656 [_AC_RUN_LOG([eval $1],
2657 [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])])
2660 # _AC_EVAL_STDERR(COMMAND)
2661 # ------------------------
2662 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2663 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2664 # It is present only for backward compatibility with previous Autoconf versions.
2665 AC_DEFUN([_AC_EVAL_STDERR],
2666 [_AC_RUN_LOG_STDERR([eval $1],
2667 [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])])
2670 # AC_TRY_EVAL(VARIABLE)
2671 # ---------------------
2672 # Evaluate $VARIABLE, which should be a valid shell command.
2673 # The purpose of this macro is to write "configure:123: command line"
2674 # into config.log for every test run.
2676 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2677 # undocumented, and should not be used.
2678 # They may be removed or their API changed in a future release.
2679 # Autoconf itself no longer uses these two macros; they are present
2680 # only for backward compatibility with previous versions of Autoconf.
2681 # Not every shell command will work due to problems with eval
2682 # and quoting, and the rules for exactly what does work are tricky.
2683 # Worse, due to double-expansion during evaluation, arbitrary unintended
2684 # shell commands could be executed in some situations.
2685 AC_DEFUN([AC_TRY_EVAL],
2689 # AC_TRY_COMMAND(COMMAND)
2690 # -----------------------
2691 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2692 # tokens of the shell command language.
2693 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2694 AC_DEFUN([AC_TRY_COMMAND],
2696 _AC_EVAL([$ac_try]); }])
2699 # AC_RUN_LOG(COMMAND)
2700 # -------------------
2701 AC_DEFUN([AC_RUN_LOG],
2703 [AS_ECHO(["$as_me:${as_lineno-$LINENO}: AS_ESCAPE([$1])"])])])
2708 ## ------------------------ ##
2709 ## Examining declarations. ##
2710 ## ------------------------ ##
2713 # _AC_PREPROC_IFELSE_BODY
2714 # -----------------------
2715 # Shell function body for _AC_PREPROC_IFELSE.
2716 m4_define([_AC_PREPROC_IFELSE_BODY],
2717 [ AS_LINENO_PUSH([$[]1])
2718 AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) > conftest.i && {
2719 test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2720 test ! -s conftest.err
2723 [_AC_MSG_LOG_CONFTEST
2726 AS_SET_STATUS([$ac_retval])
2727 ])# _AC_PREPROC_IFELSE_BODY
2730 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2731 # ----------------------------------------------------------------
2732 # Try to preprocess PROGRAM.
2734 # This macro can be used during the selection of a preprocessor.
2735 # eval is necessary to expand ac_cpp.
2736 AC_DEFUN([_AC_PREPROC_IFELSE],
2737 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_cpp],
2738 [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_cpp], [LINENO],
2739 [Try to preprocess conftest.$ac_ext, and return whether this succeeded.])],
2741 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2742 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3])
2743 rm -f conftest.err conftest.i[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2744 ])# _AC_PREPROC_IFELSE
2746 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2747 # ---------------------------------------------------------------
2748 # Try to preprocess PROGRAM. Requires that the preprocessor for the
2749 # current language was checked for, hence do not use this macro in macros
2750 # looking for a preprocessor.
2751 AC_DEFUN([AC_PREPROC_IFELSE],
2752 [AC_LANG_PREPROC_REQUIRE()dnl
2753 _AC_PREPROC_IFELSE($@)])
2756 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2757 # ---------------------------------------------------------
2758 # AC_TRY_CPP is used to check whether particular header files exist.
2759 # (But it actually tests whether INCLUDES produces no CPP errors.)
2761 # INCLUDES are not defaulted and are double quoted.
2762 AU_DEFUN([AC_TRY_CPP],
2763 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2766 # AC_EGREP_CPP(PATTERN, PROGRAM,
2767 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2768 # ------------------------------------------------------
2769 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2770 # come early, it is not included in AC_BEFORE checks.
2771 AC_DEFUN([AC_EGREP_CPP],
2772 [AC_LANG_PREPROC_REQUIRE()dnl
2773 AC_REQUIRE([_AC_PROG_EGREP_TRADITIONAL])dnl
2774 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2775 AS_IF([dnl eval is necessary to expand ac_cpp.
2776 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2777 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2778 dnl Quote $1 to prevent m4 from eating character classes
2779 $EGREP_TRADITIONAL "m4_bregexp([$1],[^[$-]],[.?])[$1]" >/dev/null 2>&1],
2786 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2787 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2788 # ---------------------------------------------------------
2789 AC_DEFUN([AC_EGREP_HEADER],
2797 ## ------------------ ##
2798 ## Examining syntax. ##
2799 ## ------------------ ##
2801 # _AC_COMPILE_IFELSE_BODY
2802 # -----------------------
2803 # Shell function body for _AC_COMPILE_IFELSE.
2804 m4_define([_AC_COMPILE_IFELSE_BODY],
2805 [ AS_LINENO_PUSH([$[]1])
2806 rm -f conftest.$ac_objext conftest.beam
2807 AS_IF([_AC_DO_STDERR($ac_compile) && {
2808 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2809 test ! -s conftest.err
2810 } && test -s conftest.$ac_objext],
2812 [_AC_MSG_LOG_CONFTEST
2815 AS_SET_STATUS([$ac_retval])
2816 ])# _AC_COMPILE_IFELSE_BODY
2819 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2820 # ----------------------------------------------------------------
2821 # Try to compile PROGRAM.
2822 # This macro can be used during the selection of a compiler.
2823 AC_DEFUN([_AC_COMPILE_IFELSE],
2824 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_compile],
2825 [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_compile], [LINENO],
2826 [Try to compile conftest.$ac_ext, and return whether this succeeded.])],
2828 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2829 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3])
2830 rm -f core conftest.err conftest.$ac_objext conftest.beam[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2831 ])# _AC_COMPILE_IFELSE
2834 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2835 # ---------------------------------------------------------------
2836 # Try to compile PROGRAM. Requires that the compiler for the current
2837 # language was checked for, hence do not use this macro in macros looking
2839 AC_DEFUN([AC_COMPILE_IFELSE],
2840 [AC_LANG_COMPILER_REQUIRE()dnl
2841 _AC_COMPILE_IFELSE($@)])
2844 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2845 # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2846 # ---------------------------------------------------
2847 AU_DEFUN([AC_TRY_COMPILE],
2848 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2852 ## --------------------- ##
2853 ## Examining libraries. ##
2854 ## --------------------- ##
2857 # _AC_LINK_IFELSE_BODY
2858 # --------------------
2859 # Shell function body for _AC_LINK_IFELSE.
2860 m4_define([_AC_LINK_IFELSE_BODY],
2861 [ AS_LINENO_PUSH([$[]1])
2862 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
2863 AS_IF([_AC_DO_STDERR($ac_link) && {
2864 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2865 test ! -s conftest.err
2866 } && test -s conftest$ac_exeext && {
2867 test "$cross_compiling" = yes ||
2868 AS_TEST_X([conftest$ac_exeext])
2871 [_AC_MSG_LOG_CONFTEST
2873 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2874 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2875 # interfere with the next link command; also delete a directory that is
2876 # left behind by Apple's compiler. We do this before executing the actions.
2877 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2879 AS_SET_STATUS([$ac_retval])
2880 ])# _AC_LINK_IFELSE_BODY
2883 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2884 # -------------------------------------------------------------
2885 # Try to link PROGRAM.
2886 # This macro can be used during the selection of a compiler.
2888 # Test that resulting file is executable; see the problem reported by mwoehlke
2889 # in <https://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
2890 # But skip the test when cross-compiling, to prevent problems like the one
2891 # reported by Chris Johns in
2892 # <https://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
2894 AC_DEFUN([_AC_LINK_IFELSE],
2895 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_link],
2896 [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_link], [LINENO],
2897 [Try to link conftest.$ac_ext, and return whether this succeeded.])],
2899 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2900 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_link "$LINENO"], [$2], [$3])
2901 rm -f core conftest.err conftest.$ac_objext conftest.beam \
2902 conftest$ac_exeext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2906 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2907 # ------------------------------------------------------------
2908 # Try to link PROGRAM. Requires that the compiler for the current
2909 # language was checked for, hence do not use this macro in macros looking
2911 AC_DEFUN([AC_LINK_IFELSE],
2912 [AC_LANG_COMPILER_REQUIRE()dnl
2913 _AC_LINK_IFELSE($@)])
2916 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2917 # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2918 # ------------------------------------------------
2919 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2920 AU_DEFUN([AC_TRY_LINK],
2921 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2924 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2925 # ACTION-IF-TRUE, [ACTION-IF-FALSE])
2926 # ---------------------------------------------------
2927 AU_DEFUN([AC_COMPILE_CHECK],
2928 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2929 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2934 ## ------------------------------- ##
2935 ## Checking for runtime features. ##
2936 ## ------------------------------- ##
2939 # _AC_RUN_IFELSE_BODY
2940 # -------------------
2941 # Shell function body for _AC_RUN_IFELSE.
2942 m4_define([_AC_RUN_IFELSE_BODY],
2943 [ AS_LINENO_PUSH([$[]1])
2944 AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2946 [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
2947 _AC_MSG_LOG_CONFTEST
2948 ac_retval=$ac_status])
2949 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2951 AS_SET_STATUS([$ac_retval])
2952 ])# _AC_RUN_IFELSE_BODY
2955 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2956 # ------------------------------------------------------------
2957 # Compile, link, and run.
2958 # This macro can be used during the selection of a compiler.
2959 # We also remove conftest.o as if the compilation fails, some compilers
2960 # don't remove it. We remove gmon.out and bb.out, which may be
2961 # created during the run if the program is built with profiling support.
2962 AC_DEFUN([_AC_RUN_IFELSE],
2963 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_run],
2964 [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_run], [LINENO],
2965 [Try to run conftest.$ac_ext, and return whether this succeeded.
2966 Assumes that executables *can* be run.])],
2968 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2969 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_run "$LINENO"], [$2], [$3])
2970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2971 conftest.$ac_objext conftest.beam[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2974 # AC_RUN_IFELSE(PROGRAM,
2975 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2976 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2977 # ----------------------------------------------------------
2978 # Compile, link, and run. Requires that the compiler for the current
2979 # language was checked for, hence do not use this macro in macros looking
2981 AC_DEFUN([AC_RUN_IFELSE],
2982 [AC_LANG_COMPILER_REQUIRE()dnl
2985 [$0 called without default to allow cross compiling])])dnl
2986 AS_IF([test "$cross_compiling" = yes],
2988 [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2989 [_AC_RUN_IFELSE($@)])
2993 # AC_TRY_RUN(PROGRAM,
2994 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2995 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2996 # -------------------------------------------------------
2997 AU_DEFUN([AC_TRY_RUN],
2998 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
3002 ## ------------------------------------- ##
3003 ## Checking for the existence of files. ##
3004 ## ------------------------------------- ##
3006 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3007 # -------------------------------------------------------------
3009 # Check for the existence of FILE.
3010 AC_DEFUN([AC_CHECK_FILE],
3012 [cannot check for file existence when cross compiling])dnl
3013 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
3014 AC_CACHE_CHECK([for $1], [ac_File],
3015 [test "$cross_compiling" = yes &&
3016 AC_MSG_ERROR([cannot check for file existence when cross compiling])
3017 if test -r "$1"; then
3018 AS_VAR_SET([ac_File], [yes])
3020 AS_VAR_SET([ac_File], [no])
3022 AS_VAR_IF([ac_File], [yes], [$2], [$3])
3023 AS_VAR_POPDEF([ac_File])dnl
3027 # _AC_CHECK_FILES(FILE)
3028 # ---------------------
3029 # Helper to AC_CHECK_FILES, which generates two of the three arguments
3030 # to AC_CHECK_FILE based on FILE.
3031 m4_define([_AC_CHECK_FILES],
3032 [[$1], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
3033 [Define to 1 if you have the file '$1'.])]])
3036 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3037 # -----------------------------------------------------------------
3038 # For each word in the whitespace-separated FILE list, perform either
3039 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND. For files that exist, also
3040 # provide the preprocessor variable HAVE_FILE.
3041 AC_DEFUN([AC_CHECK_FILES],
3042 [m4_map_args_w(m4_validate_w([$1]),
3043 [AC_CHECK_FILE(_$0(], [)[$2], [$3])])])
3046 ## ------------------------------- ##
3047 ## Checking for declared symbols. ##
3048 ## ------------------------------- ##
3050 # _AC_UNDECLARED_BUILTIN
3051 # ----------------------
3052 # Set ac_[]_AC_LANG_ABBREV[]_undeclared_builtin_options to any options
3053 # needed to make the compiler issue a hard error, not a warning, when
3054 # an undeclared function is used whose declaration happens to be
3055 # built into the compiler (e.g. 'strchr' is often known in advance to
3056 # the C compiler). These options should not cause any other unrelated
3057 # warnings to become errors. If no such options can be found, or if
3058 # they make the compiler error out on a correct program of the form
3059 # used by AC_CHECK_DECL, report failure.
3060 AC_DEFUN([_AC_UNDECLARED_BUILTIN],
3062 [for $[]_AC_CC options needed to detect all undeclared functions],
3063 [ac_cv_[]_AC_LANG_ABBREV[]_undeclared_builtin_options],
3064 [ac_save_CFLAGS=$CFLAGS
3065 ac_cv_[]_AC_LANG_ABBREV[]_undeclared_builtin_options='cannot detect'
3066 for ac_arg in '' -fno-builtin; do
3067 CFLAGS="$ac_save_CFLAGS $ac_arg"
3068 # This test program should *not* compile successfully.
3069 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [(void) strchr;])],
3071 [# This test program should compile successfully.
3072 # No library function is consistently available on
3073 # freestanding implementations, so test against a dummy
3074 # declaration. Include always-available headers on the
3075 # off chance that they somehow elicit warnings.
3076 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
3077 [[#include <float.h>
3081 extern void ac_decl (int, char *);
3083 [[(void) ac_decl (0, (char *) 0);
3086 [AS_IF([test x"$ac_arg" = x],
3087 [ac_cv_[]_AC_LANG_ABBREV[]_undeclared_builtin_options='none needed'],
3088 [ac_cv_[]_AC_LANG_ABBREV[]_undeclared_builtin_options=$ac_arg])
3092 CFLAGS=$ac_save_CFLAGS
3094 AS_CASE([$ac_cv_[]_AC_LANG_ABBREV[]_undeclared_builtin_options],
3096 [AC_MSG_FAILURE([cannot make $[]_AC_CC report undeclared builtins])],
3098 [ac_[]_AC_LANG_ABBREV[]_undeclared_builtin_options=''],
3099 [ac_[]_AC_LANG_ABBREV[]_undeclared_builtin_options=$ac_cv_[]_AC_LANG_ABBREV[]_undeclared_builtin_options])
3102 # _AC_CHECK_DECL_BODY
3103 # -------------------
3104 # Shell function body for AC_CHECK_DECL.
3105 # If we are compiling C, just refer to the name of the function, so we
3106 # don't implicitly declare it. However, if we are compiling C++,
3107 # '(void) function_name;' won't work when function_name has more than one
3108 # overload, we need to fabricate a function call. Fortunately, there is
3109 # no such thing as an implicit function declaration in C++.
3110 # If the function is defined as a macro, we cannot verify its signature
3111 # without calling it, and it might not expand to a construct that's valid
3112 # as the only statement in a function body; just report it as available.
3113 m4_define([_AC_CHECK_DECL_BODY],
3114 [ AS_LINENO_PUSH([$[]1])
3115 as_decl_name=`echo $[]2|sed 's/ *(.*//'`
3116 AC_CACHE_CHECK([whether $][as_decl_name is declared], [$[]3],
3117 [as_decl_use=`echo $[]2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3118 AS_VAR_COPY([ac_save_FLAGS], [$[]6])
3119 AS_VAR_APPEND([$[]6], [" $[]5"])
3120 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$][4]],
3121 [[#ifndef $][as_decl_name
3123 (void) $][as_decl_use;
3125 (void) $][as_decl_name;
3129 [AS_VAR_SET([$[]3], [yes])],
3130 [AS_VAR_SET([$[]3], [no])])
3131 AS_VAR_COPY([$[]6], [ac_save_FLAGS])
3134 ])# _AC_CHECK_DECL_BODY
3136 # AC_CHECK_DECL(SYMBOL,
3137 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
3138 # [INCLUDES = DEFAULT-INCLUDES])
3139 # -------------------------------------------------------
3140 # Check whether SYMBOL (a function, variable, or constant) is declared.
3141 AC_DEFUN([AC_CHECK_DECL],
3142 [AC_REQUIRE_SHELL_FN([ac_fn_check_decl],
3143 [AS_FUNCTION_DESCRIBE([ac_fn_check_decl],
3144 [LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR],
3145 [Tests whether SYMBOL is declared in INCLUDES, setting cache variable
3146 VAR accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.])],
3148 dnl Initialize each $ac_[]_AC_LANG_ABBREV[]_undeclared_builtin_options once.
3149 [AC_DEFUN([_AC_UNDECLARED_BUILTIN_]_AC_LANG_ABBREV,
3150 [_AC_UNDECLARED_BUILTIN])]dnl
3151 [AC_REQUIRE([_AC_UNDECLARED_BUILTIN_]_AC_LANG_ABBREV)]dnl
3152 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])]dnl
3153 [ac_fn_check_decl ]dnl
3154 ["$LINENO" "$1" "ac_Symbol" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])" ]dnl
3155 ["$ac_[]_AC_LANG_ABBREV[]_undeclared_builtin_options" "_AC_LANG_PREFIX[]FLAGS"]
3156 [AS_VAR_IF([ac_Symbol], [yes], [$2], [$3])]dnl
3157 [AS_VAR_POPDEF([ac_Symbol])]dnl
3161 # _AC_CHECK_DECLS(SYMBOL, ACTION-IF_FOUND, ACTION-IF-NOT-FOUND,
3163 # -------------------------------------------------------------
3164 # Helper to AC_CHECK_DECLS, which generates the check for a single
3165 # SYMBOL with INCLUDES, performs the AC_DEFINE, then expands
3166 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.
3167 m4_define([_AC_CHECK_DECLS],
3168 [AC_CHECK_DECL([$1], [ac_have_decl=1], [ac_have_decl=0], [$4])]dnl
3169 [AC_DEFINE_UNQUOTED(AS_TR_CPP(m4_bpatsubst(HAVE_DECL_[$1],[ *(.*])),
3171 [Define to 1 if you have the declaration of '$1',
3172 and to 0 if you don't.])]dnl
3173 [m4_ifvaln([$2$3], [AS_IF([test $ac_have_decl = 1], [$2], [$3])])])
3175 # AC_CHECK_DECLS(SYMBOLS,
3176 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
3177 # [INCLUDES = DEFAULT-INCLUDES])
3178 # --------------------------------------------------------
3179 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
3180 # documentation for a detailed explanation of this difference with
3181 # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
3182 AC_DEFUN([AC_CHECK_DECLS],
3183 [m4_map_args_sep([_$0(], [, [$2], [$3], [$4])], [], $1)])
3186 # _AC_CHECK_DECL_ONCE(SYMBOL)
3187 # ---------------------------
3188 # Check for a single SYMBOL once.
3189 m4_define([_AC_CHECK_DECL_ONCE],
3190 [AC_DEFUN([_AC_Check_Decl_$1], [_AC_CHECK_DECLS([$1])])]dnl
3191 [AC_REQUIRE([_AC_Check_Decl_$1])])
3193 # AC_CHECK_DECLS_ONCE(SYMBOLS)
3194 # ----------------------------
3195 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
3196 AC_DEFUN([AC_CHECK_DECLS_ONCE],
3197 [m4_map_args_sep([_AC_CHECK_DECL_ONCE(], [)], [], $1)])
3201 ## ---------------------------------- ##
3202 ## Replacement of library functions. ##
3203 ## ---------------------------------- ##
3206 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
3207 # -----------------------------
3208 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
3209 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
3210 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
3213 # AC_LIBSOURCE(FILE-NAME)
3214 # -----------------------
3215 # Announce we might need the file 'FILE-NAME'.
3216 m4_define([AC_LIBSOURCE], [])
3219 # AC_LIBSOURCES([FILE-NAME1, ...])
3220 # --------------------------------
3221 # Announce we might need these files.
3222 AC_DEFUN([AC_LIBSOURCES],
3223 [m4_map_args([AC_LIBSOURCE], $1)])
3226 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
3227 # --------------------------------------------
3228 # We need 'FILE-NAME-NOEXT.o', save this into 'LIBOBJS'.
3229 m4_define([_AC_LIBOBJ],
3230 [case " $LIB@&t@OBJS " in
3231 *" $1.$ac_objext "* ) ;;
3232 *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
3237 # AC_LIBOBJ(FILE-NAME-NOEXT)
3238 # --------------------------
3239 # We need 'FILE-NAME-NOEXT.o', save this into 'LIBOBJS'.
3240 AC_DEFUN([AC_LIBOBJ],
3241 [_AC_LIBOBJ([$1])]dnl
3242 [AS_LITERAL_WORD_IF([$1], [AC_LIBSOURCE([$1.c])],
3243 [m4_warn([syntax], [$0($1): you should use literals])])])
3246 # _AC_LIBOBJS_NORMALIZE
3247 # ---------------------
3248 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
3249 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
3250 # Used with AC_CONFIG_COMMANDS_PRE.
3251 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
3254 m4_ifndef([AM_C_PROTOTYPES], [U=
3256 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
3257 # 1. Remove the extension, and $U if already installed.
3258 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
3259 ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
3260 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
3261 # will be set to the directory where LIBOBJS objects are built.
3262 AS_VAR_APPEND([ac_libobjs], [" \${LIBOBJDIR}$ac_i\$U.$ac_objext"])
3263 AS_VAR_APPEND([ac_ltlibobjs], [" \${LIBOBJDIR}$ac_i"'$U.lo'])
3265 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
3266 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
3270 ## ----------------------------------- ##
3271 ## Checking compiler characteristics. ##
3272 ## ----------------------------------- ##
3275 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS],
3277 # ---------------------------------------------------------------------
3278 # Compute the integer EXPRESSION and store the result in the VARIABLE.
3279 # Works OK if cross compiling, but assumes twos-complement arithmetic.
3280 m4_define([_AC_COMPUTE_INT_COMPILE],
3281 [# Depending upon the size, compute the lo and hi bounds.
3282 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
3285 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
3286 [ac_hi=$ac_mid; break],
3287 [AS_VAR_ARITH([ac_lo], [$ac_mid + 1])
3288 if test $ac_lo -le $ac_mid; then
3292 AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid + 1])])
3294 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
3297 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
3298 [ac_lo=$ac_mid; break],
3299 [AS_VAR_ARITH([ac_hi], ['(' $ac_mid ')' - 1])
3300 if test $ac_mid -le $ac_hi; then
3304 AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid])])
3307 # Binary search between lo and hi bounds.
3308 while test "x$ac_lo" != "x$ac_hi"; do
3309 AS_VAR_ARITH([ac_mid], ['(' $ac_hi - $ac_lo ')' / 2 + $ac_lo])
3310 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
3312 [AS_VAR_ARITH([ac_lo], ['(' $ac_mid ')' + 1])])
3314 case $ac_lo in @%:@((
3315 ?*) AS_VAR_SET([$2], [$ac_lo]); $4 ;;
3318 ])# _AC_COMPUTE_INT_COMPILE
3321 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS],
3323 # -----------------------------------------------------------------
3324 # Store the evaluation of the integer EXPRESSION in VARIABLE.
3326 # AC_LANG_INT_SAVE intentionally does not end the file in a newline, so
3327 # we must add one to make it a text file before passing it to read.
3328 m4_define([_AC_COMPUTE_INT_RUN],
3329 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
3330 [echo >>conftest.val; read $2 <conftest.val; $4], [$5])
3332 ])# _AC_COMPUTE_INT_RUN
3335 # _AC_COMPUTE_INT_BODY
3336 # --------------------
3337 # Shell function body for AC_COMPUTE_INT.
3338 m4_define([_AC_COMPUTE_INT_BODY],
3339 [ AS_LINENO_PUSH([$[]1])
3340 if test "$cross_compiling" = yes; then
3341 _AC_COMPUTE_INT_COMPILE([$[]2], [$[]3], [$[]4],
3342 [ac_retval=0], [ac_retval=1])
3344 _AC_COMPUTE_INT_RUN([$[]2], [$[]3], [$[]4],
3345 [ac_retval=0], [ac_retval=1])
3348 AS_SET_STATUS([$ac_retval])
3349 ])# _AC_COMPUTE_INT_BODY
3351 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
3352 # ----------------------------------------------------------
3353 # Store into the shell variable VARIABLE the value of the integer C expression
3354 # EXPRESSION. The value should fit in an initializer in a C variable of type
3355 # 'signed long'. If no PROLOGUE are specified, the default includes are used.
3356 # IF-FAILS is evaluated if the value cannot be found (which includes the
3357 # case of cross-compilation, if EXPRESSION is not computable at compile-time.
3358 AC_DEFUN([AC_COMPUTE_INT],
3359 [AC_LANG_COMPILER_REQUIRE()]dnl
3360 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_compute_int],
3361 [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_compute_int],
3362 [LINENO EXPR VAR INCLUDES],
3363 [Tries to find the compile-time value of EXPR in a program that includes
3364 INCLUDES, setting VAR accordingly. Returns whether the value could
3367 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_compute_int "$LINENO" "$2" "$1" ]dnl
3368 ["AS_ESCAPE([$3], [""])"],
3372 # AU::_AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
3373 # -----------------------------------------------------------
3374 # FIXME: this private interface was used by several packages.
3375 # Give them time to transition to AC_COMPUTE_INT and then delete this one.
3376 AU_DEFUN([_AC_COMPUTE_INT], [AC_COMPUTE_INT([$2], [$1], [$3], [$4])])