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 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., 59 Temple Place - Suite 330, Boston, MA
21 # As a special exception, the Free Software Foundation gives unlimited
22 # permission to copy, distribute and modify the configure scripts that
23 # are the output of Autoconf. You need not follow the terms of the GNU
24 # General Public License when using or distributing such scripts, even
25 # though portions of the text of Autoconf appear in them. The GNU
26 # General Public License (GPL) does govern all other use of the material
27 # that constitutes the Autoconf program.
29 # Certain portions of the Autoconf source text are designed to be copied
30 # (in certain cases, depending on the input) into the output of
31 # Autoconf. We call these the "data" portions. The rest of the Autoconf
32 # source text consists of comments plus executable code that decides which
33 # of the data portions to output in any given case. We call these
34 # comments and executable code the "non-data" portions. Autoconf never
35 # copies any of the non-data portions into its output.
37 # This special exception to the GPL applies to versions of Autoconf
38 # released by the Free Software Foundation. When you make and
39 # distribute a modified version of Autoconf, you may extend this special
40 # exception to the GPL to apply to your modified version as well, *unless*
41 # your modified version has the potential to copy into its output some
42 # of the text that was the non-data portion of the version that you started
43 # with. (In other words, unless your change moves or copies text from
44 # the non-data portions to the data portions.) If your modification has
45 # such potential, you must delete any notice of this special exception
46 # to the GPL from your modified version.
48 # Written by David MacKenzie, with help from
49 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
50 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
53 ## ---------------- ##
55 ## ---------------- ##
58 # We heavily use m4's diversions both for the initializations and for
59 # required macros (see AC_REQUIRE), because in both cases we have to
60 # issue high in `configure' something which is discovered late.
62 # KILL is only used to suppress output.
64 # The layers of `configure'. We let m4 undivert them by itself, when
65 # it reaches the end of `configure.ac'.
72 # Purpose of the script.
76 # Initialization of bottom layers.
79 # early initializations (defaults)
81 # initialization code, option handling loop.
84 # Handling `configure --help'.
86 # Help msg for AC_CANONICAL_*
88 # Help msg from AC_ARG_ENABLE.
90 # Help msg from AC_ARG_WITH.
92 # Help msg from AC_ARG_VAR.
94 # A small paragraph on the use of the variables.
96 # Tail of the handling of --help.
99 # Head of the handling of --version.
101 # FSF copyright notice for --version.
103 # User copyright notice for --version.
105 # Tail of the handling of --version.
108 # Tail of initialization code.
111 # the tests and output code
115 # _m4_divert(DIVERSION-NAME)
116 # --------------------------
117 # Convert a diversion name into its number. Otherwise, return
118 # DIVERSION-NAME which is supposed to be an actual diversion number.
119 # Of course it would be nicer to use m4_case here, instead of zillions
120 # of little macros, but it then takes twice longer to run `autoconf'!
130 # 3. HEADER-COPYRIGHT
133 m4_define([_m4_divert(DEFAULTS)], 10)
134 m4_define([_m4_divert(PARSE_ARGS)], 20)
136 m4_define([_m4_divert(HELP_BEGIN)], 100)
137 m4_define([_m4_divert(HELP_CANON)], 101)
138 m4_define([_m4_divert(HELP_ENABLE)], 102)
139 m4_define([_m4_divert(HELP_WITH)], 103)
140 m4_define([_m4_divert(HELP_VAR)], 104)
141 m4_define([_m4_divert(HELP_VAR_END)], 105)
142 m4_define([_m4_divert(HELP_END)], 106)
144 m4_define([_m4_divert(VERSION_BEGIN)], 200)
145 m4_define([_m4_divert(VERSION_FSF)], 201)
146 m4_define([_m4_divert(VERSION_USER)], 202)
147 m4_define([_m4_divert(VERSION_END)], 203)
149 m4_define([_m4_divert(INIT_PREPARE)], 300)
153 # AC_DIVERT_PUSH(DIVERSION-NAME)
155 # ------------------------------
156 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
157 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
161 ## ------------------------------------ ##
162 ## Defining/requiring Autoconf macros. ##
163 ## ------------------------------------ ##
166 # AC_DEFUN(NAME, EXPANSION)
167 # AC_DEFUN_ONCE(NAME, EXPANSION)
168 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
170 # AC_PROVIDE(MACRO-NAME)
171 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
172 # -----------------------------------------------------------
173 m4_copy([m4_defun], [AC_DEFUN])
174 m4_copy([m4_defun_once], [AC_DEFUN_ONCE])
175 m4_copy([m4_before], [AC_BEFORE])
176 m4_copy([m4_require], [AC_REQUIRE])
177 m4_copy([m4_provide], [AC_PROVIDE])
178 m4_copy([m4_provide_if], [AC_PROVIDE_IFELSE])
181 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
182 # ------------------------------------------
183 m4_define([AC_OBSOLETE],
184 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
188 ## ----------------------------- ##
189 ## Implementing Autoconf loops. ##
190 ## ----------------------------- ##
193 # AC_FOREACH(VARIABLE, LIST, EXPRESSION)
194 # --------------------------------------
196 # Compute EXPRESSION assigning to VARIABLE each value of the LIST.
197 # LIST is a /bin/sh list, i.e., it has the form ` item_1 item_2
198 # ... item_n ': white spaces are separators, and leading and trailing
199 # spaces are meaningless.
201 # This macro is robust to active symbols:
202 # AC_FOREACH([Var], [ active
205 # => -active--b--active-end
206 m4_define([AC_FOREACH],
207 [m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
212 ## ----------------------------------- ##
213 ## Helping macros to display strings. ##
214 ## ----------------------------------- ##
217 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
218 # --------------------------------------
219 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
223 ## ---------------------------------------------- ##
224 ## Information on the package being Autoconf'ed. ##
225 ## ---------------------------------------------- ##
228 # It is suggested that the macros in this section appear before
229 # AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
230 # and from the implementation point of view, AC_INIT *must* be expanded
231 # beforehand: it puts data in diversions which must appear before the
232 # data provided by the macros of this section.
234 # The solution is to require AC_INIT in each of these macros. AC_INIT
235 # has the needed magic so that it can't be expanded twice.
239 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
240 # --------------------------------------------------------------
241 m4_define([_AC_INIT_PACKAGE],
242 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
243 AS_LITERAL_IF([$2], [], [m4_warn([syntax], [AC_INIT: not a literal: $2])])
244 AS_LITERAL_IF([$3], [], [m4_warn([syntax], [AC_INIT: not a literal: $3])])
245 m4_ifndef([AC_PACKAGE_NAME],
246 [m4_define([AC_PACKAGE_NAME], [$1])])
247 m4_ifndef([AC_PACKAGE_TARNAME],
248 [m4_define([AC_PACKAGE_TARNAME],
250 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
252 [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
254 m4_ifndef([AC_PACKAGE_VERSION],
255 [m4_define([AC_PACKAGE_VERSION], [$2])])
256 m4_ifndef([AC_PACKAGE_STRING],
257 [m4_define([AC_PACKAGE_STRING], [$1 $2])])
258 m4_ifndef([AC_PACKAGE_BUGREPORT],
259 [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
263 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
264 # ------------------------------------------------------
265 # Emit TEXT, a copyright notice, in the top of `configure' and in
266 # --version output. Macros in TEXT are evaluated once.
267 m4_define([AC_COPYRIGHT],
268 [AS_COPYRIGHT([$1])[]dnl
269 m4_divert_text(m4_default([$2], [VERSION_USER]),
275 # AC_REVISION(REVISION-INFO)
276 # --------------------------
277 # The second quote in the translit is just to cope with font-lock-mode
278 # which sees the opening of a string.
279 m4_define([AC_REVISION],
280 [m4_divert_text([HEADER-REVISION],
281 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
287 ## ---------------------------------------- ##
288 ## Requirements over the Autoconf version. ##
289 ## ---------------------------------------- ##
292 # AU::AC_PREREQ(VERSION)
293 # ----------------------
294 # Update this `AC_PREREQ' statement to require the current version of
295 # Autoconf. But fail if ever this autoupdate is too old.
297 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
298 # calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be
299 # quite complex for autoupdate to import the value of
300 # `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
301 # this would replace all its occurrences with the current version of
302 # Autoconf, which is certainly not what the user intended.
303 AU_DEFUN([AC_PREREQ],
304 [m4_version_prereq([$1])[]dnl
305 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
310 # Complain and exit if the Autoconf version is less than VERSION.
311 m4_copy([m4_version_prereq], [AC_PREREQ])
318 ## ---------------- ##
319 ## Initialization. ##
320 ## ---------------- ##
323 # All the following macros are used by AC_INIT. Ideally, they should
324 # be presented in the order in which they are output. Please, help us
325 # sorting it, or at least, don't augment the entropy.
330 m4_define([_AC_INIT_NOTICE],
331 [m4_divert_text([HEADER-COMMENT],
332 [@%:@ Guess values for system-dependent variables and create Makefiles.
333 @%:@ Generated by m4_PACKAGE_STRING[]dnl
334 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
336 m4_ifset([AC_PACKAGE_BUGREPORT],
337 [m4_divert_text([HEADER-COMMENT],
339 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
345 # We dump to VERSION_FSF to make sure we are inserted before the
346 # user copyrights, and after the setup of the --version handling.
347 m4_define([_AC_INIT_COPYRIGHT],
349 [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
350 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
351 This configure script is free software; the Free Software Foundation
352 gives unlimited permission to copy, distribute and modify it.],
359 # Set up the file descriptors used by `configure'.
360 # File descriptor usage:
361 # 0 standard input (/dev/null)
363 # 2 errors and warnings
364 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
365 # AS_MESSAGE_FD checking for... messages and results
366 # AS_ORIGINAL_STDIN_FD original standard input (still open)
368 # stdin is /dev/null because checks that run programs may
369 # inadvertently run interactive ones, which would stop configuration
370 # until someone typed an EOF.
371 m4_define([AS_MESSAGE_FD], 6)
372 m4_define([AS_ORIGINAL_STDIN_FD], 7)
373 # That's how they used to be named.
374 AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
375 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
380 # Values which defaults can be set from `configure.ac'.
381 # `/bin/machine' is used in `glibcbug'. The others are used in config.*
382 m4_define([_AC_INIT_DEFAULTS],
383 [m4_divert_push([DEFAULTS])dnl
385 exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1
388 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
389 # so uname gets run too.
390 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
395 ac_default_prefix=/usr/local
396 ac_config_libobj_dir=.
401 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
402 AC_SUBST([PATH_SEPARATOR])dnl
404 # Maximum number of lines to put in a shell here document.
405 # This variable seems obsolete. It should probably be removed, and
406 # only ac_max_sed_lines should be used.
407 : ${ac_max_here_lines=38}
409 # Identity of this package.
410 AC_SUBST([PACKAGE_NAME],
411 [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
412 AC_SUBST([PACKAGE_TARNAME],
413 [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
414 AC_SUBST([PACKAGE_VERSION],
415 [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
416 AC_SUBST([PACKAGE_STRING],
417 [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
418 AC_SUBST([PACKAGE_BUGREPORT],
419 [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
421 m4_divert_pop([DEFAULTS])dnl
422 m4_wrap([m4_divert_text([DEFAULTS],
423 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS])])'
424 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'])])dnl
425 ])# _AC_INIT_DEFAULTS
428 # AC_PREFIX_DEFAULT(PREFIX)
429 # -------------------------
430 AC_DEFUN([AC_PREFIX_DEFAULT],
431 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
434 # AC_PREFIX_PROGRAM(PROGRAM)
435 # --------------------------
436 # Guess the value for the `prefix' variable by looking for
437 # the argument program along PATH and taking its parent.
438 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
439 # set `prefix' to /usr/local/gnu.
440 # This comes too late to find a site file based on the prefix,
441 # and it might use a cached value for the path.
442 # No big loss, I think, since most configures don't use this macro anyway.
443 AC_DEFUN([AC_PREFIX_PROGRAM],
444 [if test "x$prefix" = xNONE; then
445 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
446 _AS_ECHO_N([checking for prefix by ])
447 AC_PATH_PROG(ac_prefix_program, [$1])
448 if test -n "$ac_prefix_program"; then
449 prefix=`AS_DIRNAME(["$ac_prefix_program"])`
450 prefix=`AS_DIRNAME(["$prefix"])`
453 ])# AC_PREFIX_PROGRAM
456 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
457 # ---------------------------------------------
458 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
459 # relative to the directory that configure is in, which we can look
460 # for to find out if srcdir is correct.
461 AC_DEFUN([AC_CONFIG_SRCDIR],
462 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
467 # Set ac_pwd, and sanity-check it and the source and installation directories.
468 m4_define([_AC_INIT_DIRCHECK],
469 [m4_divert_push([PARSE_ARGS])dnl
471 ac_pwd=`pwd` && test -n "$ac_pwd" ||
472 AC_MSG_ERROR([Working directory cannot be determined])
474 ac_pat="[[\$][{][_$as_cr_Letters][_$as_cr_alnum]*[}]]"
476 for ac_dir in "$ac_pwd" "$srcdir" \
477 "$bindir" "$sbindir" "$libexecdir" "$datarootdir" "$datadir" \
478 "$sysconfdir" "$sharedstatedir" "$localstatedir" "$includedir" \
479 "$oldincludedir" "$docdir" "$infodir" "$htmldir" "$dvidir" "$pdfdir" \
480 "$psdir" "$libdir" "$localedir" "$mandir"
482 # Remove references to shell or make variables.
489 expr "X$ac_dirx" : "X\\(.*\\)$ac_pat"`X`
490 expr "X$ac_dirx" : "X.*$ac_pat\\(.*\\)"`;;
495 # Check for newline, tab, space, and other weird possibilities.
496 # Preserve that tab character below!
499 '* | *' '* | *' '* | *\"* | *\#* | *\$* | *\&* | *\'* | *\(* | *\)* | \
500 *\** | *\;* | *\<* | *\=* | *\>* | *\?* | *\@<:@* | *\\* | *\`* | \
502 AC_MSG_WARN([Directory name `$ac_dir' contains special characters]);;
505 m4_divert_pop([PARSE_ARGS])dnl
506 ])# _AC_INIT_DIRCHECK
510 # Compute `srcdir' based on `$ac_unique_file'.
511 m4_define([_AC_INIT_SRCDIR],
512 [m4_divert_push([PARSE_ARGS])dnl
514 # Find the source files, if location was not specified.
515 if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_confdir=`AS_DIRNAME(["$[0]"])`
520 if test ! -r $srcdir/$ac_unique_file; then
524 ac_srcdir_defaulted=no
526 if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $ac_confdir or ..])
530 AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
533 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
534 AC_MSG_ERROR([sources are in $srcdir, but `cd $srcdir' does not work])
535 dnl Double slashes in file names in object file debugging info
536 dnl mess up M-x gdb in Emacs.
537 srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`
538 m4_divert_pop([PARSE_ARGS])dnl
542 # _AC_INIT_PARSE_ARGS
543 # -------------------
544 m4_define([_AC_INIT_PARSE_ARGS],
545 [m4_divert_push([PARSE_ARGS])dnl
547 # Initialize some variables set by options.
549 ac_init_version=false
550 # The variables have the same names as the options, with
551 # dashes changed to underlines.
553 AC_SUBST(exec_prefix, NONE)dnl
556 AC_SUBST(prefix, NONE)dnl
559 AC_SUBST(program_transform_name, [s,x,x,])dnl
567 # Installation directory options.
568 # These are left unexpanded so users can "make install exec_prefix=/foo"
569 # and all the variables that are supposed to be based on exec_prefix
570 # by default will actually change.
571 # Use braces instead of parens because sh, perl, etc. also accept them.
572 # (The list follows the same order as the GNU Coding Standards.)
573 AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
574 AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
575 AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
576 AC_SUBST([datarootdir], ['${prefix}/share'])dnl
577 AC_SUBST([datadir], ['${datarootdir}'])dnl
578 AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
579 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
580 AC_SUBST([localstatedir], ['${prefix}/var'])dnl
581 AC_SUBST([includedir], ['${prefix}/include'])dnl
582 AC_SUBST([oldincludedir], ['/usr/include'])dnl
583 AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
584 ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
585 ['${datarootdir}/doc/${PACKAGE}'])])dnl
586 AC_SUBST([infodir], ['${datarootdir}/info'])dnl
587 AC_SUBST([htmldir], ['${docdir}'])dnl
588 AC_SUBST([dvidir], ['${docdir}'])dnl
589 AC_SUBST([pdfdir], ['${docdir}'])dnl
590 AC_SUBST([psdir], ['${docdir}'])dnl
591 AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
592 AC_SUBST([localedir], ['${datarootdir}/locale'])dnl
593 AC_SUBST([mandir], ['${datarootdir}/man'])dnl
599 # If the previous option needs an argument, assign it.
600 if test -n "$ac_prev"; then
601 eval "$ac_prev=\$ac_option"
606 ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
608 # Accept the important Cygnus configure options, so we can diagnose typos.
610 case $ac_dashdash$ac_option in
614 -bindir | --bindir | --bindi | --bind | --bin | --bi)
616 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
619 -build | --build | --buil | --bui | --bu)
620 ac_prev=build_alias ;;
621 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
622 build_alias=$ac_optarg ;;
624 -cache-file | --cache-file | --cache-fil | --cache-fi \
625 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
626 ac_prev=cache_file ;;
627 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
628 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
629 cache_file=$ac_optarg ;;
632 cache_file=config.cache ;;
634 -datadir | --datadir | --datadi | --datad)
636 -datadir=* | --datadir=* | --datadi=* | --datad=*)
637 datadir=$ac_optarg ;;
639 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
640 | --dataroo | --dataro | --datar)
641 ac_prev=datarootdir ;;
642 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
643 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
644 datarootdir=$ac_optarg ;;
646 -disable-* | --disable-*)
647 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
648 # Reject names that are not valid shell variable names.
649 expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
650 AC_MSG_ERROR([invalid feature name: $ac_feature])
651 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
652 eval "enable_$ac_feature=no" ;;
654 -docdir | --docdir | --docdi | --doc | --do)
656 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
659 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
661 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
664 -enable-* | --enable-*)
665 ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
666 # Reject names that are not valid shell variable names.
667 expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
668 AC_MSG_ERROR([invalid feature name: $ac_feature])
669 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
671 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
674 eval "enable_$ac_feature='$ac_optarg'" ;;
676 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
677 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
678 | --exec | --exe | --ex)
679 ac_prev=exec_prefix ;;
680 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
681 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
682 | --exec=* | --exe=* | --ex=*)
683 exec_prefix=$ac_optarg ;;
685 -gas | --gas | --ga | --g)
686 # Obsolete; use --with-gas.
689 -help | --help | --hel | --he | -h)
691 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
692 ac_init_help=recursive ;;
693 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
694 ac_init_help=short ;;
696 -host | --host | --hos | --ho)
697 ac_prev=host_alias ;;
698 -host=* | --host=* | --hos=* | --ho=*)
699 host_alias=$ac_optarg ;;
701 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
703 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
705 htmldir=$ac_optarg ;;
707 -includedir | --includedir | --includedi | --included | --include \
708 | --includ | --inclu | --incl | --inc)
709 ac_prev=includedir ;;
710 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
711 | --includ=* | --inclu=* | --incl=* | --inc=*)
712 includedir=$ac_optarg ;;
714 -infodir | --infodir | --infodi | --infod | --info | --inf)
716 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
717 infodir=$ac_optarg ;;
719 -libdir | --libdir | --libdi | --libd)
721 -libdir=* | --libdir=* | --libdi=* | --libd=*)
724 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
725 | --libexe | --libex | --libe)
726 ac_prev=libexecdir ;;
727 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
728 | --libexe=* | --libex=* | --libe=*)
729 libexecdir=$ac_optarg ;;
731 -localedir | --localedir | --localedi | --localed | --locale)
733 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
734 localedir=$ac_optarg ;;
736 -localstatedir | --localstatedir | --localstatedi | --localstated \
737 | --localstate | --localstat | --localsta | --localst | --locals)
738 ac_prev=localstatedir ;;
739 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
740 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
741 localstatedir=$ac_optarg ;;
743 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
745 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
749 # Obsolete; use --without-fp.
752 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
753 | --no-cr | --no-c | -n)
756 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
757 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
760 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
761 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
762 | --oldin | --oldi | --old | --ol | --o)
763 ac_prev=oldincludedir ;;
764 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
765 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
766 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
767 oldincludedir=$ac_optarg ;;
769 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
771 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
774 -program-prefix | --program-prefix | --program-prefi | --program-pref \
775 | --program-pre | --program-pr | --program-p)
776 ac_prev=program_prefix ;;
777 -program-prefix=* | --program-prefix=* | --program-prefi=* \
778 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
779 program_prefix=$ac_optarg ;;
781 -program-suffix | --program-suffix | --program-suffi | --program-suff \
782 | --program-suf | --program-su | --program-s)
783 ac_prev=program_suffix ;;
784 -program-suffix=* | --program-suffix=* | --program-suffi=* \
785 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
786 program_suffix=$ac_optarg ;;
788 -program-transform-name | --program-transform-name \
789 | --program-transform-nam | --program-transform-na \
790 | --program-transform-n | --program-transform- \
791 | --program-transform | --program-transfor \
792 | --program-transfo | --program-transf \
793 | --program-trans | --program-tran \
794 | --progr-tra | --program-tr | --program-t)
795 ac_prev=program_transform_name ;;
796 -program-transform-name=* | --program-transform-name=* \
797 | --program-transform-nam=* | --program-transform-na=* \
798 | --program-transform-n=* | --program-transform-=* \
799 | --program-transform=* | --program-transfor=* \
800 | --program-transfo=* | --program-transf=* \
801 | --program-trans=* | --program-tran=* \
802 | --progr-tra=* | --program-tr=* | --program-t=*)
803 program_transform_name=$ac_optarg ;;
805 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
807 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
810 -psdir | --psdir | --psdi | --psd | --ps)
812 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
815 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
816 | -silent | --silent | --silen | --sile | --sil)
819 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
821 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
823 sbindir=$ac_optarg ;;
825 -sharedstatedir | --sharedstatedir | --sharedstatedi \
826 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
827 | --sharedst | --shareds | --shared | --share | --shar \
829 ac_prev=sharedstatedir ;;
830 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
831 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
832 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
834 sharedstatedir=$ac_optarg ;;
836 -site | --site | --sit)
838 -site=* | --site=* | --sit=*)
841 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
843 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
846 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
847 | --syscon | --sysco | --sysc | --sys | --sy)
848 ac_prev=sysconfdir ;;
849 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
850 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
851 sysconfdir=$ac_optarg ;;
853 -target | --target | --targe | --targ | --tar | --ta | --t)
854 ac_prev=target_alias ;;
855 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
856 target_alias=$ac_optarg ;;
858 -v | -verbose | --verbose | --verbos | --verbo | --verb)
861 -version | --version | --versio | --versi | --vers | -V)
865 ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
866 # Reject names that are not valid shell variable names.
867 expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
868 AC_MSG_ERROR([invalid package name: $ac_package])
869 ac_package=`echo $ac_package| sed 's/-/_/g'`
871 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
874 eval "with_$ac_package='$ac_optarg'" ;;
876 -without-* | --without-*)
877 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
878 # Reject names that are not valid shell variable names.
879 expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
880 AC_MSG_ERROR([invalid package name: $ac_package])
881 ac_package=`echo $ac_package | sed 's/-/_/g'`
882 eval "with_$ac_package=no" ;;
885 # Obsolete; use --with-x.
888 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
889 | --x-incl | --x-inc | --x-in | --x-i)
890 ac_prev=x_includes ;;
891 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
892 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
893 x_includes=$ac_optarg ;;
895 -x-libraries | --x-libraries | --x-librarie | --x-librari \
896 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
897 ac_prev=x_libraries ;;
898 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
899 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
900 x_libraries=$ac_optarg ;;
902 -*) AC_MSG_ERROR([unrecognized option: $ac_option
903 Try `$[0] --help' for more information.])
907 ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
908 # Reject names that are not valid shell variable names.
909 expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
910 AC_MSG_ERROR([invalid variable name: $ac_envvar])
911 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
912 eval "$ac_envvar='$ac_optarg'"
916 # FIXME: should be removed in autoconf 3.0.
917 AC_MSG_WARN([you should use --build, --host, --target])
918 expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
919 AC_MSG_WARN([invalid host type: $ac_option])
920 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
926 if test -n "$ac_prev"; then
927 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
928 AC_MSG_ERROR([missing argument to $ac_option])
931 # Be sure to have absolute directory names.
932 for ac_var in exec_prefix prefix
934 eval ac_val=$`echo $ac_var`
936 [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
937 *) AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
941 # Be sure to have absolute directory names.
942 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir \
943 sharedstatedir localstatedir includedir oldincludedir \
944 docdir infodir htmldir dvidir pdfdir psdir libdir \
947 eval ac_val=$`echo $ac_var`
949 [[\\/$]]* | ?:[[\\/]]* ) ;;
950 *) AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
954 # There might be people who depend on the old broken behavior: `$host'
955 # used to hold the argument of --host etc.
956 # FIXME: To remove some day.
961 # FIXME: To remove some day.
962 if test "x$host_alias" != x; then
963 if test "x$build_alias" = x; then
964 cross_compiling=maybe
965 AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
966 If a cross compiler is detected then cross compile mode will be used.])
967 elif test "x$build_alias" != "x$host_alias"; then
973 test -n "$host_alias" && ac_tool_prefix=$host_alias-
975 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
977 m4_divert_pop([PARSE_ARGS])dnl
978 ])# _AC_INIT_PARSE_ARGS
983 # Handle the `configure --help' message.
984 m4_define([_AC_INIT_HELP],
985 [m4_divert_push([HELP_BEGIN])dnl
988 # Report the --help message.
990 if test "$ac_init_help" = "long"; then
991 # Omit some internal or obsolete options to make the list less imposing.
992 # This message is too long to be a string in the A/UX 3.1 sh.
994 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
996 [this package]) to adapt to many kinds of systems.
998 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1000 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
1001 VAR=VALUE. See below for descriptions of some of the useful variables.
1003 Defaults for the options are specified in brackets.
1006 -h, --help display this help and exit
1007 --help=short display options specific to this package
1008 --help=recursive display the short help of all the included packages
1009 -V, --version display version information and exit
1010 -q, --quiet, --silent do not print \`checking...' messages
1011 --cache-file=FILE cache test results in FILE [disabled]
1012 -C, --config-cache alias for \`--cache-file=config.cache'
1013 -n, --no-create do not create output files
1014 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1019 Installation directories:
1020 --prefix=PREFIX install architecture-independent files in PREFIX
1021 [$ac_default_prefix]
1022 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1025 By default, \`make install' will install all the files in
1026 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1027 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1028 for instance \`--prefix=\$HOME'.
1030 For better control, use the options below.
1032 Fine tuning of the installation directories:
1033 --bindir=DIR user executables [EPREFIX/bin]
1034 --sbindir=DIR system admin executables [EPREFIX/sbin]
1035 --libexecdir=DIR program executables [EPREFIX/libexec]
1036 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1037 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1038 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1039 --libdir=DIR object code libraries [EPREFIX/lib]
1040 --includedir=DIR C header files [PREFIX/include]
1041 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1042 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1043 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1044 --infodir=DIR info documentation [DATAROOTDIR/info]
1045 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1046 --mandir=DIR man documentation [DATAROOTDIR/man]
1047 --docdir=DIR documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME], [AC_PACKAGE_TARNAME], [PACKAGE])@:>@[
1048 --htmldir=DIR html documentation [DOCDIR]
1049 --dvidir=DIR dvi documentation [DOCDIR]
1050 --pdfdir=DIR pdf documentation [DOCDIR]
1051 --psdir=DIR ps documentation [DOCDIR]
1055 m4_divert_pop([HELP_BEGIN])dnl
1056 dnl The order of the diversions here is
1058 dnl which may be extended by extra generic options such as with X or
1059 dnl AC_ARG_PROGRAM. Displayed only in long --help.
1062 dnl Support for cross compilation (--build, --host and --target).
1063 dnl Display only in long --help.
1066 dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1067 dnl then implements the header of the non generic options.
1076 dnl initialized below, in which we dump the trailer (handling of the
1077 dnl recursion for instance).
1078 m4_divert_push([HELP_ENABLE])dnl
1082 if test -n "$ac_init_help"; then
1083 m4_ifset([AC_PACKAGE_STRING],
1084 [ case $ac_init_help in
1085 short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1088 m4_divert_pop([HELP_ENABLE])dnl
1089 m4_divert_push([HELP_END])dnl
1090 m4_ifset([AC_PACKAGE_BUGREPORT], [
1091 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1096 if test "$ac_init_help" = "recursive"; then
1097 # If there are subdirs, report their specific --help.
1098 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1099 test -d $ac_dir || continue
1100 _AC_SRCDIRS(["$ac_dir"])
1101 cd $ac_dir || { ac_status=$?; continue; }
1102 # Check for guested configure; otherwise get Cygnus style configure.
1103 if test -f $ac_srcdir/configure.gnu; then
1105 $SHELL $ac_srcdir/configure.gnu --help=recursive
1106 elif test -f $ac_srcdir/configure; then
1108 $SHELL $ac_srcdir/configure --help=recursive
1109 elif test -f $ac_srcdir/configure.ac ||
1110 test -f $ac_srcdir/configure.in; then
1112 $ac_configure --help
1114 AC_MSG_WARN([no configuration information is in $ac_dir])
1116 cd "$ac_pwd" || { ac_status=$?; break; }
1120 test -n "$ac_init_help" && exit $ac_status
1121 m4_divert_pop([HELP_END])dnl
1127 # Handle the `configure --version' message.
1128 m4_define([_AC_INIT_VERSION],
1129 [m4_divert_text([VERSION_BEGIN],
1130 [if $ac_init_version; then
1132 m4_ifset([AC_PACKAGE_STRING],
1133 [m4_divert_text([VERSION_BEGIN],
1135 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1136 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1137 generated by m4_PACKAGE_STRING])])
1138 m4_divert_text([VERSION_END],
1142 ])# _AC_INIT_VERSION
1145 # _AC_INIT_CONFIG_LOG
1146 # -------------------
1147 # Initialize the config.log file descriptor and write header to it.
1148 m4_define([_AC_INIT_CONFIG_LOG],
1149 [m4_divert_text([INIT_PREPARE],
1150 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1151 exec AS_MESSAGE_LOG_FD>config.log
1152 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1153 This file contains any messages produced by compilers while
1154 running configure, to aid debugging if configure makes a mistake.
1156 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1157 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1158 generated by m4_PACKAGE_STRING. Invocation command line was
1163 AS_UNAME >&AS_MESSAGE_LOG_FD
1165 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1168 m4_text_box([Core tests.])
1171 ])])# _AC_INIT_CONFIG_LOG
1176 # Called by AC_INIT to build the preamble of the `configure' scripts.
1177 # 1. Trap and clean up various tmp files.
1178 # 2. Set up the fd and output files
1179 # 3. Remember the options given to `configure' for `config.status --recheck'.
1180 # 4. Ensure a correct environment
1181 # 5. Required macros (cache, default AC_SUBST etc.)
1182 m4_define([_AC_INIT_PREPARE],
1183 [m4_divert_push([INIT_PREPARE])dnl
1185 # Keep a trace of the command line.
1186 # Strip out --no-create and --no-recursion so they do not pile up.
1187 # Strip out --silent because we don't want to record it for future runs.
1188 # Also quote any args containing shell meta-characters.
1189 # Make two passes to allow for proper duplicate-argument suppression.
1194 ac_must_keep_next=false
1200 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1201 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1202 | -silent | --silent | --silen | --sile | --sil)
1204 dnl If you change this globbing pattern, test it on an old shell --
1205 dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
1206 [ *" "*|*" "*|*[\\\[\~\#\$\^\&\*\(\)\{\}\|\;\<\>\?\"\']*|*\]*)]
1207 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1210 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1212 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1213 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1214 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1215 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1216 dnl give --prefix foo bar).
1217 if test $ac_must_keep_next = true; then
1218 ac_must_keep_next=false # Got value, back to normal.
1221 dnl Use broad patterns, as arguments that would have already made configure
1222 dnl exit don't matter.
1223 *=* | --config-cache | -C | -disable-* | --disable-* \
1224 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1225 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1226 | -with-* | --with-* | -without-* | --without-* | --x)
1227 case "$ac_configure_args0 " in
1228 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1231 -* ) ac_must_keep_next=true ;;
1234 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1235 # Get rid of the leading space.
1241 AS_UNSET(ac_configure_args0)
1242 AS_UNSET(ac_configure_args1)
1244 # When interrupted or exit'd, cleanup temporary files, and complete
1245 # config.log. We remove comments because anyway the quotes in there
1246 # would cause problems or look ugly.
1247 # WARNING: Be sure not to use single quotes in there, as some shells,
1248 # such as our DU 5.0 friend, will then `close' the trap.
1249 trap 'exit_status=$?
1250 # Save into config.log some information that might help in debugging.
1254 AS_BOX([Cache variables.])
1256 m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1262 AS_BOX([Output variables.])
1264 for ac_var in $ac_subst_vars
1266 eval ac_val=$`echo $ac_var`
1267 echo "$ac_var='"'"'$ac_val'"'"'"
1271 if test -n "$ac_subst_files"; then
1272 AS_BOX([Output files.])
1274 for ac_var in $ac_subst_files
1276 eval ac_val=$`echo $ac_var`
1277 echo "$ac_var='"'"'$ac_val'"'"'"
1282 if test -s confdefs.h; then
1283 AS_BOX([confdefs.h.])
1285 sed "/^$/d" confdefs.h | sort
1288 test "$ac_signal" != 0 &&
1289 echo "$as_me: caught signal $ac_signal"
1290 echo "$as_me: exit $exit_status"
1291 } >&AS_MESSAGE_LOG_FD
1292 rm -f core *.core core.conftest.* &&
1293 rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1296 for ac_signal in 1 2 13 15; do
1297 trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1301 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1302 rm -f -r conftest* confdefs.h
1303 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1304 # NextStep 3.3 (patch 3) loses unless the first echo outputs at least 14 bytes.
1306 echo "$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space" >confdefs.h
1308 # Predefined preprocessor variables.
1309 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1310 [Define to the full name of this package.])
1311 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1312 [Define to the one symbol short name of this package.])
1313 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1314 [Define to the version of this package.])
1315 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1316 [Define to the full name and version of this package.])
1317 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1318 [Define to the address where bug reports for this package
1321 # Let the site file select an alternate cache file if it wants to.
1324 _AC_ARG_VAR_VALIDATE
1325 _AC_ARG_VAR_PRECIOUS([build_alias])dnl
1326 _AC_ARG_VAR_PRECIOUS([host_alias])dnl
1327 _AC_ARG_VAR_PRECIOUS([target_alias])dnl
1330 dnl Substitute for predefined variables.
1332 AC_SUBST([ECHO_C])dnl
1333 AC_SUBST([ECHO_N])dnl
1334 AC_SUBST([ECHO_T])dnl
1336 m4_divert_pop([INIT_PREPARE])dnl
1337 ])# _AC_INIT_PREPARE
1340 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1341 # ----------------------------------------
1342 # This macro is used only for Autoupdate.
1344 [m4_ifval([$2], [[AC_INIT($@)]],
1347 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1351 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1352 # ----------------------------------------
1353 # Include the user macro files, prepare the diversions, and output the
1354 # preamble of the `configure' script.
1355 # Note that the order is important: first initialize, then set the
1357 m4_define([AC_INIT],
1358 [# Forbidden tokens and exceptions.
1359 m4_pattern_forbid([^_?A[CHUM]_])
1360 m4_pattern_forbid([_AC_])
1361 m4_pattern_forbid([^LIBOBJS$],
1362 [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1363 # Actually reserved by M4sh.
1364 m4_pattern_allow([^AS_FLAGS$])
1367 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1378 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1384 ## ----------------------------- ##
1385 ## Selecting optional features. ##
1386 ## ----------------------------- ##
1389 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1390 # ------------------------------------------------------------------------
1391 AC_DEFUN([AC_ARG_ENABLE],
1392 [m4_divert_once([HELP_ENABLE], [[
1394 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1395 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])dnl
1396 m4_divert_once([HELP_ENABLE], [$2])dnl
1397 [#] Check whether --enable-$1 or --disable-$1 was given.
1398 if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then
1399 enableval="[$enable_]m4_bpatsubst([$1], -, _)"
1401 m4_ifvaln([$4], [else
1407 AU_DEFUN([AC_ENABLE],
1408 [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
1411 ## ------------------------------ ##
1412 ## Working with optional software ##
1413 ## ------------------------------ ##
1417 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1418 # --------------------------------------------------------------------
1419 AC_DEFUN([AC_ARG_WITH],
1420 [m4_divert_once([HELP_WITH], [[
1422 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1423 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
1424 m4_divert_once([HELP_WITH], [$2])dnl
1425 [#] Check whether --with-$1 or --without-$1 was given.
1426 if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then
1427 withval="[$with_]m4_bpatsubst([$1], -, _)"
1429 m4_ifvaln([$4], [else
1435 [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
1439 ## ----------------------------------------- ##
1440 ## Remembering variables for reconfiguring. ##
1441 ## ----------------------------------------- ##
1444 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1445 # -----------------------------
1446 # Declare VARNAME is precious.
1448 # We try to diagnose when precious variables have changed. To do this,
1449 # make two early snapshots (after the option processing to take
1450 # explicit variables into account) of those variables: one (ac_env_)
1451 # which represents the current run, and a second (ac_cv_env_) which,
1452 # at the first run, will be saved in the cache. As an exception to
1453 # the cache mechanism, its loading will override these variables (non
1454 # `ac_cv_env_' cache value are only set when unset).
1456 # In subsequent runs, after having loaded the cache, compare
1457 # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
1458 m4_define([_AC_ARG_VAR_PRECIOUS],
1460 m4_divert_once([PARSE_ARGS],
1461 [ac_env_$1_set=${$1+set}
1463 ac_cv_env_$1_set=${$1+set}
1464 ac_cv_env_$1_value=$$1])dnl
1468 # _AC_ARG_VAR_VALIDATE
1469 # --------------------
1470 # The precious variables are saved twice at the beginning of
1471 # configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1472 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1473 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1475 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1476 # content of the cached values, while `ac_env_' represents that of the
1479 # So we check that `ac_env_' and `ac_cv_env_' are consistent. If
1481 m4_define([_AC_ARG_VAR_VALIDATE],
1482 [# Check that the precious variables saved in the cache have kept the same
1484 ac_cache_corrupted=false
1485 for ac_var in `(set) 2>&1 |
1486 sed -n 's/^ac_env_\([[a-zA-Z_0-9]]*\)_set=.*/\1/p'`; do
1487 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1488 eval ac_new_set=\$ac_env_${ac_var}_set
1489 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1490 eval ac_new_val="\$ac_env_${ac_var}_value"
1491 case $ac_old_set,$ac_new_set in
1493 AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1494 ac_cache_corrupted=: ;;
1496 AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1497 ac_cache_corrupted=: ;;
1500 if test "x$ac_old_val" != "x$ac_new_val"; then
1501 AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1502 AS_MESSAGE([ former value: $ac_old_val], 2)
1503 AS_MESSAGE([ current value: $ac_new_val], 2)
1504 ac_cache_corrupted=:
1507 # Pass precious variables to config.status.
1508 if test "$ac_new_set" = set; then
1510 dnl If you change this globbing pattern, test it on an old shell --
1511 dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
1512 [ *" "*|*" "*|*[\\\[\~\#\$\^\&\*\(\)\{\}\|\;\<\>\?\"\']*|*\]*)]
1513 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1514 *) ac_arg=$ac_var=$ac_new_val ;;
1516 case " $ac_configure_args " in
1517 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1518 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1522 if $ac_cache_corrupted; then
1523 AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1524 AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1526 ])# _AC_ARG_VAR_VALIDATE
1529 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1530 # ----------------------------------
1531 # Register VARNAME as a precious variable, and document it in
1532 # `configure --help' (but only once).
1533 AC_DEFUN([AC_ARG_VAR],
1534 [m4_divert_once([HELP_VAR], [[
1535 Some influential environment variables:]])dnl
1536 m4_divert_once([HELP_VAR_END], [[
1537 Use these variables to override the choices made by `configure' or to help
1538 it to find libraries and programs with nonstandard names/locations.]])dnl
1539 m4_expand_once([m4_divert_once([HELP_VAR],
1540 [AS_HELP_STRING([$1], [$2], [ ])])],
1542 _AC_ARG_VAR_PRECIOUS([$1])dnl
1549 ## ---------------------------- ##
1550 ## Transforming program names. ##
1551 ## ---------------------------- ##
1556 # This macro is expanded only once, to avoid that `foo' ends up being
1557 # installed as `ggfoo'.
1558 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1559 [dnl Document the options.
1560 m4_divert_push([HELP_BEGIN])dnl
1563 --program-prefix=PREFIX prepend PREFIX to installed program names
1564 --program-suffix=SUFFIX append SUFFIX to installed program names
1565 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1566 m4_divert_pop([HELP_BEGIN])dnl
1567 test "$program_prefix" != NONE &&
1568 program_transform_name="s|^|$program_prefix|;$program_transform_name"
1569 # Use a double $ so make ignores it.
1570 test "$program_suffix" != NONE &&
1571 program_transform_name="s|\$|$program_suffix|;$program_transform_name"
1572 # Double any \ or $. echo might interpret backslashes.
1573 # By default was `s,x,x', remove it if useless.
1574 cat <<\_ACEOF >conftest.sed
1575 [s/[\\$]/&&/g;s/;s,x,x,$//]
1577 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1585 ## ------------------------- ##
1586 ## Finding auxiliary files. ##
1587 ## ------------------------- ##
1590 # AC_CONFIG_AUX_DIR(DIR)
1591 # ----------------------
1592 # Find install-sh, config.sub, config.guess, and Cygnus configure
1593 # in directory DIR. These are auxiliary files used in configuration.
1594 # DIR can be either absolute or relative to $srcdir.
1595 AC_DEFUN([AC_CONFIG_AUX_DIR],
1596 [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
1599 # AC_CONFIG_AUX_DIR_DEFAULT
1600 # -------------------------
1601 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1602 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1603 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1604 [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
1607 # AC_CONFIG_AUX_DIRS(DIR ...)
1608 # ---------------------------
1609 # Internal subroutine.
1610 # Search for the configuration auxiliary files in directory list $1.
1611 # We look only for install-sh, so users of AC_PROG_INSTALL
1612 # do not automatically need to distribute the other auxiliary files.
1613 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1615 for ac_dir in $1; do
1616 if test -f $ac_dir/install-sh; then
1618 ac_install_sh="$ac_aux_dir/install-sh -c"
1620 elif test -f $ac_dir/install.sh; then
1622 ac_install_sh="$ac_aux_dir/install.sh -c"
1624 elif test -f $ac_dir/shtool; then
1626 ac_install_sh="$ac_aux_dir/shtool install -c"
1630 if test -z "$ac_aux_dir"; then
1631 AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1633 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1634 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1635 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1636 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1637 ])# AC_CONFIG_AUX_DIRS
1642 ## ------------------------ ##
1643 ## Finding aclocal macros. ##
1644 ## ------------------------ ##
1647 # AC_CONFIG_MACRO_DIR(DIR)
1648 # ------------------------
1649 # Declare directory containing additional macros for aclocal.
1650 # DIR can be either absolute or relative to $srcdir.
1651 AC_DEFUN([AC_CONFIG_MACRO_DIR],
1653 [[\\/]]* | ?:[[\\/]]* ) ac_macro_dir=$1 ;;
1654 *) ac_macro_dir=$srcdir/$1 ;;
1656 if test -d "$ac_macro_dir"; then :
1658 AC_MSG_ERROR([cannot find macro directory `$1'])
1660 ])# AC_CONFIG_MACRO_DIR
1664 ## --------------------- ##
1665 ## Requiring aux files. ##
1666 ## --------------------- ##
1668 # AC_REQUIRE_AUX_FILE(FILE)
1669 # -------------------------
1670 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1671 # It announces FILE is required in the auxdir.
1672 m4_define([AC_REQUIRE_AUX_FILE],
1673 [AS_LITERAL_IF([$1], [],
1674 [AC_FATAL([$0: requires a literal argument])])])
1678 ## ----------------------------------- ##
1679 ## Getting the canonical system type. ##
1680 ## ----------------------------------- ##
1683 # configure --host=HOST --target=TARGET --build=BUILD
1686 # 1. Build defaults to the current platform, as determined by config.guess.
1687 # 2. Host defaults to build.
1688 # 3. Target defaults to host.
1691 # _AC_CANONICAL_SPLIT(THING)
1692 # --------------------------
1693 # Generate the variables THING, THING_{alias cpu vendor os}.
1694 m4_define([_AC_CANONICAL_SPLIT],
1695 [AC_SUBST([$1], [$ac_cv_$1])dnl
1696 dnl FIXME: AC_SUBST([$1_alias], [$ac_cv_$1_alias])dnl
1698 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])dnl
1699 AC_SUBST([$1_vendor],
1700 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])dnl
1702 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])dnl
1703 ])# _AC_CANONICAL_SPLIT
1706 # AC_CANONICAL_BUILD
1707 # ------------------
1708 AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
1709 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1710 AC_REQUIRE_AUX_FILE([config.sub])dnl
1711 AC_REQUIRE_AUX_FILE([config.guess])dnl
1712 m4_divert_text([HELP_CANON],
1715 --build=BUILD configure for building on BUILD [guessed]]])dnl
1716 # Make sure we can run config.sub.
1717 $ac_config_sub sun4 >/dev/null 2>&1 ||
1718 AC_MSG_ERROR([cannot run $ac_config_sub])
1720 AC_CACHE_CHECK([build system type], [ac_cv_build],
1721 [ac_cv_build_alias=$build_alias
1722 test -z "$ac_cv_build_alias" &&
1723 ac_cv_build_alias=`$ac_config_guess`
1724 test -z "$ac_cv_build_alias" &&
1725 AC_MSG_ERROR([cannot guess build type; you must specify one])
1726 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1727 AC_MSG_ERROR([$ac_config_sub $ac_cv_build_alias failed])
1729 _AC_CANONICAL_SPLIT(build)
1730 ])# AC_CANONICAL_BUILD
1735 AC_DEFUN_ONCE([AC_CANONICAL_HOST],
1736 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1737 m4_divert_text([HELP_CANON],
1738 [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl
1739 AC_CACHE_CHECK([host system type], [ac_cv_host],
1740 [ac_cv_host_alias=$host_alias
1741 test -z "$ac_cv_host_alias" &&
1742 ac_cv_host_alias=$ac_cv_build_alias
1743 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1744 AC_MSG_ERROR([$ac_config_sub $ac_cv_host_alias failed])
1746 _AC_CANONICAL_SPLIT([host])
1747 ])# AC_CANONICAL_HOST
1750 # AC_CANONICAL_TARGET
1751 # -------------------
1752 AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
1753 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1754 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1755 m4_divert_text([HELP_CANON],
1756 [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
1757 AC_CACHE_CHECK([target system type], [ac_cv_target],
1758 [dnl Set target_alias.
1759 ac_cv_target_alias=$target_alias
1760 test "x$ac_cv_target_alias" = "x" &&
1761 ac_cv_target_alias=$ac_cv_host_alias
1762 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1763 AC_MSG_ERROR([$ac_config_sub $ac_cv_target_alias failed])
1765 _AC_CANONICAL_SPLIT([target])
1767 # The aliases save the names the user supplied, while $host etc.
1768 # will get canonicalized.
1769 test -n "$target_alias" &&
1770 test "$program_prefix$program_suffix$program_transform_name" = \
1772 program_prefix=${target_alias}-[]dnl
1773 ])# AC_CANONICAL_TARGET
1776 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1779 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1780 # ------------------------------------------
1781 # If the cache file is inconsistent with the current host,
1782 # target and build system types, execute CMD or print a default
1783 # error message. Now handled via _AC_ARG_VAR_PRECIOUS.
1784 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1787 ## ---------------------- ##
1788 ## Caching test results. ##
1789 ## ---------------------- ##
1794 # Look for site or system specific initialization scripts.
1795 m4_define([AC_SITE_LOAD],
1796 [# Prefer explicitly selected file to automatically selected ones.
1797 if test -z "$CONFIG_SITE"; then
1798 if test "x$prefix" != xNONE; then
1799 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1801 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1804 for ac_site_file in $CONFIG_SITE; do
1805 if test -r "$ac_site_file"; then
1806 AC_MSG_NOTICE([loading site script $ac_site_file])
1807 sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1816 m4_define([AC_CACHE_LOAD],
1817 [if test -r "$cache_file"; then
1818 # Some versions of bash will fail to source /dev/null (special
1819 # files actually), so we avoid doing that.
1820 if test -f "$cache_file"; then
1821 AC_MSG_NOTICE([loading cache $cache_file])
1823 [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
1824 *) . ./$cache_file;;
1828 AC_MSG_NOTICE([creating cache $cache_file])
1836 # Dump the cache to stdout. It can be in a pipe (this is a requirement).
1837 m4_define([_AC_CACHE_DUMP],
1838 [# The following way of writing the cache mishandles newlines in values,
1839 # but we know of no workaround that is simple, portable, and efficient.
1840 # So, don't put newlines in cache variables' values.
1841 # Ultrix sh set writes to stderr and can't be redirected directly,
1842 # and sets the high bit in the cache file unless we assign to the vars.
1845 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1847 # `set' does not quote correctly, so add quotes (double-quote
1848 # substitution turns \\\\ into \\, and sed turns \\ into \).
1851 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1854 # `set' quotes correctly as required by POSIX, so do not add quotes.
1856 ["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
1866 # Allow a site initialization script to override cache values.
1867 m4_define([AC_CACHE_SAVE],
1868 [cat >confcache <<\_ACEOF
1869 # This file is a shell script that caches the results of configure
1870 # tests run on this system so they can be shared between configure
1871 # scripts and configure runs, see configure's option --config-cache.
1872 # It is not useful on other systems. If it contains results you don't
1873 # want to keep, you may remove or edit it.
1875 # config.status only pays attention to the cache file if you give it
1876 # the --recheck option to rerun configure.
1878 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1879 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1888 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1890 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1892 if diff $cache_file confcache >/dev/null 2>&1; then :; else
1893 if test -w $cache_file; then
1894 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
1895 cat confcache >$cache_file
1897 echo "not updating unwritable cache $cache_file"
1900 rm -f confcache[]dnl
1904 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1905 # ------------------------------------------
1906 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1907 # Should be dnl'ed. Try to catch common mistakes.
1908 m4_defun([AC_CACHE_VAL],
1909 [m4_bmatch([$2], [AC_DEFINE],
1910 [AC_DIAGNOSE(syntax,
1911 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1912 [where no actions should be taken])])dnl
1914 [_AS_ECHO_N([(cached) ])],
1918 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1919 # -------------------------------------------
1920 # Do not call this macro with a dnl right behind.
1921 m4_defun([AC_CACHE_CHECK],
1922 [AC_MSG_CHECKING([$1])
1923 AC_CACHE_VAL([$2], [$3])dnl
1924 AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])
1928 ## ---------------------- ##
1929 ## Defining CPP symbols. ##
1930 ## ---------------------- ##
1933 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
1934 # -------------------------------------------
1935 # This macro is useless, it is used only with --trace to collect the
1936 # list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED.
1937 m4_define([AC_DEFINE_TRACE_LITERAL])
1940 # AC_DEFINE_TRACE(CPP-SYMBOL)
1941 # ---------------------------
1942 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
1943 # out non literal symbols.
1944 m4_define([AC_DEFINE_TRACE],
1945 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
1948 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
1949 # -------------------------------------------
1950 # Set VARIABLE to VALUE, verbatim, or 1. Remember the value
1951 # and if VARIABLE is affected the same VALUE, do nothing, else
1952 # die. The third argument is used by autoheader.
1953 m4_define([AC_DEFINE], [_AC_DEFINE_Q([\], $@)])
1956 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
1957 # ----------------------------------------------------
1958 # Similar, but perform shell substitutions $ ` \ once on VALUE.
1959 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([], $@)])
1962 # _AC_DEFINE_Q(QUOTE, VARIABLE, [VALUE], [DESCRIPTION])
1963 # -----------------------------------------------------
1964 m4_define([_AC_DEFINE_Q],
1965 [AC_DEFINE_TRACE([$2])dnl
1966 m4_ifval([$4], [AH_TEMPLATE([$2], [$4])])dnl
1967 cat >>confdefs.h <<$1_ACEOF
1968 [@%:@define] $2 m4_if($#, 2, 1, [$3])
1974 ## -------------------------- ##
1975 ## Setting output variables. ##
1976 ## -------------------------- ##
1979 # AC_SUBST(VARIABLE, [VALUE])
1980 # ---------------------------
1981 # Create an output variable from a shell VARIABLE. If VALUE is given
1982 # assign it to VARIABLE. Use `""' is you want to set VARIABLE to an
1983 # empty value, not an empty second argument.
1985 # Beware that if you change this macro, you also have to change the
1986 # sed script at the top of _AC_OUTPUT_FILES.
1987 m4_define([AC_SUBST],
1988 [m4_pattern_allow([^$1$])dnl
1989 m4_ifvaln([$2], [$1=$2])[]dnl
1990 m4_append_uniq([_AC_SUBST_VARS], [$1], [
1995 # AC_SUBST_FILE(VARIABLE)
1996 # -----------------------
1997 # Read the comments of the preceding macro.
1998 m4_define([AC_SUBST_FILE],
1999 [m4_pattern_allow([^$1$])dnl
2000 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2005 ## --------------------------------------- ##
2006 ## Printing messages at autoconf runtime. ##
2007 ## --------------------------------------- ##
2009 # In fact, I think we should promote the use of m4_warn and m4_fatal
2010 # directly. This will also avoid to some people to get it wrong
2011 # between AC_FATAL and AC_MSG_ERROR.
2014 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2015 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2016 # --------------------------------
2017 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2018 m4_define([AC_FATAL], [m4_fatal($@)])
2021 # AC_WARNING(MESSAGE)
2022 # -------------------
2023 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2025 m4_define([AC_WARNING],
2026 [AC_DIAGNOSE([syntax], [$1])])
2031 ## ---------------------------------------- ##
2032 ## Printing messages at configure runtime. ##
2033 ## ---------------------------------------- ##
2036 # AC_MSG_CHECKING(FEATURE)
2037 # ------------------------
2038 m4_define([AC_MSG_CHECKING],
2039 [_AS_ECHO([$as_me:$LINENO: checking $1], AS_MESSAGE_LOG_FD)
2040 _AS_ECHO_N([checking $1... ])[]dnl
2044 # AC_MSG_RESULT(RESULT)
2045 # ---------------------
2046 m4_define([AC_MSG_RESULT],
2047 [_AS_ECHO([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
2048 _AS_ECHO([${ECHO_T}$1])[]dnl
2052 # AC_MSG_RESULT_UNQUOTED(RESULT)
2053 # ------------------------------
2054 # Likewise, but perform $ ` \ shell substitutions.
2055 m4_define([AC_MSG_RESULT_UNQUOTED],
2056 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
2057 _AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
2061 # AC_MSG_WARN(PROBLEM)
2062 # AC_MSG_NOTICE(STRING)
2063 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2064 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2065 # ----------------------------------------
2066 m4_copy([AS_WARN], [AC_MSG_WARN])
2067 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2068 m4_copy([AS_ERROR], [AC_MSG_ERROR])
2069 m4_define([AC_MSG_FAILURE],
2071 See `config.log' for more details.], [$2])])
2074 # _AC_MSG_LOG_CONFTEST
2075 # --------------------
2076 m4_define([_AC_MSG_LOG_CONFTEST],
2077 [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
2078 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2082 # AU::AC_CHECKING(FEATURE)
2083 # ------------------------
2084 AU_DEFUN([AC_CHECKING],
2085 [AS_MESSAGE([checking $1...])])
2088 # AU::AC_VERBOSE(STRING)
2089 # ----------------------
2090 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2097 ## ---------------------------- ##
2098 ## Compiler-running mechanics. ##
2099 ## ---------------------------- ##
2102 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2103 # ----------------------------------
2104 # Eval COMMAND, save the exit status in ac_status, and log it.
2105 AC_DEFUN([_AC_RUN_LOG],
2106 [{ ($2) >&AS_MESSAGE_LOG_FD
2107 ($1) 2>&AS_MESSAGE_LOG_FD
2109 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2110 (exit $ac_status); }])
2113 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2114 # -----------------------------------------
2115 # Run COMMAND, save its stderr into conftest.err, save the exit status
2116 # in ac_status, and log it. Don't forget to clean up conftest.err after
2118 # Note that when tracing, most shells will leave the traces in stderr
2119 # starting with "+": that's what this macro tries to address.
2120 AC_DEFUN([_AC_RUN_LOG_STDERR],
2121 [{ ($2) >&AS_MESSAGE_LOG_FD
2124 grep -v '^ *+' conftest.er1 >conftest.err
2126 cat conftest.err >&AS_MESSAGE_LOG_FD
2127 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2128 (exit $ac_status); }])
2133 # Eval COMMAND, save the exit status in ac_status, and log it.
2134 AC_DEFUN([_AC_EVAL],
2135 [_AC_RUN_LOG([eval $1],
2136 [eval echo "$as_me:$LINENO: \"$1\""])])
2139 # _AC_EVAL_STDERR(COMMAND)
2140 # ------------------------
2141 # Same as _AC_RUN_LOG_STDERR, but evals (instead of the running) the
2143 AC_DEFUN([_AC_EVAL_STDERR],
2144 [_AC_RUN_LOG_STDERR([eval $1],
2145 [eval echo "$as_me:$LINENO: \"$1\""])])
2148 # AC_TRY_EVAL(VARIABLE)
2149 # ---------------------
2150 # The purpose of this macro is to "configure:123: command line"
2151 # written into config.log for every test run.
2152 AC_DEFUN([AC_TRY_EVAL],
2156 # AC_TRY_COMMAND(COMMAND)
2157 # -----------------------
2158 AC_DEFUN([AC_TRY_COMMAND],
2160 _AC_EVAL([$ac_try]); }])
2163 # AC_RUN_LOG(COMMAND)
2164 # -------------------
2165 AC_DEFUN([AC_RUN_LOG],
2167 [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])])
2172 ## ------------------------ ##
2173 ## Examining declarations. ##
2174 ## ------------------------ ##
2178 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2179 # ----------------------------------------------------------------
2180 # Try to preprocess PROGRAM.
2182 # This macro can be used during the selection of a preprocessor.
2183 # Run cpp and set ac_cpp_err to "yes" for an error, to
2184 # "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
2185 # neither warnings nor errors have been detected. eval is necessary
2187 AC_DEFUN([_AC_PREPROC_IFELSE],
2188 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2189 if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then
2190 if test -s conftest.err; then
2191 ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
2192 ac_cpp_err=$ac_cpp_err$ac_[]_AC_LANG_ABBREV[]_werror_flag
2199 if test -z "$ac_cpp_err"; then
2202 _AC_MSG_LOG_CONFTEST
2205 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2206 ])# _AC_PREPROC_IFELSE
2209 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2210 # ---------------------------------------------------------------
2211 # Try to preprocess PROGRAM. Requires that the preprocessor for the
2212 # current language was checked for, hence do not use this macro in macros
2213 # looking for a preprocessor.
2214 AC_DEFUN([AC_PREPROC_IFELSE],
2215 [AC_LANG_PREPROC_REQUIRE()dnl
2216 _AC_PREPROC_IFELSE($@)])
2219 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2220 # ---------------------------------------------------------
2221 # AC_TRY_CPP is used to check whether particular header files exist.
2222 # (But it actually tests whether INCLUDES produces no CPP errors.)
2224 # INCLUDES are not defaulted and are double quoted.
2225 AU_DEFUN([AC_TRY_CPP],
2226 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2229 # AC_EGREP_CPP(PATTERN, PROGRAM,
2230 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2231 # ------------------------------------------------------
2232 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2233 # come early, it is not included in AC_BEFORE checks.
2234 AC_DEFUN([AC_EGREP_CPP],
2235 [AC_LANG_PREPROC_REQUIRE()dnl
2236 AC_REQUIRE([AC_PROG_EGREP])dnl
2237 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2238 dnl eval is necessary to expand ac_cpp.
2239 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2240 if (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2241 dnl Quote $1 to prevent m4 from eating character classes
2242 $EGREP "[$1]" >/dev/null 2>&1; then
2244 m4_ifvaln([$4], [else
2251 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2252 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2253 # ---------------------------------------------------------
2254 AC_DEFUN([AC_EGREP_HEADER],
2262 ## ------------------ ##
2263 ## Examining syntax. ##
2264 ## ------------------ ##
2267 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2268 # ---------------------------------------------------------------------
2269 # Try to compile PROGRAM.
2270 # This macro can be used during the selection of a compiler.
2271 m4_define([_AC_COMPILE_IFELSE],
2272 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2273 rm -f conftest.$ac_objext
2274 AS_IF([_AC_EVAL_STDERR($ac_compile) &&
2275 AC_TRY_COMMAND([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag"
2276 || test ! -s conftest.err]) &&
2277 AC_TRY_COMMAND([test -s conftest.$ac_objext])],
2279 [_AC_MSG_LOG_CONFTEST
2280 m4_ifvaln([$3],[$3])dnl])dnl
2281 rm -f conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2282 ])# _AC_COMPILE_IFELSE
2285 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2286 # --------------------------------------------------------------------
2287 # Try to compile PROGRAM. Requires that the compiler for the current
2288 # language was checked for, hence do not use this macro in macros looking
2290 AC_DEFUN([AC_COMPILE_IFELSE],
2291 [AC_LANG_COMPILER_REQUIRE()dnl
2292 _AC_COMPILE_IFELSE($@)])
2295 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2296 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2297 # --------------------------------------------------------
2298 AU_DEFUN([AC_TRY_COMPILE],
2299 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2303 ## --------------------- ##
2304 ## Examining libraries. ##
2305 ## --------------------- ##
2308 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2309 # ------------------------------------------------------------------
2310 # Try to link PROGRAM.
2311 # This macro can be used during the selection of a compiler.
2312 m4_define([_AC_LINK_IFELSE],
2313 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2314 rm -f conftest.$ac_objext conftest$ac_exeext
2315 AS_IF([_AC_EVAL_STDERR($ac_link) &&
2316 AC_TRY_COMMAND([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag"
2317 || test ! -s conftest.err]) &&
2318 AC_TRY_COMMAND([test -s conftest$ac_exeext])],
2320 [_AC_MSG_LOG_CONFTEST
2321 m4_ifvaln([$3], [$3])dnl])[]dnl
2322 rm -f conftest.err conftest.$ac_objext \
2323 conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2327 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2328 # -----------------------------------------------------------------
2329 # Try to link PROGRAM. Requires that the compiler for the current
2330 # language was checked for, hence do not use this macro in macros looking
2332 AC_DEFUN([AC_LINK_IFELSE],
2333 [AC_LANG_COMPILER_REQUIRE()dnl
2334 _AC_LINK_IFELSE($@)])
2337 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2338 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2339 # -----------------------------------------------------
2340 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2341 AU_DEFUN([AC_TRY_LINK],
2342 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2345 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2346 # ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
2347 # --------------------------------------------------------
2348 AU_DEFUN([AC_COMPILE_CHECK],
2349 [m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl
2350 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
2356 ## -------------------------------- ##
2357 ## Checking for run-time features. ##
2358 ## -------------------------------- ##
2361 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2362 # ------------------------------------------------------------
2363 # Compile, link, and run.
2364 # This macro can be used during the selection of a compiler.
2365 # We also remove conftest.o as if the compilation fails, some compilers
2366 # don't remove it. We remove gmon.out and bb.out, which may be
2367 # created during the run if the program is built with profiling support.
2368 m4_define([_AC_RUN_IFELSE],
2369 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2370 rm -f conftest$ac_exeext
2371 AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
2373 [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
2374 _AC_MSG_LOG_CONFTEST
2376 [( exit $ac_status )
2378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2379 [conftest.$ac_ext])[]dnl
2383 # AC_RUN_IFELSE(PROGRAM,
2384 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2385 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2386 # ----------------------------------------------------------
2387 # Compile, link, and run. Requires that the compiler for the current
2388 # language was checked for, hence do not use this macro in macros looking
2390 AC_DEFUN([AC_RUN_IFELSE],
2391 [AC_LANG_COMPILER_REQUIRE()dnl
2393 [AC_DIAGNOSE([cross],
2394 [$0 called without default to allow cross compiling])])dnl
2395 if test "$cross_compiling" = yes; then
2397 [AC_MSG_FAILURE([cannot run test program while cross compiling])])
2403 # AC_TRY_RUN(PROGRAM,
2404 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2405 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2406 # --------------------------------------------------------
2407 AU_DEFUN([AC_TRY_RUN],
2408 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2412 ## ------------------------------------- ##
2413 ## Checking for the existence of files. ##
2414 ## ------------------------------------- ##
2416 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2417 # -------------------------------------------------------------
2419 # Check for the existence of FILE.
2420 AC_DEFUN([AC_CHECK_FILE],
2421 [AC_DIAGNOSE([cross],
2422 [cannot check for file existence when cross compiling])dnl
2423 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2424 AC_CACHE_CHECK([for $1], ac_File,
2425 [test "$cross_compiling" = yes &&
2426 AC_MSG_ERROR([cannot check for file existence when cross compiling])
2427 if test -r "$1"; then
2428 AS_VAR_SET(ac_File, yes)
2430 AS_VAR_SET(ac_File, no)
2432 AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
2433 AS_VAR_POPDEF([ac_File])dnl
2437 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2438 # -----------------------------------------------------------------
2439 AC_DEFUN([AC_CHECK_FILES],
2440 [AC_FOREACH([AC_FILE_NAME], [$1],
2441 [AC_CHECK_FILE(AC_FILE_NAME,
2442 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2443 [Define to 1 if you have the
2449 ## ------------------------------- ##
2450 ## Checking for declared symbols. ##
2451 ## ------------------------------- ##
2454 # AC_CHECK_DECL(SYMBOL,
2455 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2456 # [INCLUDES = DEFAULT-INCLUDES])
2457 # -------------------------------------------------------
2458 # Check if SYMBOL (a variable or a function) is declared.
2459 AC_DEFUN([AC_CHECK_DECL],
2460 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2461 AC_CACHE_CHECK([whether $1 is declared], ac_Symbol,
2462 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2464 char *p = (char *) $1;
2467 [AS_VAR_SET(ac_Symbol, yes)],
2468 [AS_VAR_SET(ac_Symbol, no)])])
2469 AS_IF([test AS_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl
2470 AS_VAR_POPDEF([ac_Symbol])dnl
2474 # AC_CHECK_DECLS(SYMBOLS,
2475 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2476 # [INCLUDES = DEFAULT-INCLUDES])
2477 # --------------------------------------------------------
2478 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
2479 # documentation for a detailed explanation of this difference with
2480 # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
2481 AC_DEFUN([AC_CHECK_DECLS],
2482 [m4_foreach([AC_Symbol], [$1],
2483 [AC_CHECK_DECL(AC_Symbol,
2484 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2485 [Define to 1 if you have the declaration
2486 of `]AC_Symbol[', and to 0 if you don't.])
2488 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2495 ## ---------------------------------- ##
2496 ## Replacement of library functions. ##
2497 ## ---------------------------------- ##
2500 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2501 # -----------------------------
2502 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2503 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2504 [m4_bmatch([$1], [^]m4_defn([m4_cr_symbols2]),
2505 [AC_WARNING([invalid replacement directory: $1])])dnl
2506 m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])[]dnl
2510 # AC_LIBSOURCE(FILE-NAME)
2511 # -----------------------
2512 # Announce we might need the file `FILE-NAME'.
2513 m4_define([AC_LIBSOURCE], [])
2516 # AC_LIBSOURCES([FILE-NAME1, ...])
2517 # -------------------------------
2518 # Announce we might need these files.
2519 m4_define([AC_LIBSOURCES],
2520 [m4_foreach([_AC_FILE_NAME], [$1],
2521 [AC_LIBSOURCE(_AC_FILE_NAME)])])
2524 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
2525 # --------------------------------------------
2526 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2527 m4_define([_AC_LIBOBJ],
2528 [AS_LITERAL_IF([$1],
2529 [AC_LIBSOURCE([$1.c])],
2531 case $LIB@&t@OBJS in
2533 *" $1.$ac_objext" | \
2534 "$1.$ac_objext "* | \
2535 *" $1.$ac_objext "* ) ;;
2536 *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
2541 # AC_LIBOBJ(FILE-NAME-NOEXT)
2542 # -------------------------
2543 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2544 m4_define([AC_LIBOBJ],
2546 [AC_DIAGNOSE(syntax,
2547 [$0($1): you should use literals])])dnl
2551 # _AC_LIBOBJS_NORMALIZE
2552 # ---------------------
2553 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
2554 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2555 # Used with AC_CONFIG_COMMANDS_PRE.
2556 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2559 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2560 # 1. Remove the extension, and $U if already installed.
2561 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2562 ac_i=`echo "$ac_i" | sed "$ac_script"`
2563 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
2564 # will be set to the directory where LIBOBJS objects are built.
2565 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
2566 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
2568 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2569 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2573 ## ----------------------------------- ##
2574 ## Checking compiler characteristics. ##
2575 ## ----------------------------------- ##
2578 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
2579 # ---------------------------------------------------------------------
2580 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2581 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2582 m4_define([_AC_COMPUTE_INT_COMPILE],
2583 [# Depending upon the size, compute the lo and hi bounds.
2584 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2587 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2588 [ac_hi=$ac_mid; break],
2589 [ac_lo=`expr $ac_mid + 1`
2590 if test $ac_lo -le $ac_mid; then
2594 ac_mid=`expr 2 '*' $ac_mid + 1`])
2596 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2599 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2600 [ac_lo=$ac_mid; break],
2601 [ac_hi=`expr '(' $ac_mid ')' - 1`
2602 if test $ac_mid -le $ac_hi; then
2606 ac_mid=`expr 2 '*' $ac_mid`])
2609 # Binary search between lo and hi bounds.
2610 while test "x$ac_lo" != "x$ac_hi"; do
2611 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2612 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2613 [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2619 ])# _AC_COMPUTE_INT_COMPILE
2622 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
2623 # -----------------------------------------------------------------
2624 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2625 m4_define([_AC_COMPUTE_INT_RUN],
2626 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2627 [$2=`cat conftest.val`], [$4])])
2630 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
2631 # ---------------------------------------------------------
2632 m4_define([_AC_COMPUTE_INT],
2633 [AC_LANG_COMPILER_REQUIRE()dnl
2634 if test "$cross_compiling" = yes; then
2635 _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3], [$4])
2637 _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
2639 rm -f conftest.val[]dnl