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, 2008 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.
111 # Tail of initialization code.
114 # the tests and output code
118 # _m4_divert(DIVERSION-NAME)
119 # --------------------------
120 # Convert a diversion name into its number. Otherwise, return
121 # DIVERSION-NAME which is supposed to be an actual diversion number.
122 # Of course it would be nicer to use m4_case here, instead of zillions
123 # of little macros, but it then takes twice longer to run `autoconf'!
133 # 3. HEADER-COPYRIGHT
136 m4_define([_m4_divert(DEFAULTS)], 10)
137 m4_define([_m4_divert(PARSE_ARGS)], 20)
139 m4_define([_m4_divert(HELP_BEGIN)], 100)
140 m4_define([_m4_divert(HELP_CANON)], 101)
141 m4_define([_m4_divert(HELP_ENABLE)], 102)
142 m4_define([_m4_divert(HELP_WITH)], 103)
143 m4_define([_m4_divert(HELP_VAR)], 104)
144 m4_define([_m4_divert(HELP_VAR_END)], 105)
145 m4_define([_m4_divert(HELP_END)], 106)
147 m4_define([_m4_divert(VERSION_BEGIN)], 200)
148 m4_define([_m4_divert(VERSION_FSF)], 201)
149 m4_define([_m4_divert(VERSION_USER)], 202)
150 m4_define([_m4_divert(VERSION_END)], 203)
152 m4_define([_m4_divert(SHELL_FN)], 250)
154 m4_define([_m4_divert(INIT_PREPARE)], 300)
158 # AC_DIVERT_PUSH(DIVERSION-NAME)
160 # ------------------------------
161 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
162 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
166 ## ------------------------------------ ##
167 ## Defining/requiring Autoconf macros. ##
168 ## ------------------------------------ ##
171 # AC_DEFUN(NAME, EXPANSION)
172 # AC_DEFUN_ONCE(NAME, EXPANSION)
173 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
175 # AC_PROVIDE(MACRO-NAME)
176 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
177 # -----------------------------------------------------------
178 m4_copy([m4_defun], [AC_DEFUN])
179 m4_copy([m4_defun_once], [AC_DEFUN_ONCE])
180 m4_copy([m4_before], [AC_BEFORE])
181 m4_copy([m4_require], [AC_REQUIRE])
182 m4_copy([m4_provide], [AC_PROVIDE])
183 m4_copy([m4_provide_if], [AC_PROVIDE_IFELSE])
186 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
187 # ------------------------------------------
188 m4_define([AC_OBSOLETE],
189 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
193 ## ----------------------------- ##
194 ## Implementing shell functions. ##
195 ## ----------------------------- ##
198 # AC_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY, [DIVERSION = SHELL_FN]
199 # ------------------------------------------------------------------------
200 # Same as AS_REQUIRE_SHELL_FN except that the default diversion comes
201 # later in the script (speeding up configure --help and --version).
202 AC_DEFUN([AC_REQUIRE_SHELL_FN],
203 [AS_REQUIRE_SHELL_FN([$1], [$2], [$3], m4_default_quoted([$4], [SHELL_FN]))])
207 ## ----------------------------- ##
208 ## Implementing Autoconf loops. ##
209 ## ----------------------------- ##
212 # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION)
213 # ------------------------------------------
214 AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]])
215 AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl
216 AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete.
217 You should run autoupdate.])])
221 ## ----------------------------------- ##
222 ## Helping macros to display strings. ##
223 ## ----------------------------------- ##
226 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
227 # --------------------------------------
228 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
232 ## ---------------------------------------------- ##
233 ## Information on the package being Autoconf'ed. ##
234 ## ---------------------------------------------- ##
237 # It is suggested that the macros in this section appear before
238 # AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
239 # and from the implementation point of view, AC_INIT *must* be expanded
240 # beforehand: it puts data in diversions which must appear before the
241 # data provided by the macros of this section.
243 # The solution is to require AC_INIT in each of these macros. AC_INIT
244 # has the needed magic so that it can't be expanded twice.
248 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
249 # --------------------------------------------------------------
250 m4_define([_AC_INIT_PACKAGE],
251 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
252 AS_LITERAL_IF([$2], [], [m4_warn([syntax], [AC_INIT: not a literal: $2])])
253 AS_LITERAL_IF([$3], [], [m4_warn([syntax], [AC_INIT: not a literal: $3])])
254 m4_ifndef([AC_PACKAGE_NAME],
255 [m4_define([AC_PACKAGE_NAME], [$1])])
256 m4_ifndef([AC_PACKAGE_TARNAME],
257 [m4_define([AC_PACKAGE_TARNAME],
259 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
261 [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
263 m4_ifndef([AC_PACKAGE_VERSION],
264 [m4_define([AC_PACKAGE_VERSION], [$2])])
265 m4_ifndef([AC_PACKAGE_STRING],
266 [m4_define([AC_PACKAGE_STRING], [$1 $2])])
267 m4_ifndef([AC_PACKAGE_BUGREPORT],
268 [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
272 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
273 # ------------------------------------------------------
274 # Emit TEXT, a copyright notice, in the top of `configure' and in
275 # --version output. Macros in TEXT are evaluated once.
276 m4_define([AC_COPYRIGHT],
277 [AS_COPYRIGHT([$1])[]dnl
278 m4_divert_text(m4_default([$2], [VERSION_USER]),
284 # AC_REVISION(REVISION-INFO)
285 # --------------------------
286 # The second quote in the translit is just to cope with font-lock-mode
287 # which sees the opening of a string.
288 m4_define([AC_REVISION],
289 [m4_divert_text([HEADER-REVISION],
290 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
296 ## ---------------------------------------- ##
297 ## Requirements over the Autoconf version. ##
298 ## ---------------------------------------- ##
301 # AU::AC_PREREQ(VERSION)
302 # ----------------------
303 # Update this `AC_PREREQ' statement to require the current version of
304 # Autoconf. But fail if ever this autoupdate is too old.
306 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
307 # calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be
308 # quite complex for autoupdate to import the value of
309 # `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
310 # this would replace all its occurrences with the current version of
311 # Autoconf, which is certainly not what the user intended.
312 AU_DEFUN([AC_PREREQ],
313 [m4_version_prereq([$1])[]dnl
314 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
319 # Complain and exit if the Autoconf version is less than VERSION.
320 m4_copy([m4_version_prereq], [AC_PREREQ])
323 # AC_AUTOCONF_VERSION
324 # -------------------
325 # The current version of Autoconf parsing this file.
326 m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])
332 ## ---------------- ##
333 ## Initialization. ##
334 ## ---------------- ##
337 # All the following macros are used by AC_INIT. Ideally, they should
338 # be presented in the order in which they are output. Please, help us
339 # sorting it, or at least, don't augment the entropy.
344 # Provide useful headers; override the HEADER-COMMENT created by M4sh.
345 m4_define([_AC_INIT_NOTICE],
346 [m4_divert_text([KILL], [m4_undivert([HEADER-COMMENT])])dnl
347 m4_divert_text([HEADER-COMMENT],
348 [@%:@ Guess values for system-dependent variables and create Makefiles.
349 @%:@ Generated by m4_PACKAGE_STRING[]dnl
350 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
352 m4_ifset([AC_PACKAGE_BUGREPORT],
353 [m4_divert_text([HEADER-COMMENT],
355 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
361 # We dump to VERSION_FSF to make sure we are inserted before the
362 # user copyrights, and after the setup of the --version handling.
363 m4_define([_AC_INIT_COPYRIGHT],
365 [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
366 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
367 This configure script is free software; the Free Software Foundation
368 gives unlimited permission to copy, distribute and modify it.],
375 # Set up the file descriptors used by `configure'.
376 # File descriptor usage:
377 # 0 standard input (/dev/null)
379 # 2 errors and warnings
380 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
381 # AS_MESSAGE_FD checking for... messages and results
382 # AS_ORIGINAL_STDIN_FD original standard input (still open)
384 # stdin is /dev/null because checks that run programs may
385 # inadvertently run interactive ones, which would stop configuration
386 # until someone typed an EOF.
387 m4_define([AS_MESSAGE_FD], 6)
388 m4_define([AS_ORIGINAL_STDIN_FD], 7)
389 # That's how they used to be named.
390 AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
391 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
396 # Values which defaults can be set from `configure.ac'.
397 # `/bin/machine' is used in `glibcbug'. The others are used in config.*
398 m4_define([_AC_INIT_DEFAULTS],
399 [m4_divert_push([DEFAULTS])dnl
401 exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1
404 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
405 # so uname gets run too.
406 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
411 ac_default_prefix=/usr/local
413 ac_config_libobj_dir=.
419 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
420 AC_SUBST([PATH_SEPARATOR])dnl
422 # Identity of this package.
423 AC_SUBST([PACKAGE_NAME],
424 [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
425 AC_SUBST([PACKAGE_TARNAME],
426 [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
427 AC_SUBST([PACKAGE_VERSION],
428 [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
429 AC_SUBST([PACKAGE_STRING],
430 [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
431 AC_SUBST([PACKAGE_BUGREPORT],
432 [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
434 m4_divert_pop([DEFAULTS])dnl
435 m4_wrap([m4_divert_text([DEFAULTS],
436 [ac_subst_vars='m4_set_dump([_AC_SUBST_VARS], m4_newline)'
437 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
439 enable_option_checking
440 m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
442 m4_ifdef([_AC_PRECIOUS_VARS],
443 [_AC_ARG_VAR_STORE[]dnl
444 _AC_ARG_VAR_VALIDATE[]dnl
445 ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
446 m4_ifdef([_AC_LIST_SUBDIRS],
447 [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
449 ])# _AC_INIT_DEFAULTS
452 # AC_PREFIX_DEFAULT(PREFIX)
453 # -------------------------
454 AC_DEFUN([AC_PREFIX_DEFAULT],
455 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
458 # AC_PREFIX_PROGRAM(PROGRAM)
459 # --------------------------
460 # Guess the value for the `prefix' variable by looking for
461 # the argument program along PATH and taking its parent.
462 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
463 # set `prefix' to /usr/local/gnu.
464 # This comes too late to find a site file based on the prefix,
465 # and it might use a cached value for the path.
466 # No big loss, I think, since most configures don't use this macro anyway.
467 AC_DEFUN([AC_PREFIX_PROGRAM],
468 [if test "x$prefix" = xNONE; then
469 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
470 _AS_ECHO_N([checking for prefix by ])
471 AC_PATH_PROG(ac_prefix_program, [$1])
472 if test -n "$ac_prefix_program"; then
473 prefix=`AS_DIRNAME(["$ac_prefix_program"])`
474 prefix=`AS_DIRNAME(["$prefix"])`
477 ])# AC_PREFIX_PROGRAM
480 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
481 # ---------------------------------------------
482 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
483 # relative to the directory that configure is in, which we can look
484 # for to find out if srcdir is correct.
485 AC_DEFUN([AC_CONFIG_SRCDIR],
486 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
491 # Set ac_pwd, and sanity-check it and the source and installation directories.
493 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
495 AC_DEFUN([_AC_INIT_DIRCHECK],
496 [m4_divert_push([PARSE_ARGS])dnl
498 ac_pwd=`pwd` && test -n "$ac_pwd" &&
499 ac_ls_di=`ls -di .` &&
500 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
501 AC_MSG_ERROR([working directory cannot be determined])
502 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
503 AC_MSG_ERROR([pwd does not report name of working directory])
505 m4_divert_pop([PARSE_ARGS])dnl
506 ])# _AC_INIT_DIRCHECK
510 # Compute `srcdir' based on `$ac_unique_file'.
512 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
514 AC_DEFUN([_AC_INIT_SRCDIR],
515 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
516 m4_divert_push([PARSE_ARGS])dnl
518 # Find the source files, if location was not specified.
519 if test -z "$srcdir"; then
520 ac_srcdir_defaulted=yes
521 # Try the directory containing this script, then the parent directory.
522 ac_confdir=`AS_DIRNAME(["$as_myself"])`
524 if test ! -r "$srcdir/$ac_unique_file"; then
528 ac_srcdir_defaulted=no
530 if test ! -r "$srcdir/$ac_unique_file"; then
531 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
532 AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
534 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
536 cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
538 # When building in place, set srcdir=.
539 if test "$ac_abs_confdir" = "$ac_pwd"; then
542 # Remove unnecessary trailing slashes from srcdir.
543 # Double slashes in file names in object file debugging info
544 # mess up M-x gdb in Emacs.
546 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
548 m4_divert_pop([PARSE_ARGS])dnl
552 # _AC_INIT_PARSE_ARGS
553 # -------------------
554 m4_define([_AC_INIT_PARSE_ARGS],
555 [m4_divert_push([PARSE_ARGS])dnl
557 # Initialize some variables set by options.
559 ac_init_version=false
560 ac_unrecognized_opts=
562 # The variables have the same names as the options, with
563 # dashes changed to underlines.
565 AC_SUBST(exec_prefix, NONE)dnl
568 AC_SUBST(prefix, NONE)dnl
571 AC_SUBST(program_transform_name, [s,x,x,])dnl
579 # Installation directory options.
580 # These are left unexpanded so users can "make install exec_prefix=/foo"
581 # and all the variables that are supposed to be based on exec_prefix
582 # by default will actually change.
583 # Use braces instead of parens because sh, perl, etc. also accept them.
584 # (The list follows the same order as the GNU Coding Standards.)
585 AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
586 AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
587 AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
588 AC_SUBST([datarootdir], ['${prefix}/share'])dnl
589 AC_SUBST([datadir], ['${datarootdir}'])dnl
590 AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
591 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
592 AC_SUBST([localstatedir], ['${prefix}/var'])dnl
593 AC_SUBST([includedir], ['${prefix}/include'])dnl
594 AC_SUBST([oldincludedir], ['/usr/include'])dnl
595 AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
596 ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
597 ['${datarootdir}/doc/${PACKAGE}'])])dnl
598 AC_SUBST([infodir], ['${datarootdir}/info'])dnl
599 AC_SUBST([htmldir], ['${docdir}'])dnl
600 AC_SUBST([dvidir], ['${docdir}'])dnl
601 AC_SUBST([pdfdir], ['${docdir}'])dnl
602 AC_SUBST([psdir], ['${docdir}'])dnl
603 AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
604 AC_SUBST([localedir], ['${datarootdir}/locale'])dnl
605 AC_SUBST([mandir], ['${datarootdir}/man'])dnl
611 # If the previous option needs an argument, assign it.
612 if test -n "$ac_prev"; then
613 eval $ac_prev=\$ac_option
619 *=*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
623 # Accept the important Cygnus configure options, so we can diagnose typos.
625 case $ac_dashdash$ac_option in
629 -bindir | --bindir | --bindi | --bind | --bin | --bi)
631 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
634 -build | --build | --buil | --bui | --bu)
635 ac_prev=build_alias ;;
636 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
637 build_alias=$ac_optarg ;;
639 -cache-file | --cache-file | --cache-fil | --cache-fi \
640 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
641 ac_prev=cache_file ;;
642 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
643 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
644 cache_file=$ac_optarg ;;
647 cache_file=config.cache ;;
649 -datadir | --datadir | --datadi | --datad)
651 -datadir=* | --datadir=* | --datadi=* | --datad=*)
652 datadir=$ac_optarg ;;
654 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
655 | --dataroo | --dataro | --datar)
656 ac_prev=datarootdir ;;
657 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
658 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
659 datarootdir=$ac_optarg ;;
661 _AC_INIT_PARSE_ENABLE([disable])
663 -docdir | --docdir | --docdi | --doc | --do)
665 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
668 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
670 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
673 _AC_INIT_PARSE_ENABLE([enable])
675 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
676 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
677 | --exec | --exe | --ex)
678 ac_prev=exec_prefix ;;
679 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
680 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
681 | --exec=* | --exe=* | --ex=*)
682 exec_prefix=$ac_optarg ;;
684 -gas | --gas | --ga | --g)
685 # Obsolete; use --with-gas.
688 -help | --help | --hel | --he | -h)
690 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
691 ac_init_help=recursive ;;
692 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
693 ac_init_help=short ;;
695 -host | --host | --hos | --ho)
696 ac_prev=host_alias ;;
697 -host=* | --host=* | --hos=* | --ho=*)
698 host_alias=$ac_optarg ;;
700 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
702 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
704 htmldir=$ac_optarg ;;
706 -includedir | --includedir | --includedi | --included | --include \
707 | --includ | --inclu | --incl | --inc)
708 ac_prev=includedir ;;
709 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
710 | --includ=* | --inclu=* | --incl=* | --inc=*)
711 includedir=$ac_optarg ;;
713 -infodir | --infodir | --infodi | --infod | --info | --inf)
715 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
716 infodir=$ac_optarg ;;
718 -libdir | --libdir | --libdi | --libd)
720 -libdir=* | --libdir=* | --libdi=* | --libd=*)
723 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
724 | --libexe | --libex | --libe)
725 ac_prev=libexecdir ;;
726 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
727 | --libexe=* | --libex=* | --libe=*)
728 libexecdir=$ac_optarg ;;
730 -localedir | --localedir | --localedi | --localed | --locale)
732 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
733 localedir=$ac_optarg ;;
735 -localstatedir | --localstatedir | --localstatedi | --localstated \
736 | --localstate | --localstat | --localsta | --localst | --locals)
737 ac_prev=localstatedir ;;
738 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
739 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
740 localstatedir=$ac_optarg ;;
742 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
744 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
748 # Obsolete; use --without-fp.
751 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
752 | --no-cr | --no-c | -n)
755 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
756 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
759 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
760 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
761 | --oldin | --oldi | --old | --ol | --o)
762 ac_prev=oldincludedir ;;
763 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
764 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
765 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
766 oldincludedir=$ac_optarg ;;
768 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
770 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
773 -program-prefix | --program-prefix | --program-prefi | --program-pref \
774 | --program-pre | --program-pr | --program-p)
775 ac_prev=program_prefix ;;
776 -program-prefix=* | --program-prefix=* | --program-prefi=* \
777 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
778 program_prefix=$ac_optarg ;;
780 -program-suffix | --program-suffix | --program-suffi | --program-suff \
781 | --program-suf | --program-su | --program-s)
782 ac_prev=program_suffix ;;
783 -program-suffix=* | --program-suffix=* | --program-suffi=* \
784 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
785 program_suffix=$ac_optarg ;;
787 -program-transform-name | --program-transform-name \
788 | --program-transform-nam | --program-transform-na \
789 | --program-transform-n | --program-transform- \
790 | --program-transform | --program-transfor \
791 | --program-transfo | --program-transf \
792 | --program-trans | --program-tran \
793 | --progr-tra | --program-tr | --program-t)
794 ac_prev=program_transform_name ;;
795 -program-transform-name=* | --program-transform-name=* \
796 | --program-transform-nam=* | --program-transform-na=* \
797 | --program-transform-n=* | --program-transform-=* \
798 | --program-transform=* | --program-transfor=* \
799 | --program-transfo=* | --program-transf=* \
800 | --program-trans=* | --program-tran=* \
801 | --progr-tra=* | --program-tr=* | --program-t=*)
802 program_transform_name=$ac_optarg ;;
804 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
806 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
809 -psdir | --psdir | --psdi | --psd | --ps)
811 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
814 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
815 | -silent | --silent | --silen | --sile | --sil)
818 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
820 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
822 sbindir=$ac_optarg ;;
824 -sharedstatedir | --sharedstatedir | --sharedstatedi \
825 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
826 | --sharedst | --shareds | --shared | --share | --shar \
828 ac_prev=sharedstatedir ;;
829 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
830 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
831 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
833 sharedstatedir=$ac_optarg ;;
835 -site | --site | --sit)
837 -site=* | --site=* | --sit=*)
840 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
842 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
845 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
846 | --syscon | --sysco | --sysc | --sys | --sy)
847 ac_prev=sysconfdir ;;
848 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
849 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
850 sysconfdir=$ac_optarg ;;
852 -target | --target | --targe | --targ | --tar | --ta | --t)
853 ac_prev=target_alias ;;
854 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
855 target_alias=$ac_optarg ;;
857 -v | -verbose | --verbose | --verbos | --verbo | --verb)
860 -version | --version | --versio | --versi | --vers | -V)
863 _AC_INIT_PARSE_ENABLE([with])
865 _AC_INIT_PARSE_ENABLE([without])
868 # Obsolete; use --with-x.
871 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
872 | --x-incl | --x-inc | --x-in | --x-i)
873 ac_prev=x_includes ;;
874 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
875 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
876 x_includes=$ac_optarg ;;
878 -x-libraries | --x-libraries | --x-librarie | --x-librari \
879 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
880 ac_prev=x_libraries ;;
881 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
882 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
883 x_libraries=$ac_optarg ;;
885 -*) AC_MSG_ERROR([unrecognized option: $ac_option
886 Try `$[0] --help' for more information.])
890 ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
891 # Reject names that are not valid shell variable names.
892 expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
893 AC_MSG_ERROR([invalid variable name: $ac_envvar])
894 eval $ac_envvar=\$ac_optarg
898 # FIXME: should be removed in autoconf 3.0.
899 AC_MSG_WARN([you should use --build, --host, --target])
900 expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
901 AC_MSG_WARN([invalid host type: $ac_option])
902 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
908 if test -n "$ac_prev"; then
909 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
910 AC_MSG_ERROR([missing argument to $ac_option])
913 if test -n "$ac_unrecognized_opts"; then
914 case $enable_option_checking in
916 fatal) AC_MSG_ERROR([unrecognized options: $ac_unrecognized_opts]) ;;
917 *) AC_MSG_WARN( [unrecognized options: $ac_unrecognized_opts]) ;;
921 # Check all directory arguments for consistency.
922 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
923 datadir sysconfdir sharedstatedir localstatedir includedir \
924 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
925 libdir localedir mandir
927 eval ac_val=\$$ac_var
928 # Remove trailing slashes.
931 ac_val=`expr "X$ac_val" : 'X\(.*[[^/]]\)' \| "X$ac_val" : 'X\(.*\)'`
932 eval $ac_var=\$ac_val;;
934 # Be sure to have absolute directory names.
936 [[\\/$]]* | ?:[[\\/]]* ) continue;;
937 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
939 AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
942 # There might be people who depend on the old broken behavior: `$host'
943 # used to hold the argument of --host etc.
944 # FIXME: To remove some day.
949 # FIXME: To remove some day.
950 if test "x$host_alias" != x; then
951 if test "x$build_alias" = x; then
952 cross_compiling=maybe
953 AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
954 If a cross compiler is detected then cross compile mode will be used.])
955 elif test "x$build_alias" != "x$host_alias"; then
961 test -n "$host_alias" && ac_tool_prefix=$host_alias-
963 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
965 m4_divert_pop([PARSE_ARGS])dnl
966 ])# _AC_INIT_PARSE_ARGS
969 # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
970 # ----------------------------------
971 # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
973 m4_define([_AC_INIT_PARSE_ENABLE],
974 [m4_bmatch([$1], [^with],
975 [_AC_INIT_PARSE_ENABLE2([$1], [with])],
976 [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
979 # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
980 # --------------------------------------------------
981 # Handle an `--enable' or a `--with' option.
983 # OPTION-NAME is `enable', `disable', `with', or `without'.
984 # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'.
986 # Positive variant of the option is recognized by the condition
987 # OPTION-NAME == POSITIVE-NAME .
989 m4_define([_AC_INIT_PARSE_ENABLE2],
991 ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
992 # Reject names that are not valid shell variable names.
993 expr "x$ac_useropt" : "[.*[^-+._$as_cr_alnum]]" >/dev/null &&
995 [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt])
996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-+.]]/_/g'`
998 case $ac_user_opts in
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1005 eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
1011 # Handle the `configure --help' message.
1012 m4_define([_AC_INIT_HELP],
1013 [m4_divert_push([HELP_BEGIN])dnl
1016 # Report the --help message.
1018 if test "$ac_init_help" = "long"; then
1019 # Omit some internal or obsolete options to make the list less imposing.
1020 # This message is too long to be a string in the A/UX 3.1 sh.
1022 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
1023 [AC_PACKAGE_STRING],
1024 [this package]) to adapt to many kinds of systems.
1026 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1028 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
1029 VAR=VALUE. See below for descriptions of some of the useful variables.
1031 Defaults for the options are specified in brackets.
1034 -h, --help display this help and exit
1035 --help=short display options specific to this package
1036 --help=recursive display the short help of all the included packages
1037 -V, --version display version information and exit
1038 -q, --quiet, --silent do not print \`checking...' messages
1039 --cache-file=FILE cache test results in FILE [disabled]
1040 -C, --config-cache alias for \`--cache-file=config.cache'
1041 -n, --no-create do not create output files
1042 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1044 Installation directories:
1045 ]AS_HELP_STRING([--prefix=PREFIX],
1046 [install architecture-independent files in PREFIX [$ac_default_prefix]])
1047 AS_HELP_STRING([--exec-prefix=EPREFIX],
1048 [install architecture-dependent files in EPREFIX [PREFIX]])[
1050 By default, \`make install' will install all the files in
1051 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1052 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1053 for instance \`--prefix=\$HOME'.
1055 For better control, use the options below.
1057 Fine tuning of the installation directories:
1058 --bindir=DIR user executables [EPREFIX/bin]
1059 --sbindir=DIR system admin executables [EPREFIX/sbin]
1060 --libexecdir=DIR program executables [EPREFIX/libexec]
1061 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1062 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1063 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1064 --libdir=DIR object code libraries [EPREFIX/lib]
1065 --includedir=DIR C header files [PREFIX/include]
1066 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1067 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1068 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1069 --infodir=DIR info documentation [DATAROOTDIR/info]
1070 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1071 --mandir=DIR man documentation [DATAROOTDIR/man]
1072 ]AS_HELP_STRING([--docdir=DIR],
1073 [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME],
1074 [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[
1075 --htmldir=DIR html documentation [DOCDIR]
1076 --dvidir=DIR dvi documentation [DOCDIR]
1077 --pdfdir=DIR pdf documentation [DOCDIR]
1078 --psdir=DIR ps documentation [DOCDIR]
1082 m4_divert_pop([HELP_BEGIN])dnl
1083 dnl The order of the diversions here is
1085 dnl which may be extended by extra generic options such as with X or
1086 dnl AC_ARG_PROGRAM. Displayed only in long --help.
1089 dnl Support for cross compilation (--build, --host and --target).
1090 dnl Display only in long --help.
1093 dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1094 dnl then implements the header of the non generic options.
1103 dnl initialized below, in which we dump the trailer (handling of the
1104 dnl recursion for instance).
1105 m4_divert_push([HELP_ENABLE])dnl
1109 if test -n "$ac_init_help"; then
1110 m4_ifset([AC_PACKAGE_STRING],
1111 [ case $ac_init_help in
1112 short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1115 m4_divert_pop([HELP_ENABLE])dnl
1116 m4_divert_push([HELP_END])dnl
1117 m4_ifset([AC_PACKAGE_BUGREPORT], [
1118 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1123 if test "$ac_init_help" = "recursive"; then
1124 # If there are subdirs, report their specific --help.
1125 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1126 test -d "$ac_dir" ||
1127 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1129 _AC_SRCDIRS(["$ac_dir"])
1130 cd "$ac_dir" || { ac_status=$?; continue; }
1131 # Check for guested configure.
1132 if test -f "$ac_srcdir/configure.gnu"; then
1134 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1135 elif test -f "$ac_srcdir/configure"; then
1137 $SHELL "$ac_srcdir/configure" --help=recursive
1139 AC_MSG_WARN([no configuration information is in $ac_dir])
1141 cd "$ac_pwd" || { ac_status=$?; break; }
1145 test -n "$ac_init_help" && exit $ac_status
1146 m4_divert_pop([HELP_END])dnl
1152 # Handle the `configure --version' message.
1153 m4_define([_AC_INIT_VERSION],
1154 [m4_divert_text([VERSION_BEGIN],
1155 [if $ac_init_version; then
1157 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1158 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1159 generated by m4_PACKAGE_STRING])
1160 m4_divert_text([VERSION_END],
1164 ])# _AC_INIT_VERSION
1167 # _AC_INIT_CONFIG_LOG
1168 # -------------------
1169 # Initialize the config.log file descriptor and write header to it.
1170 m4_define([_AC_INIT_CONFIG_LOG],
1171 [m4_divert_text([INIT_PREPARE],
1172 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1173 cat >config.log <<_ACEOF
1174 This file contains any messages produced by compilers while
1175 running configure, to aid debugging if configure makes a mistake.
1177 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1178 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1179 generated by m4_PACKAGE_STRING. Invocation command line was
1184 exec AS_MESSAGE_LOG_FD>>config.log
1185 AS_UNAME >&AS_MESSAGE_LOG_FD
1187 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1190 m4_text_box([Core tests.])
1193 ])])# _AC_INIT_CONFIG_LOG
1198 # Called by AC_INIT to build the preamble of the `configure' scripts.
1199 # 1. Trap and clean up various tmp files.
1200 # 2. Set up the fd and output files
1201 # 3. Remember the options given to `configure' for `config.status --recheck'.
1202 # 4. Initiates confdefs.h
1203 # 5. Loads site and cache files
1204 m4_define([_AC_INIT_PREPARE],
1205 [m4_divert_push([INIT_PREPARE])dnl
1207 # Keep a trace of the command line.
1208 # Strip out --no-create and --no-recursion so they do not pile up.
1209 # Strip out --silent because we don't want to record it for future runs.
1210 # Also quote any args containing shell meta-characters.
1211 # Make two passes to allow for proper duplicate-argument suppression.
1215 ac_must_keep_next=false
1221 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1222 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1223 | -silent | --silent | --silen | --sile | --sil)
1226 ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1229 1) AS_VAR_APPEND([ac_configure_args0], [" '$ac_arg'"]) ;;
1231 AS_VAR_APPEND([ac_configure_args1], [" '$ac_arg'"])
1232 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1233 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1234 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1235 dnl give --prefix foo bar).
1236 if test $ac_must_keep_next = true; then
1237 ac_must_keep_next=false # Got value, back to normal.
1240 dnl Use broad patterns, as arguments that would have already made configure
1241 dnl exit don't matter.
1242 *=* | --config-cache | -C | -disable-* | --disable-* \
1243 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1244 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1245 | -with-* | --with-* | -without-* | --without-* | --x)
1246 case "$ac_configure_args0 " in
1247 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1250 -* ) ac_must_keep_next=true ;;
1253 AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"])
1258 AS_UNSET(ac_configure_args0)
1259 AS_UNSET(ac_configure_args1)
1261 # When interrupted or exit'd, cleanup temporary files, and complete
1262 # config.log. We remove comments because anyway the quotes in there
1263 # would cause problems or look ugly.
1264 # WARNING: Use '\'' to represent an apostrophe within the trap.
1265 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1266 trap 'exit_status=$?
1267 # Save into config.log some information that might help in debugging.
1271 AS_BOX([Cache variables.])
1273 m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1279 AS_BOX([Output variables.])
1281 for ac_var in $ac_subst_vars
1283 eval ac_val=\$$ac_var
1285 *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1287 AS_ECHO(["$ac_var='\''$ac_val'\''"])
1291 if test -n "$ac_subst_files"; then
1292 AS_BOX([File substitutions.])
1294 for ac_var in $ac_subst_files
1296 eval ac_val=\$$ac_var
1298 *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1300 AS_ECHO(["$ac_var='\''$ac_val'\''"])
1305 if test -s confdefs.h; then
1306 AS_BOX([confdefs.h.])
1311 test "$ac_signal" != 0 &&
1312 AS_ECHO(["$as_me: caught signal $ac_signal"])
1313 AS_ECHO(["$as_me: exit $exit_status"])
1314 } >&AS_MESSAGE_LOG_FD
1315 rm -f core *.core core.conftest.* &&
1316 rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1319 for ac_signal in 1 2 13 15; do
1320 trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1324 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1325 rm -f -r conftest* confdefs.h
1326 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1327 dnl containing less than 14 bytes (including the newline).
1328 dnl But the defines below solve this problem.
1330 # Predefined preprocessor variables.
1331 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1332 [Define to the full name of this package.])
1333 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1334 [Define to the one symbol short name of this package.])
1335 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1336 [Define to the version of this package.])
1337 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1338 [Define to the full name and version of this package.])
1339 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1340 [Define to the address where bug reports for this package
1343 # Let the site file select an alternate cache file if it wants to.
1346 m4_divert_pop([INIT_PREPARE])dnl
1347 ])# _AC_INIT_PREPARE
1350 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1351 # ----------------------------------------
1352 # This macro is used only for Autoupdate.
1354 [m4_ifval([$2], [[AC_INIT($@)]],
1357 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1361 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1362 # ----------------------------------------
1363 # Include the user macro files, prepare the diversions, and output the
1364 # preamble of the `configure' script.
1365 # Note that the order is important: first initialize, then set the
1367 m4_define([AC_INIT],
1368 [# Forbidden tokens and exceptions.
1369 m4_pattern_forbid([^_?A[CHUM]_])
1370 m4_pattern_forbid([_AC_])
1371 m4_pattern_forbid([^LIBOBJS$],
1372 [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1373 # Actually reserved by M4sh.
1374 m4_pattern_allow([^AS_FLAGS$])
1377 m4_divert_push([KILL])
1378 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1389 m4_divert_text([SHELL_FN], [
1390 m4_text_box([Autoconf initialization.])])
1392 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1394 dnl Substitute for predefined variables.
1396 AC_SUBST([ECHO_C])dnl
1397 AC_SUBST([ECHO_N])dnl
1398 AC_SUBST([ECHO_T])dnl
1400 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1401 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1402 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1410 ## ------------------------------------------------------------- ##
1411 ## Selecting optional features, working with optional software. ##
1412 ## ------------------------------------------------------------- ##
1414 # AC_PRESERVE_HELP_ORDER
1415 # ----------------------
1416 # Emit help strings in the order given, rather than grouping all --enable-FOO
1417 # and all --with-BAR.
1418 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1419 [m4_divert_once([HELP_ENABLE], [[
1420 Optional Features and Packages:
1421 --disable-option-checking ignore unrecognized --enable/--with options
1422 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1423 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1424 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1425 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
1426 m4_define([_m4_divert(HELP_ENABLE)], _m4_divert(HELP_WITH))
1427 ])# AC_PRESERVE_HELP_ORDER
1429 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1430 # -------------------------------------------------------------------
1431 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1432 # OPTION is either "enable" or "with".
1434 m4_define([_AC_ENABLE_IF],
1435 [@%:@ Check whether --$1-$2 was given.
1436 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])[]dnl
1439 m4_define([_AC_ENABLE_IF_ACTION],
1440 [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
1442 AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
1445 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1446 # ------------------------------------------------------------------------
1447 AC_DEFUN([AC_ARG_ENABLE],
1448 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1450 [m4_divert_once([HELP_ENABLE], [[
1452 --disable-option-checking ignore unrecognized --enable/--with options
1453 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1454 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])])dnl
1455 m4_divert_once([HELP_ENABLE], [$2])dnl
1456 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1460 AU_DEFUN([AC_ENABLE],
1461 [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
1464 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1465 # --------------------------------------------------------------------
1466 AC_DEFUN([AC_ARG_WITH],
1467 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1469 [m4_divert_once([HELP_WITH], [[
1471 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1472 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])])
1473 m4_divert_once([HELP_WITH], [$2])dnl
1474 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1478 [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
1480 # AC_DISABLE_OPTION_CHECKING
1481 # --------------------------------------------------------------------
1482 AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
1483 [m4_divert_once([DEFAULTS], [enable_option_checking=no])
1484 ])# AC_DISABLE_OPTION_CHECKING
1487 ## ----------------------------------------- ##
1488 ## Remembering variables for reconfiguring. ##
1489 ## ----------------------------------------- ##
1492 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1493 # ----------------------------------
1494 # Register VARNAME as a precious variable, and document it in
1495 # `configure --help' (but only once).
1496 AC_DEFUN([AC_ARG_VAR],
1497 [m4_divert_once([HELP_VAR], [[
1498 Some influential environment variables:]])dnl
1499 m4_divert_once([HELP_VAR_END], [[
1500 Use these variables to override the choices made by `configure' or to help
1501 it to find libraries and programs with nonstandard names/locations.]])dnl
1502 m4_expand_once([m4_divert_text([HELP_VAR],
1503 [AS_HELP_STRING([$1], [$2], [ ])])],
1506 _AC_ARG_VAR_PRECIOUS([$1])dnl
1510 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1511 # -----------------------------
1512 # Declare VARNAME is precious.
1513 m4_define([_AC_ARG_VAR_PRECIOUS],
1514 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1521 # We try to diagnose when precious variables have changed. To do this,
1522 # make two early snapshots (after the option processing to take
1523 # explicit variables into account) of those variables: one (ac_env_)
1524 # which represents the current run, and a second (ac_cv_env_) which,
1525 # at the first run, will be saved in the cache. As an exception to
1526 # the cache mechanism, its loading will override these variables (non
1527 # `ac_cv_env_' cache value are only set when unset).
1529 # In subsequent runs, after having loaded the cache, compare
1530 # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
1531 m4_define([_AC_ARG_VAR_STORE],
1532 [m4_divert_text([PARSE_ARGS],
1533 [for ac_var in $ac_precious_vars; do
1534 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1535 eval ac_env_${ac_var}_value=\$${ac_var}
1536 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1537 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1542 # _AC_ARG_VAR_VALIDATE
1543 # --------------------
1544 # The precious variables are saved twice at the beginning of
1545 # configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1546 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1547 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1549 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1550 # content of the cached values, while `ac_env_' represents that of the
1553 # So we check that `ac_env_' and `ac_cv_env_' are consistent. If
1555 m4_define([_AC_ARG_VAR_VALIDATE],
1556 [m4_divert_text([INIT_PREPARE],
1557 [# Check that the precious variables saved in the cache have kept the same
1559 ac_cache_corrupted=false
1560 for ac_var in $ac_precious_vars; do
1561 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1562 eval ac_new_set=\$ac_env_${ac_var}_set
1563 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1564 eval ac_new_val=\$ac_env_${ac_var}_value
1565 case $ac_old_set,$ac_new_set in
1567 AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1568 ac_cache_corrupted=: ;;
1570 AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1571 ac_cache_corrupted=: ;;
1574 if test "x$ac_old_val" != "x$ac_new_val"; then
1575 # differences in whitespace do not lead to failure.
1576 ac_old_val_w=`echo x $ac_old_val`
1577 ac_new_val_w=`echo x $ac_new_val`
1578 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1579 AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1580 ac_cache_corrupted=:
1582 AS_MESSAGE([warning: ignoring whitespace changes in `$ac_var' since the previous run:], 2)
1583 eval $ac_var=\$ac_old_val
1585 AS_MESSAGE([ former value: `$ac_old_val'], 2)
1586 AS_MESSAGE([ current value: `$ac_new_val'], 2)
1589 # Pass precious variables to config.status.
1590 if test "$ac_new_set" = set; then
1592 *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1593 *) ac_arg=$ac_var=$ac_new_val ;;
1595 case " $ac_configure_args " in
1596 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1597 *) AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;;
1601 if $ac_cache_corrupted; then
1602 AS_MESSAGE([error: in `$ac_pwd':], 2)
1603 AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1604 AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1606 ])# _AC_ARG_VAR_VALIDATE
1612 ## ---------------------------- ##
1613 ## Transforming program names. ##
1614 ## ---------------------------- ##
1619 # This macro is expanded only once, to avoid that `foo' ends up being
1620 # installed as `ggfoo'.
1621 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1622 [dnl Document the options.
1623 m4_divert_push([HELP_BEGIN])dnl
1626 --program-prefix=PREFIX prepend PREFIX to installed program names
1627 --program-suffix=SUFFIX append SUFFIX to installed program names
1628 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1629 m4_divert_pop([HELP_BEGIN])dnl
1630 test "$program_prefix" != NONE &&
1631 program_transform_name="s&^&$program_prefix&;$program_transform_name"
1632 # Use a double $ so make ignores it.
1633 test "$program_suffix" != NONE &&
1634 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1635 # Double any \ or $.
1636 # By default was `s,x,x', remove it if useless.
1637 [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
1638 program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
1645 ## ------------------------- ##
1646 ## Finding auxiliary files. ##
1647 ## ------------------------- ##
1650 # AC_CONFIG_AUX_DIR(DIR)
1651 # ----------------------
1652 # Find install-sh, config.sub, config.guess, and Cygnus configure
1653 # in directory DIR. These are auxiliary files used in configuration.
1654 # DIR can be either absolute or relative to $srcdir.
1655 AC_DEFUN([AC_CONFIG_AUX_DIR],
1656 [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
1659 # AC_CONFIG_AUX_DIR_DEFAULT
1660 # -------------------------
1661 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1662 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1663 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1664 [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
1667 # AC_CONFIG_AUX_DIRS(DIR ...)
1668 # ---------------------------
1669 # Internal subroutine.
1670 # Search for the configuration auxiliary files in directory list $1.
1671 # We look only for install-sh, so users of AC_PROG_INSTALL
1672 # do not automatically need to distribute the other auxiliary files.
1673 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1675 for ac_dir in $1; do
1676 for ac_t in install-sh install.sh shtool; do
1677 if test -f "$ac_dir/$ac_t"; then
1679 ac_install_sh="$ac_aux_dir/$ac_t -c"
1684 if test -z "$ac_aux_dir"; then
1685 AC_MSG_ERROR([cannot find install-sh, install.sh, or shtool in $1])
1688 # These three variables are undocumented and unsupported,
1689 # and are intended to be withdrawn in a future Autoconf release.
1690 # They can cause serious problems if a builder's source tree is in a directory
1691 # whose full name contains unusual characters.
1692 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
1693 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
1694 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
1696 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1697 ])# AC_CONFIG_AUX_DIRS
1702 ## ------------------------ ##
1703 ## Finding aclocal macros. ##
1704 ## ------------------------ ##
1707 # AC_CONFIG_MACRO_DIR(DIR)
1708 # ------------------------
1709 # Declare directory containing additional macros for aclocal.
1710 AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
1714 ## --------------------- ##
1715 ## Requiring aux files. ##
1716 ## --------------------- ##
1718 # AC_REQUIRE_AUX_FILE(FILE)
1719 # -------------------------
1720 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1721 # It announces FILE is required in the auxdir.
1722 m4_define([AC_REQUIRE_AUX_FILE],
1723 [AS_LITERAL_IF([$1], [],
1724 [AC_FATAL([$0: requires a literal argument])])])
1728 ## ----------------------------------- ##
1729 ## Getting the canonical system type. ##
1730 ## ----------------------------------- ##
1733 # configure --host=HOST --target=TARGET --build=BUILD
1736 # 1. Build defaults to the current platform, as determined by config.guess.
1737 # 2. Host defaults to build.
1738 # 3. Target defaults to host.
1741 # _AC_CANONICAL_SPLIT(THING)
1742 # --------------------------
1743 # Generate the variables THING, THING_{alias cpu vendor os}.
1744 m4_define([_AC_CANONICAL_SPLIT],
1747 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1749 AC_SUBST([$1], [$ac_cv_$1])dnl
1750 ac_save_IFS=$IFS; IFS='-'
1753 AC_SUBST([$1_cpu], [$[1]])dnl
1754 AC_SUBST([$1_vendor], [$[2]])dnl
1756 [# Remember, the first character of IFS is used to create $]*,
1757 # except with old shells:
1760 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
1761 AC_SUBST([$1_os])dnl
1762 ])# _AC_CANONICAL_SPLIT
1765 # AC_CANONICAL_BUILD
1766 # ------------------
1767 AC_DEFUN([AC_CANONICAL_BUILD],
1768 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1769 AC_REQUIRE_AUX_FILE([config.sub])dnl
1770 AC_REQUIRE_AUX_FILE([config.guess])dnl
1771 m4_divert_once([HELP_CANON],
1774 --build=BUILD configure for building on BUILD [guessed]]])dnl
1775 # Make sure we can run config.sub.
1776 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1777 AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
1779 AC_CACHE_CHECK([build system type], [ac_cv_build],
1780 [ac_build_alias=$build_alias
1781 test "x$ac_build_alias" = x &&
1782 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1783 test "x$ac_build_alias" = x &&
1784 AC_MSG_ERROR([cannot guess build type; you must specify one])
1785 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1786 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
1788 _AC_CANONICAL_SPLIT(build)
1789 ])# AC_CANONICAL_BUILD
1794 AC_DEFUN([AC_CANONICAL_HOST],
1795 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1796 m4_divert_once([HELP_CANON],
1797 [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl
1798 AC_CACHE_CHECK([host system type], [ac_cv_host],
1799 [if test "x$host_alias" = x; then
1800 ac_cv_host=$ac_cv_build
1802 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1803 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
1806 _AC_CANONICAL_SPLIT([host])
1807 ])# AC_CANONICAL_HOST
1810 # AC_CANONICAL_TARGET
1811 # -------------------
1812 AC_DEFUN([AC_CANONICAL_TARGET],
1813 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1814 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1815 m4_divert_once([HELP_CANON],
1816 [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
1817 AC_CACHE_CHECK([target system type], [ac_cv_target],
1818 [if test "x$target_alias" = x; then
1819 ac_cv_target=$ac_cv_host
1821 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
1822 AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
1825 _AC_CANONICAL_SPLIT([target])
1827 # The aliases save the names the user supplied, while $host etc.
1828 # will get canonicalized.
1829 test -n "$target_alias" &&
1830 test "$program_prefix$program_suffix$program_transform_name" = \
1832 program_prefix=${target_alias}-[]dnl
1833 ])# AC_CANONICAL_TARGET
1836 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1839 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1840 # ------------------------------------------
1841 # If the cache file is inconsistent with the current host,
1842 # target and build system types, execute CMD or print a default
1843 # error message. Now handled via _AC_ARG_VAR_PRECIOUS.
1844 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1847 ## ---------------------- ##
1848 ## Caching test results. ##
1849 ## ---------------------- ##
1854 # Look for site- or system-specific initialization scripts.
1855 m4_define([AC_SITE_LOAD],
1856 [# Prefer an explicitly selected file to automatically selected ones.
1859 if test -n "$CONFIG_SITE"; then
1860 ac_site_file1=$CONFIG_SITE
1861 elif test "x$prefix" != xNONE; then
1862 ac_site_file1=$prefix/share/config.site
1863 ac_site_file2=$prefix/etc/config.site
1865 ac_site_file1=$ac_default_prefix/share/config.site
1866 ac_site_file2=$ac_default_prefix/etc/config.site
1868 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1870 test "x$ac_site_file" = xNONE && continue
1871 if test -r "$ac_site_file"; then
1872 AC_MSG_NOTICE([loading site script $ac_site_file])
1873 sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1882 m4_define([AC_CACHE_LOAD],
1883 [if test -r "$cache_file"; then
1884 # Some versions of bash will fail to source /dev/null (special
1885 # files actually), so we avoid doing that.
1886 if test -f "$cache_file"; then
1887 AC_MSG_NOTICE([loading cache $cache_file])
1889 [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
1890 *) . "./$cache_file";;
1894 AC_MSG_NOTICE([creating cache $cache_file])
1902 # Dump the cache to stdout. It can be in a pipe (this is a requirement).
1903 m4_define([_AC_CACHE_DUMP],
1904 [# The following way of writing the cache mishandles newlines in values,
1905 # but we know of no workaround that is simple, portable, and efficient.
1906 # So, we kill variables containing newlines.
1907 # Ultrix sh set writes to stderr and can't be redirected directly,
1908 # and sets the high bit in the cache file unless we assign to the vars.
1910 for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
1911 eval ac_val=\$$ac_var
1915 *_cv_*) AC_MSG_WARN([cache variable $ac_var contains a newline]) ;;
1918 _ | IFS | as_nl) ;; #(
1919 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1920 *) AS_UNSET([$ac_var]) ;;
1926 case $as_nl`(ac_space=' '; set) 2>&1` in #(
1927 *${as_nl}ac_space=\ *)
1928 # `set' does not quote correctly, so add quotes (double-quote
1929 # substitution turns \\\\ into \\, and sed turns \\ into \).
1932 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1935 # `set' quotes correctly as required by POSIX, so do not add quotes.
1936 sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
1947 # Allow a site initialization script to override cache values.
1948 m4_define([AC_CACHE_SAVE],
1949 [cat >confcache <<\_ACEOF
1950 # This file is a shell script that caches the results of configure
1951 # tests run on this system so they can be shared between configure
1952 # scripts and configure runs, see configure's option --config-cache.
1953 # It is not useful on other systems. If it contains results you don't
1954 # want to keep, you may remove or edit it.
1956 # config.status only pays attention to the cache file if you give it
1957 # the --recheck option to rerun configure.
1959 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1960 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1970 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1972 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1974 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1975 if test -w "$cache_file"; then
1976 test "x$cache_file" != "x/dev/null" &&
1977 AC_MSG_NOTICE([updating cache $cache_file])
1978 cat confcache >$cache_file
1980 AC_MSG_NOTICE([not updating unwritable cache $cache_file])
1983 rm -f confcache[]dnl
1987 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1988 # ------------------------------------------
1989 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1990 # Should be dnl'ed. Try to catch common mistakes.
1991 m4_defun([AC_CACHE_VAL],
1992 [AS_LITERAL_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
1993 [AC_DIAGNOSE([syntax],
1994 [$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl
1995 m4_if(m4_index([$2], [AC_DEFINE]), [-1], [],
1996 [AC_DIAGNOSE([syntax],
1997 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1998 [where no actions should be taken])])dnl
1999 m4_if(m4_index([$2], [AC_SUBST]), [-1], [],
2000 [AC_DIAGNOSE([syntax],
2001 [$0($1, ...): suspicious presence of an AC_SUBST in the second argument, ]dnl
2002 [where no actions should be taken])])dnl
2004 [_AS_ECHO_N([(cached) ])],
2008 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
2009 # -------------------------------------------
2010 # Do not call this macro with a dnl right behind.
2011 m4_defun([AC_CACHE_CHECK],
2012 [AC_MSG_CHECKING([$1])
2013 AC_CACHE_VAL([$2], [$3])dnl
2015 [AC_MSG_RESULT([$$2])],
2016 [AS_VAR_COPY([ac_res], [$2])
2017 AC_MSG_RESULT([$ac_res])])dnl
2020 # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
2021 # [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
2022 # -------------------------------------------------------------
2023 AC_DEFUN([_AC_CACHE_CHECK_INT],
2024 [AC_CACHE_CHECK([$1], [$2],
2025 [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
2026 ])# _AC_CACHE_CHECK_INT
2030 ## ---------------------- ##
2031 ## Defining CPP symbols. ##
2032 ## ---------------------- ##
2035 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
2036 # -------------------------------------------
2037 # Used by --trace to collect the list of AC_DEFINEd macros.
2038 m4_define([AC_DEFINE_TRACE_LITERAL],
2039 [m4_pattern_allow([^$1$])dnl
2040 AS_IDENTIFIER_IF([$1], [],
2041 [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
2042 ])# AC_DEFINE_TRACE_LITERAL
2045 # AC_DEFINE_TRACE(CPP-SYMBOL)
2046 # ---------------------------
2047 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
2048 # out non literal symbols. CPP-SYMBOL must not include any parameters.
2049 m4_define([AC_DEFINE_TRACE],
2050 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
2053 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2054 # -------------------------------------------
2055 # Set VARIABLE to VALUE, verbatim, or 1. Remember the value
2056 # and if VARIABLE is affected the same VALUE, do nothing, else
2057 # die. The third argument is used by autoheader.
2058 m4_define([AC_DEFINE], [_AC_DEFINE_Q([\], $@)])
2061 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2062 # ----------------------------------------------------
2063 # Similar, but perform shell substitutions $ ` \ once on VALUE.
2064 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([], $@)])
2067 # _AC_DEFINE_Q(QUOTE, VARIABLE, [VALUE], [DESCRIPTION])
2068 # -----------------------------------------------------
2069 # Internal function that performs common elements of AC_DEFINE{,_UNQUOTED}.
2071 # m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so only
2072 # use the regex when necessary. AC_name is defined with over-quotation,
2073 # so that we can avoid m4_defn.
2074 m4_define([_AC_DEFINE_Q],
2075 [m4_pushdef([AC_name], m4_if(m4_index([$2], [(]), [-1], [[[$2]]],
2076 [m4_bpatsubst([[[$2]]], [(.*)])]))dnl
2077 AC_DEFINE_TRACE(AC_name)dnl
2078 m4_cond([m4_index([$3], [
2080 [AS_LITERAL_IF([$3], [m4_bregexp([[$3]], [[^\\]
2082 [m4_warn([syntax], [AC_DEFINE]m4_ifval([$1], [], [[_UNQUOTED]])dnl
2083 [: `$3' is not a valid preprocessor define value])])dnl
2084 m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4])])dnl
2085 m4_popdef([AC_name])dnl
2086 cat >>confdefs.h <<$1_ACEOF
2087 [@%:@define] $2 m4_if([$#], 2, 1, [$3], [], [/**/], [$3])
2093 ## -------------------------- ##
2094 ## Setting output variables. ##
2095 ## -------------------------- ##
2098 # AC_SUBST_TRACE(VARIABLE)
2099 # ------------------------
2100 # This macro is used with --trace to collect the list of substituted variables.
2101 m4_define([AC_SUBST_TRACE])
2104 # AC_SUBST(VARIABLE, [VALUE])
2105 # ---------------------------
2106 # Create an output variable from a shell VARIABLE. If VALUE is given
2107 # assign it to VARIABLE. Use `""' if you want to set VARIABLE to an
2108 # empty value, not an empty second argument.
2110 m4_define([AC_SUBST],
2111 [AS_IDENTIFIER_IF([$1], [],
2112 [AC_FATAL([$0: `$1' is not a valid shell variable name])])dnl
2113 AC_SUBST_TRACE([$1])dnl
2114 m4_pattern_allow([^$1$])dnl
2115 m4_ifvaln([$2], [$1=$2])[]dnl
2116 m4_set_add([_AC_SUBST_VARS], [$1])dnl
2120 # AC_SUBST_FILE(VARIABLE)
2121 # -----------------------
2122 # Read the comments of the preceding macro.
2123 m4_define([AC_SUBST_FILE],
2124 [m4_pattern_allow([^$1$])dnl
2125 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2130 ## --------------------------------------- ##
2131 ## Printing messages at autoconf runtime. ##
2132 ## --------------------------------------- ##
2134 # In fact, I think we should promote the use of m4_warn and m4_fatal
2135 # directly. This will also avoid to some people to get it wrong
2136 # between AC_FATAL and AC_MSG_ERROR.
2139 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2140 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2141 # --------------------------------
2142 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2143 m4_define([AC_FATAL], [m4_fatal($@)])
2146 # AC_WARNING(MESSAGE)
2147 # -------------------
2148 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2150 m4_define([AC_WARNING],
2151 [AC_DIAGNOSE([syntax], [$1])])
2156 ## ---------------------------------------- ##
2157 ## Printing messages at configure runtime. ##
2158 ## ---------------------------------------- ##
2161 # AC_MSG_CHECKING(FEATURE)
2162 # ------------------------
2163 m4_define([AC_MSG_CHECKING],
2164 [{ _AS_ECHO_LOG([checking $1])
2165 _AS_ECHO_N([checking $1... ]); }dnl
2169 # AC_MSG_RESULT(RESULT)
2170 # ---------------------
2171 m4_define([AC_MSG_RESULT],
2172 [{ _AS_ECHO_LOG([result: $1])
2173 _AS_ECHO([$1]); }dnl
2177 # AC_MSG_WARN(PROBLEM)
2178 # AC_MSG_NOTICE(STRING)
2179 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2180 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2181 # ----------------------------------------
2182 m4_copy([AS_WARN], [AC_MSG_WARN])
2183 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2184 m4_copy([AS_ERROR], [AC_MSG_ERROR])
2185 m4_define([AC_MSG_FAILURE],
2186 [{ AS_MESSAGE([error: in `$ac_pwd':], 2)
2188 See `config.log' for more details.], [$2]); }])
2191 # _AC_MSG_LOG_CONFTEST
2192 # --------------------
2193 m4_define([_AC_MSG_LOG_CONFTEST],
2194 [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
2195 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2199 # AU::AC_CHECKING(FEATURE)
2200 # ------------------------
2201 AU_DEFUN([AC_CHECKING],
2202 [AS_MESSAGE([checking $1...])])
2205 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2206 # ----------------------------------
2207 # No escaping, so it performed also backtick substitution.
2208 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2209 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
2210 _AS_ECHO_UNQUOTED([$1])[]dnl
2214 # AU::AC_VERBOSE(STRING)
2215 # ----------------------
2216 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2223 ## ---------------------------- ##
2224 ## Compiler-running mechanics. ##
2225 ## ---------------------------- ##
2228 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2229 # ----------------------------------
2230 # Eval COMMAND, save the exit status in ac_status, and log it.
2231 AC_DEFUN([_AC_RUN_LOG],
2232 [{ ($2) >&AS_MESSAGE_LOG_FD
2233 ($1) 2>&AS_MESSAGE_LOG_FD
2235 _AS_ECHO_LOG([\$? = $ac_status])
2236 (exit $ac_status); }])
2239 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2240 # -----------------------------------------
2241 # Run COMMAND, save its stderr into conftest.err, save the exit status
2242 # in ac_status, and log it. Don't forget to clean up conftest.err after
2244 # Note that when tracing, most shells will leave the traces in stderr
2245 # starting with "+": that's what this macro tries to address.
2246 AC_DEFUN([_AC_RUN_LOG_STDERR],
2247 [{ ($2) >&AS_MESSAGE_LOG_FD
2250 grep -v '^ *+' conftest.er1 >conftest.err
2252 cat conftest.err >&AS_MESSAGE_LOG_FD
2253 _AS_ECHO_LOG([\$? = $ac_status])
2254 (exit $ac_status); }])
2256 # _AC_DO_ECHO(COMMAND)
2257 # --------------------
2258 # Echo COMMAND. This is designed to be used just before evaluating COMMAND.
2259 AC_DEFUN([_AC_DO_ECHO],
2260 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2262 dnl If the string contains '\"', '`', or '\\', then just echo it rather
2263 dnl than expanding it. This is a hack, but it is safer, while also
2264 dnl typically expanding simple substrings like '$CC', which is what we want.
2266 dnl Much of this macro body is quoted, to work around misuses like
2267 dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2268 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2269 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2270 dnl underquoting misuses, such as
2271 dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2272 dnl We normally wouldn't bother with this kind of workaround for invalid code
2273 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2274 dnl minimize the integration hassle.
2275 [case "(($ac_try" in
2276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2277 *) ac_try_echo=$ac_try;;
2279 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""]
2280 AS_ECHO(["$ac_try_echo"])])
2284 # Eval COMMAND, save the exit status in ac_status, and log it.
2285 # For internal use only.
2287 [_AC_RUN_LOG([eval "$1"],
2288 [_AC_DO_ECHO([$1])])])
2291 # _AC_DO_STDERR(COMMAND)
2292 # ----------------------
2293 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2294 AC_DEFUN([_AC_DO_STDERR],
2295 [_AC_RUN_LOG_STDERR([eval "$1"],
2296 [_AC_DO_ECHO([$1])])])
2299 # _AC_DO_VAR(VARIABLE)
2300 # --------------------
2301 # Evaluate "$VARIABLE", which should be a valid shell command.
2302 # The purpose of this macro is to write "configure:123: command line"
2303 # into config.log for every test run.
2304 AC_DEFUN([_AC_DO_VAR],
2308 # _AC_DO_TOKENS(COMMAND)
2309 # ----------------------
2310 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2311 # tokens of the shell command language.
2312 AC_DEFUN([_AC_DO_TOKENS],
2314 _AC_DO([$ac_try]); }])
2319 # Eval COMMAND, save the exit status in ac_status, and log it.
2320 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2321 # It is present only for backward compatibility with previous Autoconf versions.
2322 AC_DEFUN([_AC_EVAL],
2323 [_AC_RUN_LOG([eval $1],
2324 [eval echo "$as_me:$LINENO: \"$1\""])])
2327 # _AC_EVAL_STDERR(COMMAND)
2328 # ------------------------
2329 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2330 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2331 # It is present only for backward compatibility with previous Autoconf versions.
2332 AC_DEFUN([_AC_EVAL_STDERR],
2333 [_AC_RUN_LOG_STDERR([eval $1],
2334 [eval echo "$as_me:$LINENO: \"$1\""])])
2337 # AC_TRY_EVAL(VARIABLE)
2338 # ---------------------
2339 # Evaluate $VARIABLE, which should be a valid shell command.
2340 # The purpose of this macro is to write "configure:123: command line"
2341 # into config.log for every test run.
2343 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2344 # undocumented, and should not be used.
2345 # They may be removed or their API changed in a future release.
2346 # Autoconf itself no longer uses these two macros; they are present
2347 # only for backward compatibility with previous versions of Autoconf.
2348 # Not every shell command will work due to problems with eval
2349 # and quoting, and the rules for exactly what does work are tricky.
2350 # Worse, due to double-expansion during evaluation, arbitrary unintended
2351 # shell commands could be executed in some situations.
2352 AC_DEFUN([AC_TRY_EVAL],
2356 # AC_TRY_COMMAND(COMMAND)
2357 # -----------------------
2358 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2359 # tokens of the shell command language.
2360 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2361 AC_DEFUN([AC_TRY_COMMAND],
2363 _AC_EVAL([$ac_try]); }])
2366 # AC_RUN_LOG(COMMAND)
2367 # -------------------
2368 AC_DEFUN([AC_RUN_LOG],
2370 [AS_ECHO(["$as_me:$LINENO: AS_ESCAPE([$1])"])])])
2375 ## ------------------------ ##
2376 ## Examining declarations. ##
2377 ## ------------------------ ##
2380 # _AC_PREPROC_IFELSE_BODY
2381 # -----------------------
2382 # Shell function body for _AC_PREPROC_IFELSE.
2383 m4_define([_AC_PREPROC_IFELSE_BODY],
2384 [ AS_LINENO_PUSH([$[]1])
2385 AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && {
2386 test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2387 test ! -s conftest.err
2390 [_AC_MSG_LOG_CONFTEST
2395 ])# _AC_PREPROC_IFELSE_BODY
2398 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2399 # ----------------------------------------------------------------
2400 # Try to preprocess PROGRAM.
2402 # This macro can be used during the selection of a preprocessor.
2403 # eval is necessary to expand ac_cpp.
2404 AC_DEFUN([_AC_PREPROC_IFELSE],
2405 [AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_cpp],
2406 [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_cpp], [LINENO],
2407 [Try to preprocess conftest.$ac_ext, and return whether this succeeded.])],
2409 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2410 [AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3])
2411 m4_ifvaln([$1], [rm -f conftest.$ac_ext])dnl
2412 ])# _AC_PREPROC_IFELSE
2414 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2415 # ---------------------------------------------------------------
2416 # Try to preprocess PROGRAM. Requires that the preprocessor for the
2417 # current language was checked for, hence do not use this macro in macros
2418 # looking for a preprocessor.
2419 AC_DEFUN([AC_PREPROC_IFELSE],
2420 [AC_LANG_PREPROC_REQUIRE()dnl
2421 _AC_PREPROC_IFELSE($@)])
2424 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2425 # ---------------------------------------------------------
2426 # AC_TRY_CPP is used to check whether particular header files exist.
2427 # (But it actually tests whether INCLUDES produces no CPP errors.)
2429 # INCLUDES are not defaulted and are double quoted.
2430 AU_DEFUN([AC_TRY_CPP],
2431 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2434 # AC_EGREP_CPP(PATTERN, PROGRAM,
2435 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2436 # ------------------------------------------------------
2437 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2438 # come early, it is not included in AC_BEFORE checks.
2439 AC_DEFUN([AC_EGREP_CPP],
2440 [AC_LANG_PREPROC_REQUIRE()dnl
2441 AC_REQUIRE([AC_PROG_EGREP])dnl
2442 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2443 AS_IF([dnl eval is necessary to expand ac_cpp.
2444 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2445 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2446 dnl Quote $1 to prevent m4 from eating character classes
2447 $EGREP "[$1]" >/dev/null 2>&1],
2454 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2455 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2456 # ---------------------------------------------------------
2457 AC_DEFUN([AC_EGREP_HEADER],
2465 ## ------------------ ##
2466 ## Examining syntax. ##
2467 ## ------------------ ##
2469 # _AC_COMPILE_IFELSE_BODY
2470 # -----------------------
2471 # Shell function body for _AC_COMPILE_IFELSE.
2472 m4_define([_AC_COMPILE_IFELSE_BODY],
2473 [ AS_LINENO_PUSH([$[]1])
2474 rm -f conftest.$ac_objext
2475 AS_IF([_AC_DO_STDERR($ac_compile) && {
2476 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2477 test ! -s conftest.err
2478 } && test -s conftest.$ac_objext],
2480 [_AC_MSG_LOG_CONFTEST
2482 rm -f core conftest.err conftest.$ac_objext
2485 ])# _AC_COMPILE_IFELSE_BODY
2488 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2489 # ----------------------------------------------------------------
2490 # Try to compile PROGRAM.
2491 # This macro can be used during the selection of a compiler.
2492 AC_DEFUN([_AC_COMPILE_IFELSE],
2493 [AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_compile],
2494 [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_compile], [LINENO],
2495 [Try to compile conftest.$ac_ext, and return whether this succeeded.])],
2497 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2498 [AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3])
2499 m4_ifvaln([$1], [rm -f conftest.$ac_ext])dnl
2500 ])# _AC_COMPILE_IFELSE
2503 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2504 # ---------------------------------------------------------------
2505 # Try to compile PROGRAM. Requires that the compiler for the current
2506 # language was checked for, hence do not use this macro in macros looking
2508 AC_DEFUN([AC_COMPILE_IFELSE],
2509 [AC_LANG_COMPILER_REQUIRE()dnl
2510 _AC_COMPILE_IFELSE($@)])
2513 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2514 # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2515 # ---------------------------------------------------
2516 AU_DEFUN([AC_TRY_COMPILE],
2517 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2521 ## --------------------- ##
2522 ## Examining libraries. ##
2523 ## --------------------- ##
2526 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2527 # -------------------------------------------------------------
2528 # Try to link PROGRAM.
2529 # This macro can be used during the selection of a compiler.
2531 # Test that resulting file is executable; see the problem reported by mwoehlke
2532 # in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
2533 # But skip the test when cross-compiling, to prevent problems like the one
2534 # reported by Chris Johns in
2535 # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
2537 m4_define([_AC_LINK_IFELSE],
2538 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2539 rm -f conftest.$ac_objext conftest$ac_exeext
2540 AS_IF([_AC_DO_STDERR($ac_link) && {
2541 test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2542 test ! -s conftest.err
2543 } && test -s conftest$ac_exeext && {
2544 test "$cross_compiling" = yes ||
2545 AS_TEST_X([conftest$ac_exeext])
2548 [_AC_MSG_LOG_CONFTEST
2550 dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization)
2551 dnl information created by the PGI compiler (conftest_ipa8_conftest.oo),
2552 dnl as it would interfere with the next link command.
2553 rm -rf conftest.dSYM
2554 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
2555 conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2559 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2560 # ------------------------------------------------------------
2561 # Try to link PROGRAM. Requires that the compiler for the current
2562 # language was checked for, hence do not use this macro in macros looking
2564 AC_DEFUN([AC_LINK_IFELSE],
2565 [AC_LANG_COMPILER_REQUIRE()dnl
2566 _AC_LINK_IFELSE($@)])
2569 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2570 # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2571 # ------------------------------------------------
2572 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2573 AU_DEFUN([AC_TRY_LINK],
2574 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2577 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2578 # ACTION-IF-TRUE, [ACTION-IF-FALSE])
2579 # ---------------------------------------------------
2580 AU_DEFUN([AC_COMPILE_CHECK],
2581 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2582 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2587 ## ------------------------------- ##
2588 ## Checking for runtime features. ##
2589 ## ------------------------------- ##
2592 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2593 # ------------------------------------------------------------
2594 # Compile, link, and run.
2595 # This macro can be used during the selection of a compiler.
2596 # We also remove conftest.o as if the compilation fails, some compilers
2597 # don't remove it. We remove gmon.out and bb.out, which may be
2598 # created during the run if the program is built with profiling support.
2599 m4_define([_AC_RUN_IFELSE],
2600 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2601 rm -f conftest$ac_exeext
2602 AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2604 [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
2605 _AC_MSG_LOG_CONFTEST
2607 [( exit $ac_status )
2609 rm -rf conftest.dSYM
2610 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2611 [conftest.$ac_ext])[]dnl
2615 # AC_RUN_IFELSE(PROGRAM,
2616 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2617 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2618 # ----------------------------------------------------------
2619 # Compile, link, and run. Requires that the compiler for the current
2620 # language was checked for, hence do not use this macro in macros looking
2622 AC_DEFUN([AC_RUN_IFELSE],
2623 [AC_LANG_COMPILER_REQUIRE()dnl
2625 [AC_DIAGNOSE([cross],
2626 [$0 called without default to allow cross compiling])])dnl
2627 AS_IF([test "$cross_compiling" = yes],
2629 [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2630 [_AC_RUN_IFELSE($@)])
2634 # AC_TRY_RUN(PROGRAM,
2635 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2636 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2637 # --------------------------------------------------------
2638 AU_DEFUN([AC_TRY_RUN],
2639 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2643 ## ------------------------------------- ##
2644 ## Checking for the existence of files. ##
2645 ## ------------------------------------- ##
2647 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2648 # -------------------------------------------------------------
2650 # Check for the existence of FILE.
2651 AC_DEFUN([AC_CHECK_FILE],
2652 [AC_DIAGNOSE([cross],
2653 [cannot check for file existence when cross compiling])dnl
2654 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2655 AC_CACHE_CHECK([for $1], [ac_File],
2656 [test "$cross_compiling" = yes &&
2657 AC_MSG_ERROR([cannot check for file existence when cross compiling])
2658 if test -r "$1"; then
2659 AS_VAR_SET([ac_File], [yes])
2661 AS_VAR_SET([ac_File], [no])
2663 AS_VAR_IF([ac_File], [yes], [$2], [$3])[]dnl
2664 AS_VAR_POPDEF([ac_File])dnl
2668 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2669 # -----------------------------------------------------------------
2670 AC_DEFUN([AC_CHECK_FILES],
2671 [m4_foreach_w([AC_FILE_NAME], [$1],
2672 [AC_CHECK_FILE(AC_FILE_NAME,
2673 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2674 [Define to 1 if you have the
2680 ## ------------------------------- ##
2681 ## Checking for declared symbols. ##
2682 ## ------------------------------- ##
2685 # AC_CHECK_DECL(SYMBOL,
2686 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2687 # [INCLUDES = DEFAULT-INCLUDES])
2688 # -------------------------------------------------------
2689 # Check whether SYMBOL (a function, variable, or constant) is declared.
2690 AC_DEFUN([AC_CHECK_DECL],
2691 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2692 AC_CACHE_CHECK([whether $1 is declared], [ac_Symbol],
2693 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2698 [AS_VAR_SET([ac_Symbol], [yes])],
2699 [AS_VAR_SET([ac_Symbol], [no])])])
2700 AS_VAR_IF([ac_Symbol], [yes], [$2], [$3])[]dnl
2701 AS_VAR_POPDEF([ac_Symbol])dnl
2705 # AC_CHECK_DECLS(SYMBOLS,
2706 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2707 # [INCLUDES = DEFAULT-INCLUDES])
2708 # --------------------------------------------------------
2709 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
2710 # documentation for a detailed explanation of this difference with
2711 # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
2712 AC_DEFUN([AC_CHECK_DECLS],
2713 [m4_foreach([AC_Symbol], [$1],
2714 [AC_CHECK_DECL(AC_Symbol,
2715 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2716 [Define to 1 if you have the declaration
2717 of `]AC_Symbol[', and to 0 if you don't.])
2719 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2725 # AC_CHECK_DECLS_ONCE(SYMBOLS)
2726 # ----------------------------
2727 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
2728 AC_DEFUN([AC_CHECK_DECLS_ONCE],
2730 m4_foreach([AC_Symbol], [$1],
2731 [AC_DEFUN([_AC_Check_Decl_]m4_defn([AC_Symbol]),
2732 [AC_CHECK_DECLS(m4_defn([AC_Symbol]))])
2733 AC_REQUIRE([_AC_Check_Decl_]m4_defn([AC_Symbol]))])
2738 ## ---------------------------------- ##
2739 ## Replacement of library functions. ##
2740 ## ---------------------------------- ##
2743 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2744 # -----------------------------
2745 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2746 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2747 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
2750 # AC_LIBSOURCE(FILE-NAME)
2751 # -----------------------
2752 # Announce we might need the file `FILE-NAME'.
2753 m4_define([AC_LIBSOURCE], [])
2756 # AC_LIBSOURCES([FILE-NAME1, ...])
2757 # -------------------------------
2758 # Announce we might need these files.
2759 m4_define([AC_LIBSOURCES],
2760 [m4_foreach([_AC_FILE_NAME], [$1],
2761 [AC_LIBSOURCE(_AC_FILE_NAME)])])
2764 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
2765 # --------------------------------------------
2766 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2767 m4_define([_AC_LIBOBJ],
2768 [AS_LITERAL_IF([$1],
2769 [AC_LIBSOURCE([$1.c])],
2771 case " $LIB@&t@OBJS " in
2772 *" $1.$ac_objext "* ) ;;
2773 *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
2778 # AC_LIBOBJ(FILE-NAME-NOEXT)
2779 # -------------------------
2780 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2781 m4_define([AC_LIBOBJ],
2783 [AC_DIAGNOSE(syntax,
2784 [$0($1): you should use literals])])dnl
2788 # _AC_LIBOBJS_NORMALIZE
2789 # ---------------------
2790 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
2791 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2792 # Used with AC_CONFIG_COMMANDS_PRE.
2793 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2796 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2797 # 1. Remove the extension, and $U if already installed.
2798 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2799 ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
2800 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
2801 # will be set to the directory where LIBOBJS objects are built.
2802 AS_VAR_APPEND([ac_libobjs], [" \${LIBOBJDIR}$ac_i\$U.$ac_objext"])
2803 AS_VAR_APPEND([ac_ltlibobjs], [" \${LIBOBJDIR}$ac_i"'$U.lo'])
2805 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2806 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2810 ## ----------------------------------- ##
2811 ## Checking compiler characteristics. ##
2812 ## ----------------------------------- ##
2815 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2816 # -------------------------------------------------------------------
2817 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2818 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2819 m4_define([_AC_COMPUTE_INT_COMPILE],
2820 [# Depending upon the size, compute the lo and hi bounds.
2821 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2824 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2825 [ac_hi=$ac_mid; break],
2826 [ac_lo=`expr $ac_mid + 1`
2827 if test $ac_lo -le $ac_mid; then
2831 ac_mid=`expr 2 '*' $ac_mid + 1`])
2833 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2836 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2837 [ac_lo=$ac_mid; break],
2838 [ac_hi=`expr '(' $ac_mid ')' - 1`
2839 if test $ac_mid -le $ac_hi; then
2843 ac_mid=`expr 2 '*' $ac_mid`])
2846 # Binary search between lo and hi bounds.
2847 while test "x$ac_lo" != "x$ac_hi"; do
2848 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2849 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2850 [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2856 ])# _AC_COMPUTE_INT_COMPILE
2859 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2860 # ---------------------------------------------------------------
2861 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2862 m4_define([_AC_COMPUTE_INT_RUN],
2863 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2864 [$2=`cat conftest.val`], [$4])])
2867 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
2868 # ----------------------------------------------------------
2869 AC_DEFUN([AC_COMPUTE_INT],
2870 [AC_LANG_COMPILER_REQUIRE()dnl
2871 if test "$cross_compiling" = yes; then
2872 _AC_COMPUTE_INT_COMPILE([$2], [$1], [$3], [$4])
2874 _AC_COMPUTE_INT_RUN([$2], [$1], [$3], [$4])
2876 rm -f conftest.val[]dnl
2879 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2880 # -----------------------------------------------------------
2881 # FIXME: this private interface was used by several packages.
2882 # Give them time to transition to AC_COMPUTE_INT and then delete this one.
2883 AC_DEFUN([_AC_COMPUTE_INT],
2884 [AC_COMPUTE_INT([$2], [$1], [$3], [$4])
2885 AC_DIAGNOSE([obsolete],
2886 [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
2887 future version or Autoconf. Hence, it is suggested that you use
2888 instead the public AC_COMPUTE_INT macro. Note that the arguments are
2889 slightly different between the two.])dnl