1 # This file is part of Autoconf. -*- Autoconf -*-
2 # Parameterized macros.
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
4 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 # As a special exception, the Free Software Foundation gives unlimited
22 # permission to copy, distribute and modify the configure scripts that
23 # are the output of Autoconf. You need not follow the terms of the GNU
24 # General Public License when using or distributing such scripts, even
25 # though portions of the text of Autoconf appear in them. The GNU
26 # General Public License (GPL) does govern all other use of the material
27 # that constitutes the Autoconf program.
29 # Certain portions of the Autoconf source text are designed to be copied
30 # (in certain cases, depending on the input) into the output of
31 # Autoconf. We call these the "data" portions. The rest of the Autoconf
32 # source text consists of comments plus executable code that decides which
33 # of the data portions to output in any given case. We call these
34 # comments and executable code the "non-data" portions. Autoconf never
35 # copies any of the non-data portions into its output.
37 # This special exception to the GPL applies to versions of Autoconf
38 # released by the Free Software Foundation. When you make and
39 # distribute a modified version of Autoconf, you may extend this special
40 # exception to the GPL to apply to your modified version as well, *unless*
41 # your modified version has the potential to copy into its output some
42 # of the text that was the non-data portion of the version that you started
43 # with. (In other words, unless your change moves or copies text from
44 # the non-data portions to the data portions.) If your modification has
45 # such potential, you must delete any notice of this special exception
46 # to the GPL from your modified version.
48 # Written by David MacKenzie, with help from
49 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
50 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
53 ## ---------------- ##
55 ## ---------------- ##
58 # We heavily use m4's diversions both for the initializations and for
59 # required macros (see AC_REQUIRE), because in both cases we have to
60 # issue high in `configure' something which is discovered late.
62 # KILL is only used to suppress output.
64 # The layers of `configure'. We let m4 undivert them by itself, when
65 # it reaches the end of `configure.ac'.
72 # Purpose of the script.
76 # Initialization of bottom layers.
79 # early initializations (defaults)
81 # initialization code, option handling loop.
84 # Handling `configure --help'.
86 # Help msg for AC_CANONICAL_*
88 # Help msg from AC_ARG_ENABLE.
90 # Help msg from AC_ARG_WITH.
92 # Help msg from AC_ARG_VAR.
94 # A small paragraph on the use of the variables.
96 # Tail of the handling of --help.
99 # Head of the handling of --version.
101 # FSF copyright notice for --version.
103 # User copyright notice for --version.
105 # Tail of the handling of --version.
108 # Tail of initialization code.
111 # the tests and output code
115 # _m4_divert(DIVERSION-NAME)
116 # --------------------------
117 # Convert a diversion name into its number. Otherwise, return
118 # DIVERSION-NAME which is supposed to be an actual diversion number.
119 # Of course it would be nicer to use m4_case here, instead of zillions
120 # of little macros, but it then takes twice longer to run `autoconf'!
130 # 3. HEADER-COPYRIGHT
133 m4_define([_m4_divert(DEFAULTS)], 10)
134 m4_define([_m4_divert(PARSE_ARGS)], 20)
136 m4_define([_m4_divert(HELP_BEGIN)], 100)
137 m4_define([_m4_divert(HELP_CANON)], 101)
138 m4_define([_m4_divert(HELP_ENABLE)], 102)
139 m4_define([_m4_divert(HELP_WITH)], 103)
140 m4_define([_m4_divert(HELP_VAR)], 104)
141 m4_define([_m4_divert(HELP_VAR_END)], 105)
142 m4_define([_m4_divert(HELP_END)], 106)
144 m4_define([_m4_divert(VERSION_BEGIN)], 200)
145 m4_define([_m4_divert(VERSION_FSF)], 201)
146 m4_define([_m4_divert(VERSION_USER)], 202)
147 m4_define([_m4_divert(VERSION_END)], 203)
149 m4_define([_m4_divert(INIT_PREPARE)], 300)
153 # AC_DIVERT_PUSH(DIVERSION-NAME)
155 # ------------------------------
156 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
157 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
161 ## ------------------------------------ ##
162 ## Defining/requiring Autoconf macros. ##
163 ## ------------------------------------ ##
166 # AC_DEFUN(NAME, EXPANSION)
167 # AC_DEFUN_ONCE(NAME, EXPANSION)
168 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
170 # AC_PROVIDE(MACRO-NAME)
171 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
172 # -----------------------------------------------------------
173 m4_copy([m4_defun], [AC_DEFUN])
174 m4_copy([m4_defun_once], [AC_DEFUN_ONCE])
175 m4_copy([m4_before], [AC_BEFORE])
176 m4_copy([m4_require], [AC_REQUIRE])
177 m4_copy([m4_provide], [AC_PROVIDE])
178 m4_copy([m4_provide_if], [AC_PROVIDE_IFELSE])
181 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
182 # ------------------------------------------
183 m4_define([AC_OBSOLETE],
184 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
188 ## ----------------------------- ##
189 ## Implementing Autoconf loops. ##
190 ## ----------------------------- ##
193 # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION)
194 # ------------------------------------------
195 AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]])
196 AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl
197 AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete.
198 You should run autoupdate.])])
202 ## ----------------------------------- ##
203 ## Helping macros to display strings. ##
204 ## ----------------------------------- ##
207 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
208 # --------------------------------------
209 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
213 ## ---------------------------------------------- ##
214 ## Information on the package being Autoconf'ed. ##
215 ## ---------------------------------------------- ##
218 # It is suggested that the macros in this section appear before
219 # AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
220 # and from the implementation point of view, AC_INIT *must* be expanded
221 # beforehand: it puts data in diversions which must appear before the
222 # data provided by the macros of this section.
224 # The solution is to require AC_INIT in each of these macros. AC_INIT
225 # has the needed magic so that it can't be expanded twice.
229 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
230 # --------------------------------------------------------------
231 m4_define([_AC_INIT_PACKAGE],
232 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
233 AS_LITERAL_IF([$2], [], [m4_warn([syntax], [AC_INIT: not a literal: $2])])
234 AS_LITERAL_IF([$3], [], [m4_warn([syntax], [AC_INIT: not a literal: $3])])
235 m4_ifndef([AC_PACKAGE_NAME],
236 [m4_define([AC_PACKAGE_NAME], [$1])])
237 m4_ifndef([AC_PACKAGE_TARNAME],
238 [m4_define([AC_PACKAGE_TARNAME],
240 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
242 [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
244 m4_ifndef([AC_PACKAGE_VERSION],
245 [m4_define([AC_PACKAGE_VERSION], [$2])])
246 m4_ifndef([AC_PACKAGE_STRING],
247 [m4_define([AC_PACKAGE_STRING], [$1 $2])])
248 m4_ifndef([AC_PACKAGE_BUGREPORT],
249 [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
253 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
254 # ------------------------------------------------------
255 # Emit TEXT, a copyright notice, in the top of `configure' and in
256 # --version output. Macros in TEXT are evaluated once.
257 m4_define([AC_COPYRIGHT],
258 [AS_COPYRIGHT([$1])[]dnl
259 m4_divert_text(m4_default([$2], [VERSION_USER]),
265 # AC_REVISION(REVISION-INFO)
266 # --------------------------
267 # The second quote in the translit is just to cope with font-lock-mode
268 # which sees the opening of a string.
269 m4_define([AC_REVISION],
270 [m4_divert_text([HEADER-REVISION],
271 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
277 ## ---------------------------------------- ##
278 ## Requirements over the Autoconf version. ##
279 ## ---------------------------------------- ##
282 # AU::AC_PREREQ(VERSION)
283 # ----------------------
284 # Update this `AC_PREREQ' statement to require the current version of
285 # Autoconf. But fail if ever this autoupdate is too old.
287 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
288 # calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be
289 # quite complex for autoupdate to import the value of
290 # `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
291 # this would replace all its occurrences with the current version of
292 # Autoconf, which is certainly not what the user intended.
293 AU_DEFUN([AC_PREREQ],
294 [m4_version_prereq([$1])[]dnl
295 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
300 # Complain and exit if the Autoconf version is less than VERSION.
301 m4_copy([m4_version_prereq], [AC_PREREQ])
308 ## ---------------- ##
309 ## Initialization. ##
310 ## ---------------- ##
313 # All the following macros are used by AC_INIT. Ideally, they should
314 # be presented in the order in which they are output. Please, help us
315 # sorting it, or at least, don't augment the entropy.
320 m4_define([_AC_INIT_NOTICE],
321 [m4_divert_text([HEADER-COMMENT],
322 [@%:@ Guess values for system-dependent variables and create Makefiles.
323 @%:@ Generated by m4_PACKAGE_STRING[]dnl
324 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
326 m4_ifset([AC_PACKAGE_BUGREPORT],
327 [m4_divert_text([HEADER-COMMENT],
329 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
335 # We dump to VERSION_FSF to make sure we are inserted before the
336 # user copyrights, and after the setup of the --version handling.
337 m4_define([_AC_INIT_COPYRIGHT],
339 [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
340 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
341 This configure script is free software; the Free Software Foundation
342 gives unlimited permission to copy, distribute and modify it.],
349 # Set up the file descriptors used by `configure'.
350 # File descriptor usage:
351 # 0 standard input (/dev/null)
353 # 2 errors and warnings
354 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
355 # AS_MESSAGE_FD checking for... messages and results
356 # AS_ORIGINAL_STDIN_FD original standard input (still open)
358 # stdin is /dev/null because checks that run programs may
359 # inadvertently run interactive ones, which would stop configuration
360 # until someone typed an EOF.
361 m4_define([AS_MESSAGE_FD], 6)
362 m4_define([AS_ORIGINAL_STDIN_FD], 7)
363 # That's how they used to be named.
364 AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
365 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
370 # Values which defaults can be set from `configure.ac'.
371 # `/bin/machine' is used in `glibcbug'. The others are used in config.*
372 m4_define([_AC_INIT_DEFAULTS],
373 [m4_divert_push([DEFAULTS])dnl
375 exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1
378 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
379 # so uname gets run too.
380 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
385 ac_default_prefix=/usr/local
387 ac_config_libobj_dir=.
393 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
394 AC_SUBST([PATH_SEPARATOR])dnl
396 # Identity of this package.
397 AC_SUBST([PACKAGE_NAME],
398 [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
399 AC_SUBST([PACKAGE_TARNAME],
400 [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
401 AC_SUBST([PACKAGE_VERSION],
402 [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
403 AC_SUBST([PACKAGE_STRING],
404 [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
405 AC_SUBST([PACKAGE_BUGREPORT],
406 [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
408 m4_divert_pop([DEFAULTS])dnl
409 m4_wrap([m4_divert_text([DEFAULTS],
410 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS])])'
411 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
413 enable_option_checking
414 m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
416 m4_ifdef([_AC_PRECIOUS_VARS],
417 [_AC_ARG_VAR_STORE[]dnl
418 _AC_ARG_VAR_VALIDATE[]dnl
419 ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
420 m4_ifdef([_AC_LIST_SUBDIRS],
421 [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
423 ])# _AC_INIT_DEFAULTS
426 # AC_PREFIX_DEFAULT(PREFIX)
427 # -------------------------
428 AC_DEFUN([AC_PREFIX_DEFAULT],
429 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
432 # AC_PREFIX_PROGRAM(PROGRAM)
433 # --------------------------
434 # Guess the value for the `prefix' variable by looking for
435 # the argument program along PATH and taking its parent.
436 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
437 # set `prefix' to /usr/local/gnu.
438 # This comes too late to find a site file based on the prefix,
439 # and it might use a cached value for the path.
440 # No big loss, I think, since most configures don't use this macro anyway.
441 AC_DEFUN([AC_PREFIX_PROGRAM],
442 [if test "x$prefix" = xNONE; then
443 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
444 _AS_ECHO_N([checking for prefix by ])
445 AC_PATH_PROG(ac_prefix_program, [$1])
446 if test -n "$ac_prefix_program"; then
447 prefix=`AS_DIRNAME(["$ac_prefix_program"])`
448 prefix=`AS_DIRNAME(["$prefix"])`
451 ])# AC_PREFIX_PROGRAM
454 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
455 # ---------------------------------------------
456 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
457 # relative to the directory that configure is in, which we can look
458 # for to find out if srcdir is correct.
459 AC_DEFUN([AC_CONFIG_SRCDIR],
460 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
465 # Set ac_pwd, and sanity-check it and the source and installation directories.
467 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
469 AC_DEFUN([_AC_INIT_DIRCHECK],
470 [m4_divert_push([PARSE_ARGS])dnl
472 ac_pwd=`pwd` && test -n "$ac_pwd" &&
473 ac_ls_di=`ls -di .` &&
474 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
475 AC_MSG_ERROR([Working directory cannot be determined])
476 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
477 AC_MSG_ERROR([pwd does not report name of working directory])
479 m4_divert_pop([PARSE_ARGS])dnl
480 ])# _AC_INIT_DIRCHECK
484 # Compute `srcdir' based on `$ac_unique_file'.
486 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
488 AC_DEFUN([_AC_INIT_SRCDIR],
489 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
490 m4_divert_push([PARSE_ARGS])dnl
492 # Find the source files, if location was not specified.
493 if test -z "$srcdir"; then
494 ac_srcdir_defaulted=yes
495 # Try the directory containing this script, then the parent directory.
496 ac_confdir=`AS_DIRNAME(["$[0]"])`
498 if test ! -r "$srcdir/$ac_unique_file"; then
502 ac_srcdir_defaulted=no
504 if test ! -r "$srcdir/$ac_unique_file"; then
505 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
506 AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
508 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
510 cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
512 # When building in place, set srcdir=.
513 if test "$ac_abs_confdir" = "$ac_pwd"; then
516 # Remove unnecessary trailing slashes from srcdir.
517 # Double slashes in file names in object file debugging info
518 # mess up M-x gdb in Emacs.
520 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
522 m4_divert_pop([PARSE_ARGS])dnl
526 # _AC_INIT_PARSE_ARGS
527 # -------------------
528 m4_define([_AC_INIT_PARSE_ARGS],
529 [m4_divert_push([PARSE_ARGS])dnl
531 # Initialize some variables set by options.
533 ac_init_version=false
534 ac_unrecognized_opts=
536 # The variables have the same names as the options, with
537 # dashes changed to underlines.
539 AC_SUBST(exec_prefix, NONE)dnl
542 AC_SUBST(prefix, NONE)dnl
545 AC_SUBST(program_transform_name, [s,x,x,])dnl
553 # Installation directory options.
554 # These are left unexpanded so users can "make install exec_prefix=/foo"
555 # and all the variables that are supposed to be based on exec_prefix
556 # by default will actually change.
557 # Use braces instead of parens because sh, perl, etc. also accept them.
558 # (The list follows the same order as the GNU Coding Standards.)
559 AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
560 AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
561 AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
562 AC_SUBST([datarootdir], ['${prefix}/share'])dnl
563 AC_SUBST([datadir], ['${datarootdir}'])dnl
564 AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
565 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
566 AC_SUBST([localstatedir], ['${prefix}/var'])dnl
567 AC_SUBST([includedir], ['${prefix}/include'])dnl
568 AC_SUBST([oldincludedir], ['/usr/include'])dnl
569 AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
570 ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
571 ['${datarootdir}/doc/${PACKAGE}'])])dnl
572 AC_SUBST([infodir], ['${datarootdir}/info'])dnl
573 AC_SUBST([htmldir], ['${docdir}'])dnl
574 AC_SUBST([dvidir], ['${docdir}'])dnl
575 AC_SUBST([pdfdir], ['${docdir}'])dnl
576 AC_SUBST([psdir], ['${docdir}'])dnl
577 AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
578 AC_SUBST([localedir], ['${datarootdir}/locale'])dnl
579 AC_SUBST([mandir], ['${datarootdir}/man'])dnl
585 # If the previous option needs an argument, assign it.
586 if test -n "$ac_prev"; then
587 eval $ac_prev=\$ac_option
593 *=*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
597 # Accept the important Cygnus configure options, so we can diagnose typos.
599 case $ac_dashdash$ac_option in
603 -bindir | --bindir | --bindi | --bind | --bin | --bi)
605 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
608 -build | --build | --buil | --bui | --bu)
609 ac_prev=build_alias ;;
610 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
611 build_alias=$ac_optarg ;;
613 -cache-file | --cache-file | --cache-fil | --cache-fi \
614 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
615 ac_prev=cache_file ;;
616 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
617 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
618 cache_file=$ac_optarg ;;
621 cache_file=config.cache ;;
623 -datadir | --datadir | --datadi | --datad)
625 -datadir=* | --datadir=* | --datadi=* | --datad=*)
626 datadir=$ac_optarg ;;
628 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
629 | --dataroo | --dataro | --datar)
630 ac_prev=datarootdir ;;
631 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
632 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
633 datarootdir=$ac_optarg ;;
635 _AC_INIT_PARSE_ENABLE([disable])
637 -docdir | --docdir | --docdi | --doc | --do)
639 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
642 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
644 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
647 _AC_INIT_PARSE_ENABLE([enable])
649 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
650 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
651 | --exec | --exe | --ex)
652 ac_prev=exec_prefix ;;
653 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
654 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
655 | --exec=* | --exe=* | --ex=*)
656 exec_prefix=$ac_optarg ;;
658 -gas | --gas | --ga | --g)
659 # Obsolete; use --with-gas.
662 -help | --help | --hel | --he | -h)
664 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
665 ac_init_help=recursive ;;
666 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
667 ac_init_help=short ;;
669 -host | --host | --hos | --ho)
670 ac_prev=host_alias ;;
671 -host=* | --host=* | --hos=* | --ho=*)
672 host_alias=$ac_optarg ;;
674 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
676 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
678 htmldir=$ac_optarg ;;
680 -includedir | --includedir | --includedi | --included | --include \
681 | --includ | --inclu | --incl | --inc)
682 ac_prev=includedir ;;
683 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
684 | --includ=* | --inclu=* | --incl=* | --inc=*)
685 includedir=$ac_optarg ;;
687 -infodir | --infodir | --infodi | --infod | --info | --inf)
689 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
690 infodir=$ac_optarg ;;
692 -libdir | --libdir | --libdi | --libd)
694 -libdir=* | --libdir=* | --libdi=* | --libd=*)
697 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
698 | --libexe | --libex | --libe)
699 ac_prev=libexecdir ;;
700 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
701 | --libexe=* | --libex=* | --libe=*)
702 libexecdir=$ac_optarg ;;
704 -localedir | --localedir | --localedi | --localed | --locale)
706 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
707 localedir=$ac_optarg ;;
709 -localstatedir | --localstatedir | --localstatedi | --localstated \
710 | --localstate | --localstat | --localsta | --localst | --locals)
711 ac_prev=localstatedir ;;
712 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
713 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
714 localstatedir=$ac_optarg ;;
716 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
718 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
722 # Obsolete; use --without-fp.
725 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
726 | --no-cr | --no-c | -n)
729 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
730 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
733 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
734 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
735 | --oldin | --oldi | --old | --ol | --o)
736 ac_prev=oldincludedir ;;
737 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
738 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
739 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
740 oldincludedir=$ac_optarg ;;
742 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
744 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
747 -program-prefix | --program-prefix | --program-prefi | --program-pref \
748 | --program-pre | --program-pr | --program-p)
749 ac_prev=program_prefix ;;
750 -program-prefix=* | --program-prefix=* | --program-prefi=* \
751 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
752 program_prefix=$ac_optarg ;;
754 -program-suffix | --program-suffix | --program-suffi | --program-suff \
755 | --program-suf | --program-su | --program-s)
756 ac_prev=program_suffix ;;
757 -program-suffix=* | --program-suffix=* | --program-suffi=* \
758 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
759 program_suffix=$ac_optarg ;;
761 -program-transform-name | --program-transform-name \
762 | --program-transform-nam | --program-transform-na \
763 | --program-transform-n | --program-transform- \
764 | --program-transform | --program-transfor \
765 | --program-transfo | --program-transf \
766 | --program-trans | --program-tran \
767 | --progr-tra | --program-tr | --program-t)
768 ac_prev=program_transform_name ;;
769 -program-transform-name=* | --program-transform-name=* \
770 | --program-transform-nam=* | --program-transform-na=* \
771 | --program-transform-n=* | --program-transform-=* \
772 | --program-transform=* | --program-transfor=* \
773 | --program-transfo=* | --program-transf=* \
774 | --program-trans=* | --program-tran=* \
775 | --progr-tra=* | --program-tr=* | --program-t=*)
776 program_transform_name=$ac_optarg ;;
778 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
780 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
783 -psdir | --psdir | --psdi | --psd | --ps)
785 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
788 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
789 | -silent | --silent | --silen | --sile | --sil)
792 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
794 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
796 sbindir=$ac_optarg ;;
798 -sharedstatedir | --sharedstatedir | --sharedstatedi \
799 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
800 | --sharedst | --shareds | --shared | --share | --shar \
802 ac_prev=sharedstatedir ;;
803 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
804 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
805 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
807 sharedstatedir=$ac_optarg ;;
809 -site | --site | --sit)
811 -site=* | --site=* | --sit=*)
814 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
816 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
819 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
820 | --syscon | --sysco | --sysc | --sys | --sy)
821 ac_prev=sysconfdir ;;
822 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
823 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
824 sysconfdir=$ac_optarg ;;
826 -target | --target | --targe | --targ | --tar | --ta | --t)
827 ac_prev=target_alias ;;
828 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
829 target_alias=$ac_optarg ;;
831 -v | -verbose | --verbose | --verbos | --verbo | --verb)
834 -version | --version | --versio | --versi | --vers | -V)
837 _AC_INIT_PARSE_ENABLE([with])
839 _AC_INIT_PARSE_ENABLE([without])
842 # Obsolete; use --with-x.
845 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
846 | --x-incl | --x-inc | --x-in | --x-i)
847 ac_prev=x_includes ;;
848 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
849 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
850 x_includes=$ac_optarg ;;
852 -x-libraries | --x-libraries | --x-librarie | --x-librari \
853 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
854 ac_prev=x_libraries ;;
855 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
856 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
857 x_libraries=$ac_optarg ;;
859 -*) AC_MSG_ERROR([unrecognized option: $ac_option
860 Try `$[0] --help' for more information.])
864 ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
865 # Reject names that are not valid shell variable names.
866 expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
867 AC_MSG_ERROR([invalid variable name: $ac_envvar])
868 eval $ac_envvar=\$ac_optarg
872 # FIXME: should be removed in autoconf 3.0.
873 AC_MSG_WARN([you should use --build, --host, --target])
874 expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
875 AC_MSG_WARN([invalid host type: $ac_option])
876 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
882 if test -n "$ac_prev"; then
883 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
884 AC_MSG_ERROR([missing argument to $ac_option])
887 if test -n "$ac_unrecognized_opts"; then
888 case $enable_option_checking in
890 fatal) AC_MSG_ERROR([Unrecognized options: $ac_unrecognized_opts]) ;;
891 *) AC_MSG_WARN( [Unrecognized options: $ac_unrecognized_opts]) ;;
895 # Be sure to have absolute directory names.
896 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
897 datadir sysconfdir sharedstatedir localstatedir includedir \
898 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
899 libdir localedir mandir
901 eval ac_val=\$$ac_var
903 [[\\/$]]* | ?:[[\\/]]* ) continue;;
904 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
906 AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
909 # There might be people who depend on the old broken behavior: `$host'
910 # used to hold the argument of --host etc.
911 # FIXME: To remove some day.
916 # FIXME: To remove some day.
917 if test "x$host_alias" != x; then
918 if test "x$build_alias" = x; then
919 cross_compiling=maybe
920 AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
921 If a cross compiler is detected then cross compile mode will be used.])
922 elif test "x$build_alias" != "x$host_alias"; then
928 test -n "$host_alias" && ac_tool_prefix=$host_alias-
930 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
932 m4_divert_pop([PARSE_ARGS])dnl
933 ])# _AC_INIT_PARSE_ARGS
936 # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
937 # ----------------------------------
938 # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
940 m4_define([_AC_INIT_PARSE_ENABLE],
941 [m4_bmatch([$1], [^with],
942 [_AC_INIT_PARSE_ENABLE2([$1], [with])],
943 [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
946 # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
947 # --------------------------------------------------
948 # Handle an `--enable' or a `--with' option.
950 # OPTION-NAME is `enable', `disable', `with', or `without'.
951 # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'.
953 # Positive variant of the option is recognized by the condition
954 # OPTION-NAME == POSITIVE-NAME .
956 m4_define([_AC_INIT_PARSE_ENABLE2],
958 ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
959 # Reject names that are not valid shell variable names.
960 expr "x$ac_useropt" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
962 [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt])
963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-.]]/_/g'`
965 case $ac_user_opts in
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
972 eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
978 # Handle the `configure --help' message.
979 m4_define([_AC_INIT_HELP],
980 [m4_divert_push([HELP_BEGIN])dnl
983 # Report the --help message.
985 if test "$ac_init_help" = "long"; then
986 # Omit some internal or obsolete options to make the list less imposing.
987 # This message is too long to be a string in the A/UX 3.1 sh.
989 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
991 [this package]) to adapt to many kinds of systems.
993 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
995 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
996 VAR=VALUE. See below for descriptions of some of the useful variables.
998 Defaults for the options are specified in brackets.
1001 -h, --help display this help and exit
1002 --help=short display options specific to this package
1003 --help=recursive display the short help of all the included packages
1004 -V, --version display version information and exit
1005 -q, --quiet, --silent do not print \`checking...' messages
1006 --cache-file=FILE cache test results in FILE [disabled]
1007 -C, --config-cache alias for \`--cache-file=config.cache'
1008 -n, --no-create do not create output files
1009 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1011 Installation directories:
1012 --prefix=PREFIX install architecture-independent files in PREFIX
1013 [$ac_default_prefix]
1014 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1017 By default, \`make install' will install all the files in
1018 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1019 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1020 for instance \`--prefix=\$HOME'.
1022 For better control, use the options below.
1024 Fine tuning of the installation directories:
1025 --bindir=DIR user executables [EPREFIX/bin]
1026 --sbindir=DIR system admin executables [EPREFIX/sbin]
1027 --libexecdir=DIR program executables [EPREFIX/libexec]
1028 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1029 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1030 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1031 --libdir=DIR object code libraries [EPREFIX/lib]
1032 --includedir=DIR C header files [PREFIX/include]
1033 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1034 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1035 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1036 --infodir=DIR info documentation [DATAROOTDIR/info]
1037 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1038 --mandir=DIR man documentation [DATAROOTDIR/man]
1039 --docdir=DIR documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME], [AC_PACKAGE_TARNAME], [PACKAGE])@:>@[
1040 --htmldir=DIR html documentation [DOCDIR]
1041 --dvidir=DIR dvi documentation [DOCDIR]
1042 --pdfdir=DIR pdf documentation [DOCDIR]
1043 --psdir=DIR ps documentation [DOCDIR]
1047 m4_divert_pop([HELP_BEGIN])dnl
1048 dnl The order of the diversions here is
1050 dnl which may be extended by extra generic options such as with X or
1051 dnl AC_ARG_PROGRAM. Displayed only in long --help.
1054 dnl Support for cross compilation (--build, --host and --target).
1055 dnl Display only in long --help.
1058 dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1059 dnl then implements the header of the non generic options.
1068 dnl initialized below, in which we dump the trailer (handling of the
1069 dnl recursion for instance).
1070 m4_divert_push([HELP_ENABLE])dnl
1074 if test -n "$ac_init_help"; then
1075 m4_ifset([AC_PACKAGE_STRING],
1076 [ case $ac_init_help in
1077 short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1080 m4_divert_pop([HELP_ENABLE])dnl
1081 m4_divert_push([HELP_END])dnl
1082 m4_ifset([AC_PACKAGE_BUGREPORT], [
1083 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1088 if test "$ac_init_help" = "recursive"; then
1089 # If there are subdirs, report their specific --help.
1090 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1091 test -d "$ac_dir" || continue
1092 _AC_SRCDIRS(["$ac_dir"])
1093 cd "$ac_dir" || { ac_status=$?; continue; }
1094 # Check for guested configure.
1095 if test -f "$ac_srcdir/configure.gnu"; then
1097 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1098 elif test -f "$ac_srcdir/configure"; then
1100 $SHELL "$ac_srcdir/configure" --help=recursive
1102 AC_MSG_WARN([no configuration information is in $ac_dir])
1104 cd "$ac_pwd" || { ac_status=$?; break; }
1108 test -n "$ac_init_help" && exit $ac_status
1109 m4_divert_pop([HELP_END])dnl
1115 # Handle the `configure --version' message.
1116 m4_define([_AC_INIT_VERSION],
1117 [m4_divert_text([VERSION_BEGIN],
1118 [if $ac_init_version; then
1120 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1121 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1122 generated by m4_PACKAGE_STRING])
1123 m4_divert_text([VERSION_END],
1127 ])# _AC_INIT_VERSION
1130 # _AC_INIT_CONFIG_LOG
1131 # -------------------
1132 # Initialize the config.log file descriptor and write header to it.
1133 m4_define([_AC_INIT_CONFIG_LOG],
1134 [m4_divert_text([INIT_PREPARE],
1135 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1136 cat >config.log <<_ACEOF
1137 This file contains any messages produced by compilers while
1138 running configure, to aid debugging if configure makes a mistake.
1140 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1141 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1142 generated by m4_PACKAGE_STRING. Invocation command line was
1147 exec AS_MESSAGE_LOG_FD>>config.log
1148 AS_UNAME >&AS_MESSAGE_LOG_FD
1150 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1153 m4_text_box([Core tests.])
1156 ])])# _AC_INIT_CONFIG_LOG
1161 # Called by AC_INIT to build the preamble of the `configure' scripts.
1162 # 1. Trap and clean up various tmp files.
1163 # 2. Set up the fd and output files
1164 # 3. Remember the options given to `configure' for `config.status --recheck'.
1165 # 4. Initiates confdefs.h
1166 # 5. Loads site and cache files
1167 m4_define([_AC_INIT_PREPARE],
1168 [m4_divert_push([INIT_PREPARE])dnl
1170 # Keep a trace of the command line.
1171 # Strip out --no-create and --no-recursion so they do not pile up.
1172 # Strip out --silent because we don't want to record it for future runs.
1173 # Also quote any args containing shell meta-characters.
1174 # Make two passes to allow for proper duplicate-argument suppression.
1178 ac_must_keep_next=false
1184 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1185 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1186 | -silent | --silent | --silen | --sile | --sil)
1189 ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1192 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1194 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1195 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1196 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1197 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1198 dnl give --prefix foo bar).
1199 if test $ac_must_keep_next = true; then
1200 ac_must_keep_next=false # Got value, back to normal.
1203 dnl Use broad patterns, as arguments that would have already made configure
1204 dnl exit don't matter.
1205 *=* | --config-cache | -C | -disable-* | --disable-* \
1206 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1207 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1208 | -with-* | --with-* | -without-* | --without-* | --x)
1209 case "$ac_configure_args0 " in
1210 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1213 -* ) ac_must_keep_next=true ;;
1216 ac_configure_args="$ac_configure_args '$ac_arg'"
1221 AS_UNSET(ac_configure_args0)
1222 AS_UNSET(ac_configure_args1)
1224 # When interrupted or exit'd, cleanup temporary files, and complete
1225 # config.log. We remove comments because anyway the quotes in there
1226 # would cause problems or look ugly.
1227 # WARNING: Use '\'' to represent an apostrophe within the trap.
1228 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1229 trap 'exit_status=$?
1230 # Save into config.log some information that might help in debugging.
1234 AS_BOX([Cache variables.])
1236 m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1242 AS_BOX([Output variables.])
1244 for ac_var in $ac_subst_vars
1246 eval ac_val=\$$ac_var
1248 *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1250 AS_ECHO(["$ac_var='\''$ac_val'\''"])
1254 if test -n "$ac_subst_files"; then
1255 AS_BOX([File substitutions.])
1257 for ac_var in $ac_subst_files
1259 eval ac_val=\$$ac_var
1261 *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1263 AS_ECHO(["$ac_var='\''$ac_val'\''"])
1268 if test -s confdefs.h; then
1269 AS_BOX([confdefs.h.])
1274 test "$ac_signal" != 0 &&
1275 AS_ECHO(["$as_me: caught signal $ac_signal"])
1276 AS_ECHO(["$as_me: exit $exit_status"])
1277 } >&AS_MESSAGE_LOG_FD
1278 rm -f core *.core core.conftest.* &&
1279 rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1282 for ac_signal in 1 2 13 15; do
1283 trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1287 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1288 rm -f -r conftest* confdefs.h
1289 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1290 dnl containing less than 14 bytes (including the newline).
1291 dnl But the defines below solve this problem.
1293 # Predefined preprocessor variables.
1294 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1295 [Define to the full name of this package.])
1296 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1297 [Define to the one symbol short name of this package.])
1298 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1299 [Define to the version of this package.])
1300 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1301 [Define to the full name and version of this package.])
1302 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1303 [Define to the address where bug reports for this package
1306 # Let the site file select an alternate cache file if it wants to.
1309 m4_divert_pop([INIT_PREPARE])dnl
1310 ])# _AC_INIT_PREPARE
1313 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1314 # ----------------------------------------
1315 # This macro is used only for Autoupdate.
1317 [m4_ifval([$2], [[AC_INIT($@)]],
1320 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1324 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1325 # ----------------------------------------
1326 # Include the user macro files, prepare the diversions, and output the
1327 # preamble of the `configure' script.
1328 # Note that the order is important: first initialize, then set the
1330 m4_define([AC_INIT],
1331 [# Forbidden tokens and exceptions.
1332 m4_pattern_forbid([^_?A[CHUM]_])
1333 m4_pattern_forbid([_AC_])
1334 m4_pattern_forbid([^LIBOBJS$],
1335 [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1336 # Actually reserved by M4sh.
1337 m4_pattern_allow([^AS_FLAGS$])
1340 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1351 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1353 dnl Substitute for predefined variables.
1355 AC_SUBST([ECHO_C])dnl
1356 AC_SUBST([ECHO_N])dnl
1357 AC_SUBST([ECHO_T])dnl
1359 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1360 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1361 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1369 ## ------------------------------------------------------------- ##
1370 ## Selecting optional features, working with optional software. ##
1371 ## ------------------------------------------------------------- ##
1373 # AC_PRESERVE_HELP_ORDER
1374 # ----------------------
1375 # Emit help strings in the order given, rather than grouping all --enable-FOO
1376 # and all --with-BAR.
1377 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1378 [m4_divert_once([HELP_ENABLE], [[
1379 Optional Features and Packages:
1380 --disable-option-checking ignore unrecognized --enable/--with options
1381 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1382 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1383 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1384 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
1385 m4_define([_m4_divert(HELP_ENABLE)], _m4_divert(HELP_WITH))
1386 ])# AC_PRESERVE_HELP_ORDER
1388 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1389 # -------------------------------------------------------------------
1390 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1391 # OPTION is either "enable" or "with".
1393 m4_define([_AC_ENABLE_IF],
1394 [# Check whether --$1-$2 was given.
1395 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])[]dnl
1398 m4_define([_AC_ENABLE_IF_ACTION],
1399 [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
1401 AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
1404 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1405 # ------------------------------------------------------------------------
1406 AC_DEFUN([AC_ARG_ENABLE],
1407 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1409 [m4_divert_once([HELP_ENABLE], [[
1411 --disable-option-checking ignore unrecognized --enable/--with options
1412 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1413 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])])dnl
1414 m4_divert_once([HELP_ENABLE], [$2])dnl
1415 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1419 AU_DEFUN([AC_ENABLE],
1420 [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
1423 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1424 # --------------------------------------------------------------------
1425 AC_DEFUN([AC_ARG_WITH],
1426 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1428 [m4_divert_once([HELP_WITH], [[
1430 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1431 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])])
1432 m4_divert_once([HELP_WITH], [$2])dnl
1433 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1437 [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
1439 # AC_DISABLE_OPTION_CHECKING
1440 # --------------------------------------------------------------------
1441 AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
1442 [m4_divert_once([DEFAULTS], [enable_option_checking=no])
1443 ])# AC_DISABLE_OPTION_CHECKING
1446 ## ----------------------------------------- ##
1447 ## Remembering variables for reconfiguring. ##
1448 ## ----------------------------------------- ##
1451 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1452 # ----------------------------------
1453 # Register VARNAME as a precious variable, and document it in
1454 # `configure --help' (but only once).
1455 AC_DEFUN([AC_ARG_VAR],
1456 [m4_divert_once([HELP_VAR], [[
1457 Some influential environment variables:]])dnl
1458 m4_divert_once([HELP_VAR_END], [[
1459 Use these variables to override the choices made by `configure' or to help
1460 it to find libraries and programs with nonstandard names/locations.]])dnl
1461 m4_expand_once([m4_divert_text([HELP_VAR],
1462 [AS_HELP_STRING([$1], [$2], [ ])])],
1465 _AC_ARG_VAR_PRECIOUS([$1])dnl
1469 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1470 # -----------------------------
1471 # Declare VARNAME is precious.
1472 m4_define([_AC_ARG_VAR_PRECIOUS],
1473 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1480 # We try to diagnose when precious variables have changed. To do this,
1481 # make two early snapshots (after the option processing to take
1482 # explicit variables into account) of those variables: one (ac_env_)
1483 # which represents the current run, and a second (ac_cv_env_) which,
1484 # at the first run, will be saved in the cache. As an exception to
1485 # the cache mechanism, its loading will override these variables (non
1486 # `ac_cv_env_' cache value are only set when unset).
1488 # In subsequent runs, after having loaded the cache, compare
1489 # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
1490 m4_define([_AC_ARG_VAR_STORE],
1491 [m4_divert_text([PARSE_ARGS],
1492 [for ac_var in $ac_precious_vars; do
1493 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1494 eval ac_env_${ac_var}_value=\$${ac_var}
1495 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1496 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1501 # _AC_ARG_VAR_VALIDATE
1502 # --------------------
1503 # The precious variables are saved twice at the beginning of
1504 # configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1505 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1506 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1508 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1509 # content of the cached values, while `ac_env_' represents that of the
1512 # So we check that `ac_env_' and `ac_cv_env_' are consistent. If
1514 m4_define([_AC_ARG_VAR_VALIDATE],
1515 [m4_divert_text([INIT_PREPARE],
1516 [# Check that the precious variables saved in the cache have kept the same
1518 ac_cache_corrupted=false
1519 for ac_var in $ac_precious_vars; do
1520 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1521 eval ac_new_set=\$ac_env_${ac_var}_set
1522 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1523 eval ac_new_val=\$ac_env_${ac_var}_value
1524 case $ac_old_set,$ac_new_set in
1526 AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1527 ac_cache_corrupted=: ;;
1529 AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1530 ac_cache_corrupted=: ;;
1533 if test "x$ac_old_val" != "x$ac_new_val"; then
1534 AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1535 AS_MESSAGE([ former value: $ac_old_val], 2)
1536 AS_MESSAGE([ current value: $ac_new_val], 2)
1537 ac_cache_corrupted=:
1540 # Pass precious variables to config.status.
1541 if test "$ac_new_set" = set; then
1543 *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1544 *) ac_arg=$ac_var=$ac_new_val ;;
1546 case " $ac_configure_args " in
1547 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1548 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1552 if $ac_cache_corrupted; then
1553 AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1554 AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1556 ])# _AC_ARG_VAR_VALIDATE
1562 ## ---------------------------- ##
1563 ## Transforming program names. ##
1564 ## ---------------------------- ##
1569 # This macro is expanded only once, to avoid that `foo' ends up being
1570 # installed as `ggfoo'.
1571 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1572 [dnl Document the options.
1573 m4_divert_push([HELP_BEGIN])dnl
1576 --program-prefix=PREFIX prepend PREFIX to installed program names
1577 --program-suffix=SUFFIX append SUFFIX to installed program names
1578 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1579 m4_divert_pop([HELP_BEGIN])dnl
1580 test "$program_prefix" != NONE &&
1581 program_transform_name="s&^&$program_prefix&;$program_transform_name"
1582 # Use a double $ so make ignores it.
1583 test "$program_suffix" != NONE &&
1584 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1585 # Double any \ or $.
1586 # By default was `s,x,x', remove it if useless.
1587 [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
1588 program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
1595 ## ------------------------- ##
1596 ## Finding auxiliary files. ##
1597 ## ------------------------- ##
1600 # AC_CONFIG_AUX_DIR(DIR)
1601 # ----------------------
1602 # Find install-sh, config.sub, config.guess, and Cygnus configure
1603 # in directory DIR. These are auxiliary files used in configuration.
1604 # DIR can be either absolute or relative to $srcdir.
1605 AC_DEFUN([AC_CONFIG_AUX_DIR],
1606 [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
1609 # AC_CONFIG_AUX_DIR_DEFAULT
1610 # -------------------------
1611 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1612 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1613 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1614 [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
1617 # AC_CONFIG_AUX_DIRS(DIR ...)
1618 # ---------------------------
1619 # Internal subroutine.
1620 # Search for the configuration auxiliary files in directory list $1.
1621 # We look only for install-sh, so users of AC_PROG_INSTALL
1622 # do not automatically need to distribute the other auxiliary files.
1623 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1625 for ac_dir in $1; do
1626 if test -f "$ac_dir/install-sh"; then
1628 ac_install_sh="$ac_aux_dir/install-sh -c"
1630 elif test -f "$ac_dir/install.sh"; then
1632 ac_install_sh="$ac_aux_dir/install.sh -c"
1634 elif test -f "$ac_dir/shtool"; then
1636 ac_install_sh="$ac_aux_dir/shtool install -c"
1640 if test -z "$ac_aux_dir"; then
1641 AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1644 # These three variables are undocumented and unsupported,
1645 # and are intended to be withdrawn in a future Autoconf release.
1646 # They can cause serious problems if a builder's source tree is in a directory
1647 # whose full name contains unusual characters.
1648 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
1649 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
1650 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
1652 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1653 ])# AC_CONFIG_AUX_DIRS
1658 ## ------------------------ ##
1659 ## Finding aclocal macros. ##
1660 ## ------------------------ ##
1663 # AC_CONFIG_MACRO_DIR(DIR)
1664 # ------------------------
1665 # Declare directory containing additional macros for aclocal.
1666 AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
1670 ## --------------------- ##
1671 ## Requiring aux files. ##
1672 ## --------------------- ##
1674 # AC_REQUIRE_AUX_FILE(FILE)
1675 # -------------------------
1676 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1677 # It announces FILE is required in the auxdir.
1678 m4_define([AC_REQUIRE_AUX_FILE],
1679 [AS_LITERAL_IF([$1], [],
1680 [AC_FATAL([$0: requires a literal argument])])])
1684 ## ----------------------------------- ##
1685 ## Getting the canonical system type. ##
1686 ## ----------------------------------- ##
1689 # configure --host=HOST --target=TARGET --build=BUILD
1692 # 1. Build defaults to the current platform, as determined by config.guess.
1693 # 2. Host defaults to build.
1694 # 3. Target defaults to host.
1697 # _AC_CANONICAL_SPLIT(THING)
1698 # --------------------------
1699 # Generate the variables THING, THING_{alias cpu vendor os}.
1700 m4_define([_AC_CANONICAL_SPLIT],
1703 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1705 AC_SUBST([$1], [$ac_cv_$1])dnl
1706 ac_save_IFS=$IFS; IFS='-'
1709 AC_SUBST([$1_cpu], [$[1]])dnl
1710 AC_SUBST([$1_vendor], [$[2]])dnl
1712 [# Remember, the first character of IFS is used to create $]*,
1713 # except with old shells:
1716 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
1717 AC_SUBST([$1_os])dnl
1718 ])# _AC_CANONICAL_SPLIT
1721 # AC_CANONICAL_BUILD
1722 # ------------------
1723 AC_DEFUN([AC_CANONICAL_BUILD],
1724 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1725 AC_REQUIRE_AUX_FILE([config.sub])dnl
1726 AC_REQUIRE_AUX_FILE([config.guess])dnl
1727 m4_divert_once([HELP_CANON],
1730 --build=BUILD configure for building on BUILD [guessed]]])dnl
1731 # Make sure we can run config.sub.
1732 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1733 AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
1735 AC_CACHE_CHECK([build system type], [ac_cv_build],
1736 [ac_build_alias=$build_alias
1737 test "x$ac_build_alias" = x &&
1738 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1739 test "x$ac_build_alias" = x &&
1740 AC_MSG_ERROR([cannot guess build type; you must specify one])
1741 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1742 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
1744 _AC_CANONICAL_SPLIT(build)
1745 ])# AC_CANONICAL_BUILD
1750 AC_DEFUN([AC_CANONICAL_HOST],
1751 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1752 m4_divert_once([HELP_CANON],
1753 [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl
1754 AC_CACHE_CHECK([host system type], [ac_cv_host],
1755 [if test "x$host_alias" = x; then
1756 ac_cv_host=$ac_cv_build
1758 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1759 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
1762 _AC_CANONICAL_SPLIT([host])
1763 ])# AC_CANONICAL_HOST
1766 # AC_CANONICAL_TARGET
1767 # -------------------
1768 AC_DEFUN([AC_CANONICAL_TARGET],
1769 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1770 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1771 m4_divert_once([HELP_CANON],
1772 [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
1773 AC_CACHE_CHECK([target system type], [ac_cv_target],
1774 [if test "x$target_alias" = x; then
1775 ac_cv_target=$ac_cv_host
1777 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
1778 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
1781 _AC_CANONICAL_SPLIT([target])
1783 # The aliases save the names the user supplied, while $host etc.
1784 # will get canonicalized.
1785 test -n "$target_alias" &&
1786 test "$program_prefix$program_suffix$program_transform_name" = \
1788 program_prefix=${target_alias}-[]dnl
1789 ])# AC_CANONICAL_TARGET
1792 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1795 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1796 # ------------------------------------------
1797 # If the cache file is inconsistent with the current host,
1798 # target and build system types, execute CMD or print a default
1799 # error message. Now handled via _AC_ARG_VAR_PRECIOUS.
1800 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1803 ## ---------------------- ##
1804 ## Caching test results. ##
1805 ## ---------------------- ##
1810 # Look for site or system specific initialization scripts.
1811 m4_define([AC_SITE_LOAD],
1812 [# Prefer explicitly selected file to automatically selected ones.
1813 if test -n "$CONFIG_SITE"; then
1814 set x "$CONFIG_SITE"
1815 elif test "x$prefix" != xNONE; then
1816 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1818 set x "$ac_default_prefix/share/config.site" \
1819 "$ac_default_prefix/etc/config.site"
1824 if test -r "$ac_site_file"; then
1825 AC_MSG_NOTICE([loading site script $ac_site_file])
1826 sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1835 m4_define([AC_CACHE_LOAD],
1836 [if test -r "$cache_file"; then
1837 # Some versions of bash will fail to source /dev/null (special
1838 # files actually), so we avoid doing that.
1839 if test -f "$cache_file"; then
1840 AC_MSG_NOTICE([loading cache $cache_file])
1842 [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
1843 *) . "./$cache_file";;
1847 AC_MSG_NOTICE([creating cache $cache_file])
1855 # Dump the cache to stdout. It can be in a pipe (this is a requirement).
1856 m4_define([_AC_CACHE_DUMP],
1857 [# The following way of writing the cache mishandles newlines in values,
1858 # but we know of no workaround that is simple, portable, and efficient.
1859 # So, we kill variables containing newlines.
1860 # Ultrix sh set writes to stderr and can't be redirected directly,
1861 # and sets the high bit in the cache file unless we assign to the vars.
1863 for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
1864 eval ac_val=\$$ac_var
1868 *_cv_*) AC_MSG_WARN([Cache variable $ac_var contains a newline.]) ;;
1871 _ | IFS | as_nl) ;; #(
1872 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1873 *) $as_unset $ac_var ;;
1879 case $as_nl`(ac_space=' '; set) 2>&1` in #(
1880 *${as_nl}ac_space=\ *)
1881 # `set' does not quote correctly, so add quotes (double-quote
1882 # substitution turns \\\\ into \\, and sed turns \\ into \).
1885 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1888 # `set' quotes correctly as required by POSIX, so do not add quotes.
1889 sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
1900 # Allow a site initialization script to override cache values.
1901 m4_define([AC_CACHE_SAVE],
1902 [cat >confcache <<\_ACEOF
1903 # This file is a shell script that caches the results of configure
1904 # tests run on this system so they can be shared between configure
1905 # scripts and configure runs, see configure's option --config-cache.
1906 # It is not useful on other systems. If it contains results you don't
1907 # want to keep, you may remove or edit it.
1909 # config.status only pays attention to the cache file if you give it
1910 # the --recheck option to rerun configure.
1912 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1913 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1923 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1925 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1927 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1928 if test -w "$cache_file"; then
1929 test "x$cache_file" != "x/dev/null" &&
1930 AC_MSG_NOTICE([updating cache $cache_file])
1931 cat confcache >$cache_file
1933 AC_MSG_NOTICE([not updating unwritable cache $cache_file])
1936 rm -f confcache[]dnl
1940 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1941 # ------------------------------------------
1942 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1943 # Should be dnl'ed. Try to catch common mistakes.
1944 m4_defun([AC_CACHE_VAL],
1945 [m4_bmatch([$2], [AC_DEFINE],
1946 [AC_DIAGNOSE([syntax],
1947 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1948 [where no actions should be taken])])dnl
1950 [_AS_ECHO_N([(cached) ])],
1954 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1955 # -------------------------------------------
1956 # Do not call this macro with a dnl right behind.
1957 m4_defun([AC_CACHE_CHECK],
1958 [AC_MSG_CHECKING([$1])
1959 AC_CACHE_VAL([$2], [$3])dnl
1961 [AC_MSG_RESULT([$$2])],
1962 [ac_res=AS_VAR_GET([$2])
1963 AC_MSG_RESULT([$ac_res])])dnl
1966 # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
1967 # [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
1968 # -------------------------------------------------------------
1969 AC_DEFUN([_AC_CACHE_CHECK_INT],
1970 [AC_CACHE_CHECK([$1], [$2],
1971 [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
1972 ])# _AC_CACHE_CHECK_INT
1976 ## ---------------------- ##
1977 ## Defining CPP symbols. ##
1978 ## ---------------------- ##
1981 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
1982 # -------------------------------------------
1983 # Used by --trace to collect the list of AC_DEFINEd macros.
1984 m4_define([AC_DEFINE_TRACE_LITERAL],
1985 [m4_pattern_allow([^$1$])dnl
1986 m4_bmatch([$1], ^m4_defn([m4_re_word])$, [],
1987 [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
1988 ])# AC_DEFINE_TRACE_LITERAL
1991 # AC_DEFINE_TRACE(CPP-SYMBOL)
1992 # ---------------------------
1993 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
1994 # out non literal symbols.
1995 m4_define([AC_DEFINE_TRACE],
1996 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL(m4_bpatsubst([[$1]], [(.*)]))])])
1999 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2000 # -------------------------------------------
2001 # Set VARIABLE to VALUE, verbatim, or 1. Remember the value
2002 # and if VARIABLE is affected the same VALUE, do nothing, else
2003 # die. The third argument is used by autoheader.
2004 m4_define([AC_DEFINE], [_AC_DEFINE_Q([\], $@)])
2007 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2008 # ----------------------------------------------------
2009 # Similar, but perform shell substitutions $ ` \ once on VALUE.
2010 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([], $@)])
2013 # _AC_DEFINE_Q(QUOTE, VARIABLE, [VALUE], [DESCRIPTION])
2014 # -----------------------------------------------------
2015 m4_define([_AC_DEFINE_Q],
2016 [AC_DEFINE_TRACE([$2])dnl
2017 m4_ifval([$4], [AH_TEMPLATE(m4_bpatsubst([[$2]], [(.*)]), [$4])])dnl
2018 cat >>confdefs.h <<$1_ACEOF
2019 [@%:@define] $2 m4_if($#, 2, 1, [$3])
2025 ## -------------------------- ##
2026 ## Setting output variables. ##
2027 ## -------------------------- ##
2030 # AC_SUBST_TRACE(VARIABLE)
2031 # ------------------------
2032 # This macro is used with --trace to collect the list of substituted variables.
2033 m4_define([AC_SUBST_TRACE])
2036 # AC_SUBST(VARIABLE, [VALUE])
2037 # ---------------------------
2038 # Create an output variable from a shell VARIABLE. If VALUE is given
2039 # assign it to VARIABLE. Use `""' is you want to set VARIABLE to an
2040 # empty value, not an empty second argument.
2042 m4_define([AC_SUBST],
2043 [AC_SUBST_TRACE([$1])dnl
2044 m4_pattern_allow([^$1$])dnl
2045 m4_ifvaln([$2], [$1=$2])[]dnl
2046 m4_append_uniq([_AC_SUBST_VARS], [$1], [
2051 # AC_SUBST_FILE(VARIABLE)
2052 # -----------------------
2053 # Read the comments of the preceding macro.
2054 m4_define([AC_SUBST_FILE],
2055 [m4_pattern_allow([^$1$])dnl
2056 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2061 ## --------------------------------------- ##
2062 ## Printing messages at autoconf runtime. ##
2063 ## --------------------------------------- ##
2065 # In fact, I think we should promote the use of m4_warn and m4_fatal
2066 # directly. This will also avoid to some people to get it wrong
2067 # between AC_FATAL and AC_MSG_ERROR.
2070 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2071 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2072 # --------------------------------
2073 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2074 m4_define([AC_FATAL], [m4_fatal($@)])
2077 # AC_WARNING(MESSAGE)
2078 # -------------------
2079 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2081 m4_define([AC_WARNING],
2082 [AC_DIAGNOSE([syntax], [$1])])
2087 ## ---------------------------------------- ##
2088 ## Printing messages at configure runtime. ##
2089 ## ---------------------------------------- ##
2092 # AC_MSG_CHECKING(FEATURE)
2093 # ------------------------
2094 m4_define([AC_MSG_CHECKING],
2095 [{ _AS_ECHO_LOG([checking $1])
2096 _AS_ECHO_N([checking $1... ]); }dnl
2100 # AC_MSG_RESULT(RESULT)
2101 # ---------------------
2102 m4_define([AC_MSG_RESULT],
2103 [{ _AS_ECHO_LOG([result: $1])
2104 _AS_ECHO([$1]); }dnl
2108 # AC_MSG_WARN(PROBLEM)
2109 # AC_MSG_NOTICE(STRING)
2110 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2111 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2112 # ----------------------------------------
2113 m4_copy([AS_WARN], [AC_MSG_WARN])
2114 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2115 m4_copy([AS_ERROR], [AC_MSG_ERROR])
2116 m4_define([AC_MSG_FAILURE],
2118 See `config.log' for more details.], [$2])])
2121 # _AC_MSG_LOG_CONFTEST
2122 # --------------------
2123 m4_define([_AC_MSG_LOG_CONFTEST],
2124 [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
2125 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2129 # AU::AC_CHECKING(FEATURE)
2130 # ------------------------
2131 AU_DEFUN([AC_CHECKING],
2132 [AS_MESSAGE([checking $1...])])
2135 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2136 # ----------------------------------
2137 # No escaping, so it performed also backtick substitution.
2138 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2139 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
2140 _AS_ECHO_UNQUOTED([$1])[]dnl
2144 # AU::AC_VERBOSE(STRING)
2145 # ----------------------
2146 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2153 ## ---------------------------- ##
2154 ## Compiler-running mechanics. ##
2155 ## ---------------------------- ##
2158 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2159 # ----------------------------------
2160 # Eval COMMAND, save the exit status in ac_status, and log it.
2161 AC_DEFUN([_AC_RUN_LOG],
2162 [{ ($2) >&AS_MESSAGE_LOG_FD
2163 ($1) 2>&AS_MESSAGE_LOG_FD
2165 _AS_ECHO_LOG([\$? = $ac_status])
2166 (exit $ac_status); }])
2169 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2170 # -----------------------------------------
2171 # Run COMMAND, save its stderr into conftest.err, save the exit status
2172 # in ac_status, and log it. Don't forget to clean up conftest.err after
2174 # Note that when tracing, most shells will leave the traces in stderr
2175 # starting with "+": that's what this macro tries to address.
2176 AC_DEFUN([_AC_RUN_LOG_STDERR],
2177 [{ ($2) >&AS_MESSAGE_LOG_FD
2180 grep -v '^ *+' conftest.er1 >conftest.err
2182 cat conftest.err >&AS_MESSAGE_LOG_FD
2183 _AS_ECHO_LOG([\$? = $ac_status])
2184 (exit $ac_status); }])
2186 # _AC_DO_ECHO(COMMAND)
2187 # --------------------
2188 # Echo COMMAND. This is designed to be used just before evaluating COMMAND.
2189 AC_DEFUN([_AC_DO_ECHO],
2190 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2192 dnl If the string contains '"', '`', or '\', then just echo it rather
2193 dnl than expanding it. This is a hack, but it is safer, while also
2194 dnl typically expanding simple substrings like '$CC', which is what we want.
2196 dnl Much of this macro body is quoted, to work around misuses like
2197 dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2198 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2199 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2200 dnl underquoting misuses, such as
2201 dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2202 dnl We normally wouldn't bother with this kind of workaround for invalid code
2203 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2204 dnl minimize the integration hassle.
2205 [case "(($ac_try" in
2206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2207 *) ac_try_echo=$ac_try;;
2209 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""]
2210 AS_ECHO(["$ac_try_echo"])])
2214 # Eval COMMAND, save the exit status in ac_status, and log it.
2215 # For internal use only.
2217 [_AC_RUN_LOG([eval "$1"],
2218 [_AC_DO_ECHO([$1])])])
2221 # _AC_DO_STDERR(COMMAND)
2222 # ----------------------
2223 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2224 AC_DEFUN([_AC_DO_STDERR],
2225 [_AC_RUN_LOG_STDERR([eval "$1"],
2226 [_AC_DO_ECHO([$1])])])
2229 # _AC_DO_VAR(VARIABLE)
2230 # --------------------
2231 # Evaluate "$VARIABLE", which should be a valid shell command.
2232 # The purpose of this macro is to write "configure:123: command line"
2233 # into config.log for every test run.
2234 AC_DEFUN([_AC_DO_VAR],
2238 # _AC_DO_TOKENS(COMMAND)
2239 # ----------------------
2240 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2241 # tokens of the shell command language.
2242 AC_DEFUN([_AC_DO_TOKENS],
2244 _AC_DO([$ac_try]); }])
2249 # Eval COMMAND, save the exit status in ac_status, and log it.
2250 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2251 # It is present only for backward compatibility with previous Autoconf versions.
2252 AC_DEFUN([_AC_EVAL],
2253 [_AC_RUN_LOG([eval $1],
2254 [eval echo "$as_me:$LINENO: \"$1\""])])
2257 # _AC_EVAL_STDERR(COMMAND)
2258 # ------------------------
2259 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2260 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2261 # It is present only for backward compatibility with previous Autoconf versions.
2262 AC_DEFUN([_AC_EVAL_STDERR],
2263 [_AC_RUN_LOG_STDERR([eval $1],
2264 [eval echo "$as_me:$LINENO: \"$1\""])])
2267 # AC_TRY_EVAL(VARIABLE)
2268 # ---------------------
2269 # Evaluate $VARIABLE, which should be a valid shell command.
2270 # The purpose of this macro is to write "configure:123: command line"
2271 # into config.log for every test run.
2273 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2274 # undocumented, and should not be used.
2275 # They may be removed or their API changed in a future release.
2276 # Autoconf itself no longer uses these two macros; they are present
2277 # only for backward compatibility with previous versions of Autoconf.
2278 # Not every shell command will work due to problems with eval
2279 # and quoting, and the rules for exactly what does work are tricky.
2280 # Worse, due to double-expansion during evaluation, arbitrary unintended
2281 # shell commands could be executed in some situations.
2282 AC_DEFUN([AC_TRY_EVAL],
2286 # AC_TRY_COMMAND(COMMAND)
2287 # -----------------------
2288 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2289 # tokens of the shell command language.
2290 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2291 AC_DEFUN([AC_TRY_COMMAND],
2293 _AC_EVAL([$ac_try]); }])
2296 # AC_RUN_LOG(COMMAND)
2297 # -------------------
2298 AC_DEFUN([AC_RUN_LOG],
2300 [AS_ECHO(["$as_me:$LINENO: AS_ESCAPE([$1])"])])])
2305 ## ------------------------ ##
2306 ## Examining declarations. ##
2307 ## ------------------------ ##
2311 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2312 # ----------------------------------------------------------------
2313 # Try to preprocess PROGRAM.
2315 # This macro can be used during the selection of a preprocessor.
2316 # eval is necessary to expand ac_cpp.
2317 AC_DEFUN([_AC_PREPROC_IFELSE],
2318 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2319 AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && {
2320 test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2321 test ! -s conftest.err
2324 [_AC_MSG_LOG_CONFTEST
2326 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2327 ])# _AC_PREPROC_IFELSE
2330 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2331 # ---------------------------------------------------------------
2332 # Try to preprocess PROGRAM. Requires that the preprocessor for the
2333 # current language was checked for, hence do not use this macro in macros
2334 # looking for a preprocessor.
2335 AC_DEFUN([AC_PREPROC_IFELSE],
2336 [AC_LANG_PREPROC_REQUIRE()dnl
2337 _AC_PREPROC_IFELSE($@)])
2340 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2341 # ---------------------------------------------------------
2342 # AC_TRY_CPP is used to check whether particular header files exist.
2343 # (But it actually tests whether INCLUDES produces no CPP errors.)
2345 # INCLUDES are not defaulted and are double quoted.
2346 AU_DEFUN([AC_TRY_CPP],
2347 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2350 # AC_EGREP_CPP(PATTERN, PROGRAM,
2351 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2352 # ------------------------------------------------------
2353 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2354 # come early, it is not included in AC_BEFORE checks.
2355 AC_DEFUN([AC_EGREP_CPP],
2356 [AC_LANG_PREPROC_REQUIRE()dnl
2357 AC_REQUIRE([AC_PROG_EGREP])dnl
2358 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2359 AS_IF([dnl eval is necessary to expand ac_cpp.
2360 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2361 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2362 dnl Quote $1 to prevent m4 from eating character classes
2363 $EGREP "[$1]" >/dev/null 2>&1],
2370 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2371 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2372 # ---------------------------------------------------------
2373 AC_DEFUN([AC_EGREP_HEADER],
2381 ## ------------------ ##
2382 ## Examining syntax. ##
2383 ## ------------------ ##
2386 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2387 # ----------------------------------------------------------------
2388 # Try to compile PROGRAM.
2389 # This macro can be used during the selection of a compiler.
2390 m4_define([_AC_COMPILE_IFELSE],
2391 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2392 rm -f conftest.$ac_objext
2393 AS_IF([_AC_DO_STDERR($ac_compile) && {
2394 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2395 test ! -s conftest.err
2396 } && test -s conftest.$ac_objext],
2398 [_AC_MSG_LOG_CONFTEST
2400 rm -f core conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2401 ])# _AC_COMPILE_IFELSE
2404 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2405 # ---------------------------------------------------------------
2406 # Try to compile PROGRAM. Requires that the compiler for the current
2407 # language was checked for, hence do not use this macro in macros looking
2409 AC_DEFUN([AC_COMPILE_IFELSE],
2410 [AC_LANG_COMPILER_REQUIRE()dnl
2411 _AC_COMPILE_IFELSE($@)])
2414 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2415 # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2416 # ---------------------------------------------------
2417 AU_DEFUN([AC_TRY_COMPILE],
2418 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2422 ## --------------------- ##
2423 ## Examining libraries. ##
2424 ## --------------------- ##
2427 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2428 # -------------------------------------------------------------
2429 # Try to link PROGRAM.
2430 # This macro can be used during the selection of a compiler.
2431 m4_define([_AC_LINK_IFELSE],
2432 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2433 rm -f conftest.$ac_objext conftest$ac_exeext
2434 AS_IF([_AC_DO_STDERR($ac_link) && {
2435 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2436 test ! -s conftest.err
2437 } && test -s conftest$ac_exeext &&
2438 AS_TEST_X([conftest$ac_exeext])],
2440 [_AC_MSG_LOG_CONFTEST
2442 dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization)
2443 dnl information created by the PGI compiler (conftest_ipa8_conftest.oo),
2444 dnl as it would interfere with the next link command.
2445 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
2446 conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2450 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2451 # ------------------------------------------------------------
2452 # Try to link PROGRAM. Requires that the compiler for the current
2453 # language was checked for, hence do not use this macro in macros looking
2455 AC_DEFUN([AC_LINK_IFELSE],
2456 [AC_LANG_COMPILER_REQUIRE()dnl
2457 _AC_LINK_IFELSE($@)])
2460 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2461 # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2462 # ------------------------------------------------
2463 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2464 AU_DEFUN([AC_TRY_LINK],
2465 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2468 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2469 # ACTION-IF-TRUE, [ACTION-IF-FALSE])
2470 # ---------------------------------------------------
2471 AU_DEFUN([AC_COMPILE_CHECK],
2472 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2473 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2478 ## ------------------------------- ##
2479 ## Checking for runtime features. ##
2480 ## ------------------------------- ##
2483 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2484 # ------------------------------------------------------------
2485 # Compile, link, and run.
2486 # This macro can be used during the selection of a compiler.
2487 # We also remove conftest.o as if the compilation fails, some compilers
2488 # don't remove it. We remove gmon.out and bb.out, which may be
2489 # created during the run if the program is built with profiling support.
2490 m4_define([_AC_RUN_IFELSE],
2491 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2492 rm -f conftest$ac_exeext
2493 AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2495 [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
2496 _AC_MSG_LOG_CONFTEST
2498 [( exit $ac_status )
2500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2501 [conftest.$ac_ext])[]dnl
2505 # AC_RUN_IFELSE(PROGRAM,
2506 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2507 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2508 # ----------------------------------------------------------
2509 # Compile, link, and run. Requires that the compiler for the current
2510 # language was checked for, hence do not use this macro in macros looking
2512 AC_DEFUN([AC_RUN_IFELSE],
2513 [AC_LANG_COMPILER_REQUIRE()dnl
2515 [AC_DIAGNOSE([cross],
2516 [$0 called without default to allow cross compiling])])dnl
2517 AS_IF([test "$cross_compiling" = yes],
2519 [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2520 [_AC_RUN_IFELSE($@)])
2524 # AC_TRY_RUN(PROGRAM,
2525 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2526 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2527 # --------------------------------------------------------
2528 AU_DEFUN([AC_TRY_RUN],
2529 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2533 ## ------------------------------------- ##
2534 ## Checking for the existence of files. ##
2535 ## ------------------------------------- ##
2537 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2538 # -------------------------------------------------------------
2540 # Check for the existence of FILE.
2541 AC_DEFUN([AC_CHECK_FILE],
2542 [AC_DIAGNOSE([cross],
2543 [cannot check for file existence when cross compiling])dnl
2544 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2545 AC_CACHE_CHECK([for $1], [ac_File],
2546 [test "$cross_compiling" = yes &&
2547 AC_MSG_ERROR([cannot check for file existence when cross compiling])
2548 if test -r "$1"; then
2549 AS_VAR_SET([ac_File], [yes])
2551 AS_VAR_SET([ac_File], [no])
2553 AS_IF([test AS_VAR_GET([ac_File]) = yes], [$2], [$3])[]dnl
2554 AS_VAR_POPDEF([ac_File])dnl
2558 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2559 # -----------------------------------------------------------------
2560 AC_DEFUN([AC_CHECK_FILES],
2561 [m4_foreach_w([AC_FILE_NAME], [$1],
2562 [AC_CHECK_FILE(AC_FILE_NAME,
2563 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2564 [Define to 1 if you have the
2570 ## ------------------------------- ##
2571 ## Checking for declared symbols. ##
2572 ## ------------------------------- ##
2575 # AC_CHECK_DECL(SYMBOL,
2576 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2577 # [INCLUDES = DEFAULT-INCLUDES])
2578 # -------------------------------------------------------
2579 # Check whether SYMBOL (a function, variable, or constant) is declared.
2580 AC_DEFUN([AC_CHECK_DECL],
2581 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2582 AC_CACHE_CHECK([whether $1 is declared], [ac_Symbol],
2583 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2588 [AS_VAR_SET([ac_Symbol], [yes])],
2589 [AS_VAR_SET([ac_Symbol], [no])])])
2590 AS_IF([test AS_VAR_GET([ac_Symbol]) = yes], [$2], [$3])[]dnl
2591 AS_VAR_POPDEF([ac_Symbol])dnl
2595 # AC_CHECK_DECLS(SYMBOLS,
2596 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2597 # [INCLUDES = DEFAULT-INCLUDES])
2598 # --------------------------------------------------------
2599 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
2600 # documentation for a detailed explanation of this difference with
2601 # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
2602 AC_DEFUN([AC_CHECK_DECLS],
2603 [m4_foreach([AC_Symbol], [$1],
2604 [AC_CHECK_DECL(AC_Symbol,
2605 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2606 [Define to 1 if you have the declaration
2607 of `]AC_Symbol[', and to 0 if you don't.])
2609 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2615 # AC_CHECK_DECLS_ONCE(SYMBOLS)
2616 # ----------------------------
2617 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
2618 AC_DEFUN([AC_CHECK_DECLS_ONCE],
2620 m4_foreach([AC_Symbol], [$1],
2621 [AC_DEFUN([_AC_Check_Decl_]m4_defn([AC_Symbol]),
2622 [AC_CHECK_DECLS(m4_defn([AC_Symbol]))])
2623 AC_REQUIRE([_AC_Check_Decl_]m4_defn([AC_Symbol]))])
2628 ## ---------------------------------- ##
2629 ## Replacement of library functions. ##
2630 ## ---------------------------------- ##
2633 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2634 # -----------------------------
2635 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2636 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2637 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
2640 # AC_LIBSOURCE(FILE-NAME)
2641 # -----------------------
2642 # Announce we might need the file `FILE-NAME'.
2643 m4_define([AC_LIBSOURCE], [])
2646 # AC_LIBSOURCES([FILE-NAME1, ...])
2647 # -------------------------------
2648 # Announce we might need these files.
2649 m4_define([AC_LIBSOURCES],
2650 [m4_foreach([_AC_FILE_NAME], [$1],
2651 [AC_LIBSOURCE(_AC_FILE_NAME)])])
2654 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
2655 # --------------------------------------------
2656 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2657 m4_define([_AC_LIBOBJ],
2658 [AS_LITERAL_IF([$1],
2659 [AC_LIBSOURCE([$1.c])],
2661 case " $LIB@&t@OBJS " in
2662 *" $1.$ac_objext "* ) ;;
2663 *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
2668 # AC_LIBOBJ(FILE-NAME-NOEXT)
2669 # -------------------------
2670 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2671 m4_define([AC_LIBOBJ],
2673 [AC_DIAGNOSE(syntax,
2674 [$0($1): you should use literals])])dnl
2678 # _AC_LIBOBJS_NORMALIZE
2679 # ---------------------
2680 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
2681 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2682 # Used with AC_CONFIG_COMMANDS_PRE.
2683 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2686 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2687 # 1. Remove the extension, and $U if already installed.
2688 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2689 ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
2690 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
2691 # will be set to the directory where LIBOBJS objects are built.
2692 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
2693 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
2695 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2696 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2700 ## ----------------------------------- ##
2701 ## Checking compiler characteristics. ##
2702 ## ----------------------------------- ##
2705 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2706 # -------------------------------------------------------------------
2707 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2708 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2709 m4_define([_AC_COMPUTE_INT_COMPILE],
2710 [# Depending upon the size, compute the lo and hi bounds.
2711 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2714 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2715 [ac_hi=$ac_mid; break],
2716 [ac_lo=`expr $ac_mid + 1`
2717 if test $ac_lo -le $ac_mid; then
2721 ac_mid=`expr 2 '*' $ac_mid + 1`])
2723 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2726 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2727 [ac_lo=$ac_mid; break],
2728 [ac_hi=`expr '(' $ac_mid ')' - 1`
2729 if test $ac_mid -le $ac_hi; then
2733 ac_mid=`expr 2 '*' $ac_mid`])
2736 # Binary search between lo and hi bounds.
2737 while test "x$ac_lo" != "x$ac_hi"; do
2738 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2739 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2740 [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2746 ])# _AC_COMPUTE_INT_COMPILE
2749 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2750 # ---------------------------------------------------------------
2751 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2752 m4_define([_AC_COMPUTE_INT_RUN],
2753 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2754 [$2=`cat conftest.val`], [$4])])
2757 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
2758 # ----------------------------------------------------------
2759 AC_DEFUN([AC_COMPUTE_INT],
2760 [AC_LANG_COMPILER_REQUIRE()dnl
2761 if test "$cross_compiling" = yes; then
2762 _AC_COMPUTE_INT_COMPILE([$2], [$1], [$3], [$4])
2764 _AC_COMPUTE_INT_RUN([$2], [$1], [$3], [$4])
2766 rm -f conftest.val[]dnl
2769 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2770 # -----------------------------------------------------------
2771 # FIXME: this private interface was used by several packages.
2772 # Give them time to transition to AC_COMPUTE_INT and then delete this one.
2773 AC_DEFUN([_AC_COMPUTE_INT],
2774 [AC_COMPUTE_INT([$2], [$1], [$3], [$4])
2775 AC_DIAGNOSE([obsolete],
2776 [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
2777 future version or Autoconf. Hence, it is suggested that you use
2778 instead the public AC_COMPUTE_INT macro. Note that the arguments are
2779 slightly different between the two.])dnl