1 # This file is part of Autoconf. -*- Autoconf -*-
2 # Parameterized macros.
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
4 # 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 # AC_HELP_STRING(LHS, RHS, [COLUMN])
218 # ----------------------------------
220 # Format an Autoconf macro's help string so that it looks pretty when
221 # the user executes "configure --help". This macro takes three
222 # arguments, a "left hand side" (LHS), a "right hand side" (RHS), and
223 # the COLUMN which is a string of white spaces which leads to the
224 # the RHS column (default: 26 white spaces).
226 # The resulting string is suitable for use in other macros that require
227 # a help string (e.g. AC_ARG_WITH).
229 # Here is the sample string from the Autoconf manual (Node: External
230 # Software) which shows the proper spacing for help strings.
232 # --with-readline support fancy command line editing
235 # | column 2 column 26
239 # A help string is made up of a "left hand side" (LHS) and a "right
240 # hand side" (RHS). In the example above, the LHS is
241 # "--with-readline", while the RHS is "support fancy command line
244 # If the LHS extends past column 24, then the LHS is terminated with a
245 # newline so that the RHS is on a line of its own beginning in column
248 # Therefore, if the LHS were instead "--with-readline-blah-blah-blah",
249 # then the AC_HELP_STRING macro would expand into:
252 # --with-readline-blah-blah-blah
253 # ^ ^ support fancy command line editing
258 m4_define([AC_HELP_STRING],
259 [m4_pushdef([AC_Prefix], m4_default([$3], [ ]))dnl
260 m4_pushdef([AC_Prefix_Format],
261 [ %-]m4_eval(m4_len(AC_Prefix) - 3)[s ])dnl [ %-23s ]
262 m4_text_wrap([$2], AC_Prefix, m4_format(AC_Prefix_Format, [$1]))dnl
263 m4_popdef([AC_Prefix_Format])dnl
264 m4_popdef([AC_Prefix])dnl
270 ## ---------------------------------------------- ##
271 ## Information on the package being Autoconf'ed. ##
272 ## ---------------------------------------------- ##
275 # It is suggested that the macros in this section appear before
276 # AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
277 # and from the implementation point of, AC_INIT *must* be expanded
278 # beforehand: it puts data in diversions which must appear before the
279 # data provided by the macros of this section.
281 # The solution is to require AC_INIT in each of these macros. AC_INIT
282 # has the needed magic so that it can't be expanded twice.
286 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
287 # --------------------------------------------------------------
288 m4_define([_AC_INIT_PACKAGE],
289 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
290 AS_LITERAL_IF([$2], [], [m4_warn([syntax], [AC_INIT: not a literal: $2])])
291 AS_LITERAL_IF([$3], [], [m4_warn([syntax], [AC_INIT: not a literal: $3])])
292 m4_ifndef([AC_PACKAGE_NAME],
293 [m4_define([AC_PACKAGE_NAME], [$1])])
294 m4_ifndef([AC_PACKAGE_TARNAME],
295 [m4_define([AC_PACKAGE_TARNAME],
297 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
299 [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
301 m4_ifndef([AC_PACKAGE_VERSION],
302 [m4_define([AC_PACKAGE_VERSION], [$2])])
303 m4_ifndef([AC_PACKAGE_STRING],
304 [m4_define([AC_PACKAGE_STRING], [$1 $2])])
305 m4_ifndef([AC_PACKAGE_BUGREPORT],
306 [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
310 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
311 # ------------------------------------------------------
312 # Append Copyright information in the top of `configure'. TEXT is
313 # evaluated once, hence TEXT can use macros. Note that we do not
314 # prepend `# ' but `@%:@ ', since m4 does not evaluate the comments.
315 # Had we used `# ', the Copyright sent in the beginning of `configure'
316 # would have not been evaluated. Another solution, a bit fragile,
317 # would have be to use m4_quote to force an evaluation:
319 # m4_bpatsubst(m4_quote($1), [^], [# ])
320 m4_define([AC_COPYRIGHT],
321 [m4_divert_text([HEADER-COPYRIGHT],
323 $1], [^], [@%:@ ])])dnl
324 m4_divert_text(m4_default([$2], [VERSION_USER]),
330 # AC_REVISION(REVISION-INFO)
331 # --------------------------
332 # The second quote in the translit is just to cope with font-lock-mode
333 # which sees the opening of a string.
334 m4_define([AC_REVISION],
335 [m4_divert_text([HEADER-REVISION],
336 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
342 ## ---------------------------------------- ##
343 ## Requirements over the Autoconf version. ##
344 ## ---------------------------------------- ##
347 # AU::AC_PREREQ(VERSION)
348 # ----------------------
349 # Update this `AC_PREREQ' statement to require the current version of
350 # Autoconf. But fail if ever this autoupdate is too old.
352 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
353 # calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be
354 # quite complex for autoupdate to import the value of
355 # `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
356 # this would replace all its occurrences with the current version of
357 # Autoconf, which is certainly not what the user intended.
358 AU_DEFUN([AC_PREREQ],
359 [m4_version_prereq([$1])[]dnl
360 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
365 # Complain and exit if the Autoconf version is less than VERSION.
366 m4_copy([m4_version_prereq], [AC_PREREQ])
373 ## ---------------- ##
374 ## Initialization. ##
375 ## ---------------- ##
378 # All the following macros are used by AC_INIT. Ideally, they should
379 # be presented in the order in which they are output. Please, help us
380 # sorting it, or at least, don't augment the entropy.
385 m4_define([_AC_INIT_NOTICE],
386 [m4_divert_text([HEADER-COMMENT],
387 [@%:@ Guess values for system-dependent variables and create Makefiles.
388 @%:@ Generated by m4_PACKAGE_STRING[]dnl
389 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
391 m4_ifset([AC_PACKAGE_BUGREPORT],
392 [m4_divert_text([HEADER-COMMENT],
394 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
400 # We dump to VERSION_FSF to make sure we are inserted before the
401 # user copyrights, and after the setup of the --version handling.
402 m4_define([_AC_INIT_COPYRIGHT],
404 [Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
405 Free Software Foundation, Inc.
406 This configure script is free software; the Free Software Foundation
407 gives unlimited permission to copy, distribute and modify it.],
414 # Set up the file descriptors used by `configure'.
415 # File descriptor usage:
418 # 2 errors and warnings
419 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
420 # AS_MESSAGE_FD checking for... messages and results
422 m4_define([AS_MESSAGE_FD], 6)
423 # That's how they used to be named.
424 AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
425 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
430 # Values which defaults can be set from `configure.ac'.
431 # `/bin/machine' is used in `glibcbug'. The others are used in config.*
432 m4_define([_AC_INIT_DEFAULTS],
433 [m4_divert_push([DEFAULTS])dnl
436 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
437 # so uname gets run too.
438 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
440 exec AS_MESSAGE_FD>&1
445 ac_default_prefix=/usr/local
446 ac_config_libobj_dir=.
451 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
452 AC_SUBST([PATH_SEPARATOR])dnl
454 # Maximum number of lines to put in a shell here document.
455 # This variable seems obsolete. It should probably be removed, and
456 # only ac_max_sed_lines should be used.
457 : ${ac_max_here_lines=38}
459 # Identity of this package.
460 AC_SUBST([PACKAGE_NAME],
461 [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
462 AC_SUBST([PACKAGE_TARNAME],
463 [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
464 AC_SUBST([PACKAGE_VERSION],
465 [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
466 AC_SUBST([PACKAGE_STRING],
467 [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
468 AC_SUBST([PACKAGE_BUGREPORT],
469 [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
471 m4_divert_pop([DEFAULTS])dnl
472 m4_wrap([m4_divert_text([DEFAULTS],
473 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS])])'
474 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'])])dnl
475 ])# _AC_INIT_DEFAULTS
478 # AC_PREFIX_DEFAULT(PREFIX)
479 # -------------------------
480 AC_DEFUN([AC_PREFIX_DEFAULT],
481 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
484 # AC_PREFIX_PROGRAM(PROGRAM)
485 # --------------------------
486 # Guess the value for the `prefix' variable by looking for
487 # the argument program along PATH and taking its parent.
488 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
489 # set `prefix' to /usr/local/gnu.
490 # This comes too late to find a site file based on the prefix,
491 # and it might use a cached value for the path.
492 # No big loss, I think, since most configures don't use this macro anyway.
493 AC_DEFUN([AC_PREFIX_PROGRAM],
494 [if test "x$prefix" = xNONE; then
495 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
496 _AS_ECHO_N([checking for prefix by ])
497 AC_PATH_PROG(ac_prefix_program, [$1])
498 if test -n $ac_prefix_program; then
499 prefix=`AS_DIRNAME(["$ac_prefix_program"])`
500 prefix=`AS_DIRNAME(["$prefix"])`
503 ])# AC_PREFIX_PROGRAM
506 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
507 # ---------------------------------------------
508 # UNIQUE-FILE-IN-SOURCE-DIR is a filename unique to this package,
509 # relative to the directory that configure is in, which we can look
510 # for to find out if srcdir is correct.
511 AC_DEFUN([AC_CONFIG_SRCDIR],
512 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
517 # Compute `srcdir' based on `$ac_unique_file'.
518 m4_define([_AC_INIT_SRCDIR],
519 [m4_divert_push([PARSE_ARGS])dnl
521 # Find the source files, if location was not specified.
522 if test -z "$srcdir"; then
523 ac_srcdir_defaulted=yes
524 # Try the directory containing this script, then its parent.
525 ac_confdir=`AS_DIRNAME(["$[0]"])`
527 if test ! -r $srcdir/$ac_unique_file; then
531 ac_srcdir_defaulted=no
533 if test ! -r $srcdir/$ac_unique_file; then
534 if test "$ac_srcdir_defaulted" = yes; then
535 AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $ac_confdir or ..])
537 AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
540 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
541 AC_MSG_ERROR([sources are in $srcdir, but `cd $srcdir' does not work])
542 dnl Double slashes in pathnames in object file debugging info
543 dnl mess up M-x gdb in Emacs.
544 srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`
545 m4_divert_pop([PARSE_ARGS])dnl
549 # _AC_INIT_PARSE_ARGS
550 # -------------------
551 m4_define([_AC_INIT_PARSE_ARGS],
552 [m4_divert_push([PARSE_ARGS])dnl
554 # Initialize some variables set by options.
556 ac_init_version=false
557 # The variables have the same names as the options, with
558 # dashes changed to underlines.
560 AC_SUBST(exec_prefix, NONE)dnl
563 AC_SUBST(prefix, NONE)dnl
566 AC_SUBST(program_transform_name, [s,x,x,])dnl
574 # Installation directory options.
575 # These are left unexpanded so users can "make install exec_prefix=/foo"
576 # and all the variables that are supposed to be based on exec_prefix
577 # by default will actually change.
578 # Use braces instead of parens because sh, perl, etc. also accept them.
579 AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
580 AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
581 AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
582 AC_SUBST([datadir], ['${prefix}/share'])dnl
583 AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
584 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
585 AC_SUBST([localstatedir], ['${prefix}/var'])dnl
586 AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
587 AC_SUBST([includedir], ['${prefix}/include'])dnl
588 AC_SUBST([oldincludedir], ['/usr/include'])dnl
589 AC_SUBST([infodir], ['${prefix}/info'])dnl
590 AC_SUBST([mandir], ['${prefix}/man'])dnl
595 # If the previous option needs an argument, assign it.
596 if test -n "$ac_prev"; then
597 eval "$ac_prev=\$ac_option"
602 ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
604 # Accept the important Cygnus configure options, so we can diagnose typos.
608 -bindir | --bindir | --bindi | --bind | --bin | --bi)
610 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
613 -build | --build | --buil | --bui | --bu)
614 ac_prev=build_alias ;;
615 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
616 build_alias=$ac_optarg ;;
618 -cache-file | --cache-file | --cache-fil | --cache-fi \
619 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
620 ac_prev=cache_file ;;
621 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
622 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
623 cache_file=$ac_optarg ;;
626 cache_file=config.cache ;;
628 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
630 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
632 datadir=$ac_optarg ;;
634 -disable-* | --disable-*)
635 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
636 # Reject names that are not valid shell variable names.
637 expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
638 AC_MSG_ERROR([invalid feature name: $ac_feature])
639 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
640 eval "enable_$ac_feature=no" ;;
642 -enable-* | --enable-*)
643 ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
644 # Reject names that are not valid shell variable names.
645 expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
646 AC_MSG_ERROR([invalid feature name: $ac_feature])
647 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
649 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
652 eval "enable_$ac_feature='$ac_optarg'" ;;
654 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
655 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
656 | --exec | --exe | --ex)
657 ac_prev=exec_prefix ;;
658 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
659 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
660 | --exec=* | --exe=* | --ex=*)
661 exec_prefix=$ac_optarg ;;
663 -gas | --gas | --ga | --g)
664 # Obsolete; use --with-gas.
667 -help | --help | --hel | --he | -h)
669 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
670 ac_init_help=recursive ;;
671 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
672 ac_init_help=short ;;
674 -host | --host | --hos | --ho)
675 ac_prev=host_alias ;;
676 -host=* | --host=* | --hos=* | --ho=*)
677 host_alias=$ac_optarg ;;
679 -includedir | --includedir | --includedi | --included | --include \
680 | --includ | --inclu | --incl | --inc)
681 ac_prev=includedir ;;
682 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
683 | --includ=* | --inclu=* | --incl=* | --inc=*)
684 includedir=$ac_optarg ;;
686 -infodir | --infodir | --infodi | --infod | --info | --inf)
688 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
689 infodir=$ac_optarg ;;
691 -libdir | --libdir | --libdi | --libd)
693 -libdir=* | --libdir=* | --libdi=* | --libd=*)
696 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
697 | --libexe | --libex | --libe)
698 ac_prev=libexecdir ;;
699 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
700 | --libexe=* | --libex=* | --libe=*)
701 libexecdir=$ac_optarg ;;
703 -localstatedir | --localstatedir | --localstatedi | --localstated \
704 | --localstate | --localstat | --localsta | --localst \
705 | --locals | --local | --loca | --loc | --lo)
706 ac_prev=localstatedir ;;
707 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
708 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
709 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
710 localstatedir=$ac_optarg ;;
712 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
714 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
718 # Obsolete; use --without-fp.
721 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
722 | --no-cr | --no-c | -n)
725 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
726 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
729 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
730 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
731 | --oldin | --oldi | --old | --ol | --o)
732 ac_prev=oldincludedir ;;
733 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
734 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
735 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
736 oldincludedir=$ac_optarg ;;
738 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
740 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
743 -program-prefix | --program-prefix | --program-prefi | --program-pref \
744 | --program-pre | --program-pr | --program-p)
745 ac_prev=program_prefix ;;
746 -program-prefix=* | --program-prefix=* | --program-prefi=* \
747 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
748 program_prefix=$ac_optarg ;;
750 -program-suffix | --program-suffix | --program-suffi | --program-suff \
751 | --program-suf | --program-su | --program-s)
752 ac_prev=program_suffix ;;
753 -program-suffix=* | --program-suffix=* | --program-suffi=* \
754 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
755 program_suffix=$ac_optarg ;;
757 -program-transform-name | --program-transform-name \
758 | --program-transform-nam | --program-transform-na \
759 | --program-transform-n | --program-transform- \
760 | --program-transform | --program-transfor \
761 | --program-transfo | --program-transf \
762 | --program-trans | --program-tran \
763 | --progr-tra | --program-tr | --program-t)
764 ac_prev=program_transform_name ;;
765 -program-transform-name=* | --program-transform-name=* \
766 | --program-transform-nam=* | --program-transform-na=* \
767 | --program-transform-n=* | --program-transform-=* \
768 | --program-transform=* | --program-transfor=* \
769 | --program-transfo=* | --program-transf=* \
770 | --program-trans=* | --program-tran=* \
771 | --progr-tra=* | --program-tr=* | --program-t=*)
772 program_transform_name=$ac_optarg ;;
774 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
775 | -silent | --silent | --silen | --sile | --sil)
778 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
780 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
782 sbindir=$ac_optarg ;;
784 -sharedstatedir | --sharedstatedir | --sharedstatedi \
785 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
786 | --sharedst | --shareds | --shared | --share | --shar \
788 ac_prev=sharedstatedir ;;
789 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
790 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
791 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
793 sharedstatedir=$ac_optarg ;;
795 -site | --site | --sit)
797 -site=* | --site=* | --sit=*)
800 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
802 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
805 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
806 | --syscon | --sysco | --sysc | --sys | --sy)
807 ac_prev=sysconfdir ;;
808 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
809 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
810 sysconfdir=$ac_optarg ;;
812 -target | --target | --targe | --targ | --tar | --ta | --t)
813 ac_prev=target_alias ;;
814 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
815 target_alias=$ac_optarg ;;
817 -v | -verbose | --verbose | --verbos | --verbo | --verb)
820 -version | --version | --versio | --versi | --vers | -V)
824 ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
825 # Reject names that are not valid shell variable names.
826 expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
827 AC_MSG_ERROR([invalid package name: $ac_package])
828 ac_package=`echo $ac_package| sed 's/-/_/g'`
830 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
833 eval "with_$ac_package='$ac_optarg'" ;;
835 -without-* | --without-*)
836 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
837 # Reject names that are not valid shell variable names.
838 expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
839 AC_MSG_ERROR([invalid package name: $ac_package])
840 ac_package=`echo $ac_package | sed 's/-/_/g'`
841 eval "with_$ac_package=no" ;;
844 # Obsolete; use --with-x.
847 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
848 | --x-incl | --x-inc | --x-in | --x-i)
849 ac_prev=x_includes ;;
850 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
851 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
852 x_includes=$ac_optarg ;;
854 -x-libraries | --x-libraries | --x-librarie | --x-librari \
855 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
856 ac_prev=x_libraries ;;
857 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
858 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
859 x_libraries=$ac_optarg ;;
861 -*) AC_MSG_ERROR([unrecognized option: $ac_option
862 Try `$[0] --help' for more information.])
866 ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
867 # Reject names that are not valid shell variable names.
868 expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
869 AC_MSG_ERROR([invalid variable name: $ac_envvar])
870 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
871 eval "$ac_envvar='$ac_optarg'"
875 # FIXME: should be removed in autoconf 3.0.
876 AC_MSG_WARN([you should use --build, --host, --target])
877 expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
878 AC_MSG_WARN([invalid host type: $ac_option])
879 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
885 if test -n "$ac_prev"; then
886 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
887 AC_MSG_ERROR([missing argument to $ac_option])
890 # Be sure to have absolute paths.
891 for ac_var in exec_prefix prefix
893 eval ac_val=$`echo $ac_var`
895 [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
896 *) AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
900 # Be sure to have absolute paths.
901 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
902 localstatedir libdir includedir oldincludedir infodir mandir
904 eval ac_val=$`echo $ac_var`
906 [[\\/$]]* | ?:[[\\/]]* ) ;;
907 *) AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
911 # There might be people who depend on the old broken behavior: `$host'
912 # used to hold the argument of --host etc.
913 # FIXME: To remove some day.
918 # FIXME: To remove some day.
919 if test "x$host_alias" != x; then
920 if test "x$build_alias" = x; then
921 cross_compiling=maybe
922 AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
923 If a cross compiler is detected then cross compile mode will be used.])
924 elif test "x$build_alias" != "x$host_alias"; then
930 test -n "$host_alias" && ac_tool_prefix=$host_alias-
932 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
934 m4_divert_pop([PARSE_ARGS])dnl
935 ])# _AC_INIT_PARSE_ARGS
940 # Handle the `configure --help' message.
941 m4_define([_AC_INIT_HELP],
942 [m4_divert_push([HELP_BEGIN])dnl
945 # Report the --help message.
947 if test "$ac_init_help" = "long"; then
948 # Omit some internal or obsolete options to make the list less imposing.
949 # This message is too long to be a string in the A/UX 3.1 sh.
951 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
953 [this package]) to adapt to many kinds of systems.
955 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
957 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
958 VAR=VALUE. See below for descriptions of some of the useful variables.
960 Defaults for the options are specified in brackets.
963 -h, --help display this help and exit
964 --help=short display options specific to this package
965 --help=recursive display the short help of all the included packages
966 -V, --version display version information and exit
967 -q, --quiet, --silent do not print \`checking...' messages
968 --cache-file=FILE cache test results in FILE [disabled]
969 -C, --config-cache alias for \`--cache-file=config.cache'
970 -n, --no-create do not create output files
971 --srcdir=DIR find the sources in DIR [configure dir or \`..']
976 Installation directories:
977 --prefix=PREFIX install architecture-independent files in PREFIX
979 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
982 By default, \`make install' will install all the files in
983 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
984 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
985 for instance \`--prefix=\$HOME'.
987 For better control, use the options below.
989 Fine tuning of the installation directories:
990 --bindir=DIR user executables [EPREFIX/bin]
991 --sbindir=DIR system admin executables [EPREFIX/sbin]
992 --libexecdir=DIR program executables [EPREFIX/libexec]
993 --datadir=DIR read-only architecture-independent data [PREFIX/share]
994 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
995 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
996 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
997 --libdir=DIR object code libraries [EPREFIX/lib]
998 --includedir=DIR C header files [PREFIX/include]
999 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1000 --infodir=DIR info documentation [PREFIX/info]
1001 --mandir=DIR man documentation [PREFIX/man]
1005 m4_divert_pop([HELP_BEGIN])dnl
1006 dnl The order of the diversions here is
1008 dnl which may be extended by extra generic options such as with X or
1009 dnl AC_ARG_PROGRAM. Displayed only in long --help.
1012 dnl Support for cross compilation (--build, --host and --target).
1013 dnl Display only in long --help.
1016 dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1017 dnl then implements the header of the non generic options.
1026 dnl initialized below, in which we dump the trailer (handling of the
1027 dnl recursion for instance).
1028 m4_divert_push([HELP_ENABLE])dnl
1032 if test -n "$ac_init_help"; then
1033 m4_ifset([AC_PACKAGE_STRING],
1034 [ case $ac_init_help in
1035 short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1038 m4_divert_pop([HELP_ENABLE])dnl
1039 m4_divert_push([HELP_END])dnl
1040 m4_ifset([AC_PACKAGE_BUGREPORT], [
1041 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1045 if test "$ac_init_help" = "recursive"; then
1046 # If there are subdirs, report their specific --help.
1048 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1049 test -d $ac_dir || continue
1050 _AC_SRCPATHS(["$ac_dir"])
1052 # Check for guested configure; otherwise get Cygnus style configure.
1053 if test -f $ac_srcdir/configure.gnu; then
1055 $SHELL $ac_srcdir/configure.gnu --help=recursive
1056 elif test -f $ac_srcdir/configure; then
1058 $SHELL $ac_srcdir/configure --help=recursive
1059 elif test -f $ac_srcdir/configure.ac ||
1060 test -f $ac_srcdir/configure.in; then
1062 $ac_configure --help
1064 AC_MSG_WARN([no configuration information is in $ac_dir])
1070 test -n "$ac_init_help" && exit 0
1071 m4_divert_pop([HELP_END])dnl
1077 # Handle the `configure --version' message.
1078 m4_define([_AC_INIT_VERSION],
1079 [m4_divert_text([VERSION_BEGIN],
1080 [if $ac_init_version; then
1082 m4_ifset([AC_PACKAGE_STRING],
1083 [m4_divert_text([VERSION_BEGIN],
1085 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1086 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1087 generated by m4_PACKAGE_STRING])])
1088 m4_divert_text([VERSION_END],
1092 ])# _AC_INIT_VERSION
1095 # _AC_INIT_CONFIG_LOG
1096 # -------------------
1097 # Initialize the config.log file descriptor and write header to it.
1098 m4_define([_AC_INIT_CONFIG_LOG],
1099 [m4_divert_text([INIT_PREPARE],
1100 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1101 exec AS_MESSAGE_LOG_FD>config.log
1102 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1103 This file contains any messages produced by compilers while
1104 running configure, to aid debugging if configure makes a mistake.
1106 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1107 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1108 generated by m4_PACKAGE_STRING. Invocation command line was
1113 AS_UNAME >&AS_MESSAGE_LOG_FD
1115 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1118 m4_text_box([Core tests.])
1121 ])])# _AC_INIT_CONFIG_LOG
1126 # Called by AC_INIT to build the preamble of the `configure' scripts.
1127 # 1. Trap and clean up various tmp files.
1128 # 2. Set up the fd and output files
1129 # 3. Remember the options given to `configure' for `config.status --recheck'.
1130 # 4. Ensure a correct environment
1131 # 5. Required macros (cache, default AC_SUBST etc.)
1132 m4_define([_AC_INIT_PREPARE],
1133 [m4_divert_push([INIT_PREPARE])dnl
1135 # Keep a trace of the command line.
1136 # Strip out --no-create and --no-recursion so they do not pile up.
1137 # Strip out --silent because we don't want to record it for future runs.
1138 # Also quote any args containing shell meta-characters.
1139 # Make two passes to allow for proper duplicate-argument suppression.
1144 ac_must_keep_next=false
1150 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1151 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1152 | -silent | --silent | --silen | --sile | --sil)
1154 dnl If you change this globbing pattern, test it on an old shell --
1155 dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
1156 [ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
1157 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1160 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1162 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1163 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1164 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1165 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1166 dnl give --prefix foo bar).
1167 if test $ac_must_keep_next = true; then
1168 ac_must_keep_next=false # Got value, back to normal.
1171 dnl Use broad patterns, as arguments that would have already made configure
1172 dnl exit don't matter.
1173 *=* | --config-cache | -C | -disable-* | --disable-* \
1174 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1175 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1176 | -with-* | --with-* | -without-* | --without-* | --x)
1177 case "$ac_configure_args0 " in
1178 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1181 -* ) ac_must_keep_next=true ;;
1184 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1185 # Get rid of the leading space.
1191 AS_UNSET(ac_configure_args0)
1192 AS_UNSET(ac_configure_args1)
1194 # When interrupted or exit'd, cleanup temporary files, and complete
1195 # config.log. We remove comments because anyway the quotes in there
1196 # would cause problems or look ugly.
1197 # WARNING: Be sure not to use single quotes in there, as some shells,
1198 # such as our DU 5.0 friend, will then `close' the trap.
1199 trap 'exit_status=$?
1200 # Save into config.log some information that might help in debugging.
1204 AS_BOX([Cache variables.])
1206 m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1212 AS_BOX([Output variables.])
1214 for ac_var in $ac_subst_vars
1216 eval ac_val=$`echo $ac_var`
1217 echo "$ac_var='"'"'$ac_val'"'"'"
1221 if test -n "$ac_subst_files"; then
1222 AS_BOX([Output files.])
1224 for ac_var in $ac_subst_files
1226 eval ac_val=$`echo $ac_var`
1227 echo "$ac_var='"'"'$ac_val'"'"'"
1232 if test -s confdefs.h; then
1233 AS_BOX([confdefs.h.])
1235 sed "/^$/d" confdefs.h | sort
1238 test "$ac_signal" != 0 &&
1239 echo "$as_me: caught signal $ac_signal"
1240 echo "$as_me: exit $exit_status"
1241 } >&AS_MESSAGE_LOG_FD
1242 rm -f core core.* *.core &&
1243 rm -rf conftest* confdefs* conf$[$]* $ac_clean_files &&
1246 for ac_signal in 1 2 13 15; do
1247 trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1251 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1252 rm -rf conftest* confdefs.h
1253 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1256 # Predefined preprocessor variables.
1257 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1258 [Define to the full name of this package.])
1259 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1260 [Define to the one symbol short name of this package.])
1261 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1262 [Define to the version of this package.])
1263 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1264 [Define to the full name and version of this package.])
1265 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1266 [Define to the address where bug reports for this package
1269 # Let the site file select an alternate cache file if it wants to.
1272 _AC_ARG_VAR_VALIDATE
1273 _AC_ARG_VAR_PRECIOUS([build_alias])dnl
1274 _AC_ARG_VAR_PRECIOUS([host_alias])dnl
1275 _AC_ARG_VAR_PRECIOUS([target_alias])dnl
1278 dnl Substitute for predefined variables.
1280 AC_SUBST([ECHO_C])dnl
1281 AC_SUBST([ECHO_N])dnl
1282 AC_SUBST([ECHO_T])dnl
1284 m4_divert_pop([INIT_PREPARE])dnl
1285 ])# _AC_INIT_PREPARE
1288 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1289 # ----------------------------------------
1290 # This macro is used only for Autoupdate.
1292 [m4_ifval([$2], [[AC_INIT($@)]],
1295 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1299 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1300 # ----------------------------------------
1301 # Include the user macro files, prepare the diversions, and output the
1302 # preamble of the `configure' script.
1303 # Note that the order is important: first initialize, then set the
1305 m4_define([AC_INIT],
1306 [# Forbidden tokens and exceptions.
1307 m4_pattern_forbid([^_?A[CHUM]_])
1308 m4_pattern_forbid([_AC_])
1309 m4_pattern_forbid([^LIBOBJS$],
1310 [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1311 # Actually reserved by M4sh.
1312 m4_pattern_allow([^AS_FLAGS$])
1315 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1325 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1331 ## ----------------------------- ##
1332 ## Selecting optional features. ##
1333 ## ----------------------------- ##
1336 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1337 # ------------------------------------------------------------------------
1338 AC_DEFUN([AC_ARG_ENABLE],
1339 [m4_divert_once([HELP_ENABLE], [[
1341 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1342 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])dnl
1343 m4_divert_once([HELP_ENABLE], [$2])dnl
1344 # Check whether --enable-$1 or --disable-$1 was given.
1345 if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then
1346 enableval="[$enable_]m4_bpatsubst([$1], -, _)"
1348 m4_ifvaln([$4], [else
1354 AU_DEFUN([AC_ENABLE],
1355 [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
1358 ## ------------------------------ ##
1359 ## Working with optional software ##
1360 ## ------------------------------ ##
1364 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1365 # --------------------------------------------------------------------
1366 AC_DEFUN([AC_ARG_WITH],
1367 [m4_divert_once([HELP_WITH], [[
1369 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1370 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
1371 m4_divert_once([HELP_WITH], [$2])dnl
1372 # Check whether --with-$1 or --without-$1 was given.
1373 if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then
1374 withval="[$with_]m4_bpatsubst([$1], -, _)"
1376 m4_ifvaln([$4], [else
1382 [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
1386 ## ----------------------------------------- ##
1387 ## Remembering variables for reconfiguring. ##
1388 ## ----------------------------------------- ##
1391 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1392 # -----------------------------
1393 # Declare VARNAME is precious.
1395 # We try to diagnose when precious variables have changed. To do this,
1396 # make two early snapshots (after the option processing to take
1397 # explicit variables into account) of those variables: one (ac_env_)
1398 # which represents the current run, and a second (ac_cv_env_) which,
1399 # at the first run, will be saved in the cache. As an exception to
1400 # the cache mechanism, its loading will override these variables (non
1401 # `ac_cv_env_' cache value are only set when unset).
1403 # In subsequent runs, after having loaded the cache, compare
1404 # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
1405 m4_define([_AC_ARG_VAR_PRECIOUS],
1407 m4_divert_once([PARSE_ARGS],
1408 [ac_env_$1_set=${$1+set}
1410 ac_cv_env_$1_set=${$1+set}
1411 ac_cv_env_$1_value=$$1])dnl
1415 # _AC_ARG_VAR_VALIDATE
1416 # --------------------
1417 # The precious variables are saved twice at the beginning of
1418 # configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_SET' and
1419 # `ac_env_PRECIOUS_VALUE' on the one hand and `ac_cv_env_PRECIOUS_SET'
1420 # and `ac_cv_env_PRECIOUS_VALUE' on the other hand.
1422 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1423 # content of the cached values, while `ac_env_' represents that of the
1426 # So we check that `ac_env_' and `ac_cv_env_' are consistent. If
1428 m4_define([_AC_ARG_VAR_VALIDATE],
1429 [# Check that the precious variables saved in the cache have kept the same
1431 ac_cache_corrupted=false
1432 for ac_var in `(set) 2>&1 |
1433 sed -n 's/^ac_env_\([[a-zA-Z_0-9]]*\)_set=.*/\1/p'`; do
1434 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1435 eval ac_new_set=\$ac_env_${ac_var}_set
1436 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1437 eval ac_new_val="\$ac_env_${ac_var}_value"
1438 case $ac_old_set,$ac_new_set in
1440 AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1441 ac_cache_corrupted=: ;;
1443 AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1444 ac_cache_corrupted=: ;;
1447 if test "x$ac_old_val" != "x$ac_new_val"; then
1448 AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1449 AS_MESSAGE([ former value: $ac_old_val], 2)
1450 AS_MESSAGE([ current value: $ac_new_val], 2)
1451 ac_cache_corrupted=:
1454 # Pass precious variables to config.status.
1455 if test "$ac_new_set" = set; then
1457 dnl If you change this globbing pattern, test it on an old shell --
1458 dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
1459 [ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
1460 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1461 *) ac_arg=$ac_var=$ac_new_val ;;
1463 case " $ac_configure_args " in
1464 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1465 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1469 if $ac_cache_corrupted; then
1470 AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1471 AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1473 ])# _AC_ARG_VAR_VALIDATE
1476 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1477 # ----------------------------------
1478 # Register VARNAME as a precious variable, and document it in
1479 # `configure --help' (but only once).
1480 AC_DEFUN([AC_ARG_VAR],
1481 [m4_divert_once([HELP_VAR], [[
1482 Some influential environment variables:]])dnl
1483 m4_divert_once([HELP_VAR_END], [[
1484 Use these variables to override the choices made by `configure' or to help
1485 it to find libraries and programs with nonstandard names/locations.]])dnl
1486 m4_expand_once([m4_divert_once([HELP_VAR],
1487 [AC_HELP_STRING([$1], [$2], [ ])])],
1489 _AC_ARG_VAR_PRECIOUS([$1])dnl
1496 ## ---------------------------- ##
1497 ## Transforming program names. ##
1498 ## ---------------------------- ##
1503 # This macro is expanded only once, to avoid that `foo' ends up being
1504 # installed as `ggfoo'.
1505 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1506 [dnl Document the options.
1507 m4_divert_push([HELP_BEGIN])dnl
1510 --program-prefix=PREFIX prepend PREFIX to installed program names
1511 --program-suffix=SUFFIX append SUFFIX to installed program names
1512 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1513 m4_divert_pop([HELP_BEGIN])dnl
1514 test "$program_prefix" != NONE &&
1515 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1516 # Use a double $ so make ignores it.
1517 test "$program_suffix" != NONE &&
1518 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1519 # Double any \ or $. echo might interpret backslashes.
1520 # By default was `s,x,x', remove it if useless.
1521 cat <<\_ACEOF >conftest.sed
1522 [s/[\\$]/&&/g;s/;s,x,x,$//]
1524 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1532 ## ------------------------- ##
1533 ## Finding auxiliary files. ##
1534 ## ------------------------- ##
1537 # AC_CONFIG_AUX_DIR(DIR)
1538 # ----------------------
1539 # Find install-sh, config.sub, config.guess, and Cygnus configure
1540 # in directory DIR. These are auxiliary files used in configuration.
1541 # DIR can be either absolute or relative to $srcdir.
1542 AC_DEFUN([AC_CONFIG_AUX_DIR],
1543 [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
1546 # AC_CONFIG_AUX_DIR_DEFAULT
1547 # -------------------------
1548 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1549 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1550 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1551 [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
1554 # AC_CONFIG_AUX_DIRS(DIR ...)
1555 # ---------------------------
1556 # Internal subroutine.
1557 # Search for the configuration auxiliary files in directory list $1.
1558 # We look only for install-sh, so users of AC_PROG_INSTALL
1559 # do not automatically need to distribute the other auxiliary files.
1560 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1562 for ac_dir in $1; do
1563 if test -f $ac_dir/install-sh; then
1565 ac_install_sh="$ac_aux_dir/install-sh -c"
1567 elif test -f $ac_dir/install.sh; then
1569 ac_install_sh="$ac_aux_dir/install.sh -c"
1571 elif test -f $ac_dir/shtool; then
1573 ac_install_sh="$ac_aux_dir/shtool install -c"
1577 if test -z "$ac_aux_dir"; then
1578 AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1580 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1581 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1582 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1583 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1584 ])# AC_CONFIG_AUX_DIRS
1589 ## ----------------------------------- ##
1590 ## Getting the canonical system type. ##
1591 ## ----------------------------------- ##
1594 # configure --host=HOST --target=TARGET --build=BUILD
1597 # 1. Build defaults to the current platform, as determined by config.guess.
1598 # 2. Host defaults to build.
1599 # 3. Target defaults to host.
1602 # _AC_CANONICAL_SPLIT(THING)
1603 # --------------------------
1604 # Generate the variables THING, THING_{alias cpu vendor os}.
1605 m4_define([_AC_CANONICAL_SPLIT],
1606 [AC_SUBST([$1], [$ac_cv_$1])dnl
1607 dnl FIXME: AC_SUBST([$1_alias], [$ac_cv_$1_alias])dnl
1609 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])dnl
1610 AC_SUBST([$1_vendor],
1611 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])dnl
1613 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])dnl
1614 ])# _AC_CANONICAL_SPLIT
1617 # AC_CANONICAL_BUILD
1618 # ------------------
1619 AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
1620 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1621 m4_divert_text([HELP_CANON],
1624 --build=BUILD configure for building on BUILD [guessed]]])dnl
1625 # Make sure we can run config.sub.
1626 $ac_config_sub sun4 >/dev/null 2>&1 ||
1627 AC_MSG_ERROR([cannot run $ac_config_sub])
1629 AC_CACHE_CHECK([build system type], [ac_cv_build],
1630 [ac_cv_build_alias=$build_alias
1631 test -z "$ac_cv_build_alias" &&
1632 ac_cv_build_alias=`$ac_config_guess`
1633 test -z "$ac_cv_build_alias" &&
1634 AC_MSG_ERROR([cannot guess build type; you must specify one])
1635 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1636 AC_MSG_ERROR([$ac_config_sub $ac_cv_build_alias failed])
1638 _AC_CANONICAL_SPLIT(build)
1639 ])# AC_CANONICAL_BUILD
1644 AC_DEFUN_ONCE([AC_CANONICAL_HOST],
1645 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1646 m4_divert_text([HELP_CANON],
1647 [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl
1648 AC_CACHE_CHECK([host system type], [ac_cv_host],
1649 [ac_cv_host_alias=$host_alias
1650 test -z "$ac_cv_host_alias" &&
1651 ac_cv_host_alias=$ac_cv_build_alias
1652 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1653 AC_MSG_ERROR([$ac_config_sub $ac_cv_host_alias failed])
1655 _AC_CANONICAL_SPLIT([host])
1656 ])# AC_CANONICAL_HOST
1659 # AC_CANONICAL_TARGET
1660 # -------------------
1661 AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
1662 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1663 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1664 m4_divert_text([HELP_CANON],
1665 [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
1666 AC_CACHE_CHECK([target system type], [ac_cv_target],
1667 [dnl Set target_alias.
1668 ac_cv_target_alias=$target_alias
1669 test "x$ac_cv_target_alias" = "x" &&
1670 ac_cv_target_alias=$ac_cv_host_alias
1671 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1672 AC_MSG_ERROR([$ac_config_sub $ac_cv_target_alias failed])
1674 _AC_CANONICAL_SPLIT([target])
1676 # The aliases save the names the user supplied, while $host etc.
1677 # will get canonicalized.
1678 test -n "$target_alias" &&
1679 test "$program_prefix$program_suffix$program_transform_name" = \
1681 program_prefix=${target_alias}-[]dnl
1682 ])# AC_CANONICAL_TARGET
1685 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1688 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1689 # ------------------------------------------
1690 # If the cache file is inconsistent with the current host,
1691 # target and build system types, execute CMD or print a default
1692 # error message. Now handled via _AC_ARG_VAR_PRECIOUS.
1693 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1696 ## ---------------------- ##
1697 ## Caching test results. ##
1698 ## ---------------------- ##
1703 # Look for site or system specific initialization scripts.
1704 m4_define([AC_SITE_LOAD],
1705 [# Prefer explicitly selected file to automatically selected ones.
1706 if test -z "$CONFIG_SITE"; then
1707 if test "x$prefix" != xNONE; then
1708 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1710 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1713 for ac_site_file in $CONFIG_SITE; do
1714 if test -r "$ac_site_file"; then
1715 AC_MSG_NOTICE([loading site script $ac_site_file])
1716 sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1725 m4_define([AC_CACHE_LOAD],
1726 [if test -r "$cache_file"; then
1727 # Some versions of bash will fail to source /dev/null (special
1728 # files actually), so we avoid doing that.
1729 if test -f "$cache_file"; then
1730 AC_MSG_NOTICE([loading cache $cache_file])
1732 [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
1733 *) . ./$cache_file;;
1737 AC_MSG_NOTICE([creating cache $cache_file])
1745 # Dump the cache to stdout. It can be in a pipe (this is a requirement).
1746 m4_define([_AC_CACHE_DUMP],
1747 [# The following way of writing the cache mishandles newlines in values,
1748 # but we know of no workaround that is simple, portable, and efficient.
1749 # So, don't put newlines in cache variables' values.
1750 # Ultrix sh set writes to stderr and can't be redirected directly,
1751 # and sets the high bit in the cache file unless we assign to the vars.
1754 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1756 # `set' does not quote correctly, so add quotes (double-quote
1757 # substitution turns \\\\ into \\, and sed turns \\ into \).
1760 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1763 # `set' quotes correctly as required by POSIX, so do not add quotes.
1765 ["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
1775 # Allow a site initialization script to override cache values.
1776 m4_define([AC_CACHE_SAVE],
1777 [cat >confcache <<\_ACEOF
1778 # This file is a shell script that caches the results of configure
1779 # tests run on this system so they can be shared between configure
1780 # scripts and configure runs, see configure's option --config-cache.
1781 # It is not useful on other systems. If it contains results you don't
1782 # want to keep, you may remove or edit it.
1784 # config.status only pays attention to the cache file if you give it
1785 # the --recheck option to rerun configure.
1787 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1788 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1797 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1799 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1801 if diff $cache_file confcache >/dev/null 2>&1; then :; else
1802 if test -w $cache_file; then
1803 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
1804 cat confcache >$cache_file
1806 echo "not updating unwritable cache $cache_file"
1809 rm -f confcache[]dnl
1813 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1814 # ------------------------------------------
1815 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1816 # Should be dnl'ed. Try to catch common mistakes.
1817 m4_defun([AC_CACHE_VAL],
1818 [m4_bmatch([$2], [AC_DEFINE],
1819 [AC_DIAGNOSE(syntax,
1820 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1821 [where no actions should be taken])])dnl
1823 [_AS_ECHO_N([(cached) ])],
1827 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1828 # -------------------------------------------
1829 # Do not call this macro with a dnl right behind.
1830 m4_defun([AC_CACHE_CHECK],
1831 [AC_MSG_CHECKING([$1])
1832 AC_CACHE_VAL([$2], [$3])dnl
1833 AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])
1837 ## ---------------------- ##
1838 ## Defining CPP symbols. ##
1839 ## ---------------------- ##
1842 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
1843 # -------------------------------------------
1844 # This macro is useless, it is used only with --trace to collect the
1845 # list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED.
1846 m4_define([AC_DEFINE_TRACE_LITERAL])
1849 # AC_DEFINE_TRACE(CPP-SYMBOL)
1850 # ---------------------------
1851 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
1852 # out non literal symbols.
1853 m4_define([AC_DEFINE_TRACE],
1854 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
1857 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
1858 # -------------------------------------------
1859 # Set VARIABLE to VALUE, verbatim, or 1. Remember the value
1860 # and if VARIABLE is affected the same VALUE, do nothing, else
1861 # die. The third argument is used by autoheader.
1862 m4_define([AC_DEFINE],
1863 [AC_DEFINE_TRACE([$1])dnl
1864 m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
1865 cat >>confdefs.h <<\_ACEOF
1866 [@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
1871 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
1872 # ----------------------------------------------------
1873 # Similar, but perform shell substitutions $ ` \ once on VALUE.
1874 m4_define([AC_DEFINE_UNQUOTED],
1875 [AC_DEFINE_TRACE([$1])dnl
1876 m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
1877 cat >>confdefs.h <<_ACEOF
1878 [@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
1884 ## -------------------------- ##
1885 ## Setting output variables. ##
1886 ## -------------------------- ##
1889 # AC_SUBST(VARIABLE, [VALUE])
1890 # ---------------------------
1891 # Create an output variable from a shell VARIABLE. If VALUE is given
1892 # assign it to VARIABLE. Use `""' is you want to set VARIABLE to an
1893 # empty value, not an empty second argument.
1895 # Beware that if you change this macro, you also have to change the
1896 # sed script at the top of _AC_OUTPUT_FILES.
1897 m4_define([AC_SUBST],
1898 [m4_ifvaln([$2], [$1=$2])[]dnl
1899 m4_append_uniq([_AC_SUBST_VARS], [$1], [ ])dnl
1903 # AC_SUBST_FILE(VARIABLE)
1904 # -----------------------
1905 # Read the comments of the preceding macro.
1906 m4_define([AC_SUBST_FILE],
1907 [m4_append_uniq([_AC_SUBST_FILES], [$1], [ ])])
1911 ## --------------------------------------- ##
1912 ## Printing messages at autoconf runtime. ##
1913 ## --------------------------------------- ##
1915 # In fact, I think we should promote the use of m4_warn and m4_fatal
1916 # directly. This will also avoid to some people to get it wrong
1917 # between AC_FATAL and AC_MSG_ERROR.
1920 # AC_DIAGNOSE(CATEGORY, MESSAGE)
1921 # AC_FATAL(MESSAGE, [EXIT-STATUS])
1922 # --------------------------------
1923 m4_copy([m4_warn], [AC_DIAGNOSE])
1924 m4_copy([m4_fatal], [AC_FATAL])
1927 # AC_WARNING(MESSAGE)
1928 # -------------------
1929 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
1931 m4_define([AC_WARNING],
1932 [AC_DIAGNOSE([syntax], [$1])])
1937 ## ---------------------------------------- ##
1938 ## Printing messages at configure runtime. ##
1939 ## ---------------------------------------- ##
1942 # AC_MSG_CHECKING(FEATURE)
1943 # ------------------------
1944 m4_define([AC_MSG_CHECKING],
1945 [_AS_ECHO([$as_me:$LINENO: checking $1], AS_MESSAGE_LOG_FD)
1946 _AS_ECHO_N([checking $1... ])[]dnl
1950 # AC_MSG_RESULT(RESULT)
1951 # ---------------------
1952 m4_define([AC_MSG_RESULT],
1953 [_AS_ECHO([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
1954 _AS_ECHO([${ECHO_T}$1])[]dnl
1958 # AC_MSG_RESULT_UNQUOTED(RESULT)
1959 # ------------------------------
1960 # Likewise, but perform $ ` \ shell substitutions.
1961 m4_define([AC_MSG_RESULT_UNQUOTED],
1962 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
1963 _AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
1967 # AC_MSG_WARN(PROBLEM)
1968 # AC_MSG_NOTICE(STRING)
1969 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
1970 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
1971 # ----------------------------------------
1972 m4_copy([AS_WARN], [AC_MSG_WARN])
1973 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
1974 m4_copy([AS_ERROR], [AC_MSG_ERROR])
1975 m4_define([AC_MSG_FAILURE],
1977 See `config.log' for more details.], [$2])])
1980 # _AC_MSG_LOG_CONFTEST
1981 # --------------------
1982 m4_define([_AC_MSG_LOG_CONFTEST],
1983 [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
1984 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
1988 # AU::AC_CHECKING(FEATURE)
1989 # ------------------------
1990 AU_DEFUN([AC_CHECKING],
1991 [AS_MESSAGE([checking $1...])])
1994 # AU::AC_VERBOSE(STRING)
1995 # ----------------------
1996 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2003 ## ---------------------------- ##
2004 ## Compiler-running mechanics. ##
2005 ## ---------------------------- ##
2008 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2009 # ----------------------------------
2010 # Eval COMMAND, save the exit status in ac_status, and log it.
2011 AC_DEFUN([_AC_RUN_LOG],
2012 [{ ($2) >&AS_MESSAGE_LOG_FD
2013 ($1) 2>&AS_MESSAGE_LOG_FD
2015 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2016 (exit $ac_status); }])
2019 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2020 # -----------------------------------------
2021 # Eval COMMAND, save its stderr into conftest.err, save the exit status
2022 # in ac_status, and log it.
2023 # Note that when tracing, most shells will leave the traces in stderr
2024 AC_DEFUN([_AC_RUN_LOG_STDERR],
2025 [{ ($2) >&AS_MESSAGE_LOG_FD
2028 grep -v '^ *+' conftest.er1 >conftest.err
2030 cat conftest.err >&AS_MESSAGE_LOG_FD
2031 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2032 (exit $ac_status); }])
2037 # Eval COMMAND, save the exit status in ac_status, and log it.
2038 AC_DEFUN([_AC_EVAL],
2039 [_AC_RUN_LOG([eval $1],
2040 [eval echo "$as_me:$LINENO: \"$1\""])])
2043 # _AC_EVAL_STDERR(COMMAND)
2044 # ------------------------
2045 # Eval COMMAND, save its stderr into conftest.err, save the exit status
2046 # in ac_status, and log it.
2047 # Note that when tracing, most shells will leave the traces in stderr
2048 AC_DEFUN([_AC_EVAL_STDERR],
2049 [_AC_RUN_LOG_STDERR([eval $1],
2050 [eval echo "$as_me:$LINENO: \"$1\""])])
2053 # AC_TRY_EVAL(VARIABLE)
2054 # ---------------------
2055 # The purpose of this macro is to "configure:123: command line"
2056 # written into config.log for every test run.
2057 AC_DEFUN([AC_TRY_EVAL],
2061 # AC_TRY_COMMAND(COMMAND)
2062 # -----------------------
2063 AC_DEFUN([AC_TRY_COMMAND],
2065 _AC_EVAL([$ac_try]); }])
2068 # AC_RUN_LOG(COMMAND)
2069 # -------------------
2070 AC_DEFUN([AC_RUN_LOG],
2072 [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])])
2077 ## ------------------------ ##
2078 ## Examining declarations. ##
2079 ## ------------------------ ##
2083 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2084 # ----------------------------------------------------------------
2085 # Try to preprocess PROGRAM.
2087 # This macro can be used during the selection of a preprocessor.
2088 # Run cpp and set ac_cpp_err to "yes" for an error, to
2089 # "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
2090 # neither warnings nor errors have been detected. eval is necessary
2092 AC_DEFUN([_AC_PREPROC_IFELSE],
2093 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2094 if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then
2095 if test -s conftest.err; then
2096 ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
2103 if test -z "$ac_cpp_err"; then
2106 _AC_MSG_LOG_CONFTEST
2109 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2110 ])# _AC_PREPROC_IFELSE
2113 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2114 # ---------------------------------------------------------------
2115 # Try to preprocess PROGRAM. Requires that the preprocessor for the
2116 # current language was checked for, hence do not use this macro in macros
2117 # looking for a preprocessor.
2118 AC_DEFUN([AC_PREPROC_IFELSE],
2119 [AC_LANG_PREPROC_REQUIRE()dnl
2120 _AC_PREPROC_IFELSE($@)])
2123 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2124 # ---------------------------------------------------------
2125 # AC_TRY_CPP is used to check whether particular header files exist.
2126 # (But it actually tests whether INCLUDES produces no CPP errors.)
2128 # INCLUDES are not defaulted and are double quoted.
2129 AU_DEFUN([AC_TRY_CPP],
2130 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2133 # AC_EGREP_CPP(PATTERN, PROGRAM,
2134 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2135 # ------------------------------------------------------
2136 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2137 # come early, it is not included in AC_BEFORE checks.
2138 AC_DEFUN([AC_EGREP_CPP],
2139 [AC_LANG_PREPROC_REQUIRE()dnl
2140 AC_REQUIRE([AC_PROG_EGREP])dnl
2141 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2142 dnl eval is necessary to expand ac_cpp.
2143 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2144 if (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2145 dnl Quote $1 to prevent m4 from eating character classes
2146 $EGREP "[$1]" >/dev/null 2>&1; then
2148 m4_ifvaln([$4], [else
2155 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2156 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2157 # ---------------------------------------------------------
2158 AC_DEFUN([AC_EGREP_HEADER],
2166 ## ------------------ ##
2167 ## Examining syntax. ##
2168 ## ------------------ ##
2171 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2172 # ---------------------------------------------------------------------
2173 # Try to compile PROGRAM.
2174 # This macro can be used during the selection of a compiler.
2175 m4_define([_AC_COMPILE_IFELSE],
2176 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2177 rm -f conftest.$ac_objext
2178 AS_IF([AC_TRY_EVAL(ac_compile) &&
2179 AC_TRY_COMMAND([test -s conftest.$ac_objext])],
2181 [_AC_MSG_LOG_CONFTEST
2182 m4_ifvaln([$3],[$3])dnl])dnl
2183 rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2184 ])# _AC_COMPILE_IFELSE
2187 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2188 # --------------------------------------------------------------------
2189 # Try to compile PROGRAM. Requires that the compiler for the current
2190 # language was checked for, hence do not use this macro in macros looking
2192 AC_DEFUN([AC_COMPILE_IFELSE],
2193 [AC_LANG_COMPILER_REQUIRE()dnl
2194 _AC_COMPILE_IFELSE($@)])
2197 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2198 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2199 # --------------------------------------------------------
2200 AU_DEFUN([AC_TRY_COMPILE],
2201 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2205 ## --------------------- ##
2206 ## Examining libraries. ##
2207 ## --------------------- ##
2210 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2211 # ------------------------------------------------------------------
2212 # Try to link PROGRAM.
2213 # This macro can be used during the selection of a compiler.
2214 m4_define([_AC_LINK_IFELSE],
2215 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2216 rm -f conftest.$ac_objext conftest$ac_exeext
2217 AS_IF([AC_TRY_EVAL(ac_link) &&
2218 AC_TRY_COMMAND([test -s conftest$ac_exeext])],
2220 [_AC_MSG_LOG_CONFTEST
2221 m4_ifvaln([$3], [$3])dnl])[]dnl
2222 rm -f conftest.$ac_objext conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2226 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2227 # -----------------------------------------------------------------
2228 # Try to link PROGRAM. Requires that the compiler for the current
2229 # language was checked for, hence do not use this macro in macros looking
2231 AC_DEFUN([AC_LINK_IFELSE],
2232 [AC_LANG_COMPILER_REQUIRE()dnl
2233 _AC_LINK_IFELSE($@)])
2236 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2237 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2238 # -----------------------------------------------------
2239 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2240 AU_DEFUN([AC_TRY_LINK],
2241 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2244 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2245 # ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
2246 # --------------------------------------------------------
2247 AU_DEFUN([AC_COMPILE_CHECK],
2248 [m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl
2249 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
2255 ## -------------------------------- ##
2256 ## Checking for run-time features. ##
2257 ## -------------------------------- ##
2260 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2261 # ------------------------------------------------------------
2262 # Compile, link, and run.
2263 # This macro can be used during the selection of a compiler.
2264 # We also remove conftest.o as if the compilation fails, some compilers
2265 # don't remove it. We remove gmon.out and bb.out, which may be
2266 # created during the run if the program is built with profiling support.
2267 m4_define([_AC_RUN_IFELSE],
2268 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2269 rm -f conftest$ac_exeext
2270 AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
2272 [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
2273 _AC_MSG_LOG_CONFTEST
2275 [( exit $ac_status )
2277 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2278 [conftest.$ac_ext])[]dnl
2282 # AC_RUN_IFELSE(PROGRAM,
2283 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2284 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2285 # ----------------------------------------------------------
2286 # Compile, link, and run. Requires that the compiler for the current
2287 # language was checked for, hence do not use this macro in macros looking
2289 AC_DEFUN([AC_RUN_IFELSE],
2290 [AC_LANG_COMPILER_REQUIRE()dnl
2292 [AC_DIAGNOSE([cross],
2293 [$0 called without default to allow cross compiling])])dnl
2294 if test "$cross_compiling" = yes; then
2296 [AC_MSG_FAILURE([cannot run test program while cross compiling])])
2302 # AC_TRY_RUN(PROGRAM,
2303 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2304 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2305 # --------------------------------------------------------
2306 AU_DEFUN([AC_TRY_RUN],
2307 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2311 ## ------------------------------------- ##
2312 ## Checking for the existence of files. ##
2313 ## ------------------------------------- ##
2315 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2316 # -------------------------------------------------------------
2318 # Check for the existence of FILE.
2319 AC_DEFUN([AC_CHECK_FILE],
2320 [AC_DIAGNOSE([cross],
2321 [cannot check for file existence when cross compiling])dnl
2322 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2323 AC_CACHE_CHECK([for $1], ac_File,
2324 [test "$cross_compiling" = yes &&
2325 AC_MSG_ERROR([cannot check for file existence when cross compiling])
2326 if test -r "$1"; then
2327 AS_VAR_SET(ac_File, yes)
2329 AS_VAR_SET(ac_File, no)
2331 AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
2332 AS_VAR_POPDEF([ac_File])dnl
2336 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2337 # -----------------------------------------------------------------
2338 AC_DEFUN([AC_CHECK_FILES],
2339 [AC_FOREACH([AC_FILE_NAME], [$1],
2340 [AC_CHECK_FILE(AC_FILE_NAME,
2341 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2342 [Define to 1 if you have the
2348 ## ------------------------------- ##
2349 ## Checking for declared symbols. ##
2350 ## ------------------------------- ##
2353 # AC_CHECK_DECL(SYMBOL,
2354 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2355 # [INCLUDES = DEFAULT-INCLUDES])
2356 # -------------------------------------------------------
2357 # Check if SYMBOL (a variable or a function) is declared.
2358 AC_DEFUN([AC_CHECK_DECL],
2359 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2360 AC_CACHE_CHECK([whether $1 is declared], ac_Symbol,
2361 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2363 char *p = (char *) $1;
2366 [AS_VAR_SET(ac_Symbol, yes)],
2367 [AS_VAR_SET(ac_Symbol, no)])])
2368 AS_IF([test AS_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl
2369 AS_VAR_POPDEF([ac_Symbol])dnl
2373 # AC_CHECK_DECLS(SYMBOLS,
2374 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2375 # [INCLUDES = DEFAULT-INCLUDES])
2376 # --------------------------------------------------------
2377 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
2378 # documentation for a detailed explanation of this difference with
2379 # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
2380 AC_DEFUN([AC_CHECK_DECLS],
2381 [m4_foreach([AC_Symbol], [$1],
2382 [AC_CHECK_DECL(AC_Symbol,
2383 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2384 [Define to 1 if you have the declaration
2385 of `]AC_Symbol[', and to 0 if you don't.])
2387 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2394 ## ---------------------------------- ##
2395 ## Replacement of library functions. ##
2396 ## ---------------------------------- ##
2399 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2400 # -----------------------------
2401 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2402 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2403 [m4_bmatch([$1], [^]m4_defn([m4_cr_symbols2]),
2404 [AC_WARNING([invalid replacement directory: $1])])dnl
2405 m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])[]dnl
2409 # AC_LIBSOURCE(FILENAME)
2410 # ----------------------
2411 # Announce we might need the file `FILENAME'.
2412 m4_define([AC_LIBSOURCE], [])
2415 # AC_LIBSOURCES([FILENAME1, ...])
2416 # -------------------------------
2417 # Announce we might need these files.
2418 m4_define([AC_LIBSOURCES],
2419 [m4_foreach([_AC_FILENAME], [$1],
2420 [AC_LIBSOURCE(_AC_FILENAME)])])
2423 # _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
2424 # -------------------------------------------
2425 # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
2426 # We don't use AC_SUBST/2 because it forces an unnecessary eol.
2427 m4_define([_AC_LIBOBJ],
2428 [AS_LITERAL_IF([$1],
2429 [AC_LIBSOURCE([$1.c])],
2431 AC_SUBST([LIB@&t@OBJS])dnl
2432 LIB@&t@OBJS="$LIB@&t@OBJS $1.$ac_objext"])
2436 # AC_LIBOBJ(FILENAME-NOEXT)
2437 # -------------------------
2438 # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
2439 # We don't use AC_SUBST/2 because it forces an unnecessary eol.
2440 m4_define([AC_LIBOBJ],
2442 [AC_DIAGNOSE(syntax,
2443 [$0($1): you should use literals])])dnl
2447 # _AC_LIBOBJS_NORMALIZE
2448 # ---------------------
2449 # Clean up LIBOBJS abd LTLIBOBJS so that they work with 1. ac_objext,
2450 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2451 # Used with AC_CONFIG_COMMANDS_PRE.
2452 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2455 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2456 # 1. Remove the extension, and $U if already installed.
2457 ac_i=`echo "$ac_i" |
2458 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
2460 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
2461 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
2463 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2464 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2468 ## ----------------------------------- ##
2469 ## Checking compiler characteristics. ##
2470 ## ----------------------------------- ##
2473 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
2474 # ---------------------------------------------------------------------
2475 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2476 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2477 m4_define([_AC_COMPUTE_INT_COMPILE],
2478 [# Depending upon the size, compute the lo and hi bounds.
2479 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2482 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2483 [ac_hi=$ac_mid; break],
2484 [ac_lo=`expr $ac_mid + 1`
2485 if test $ac_lo -le $ac_mid; then
2489 ac_mid=`expr 2 '*' $ac_mid + 1`])
2491 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2494 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2495 [ac_lo=$ac_mid; break],
2496 [ac_hi=`expr '(' $ac_mid ')' - 1`
2497 if test $ac_mid -le $ac_hi; then
2501 ac_mid=`expr 2 '*' $ac_mid`])
2504 # Binary search between lo and hi bounds.
2505 while test "x$ac_lo" != "x$ac_hi"; do
2506 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2507 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2508 [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2514 ])# _AC_COMPUTE_INT_COMPILE
2517 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
2518 # -----------------------------------------------------------------
2519 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2520 m4_define([_AC_COMPUTE_INT_RUN],
2521 [AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2522 [$2=`cat conftest.val`], [$4])])
2525 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
2526 # ---------------------------------------------------------
2527 m4_define([_AC_COMPUTE_INT],
2528 [if test "$cross_compiling" = yes; then
2529 _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3], [$4])
2531 _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
2533 rm -f conftest.val[]dnl