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, 2007 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 3 of the License, or
9 # (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
19 # As a special exception, the Free Software Foundation gives unlimited
20 # permission to copy, distribute and modify the configure scripts that
21 # are the output of Autoconf. You need not follow the terms of the GNU
22 # General Public License when using or distributing such scripts, even
23 # though portions of the text of Autoconf appear in them. The GNU
24 # General Public License (GPL) does govern all other use of the material
25 # that constitutes the Autoconf program.
27 # Certain portions of the Autoconf source text are designed to be copied
28 # (in certain cases, depending on the input) into the output of
29 # Autoconf. We call these the "data" portions. The rest of the Autoconf
30 # source text consists of comments plus executable code that decides which
31 # of the data portions to output in any given case. We call these
32 # comments and executable code the "non-data" portions. Autoconf never
33 # copies any of the non-data portions into its output.
35 # This special exception to the GPL applies to versions of Autoconf
36 # released by the Free Software Foundation. When you make and
37 # distribute a modified version of Autoconf, you may extend this special
38 # exception to the GPL to apply to your modified version as well, *unless*
39 # your modified version has the potential to copy into its output some
40 # of the text that was the non-data portion of the version that you started
41 # with. (In other words, unless your change moves or copies text from
42 # the non-data portions to the data portions.) If your modification has
43 # such potential, you must delete any notice of this special exception
44 # to the GPL from your modified version.
46 # Written by David MacKenzie, with help from
47 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
48 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
51 ## ---------------- ##
53 ## ---------------- ##
56 # We heavily use m4's diversions both for the initializations and for
57 # required macros (see AC_REQUIRE), because in both cases we have to
58 # issue high in `configure' something which is discovered late.
60 # KILL is only used to suppress output.
62 # The layers of `configure'. We let m4 undivert them by itself, when
63 # it reaches the end of `configure.ac'.
70 # Purpose of the script.
74 # Initialization of bottom layers.
77 # early initializations (defaults)
79 # initialization code, option handling loop.
82 # Handling `configure --help'.
84 # Help msg for AC_CANONICAL_*
86 # Help msg from AC_ARG_ENABLE.
88 # Help msg from AC_ARG_WITH.
90 # Help msg from AC_ARG_VAR.
92 # A small paragraph on the use of the variables.
94 # Tail of the handling of --help.
97 # Head of the handling of --version.
99 # FSF copyright notice for --version.
101 # User copyright notice for --version.
103 # Tail of the handling of --version.
106 # Tail of initialization code.
109 # the tests and output code
113 # _m4_divert(DIVERSION-NAME)
114 # --------------------------
115 # Convert a diversion name into its number. Otherwise, return
116 # DIVERSION-NAME which is supposed to be an actual diversion number.
117 # Of course it would be nicer to use m4_case here, instead of zillions
118 # of little macros, but it then takes twice longer to run `autoconf'!
128 # 3. HEADER-COPYRIGHT
131 m4_define([_m4_divert(DEFAULTS)], 10)
132 m4_define([_m4_divert(PARSE_ARGS)], 20)
134 m4_define([_m4_divert(HELP_BEGIN)], 100)
135 m4_define([_m4_divert(HELP_CANON)], 101)
136 m4_define([_m4_divert(HELP_ENABLE)], 102)
137 m4_define([_m4_divert(HELP_WITH)], 103)
138 m4_define([_m4_divert(HELP_VAR)], 104)
139 m4_define([_m4_divert(HELP_VAR_END)], 105)
140 m4_define([_m4_divert(HELP_END)], 106)
142 m4_define([_m4_divert(VERSION_BEGIN)], 200)
143 m4_define([_m4_divert(VERSION_FSF)], 201)
144 m4_define([_m4_divert(VERSION_USER)], 202)
145 m4_define([_m4_divert(VERSION_END)], 203)
147 m4_define([_m4_divert(INIT_PREPARE)], 300)
151 # AC_DIVERT_PUSH(DIVERSION-NAME)
153 # ------------------------------
154 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
155 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
159 ## ------------------------------------ ##
160 ## Defining/requiring Autoconf macros. ##
161 ## ------------------------------------ ##
164 # AC_DEFUN(NAME, EXPANSION)
165 # AC_DEFUN_ONCE(NAME, EXPANSION)
166 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
168 # AC_PROVIDE(MACRO-NAME)
169 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
170 # -----------------------------------------------------------
171 m4_copy([m4_defun], [AC_DEFUN])
172 m4_copy([m4_defun_once], [AC_DEFUN_ONCE])
173 m4_copy([m4_before], [AC_BEFORE])
174 m4_copy([m4_require], [AC_REQUIRE])
175 m4_copy([m4_provide], [AC_PROVIDE])
176 m4_copy([m4_provide_if], [AC_PROVIDE_IFELSE])
179 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
180 # ------------------------------------------
181 m4_define([AC_OBSOLETE],
182 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
186 ## ----------------------------- ##
187 ## Implementing Autoconf loops. ##
188 ## ----------------------------- ##
191 # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION)
192 # ------------------------------------------
193 AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]])
194 AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl
195 AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete.
196 You should run autoupdate.])])
200 ## ----------------------------------- ##
201 ## Helping macros to display strings. ##
202 ## ----------------------------------- ##
205 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
206 # --------------------------------------
207 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
211 ## ---------------------------------------------- ##
212 ## Information on the package being Autoconf'ed. ##
213 ## ---------------------------------------------- ##
216 # It is suggested that the macros in this section appear before
217 # AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
218 # and from the implementation point of view, AC_INIT *must* be expanded
219 # beforehand: it puts data in diversions which must appear before the
220 # data provided by the macros of this section.
222 # The solution is to require AC_INIT in each of these macros. AC_INIT
223 # has the needed magic so that it can't be expanded twice.
227 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
228 # --------------------------------------------------------------
229 m4_define([_AC_INIT_PACKAGE],
230 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
231 AS_LITERAL_IF([$2], [], [m4_warn([syntax], [AC_INIT: not a literal: $2])])
232 AS_LITERAL_IF([$3], [], [m4_warn([syntax], [AC_INIT: not a literal: $3])])
233 m4_ifndef([AC_PACKAGE_NAME],
234 [m4_define([AC_PACKAGE_NAME], [$1])])
235 m4_ifndef([AC_PACKAGE_TARNAME],
236 [m4_define([AC_PACKAGE_TARNAME],
238 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
240 [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
242 m4_ifndef([AC_PACKAGE_VERSION],
243 [m4_define([AC_PACKAGE_VERSION], [$2])])
244 m4_ifndef([AC_PACKAGE_STRING],
245 [m4_define([AC_PACKAGE_STRING], [$1 $2])])
246 m4_ifndef([AC_PACKAGE_BUGREPORT],
247 [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
251 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
252 # ------------------------------------------------------
253 # Emit TEXT, a copyright notice, in the top of `configure' and in
254 # --version output. Macros in TEXT are evaluated once.
255 m4_define([AC_COPYRIGHT],
256 [AS_COPYRIGHT([$1])[]dnl
257 m4_divert_text(m4_default([$2], [VERSION_USER]),
263 # AC_REVISION(REVISION-INFO)
264 # --------------------------
265 # The second quote in the translit is just to cope with font-lock-mode
266 # which sees the opening of a string.
267 m4_define([AC_REVISION],
268 [m4_divert_text([HEADER-REVISION],
269 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
275 ## ---------------------------------------- ##
276 ## Requirements over the Autoconf version. ##
277 ## ---------------------------------------- ##
280 # AU::AC_PREREQ(VERSION)
281 # ----------------------
282 # Update this `AC_PREREQ' statement to require the current version of
283 # Autoconf. But fail if ever this autoupdate is too old.
285 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
286 # calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be
287 # quite complex for autoupdate to import the value of
288 # `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
289 # this would replace all its occurrences with the current version of
290 # Autoconf, which is certainly not what the user intended.
291 AU_DEFUN([AC_PREREQ],
292 [m4_version_prereq([$1])[]dnl
293 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
298 # Complain and exit if the Autoconf version is less than VERSION.
299 m4_copy([m4_version_prereq], [AC_PREREQ])
302 # AC_AUTOCONF_VERSION
303 # -------------------
304 # The current version of Autoconf parsing this file.
305 m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])
311 ## ---------------- ##
312 ## Initialization. ##
313 ## ---------------- ##
316 # All the following macros are used by AC_INIT. Ideally, they should
317 # be presented in the order in which they are output. Please, help us
318 # sorting it, or at least, don't augment the entropy.
323 # Provide useful headers; override the HEADER-COMMENT created by M4sh.
324 m4_define([_AC_INIT_NOTICE],
325 [m4_divert_text([KILL], [m4_undivert([HEADER-COMMENT])])dnl
326 m4_divert_text([HEADER-COMMENT],
327 [@%:@ Guess values for system-dependent variables and create Makefiles.
328 @%:@ Generated by m4_PACKAGE_STRING[]dnl
329 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
331 m4_ifset([AC_PACKAGE_BUGREPORT],
332 [m4_divert_text([HEADER-COMMENT],
334 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
340 # We dump to VERSION_FSF to make sure we are inserted before the
341 # user copyrights, and after the setup of the --version handling.
342 m4_define([_AC_INIT_COPYRIGHT],
344 [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
345 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
346 This configure script is free software; the Free Software Foundation
347 gives unlimited permission to copy, distribute and modify it.],
354 # Set up the file descriptors used by `configure'.
355 # File descriptor usage:
356 # 0 standard input (/dev/null)
358 # 2 errors and warnings
359 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
360 # AS_MESSAGE_FD checking for... messages and results
361 # AS_ORIGINAL_STDIN_FD original standard input (still open)
363 # stdin is /dev/null because checks that run programs may
364 # inadvertently run interactive ones, which would stop configuration
365 # until someone typed an EOF.
366 m4_define([AS_MESSAGE_FD], 6)
367 m4_define([AS_ORIGINAL_STDIN_FD], 7)
368 # That's how they used to be named.
369 AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
370 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
375 # Values which defaults can be set from `configure.ac'.
376 # `/bin/machine' is used in `glibcbug'. The others are used in config.*
377 m4_define([_AC_INIT_DEFAULTS],
378 [m4_divert_push([DEFAULTS])dnl
380 exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1
383 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
384 # so uname gets run too.
385 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
390 ac_default_prefix=/usr/local
392 ac_config_libobj_dir=.
398 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
399 AC_SUBST([PATH_SEPARATOR])dnl
401 # Identity of this package.
402 AC_SUBST([PACKAGE_NAME],
403 [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
404 AC_SUBST([PACKAGE_TARNAME],
405 [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
406 AC_SUBST([PACKAGE_VERSION],
407 [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
408 AC_SUBST([PACKAGE_STRING],
409 [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
410 AC_SUBST([PACKAGE_BUGREPORT],
411 [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
413 m4_divert_pop([DEFAULTS])dnl
414 m4_wrap([m4_divert_text([DEFAULTS],
415 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS])])'
416 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
418 enable_option_checking
419 m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
421 m4_ifdef([_AC_PRECIOUS_VARS],
422 [_AC_ARG_VAR_STORE[]dnl
423 _AC_ARG_VAR_VALIDATE[]dnl
424 ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
425 m4_ifdef([_AC_LIST_SUBDIRS],
426 [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
428 ])# _AC_INIT_DEFAULTS
431 # AC_PREFIX_DEFAULT(PREFIX)
432 # -------------------------
433 AC_DEFUN([AC_PREFIX_DEFAULT],
434 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
437 # AC_PREFIX_PROGRAM(PROGRAM)
438 # --------------------------
439 # Guess the value for the `prefix' variable by looking for
440 # the argument program along PATH and taking its parent.
441 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
442 # set `prefix' to /usr/local/gnu.
443 # This comes too late to find a site file based on the prefix,
444 # and it might use a cached value for the path.
445 # No big loss, I think, since most configures don't use this macro anyway.
446 AC_DEFUN([AC_PREFIX_PROGRAM],
447 [if test "x$prefix" = xNONE; then
448 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
449 _AS_ECHO_N([checking for prefix by ])
450 AC_PATH_PROG(ac_prefix_program, [$1])
451 if test -n "$ac_prefix_program"; then
452 prefix=`AS_DIRNAME(["$ac_prefix_program"])`
453 prefix=`AS_DIRNAME(["$prefix"])`
456 ])# AC_PREFIX_PROGRAM
459 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
460 # ---------------------------------------------
461 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
462 # relative to the directory that configure is in, which we can look
463 # for to find out if srcdir is correct.
464 AC_DEFUN([AC_CONFIG_SRCDIR],
465 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
470 # Set ac_pwd, and sanity-check it and the source and installation directories.
472 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
474 AC_DEFUN([_AC_INIT_DIRCHECK],
475 [m4_divert_push([PARSE_ARGS])dnl
477 ac_pwd=`pwd` && test -n "$ac_pwd" &&
478 ac_ls_di=`ls -di .` &&
479 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
480 AC_MSG_ERROR([Working directory cannot be determined])
481 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
482 AC_MSG_ERROR([pwd does not report name of working directory])
484 m4_divert_pop([PARSE_ARGS])dnl
485 ])# _AC_INIT_DIRCHECK
489 # Compute `srcdir' based on `$ac_unique_file'.
491 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
493 AC_DEFUN([_AC_INIT_SRCDIR],
494 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
495 m4_divert_push([PARSE_ARGS])dnl
497 # Find the source files, if location was not specified.
498 if test -z "$srcdir"; then
499 ac_srcdir_defaulted=yes
500 # Try the directory containing this script, then the parent directory.
501 ac_confdir=`AS_DIRNAME(["$[0]"])`
503 if test ! -r "$srcdir/$ac_unique_file"; then
507 ac_srcdir_defaulted=no
509 if test ! -r "$srcdir/$ac_unique_file"; then
510 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
511 AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
513 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
515 cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
517 # When building in place, set srcdir=.
518 if test "$ac_abs_confdir" = "$ac_pwd"; then
521 # Remove unnecessary trailing slashes from srcdir.
522 # Double slashes in file names in object file debugging info
523 # mess up M-x gdb in Emacs.
525 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
527 m4_divert_pop([PARSE_ARGS])dnl
531 # _AC_INIT_PARSE_ARGS
532 # -------------------
533 m4_define([_AC_INIT_PARSE_ARGS],
534 [m4_divert_push([PARSE_ARGS])dnl
536 # Initialize some variables set by options.
538 ac_init_version=false
539 ac_unrecognized_opts=
541 # The variables have the same names as the options, with
542 # dashes changed to underlines.
544 AC_SUBST(exec_prefix, NONE)dnl
547 AC_SUBST(prefix, NONE)dnl
550 AC_SUBST(program_transform_name, [s,x,x,])dnl
558 # Installation directory options.
559 # These are left unexpanded so users can "make install exec_prefix=/foo"
560 # and all the variables that are supposed to be based on exec_prefix
561 # by default will actually change.
562 # Use braces instead of parens because sh, perl, etc. also accept them.
563 # (The list follows the same order as the GNU Coding Standards.)
564 AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
565 AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
566 AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
567 AC_SUBST([datarootdir], ['${prefix}/share'])dnl
568 AC_SUBST([datadir], ['${datarootdir}'])dnl
569 AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
570 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
571 AC_SUBST([localstatedir], ['${prefix}/var'])dnl
572 AC_SUBST([includedir], ['${prefix}/include'])dnl
573 AC_SUBST([oldincludedir], ['/usr/include'])dnl
574 AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
575 ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
576 ['${datarootdir}/doc/${PACKAGE}'])])dnl
577 AC_SUBST([infodir], ['${datarootdir}/info'])dnl
578 AC_SUBST([htmldir], ['${docdir}'])dnl
579 AC_SUBST([dvidir], ['${docdir}'])dnl
580 AC_SUBST([pdfdir], ['${docdir}'])dnl
581 AC_SUBST([psdir], ['${docdir}'])dnl
582 AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
583 AC_SUBST([localedir], ['${datarootdir}/locale'])dnl
584 AC_SUBST([mandir], ['${datarootdir}/man'])dnl
590 # If the previous option needs an argument, assign it.
591 if test -n "$ac_prev"; then
592 eval $ac_prev=\$ac_option
598 *=*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
602 # Accept the important Cygnus configure options, so we can diagnose typos.
604 case $ac_dashdash$ac_option in
608 -bindir | --bindir | --bindi | --bind | --bin | --bi)
610 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
613 -build | --build | --buil | --bui | --bu)
614 ac_prev=build_alias ;;
615 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
616 build_alias=$ac_optarg ;;
618 -cache-file | --cache-file | --cache-fil | --cache-fi \
619 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
620 ac_prev=cache_file ;;
621 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
622 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
623 cache_file=$ac_optarg ;;
626 cache_file=config.cache ;;
628 -datadir | --datadir | --datadi | --datad)
630 -datadir=* | --datadir=* | --datadi=* | --datad=*)
631 datadir=$ac_optarg ;;
633 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
634 | --dataroo | --dataro | --datar)
635 ac_prev=datarootdir ;;
636 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
637 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
638 datarootdir=$ac_optarg ;;
640 _AC_INIT_PARSE_ENABLE([disable])
642 -docdir | --docdir | --docdi | --doc | --do)
644 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
647 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
649 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
652 _AC_INIT_PARSE_ENABLE([enable])
654 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
655 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
656 | --exec | --exe | --ex)
657 ac_prev=exec_prefix ;;
658 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
659 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
660 | --exec=* | --exe=* | --ex=*)
661 exec_prefix=$ac_optarg ;;
663 -gas | --gas | --ga | --g)
664 # Obsolete; use --with-gas.
667 -help | --help | --hel | --he | -h)
669 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
670 ac_init_help=recursive ;;
671 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
672 ac_init_help=short ;;
674 -host | --host | --hos | --ho)
675 ac_prev=host_alias ;;
676 -host=* | --host=* | --hos=* | --ho=*)
677 host_alias=$ac_optarg ;;
679 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
681 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
683 htmldir=$ac_optarg ;;
685 -includedir | --includedir | --includedi | --included | --include \
686 | --includ | --inclu | --incl | --inc)
687 ac_prev=includedir ;;
688 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
689 | --includ=* | --inclu=* | --incl=* | --inc=*)
690 includedir=$ac_optarg ;;
692 -infodir | --infodir | --infodi | --infod | --info | --inf)
694 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
695 infodir=$ac_optarg ;;
697 -libdir | --libdir | --libdi | --libd)
699 -libdir=* | --libdir=* | --libdi=* | --libd=*)
702 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
703 | --libexe | --libex | --libe)
704 ac_prev=libexecdir ;;
705 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
706 | --libexe=* | --libex=* | --libe=*)
707 libexecdir=$ac_optarg ;;
709 -localedir | --localedir | --localedi | --localed | --locale)
711 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
712 localedir=$ac_optarg ;;
714 -localstatedir | --localstatedir | --localstatedi | --localstated \
715 | --localstate | --localstat | --localsta | --localst | --locals)
716 ac_prev=localstatedir ;;
717 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
718 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
719 localstatedir=$ac_optarg ;;
721 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
723 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
727 # Obsolete; use --without-fp.
730 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
731 | --no-cr | --no-c | -n)
734 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
735 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
738 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
739 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
740 | --oldin | --oldi | --old | --ol | --o)
741 ac_prev=oldincludedir ;;
742 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
743 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
744 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
745 oldincludedir=$ac_optarg ;;
747 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
749 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
752 -program-prefix | --program-prefix | --program-prefi | --program-pref \
753 | --program-pre | --program-pr | --program-p)
754 ac_prev=program_prefix ;;
755 -program-prefix=* | --program-prefix=* | --program-prefi=* \
756 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
757 program_prefix=$ac_optarg ;;
759 -program-suffix | --program-suffix | --program-suffi | --program-suff \
760 | --program-suf | --program-su | --program-s)
761 ac_prev=program_suffix ;;
762 -program-suffix=* | --program-suffix=* | --program-suffi=* \
763 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
764 program_suffix=$ac_optarg ;;
766 -program-transform-name | --program-transform-name \
767 | --program-transform-nam | --program-transform-na \
768 | --program-transform-n | --program-transform- \
769 | --program-transform | --program-transfor \
770 | --program-transfo | --program-transf \
771 | --program-trans | --program-tran \
772 | --progr-tra | --program-tr | --program-t)
773 ac_prev=program_transform_name ;;
774 -program-transform-name=* | --program-transform-name=* \
775 | --program-transform-nam=* | --program-transform-na=* \
776 | --program-transform-n=* | --program-transform-=* \
777 | --program-transform=* | --program-transfor=* \
778 | --program-transfo=* | --program-transf=* \
779 | --program-trans=* | --program-tran=* \
780 | --progr-tra=* | --program-tr=* | --program-t=*)
781 program_transform_name=$ac_optarg ;;
783 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
785 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
788 -psdir | --psdir | --psdi | --psd | --ps)
790 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
793 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
794 | -silent | --silent | --silen | --sile | --sil)
797 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
799 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
801 sbindir=$ac_optarg ;;
803 -sharedstatedir | --sharedstatedir | --sharedstatedi \
804 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
805 | --sharedst | --shareds | --shared | --share | --shar \
807 ac_prev=sharedstatedir ;;
808 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
809 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
810 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
812 sharedstatedir=$ac_optarg ;;
814 -site | --site | --sit)
816 -site=* | --site=* | --sit=*)
819 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
821 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
824 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
825 | --syscon | --sysco | --sysc | --sys | --sy)
826 ac_prev=sysconfdir ;;
827 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
828 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
829 sysconfdir=$ac_optarg ;;
831 -target | --target | --targe | --targ | --tar | --ta | --t)
832 ac_prev=target_alias ;;
833 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
834 target_alias=$ac_optarg ;;
836 -v | -verbose | --verbose | --verbos | --verbo | --verb)
839 -version | --version | --versio | --versi | --vers | -V)
842 _AC_INIT_PARSE_ENABLE([with])
844 _AC_INIT_PARSE_ENABLE([without])
847 # Obsolete; use --with-x.
850 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
851 | --x-incl | --x-inc | --x-in | --x-i)
852 ac_prev=x_includes ;;
853 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
854 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
855 x_includes=$ac_optarg ;;
857 -x-libraries | --x-libraries | --x-librarie | --x-librari \
858 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
859 ac_prev=x_libraries ;;
860 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
861 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
862 x_libraries=$ac_optarg ;;
864 -*) AC_MSG_ERROR([unrecognized option: $ac_option
865 Try `$[0] --help' for more information.])
869 ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
870 # Reject names that are not valid shell variable names.
871 expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
872 AC_MSG_ERROR([invalid variable name: $ac_envvar])
873 eval $ac_envvar=\$ac_optarg
877 # FIXME: should be removed in autoconf 3.0.
878 AC_MSG_WARN([you should use --build, --host, --target])
879 expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
880 AC_MSG_WARN([invalid host type: $ac_option])
881 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
887 if test -n "$ac_prev"; then
888 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
889 AC_MSG_ERROR([missing argument to $ac_option])
892 if test -n "$ac_unrecognized_opts"; then
893 case $enable_option_checking in
895 fatal) AC_MSG_ERROR([Unrecognized options: $ac_unrecognized_opts]) ;;
896 *) AC_MSG_WARN( [Unrecognized options: $ac_unrecognized_opts]) ;;
900 # Check all directory arguments for consistency.
901 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
902 datadir sysconfdir sharedstatedir localstatedir includedir \
903 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
904 libdir localedir mandir
906 eval ac_val=\$$ac_var
907 # Remove trailing slashes.
910 ac_val=`expr "X$ac_val" : 'X\(.*[[^/]]\)' \| "X$ac_val" : 'X\(.*\)'`
911 eval $ac_var=\$ac_val;;
913 # Be sure to have absolute directory names.
915 [[\\/$]]* | ?:[[\\/]]* ) continue;;
916 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
918 AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
921 # There might be people who depend on the old broken behavior: `$host'
922 # used to hold the argument of --host etc.
923 # FIXME: To remove some day.
928 # FIXME: To remove some day.
929 if test "x$host_alias" != x; then
930 if test "x$build_alias" = x; then
931 cross_compiling=maybe
932 AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
933 If a cross compiler is detected then cross compile mode will be used.])
934 elif test "x$build_alias" != "x$host_alias"; then
940 test -n "$host_alias" && ac_tool_prefix=$host_alias-
942 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
944 m4_divert_pop([PARSE_ARGS])dnl
945 ])# _AC_INIT_PARSE_ARGS
948 # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
949 # ----------------------------------
950 # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
952 m4_define([_AC_INIT_PARSE_ENABLE],
953 [m4_bmatch([$1], [^with],
954 [_AC_INIT_PARSE_ENABLE2([$1], [with])],
955 [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
958 # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
959 # --------------------------------------------------
960 # Handle an `--enable' or a `--with' option.
962 # OPTION-NAME is `enable', `disable', `with', or `without'.
963 # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'.
965 # Positive variant of the option is recognized by the condition
966 # OPTION-NAME == POSITIVE-NAME .
968 m4_define([_AC_INIT_PARSE_ENABLE2],
970 ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
971 # Reject names that are not valid shell variable names.
972 expr "x$ac_useropt" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
974 [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt])
975 ac_useropt_orig=$ac_useropt
976 ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-.]]/_/g'`
977 case $ac_user_opts in
981 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
982 ac_unrecognized_sep=', ';;
984 eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
990 # Handle the `configure --help' message.
991 m4_define([_AC_INIT_HELP],
992 [m4_divert_push([HELP_BEGIN])dnl
995 # Report the --help message.
997 if test "$ac_init_help" = "long"; then
998 # Omit some internal or obsolete options to make the list less imposing.
999 # This message is too long to be a string in the A/UX 3.1 sh.
1001 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
1002 [AC_PACKAGE_STRING],
1003 [this package]) to adapt to many kinds of systems.
1005 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1007 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
1008 VAR=VALUE. See below for descriptions of some of the useful variables.
1010 Defaults for the options are specified in brackets.
1013 -h, --help display this help and exit
1014 --help=short display options specific to this package
1015 --help=recursive display the short help of all the included packages
1016 -V, --version display version information and exit
1017 -q, --quiet, --silent do not print \`checking...' messages
1018 --cache-file=FILE cache test results in FILE [disabled]
1019 -C, --config-cache alias for \`--cache-file=config.cache'
1020 -n, --no-create do not create output files
1021 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1023 Installation directories:
1024 ]AS_HELP_STRING([--prefix=PREFIX],
1025 [install architecture-independent files in PREFIX [$ac_default_prefix]])
1026 AS_HELP_STRING([--exec-prefix=EPREFIX],
1027 [install architecture-dependent files in EPREFIX [PREFIX]])[
1029 By default, \`make install' will install all the files in
1030 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1031 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1032 for instance \`--prefix=\$HOME'.
1034 For better control, use the options below.
1036 Fine tuning of the installation directories:
1037 --bindir=DIR user executables [EPREFIX/bin]
1038 --sbindir=DIR system admin executables [EPREFIX/sbin]
1039 --libexecdir=DIR program executables [EPREFIX/libexec]
1040 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1041 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1042 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1043 --libdir=DIR object code libraries [EPREFIX/lib]
1044 --includedir=DIR C header files [PREFIX/include]
1045 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1046 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1047 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1048 --infodir=DIR info documentation [DATAROOTDIR/info]
1049 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1050 --mandir=DIR man documentation [DATAROOTDIR/man]
1051 ]AS_HELP_STRING([--docdir=DIR],
1052 [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME],
1053 [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[
1054 --htmldir=DIR html documentation [DOCDIR]
1055 --dvidir=DIR dvi documentation [DOCDIR]
1056 --pdfdir=DIR pdf documentation [DOCDIR]
1057 --psdir=DIR ps documentation [DOCDIR]
1061 m4_divert_pop([HELP_BEGIN])dnl
1062 dnl The order of the diversions here is
1064 dnl which may be extended by extra generic options such as with X or
1065 dnl AC_ARG_PROGRAM. Displayed only in long --help.
1068 dnl Support for cross compilation (--build, --host and --target).
1069 dnl Display only in long --help.
1072 dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1073 dnl then implements the header of the non generic options.
1082 dnl initialized below, in which we dump the trailer (handling of the
1083 dnl recursion for instance).
1084 m4_divert_push([HELP_ENABLE])dnl
1088 if test -n "$ac_init_help"; then
1089 m4_ifset([AC_PACKAGE_STRING],
1090 [ case $ac_init_help in
1091 short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1094 m4_divert_pop([HELP_ENABLE])dnl
1095 m4_divert_push([HELP_END])dnl
1096 m4_ifset([AC_PACKAGE_BUGREPORT], [
1097 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1102 if test "$ac_init_help" = "recursive"; then
1103 # If there are subdirs, report their specific --help.
1104 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1105 test -d "$ac_dir" || continue
1106 _AC_SRCDIRS(["$ac_dir"])
1107 cd "$ac_dir" || { ac_status=$?; continue; }
1108 # Check for guested configure.
1109 if test -f "$ac_srcdir/configure.gnu"; then
1111 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1112 elif test -f "$ac_srcdir/configure"; then
1114 $SHELL "$ac_srcdir/configure" --help=recursive
1116 AC_MSG_WARN([no configuration information is in $ac_dir])
1118 cd "$ac_pwd" || { ac_status=$?; break; }
1122 test -n "$ac_init_help" && exit $ac_status
1123 m4_divert_pop([HELP_END])dnl
1129 # Handle the `configure --version' message.
1130 m4_define([_AC_INIT_VERSION],
1131 [m4_divert_text([VERSION_BEGIN],
1132 [if $ac_init_version; then
1134 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1135 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1136 generated by m4_PACKAGE_STRING])
1137 m4_divert_text([VERSION_END],
1141 ])# _AC_INIT_VERSION
1144 # _AC_INIT_CONFIG_LOG
1145 # -------------------
1146 # Initialize the config.log file descriptor and write header to it.
1147 m4_define([_AC_INIT_CONFIG_LOG],
1148 [m4_divert_text([INIT_PREPARE],
1149 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1150 cat >config.log <<_ACEOF
1151 This file contains any messages produced by compilers while
1152 running configure, to aid debugging if configure makes a mistake.
1154 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1155 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1156 generated by m4_PACKAGE_STRING. Invocation command line was
1161 exec AS_MESSAGE_LOG_FD>>config.log
1162 AS_UNAME >&AS_MESSAGE_LOG_FD
1164 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1167 m4_text_box([Core tests.])
1170 ])])# _AC_INIT_CONFIG_LOG
1175 # Called by AC_INIT to build the preamble of the `configure' scripts.
1176 # 1. Trap and clean up various tmp files.
1177 # 2. Set up the fd and output files
1178 # 3. Remember the options given to `configure' for `config.status --recheck'.
1179 # 4. Initiates confdefs.h
1180 # 5. Loads site and cache files
1181 m4_define([_AC_INIT_PREPARE],
1182 [m4_divert_push([INIT_PREPARE])dnl
1184 # Keep a trace of the command line.
1185 # Strip out --no-create and --no-recursion so they do not pile up.
1186 # Strip out --silent because we don't want to record it for future runs.
1187 # Also quote any args containing shell meta-characters.
1188 # Make two passes to allow for proper duplicate-argument suppression.
1192 ac_must_keep_next=false
1198 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1199 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1200 | -silent | --silent | --silen | --sile | --sil)
1203 ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1206 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1208 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1209 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1210 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1211 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1212 dnl give --prefix foo bar).
1213 if test $ac_must_keep_next = true; then
1214 ac_must_keep_next=false # Got value, back to normal.
1217 dnl Use broad patterns, as arguments that would have already made configure
1218 dnl exit don't matter.
1219 *=* | --config-cache | -C | -disable-* | --disable-* \
1220 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1221 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1222 | -with-* | --with-* | -without-* | --without-* | --x)
1223 case "$ac_configure_args0 " in
1224 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1227 -* ) ac_must_keep_next=true ;;
1230 ac_configure_args="$ac_configure_args '$ac_arg'"
1235 AS_UNSET(ac_configure_args0)
1236 AS_UNSET(ac_configure_args1)
1238 # When interrupted or exit'd, cleanup temporary files, and complete
1239 # config.log. We remove comments because anyway the quotes in there
1240 # would cause problems or look ugly.
1241 # WARNING: Use '\'' to represent an apostrophe within the trap.
1242 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1243 trap 'exit_status=$?
1244 # Save into config.log some information that might help in debugging.
1248 AS_BOX([Cache variables.])
1250 m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1256 AS_BOX([Output variables.])
1258 for ac_var in $ac_subst_vars
1260 eval ac_val=\$$ac_var
1262 *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1264 AS_ECHO(["$ac_var='\''$ac_val'\''"])
1268 if test -n "$ac_subst_files"; then
1269 AS_BOX([File substitutions.])
1271 for ac_var in $ac_subst_files
1273 eval ac_val=\$$ac_var
1275 *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1277 AS_ECHO(["$ac_var='\''$ac_val'\''"])
1282 if test -s confdefs.h; then
1283 AS_BOX([confdefs.h.])
1288 test "$ac_signal" != 0 &&
1289 AS_ECHO(["$as_me: caught signal $ac_signal"])
1290 AS_ECHO(["$as_me: exit $exit_status"])
1291 } >&AS_MESSAGE_LOG_FD
1292 rm -f core *.core core.conftest.* &&
1293 rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1296 for ac_signal in 1 2 13 15; do
1297 trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1301 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1302 rm -f -r conftest* confdefs.h
1303 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1304 dnl containing less than 14 bytes (including the newline).
1305 dnl But the defines below solve this problem.
1307 # Predefined preprocessor variables.
1308 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1309 [Define to the full name of this package.])
1310 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1311 [Define to the one symbol short name of this package.])
1312 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1313 [Define to the version of this package.])
1314 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1315 [Define to the full name and version of this package.])
1316 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1317 [Define to the address where bug reports for this package
1320 # Let the site file select an alternate cache file if it wants to.
1323 m4_divert_pop([INIT_PREPARE])dnl
1324 ])# _AC_INIT_PREPARE
1327 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1328 # ----------------------------------------
1329 # This macro is used only for Autoupdate.
1331 [m4_ifval([$2], [[AC_INIT($@)]],
1334 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1338 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1339 # ----------------------------------------
1340 # Include the user macro files, prepare the diversions, and output the
1341 # preamble of the `configure' script.
1342 # Note that the order is important: first initialize, then set the
1344 m4_define([AC_INIT],
1345 [# Forbidden tokens and exceptions.
1346 m4_pattern_forbid([^_?A[CHUM]_])
1347 m4_pattern_forbid([_AC_])
1348 m4_pattern_forbid([^LIBOBJS$],
1349 [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1350 # Actually reserved by M4sh.
1351 m4_pattern_allow([^AS_FLAGS$])
1354 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1365 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1367 dnl Substitute for predefined variables.
1369 AC_SUBST([ECHO_C])dnl
1370 AC_SUBST([ECHO_N])dnl
1371 AC_SUBST([ECHO_T])dnl
1373 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1374 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1375 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1383 ## ------------------------------------------------------------- ##
1384 ## Selecting optional features, working with optional software. ##
1385 ## ------------------------------------------------------------- ##
1387 # AC_PRESERVE_HELP_ORDER
1388 # ----------------------
1389 # Emit help strings in the order given, rather than grouping all --enable-FOO
1390 # and all --with-BAR.
1391 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1392 [m4_divert_once([HELP_ENABLE], [[
1393 Optional Features and Packages:
1394 --disable-option-checking ignore unrecognized --enable/--with options
1395 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1396 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1397 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1398 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
1399 m4_define([_m4_divert(HELP_ENABLE)], _m4_divert(HELP_WITH))
1400 ])# AC_PRESERVE_HELP_ORDER
1402 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1403 # -------------------------------------------------------------------
1404 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1405 # OPTION is either "enable" or "with".
1407 m4_define([_AC_ENABLE_IF],
1408 [@%:@ Check whether --$1-$2 was given.
1409 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])[]dnl
1412 m4_define([_AC_ENABLE_IF_ACTION],
1413 [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
1415 AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
1418 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1419 # ------------------------------------------------------------------------
1420 AC_DEFUN([AC_ARG_ENABLE],
1421 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1423 [m4_divert_once([HELP_ENABLE], [[
1425 --disable-option-checking ignore unrecognized --enable/--with options
1426 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1427 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])])dnl
1428 m4_divert_once([HELP_ENABLE], [$2])dnl
1429 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1433 AU_DEFUN([AC_ENABLE],
1434 [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
1437 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1438 # --------------------------------------------------------------------
1439 AC_DEFUN([AC_ARG_WITH],
1440 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1442 [m4_divert_once([HELP_WITH], [[
1444 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1445 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])])
1446 m4_divert_once([HELP_WITH], [$2])dnl
1447 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1451 [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
1453 # AC_DISABLE_OPTION_CHECKING
1454 # --------------------------------------------------------------------
1455 AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
1456 [m4_divert_once([DEFAULTS], [enable_option_checking=no])
1457 ])# AC_DISABLE_OPTION_CHECKING
1460 ## ----------------------------------------- ##
1461 ## Remembering variables for reconfiguring. ##
1462 ## ----------------------------------------- ##
1465 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1466 # ----------------------------------
1467 # Register VARNAME as a precious variable, and document it in
1468 # `configure --help' (but only once).
1469 AC_DEFUN([AC_ARG_VAR],
1470 [m4_divert_once([HELP_VAR], [[
1471 Some influential environment variables:]])dnl
1472 m4_divert_once([HELP_VAR_END], [[
1473 Use these variables to override the choices made by `configure' or to help
1474 it to find libraries and programs with nonstandard names/locations.]])dnl
1475 m4_expand_once([m4_divert_text([HELP_VAR],
1476 [AS_HELP_STRING([$1], [$2], [ ])])],
1479 _AC_ARG_VAR_PRECIOUS([$1])dnl
1483 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1484 # -----------------------------
1485 # Declare VARNAME is precious.
1486 m4_define([_AC_ARG_VAR_PRECIOUS],
1487 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1494 # We try to diagnose when precious variables have changed. To do this,
1495 # make two early snapshots (after the option processing to take
1496 # explicit variables into account) of those variables: one (ac_env_)
1497 # which represents the current run, and a second (ac_cv_env_) which,
1498 # at the first run, will be saved in the cache. As an exception to
1499 # the cache mechanism, its loading will override these variables (non
1500 # `ac_cv_env_' cache value are only set when unset).
1502 # In subsequent runs, after having loaded the cache, compare
1503 # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
1504 m4_define([_AC_ARG_VAR_STORE],
1505 [m4_divert_text([PARSE_ARGS],
1506 [for ac_var in $ac_precious_vars; do
1507 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1508 eval ac_env_${ac_var}_value=\$${ac_var}
1509 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1510 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1515 # _AC_ARG_VAR_VALIDATE
1516 # --------------------
1517 # The precious variables are saved twice at the beginning of
1518 # configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1519 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1520 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1522 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1523 # content of the cached values, while `ac_env_' represents that of the
1526 # So we check that `ac_env_' and `ac_cv_env_' are consistent. If
1528 m4_define([_AC_ARG_VAR_VALIDATE],
1529 [m4_divert_text([INIT_PREPARE],
1530 [# Check that the precious variables saved in the cache have kept the same
1532 ac_cache_corrupted=false
1533 for ac_var in $ac_precious_vars; do
1534 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1535 eval ac_new_set=\$ac_env_${ac_var}_set
1536 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1537 eval ac_new_val=\$ac_env_${ac_var}_value
1538 case $ac_old_set,$ac_new_set in
1540 AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1541 ac_cache_corrupted=: ;;
1543 AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1544 ac_cache_corrupted=: ;;
1547 if test "x$ac_old_val" != "x$ac_new_val"; then
1548 AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1549 AS_MESSAGE([ former value: $ac_old_val], 2)
1550 AS_MESSAGE([ current value: $ac_new_val], 2)
1551 ac_cache_corrupted=:
1554 # Pass precious variables to config.status.
1555 if test "$ac_new_set" = set; then
1557 *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1558 *) ac_arg=$ac_var=$ac_new_val ;;
1560 case " $ac_configure_args " in
1561 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1562 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1566 if $ac_cache_corrupted; then
1567 AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1568 AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1570 ])# _AC_ARG_VAR_VALIDATE
1576 ## ---------------------------- ##
1577 ## Transforming program names. ##
1578 ## ---------------------------- ##
1583 # This macro is expanded only once, to avoid that `foo' ends up being
1584 # installed as `ggfoo'.
1585 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1586 [dnl Document the options.
1587 m4_divert_push([HELP_BEGIN])dnl
1590 --program-prefix=PREFIX prepend PREFIX to installed program names
1591 --program-suffix=SUFFIX append SUFFIX to installed program names
1592 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1593 m4_divert_pop([HELP_BEGIN])dnl
1594 test "$program_prefix" != NONE &&
1595 program_transform_name="s&^&$program_prefix&;$program_transform_name"
1596 # Use a double $ so make ignores it.
1597 test "$program_suffix" != NONE &&
1598 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1599 # Double any \ or $.
1600 # By default was `s,x,x', remove it if useless.
1601 [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
1602 program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
1609 ## ------------------------- ##
1610 ## Finding auxiliary files. ##
1611 ## ------------------------- ##
1614 # AC_CONFIG_AUX_DIR(DIR)
1615 # ----------------------
1616 # Find install-sh, config.sub, config.guess, and Cygnus configure
1617 # in directory DIR. These are auxiliary files used in configuration.
1618 # DIR can be either absolute or relative to $srcdir.
1619 AC_DEFUN([AC_CONFIG_AUX_DIR],
1620 [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
1623 # AC_CONFIG_AUX_DIR_DEFAULT
1624 # -------------------------
1625 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1626 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1627 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1628 [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
1631 # AC_CONFIG_AUX_DIRS(DIR ...)
1632 # ---------------------------
1633 # Internal subroutine.
1634 # Search for the configuration auxiliary files in directory list $1.
1635 # We look only for install-sh, so users of AC_PROG_INSTALL
1636 # do not automatically need to distribute the other auxiliary files.
1637 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1639 for ac_dir in $1; do
1640 if test -f "$ac_dir/install-sh"; then
1642 ac_install_sh="$ac_aux_dir/install-sh -c"
1644 elif test -f "$ac_dir/install.sh"; then
1646 ac_install_sh="$ac_aux_dir/install.sh -c"
1648 elif test -f "$ac_dir/shtool"; then
1650 ac_install_sh="$ac_aux_dir/shtool install -c"
1654 if test -z "$ac_aux_dir"; then
1655 AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1658 # These three variables are undocumented and unsupported,
1659 # and are intended to be withdrawn in a future Autoconf release.
1660 # They can cause serious problems if a builder's source tree is in a directory
1661 # whose full name contains unusual characters.
1662 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
1663 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
1664 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
1666 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1667 ])# AC_CONFIG_AUX_DIRS
1672 ## ------------------------ ##
1673 ## Finding aclocal macros. ##
1674 ## ------------------------ ##
1677 # AC_CONFIG_MACRO_DIR(DIR)
1678 # ------------------------
1679 # Declare directory containing additional macros for aclocal.
1680 AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
1684 ## --------------------- ##
1685 ## Requiring aux files. ##
1686 ## --------------------- ##
1688 # AC_REQUIRE_AUX_FILE(FILE)
1689 # -------------------------
1690 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1691 # It announces FILE is required in the auxdir.
1692 m4_define([AC_REQUIRE_AUX_FILE],
1693 [AS_LITERAL_IF([$1], [],
1694 [AC_FATAL([$0: requires a literal argument])])])
1698 ## ----------------------------------- ##
1699 ## Getting the canonical system type. ##
1700 ## ----------------------------------- ##
1703 # configure --host=HOST --target=TARGET --build=BUILD
1706 # 1. Build defaults to the current platform, as determined by config.guess.
1707 # 2. Host defaults to build.
1708 # 3. Target defaults to host.
1711 # _AC_CANONICAL_SPLIT(THING)
1712 # --------------------------
1713 # Generate the variables THING, THING_{alias cpu vendor os}.
1714 m4_define([_AC_CANONICAL_SPLIT],
1717 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1719 AC_SUBST([$1], [$ac_cv_$1])dnl
1720 ac_save_IFS=$IFS; IFS='-'
1723 AC_SUBST([$1_cpu], [$[1]])dnl
1724 AC_SUBST([$1_vendor], [$[2]])dnl
1726 [# Remember, the first character of IFS is used to create $]*,
1727 # except with old shells:
1730 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
1731 AC_SUBST([$1_os])dnl
1732 ])# _AC_CANONICAL_SPLIT
1735 # AC_CANONICAL_BUILD
1736 # ------------------
1737 AC_DEFUN([AC_CANONICAL_BUILD],
1738 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1739 AC_REQUIRE_AUX_FILE([config.sub])dnl
1740 AC_REQUIRE_AUX_FILE([config.guess])dnl
1741 m4_divert_once([HELP_CANON],
1744 --build=BUILD configure for building on BUILD [guessed]]])dnl
1745 # Make sure we can run config.sub.
1746 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1747 AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
1749 AC_CACHE_CHECK([build system type], [ac_cv_build],
1750 [ac_build_alias=$build_alias
1751 test "x$ac_build_alias" = x &&
1752 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1753 test "x$ac_build_alias" = x &&
1754 AC_MSG_ERROR([cannot guess build type; you must specify one])
1755 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1756 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
1758 _AC_CANONICAL_SPLIT(build)
1759 ])# AC_CANONICAL_BUILD
1764 AC_DEFUN([AC_CANONICAL_HOST],
1765 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1766 m4_divert_once([HELP_CANON],
1767 [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl
1768 AC_CACHE_CHECK([host system type], [ac_cv_host],
1769 [if test "x$host_alias" = x; then
1770 ac_cv_host=$ac_cv_build
1772 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1773 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
1776 _AC_CANONICAL_SPLIT([host])
1777 ])# AC_CANONICAL_HOST
1780 # AC_CANONICAL_TARGET
1781 # -------------------
1782 AC_DEFUN([AC_CANONICAL_TARGET],
1783 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1784 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1785 m4_divert_once([HELP_CANON],
1786 [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
1787 AC_CACHE_CHECK([target system type], [ac_cv_target],
1788 [if test "x$target_alias" = x; then
1789 ac_cv_target=$ac_cv_host
1791 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
1792 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
1795 _AC_CANONICAL_SPLIT([target])
1797 # The aliases save the names the user supplied, while $host etc.
1798 # will get canonicalized.
1799 test -n "$target_alias" &&
1800 test "$program_prefix$program_suffix$program_transform_name" = \
1802 program_prefix=${target_alias}-[]dnl
1803 ])# AC_CANONICAL_TARGET
1806 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1809 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1810 # ------------------------------------------
1811 # If the cache file is inconsistent with the current host,
1812 # target and build system types, execute CMD or print a default
1813 # error message. Now handled via _AC_ARG_VAR_PRECIOUS.
1814 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1817 ## ---------------------- ##
1818 ## Caching test results. ##
1819 ## ---------------------- ##
1824 # Look for site- or system-specific initialization scripts.
1825 m4_define([AC_SITE_LOAD],
1826 [# Prefer an explicitly selected file to automatically selected ones.
1829 if test -n "$CONFIG_SITE"; then
1830 ac_site_file1=$CONFIG_SITE
1831 elif test "x$prefix" != xNONE; then
1832 ac_site_file1=$prefix/share/config.site
1833 ac_site_file2=$prefix/etc/config.site
1835 ac_site_file1=$ac_default_prefix/share/config.site
1836 ac_site_file2=$ac_default_prefix/etc/config.site
1838 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1840 test "x$ac_site_file" = xNONE && continue
1841 if test -r "$ac_site_file"; then
1842 AC_MSG_NOTICE([loading site script $ac_site_file])
1843 sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1852 m4_define([AC_CACHE_LOAD],
1853 [if test -r "$cache_file"; then
1854 # Some versions of bash will fail to source /dev/null (special
1855 # files actually), so we avoid doing that.
1856 if test -f "$cache_file"; then
1857 AC_MSG_NOTICE([loading cache $cache_file])
1859 [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
1860 *) . "./$cache_file";;
1864 AC_MSG_NOTICE([creating cache $cache_file])
1872 # Dump the cache to stdout. It can be in a pipe (this is a requirement).
1873 m4_define([_AC_CACHE_DUMP],
1874 [# The following way of writing the cache mishandles newlines in values,
1875 # but we know of no workaround that is simple, portable, and efficient.
1876 # So, we kill variables containing newlines.
1877 # Ultrix sh set writes to stderr and can't be redirected directly,
1878 # and sets the high bit in the cache file unless we assign to the vars.
1880 for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
1881 eval ac_val=\$$ac_var
1885 *_cv_*) AC_MSG_WARN([Cache variable $ac_var contains a newline.]) ;;
1888 _ | IFS | as_nl) ;; #(
1889 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1890 *) $as_unset $ac_var ;;
1896 case $as_nl`(ac_space=' '; set) 2>&1` in #(
1897 *${as_nl}ac_space=\ *)
1898 # `set' does not quote correctly, so add quotes (double-quote
1899 # substitution turns \\\\ into \\, and sed turns \\ into \).
1902 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1905 # `set' quotes correctly as required by POSIX, so do not add quotes.
1906 sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
1917 # Allow a site initialization script to override cache values.
1918 m4_define([AC_CACHE_SAVE],
1919 [cat >confcache <<\_ACEOF
1920 # This file is a shell script that caches the results of configure
1921 # tests run on this system so they can be shared between configure
1922 # scripts and configure runs, see configure's option --config-cache.
1923 # It is not useful on other systems. If it contains results you don't
1924 # want to keep, you may remove or edit it.
1926 # config.status only pays attention to the cache file if you give it
1927 # the --recheck option to rerun configure.
1929 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1930 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1940 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1942 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1944 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1945 if test -w "$cache_file"; then
1946 test "x$cache_file" != "x/dev/null" &&
1947 AC_MSG_NOTICE([updating cache $cache_file])
1948 cat confcache >$cache_file
1950 AC_MSG_NOTICE([not updating unwritable cache $cache_file])
1953 rm -f confcache[]dnl
1957 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1958 # ------------------------------------------
1959 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1960 # Should be dnl'ed. Try to catch common mistakes.
1961 m4_defun([AC_CACHE_VAL],
1962 [AS_LITERAL_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
1963 [AC_DIAGNOSE([syntax],
1964 [$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl
1965 m4_if(m4_index([$2], [AC_DEFINE]), [-1], [],
1966 [AC_DIAGNOSE([syntax],
1967 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1968 [where no actions should be taken])])dnl
1969 m4_if(m4_index([$2], [AC_SUBST]), [-1], [],
1970 [AC_DIAGNOSE([syntax],
1971 [$0($1, ...): suspicious presence of an AC_SUBST in the second argument, ]dnl
1972 [where no actions should be taken])])dnl
1974 [_AS_ECHO_N([(cached) ])],
1978 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1979 # -------------------------------------------
1980 # Do not call this macro with a dnl right behind.
1981 m4_defun([AC_CACHE_CHECK],
1982 [AC_MSG_CHECKING([$1])
1983 AC_CACHE_VAL([$2], [$3])dnl
1985 [AC_MSG_RESULT([$$2])],
1986 [ac_res=AS_VAR_GET([$2])
1987 AC_MSG_RESULT([$ac_res])])dnl
1990 # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
1991 # [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
1992 # -------------------------------------------------------------
1993 AC_DEFUN([_AC_CACHE_CHECK_INT],
1994 [AC_CACHE_CHECK([$1], [$2],
1995 [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
1996 ])# _AC_CACHE_CHECK_INT
2000 ## ---------------------- ##
2001 ## Defining CPP symbols. ##
2002 ## ---------------------- ##
2005 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
2006 # -------------------------------------------
2007 # Used by --trace to collect the list of AC_DEFINEd macros.
2008 m4_define([AC_DEFINE_TRACE_LITERAL],
2009 [m4_pattern_allow([^$1$])dnl
2010 AS_IDENTIFIER_IF([$1], [],
2011 [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
2012 ])# AC_DEFINE_TRACE_LITERAL
2015 # AC_DEFINE_TRACE(CPP-SYMBOL)
2016 # ---------------------------
2017 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
2018 # out non literal symbols. CPP-SYMBOL must not include any parameters.
2019 m4_define([AC_DEFINE_TRACE],
2020 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
2023 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2024 # -------------------------------------------
2025 # Set VARIABLE to VALUE, verbatim, or 1. Remember the value
2026 # and if VARIABLE is affected the same VALUE, do nothing, else
2027 # die. The third argument is used by autoheader.
2028 m4_define([AC_DEFINE], [_AC_DEFINE_Q([\], $@)])
2031 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2032 # ----------------------------------------------------
2033 # Similar, but perform shell substitutions $ ` \ once on VALUE.
2034 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([], $@)])
2037 # _AC_DEFINE_Q(QUOTE, VARIABLE, [VALUE], [DESCRIPTION])
2038 # -----------------------------------------------------
2039 # Internal function that performs common elements of AC_DEFINE{,_UNQUOTED}.
2041 # m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so only
2042 # use the regex when necessary. AC_name is defined with over-quotation,
2043 # so that we can avoid m4_defn.
2044 m4_define([_AC_DEFINE_Q],
2045 [m4_pushdef([AC_name], m4_if(m4_index([$2], [(]), [-1], [[[$2]]],
2046 [m4_bpatsubst([[[$2]]], [(.*)])]))dnl
2047 AC_DEFINE_TRACE(AC_name)dnl
2048 m4_cond([m4_index([$3], [
2050 [AS_LITERAL_IF([$3], [m4_bregexp([[$3]], [[^\\]
2052 [m4_warn([syntax], [AC_DEFINE]m4_ifval([$1], [], [[_UNQUOTED]])dnl
2053 [: `$3' is not a valid preprocessor define value])])dnl
2054 m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4])])dnl
2055 m4_popdef([AC_name])dnl
2056 cat >>confdefs.h <<$1_ACEOF
2057 [@%:@define] $2 m4_if($#, 2, 1, [$3])
2063 ## -------------------------- ##
2064 ## Setting output variables. ##
2065 ## -------------------------- ##
2068 # AC_SUBST_TRACE(VARIABLE)
2069 # ------------------------
2070 # This macro is used with --trace to collect the list of substituted variables.
2071 m4_define([AC_SUBST_TRACE])
2074 # AC_SUBST(VARIABLE, [VALUE])
2075 # ---------------------------
2076 # Create an output variable from a shell VARIABLE. If VALUE is given
2077 # assign it to VARIABLE. Use `""' if you want to set VARIABLE to an
2078 # empty value, not an empty second argument.
2080 m4_define([AC_SUBST],
2081 [AS_IDENTIFIER_IF([$1], [],
2082 [AC_FATAL([$0: `$1' is not a valid shell variable name])])dnl
2083 AC_SUBST_TRACE([$1])dnl
2084 m4_pattern_allow([^$1$])dnl
2085 m4_ifvaln([$2], [$1=$2])[]dnl
2086 m4_append_uniq([_AC_SUBST_VARS], [$1], [
2091 # AC_SUBST_FILE(VARIABLE)
2092 # -----------------------
2093 # Read the comments of the preceding macro.
2094 m4_define([AC_SUBST_FILE],
2095 [m4_pattern_allow([^$1$])dnl
2096 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2101 ## --------------------------------------- ##
2102 ## Printing messages at autoconf runtime. ##
2103 ## --------------------------------------- ##
2105 # In fact, I think we should promote the use of m4_warn and m4_fatal
2106 # directly. This will also avoid to some people to get it wrong
2107 # between AC_FATAL and AC_MSG_ERROR.
2110 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2111 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2112 # --------------------------------
2113 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2114 m4_define([AC_FATAL], [m4_fatal($@)])
2117 # AC_WARNING(MESSAGE)
2118 # -------------------
2119 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2121 m4_define([AC_WARNING],
2122 [AC_DIAGNOSE([syntax], [$1])])
2127 ## ---------------------------------------- ##
2128 ## Printing messages at configure runtime. ##
2129 ## ---------------------------------------- ##
2132 # AC_MSG_CHECKING(FEATURE)
2133 # ------------------------
2134 m4_define([AC_MSG_CHECKING],
2135 [{ _AS_ECHO_LOG([checking $1])
2136 _AS_ECHO_N([checking $1... ]); }dnl
2140 # AC_MSG_RESULT(RESULT)
2141 # ---------------------
2142 m4_define([AC_MSG_RESULT],
2143 [{ _AS_ECHO_LOG([result: $1])
2144 _AS_ECHO([$1]); }dnl
2148 # AC_MSG_WARN(PROBLEM)
2149 # AC_MSG_NOTICE(STRING)
2150 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2151 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2152 # ----------------------------------------
2153 m4_copy([AS_WARN], [AC_MSG_WARN])
2154 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2155 m4_copy([AS_ERROR], [AC_MSG_ERROR])
2156 m4_define([AC_MSG_FAILURE],
2158 See `config.log' for more details.], [$2])])
2161 # _AC_MSG_LOG_CONFTEST
2162 # --------------------
2163 m4_define([_AC_MSG_LOG_CONFTEST],
2164 [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
2165 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2169 # AU::AC_CHECKING(FEATURE)
2170 # ------------------------
2171 AU_DEFUN([AC_CHECKING],
2172 [AS_MESSAGE([checking $1...])])
2175 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2176 # ----------------------------------
2177 # No escaping, so it performed also backtick substitution.
2178 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2179 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
2180 _AS_ECHO_UNQUOTED([$1])[]dnl
2184 # AU::AC_VERBOSE(STRING)
2185 # ----------------------
2186 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2193 ## ---------------------------- ##
2194 ## Compiler-running mechanics. ##
2195 ## ---------------------------- ##
2198 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2199 # ----------------------------------
2200 # Eval COMMAND, save the exit status in ac_status, and log it.
2201 AC_DEFUN([_AC_RUN_LOG],
2202 [{ ($2) >&AS_MESSAGE_LOG_FD
2203 ($1) 2>&AS_MESSAGE_LOG_FD
2205 _AS_ECHO_LOG([\$? = $ac_status])
2206 (exit $ac_status); }])
2209 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2210 # -----------------------------------------
2211 # Run COMMAND, save its stderr into conftest.err, save the exit status
2212 # in ac_status, and log it. Don't forget to clean up conftest.err after
2214 # Note that when tracing, most shells will leave the traces in stderr
2215 # starting with "+": that's what this macro tries to address.
2216 AC_DEFUN([_AC_RUN_LOG_STDERR],
2217 [{ ($2) >&AS_MESSAGE_LOG_FD
2220 grep -v '^ *+' conftest.er1 >conftest.err
2222 cat conftest.err >&AS_MESSAGE_LOG_FD
2223 _AS_ECHO_LOG([\$? = $ac_status])
2224 (exit $ac_status); }])
2226 # _AC_DO_ECHO(COMMAND)
2227 # --------------------
2228 # Echo COMMAND. This is designed to be used just before evaluating COMMAND.
2229 AC_DEFUN([_AC_DO_ECHO],
2230 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2232 dnl If the string contains '\"', '`', or '\\', then just echo it rather
2233 dnl than expanding it. This is a hack, but it is safer, while also
2234 dnl typically expanding simple substrings like '$CC', which is what we want.
2236 dnl Much of this macro body is quoted, to work around misuses like
2237 dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2238 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2239 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2240 dnl underquoting misuses, such as
2241 dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2242 dnl We normally wouldn't bother with this kind of workaround for invalid code
2243 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2244 dnl minimize the integration hassle.
2245 [case "(($ac_try" in
2246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2247 *) ac_try_echo=$ac_try;;
2249 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""]
2250 AS_ECHO(["$ac_try_echo"])])
2254 # Eval COMMAND, save the exit status in ac_status, and log it.
2255 # For internal use only.
2257 [_AC_RUN_LOG([eval "$1"],
2258 [_AC_DO_ECHO([$1])])])
2261 # _AC_DO_STDERR(COMMAND)
2262 # ----------------------
2263 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2264 AC_DEFUN([_AC_DO_STDERR],
2265 [_AC_RUN_LOG_STDERR([eval "$1"],
2266 [_AC_DO_ECHO([$1])])])
2269 # _AC_DO_VAR(VARIABLE)
2270 # --------------------
2271 # Evaluate "$VARIABLE", which should be a valid shell command.
2272 # The purpose of this macro is to write "configure:123: command line"
2273 # into config.log for every test run.
2274 AC_DEFUN([_AC_DO_VAR],
2278 # _AC_DO_TOKENS(COMMAND)
2279 # ----------------------
2280 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2281 # tokens of the shell command language.
2282 AC_DEFUN([_AC_DO_TOKENS],
2284 _AC_DO([$ac_try]); }])
2289 # Eval COMMAND, save the exit status in ac_status, and log it.
2290 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2291 # It is present only for backward compatibility with previous Autoconf versions.
2292 AC_DEFUN([_AC_EVAL],
2293 [_AC_RUN_LOG([eval $1],
2294 [eval echo "$as_me:$LINENO: \"$1\""])])
2297 # _AC_EVAL_STDERR(COMMAND)
2298 # ------------------------
2299 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2300 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2301 # It is present only for backward compatibility with previous Autoconf versions.
2302 AC_DEFUN([_AC_EVAL_STDERR],
2303 [_AC_RUN_LOG_STDERR([eval $1],
2304 [eval echo "$as_me:$LINENO: \"$1\""])])
2307 # AC_TRY_EVAL(VARIABLE)
2308 # ---------------------
2309 # Evaluate $VARIABLE, which should be a valid shell command.
2310 # The purpose of this macro is to write "configure:123: command line"
2311 # into config.log for every test run.
2313 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2314 # undocumented, and should not be used.
2315 # They may be removed or their API changed in a future release.
2316 # Autoconf itself no longer uses these two macros; they are present
2317 # only for backward compatibility with previous versions of Autoconf.
2318 # Not every shell command will work due to problems with eval
2319 # and quoting, and the rules for exactly what does work are tricky.
2320 # Worse, due to double-expansion during evaluation, arbitrary unintended
2321 # shell commands could be executed in some situations.
2322 AC_DEFUN([AC_TRY_EVAL],
2326 # AC_TRY_COMMAND(COMMAND)
2327 # -----------------------
2328 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2329 # tokens of the shell command language.
2330 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2331 AC_DEFUN([AC_TRY_COMMAND],
2333 _AC_EVAL([$ac_try]); }])
2336 # AC_RUN_LOG(COMMAND)
2337 # -------------------
2338 AC_DEFUN([AC_RUN_LOG],
2340 [AS_ECHO(["$as_me:$LINENO: AS_ESCAPE([$1])"])])])
2345 ## ------------------------ ##
2346 ## Examining declarations. ##
2347 ## ------------------------ ##
2351 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2352 # ----------------------------------------------------------------
2353 # Try to preprocess PROGRAM.
2355 # This macro can be used during the selection of a preprocessor.
2356 # eval is necessary to expand ac_cpp.
2357 AC_DEFUN([_AC_PREPROC_IFELSE],
2358 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2359 AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && {
2360 test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2361 test ! -s conftest.err
2364 [_AC_MSG_LOG_CONFTEST
2366 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2367 ])# _AC_PREPROC_IFELSE
2370 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2371 # ---------------------------------------------------------------
2372 # Try to preprocess PROGRAM. Requires that the preprocessor for the
2373 # current language was checked for, hence do not use this macro in macros
2374 # looking for a preprocessor.
2375 AC_DEFUN([AC_PREPROC_IFELSE],
2376 [AC_LANG_PREPROC_REQUIRE()dnl
2377 _AC_PREPROC_IFELSE($@)])
2380 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2381 # ---------------------------------------------------------
2382 # AC_TRY_CPP is used to check whether particular header files exist.
2383 # (But it actually tests whether INCLUDES produces no CPP errors.)
2385 # INCLUDES are not defaulted and are double quoted.
2386 AU_DEFUN([AC_TRY_CPP],
2387 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2390 # AC_EGREP_CPP(PATTERN, PROGRAM,
2391 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2392 # ------------------------------------------------------
2393 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2394 # come early, it is not included in AC_BEFORE checks.
2395 AC_DEFUN([AC_EGREP_CPP],
2396 [AC_LANG_PREPROC_REQUIRE()dnl
2397 AC_REQUIRE([AC_PROG_EGREP])dnl
2398 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2399 AS_IF([dnl eval is necessary to expand ac_cpp.
2400 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2401 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2402 dnl Quote $1 to prevent m4 from eating character classes
2403 $EGREP "[$1]" >/dev/null 2>&1],
2410 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2411 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2412 # ---------------------------------------------------------
2413 AC_DEFUN([AC_EGREP_HEADER],
2421 ## ------------------ ##
2422 ## Examining syntax. ##
2423 ## ------------------ ##
2426 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2427 # ----------------------------------------------------------------
2428 # Try to compile PROGRAM.
2429 # This macro can be used during the selection of a compiler.
2430 m4_define([_AC_COMPILE_IFELSE],
2431 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2432 rm -f conftest.$ac_objext
2433 AS_IF([_AC_DO_STDERR($ac_compile) && {
2434 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2435 test ! -s conftest.err
2436 } && test -s conftest.$ac_objext],
2438 [_AC_MSG_LOG_CONFTEST
2440 rm -f core conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2441 ])# _AC_COMPILE_IFELSE
2444 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2445 # ---------------------------------------------------------------
2446 # Try to compile PROGRAM. Requires that the compiler for the current
2447 # language was checked for, hence do not use this macro in macros looking
2449 AC_DEFUN([AC_COMPILE_IFELSE],
2450 [AC_LANG_COMPILER_REQUIRE()dnl
2451 _AC_COMPILE_IFELSE($@)])
2454 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2455 # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2456 # ---------------------------------------------------
2457 AU_DEFUN([AC_TRY_COMPILE],
2458 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2462 ## --------------------- ##
2463 ## Examining libraries. ##
2464 ## --------------------- ##
2467 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2468 # -------------------------------------------------------------
2469 # Try to link PROGRAM.
2470 # This macro can be used during the selection of a compiler.
2472 # Test that resulting file is executable; see the problem reported by mwoehlke
2473 # in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
2474 # But skip the test when cross-compiling, to prevent problems like the one
2475 # reported by Chris Johns in
2476 # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
2478 m4_define([_AC_LINK_IFELSE],
2479 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2480 rm -f conftest.$ac_objext conftest$ac_exeext
2481 AS_IF([_AC_DO_STDERR($ac_link) && {
2482 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2483 test ! -s conftest.err
2484 } && test -s conftest$ac_exeext && {
2485 test "$cross_compiling" = yes ||
2486 AS_TEST_X([conftest$ac_exeext])
2489 [_AC_MSG_LOG_CONFTEST
2491 dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization)
2492 dnl information created by the PGI compiler (conftest_ipa8_conftest.oo),
2493 dnl as it would interfere with the next link command.
2494 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
2495 conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2499 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2500 # ------------------------------------------------------------
2501 # Try to link PROGRAM. Requires that the compiler for the current
2502 # language was checked for, hence do not use this macro in macros looking
2504 AC_DEFUN([AC_LINK_IFELSE],
2505 [AC_LANG_COMPILER_REQUIRE()dnl
2506 _AC_LINK_IFELSE($@)])
2509 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2510 # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2511 # ------------------------------------------------
2512 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2513 AU_DEFUN([AC_TRY_LINK],
2514 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2517 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2518 # ACTION-IF-TRUE, [ACTION-IF-FALSE])
2519 # ---------------------------------------------------
2520 AU_DEFUN([AC_COMPILE_CHECK],
2521 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2522 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2527 ## ------------------------------- ##
2528 ## Checking for runtime features. ##
2529 ## ------------------------------- ##
2532 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2533 # ------------------------------------------------------------
2534 # Compile, link, and run.
2535 # This macro can be used during the selection of a compiler.
2536 # We also remove conftest.o as if the compilation fails, some compilers
2537 # don't remove it. We remove gmon.out and bb.out, which may be
2538 # created during the run if the program is built with profiling support.
2539 m4_define([_AC_RUN_IFELSE],
2540 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2541 rm -f conftest$ac_exeext
2542 AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2544 [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
2545 _AC_MSG_LOG_CONFTEST
2547 [( exit $ac_status )
2549 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2550 [conftest.$ac_ext])[]dnl
2554 # AC_RUN_IFELSE(PROGRAM,
2555 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2556 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2557 # ----------------------------------------------------------
2558 # Compile, link, and run. Requires that the compiler for the current
2559 # language was checked for, hence do not use this macro in macros looking
2561 AC_DEFUN([AC_RUN_IFELSE],
2562 [AC_LANG_COMPILER_REQUIRE()dnl
2564 [AC_DIAGNOSE([cross],
2565 [$0 called without default to allow cross compiling])])dnl
2566 AS_IF([test "$cross_compiling" = yes],
2568 [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2569 [_AC_RUN_IFELSE($@)])
2573 # AC_TRY_RUN(PROGRAM,
2574 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2575 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2576 # --------------------------------------------------------
2577 AU_DEFUN([AC_TRY_RUN],
2578 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2582 ## ------------------------------------- ##
2583 ## Checking for the existence of files. ##
2584 ## ------------------------------------- ##
2586 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2587 # -------------------------------------------------------------
2589 # Check for the existence of FILE.
2590 AC_DEFUN([AC_CHECK_FILE],
2591 [AC_DIAGNOSE([cross],
2592 [cannot check for file existence when cross compiling])dnl
2593 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2594 AC_CACHE_CHECK([for $1], [ac_File],
2595 [test "$cross_compiling" = yes &&
2596 AC_MSG_ERROR([cannot check for file existence when cross compiling])
2597 if test -r "$1"; then
2598 AS_VAR_SET([ac_File], [yes])
2600 AS_VAR_SET([ac_File], [no])
2602 AS_IF([test AS_VAR_GET([ac_File]) = yes], [$2], [$3])[]dnl
2603 AS_VAR_POPDEF([ac_File])dnl
2607 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2608 # -----------------------------------------------------------------
2609 AC_DEFUN([AC_CHECK_FILES],
2610 [m4_foreach_w([AC_FILE_NAME], [$1],
2611 [AC_CHECK_FILE(AC_FILE_NAME,
2612 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2613 [Define to 1 if you have the
2619 ## ------------------------------- ##
2620 ## Checking for declared symbols. ##
2621 ## ------------------------------- ##
2624 # AC_CHECK_DECL(SYMBOL,
2625 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2626 # [INCLUDES = DEFAULT-INCLUDES])
2627 # -------------------------------------------------------
2628 # Check whether SYMBOL (a function, variable, or constant) is declared.
2629 AC_DEFUN([AC_CHECK_DECL],
2630 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2631 AC_CACHE_CHECK([whether $1 is declared], [ac_Symbol],
2632 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2637 [AS_VAR_SET([ac_Symbol], [yes])],
2638 [AS_VAR_SET([ac_Symbol], [no])])])
2639 AS_IF([test AS_VAR_GET([ac_Symbol]) = yes], [$2], [$3])[]dnl
2640 AS_VAR_POPDEF([ac_Symbol])dnl
2644 # AC_CHECK_DECLS(SYMBOLS,
2645 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2646 # [INCLUDES = DEFAULT-INCLUDES])
2647 # --------------------------------------------------------
2648 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
2649 # documentation for a detailed explanation of this difference with
2650 # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
2651 AC_DEFUN([AC_CHECK_DECLS],
2652 [m4_foreach([AC_Symbol], [$1],
2653 [AC_CHECK_DECL(AC_Symbol,
2654 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2655 [Define to 1 if you have the declaration
2656 of `]AC_Symbol[', and to 0 if you don't.])
2658 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2664 # AC_CHECK_DECLS_ONCE(SYMBOLS)
2665 # ----------------------------
2666 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
2667 AC_DEFUN([AC_CHECK_DECLS_ONCE],
2669 m4_foreach([AC_Symbol], [$1],
2670 [AC_DEFUN([_AC_Check_Decl_]m4_defn([AC_Symbol]),
2671 [AC_CHECK_DECLS(m4_defn([AC_Symbol]))])
2672 AC_REQUIRE([_AC_Check_Decl_]m4_defn([AC_Symbol]))])
2677 ## ---------------------------------- ##
2678 ## Replacement of library functions. ##
2679 ## ---------------------------------- ##
2682 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2683 # -----------------------------
2684 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2685 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2686 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
2689 # AC_LIBSOURCE(FILE-NAME)
2690 # -----------------------
2691 # Announce we might need the file `FILE-NAME'.
2692 m4_define([AC_LIBSOURCE], [])
2695 # AC_LIBSOURCES([FILE-NAME1, ...])
2696 # -------------------------------
2697 # Announce we might need these files.
2698 m4_define([AC_LIBSOURCES],
2699 [m4_foreach([_AC_FILE_NAME], [$1],
2700 [AC_LIBSOURCE(_AC_FILE_NAME)])])
2703 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
2704 # --------------------------------------------
2705 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2706 m4_define([_AC_LIBOBJ],
2707 [AS_LITERAL_IF([$1],
2708 [AC_LIBSOURCE([$1.c])],
2710 case " $LIB@&t@OBJS " in
2711 *" $1.$ac_objext "* ) ;;
2712 *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
2717 # AC_LIBOBJ(FILE-NAME-NOEXT)
2718 # -------------------------
2719 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2720 m4_define([AC_LIBOBJ],
2722 [AC_DIAGNOSE(syntax,
2723 [$0($1): you should use literals])])dnl
2727 # _AC_LIBOBJS_NORMALIZE
2728 # ---------------------
2729 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
2730 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2731 # Used with AC_CONFIG_COMMANDS_PRE.
2732 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2735 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2736 # 1. Remove the extension, and $U if already installed.
2737 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2738 ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
2739 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
2740 # will be set to the directory where LIBOBJS objects are built.
2741 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
2742 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
2744 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2745 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2749 ## ----------------------------------- ##
2750 ## Checking compiler characteristics. ##
2751 ## ----------------------------------- ##
2754 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2755 # -------------------------------------------------------------------
2756 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2757 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2758 m4_define([_AC_COMPUTE_INT_COMPILE],
2759 [# Depending upon the size, compute the lo and hi bounds.
2760 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2763 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2764 [ac_hi=$ac_mid; break],
2765 [ac_lo=`expr $ac_mid + 1`
2766 if test $ac_lo -le $ac_mid; then
2770 ac_mid=`expr 2 '*' $ac_mid + 1`])
2772 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2775 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2776 [ac_lo=$ac_mid; break],
2777 [ac_hi=`expr '(' $ac_mid ')' - 1`
2778 if test $ac_mid -le $ac_hi; then
2782 ac_mid=`expr 2 '*' $ac_mid`])
2785 # Binary search between lo and hi bounds.
2786 while test "x$ac_lo" != "x$ac_hi"; do
2787 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2788 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2789 [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2795 ])# _AC_COMPUTE_INT_COMPILE
2798 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2799 # ---------------------------------------------------------------
2800 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2801 m4_define([_AC_COMPUTE_INT_RUN],
2802 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2803 [$2=`cat conftest.val`], [$4])])
2806 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
2807 # ----------------------------------------------------------
2808 AC_DEFUN([AC_COMPUTE_INT],
2809 [AC_LANG_COMPILER_REQUIRE()dnl
2810 if test "$cross_compiling" = yes; then
2811 _AC_COMPUTE_INT_COMPILE([$2], [$1], [$3], [$4])
2813 _AC_COMPUTE_INT_RUN([$2], [$1], [$3], [$4])
2815 rm -f conftest.val[]dnl
2818 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2819 # -----------------------------------------------------------
2820 # FIXME: this private interface was used by several packages.
2821 # Give them time to transition to AC_COMPUTE_INT and then delete this one.
2822 AC_DEFUN([_AC_COMPUTE_INT],
2823 [AC_COMPUTE_INT([$2], [$1], [$3], [$4])
2824 AC_DIAGNOSE([obsolete],
2825 [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
2826 future version or Autoconf. Hence, it is suggested that you use
2827 instead the public AC_COMPUTE_INT macro. Note that the arguments are
2828 slightly different between the two.])dnl