maint: make update-copyright
[autoconf.git] / lib / autoconf / general.m4
blobc15fb1328188c211c0d7b3103674983f0ef19e98
1 # This file is part of Autoconf.                       -*- Autoconf -*-
2 # Parameterized macros.
3 m4_define([_AC_COPYRIGHT_YEARS], [
4 Copyright (C) 1992-1996, 1998-2016 Free Software Foundation, Inc.
5 ])
7 # This file is part of Autoconf.  This program is free
8 # software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the
10 # Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # Under Section 7 of GPL version 3, you are granted additional
19 # permissions described in the Autoconf Configure Script Exception,
20 # version 3.0, as published by the Free Software Foundation.
22 # You should have received a copy of the GNU General Public License
23 # and a copy of the Autoconf Configure Script Exception along with
24 # this program; see the files COPYINGv3 and COPYING.EXCEPTION
25 # respectively.  If not, see <http://www.gnu.org/licenses/>.
27 # Written by David MacKenzie, with help from
28 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
29 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
32 ## ---------------- ##
33 ## The diversions.  ##
34 ## ---------------- ##
37 # We heavily use m4's diversions both for the initializations and for
38 # required macros (see AC_REQUIRE), because in both cases we have to
39 # issue high in `configure' something which is discovered late.
41 # KILL is only used to suppress output.
43 # The layers of `configure'.  We let m4 undivert them by itself, when
44 # it reaches the end of `configure.ac'.
46 # - BINSH
47 #   #! /bin/sh
48 # - HEADER-REVISION
49 #   Sent by AC_REVISION
50 # - HEADER-COMMENT
51 #   Purpose of the script.
52 # - HEADER-COPYRIGHT
53 #   Copyright notice(s)
54 # - M4SH-INIT
55 #   Initialization of bottom layers.
57 # - DEFAULTS
58 #   early initializations (defaults)
59 # - PARSE_ARGS
60 #   initialization code, option handling loop.
62 # - HELP_BEGIN
63 #   Handling `configure --help'.
64 # - HELP_CANON
65 #   Help msg for AC_CANONICAL_*
66 # - HELP_ENABLE
67 #   Help msg from AC_ARG_ENABLE.
68 # - HELP_WITH
69 #   Help msg from AC_ARG_WITH.
70 # - HELP_VAR
71 #   Help msg from AC_ARG_VAR.
72 # - HELP_VAR_END
73 #   A small paragraph on the use of the variables.
74 # - HELP_END
75 #   Tail of the handling of --help.
77 # - VERSION_BEGIN
78 #   Head of the handling of --version.
79 # - VERSION_FSF
80 #   FSF copyright notice for --version.
81 # - VERSION_USER
82 #   User copyright notice for --version.
83 # - VERSION_END
84 #   Tail of the handling of --version.
86 # - SHELL_FN
87 #   Shell functions.
89 # - INIT_PREPARE
90 #   Tail of initialization code.
92 # - BODY
93 #   the tests and output code
97 # _m4_divert(DIVERSION-NAME)
98 # --------------------------
99 # Convert a diversion name into its number.  Otherwise, return
100 # DIVERSION-NAME which is supposed to be an actual diversion number.
101 # Of course it would be nicer to use m4_case here, instead of zillions
102 # of little macros, but it then takes twice longer to run `autoconf'!
104 # From M4sugar:
105 #    -1. KILL
106 # 10000. GROW
108 # From M4sh:
109 #    0. BINSH
110 #    1. HEADER-REVISION
111 #    2. HEADER-COMMENT
112 #    3. HEADER-COPYRIGHT
113 #    4. M4SH-INIT
114 # 1000. BODY
115 m4_define([_m4_divert(DEFAULTS)],        10)
116 m4_define([_m4_divert(PARSE_ARGS)],      20)
118 m4_define([_m4_divert(HELP_BEGIN)],     100)
119 m4_define([_m4_divert(HELP_CANON)],     101)
120 m4_define([_m4_divert(HELP_ENABLE)],    102)
121 m4_define([_m4_divert(HELP_WITH)],      103)
122 m4_define([_m4_divert(HELP_VAR)],       104)
123 m4_define([_m4_divert(HELP_VAR_END)],   105)
124 m4_define([_m4_divert(HELP_END)],       106)
126 m4_define([_m4_divert(VERSION_BEGIN)],  200)
127 m4_define([_m4_divert(VERSION_FSF)],    201)
128 m4_define([_m4_divert(VERSION_USER)],   202)
129 m4_define([_m4_divert(VERSION_END)],    203)
131 m4_define([_m4_divert(SHELL_FN)],       250)
133 m4_define([_m4_divert(INIT_PREPARE)],   300)
137 # AC_DIVERT_PUSH(DIVERSION-NAME)
138 # AC_DIVERT_POP
139 # ------------------------------
140 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
141 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
145 ## ------------------------------------ ##
146 ## Defining/requiring Autoconf macros.  ##
147 ## ------------------------------------ ##
150 # AC_DEFUN(NAME, EXPANSION)
151 # AC_DEFUN_ONCE(NAME, EXPANSION)
152 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
153 # AC_REQUIRE(STRING)
154 # AC_PROVIDE(MACRO-NAME)
155 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
156 # -----------------------------------------------------------
157 m4_copy([m4_defun],       [AC_DEFUN])
158 m4_copy([m4_defun_once],  [AC_DEFUN_ONCE])
159 m4_copy([m4_before],      [AC_BEFORE])
160 m4_copy([m4_require],     [AC_REQUIRE])
161 m4_copy([m4_provide],     [AC_PROVIDE])
162 m4_copy([m4_provide_if],  [AC_PROVIDE_IFELSE])
165 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
166 # ------------------------------------------
167 m4_define([AC_OBSOLETE],
168 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
172 ## ----------------------------- ##
173 ## Implementing shell functions. ##
174 ## ----------------------------- ##
177 # AC_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY, [DIVERSION = SHELL_FN]
178 # ------------------------------------------------------------------------
179 # Same as AS_REQUIRE_SHELL_FN except that the default diversion comes
180 # later in the script (speeding up configure --help and --version).
181 AC_DEFUN([AC_REQUIRE_SHELL_FN],
182 [AS_REQUIRE_SHELL_FN([$1], [$2], [$3], m4_default_quoted([$4], [SHELL_FN]))])
186 ## ----------------------------- ##
187 ## Implementing Autoconf loops.  ##
188 ## ----------------------------- ##
191 # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION)
192 # ------------------------------------------
193 AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]])
194 AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl
195 AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete.
196 You should run autoupdate.])])
200 ## ----------------------------------- ##
201 ## Helping macros to display strings.  ##
202 ## ----------------------------------- ##
205 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
206 # --------------------------------------
207 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
211 ## ---------------------------------------------- ##
212 ## Information on the package being Autoconf'ed.  ##
213 ## ---------------------------------------------- ##
216 # It is suggested that the macros in this section appear before
217 # AC_INIT in `configure.ac'.  Nevertheless, this is just stylistic,
218 # and from the implementation point of view, AC_INIT *must* be expanded
219 # beforehand: it puts data in diversions which must appear before the
220 # data provided by the macros of this section.
222 # The solution is to require AC_INIT in each of these macros.  AC_INIT
223 # has the needed magic so that it can't be expanded twice.
225 # _AC_INIT_LITERAL(STRING)
226 # ------------------------
227 # Reject STRING if it contains newline, or if it cannot be used as-is
228 # in single-quoted strings, double-quoted strings, and quoted and
229 # unquoted here-docs.
230 m4_define([_AC_INIT_LITERAL],
231 [m4_if(m4_index(m4_translit([[$1]], [
232 ""], ['']), ['])AS_LITERAL_HEREDOC_IF([$1], [-]), [-1-], [],
233   [m4_warn([syntax], [AC_INIT: not a literal: $1])])])
235 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
236 # ---------------------------------------------------------------------
237 m4_define([_AC_INIT_PACKAGE],
238 [_AC_INIT_LITERAL([$1])
239 _AC_INIT_LITERAL([$2])
240 _AC_INIT_LITERAL([$3])
241 m4_ifndef([AC_PACKAGE_NAME],
242           [m4_define([AC_PACKAGE_NAME],     [$1])])
243 m4_ifndef([AC_PACKAGE_TARNAME],
244           [m4_define([AC_PACKAGE_TARNAME],
245                      m4_default([$4],
246                                 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[$1]],
247                                                                      [GNU ])),
248                                  [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
249                                  [-])]))])
250 m4_ifndef([AC_PACKAGE_VERSION],
251           [m4_define([AC_PACKAGE_VERSION],   [$2])])
252 m4_ifndef([AC_PACKAGE_STRING],
253           [m4_define([AC_PACKAGE_STRING],    [$1 $2])])
254 m4_ifndef([AC_PACKAGE_BUGREPORT],
255           [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
256 m4_ifndef([AC_PACKAGE_URL],
257           [m4_define([AC_PACKAGE_URL],
258   m4_if([$5], [], [m4_if(m4_index([$1], [GNU ]), [0],
259           [[http://www.gnu.org/software/]m4_defn([AC_PACKAGE_TARNAME])[/]])],
260         [[$5]]))])
264 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER],
265 #              [FILTER = m4_newline])
266 # ------------------------------------------------------
267 # Emit TEXT, a copyright notice, in the top of `configure' and in
268 # --version output.  Macros in TEXT are evaluated once.  Process
269 # the --version output through FILTER (m4_newline, m4_do, and
270 # m4_copyright_condense are common filters).
271 m4_define([AC_COPYRIGHT],
272 [AS_COPYRIGHT([$1])[]]dnl
273 [m4_divert_text(m4_default_quoted([$2], [VERSION_USER]),
274 [m4_default([$3], [m4_newline])([$1])])])# AC_COPYRIGHT
277 # AC_REVISION(REVISION-INFO)
278 # --------------------------
279 # The second quote in the translit is just to cope with font-lock-mode
280 # which sees the opening of a string.
281 m4_define([AC_REVISION],
282 [m4_divert_text([HEADER-REVISION],
283                 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
289 ## ---------------------------------------- ##
290 ## Requirements over the Autoconf version.  ##
291 ## ---------------------------------------- ##
294 # AU::AC_PREREQ(VERSION)
295 # ----------------------
296 # Update this `AC_PREREQ' statement to require the current version of
297 # Autoconf.  But fail if ever this autoupdate is too old.
299 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
300 # calling `AU_DEFUN', i.e., it is hard coded.  Otherwise it would be
301 # quite complex for autoupdate to import the value of
302 # `m4_PACKAGE_VERSION'.  We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
303 # this would replace all its occurrences with the current version of
304 # Autoconf, which is certainly not what the user intended.
305 AU_DEFUN([AC_PREREQ],
306 [m4_version_prereq([$1])[]dnl
307 [AC_PREREQ(]]m4_dquote(m4_dquote(m4_defn([m4_PACKAGE_VERSION])))[[)]])
310 # AC_PREREQ(VERSION)
311 # ------------------
312 # Complain and exit if the Autoconf version is less than VERSION.
313 m4_undefine([AC_PREREQ])
314 m4_copy([m4_version_prereq], [AC_PREREQ])
317 # AC_AUTOCONF_VERSION
318 # -------------------
319 # The current version of Autoconf parsing this file.
320 m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])
326 ## ---------------- ##
327 ## Initialization.  ##
328 ## ---------------- ##
331 # All the following macros are used by AC_INIT.  Ideally, they should
332 # be presented in the order in which they are output.  Please, help us
333 # sorting it, or at least, don't augment the entropy.
336 # _AC_INIT_NOTICE
337 # ---------------
338 # Provide useful headers; override the HEADER-COMMENT created by M4sh.
339 m4_define([_AC_INIT_NOTICE],
340 [m4_cleardivert([HEADER-COMMENT])]dnl
341 [m4_divert_text([HEADER-COMMENT],
342 [@%:@ Guess values for system-dependent variables and create Makefiles.
343 @%:@ Generated by m4_PACKAGE_STRING[]dnl
344 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
346 m4_ifset([AC_PACKAGE_BUGREPORT],
347          [m4_divert_text([HEADER-COMMENT],
348                          [@%:@
349 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
353 # _AC_INIT_COPYRIGHT
354 # ------------------
355 # We dump to VERSION_FSF to make sure we are inserted before the
356 # user copyrights, and after the setup of the --version handling.
357 m4_define([_AC_INIT_COPYRIGHT],
358 [AC_COPYRIGHT(m4_defn([_AC_COPYRIGHT_YEARS]), [VERSION_FSF], [
359 m4_copyright_condense])dnl
360 AC_COPYRIGHT(
361 [This configure script is free software; the Free Software Foundation
362 gives unlimited permission to copy, distribute and modify it.],
363              [VERSION_FSF], [m4_echo])])
366 # File Descriptors
367 # ----------------
368 # Set up the file descriptors used by `configure'.
369 # File descriptor usage:
370 # 0 standard input (/dev/null)
371 # 1 file creation
372 # 2 errors and warnings
373 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
374 # AS_MESSAGE_FD checking for... messages and results
375 # AS_ORIGINAL_STDIN_FD original standard input (still open)
377 # stdin is /dev/null because checks that run programs may
378 # inadvertently run interactive ones, which would stop configuration
379 # until someone typed an EOF.
380 m4_define([AS_MESSAGE_FD], 6)
381 m4_define([AS_ORIGINAL_STDIN_FD], 7)
382 # That's how they used to be named.
383 AU_ALIAS([AC_FD_CC],  [AS_MESSAGE_LOG_FD])
384 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
387 # _AC_INIT_DEFAULTS
388 # -----------------
389 # Values which defaults can be set from `configure.ac'.
390 # `/bin/machine' is used in `glibcbug'.  The others are used in config.*
391 m4_define([_AC_INIT_DEFAULTS],
392 [m4_divert_push([DEFAULTS])dnl
394 test -n "$DJDIR" || exec AS_ORIGINAL_STDIN_FD<&0 </dev/null
395 exec AS_MESSAGE_FD>&1
397 # Name of the host.
398 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
399 # so uname gets run too.
400 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
403 # Initializations.
405 ac_default_prefix=/usr/local
406 ac_clean_files=
407 ac_config_libobj_dir=.
408 LIB@&t@OBJS=
409 cross_compiling=no
410 subdirs=
411 MFLAGS=
412 MAKEFLAGS=
413 AC_SUBST([SHELL])dnl
414 AC_SUBST([PATH_SEPARATOR])dnl
416 # Identity of this package.
417 AC_SUBST([PACKAGE_NAME],
418          [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])dnl
419 AC_SUBST([PACKAGE_TARNAME],
420          [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])dnl
421 AC_SUBST([PACKAGE_VERSION],
422          [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])dnl
423 AC_SUBST([PACKAGE_STRING],
424          [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
425 AC_SUBST([PACKAGE_BUGREPORT],
426          [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
427 AC_SUBST([PACKAGE_URL],
428          [m4_ifdef([AC_PACKAGE_URL],       ['AC_PACKAGE_URL'])])dnl
430 m4_divert_pop([DEFAULTS])dnl
431 m4_wrap_lifo([m4_divert_text([DEFAULTS],
432 [ac_subst_vars='m4_set_dump([_AC_SUBST_VARS], m4_newline)'
433 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
434 ac_user_opts='
435 enable_option_checking
436 m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
438 m4_ifdef([_AC_PRECIOUS_VARS],
439   [_AC_ARG_VAR_STORE[]dnl
440    _AC_ARG_VAR_VALIDATE[]dnl
441    ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
442 m4_ifdef([_AC_LIST_SUBDIRS],
443   [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
444 ])])dnl
445 ])# _AC_INIT_DEFAULTS
448 # AC_PREFIX_DEFAULT(PREFIX)
449 # -------------------------
450 AC_DEFUN([AC_PREFIX_DEFAULT],
451 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
454 # AC_PREFIX_PROGRAM(PROGRAM)
455 # --------------------------
456 # Guess the value for the `prefix' variable by looking for
457 # the argument program along PATH and taking its parent.
458 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
459 # set `prefix' to /usr/local/gnu.
460 # This comes too late to find a site file based on the prefix,
461 # and it might use a cached value for the path.
462 # No big loss, I think, since most configures don't use this macro anyway.
463 AC_DEFUN([AC_PREFIX_PROGRAM],
464 [if test "x$prefix" = xNONE; then
465 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
466   _AS_ECHO_N([checking for prefix by ])
467   AC_PATH_PROG(ac_prefix_program, [$1])
468   if test -n "$ac_prefix_program"; then
469     prefix=`AS_DIRNAME(["$ac_prefix_program"])`
470     prefix=`AS_DIRNAME(["$prefix"])`
471   fi
473 ])# AC_PREFIX_PROGRAM
476 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
477 # ---------------------------------------------
478 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
479 # relative to the directory that configure is in, which we can look
480 # for to find out if srcdir is correct.
481 AC_DEFUN([AC_CONFIG_SRCDIR],
482 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
485 # _AC_INIT_DIRCHECK
486 # -----------------
487 # Set ac_pwd, and sanity-check it and the source and installation directories.
489 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
491 AC_DEFUN([_AC_INIT_DIRCHECK],
492 [m4_divert_push([PARSE_ARGS])dnl
494 ac_pwd=`pwd` && test -n "$ac_pwd" &&
495 ac_ls_di=`ls -di .` &&
496 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
497   AC_MSG_ERROR([working directory cannot be determined])
498 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
499   AC_MSG_ERROR([pwd does not report name of working directory])
501 m4_divert_pop([PARSE_ARGS])dnl
502 ])# _AC_INIT_DIRCHECK
504 # _AC_INIT_SRCDIR
505 # ---------------
506 # Compute `srcdir' based on `$ac_unique_file'.
508 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
510 AC_DEFUN([_AC_INIT_SRCDIR],
511 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
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 the parent directory.
518   ac_confdir=`AS_DIRNAME(["$as_myself"])`
519   srcdir=$ac_confdir
520   if test ! -r "$srcdir/$ac_unique_file"; then
521     srcdir=..
522   fi
523 else
524   ac_srcdir_defaulted=no
526 if test ! -r "$srcdir/$ac_unique_file"; then
527   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
528   AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
530 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
531 ac_abs_confdir=`(
532         cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
533         pwd)`
534 # When building in place, set srcdir=.
535 if test "$ac_abs_confdir" = "$ac_pwd"; then
536   srcdir=.
538 # Remove unnecessary trailing slashes from srcdir.
539 # Double slashes in file names in object file debugging info
540 # mess up M-x gdb in Emacs.
541 case $srcdir in
542 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
543 esac
544 m4_divert_pop([PARSE_ARGS])dnl
545 ])# _AC_INIT_SRCDIR
548 # _AC_INIT_PARSE_ARGS
549 # -------------------
550 m4_define([_AC_INIT_PARSE_ARGS],
551 [m4_divert_push([PARSE_ARGS])dnl
553 # Initialize some variables set by options.
554 ac_init_help=
555 ac_init_version=false
556 ac_unrecognized_opts=
557 ac_unrecognized_sep=
558 # The variables have the same names as the options, with
559 # dashes changed to underlines.
560 cache_file=/dev/null
561 AC_SUBST(exec_prefix, NONE)dnl
562 no_create=
563 no_recursion=
564 AC_SUBST(prefix, NONE)dnl
565 program_prefix=NONE
566 program_suffix=NONE
567 AC_SUBST(program_transform_name, [s,x,x,])dnl
568 silent=
569 site=
570 srcdir=
571 verbose=
572 x_includes=NONE
573 x_libraries=NONE
575 # Installation directory options.
576 # These are left unexpanded so users can "make install exec_prefix=/foo"
577 # and all the variables that are supposed to be based on exec_prefix
578 # by default will actually change.
579 # Use braces instead of parens because sh, perl, etc. also accept them.
580 # (The list follows the same order as the GNU Coding Standards.)
581 AC_SUBST([bindir],         ['${exec_prefix}/bin'])dnl
582 AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl
583 AC_SUBST([libexecdir],     ['${exec_prefix}/libexec'])dnl
584 AC_SUBST([datarootdir],    ['${prefix}/share'])dnl
585 AC_SUBST([datadir],        ['${datarootdir}'])dnl
586 AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl
587 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
588 AC_SUBST([localstatedir],  ['${prefix}/var'])dnl
589 AC_SUBST([runstatedir],    ['${localstatedir}/run'])dnl
590 AC_SUBST([includedir],     ['${prefix}/include'])dnl
591 AC_SUBST([oldincludedir],  ['/usr/include'])dnl
592 AC_SUBST([docdir],         [m4_ifset([AC_PACKAGE_TARNAME],
593                                      ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
594                                      ['${datarootdir}/doc/${PACKAGE}'])])dnl
595 AC_SUBST([infodir],        ['${datarootdir}/info'])dnl
596 AC_SUBST([htmldir],        ['${docdir}'])dnl
597 AC_SUBST([dvidir],         ['${docdir}'])dnl
598 AC_SUBST([pdfdir],         ['${docdir}'])dnl
599 AC_SUBST([psdir],          ['${docdir}'])dnl
600 AC_SUBST([libdir],         ['${exec_prefix}/lib'])dnl
601 AC_SUBST([localedir],      ['${datarootdir}/locale'])dnl
602 AC_SUBST([mandir],         ['${datarootdir}/man'])dnl
604 ac_prev=
605 ac_dashdash=
606 for ac_option
608   # If the previous option needs an argument, assign it.
609   if test -n "$ac_prev"; then
610     eval $ac_prev=\$ac_option
611     ac_prev=
612     continue
613   fi
615   case $ac_option in
616   *=?*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
617   *=)   ac_optarg= ;;
618   *)    ac_optarg=yes ;;
619   esac
621   # Accept the important Cygnus configure options, so we can diagnose typos.
623   case $ac_dashdash$ac_option in
624   --)
625     ac_dashdash=yes ;;
627   -bindir | --bindir | --bindi | --bind | --bin | --bi)
628     ac_prev=bindir ;;
629   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
630     bindir=$ac_optarg ;;
632   -build | --build | --buil | --bui | --bu)
633     ac_prev=build_alias ;;
634   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
635     build_alias=$ac_optarg ;;
637   -cache-file | --cache-file | --cache-fil | --cache-fi \
638   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
639     ac_prev=cache_file ;;
640   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
641   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
642     cache_file=$ac_optarg ;;
644   --config-cache | -C)
645     cache_file=config.cache ;;
647   -datadir | --datadir | --datadi | --datad)
648     ac_prev=datadir ;;
649   -datadir=* | --datadir=* | --datadi=* | --datad=*)
650     datadir=$ac_optarg ;;
652   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
653   | --dataroo | --dataro | --datar)
654     ac_prev=datarootdir ;;
655   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
656   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
657     datarootdir=$ac_optarg ;;
659   _AC_INIT_PARSE_ENABLE([disable])
661   -docdir | --docdir | --docdi | --doc | --do)
662     ac_prev=docdir ;;
663   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
664     docdir=$ac_optarg ;;
666   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
667     ac_prev=dvidir ;;
668   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
669     dvidir=$ac_optarg ;;
671   _AC_INIT_PARSE_ENABLE([enable])
673   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
674   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
675   | --exec | --exe | --ex)
676     ac_prev=exec_prefix ;;
677   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
678   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
679   | --exec=* | --exe=* | --ex=*)
680     exec_prefix=$ac_optarg ;;
682   -gas | --gas | --ga | --g)
683     # Obsolete; use --with-gas.
684     with_gas=yes ;;
686   -help | --help | --hel | --he | -h)
687     ac_init_help=long ;;
688   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
689     ac_init_help=recursive ;;
690   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
691     ac_init_help=short ;;
693   -host | --host | --hos | --ho)
694     ac_prev=host_alias ;;
695   -host=* | --host=* | --hos=* | --ho=*)
696     host_alias=$ac_optarg ;;
698   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
699     ac_prev=htmldir ;;
700   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
701   | --ht=*)
702     htmldir=$ac_optarg ;;
704   -includedir | --includedir | --includedi | --included | --include \
705   | --includ | --inclu | --incl | --inc)
706     ac_prev=includedir ;;
707   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
708   | --includ=* | --inclu=* | --incl=* | --inc=*)
709     includedir=$ac_optarg ;;
711   -infodir | --infodir | --infodi | --infod | --info | --inf)
712     ac_prev=infodir ;;
713   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
714     infodir=$ac_optarg ;;
716   -libdir | --libdir | --libdi | --libd)
717     ac_prev=libdir ;;
718   -libdir=* | --libdir=* | --libdi=* | --libd=*)
719     libdir=$ac_optarg ;;
721   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
722   | --libexe | --libex | --libe)
723     ac_prev=libexecdir ;;
724   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
725   | --libexe=* | --libex=* | --libe=*)
726     libexecdir=$ac_optarg ;;
728   -localedir | --localedir | --localedi | --localed | --locale)
729     ac_prev=localedir ;;
730   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
731     localedir=$ac_optarg ;;
733   -localstatedir | --localstatedir | --localstatedi | --localstated \
734   | --localstate | --localstat | --localsta | --localst | --locals)
735     ac_prev=localstatedir ;;
736   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
737   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
738     localstatedir=$ac_optarg ;;
740   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
741     ac_prev=mandir ;;
742   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
743     mandir=$ac_optarg ;;
745   -nfp | --nfp | --nf)
746     # Obsolete; use --without-fp.
747     with_fp=no ;;
749   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
750   | --no-cr | --no-c | -n)
751     no_create=yes ;;
753   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
754   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
755     no_recursion=yes ;;
757   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
758   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
759   | --oldin | --oldi | --old | --ol | --o)
760     ac_prev=oldincludedir ;;
761   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
762   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
763   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
764     oldincludedir=$ac_optarg ;;
766   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
767     ac_prev=prefix ;;
768   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
769     prefix=$ac_optarg ;;
771   -program-prefix | --program-prefix | --program-prefi | --program-pref \
772   | --program-pre | --program-pr | --program-p)
773     ac_prev=program_prefix ;;
774   -program-prefix=* | --program-prefix=* | --program-prefi=* \
775   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
776     program_prefix=$ac_optarg ;;
778   -program-suffix | --program-suffix | --program-suffi | --program-suff \
779   | --program-suf | --program-su | --program-s)
780     ac_prev=program_suffix ;;
781   -program-suffix=* | --program-suffix=* | --program-suffi=* \
782   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
783     program_suffix=$ac_optarg ;;
785   -program-transform-name | --program-transform-name \
786   | --program-transform-nam | --program-transform-na \
787   | --program-transform-n | --program-transform- \
788   | --program-transform | --program-transfor \
789   | --program-transfo | --program-transf \
790   | --program-trans | --program-tran \
791   | --progr-tra | --program-tr | --program-t)
792     ac_prev=program_transform_name ;;
793   -program-transform-name=* | --program-transform-name=* \
794   | --program-transform-nam=* | --program-transform-na=* \
795   | --program-transform-n=* | --program-transform-=* \
796   | --program-transform=* | --program-transfor=* \
797   | --program-transfo=* | --program-transf=* \
798   | --program-trans=* | --program-tran=* \
799   | --progr-tra=* | --program-tr=* | --program-t=*)
800     program_transform_name=$ac_optarg ;;
802   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
803     ac_prev=pdfdir ;;
804   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
805     pdfdir=$ac_optarg ;;
807   -psdir | --psdir | --psdi | --psd | --ps)
808     ac_prev=psdir ;;
809   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
810     psdir=$ac_optarg ;;
812   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
813   | -silent | --silent | --silen | --sile | --sil)
814     silent=yes ;;
816   -runstatedir | --runstatedir | --runstatedi | --runstated \
817   | --runstate | --runstat | --runsta | --runst | --runs \
818   | --run | --ru | --r)
819     ac_prev=runstatedir ;;
820   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
821   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
822   | --run=* | --ru=* | --r=*)
823     runstatedir=$ac_optarg ;;
825   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
826     ac_prev=sbindir ;;
827   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
828   | --sbi=* | --sb=*)
829     sbindir=$ac_optarg ;;
831   -sharedstatedir | --sharedstatedir | --sharedstatedi \
832   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
833   | --sharedst | --shareds | --shared | --share | --shar \
834   | --sha | --sh)
835     ac_prev=sharedstatedir ;;
836   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
837   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
838   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
839   | --sha=* | --sh=*)
840     sharedstatedir=$ac_optarg ;;
842   -site | --site | --sit)
843     ac_prev=site ;;
844   -site=* | --site=* | --sit=*)
845     site=$ac_optarg ;;
847   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
848     ac_prev=srcdir ;;
849   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
850     srcdir=$ac_optarg ;;
852   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
853   | --syscon | --sysco | --sysc | --sys | --sy)
854     ac_prev=sysconfdir ;;
855   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
856   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
857     sysconfdir=$ac_optarg ;;
859   -target | --target | --targe | --targ | --tar | --ta | --t)
860     ac_prev=target_alias ;;
861   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
862     target_alias=$ac_optarg ;;
864   -v | -verbose | --verbose | --verbos | --verbo | --verb)
865     verbose=yes ;;
867   -version | --version | --versio | --versi | --vers | -V)
868     ac_init_version=: ;;
870   _AC_INIT_PARSE_ENABLE([with])
872   _AC_INIT_PARSE_ENABLE([without])
874   --x)
875     # Obsolete; use --with-x.
876     with_x=yes ;;
878   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
879   | --x-incl | --x-inc | --x-in | --x-i)
880     ac_prev=x_includes ;;
881   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
882   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
883     x_includes=$ac_optarg ;;
885   -x-libraries | --x-libraries | --x-librarie | --x-librari \
886   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
887     ac_prev=x_libraries ;;
888   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
889   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
890     x_libraries=$ac_optarg ;;
892   -*) AC_MSG_ERROR([unrecognized option: `$ac_option'
893 Try `$[0] --help' for more information])
894     ;;
896   *=*)
897     ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
898     # Reject names that are not valid shell variable names.
899     case $ac_envvar in #(
900       '' | [[0-9]]* | *[[!_$as_cr_alnum]]* )
901       AC_MSG_ERROR([invalid variable name: `$ac_envvar']) ;;
902     esac
903     eval $ac_envvar=\$ac_optarg
904     export $ac_envvar ;;
906   *)
907     # FIXME: should be removed in autoconf 3.0.
908     AC_MSG_WARN([you should use --build, --host, --target])
909     expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
910       AC_MSG_WARN([invalid host type: $ac_option])
911     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
912     ;;
914   esac
915 done
917 if test -n "$ac_prev"; then
918   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
919   AC_MSG_ERROR([missing argument to $ac_option])
922 if test -n "$ac_unrecognized_opts"; then
923   case $enable_option_checking in
924     no) ;;
925     fatal) AC_MSG_ERROR([unrecognized options: $ac_unrecognized_opts]) ;;
926     *)     AC_MSG_WARN( [unrecognized options: $ac_unrecognized_opts]) ;;
927   esac
930 # Check all directory arguments for consistency.
931 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
932                 datadir sysconfdir sharedstatedir localstatedir includedir \
933                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
934                 libdir localedir mandir runstatedir
936   eval ac_val=\$$ac_var
937   # Remove trailing slashes.
938   case $ac_val in
939     */ )
940       ac_val=`expr "X$ac_val" : 'X\(.*[[^/]]\)' \| "X$ac_val" : 'X\(.*\)'`
941       eval $ac_var=\$ac_val;;
942   esac
943   # Be sure to have absolute directory names.
944   case $ac_val in
945     [[\\/$]]* | ?:[[\\/]]* )  continue;;
946     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
947   esac
948   AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
949 done
951 # There might be people who depend on the old broken behavior: `$host'
952 # used to hold the argument of --host etc.
953 # FIXME: To remove some day.
954 build=$build_alias
955 host=$host_alias
956 target=$target_alias
958 # FIXME: To remove some day.
959 if test "x$host_alias" != x; then
960   if test "x$build_alias" = x; then
961     cross_compiling=maybe
962   elif test "x$build_alias" != "x$host_alias"; then
963     cross_compiling=yes
964   fi
967 ac_tool_prefix=
968 test -n "$host_alias" && ac_tool_prefix=$host_alias-
970 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
972 m4_divert_pop([PARSE_ARGS])dnl
973 ])# _AC_INIT_PARSE_ARGS
976 # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
977 # ----------------------------------
978 # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
980 m4_define([_AC_INIT_PARSE_ENABLE],
981 [m4_bmatch([$1], [^with],
982            [_AC_INIT_PARSE_ENABLE2([$1], [with])],
983            [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
986 # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
987 # --------------------------------------------------
988 # Handle an `--enable' or a `--with' option.
990 # OPTION-NAME is `enable', `disable', `with', or `without'.
991 # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'.
993 # Positive variant of the option is recognized by the condition
994 #       OPTION-NAME == POSITIVE-NAME .
996 m4_define([_AC_INIT_PARSE_ENABLE2],
997 [-$1-* | --$1-*)
998     ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
999     # Reject names that are not valid shell variable names.
1000     expr "x$ac_useropt" : "[.*[^-+._$as_cr_alnum]]" >/dev/null &&
1001       AC_MSG_ERROR([invalid ]m4_if([$2], [with],
1002         [package], [feature])[ name: `$ac_useropt'])
1003     ac_useropt_orig=$ac_useropt
1004     ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-+.]]/_/g'`
1005     case $ac_user_opts in
1006       *"
1007 "$2_$ac_useropt"
1008 "*) ;;
1009       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
1010          ac_unrecognized_sep=', ';;
1011     esac
1012     eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
1016 # _AC_INIT_HELP
1017 # -------------
1018 # Handle the `configure --help' message.
1019 m4_define([_AC_INIT_HELP],
1020 [m4_divert_push([HELP_BEGIN])dnl
1023 # Report the --help message.
1025 if test "$ac_init_help" = "long"; then
1026   # Omit some internal or obsolete options to make the list less imposing.
1027   # This message is too long to be a string in the A/UX 3.1 sh.
1028   cat <<_ACEOF
1029 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
1030                         [AC_PACKAGE_STRING],
1031                         [this package]) to adapt to many kinds of systems.
1033 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1035 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
1036 VAR=VALUE.  See below for descriptions of some of the useful variables.
1038 Defaults for the options are specified in brackets.
1040 Configuration:
1041   -h, --help              display this help and exit
1042       --help=short        display options specific to this package
1043       --help=recursive    display the short help of all the included packages
1044   -V, --version           display version information and exit
1045   -q, --quiet, --silent   do not print \`checking ...' messages
1046       --cache-file=FILE   cache test results in FILE [disabled]
1047   -C, --config-cache      alias for \`--cache-file=config.cache'
1048   -n, --no-create         do not create output files
1049       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1051 Installation directories:
1052 ]AS_HELP_STRING([--prefix=PREFIX],
1053   [install architecture-independent files in PREFIX [$ac_default_prefix]])
1054 AS_HELP_STRING([--exec-prefix=EPREFIX],
1055   [install architecture-dependent files in EPREFIX [PREFIX]])[
1057 By default, \`make install' will install all the files in
1058 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1059 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1060 for instance \`--prefix=\$HOME'.
1062 For better control, use the options below.
1064 Fine tuning of the installation directories:
1065   --bindir=DIR            user executables [EPREFIX/bin]
1066   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1067   --libexecdir=DIR        program executables [EPREFIX/libexec]
1068   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1069   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1070   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1071   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1072   --libdir=DIR            object code libraries [EPREFIX/lib]
1073   --includedir=DIR        C header files [PREFIX/include]
1074   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1075   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1076   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1077   --infodir=DIR           info documentation [DATAROOTDIR/info]
1078   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1079   --mandir=DIR            man documentation [DATAROOTDIR/man]
1080 ]AS_HELP_STRING([--docdir=DIR],
1081   [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME],
1082     [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[
1083   --htmldir=DIR           html documentation [DOCDIR]
1084   --dvidir=DIR            dvi documentation [DOCDIR]
1085   --pdfdir=DIR            pdf documentation [DOCDIR]
1086   --psdir=DIR             ps documentation [DOCDIR]
1087 _ACEOF
1089   cat <<\_ACEOF]
1090 m4_divert_pop([HELP_BEGIN])dnl
1091 dnl The order of the diversions here is
1092 dnl - HELP_BEGIN
1093 dnl   which may be extended by extra generic options such as with X or
1094 dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
1096 dnl - HELP_CANON
1097 dnl   Support for cross compilation (--build, --host and --target).
1098 dnl   Display only in long --help.
1100 dnl - HELP_ENABLE
1101 dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1102 dnl   then implements the header of the non generic options.
1104 dnl - HELP_WITH
1106 dnl - HELP_VAR
1108 dnl - HELP_VAR_END
1110 dnl - HELP_END
1111 dnl   initialized below, in which we dump the trailer (handling of the
1112 dnl   recursion for instance).
1113 m4_divert_push([HELP_ENABLE])dnl
1114 _ACEOF
1117 if test -n "$ac_init_help"; then
1118 m4_ifset([AC_PACKAGE_STRING],
1119 [  case $ac_init_help in
1120      short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1121    esac])
1122   cat <<\_ACEOF
1123 m4_divert_pop([HELP_ENABLE])dnl
1124 m4_divert_push([HELP_END])dnl
1126 Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
1127   [the package provider]).dnl
1128 m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
1129 AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
1130 m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
1131 General help using GNU software: <http://www.gnu.org/gethelp/>.])])
1132 _ACEOF
1133 ac_status=$?
1136 if test "$ac_init_help" = "recursive"; then
1137   # If there are subdirs, report their specific --help.
1138   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1139     test -d "$ac_dir" ||
1140       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1141       continue
1142     _AC_SRCDIRS(["$ac_dir"])
1143     cd "$ac_dir" || { ac_status=$?; continue; }
1144     # Check for guested configure.
1145     if test -f "$ac_srcdir/configure.gnu"; then
1146       echo &&
1147       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1148     elif test -f "$ac_srcdir/configure"; then
1149       echo &&
1150       $SHELL "$ac_srcdir/configure" --help=recursive
1151     else
1152       AC_MSG_WARN([no configuration information is in $ac_dir])
1153     fi || ac_status=$?
1154     cd "$ac_pwd" || { ac_status=$?; break; }
1155   done
1158 test -n "$ac_init_help" && exit $ac_status
1159 m4_divert_pop([HELP_END])dnl
1160 ])# _AC_INIT_HELP
1163 # _AC_INIT_VERSION
1164 # ----------------
1165 # Handle the `configure --version' message.
1166 m4_define([_AC_INIT_VERSION],
1167 [m4_divert_text([VERSION_BEGIN],
1168 [if $ac_init_version; then
1169   cat <<\_ACEOF
1170 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1171 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1172 generated by m4_PACKAGE_STRING])
1173 m4_divert_text([VERSION_END],
1174 [_ACEOF
1175   exit
1176 fi])dnl
1177 ])# _AC_INIT_VERSION
1180 # _AC_INIT_CONFIG_LOG
1181 # -------------------
1182 # Initialize the config.log file descriptor and write header to it.
1183 m4_define([_AC_INIT_CONFIG_LOG],
1184 [m4_divert_text([INIT_PREPARE],
1185 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1186 cat >config.log <<_ACEOF
1187 This file contains any messages produced by compilers while
1188 running configure, to aid debugging if configure makes a mistake.
1190 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1191 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1192 generated by m4_PACKAGE_STRING.  Invocation command line was
1194   $ $[0] $[@]
1196 _ACEOF
1197 exec AS_MESSAGE_LOG_FD>>config.log
1198 AS_UNAME >&AS_MESSAGE_LOG_FD
1200 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1203 m4_text_box([Core tests.])
1205 _ACEOF
1206 ])])# _AC_INIT_CONFIG_LOG
1209 # _AC_INIT_PREPARE
1210 # ----------------
1211 # Called by AC_INIT to build the preamble of the `configure' scripts.
1212 # 1. Trap and clean up various tmp files.
1213 # 2. Set up the fd and output files
1214 # 3. Remember the options given to `configure' for `config.status --recheck'.
1215 # 4. Initiates confdefs.h
1216 # 5. Loads site and cache files
1217 m4_define([_AC_INIT_PREPARE],
1218 [m4_divert_push([INIT_PREPARE])dnl
1220 # Keep a trace of the command line.
1221 # Strip out --no-create and --no-recursion so they do not pile up.
1222 # Strip out --silent because we don't want to record it for future runs.
1223 # Also quote any args containing shell meta-characters.
1224 # Make two passes to allow for proper duplicate-argument suppression.
1225 ac_configure_args=
1226 ac_configure_args0=
1227 ac_configure_args1=
1228 ac_must_keep_next=false
1229 for ac_pass in 1 2
1231   for ac_arg
1232   do
1233     case $ac_arg in
1234     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1235     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1236     | -silent | --silent | --silen | --sile | --sil)
1237       continue ;;
1238     *\'*)
1239       ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1240     esac
1241     case $ac_pass in
1242     1) AS_VAR_APPEND([ac_configure_args0], [" '$ac_arg'"]) ;;
1243     2)
1244       AS_VAR_APPEND([ac_configure_args1], [" '$ac_arg'"])
1245 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1246 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1247 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1248 dnl give --prefix foo bar).
1249       if test $ac_must_keep_next = true; then
1250         ac_must_keep_next=false # Got value, back to normal.
1251       else
1252         case $ac_arg in
1253 dnl Use broad patterns, as arguments that would have already made configure
1254 dnl exit don't matter.
1255           *=* | --config-cache | -C | -disable-* | --disable-* \
1256           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1257           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1258           | -with-* | --with-* | -without-* | --without-* | --x)
1259             case "$ac_configure_args0 " in
1260               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1261             esac
1262             ;;
1263           -* ) ac_must_keep_next=true ;;
1264         esac
1265       fi
1266       AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"])
1267       ;;
1268     esac
1269   done
1270 done
1271 AS_UNSET(ac_configure_args0)
1272 AS_UNSET(ac_configure_args1)
1274 # When interrupted or exit'd, cleanup temporary files, and complete
1275 # config.log.  We remove comments because anyway the quotes in there
1276 # would cause problems or look ugly.
1277 # WARNING: Use '\'' to represent an apostrophe within the trap.
1278 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1279 trap 'exit_status=$?
1280   # Sanitize IFS.
1281   IFS=" ""      $as_nl"
1282   # Save into config.log some information that might help in debugging.
1283   {
1284     echo
1286     AS_BOX([Cache variables.])
1287     echo
1288     m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1289                   [^ *\(#.*\)?
1290 ],                [],
1291                   ['], ['\\''])
1292     echo
1294     AS_BOX([Output variables.])
1295     echo
1296     for ac_var in $ac_subst_vars
1297     do
1298       eval ac_val=\$$ac_var
1299       case $ac_val in
1300       *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1301       esac
1302       AS_ECHO(["$ac_var='\''$ac_val'\''"])
1303     done | sort
1304     echo
1306     if test -n "$ac_subst_files"; then
1307       AS_BOX([File substitutions.])
1308       echo
1309       for ac_var in $ac_subst_files
1310       do
1311         eval ac_val=\$$ac_var
1312         case $ac_val in
1313         *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1314         esac
1315         AS_ECHO(["$ac_var='\''$ac_val'\''"])
1316       done | sort
1317       echo
1318     fi
1320     if test -s confdefs.h; then
1321       AS_BOX([confdefs.h.])
1322       echo
1323       cat confdefs.h
1324       echo
1325     fi
1326     test "$ac_signal" != 0 &&
1327       AS_ECHO(["$as_me: caught signal $ac_signal"])
1328     AS_ECHO(["$as_me: exit $exit_status"])
1329   } >&AS_MESSAGE_LOG_FD
1330   rm -f core *.core core.conftest.* &&
1331     rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1332     exit $exit_status
1333 ' 0
1334 for ac_signal in 1 2 13 15; do
1335   trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1336 done
1337 ac_signal=0
1339 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1340 rm -f -r conftest* confdefs.h
1342 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1343 dnl containing less than 14 bytes (including the newline).
1344 AS_ECHO(["/* confdefs.h */"]) > confdefs.h
1346 # Predefined preprocessor variables.
1347 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1348                    [Define to the full name of this package.])dnl
1349 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1350                    [Define to the one symbol short name of this package.])dnl
1351 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1352                    [Define to the version of this package.])dnl
1353 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1354                    [Define to the full name and version of this package.])dnl
1355 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1356                    [Define to the address where bug reports for this package
1357                     should be sent.])dnl
1358 AC_DEFINE_UNQUOTED([PACKAGE_URL], ["$PACKAGE_URL"],
1359                    [Define to the home page for this package.])
1361 # Let the site file select an alternate cache file if it wants to.
1362 AC_SITE_LOAD
1363 AC_CACHE_LOAD
1364 m4_divert_pop([INIT_PREPARE])dnl
1365 ])# _AC_INIT_PREPARE
1368 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1369 # ----------------------------------------
1370 # This macro is used only for Autoupdate.
1371 AU_DEFUN([AC_INIT],
1372 [m4_ifval([$2], [[AC_INIT($@)]],
1373           [m4_ifval([$1],
1374 [[AC_INIT]
1375 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1379 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
1380 # ----------------------------------------------------------
1381 # Include the user macro files, prepare the diversions, and output the
1382 # preamble of the `configure' script.
1384 # If BUG-REPORT is omitted, do without (unless the user previously
1385 # defined the m4 macro AC_PACKAGE_BUGREPORT).  If TARNAME is omitted,
1386 # use PACKAGE to seed it.  If URL is omitted, use
1387 # `http://www.gnu.org/software/TARNAME/' if PACKAGE begins with `GNU',
1388 # otherwise, do without.
1390 # Note that the order is important: first initialize, then set the
1391 # AC_CONFIG_SRCDIR.
1392 m4_define([AC_INIT],
1393 [# Forbidden tokens and exceptions.
1394 m4_pattern_forbid([^_?A[CHUM]_])
1395 m4_pattern_forbid([_AC_])
1396 m4_pattern_forbid([^LIBOBJS$],
1397                   [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1398 # Actually reserved by M4sh.
1399 m4_pattern_allow([^AS_FLAGS$])
1400 # So that the autoconf-generated scripts will always re-execute
1401 # themselves with $CONFIG_SHELL, if that's set in the environment.
1402 m4_define([_AS_FORCE_REEXEC_WITH_CONFIG_SHELL], [yes])
1403 AS_INIT[]dnl
1404 AS_PREPARE[]dnl
1405 m4_divert_push([KILL])
1406 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1407 _AC_INIT_DEFAULTS
1408 _AC_INIT_PARSE_ARGS
1409 _AC_INIT_DIRCHECK
1410 _AC_INIT_SRCDIR
1411 _AC_INIT_HELP
1412 _AC_INIT_VERSION
1413 _AC_INIT_CONFIG_LOG
1414 _AC_INIT_PREPARE
1415 _AC_INIT_NOTICE
1416 _AC_INIT_COPYRIGHT
1417 m4_divert_text([SHELL_FN], [
1418 m4_text_box([Autoconf initialization.])])
1419 m4_divert_pop
1420 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1422 dnl Substitute for predefined variables.
1423 AC_SUBST([DEFS])dnl
1424 AC_SUBST([ECHO_C])dnl
1425 AC_SUBST([ECHO_N])dnl
1426 AC_SUBST([ECHO_T])dnl
1427 AC_SUBST([LIBS])dnl
1428 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1429 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1430 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1432 AC_LANG_PUSH(C)
1438 ## ------------------------------------------------------------- ##
1439 ## Selecting optional features, working with optional software.  ##
1440 ## ------------------------------------------------------------- ##
1442 # AC_PRESERVE_HELP_ORDER
1443 # ----------------------
1444 # Emit help strings in the order given, rather than grouping all --enable-FOO
1445 # and all --with-BAR.
1446 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1447 [m4_divert_once([HELP_ENABLE], [[
1448 Optional Features and Packages:
1449   --disable-option-checking  ignore unrecognized --enable/--with options
1450   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1451   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1452   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1453   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
1454 m4_define([_m4_divert(HELP_ENABLE)],    _m4_divert(HELP_WITH))
1455 ])# AC_PRESERVE_HELP_ORDER
1457 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1458 # -------------------------------------------------------------------
1459 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1460 # OPTION is either "enable" or "with".
1462 m4_define([_AC_ENABLE_IF],
1463 [@%:@ Check whether --$1-$2 was given.
1464 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-+.], [___]), [$3], [$4])
1467 m4_define([_AC_ENABLE_IF_ACTION],
1468 [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
1469 ])dnl
1470 AS_IF([test ${$1_$2+y}], [$1val=$$1_$2; $3], [$4])dnl
1473 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1474 # ------------------------------------------------------------------------
1475 AC_DEFUN([AC_ARG_ENABLE],
1476 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1478 [m4_divert_once([HELP_ENABLE], [[
1479 Optional Features:
1480   --disable-option-checking  ignore unrecognized --enable/--with options
1481   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1482   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])])dnl
1483 m4_divert_once([HELP_ENABLE], [$2])dnl
1484 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1485 ])# AC_ARG_ENABLE
1488 AU_DEFUN([AC_ENABLE],
1489 [AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])])
1492 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1493 # --------------------------------------------------------------------
1494 AC_DEFUN([AC_ARG_WITH],
1495 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1497 [m4_divert_once([HELP_WITH], [[
1498 Optional Packages:
1499   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1500   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])])
1501 m4_divert_once([HELP_WITH], [$2])dnl
1502 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1503 ])# AC_ARG_WITH
1505 AU_DEFUN([AC_WITH],
1506 [AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])])
1508 # AC_DISABLE_OPTION_CHECKING
1509 # --------------------------
1510 AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
1511 [m4_divert_once([DEFAULTS], [enable_option_checking=no])
1512 ])# AC_DISABLE_OPTION_CHECKING
1515 ## ----------------------------------------- ##
1516 ## Remembering variables for reconfiguring.  ##
1517 ## ----------------------------------------- ##
1520 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1521 # ----------------------------------
1522 # Register VARNAME as a precious variable, and document it in
1523 # `configure --help' (but only once).
1524 AC_DEFUN([AC_ARG_VAR],
1525 [m4_divert_once([HELP_VAR], [[
1526 Some influential environment variables:]])dnl
1527 m4_divert_once([HELP_VAR_END], [[
1528 Use these variables to override the choices made by `configure' or to help
1529 it to find libraries and programs with nonstandard names/locations.]])dnl
1530 m4_expand_once([m4_divert_text([HELP_VAR],
1531                                [AS_HELP_STRING([$1], [$2], [              ])])],
1532                [$0($1)])dnl
1533 AC_SUBST([$1])dnl
1534 _AC_ARG_VAR_PRECIOUS([$1])dnl
1535 ])# AC_ARG_VAR
1538 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1539 # -----------------------------
1540 # Declare VARNAME is precious.
1541 m4_define([_AC_ARG_VAR_PRECIOUS],
1542 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1543 ])dnl
1547 # _AC_ARG_VAR_STORE
1548 # -----------------
1549 # We try to diagnose when precious variables have changed.  To do this,
1550 # make two early snapshots (after the option processing to take
1551 # explicit variables into account) of those variables: one (ac_env_)
1552 # which represents the current run, and a second (ac_cv_env_) which,
1553 # at the first run, will be saved in the cache.  As an exception to
1554 # the cache mechanism, its loading will override these variables (non
1555 # `ac_cv_env_' cache value are only set when unset).
1557 # In subsequent runs, after having loaded the cache, compare
1558 # ac_cv_env_foo against ac_env_foo.  See _AC_ARG_VAR_VALIDATE.
1559 m4_define([_AC_ARG_VAR_STORE],
1560 [m4_divert_text([PARSE_ARGS],
1561 [for ac_var in $ac_precious_vars; do
1562   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1563   eval ac_env_${ac_var}_value=\$${ac_var}
1564   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1565   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1566 done])dnl
1570 # _AC_ARG_VAR_VALIDATE
1571 # --------------------
1572 # The precious variables are saved twice at the beginning of
1573 # configure.  E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1574 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1575 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1577 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1578 # content of the cached values, while `ac_env_' represents that of the
1579 # current values.
1581 # So we check that `ac_env_' and `ac_cv_env_' are consistent.  If
1582 # they aren't, die.
1583 m4_define([_AC_ARG_VAR_VALIDATE],
1584 [m4_divert_text([INIT_PREPARE],
1585 [# Check that the precious variables saved in the cache have kept the same
1586 # value.
1587 ac_cache_corrupted=false
1588 for ac_var in $ac_precious_vars; do
1589   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1590   eval ac_new_set=\$ac_env_${ac_var}_set
1591   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1592   eval ac_new_val=\$ac_env_${ac_var}_value
1593   case $ac_old_set,$ac_new_set in
1594     set,)
1595       AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1596       ac_cache_corrupted=: ;;
1597     ,set)
1598       AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1599       ac_cache_corrupted=: ;;
1600     ,);;
1601     *)
1602       if test "x$ac_old_val" != "x$ac_new_val"; then
1603         # differences in whitespace do not lead to failure.
1604         ac_old_val_w=`echo x $ac_old_val`
1605         ac_new_val_w=`echo x $ac_new_val`
1606         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1607           AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1608           ac_cache_corrupted=:
1609         else
1610           AS_MESSAGE([warning: ignoring whitespace changes in `$ac_var' since the previous run:], 2)
1611           eval $ac_var=\$ac_old_val
1612         fi
1613         AS_MESSAGE([  former value:  `$ac_old_val'], 2)
1614         AS_MESSAGE([  current value: `$ac_new_val'], 2)
1615       fi;;
1616   esac
1617   # Pass precious variables to config.status.
1618   if test "$ac_new_set" = set; then
1619     case $ac_new_val in
1620     *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1621     *) ac_arg=$ac_var=$ac_new_val ;;
1622     esac
1623     case " $ac_configure_args " in
1624       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1625       *) AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;;
1626     esac
1627   fi
1628 done
1629 if $ac_cache_corrupted; then
1630   AS_MESSAGE([error: in `$ac_pwd':], 2)
1631   AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1632   AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1633 fi])dnl
1634 ])# _AC_ARG_VAR_VALIDATE
1640 ## ---------------------------- ##
1641 ## Transforming program names.  ##
1642 ## ---------------------------- ##
1645 # AC_ARG_PROGRAM
1646 # --------------
1647 # This macro is expanded only once, to avoid that `foo' ends up being
1648 # installed as `ggfoo'.
1649 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1650 [dnl Document the options.
1651 m4_divert_push([HELP_BEGIN])dnl
1653 Program names:
1654   --program-prefix=PREFIX            prepend PREFIX to installed program names
1655   --program-suffix=SUFFIX            append SUFFIX to installed program names
1656   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1657 m4_divert_pop([HELP_BEGIN])dnl
1658 test "$program_prefix" != NONE &&
1659   program_transform_name="s&^&$program_prefix&;$program_transform_name"
1660 # Use a double $ so make ignores it.
1661 test "$program_suffix" != NONE &&
1662   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1663 # Double any \ or $.
1664 # By default was `s,x,x', remove it if useless.
1665 [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
1666 program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
1667 ])# AC_ARG_PROGRAM
1673 ## ------------------------- ##
1674 ## Finding auxiliary files.  ##
1675 ## ------------------------- ##
1678 # AC_CONFIG_AUX_DIR(DIR)
1679 # ----------------------
1680 # Find install-sh, config.sub, config.guess, and Cygnus configure
1681 # in directory DIR.  These are auxiliary files used in configuration.
1682 # DIR can be either absolute or relative to $srcdir.
1683 AC_DEFUN([AC_CONFIG_AUX_DIR],
1684 [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
1687 # AC_CONFIG_AUX_DIR_DEFAULT
1688 # -------------------------
1689 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1690 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1691 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1692 [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
1695 # AC_CONFIG_AUX_DIRS(DIR ...)
1696 # ---------------------------
1697 # Internal subroutine.
1698 # Search for the configuration auxiliary files in directory list $1.
1699 # We look only for install-sh, so users of AC_PROG_INSTALL
1700 # do not automatically need to distribute the other auxiliary files.
1701 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1702 [ac_aux_dir=
1703 for ac_dir in $1
1705   if test -f "$ac_dir/install-sh"; then
1706     ac_aux_dir=$ac_dir
1707     ac_install_sh="$ac_aux_dir/install-sh -c"
1708     break
1709   elif test -f "$ac_dir/install.sh"; then
1710     ac_aux_dir=$ac_dir
1711     ac_install_sh="$ac_aux_dir/install.sh -c"
1712     break
1713   elif test -f "$ac_dir/shtool"; then
1714     ac_aux_dir=$ac_dir
1715     ac_install_sh="$ac_aux_dir/shtool install -c"
1716     break
1717   fi
1718 done
1719 if test -z "$ac_aux_dir"; then
1720   AC_MSG_ERROR([cannot find install-sh, install.sh, or shtool in $1])
1723 # These three variables are undocumented and unsupported,
1724 # and are intended to be withdrawn in a future Autoconf release.
1725 # They can cause serious problems if a builder's source tree is in a directory
1726 # whose full name contains unusual characters.
1727 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1728 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1729 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1731 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1732 ])# AC_CONFIG_AUX_DIRS
1737 ## ------------------------ ##
1738 ## Finding aclocal macros.  ##
1739 ## ------------------------ ##
1742 # AC_CONFIG_MACRO_DIR_TRACE(DIR)
1743 # ------------------------------
1744 # This macro exists solely for tracing - never invoke it directly.
1745 # It will be called once per directory listed in either form of
1746 # AC_CONFIG_MACRO_DIR[S].
1747 m4_define([AC_CONFIG_MACRO_DIR_TRACE],
1748 [m4_fatal([Do not invoke $0 directly])])
1750 # _AC_CONFIG_MACRO_DIRS_USED
1751 # --------------------------
1752 # Internal witness macro, redefined to empty after first directory is traced.
1753 m4_define([_AC_CONFIG_MACRO_DIRS_USED], [-])
1755 # _AC_CONFIG_MACRO_DIRS(CALLER, DIR)
1756 # ----------------------------------
1757 # Internal workhorse macro to ensure a sane calling pattern of CALLER, and
1758 # eventually trace DIR through the documented public trace point.
1759 m4_define([_AC_CONFIG_MACRO_DIRS],
1760 [m4_if([$1], [-AC_CONFIG_MACRO_DIRS], [AC_CONFIG_MACRO_DIR([$2])],
1761        [$1], [AC_CONFIG_MACRO_DIR], [m4_fatal([$1 can only be used once])],
1762   [m4_define([$0_USED])m4_pushdef([AC_CONFIG_MACRO_DIR_TRACE])]]dnl
1763 [[AC_CONFIG_MACRO_DIR_TRACE([$2])m4_popdef([AC_CONFIG_MACRO_DIR_TRACE])])])
1765 # AC_CONFIG_MACRO_DIRS(DIR-1 [DIR-2 ... DIR-n])
1766 # --------------------------------------------
1767 # Declare directories containing additional macros for aclocal.
1768 # This macro can be called multiple times, and with multiple arguments.
1769 # Do not trace this macro; instead trace AC_CONFIG_MACRO_DIR_TRACE.
1770 # If no directory has been traced yet, then this macro also triggers
1771 # a trace of AC_CONFIG_MACRO_DIR on the first directory.
1772 AC_DEFUN([AC_CONFIG_MACRO_DIRS],
1773 [m4_map_args_w([$1], [_$0(_$0_USED()[$0], ], [)])])
1775 # AC_CONFIG_MACRO_DIR(DIR)
1776 # ------------------------
1777 # Declare directory containing additional macros for aclocal.
1778 # This macro exists for backward compatibility; while tools can trace this,
1779 # we recommend tracing AC_CONFIG_MACRO_DIR_TRACE instead.  This macro can
1780 # only be used once, and must not be used after AC_CONFIG_MACRO_DIRS.
1781 AC_DEFUN([AC_CONFIG_MACRO_DIR],
1782 [_$0S(_$0S_USED()[$0], [$1])])
1785 ## --------------------- ##
1786 ## Requiring aux files.  ##
1787 ## --------------------- ##
1789 # AC_REQUIRE_AUX_FILE(FILE)
1790 # -------------------------
1791 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1792 # It announces FILE is required in the auxdir.
1793 m4_define([AC_REQUIRE_AUX_FILE],
1794 [AS_LITERAL_WORD_IF([$1], [],
1795                [m4_fatal([$0: requires a literal argument])])])
1799 ## ----------------------------------- ##
1800 ## Getting the canonical system type.  ##
1801 ## ----------------------------------- ##
1803 # The inputs are:
1804 #    configure --host=HOST --target=TARGET --build=BUILD
1806 # The rules are:
1807 # 1. Build defaults to the current platform, as determined by config.guess.
1808 # 2. Host defaults to build.
1809 # 3. Target defaults to host.
1812 # _AC_CANONICAL_SPLIT(THING)
1813 # --------------------------
1814 # Generate the variables THING, THING_{alias cpu vendor os}.
1815 m4_define([_AC_CANONICAL_SPLIT],
1816 [case $ac_cv_$1 in
1817 *-*-*) ;;
1818 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1819 esac
1820 AC_SUBST([$1], [$ac_cv_$1])dnl
1821 ac_save_IFS=$IFS; IFS='-'
1822 set x $ac_cv_$1
1823 shift
1824 AC_SUBST([$1_cpu], [$[1]])dnl
1825 AC_SUBST([$1_vendor], [$[2]])dnl
1826 shift; shift
1827 [# Remember, the first character of IFS is used to create $]*,
1828 # except with old shells:
1829 $1_os=$[*]
1830 IFS=$ac_save_IFS
1831 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
1832 AC_SUBST([$1_os])dnl
1833 ])# _AC_CANONICAL_SPLIT
1836 # AC_CANONICAL_BUILD
1837 # ------------------
1838 AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
1839 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1840 AC_REQUIRE_AUX_FILE([config.sub])dnl
1841 AC_REQUIRE_AUX_FILE([config.guess])dnl
1842 m4_divert_once([HELP_CANON],
1844 System types:
1845   --build=BUILD     configure for building on BUILD [guessed]]])dnl
1846 # Make sure we can run config.sub.
1847 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1848   AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
1850 AC_CACHE_CHECK([build system type], [ac_cv_build],
1851 [ac_build_alias=$build_alias
1852 test "x$ac_build_alias" = x &&
1853   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1854 test "x$ac_build_alias" = x &&
1855   AC_MSG_ERROR([cannot guess build type; you must specify one])
1856 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1857   AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
1859 _AC_CANONICAL_SPLIT(build)
1860 ])# AC_CANONICAL_BUILD
1863 # AC_CANONICAL_HOST
1864 # -----------------
1865 AC_DEFUN_ONCE([AC_CANONICAL_HOST],
1866 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1867 m4_divert_once([HELP_CANON],
1868 [[  --host=HOST       cross-compile to build programs to run on HOST [BUILD]]])dnl
1869 AC_CACHE_CHECK([host system type], [ac_cv_host],
1870 [if test "x$host_alias" = x; then
1871   ac_cv_host=$ac_cv_build
1872 else
1873   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1874     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
1877 _AC_CANONICAL_SPLIT([host])
1878 ])# AC_CANONICAL_HOST
1881 # AC_CANONICAL_TARGET
1882 # -------------------
1883 AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
1884 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1885 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1886 m4_divert_once([HELP_CANON],
1887 [[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
1888 AC_CACHE_CHECK([target system type], [ac_cv_target],
1889 [if test "x$target_alias" = x; then
1890   ac_cv_target=$ac_cv_host
1891 else
1892   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
1893     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
1896 _AC_CANONICAL_SPLIT([target])
1898 # The aliases save the names the user supplied, while $host etc.
1899 # will get canonicalized.
1900 test -n "$target_alias" &&
1901   test "$program_prefix$program_suffix$program_transform_name" = \
1902     NONENONEs,x,x, &&
1903   program_prefix=${target_alias}-[]dnl
1904 ])# AC_CANONICAL_TARGET
1907 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1910 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1911 # ------------------------------------------
1912 # If the cache file is inconsistent with the current host,
1913 # target and build system types, execute CMD or print a default
1914 # error message.  Now handled via _AC_ARG_VAR_PRECIOUS.
1915 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1918 ## ---------------------- ##
1919 ## Caching test results.  ##
1920 ## ---------------------- ##
1923 # AC_SITE_LOAD
1924 # ------------
1925 # Look for site- or system-specific initialization scripts.
1926 m4_define([AC_SITE_LOAD],
1927 [# Prefer an explicitly selected file to automatically selected ones.
1928 ac_site_file1=NONE
1929 ac_site_file2=NONE
1930 if test -n "$CONFIG_SITE"; then
1931   # We do not want a PATH search for config.site.
1932   case $CONFIG_SITE in @%:@((
1933     -*)  ac_site_file1=./$CONFIG_SITE;;
1934     */*) ac_site_file1=$CONFIG_SITE;;
1935     *)   ac_site_file1=./$CONFIG_SITE;;
1936   esac
1937 elif test "x$prefix" != xNONE; then
1938   ac_site_file1=$prefix/share/config.site
1939   ac_site_file2=$prefix/etc/config.site
1940 else
1941   ac_site_file1=$ac_default_prefix/share/config.site
1942   ac_site_file2=$ac_default_prefix/etc/config.site
1944 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1946   test "x$ac_site_file" = xNONE && continue
1947   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1948     AC_MSG_NOTICE([loading site script $ac_site_file])
1949     sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1950     . "$ac_site_file" \
1951       || AC_MSG_FAILURE([failed to load site script $ac_site_file])
1952   fi
1953 done
1957 # AC_CACHE_LOAD
1958 # -------------
1959 m4_define([AC_CACHE_LOAD],
1960 [if test -r "$cache_file"; then
1961   # Some versions of bash will fail to source /dev/null (special files
1962   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
1963   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1964     AC_MSG_NOTICE([loading cache $cache_file])
1965     case $cache_file in
1966       [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
1967       *)                      . "./$cache_file";;
1968     esac
1969   fi
1970 else
1971   AC_MSG_NOTICE([creating cache $cache_file])
1972   >$cache_file
1974 ])# AC_CACHE_LOAD
1977 # _AC_CACHE_DUMP
1978 # --------------
1979 # Dump the cache to stdout.  It can be in a pipe (this is a requirement).
1980 m4_define([_AC_CACHE_DUMP],
1981 [# The following way of writing the cache mishandles newlines in values,
1982 # but we know of no workaround that is simple, portable, and efficient.
1983 # So, we kill variables containing newlines.
1984 # Ultrix sh set writes to stderr and can't be redirected directly,
1985 # and sets the high bit in the cache file unless we assign to the vars.
1987   for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
1988     eval ac_val=\$$ac_var
1989     case $ac_val in #(
1990     *${as_nl}*)
1991       case $ac_var in #(
1992       *_cv_*) AC_MSG_WARN([cache variable $ac_var contains a newline]) ;;
1993       esac
1994       case $ac_var in #(
1995       _ | IFS | as_nl) ;; #(
1996       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1997       *) AS_UNSET([$ac_var]) ;;
1998       esac ;;
1999     esac
2000   done
2002   (set) 2>&1 |
2003     case $as_nl`(ac_space=' '; set) 2>&1` in #(
2004     *${as_nl}ac_space=\ *)
2005       # `set' does not quote correctly, so add quotes: double-quote
2006       # substitution turns \\\\ into \\, and sed turns \\ into \.
2007       sed -n \
2008         ["s/'/'\\\\''/g;
2009           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
2010       ;; #(
2011     *)
2012       # `set' quotes correctly as required by POSIX, so do not add quotes.
2013       sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
2014       ;;
2015     esac |
2016     sort
2017 )dnl
2018 ])# _AC_CACHE_DUMP
2021 # AC_CACHE_SAVE
2022 # -------------
2023 # Save the cache.
2024 # Allow a site initialization script to override cache values.
2025 m4_define([AC_CACHE_SAVE],
2026 [cat >confcache <<\_ACEOF
2027 # This file is a shell script that caches the results of configure
2028 # tests run on this system so they can be shared between configure
2029 # scripts and configure runs, see configure's option --config-cache.
2030 # It is not useful on other systems.  If it contains results you don't
2031 # want to keep, you may remove or edit it.
2033 # config.status only pays attention to the cache file if you give it
2034 # the --recheck option to rerun configure.
2036 # `ac_cv_env_foo' variables (set or unset) will be overridden when
2037 # loading this file, other *unset* `ac_cv_foo' will be assigned the
2038 # following values.
2040 _ACEOF
2042 _AC_CACHE_DUMP() |
2043   sed ['
2044      /^ac_cv_env_/b end
2045      t clear
2046      :clear
2047      s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
2048      t end
2049      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
2050      :end'] >>confcache
2051 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
2052   if test -w "$cache_file"; then
2053     if test "x$cache_file" != "x/dev/null"; then
2054       AC_MSG_NOTICE([updating cache $cache_file])
2055       if test ! -f "$cache_file" || test -h "$cache_file"; then
2056         cat confcache >"$cache_file"
2057       else
2058 dnl Try to update the cache file atomically even on different mount points;
2059 dnl at the same time, avoid filename limitation issues in the common case.
2060         case $cache_file in #(
2061         */* | ?:*)
2062           mv -f confcache "$cache_file"$$ &&
2063           mv -f "$cache_file"$$ "$cache_file" ;; #(
2064         *)
2065           mv -f confcache "$cache_file" ;;
2066         esac
2067       fi
2068     fi
2069   else
2070     AC_MSG_NOTICE([not updating unwritable cache $cache_file])
2071   fi
2073 rm -f confcache[]dnl
2074 ])# AC_CACHE_SAVE
2077 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
2078 # ------------------------------------------
2079 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
2080 # Should be dnl'ed.  Try to catch common mistakes.
2081 m4_defun([AC_CACHE_VAL],
2082 [AS_LITERAL_WORD_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
2083                             [AC_DIAGNOSE([syntax],
2084 [$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl
2085 m4_if(m4_index([$2], [AC_DEFINE]), [-1], [],
2086       [AC_DIAGNOSE([syntax],
2087 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
2088 [where no actions should be taken])])dnl
2089 m4_if(m4_index([$2], [AC_SUBST]), [-1], [],
2090       [AC_DIAGNOSE([syntax],
2091 [$0($1, ...): suspicious presence of an AC_SUBST in the second argument, ]dnl
2092 [where no actions should be taken])])dnl
2093 AS_VAR_SET_IF([$1],
2094               [_AS_ECHO_N([(cached) ])],
2095               [$2])
2099 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
2100 # -------------------------------------------
2101 # Do not call this macro with a dnl right behind.
2102 m4_defun([AC_CACHE_CHECK],
2103 [AC_MSG_CHECKING([$1])
2104 AC_CACHE_VAL([$2], [$3])dnl
2105 AS_LITERAL_WORD_IF([$2],
2106               [AC_MSG_RESULT([$$2])],
2107               [AS_VAR_COPY([ac_res], [$2])
2108                AC_MSG_RESULT([$ac_res])])dnl
2111 # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
2112 #                     [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
2113 # --------------------------------------------------------------
2114 AC_DEFUN([_AC_CACHE_CHECK_INT],
2115 [AC_CACHE_CHECK([$1], [$2],
2116    [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
2117 ])# _AC_CACHE_CHECK_INT
2121 ## ---------------------- ##
2122 ## Defining CPP symbols.  ##
2123 ## ---------------------- ##
2126 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
2127 # -------------------------------------------
2128 # Used by --trace to collect the list of AC_DEFINEd macros.
2129 m4_define([AC_DEFINE_TRACE_LITERAL],
2130 [m4_pattern_allow([^$1$])dnl
2131 AS_IDENTIFIER_IF([$1], [],
2132   [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
2133 ])# AC_DEFINE_TRACE_LITERAL
2136 # AC_DEFINE_TRACE(CPP-SYMBOL)
2137 # ---------------------------
2138 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
2139 # out non literal symbols.  CPP-SYMBOL must not include any parameters.
2140 m4_define([AC_DEFINE_TRACE],
2141 [AS_LITERAL_WORD_IF([$1], [AC_DEFINE_TRACE_LITERAL(_m4_expand([$1]))])])
2144 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2145 # -------------------------------------------
2146 # Set VARIABLE to VALUE, verbatim, or 1.  Remember the value
2147 # and if VARIABLE is affected the same VALUE, do nothing, else
2148 # die.  The third argument is used by autoheader.
2149 m4_define([AC_DEFINE], [_AC_DEFINE_Q([_$0], $@)])
2151 # _AC_DEFINE(STRING)
2152 # ------------------
2153 # Append the pre-expanded STRING and a newline to confdefs.h, as if by
2154 # a quoted here-doc.
2155 m4_define([_AC_DEFINE],
2156 [AS_ECHO(["AS_ESCAPE([[$1]])"]) >>confdefs.h])
2159 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2160 # ----------------------------------------------------
2161 # Similar, but perform shell substitutions $ ` \ once on VALUE, as
2162 # in an unquoted here-doc.
2163 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([_$0], $@)])
2165 # _AC_DEFINE_UNQUOTED(STRING)
2166 # ---------------------------
2167 # Append the pre-expanded STRING and a newline to confdefs.h, as if
2168 # with an unquoted here-doc, but avoiding a fork in the common case of
2169 # no backslash, no command substitution, no complex variable
2170 # substitution, and no quadrigraphs.
2171 m4_define([_AC_DEFINE_UNQUOTED],
2172 [m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\${\|@]), [-1],
2173        [AS_ECHO(["AS_ESCAPE([$1], [""])"]) >>confdefs.h],
2174        [cat >>confdefs.h <<_ACEOF
2175 [$1]
2176 _ACEOF])])
2179 # _AC_DEFINE_Q(MACRO, VARIABLE, [VALUE], [DESCRIPTION])
2180 # -----------------------------------------------------
2181 # Internal function that performs common elements of AC_DEFINE{,_UNQUOTED}.
2182 # MACRO must take one argument, which is the fully expanded string to
2183 # append to confdefs.h as if by a possibly-quoted here-doc.
2185 # m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so we use
2186 # m4_format rather than regex to grab prefix up to first ().  AC_name
2187 # is defined with over-quotation, so that we can avoid m4_defn; this
2188 # is only safe because the name should not contain $.
2190 # Guarantee a match in m4_index, so as to avoid a bug with precision
2191 # -1 in m4_format in older m4.
2192 m4_define([_AC_DEFINE_Q],
2193 [m4_pushdef([AC_name], m4_format([[[%.*s]]], m4_index([$2(], [(]), [$2]))]dnl
2194 [AC_DEFINE_TRACE(AC_name)]dnl
2195 [m4_cond([m4_index([$3], [
2196 ])], [-1], [],
2197         [m4_bregexp([[$3]], [[^\\]
2198 ], [-])], [], [],
2199         [m4_warn([syntax], [AC_DEFINE]m4_if([$1], [_AC_DEFINE], [],
2200   [[_UNQUOTED]])[: `$3' is not a valid preprocessor define value])])]dnl
2201 [m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4])
2202 ])_m4_popdef([AC_name])]dnl
2203 [$1(m4_expand([[@%:@define] $2 ]m4_if([$#], 2, 1,
2204   [$3], [], [/**/], [[$3]])))
2209 ## -------------------------- ##
2210 ## Setting output variables.  ##
2211 ## -------------------------- ##
2214 # AC_SUBST_TRACE(VARIABLE)
2215 # ------------------------
2216 # This macro is used with --trace to collect the list of substituted variables.
2217 m4_define([AC_SUBST_TRACE])
2220 # AC_SUBST(VARIABLE, [VALUE])
2221 # ---------------------------
2222 # Create an output variable from a shell VARIABLE.  If VALUE is given
2223 # assign it to VARIABLE.  Use `""' if you want to set VARIABLE to an
2224 # empty value, not an empty second argument.
2226 m4_define([AC_SUBST],
2227 [AS_IDENTIFIER_IF([$1], [],
2228   [m4_fatal([$0: `$1' is not a valid shell variable name])])]dnl
2229 [AC_SUBST_TRACE([$1])]dnl
2230 [m4_pattern_allow([^$1$])]dnl
2231 [m4_ifvaln([$2], [[$1]=$2])[]]dnl
2232 [m4_set_add([_AC_SUBST_VARS], [$1])])# AC_SUBST
2235 # AC_SUBST_FILE(VARIABLE)
2236 # -----------------------
2237 # Read the comments of the preceding macro.
2238 m4_define([AC_SUBST_FILE],
2239 [m4_pattern_allow([^$1$])dnl
2240 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2241 ])])
2245 ## --------------------------------------- ##
2246 ## Printing messages at autoconf runtime.  ##
2247 ## --------------------------------------- ##
2249 # In fact, I think we should promote the use of m4_warn and m4_fatal
2250 # directly.  This will also avoid to some people to get it wrong
2251 # between AC_FATAL and AC_MSG_ERROR.
2254 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2255 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2256 # --------------------------------
2257 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2258 m4_define([AC_FATAL],    [m4_fatal($@)])
2261 # AC_WARNING(MESSAGE)
2262 # -------------------
2263 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2264 # specified.
2265 m4_define([AC_WARNING],
2266 [AC_DIAGNOSE([syntax], [$1])])
2271 ## ---------------------------------------- ##
2272 ## Printing messages at configure runtime.  ##
2273 ## ---------------------------------------- ##
2276 # AC_MSG_CHECKING(FEATURE)
2277 # ------------------------
2278 m4_define([AC_MSG_CHECKING],
2279 [{ _AS_ECHO_LOG([checking $1])
2280 _AS_ECHO_N([checking $1... ]); }dnl
2284 # AC_MSG_RESULT(RESULT)
2285 # ---------------------
2286 m4_define([AC_MSG_RESULT],
2287 [{ _AS_ECHO_LOG([result: $1])
2288 _AS_ECHO([$1]); }dnl
2292 # AC_MSG_WARN(PROBLEM)
2293 # AC_MSG_NOTICE(STRING)
2294 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2295 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2296 # ----------------------------------------
2297 m4_copy([AS_WARN],    [AC_MSG_WARN])
2298 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2299 m4_copy([AS_ERROR],   [AC_MSG_ERROR])
2300 m4_define([AC_MSG_FAILURE],
2301 [{ AS_MESSAGE([error: in `$ac_pwd':], 2)
2302 AC_MSG_ERROR([$1
2303 See `config.log' for more details], [$2]); }])
2306 # _AC_MSG_LOG_CONFTEST
2307 # --------------------
2308 m4_define([_AC_MSG_LOG_CONFTEST],
2309 [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
2310 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2314 # AU::AC_CHECKING(FEATURE)
2315 # ------------------------
2316 AU_DEFUN([AC_CHECKING],
2317 [AS_MESSAGE([checking $1...])])
2320 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2321 # ----------------------------------
2322 # No escaping, so it performed also backtick substitution.
2323 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2324 [_AS_ECHO_UNQUOTED([$as_me:${as_lineno-$LINENO}: result: $1], AS_MESSAGE_LOG_FD)
2325 _AS_ECHO_UNQUOTED([$1])[]dnl
2329 # AU::AC_VERBOSE(STRING)
2330 # ----------------------
2331 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2338 ## ---------------------------- ##
2339 ## Compiler-running mechanics.  ##
2340 ## ---------------------------- ##
2343 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2344 # ----------------------------------
2345 # Eval COMMAND, save the exit status in ac_status, and log it.  The return
2346 # code is 0 if COMMAND succeeded, so that it can be used directly in AS_IF
2347 # constructs.
2348 AC_DEFUN([_AC_RUN_LOG],
2349 [{ { $2; } >&AS_MESSAGE_LOG_FD
2350   ($1) 2>&AS_MESSAGE_LOG_FD
2351   ac_status=$?
2352   _AS_ECHO_LOG([\$? = $ac_status])
2353   test $ac_status = 0; }])
2356 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2357 # -----------------------------------------
2358 # Run COMMAND, save its stderr into conftest.err, save the exit status
2359 # in ac_status, and log it.  Don't forget to clean up conftest.err after
2360 # use.
2361 # Note that when tracing, most shells will leave the traces in stderr
2362 # starting with "+": that's what this macro tries to address.
2363 # The return code is 0 if COMMAND succeeded, so that it can be used directly
2364 # in AS_IF constructs.
2365 AC_DEFUN([_AC_RUN_LOG_STDERR],
2366 [{ { $2; } >&AS_MESSAGE_LOG_FD
2367   ($1) 2>conftest.err
2368   ac_status=$?
2369   if test -s conftest.err; then
2370     grep -v '^ *+' conftest.err >conftest.er1
2371     cat conftest.er1 >&AS_MESSAGE_LOG_FD
2372     mv -f conftest.er1 conftest.err
2373   fi
2374   _AS_ECHO_LOG([\$? = $ac_status])
2375   test $ac_status = 0; }])
2378 # _AC_RUN_LOG_LIMIT(COMMAND, LOG-COMMANDS, [LINES])
2379 # -------------------------------------------------
2380 # Like _AC_RUN_LOG, but only log LINES lines from stderr,
2381 # defaulting to 10 lines.
2382 AC_DEFUN([_AC_RUN_LOG_LIMIT],
2383 [{ { $2; } >&AS_MESSAGE_LOG_FD
2384   ($1) 2>conftest.err
2385   ac_status=$?
2386   if test -s conftest.err; then
2387     sed 'm4_default([$3], [10])a\
2388 ... rest of stderr output deleted ...
2389          m4_default([$3], [10])q' conftest.err >conftest.er1
2390     cat conftest.er1 >&AS_MESSAGE_LOG_FD
2391   fi
2392   rm -f conftest.er1 conftest.err
2393   _AS_ECHO_LOG([\$? = $ac_status])
2394   test $ac_status = 0; }])
2397 # _AC_DO_ECHO(COMMAND)
2398 # --------------------
2399 # Echo COMMAND.  This is designed to be used just before evaluating COMMAND.
2400 AC_DEFUN([_AC_DO_ECHO],
2401 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2402 ])]dnl
2403 dnl If the string contains '\"', '`', or '\\', then just echo it rather
2404 dnl than expanding it.  This is a hack, but it is safer, while also
2405 dnl typically expanding simple substrings like '$CC', which is what we want.
2407 dnl Much of this macro body is quoted, to work around misuses like
2408 dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2409 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2410 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2411 dnl underquoting misuses, such as
2412 dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2413 dnl We normally wouldn't bother with this kind of workaround for invalid code
2414 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2415 dnl minimize the integration hassle.
2416 [[case "(($ac_try" in
2417   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2418   *) ac_try_echo=$ac_try;;
2419 esac
2420 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""]
2421 AS_ECHO(["$ac_try_echo"])])
2423 # _AC_DO(COMMAND)
2424 # ---------------
2425 # Eval COMMAND, save the exit status in ac_status, and log it.
2426 # For internal use only.
2427 AC_DEFUN([_AC_DO],
2428 [_AC_RUN_LOG([eval "$1"],
2429              [_AC_DO_ECHO([$1])])])
2432 # _AC_DO_STDERR(COMMAND)
2433 # ----------------------
2434 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2435 AC_DEFUN([_AC_DO_STDERR],
2436 [_AC_RUN_LOG_STDERR([eval "$1"],
2437                     [_AC_DO_ECHO([$1])])])
2440 # _AC_DO_VAR(VARIABLE)
2441 # --------------------
2442 # Evaluate "$VARIABLE", which should be a valid shell command.
2443 # The purpose of this macro is to write "configure:123: command line"
2444 # into config.log for every test run.
2445 AC_DEFUN([_AC_DO_VAR],
2446 [_AC_DO([$$1])])
2449 # _AC_DO_TOKENS(COMMAND)
2450 # ----------------------
2451 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2452 # tokens of the shell command language.
2453 AC_DEFUN([_AC_DO_TOKENS],
2454 [{ ac_try='$1'
2455   _AC_DO([$ac_try]); }])
2458 # _AC_DO_LIMIT(COMMAND, [LINES])
2459 # ------------------------------
2460 # Like _AC_DO, but limit the amount of stderr lines logged to LINES.
2461 # For internal use only.
2462 AC_DEFUN([_AC_DO_LIMIT],
2463 [_AC_RUN_LOG_LIMIT([eval "$1"],
2464                    [_AC_DO_ECHO([$1])], [$2])])
2467 # _AC_EVAL(COMMAND)
2468 # -----------------
2469 # Eval COMMAND, save the exit status in ac_status, and log it.
2470 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2471 # It is present only for backward compatibility with previous Autoconf versions.
2472 AC_DEFUN([_AC_EVAL],
2473 [_AC_RUN_LOG([eval $1],
2474              [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])])
2477 # _AC_EVAL_STDERR(COMMAND)
2478 # ------------------------
2479 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2480 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2481 # It is present only for backward compatibility with previous Autoconf versions.
2482 AC_DEFUN([_AC_EVAL_STDERR],
2483 [_AC_RUN_LOG_STDERR([eval $1],
2484                     [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])])
2487 # AC_TRY_EVAL(VARIABLE)
2488 # ---------------------
2489 # Evaluate $VARIABLE, which should be a valid shell command.
2490 # The purpose of this macro is to write "configure:123: command line"
2491 # into config.log for every test run.
2493 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2494 # undocumented, and should not be used.
2495 # They may be removed or their API changed in a future release.
2496 # Autoconf itself no longer uses these two macros; they are present
2497 # only for backward compatibility with previous versions of Autoconf.
2498 # Not every shell command will work due to problems with eval
2499 # and quoting, and the rules for exactly what does work are tricky.
2500 # Worse, due to double-expansion during evaluation, arbitrary unintended
2501 # shell commands could be executed in some situations.
2502 AC_DEFUN([AC_TRY_EVAL],
2503 [_AC_EVAL([$$1])])
2506 # AC_TRY_COMMAND(COMMAND)
2507 # -----------------------
2508 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2509 # tokens of the shell command language.
2510 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2511 AC_DEFUN([AC_TRY_COMMAND],
2512 [{ ac_try='$1'
2513   _AC_EVAL([$ac_try]); }])
2516 # AC_RUN_LOG(COMMAND)
2517 # -------------------
2518 AC_DEFUN([AC_RUN_LOG],
2519 [_AC_RUN_LOG([$1],
2520              [AS_ECHO(["$as_me:${as_lineno-$LINENO}: AS_ESCAPE([$1])"])])])
2525 ## ------------------------ ##
2526 ## Examining declarations.  ##
2527 ## ------------------------ ##
2530 # _AC_PREPROC_IFELSE_BODY
2531 # -----------------------
2532 # Shell function body for _AC_PREPROC_IFELSE.
2533 m4_define([_AC_PREPROC_IFELSE_BODY],
2534 [  AS_LINENO_PUSH([$[]1])
2535   AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) > conftest.i && {
2536          test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2537          test ! -s conftest.err
2538        }],
2539     [ac_retval=0],
2540     [_AC_MSG_LOG_CONFTEST
2541     ac_retval=1])
2542   AS_LINENO_POP
2543   AS_SET_STATUS([$ac_retval])
2544 ])# _AC_PREPROC_IFELSE_BODY
2547 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2548 # ----------------------------------------------------------------
2549 # Try to preprocess PROGRAM.
2551 # This macro can be used during the selection of a preprocessor.
2552 # eval is necessary to expand ac_cpp.
2553 AC_DEFUN([_AC_PREPROC_IFELSE],
2554 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_cpp],
2555   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_cpp], [LINENO],
2556     [Try to preprocess conftest.$ac_ext, and return whether this succeeded.])],
2557   [$0_BODY])]dnl
2558 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2559 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3])
2560 rm -f conftest.err conftest.i[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2561 ])# _AC_PREPROC_IFELSE
2563 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2564 # ---------------------------------------------------------------
2565 # Try to preprocess PROGRAM.  Requires that the preprocessor for the
2566 # current language was checked for, hence do not use this macro in macros
2567 # looking for a preprocessor.
2568 AC_DEFUN([AC_PREPROC_IFELSE],
2569 [AC_LANG_PREPROC_REQUIRE()dnl
2570 _AC_PREPROC_IFELSE($@)])
2573 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2574 # ---------------------------------------------------------
2575 # AC_TRY_CPP is used to check whether particular header files exist.
2576 # (But it actually tests whether INCLUDES produces no CPP errors.)
2578 # INCLUDES are not defaulted and are double quoted.
2579 AU_DEFUN([AC_TRY_CPP],
2580 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2583 # AC_EGREP_CPP(PATTERN, PROGRAM,
2584 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2585 # ------------------------------------------------------
2586 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2587 # come early, it is not included in AC_BEFORE checks.
2588 AC_DEFUN([AC_EGREP_CPP],
2589 [AC_LANG_PREPROC_REQUIRE()dnl
2590 AC_REQUIRE([AC_PROG_EGREP])dnl
2591 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2592 AS_IF([dnl eval is necessary to expand ac_cpp.
2593 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2594 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2595 dnl Quote $1 to prevent m4 from eating character classes
2596   $EGREP "[$1]" >/dev/null 2>&1],
2597   [$3],
2598   [$4])
2599 rm -rf conftest*
2600 ])# AC_EGREP_CPP
2603 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2604 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2605 # ---------------------------------------------------------
2606 AC_DEFUN([AC_EGREP_HEADER],
2607 [AC_EGREP_CPP([$1],
2608 [#include <$2>
2609 ], [$3], [$4])])
2614 ## ------------------ ##
2615 ## Examining syntax.  ##
2616 ## ------------------ ##
2618 # _AC_COMPILE_IFELSE_BODY
2619 # -----------------------
2620 # Shell function body for _AC_COMPILE_IFELSE.
2621 m4_define([_AC_COMPILE_IFELSE_BODY],
2622 [  AS_LINENO_PUSH([$[]1])
2623   rm -f conftest.$ac_objext
2624   AS_IF([_AC_DO_STDERR($ac_compile) && {
2625          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2626          test ! -s conftest.err
2627        } && test -s conftest.$ac_objext],
2628       [ac_retval=0],
2629       [_AC_MSG_LOG_CONFTEST
2630         ac_retval=1])
2631   AS_LINENO_POP
2632   AS_SET_STATUS([$ac_retval])
2633 ])# _AC_COMPILE_IFELSE_BODY
2636 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2637 # ----------------------------------------------------------------
2638 # Try to compile PROGRAM.
2639 # This macro can be used during the selection of a compiler.
2640 AC_DEFUN([_AC_COMPILE_IFELSE],
2641 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_compile],
2642   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_compile], [LINENO],
2643     [Try to compile conftest.$ac_ext, and return whether this succeeded.])],
2644   [$0_BODY])]dnl
2645 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2646 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3])
2647 rm -f core conftest.err conftest.$ac_objext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2648 ])# _AC_COMPILE_IFELSE
2651 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2652 # ---------------------------------------------------------------
2653 # Try to compile PROGRAM.  Requires that the compiler for the current
2654 # language was checked for, hence do not use this macro in macros looking
2655 # for a compiler.
2656 AC_DEFUN([AC_COMPILE_IFELSE],
2657 [AC_LANG_COMPILER_REQUIRE()dnl
2658 _AC_COMPILE_IFELSE($@)])
2661 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2662 #                [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2663 # ---------------------------------------------------
2664 AU_DEFUN([AC_TRY_COMPILE],
2665 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2669 ## --------------------- ##
2670 ## Examining libraries.  ##
2671 ## --------------------- ##
2674 # _AC_LINK_IFELSE_BODY
2675 # --------------------
2676 # Shell function body for _AC_LINK_IFELSE.
2677 m4_define([_AC_LINK_IFELSE_BODY],
2678 [  AS_LINENO_PUSH([$[]1])
2679   rm -f conftest.$ac_objext conftest$ac_exeext
2680   AS_IF([_AC_DO_STDERR($ac_link) && {
2681          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2682          test ! -s conftest.err
2683        } && test -s conftest$ac_exeext && {
2684          test "$cross_compiling" = yes ||
2685          AS_TEST_X([conftest$ac_exeext])
2686        }],
2687       [ac_retval=0],
2688       [_AC_MSG_LOG_CONFTEST
2689         ac_retval=1])
2690   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2691   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2692   # interfere with the next link command; also delete a directory that is
2693   # left behind by Apple's compiler.  We do this before executing the actions.
2694   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2695   AS_LINENO_POP
2696   AS_SET_STATUS([$ac_retval])
2697 ])# _AC_LINK_IFELSE_BODY
2700 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2701 # -------------------------------------------------------------
2702 # Try to link PROGRAM.
2703 # This macro can be used during the selection of a compiler.
2705 # Test that resulting file is executable; see the problem reported by mwoehlke
2706 # in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
2707 # But skip the test when cross-compiling, to prevent problems like the one
2708 # reported by Chris Johns in
2709 # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
2711 AC_DEFUN([_AC_LINK_IFELSE],
2712 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_link],
2713   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_link], [LINENO],
2714     [Try to link conftest.$ac_ext, and return whether this succeeded.])],
2715   [$0_BODY])]dnl
2716 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2717 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_link "$LINENO"], [$2], [$3])
2718 rm -f core conftest.err conftest.$ac_objext \
2719     conftest$ac_exeext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2720 ])# _AC_LINK_IFELSE
2723 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2724 # ------------------------------------------------------------
2725 # Try to link PROGRAM.  Requires that the compiler for the current
2726 # language was checked for, hence do not use this macro in macros looking
2727 # for a compiler.
2728 AC_DEFUN([AC_LINK_IFELSE],
2729 [AC_LANG_COMPILER_REQUIRE()dnl
2730 _AC_LINK_IFELSE($@)])
2733 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2734 #             [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2735 # ------------------------------------------------
2736 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2737 AU_DEFUN([AC_TRY_LINK],
2738 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2741 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2742 #                  ACTION-IF-TRUE, [ACTION-IF-FALSE])
2743 # ---------------------------------------------------
2744 AU_DEFUN([AC_COMPILE_CHECK],
2745 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2746 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2751 ## ------------------------------- ##
2752 ## Checking for runtime features.  ##
2753 ## ------------------------------- ##
2756 # _AC_RUN_IFELSE_BODY
2757 # -------------------
2758 # Shell function body for _AC_RUN_IFELSE.
2759 m4_define([_AC_RUN_IFELSE_BODY],
2760 [  AS_LINENO_PUSH([$[]1])
2761   AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2762       [ac_retval=0],
2763       [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
2764        _AC_MSG_LOG_CONFTEST
2765        ac_retval=$ac_status])
2766   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2767   AS_LINENO_POP
2768   AS_SET_STATUS([$ac_retval])
2769 ])# _AC_RUN_IFELSE_BODY
2772 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2773 # ------------------------------------------------------------
2774 # Compile, link, and run.
2775 # This macro can be used during the selection of a compiler.
2776 # We also remove conftest.o as if the compilation fails, some compilers
2777 # don't remove it.  We remove gmon.out and bb.out, which may be
2778 # created during the run if the program is built with profiling support.
2779 AC_DEFUN([_AC_RUN_IFELSE],
2780 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_run],
2781   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_run], [LINENO],
2782     [Try to run conftest.$ac_ext, and return whether this succeeded.
2783      Assumes that executables *can* be run.])],
2784   [$0_BODY])]dnl
2785 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2786 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_run "$LINENO"], [$2], [$3])
2787 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2788   conftest.$ac_objext conftest.beam[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2789 ])# _AC_RUN_IFELSE
2791 # AC_RUN_IFELSE(PROGRAM,
2792 #               [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2793 #               [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2794 # ----------------------------------------------------------
2795 # Compile, link, and run. Requires that the compiler for the current
2796 # language was checked for, hence do not use this macro in macros looking
2797 # for a compiler.
2798 AC_DEFUN([AC_RUN_IFELSE],
2799 [AC_LANG_COMPILER_REQUIRE()dnl
2800 m4_ifval([$4], [],
2801          [AC_DIAGNOSE([cross],
2802                      [$0 called without default to allow cross compiling])])dnl
2803 AS_IF([test "$cross_compiling" = yes],
2804   [m4_default([$4],
2805            [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2806   [_AC_RUN_IFELSE($@)])
2810 # AC_TRY_RUN(PROGRAM,
2811 #            [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2812 #            [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2813 # -------------------------------------------------------
2814 AU_DEFUN([AC_TRY_RUN],
2815 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2819 ## ------------------------------------- ##
2820 ## Checking for the existence of files.  ##
2821 ## ------------------------------------- ##
2823 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2824 # -------------------------------------------------------------
2826 # Check for the existence of FILE.
2827 AC_DEFUN([AC_CHECK_FILE],
2828 [AC_DIAGNOSE([cross],
2829              [cannot check for file existence when cross compiling])dnl
2830 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2831 AC_CACHE_CHECK([for $1], [ac_File],
2832 [test "$cross_compiling" = yes &&
2833   AC_MSG_ERROR([cannot check for file existence when cross compiling])
2834 if test -r "$1"; then
2835   AS_VAR_SET([ac_File], [yes])
2836 else
2837   AS_VAR_SET([ac_File], [no])
2838 fi])
2839 AS_VAR_IF([ac_File], [yes], [$2], [$3])
2840 AS_VAR_POPDEF([ac_File])dnl
2841 ])# AC_CHECK_FILE
2844 # _AC_CHECK_FILES(FILE)
2845 # ---------------------
2846 # Helper to AC_CHECK_FILES, which generates two of the three arguments
2847 # to AC_CHECK_FILE based on FILE.
2848 m4_define([_AC_CHECK_FILES],
2849 [[$1], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
2850   [Define to 1 if you have the file `$1'.])]])
2853 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2854 # -----------------------------------------------------------------
2855 # For each word in the whitespace-separated FILE list, perform either
2856 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.  For files that exist, also
2857 # provide the preprocessor variable HAVE_FILE.
2858 AC_DEFUN([AC_CHECK_FILES],
2859 [m4_map_args_w([$1], [AC_CHECK_FILE(_$0(], [)[$2], [$3])])])
2862 ## ------------------------------- ##
2863 ## Checking for declared symbols.  ##
2864 ## ------------------------------- ##
2867 # _AC_UNDECLARED_WARNING
2868 # ----------------------
2869 # Set ac_[]_AC_LANG_ABBREV[]_decl_warn_flag=yes if the compiler uses a warning,
2870 # not a more-customary error, to report some undeclared identifiers.  Fail when
2871 # an affected compiler warns also on valid input.  _AC_PROG_PREPROC_WORKS_IFELSE
2872 # solves a related problem.
2873 AC_DEFUN([_AC_UNDECLARED_WARNING],
2874 [# The Clang compiler raises a warning for an undeclared identifier that matches
2875 # a compiler builtin function.  All extant Clang versions are affected, as of
2876 # Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
2877 # C and Objective C languages, but Clang does report an error under C++ and
2878 # Objective C++.
2880 # Passing -fno-builtin to the compiler would suppress this problem.  That
2881 # strategy would have the advantage of being insensitive to stray warnings, but
2882 # it would make tests less realistic.
2883 AC_CACHE_CHECK([how $[]_AC_CC[] reports undeclared, standard C functions],
2884 [ac_cv_[]_AC_LANG_ABBREV[]_decl_report],
2885 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [(void) strchr;])],
2886   [AS_IF([test -s conftest.err], [dnl
2887     # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
2888     # valid AC_CHECK_DECL input.  No library function is consistently available
2889     # on freestanding implementations, so test against a dummy declaration.
2890     # Include always-available headers on the off chance that they somehow
2891     # elicit warnings.
2892     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([dnl
2893 #include <float.h>
2894 #include <limits.h>
2895 #include <stdarg.h>
2896 #include <stddef.h>
2897 extern void ac_decl (int, char *);],
2898 [@%:@ifdef __cplusplus
2899   (void) ac_decl ((int) 0, (char *) 0);
2900   (void) ac_decl;
2901 @%:@else
2902   (void) ac_decl;
2903 @%:@endif
2904 ])],
2905       [AS_IF([test -s conftest.err],
2906         [AC_MSG_FAILURE([cannot detect from compiler exit status or warnings])],
2907         [ac_cv_[]_AC_LANG_ABBREV[]_decl_report=warning])],
2908       [AC_MSG_FAILURE([cannot compile a simple declaration test])])],
2909     [AC_MSG_FAILURE([compiler does not report undeclared identifiers])])],
2910   [ac_cv_[]_AC_LANG_ABBREV[]_decl_report=error])])
2912 case $ac_cv_[]_AC_LANG_ABBREV[]_decl_report in
2913   warning) ac_[]_AC_LANG_ABBREV[]_decl_warn_flag=yes ;;
2914   *) ac_[]_AC_LANG_ABBREV[]_decl_warn_flag= ;;
2915 esac
2916 ])# _AC_UNDECLARED_WARNING
2918 # _AC_CHECK_DECL_BODY
2919 # -------------------
2920 # Shell function body for AC_CHECK_DECL.
2921 m4_define([_AC_CHECK_DECL_BODY],
2922 [  AS_LINENO_PUSH([$[]1])
2923   # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2924   AC_DEFUN([_AC_UNDECLARED_WARNING_]_AC_LANG_ABBREV,
2925            [_AC_UNDECLARED_WARNING])dnl
2926   AC_REQUIRE([_AC_UNDECLARED_WARNING_]_AC_LANG_ABBREV)dnl
2927   [as_decl_name=`echo $][2|sed 's/ *(.*//'`]
2928   [as_decl_use=`echo $][2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`]
2929   AC_CACHE_CHECK([whether $as_decl_name is declared], [$[]3],
2930   [ac_save_werror_flag=$ac_[]_AC_LANG_ABBREV[]_werror_flag
2931   ac_[]_AC_LANG_ABBREV[]_werror_flag="$ac_[]_AC_LANG_ABBREV[]_decl_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag"
2932   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]4],
2933 [@%:@ifndef $[]as_decl_name
2934 @%:@ifdef __cplusplus
2935   (void) $[]as_decl_use;
2936 @%:@else
2937   (void) $[]as_decl_name;
2938 @%:@endif
2939 @%:@endif
2940 ])],
2941                    [AS_VAR_SET([$[]3], [yes])],
2942                    [AS_VAR_SET([$[]3], [no])])])
2943   ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_save_werror_flag
2944   AS_LINENO_POP
2945 ])# _AC_CHECK_DECL_BODY
2947 # AC_CHECK_DECL(SYMBOL,
2948 #               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2949 #               [INCLUDES = DEFAULT-INCLUDES])
2950 # -------------------------------------------------------
2951 # Check whether SYMBOL (a function, variable, or constant) is declared.
2952 AC_DEFUN([AC_CHECK_DECL],
2953 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_decl],
2954   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_decl],
2955     [LINENO SYMBOL VAR INCLUDES],
2956     [Tests whether SYMBOL is declared in INCLUDES, setting cache variable
2957      VAR accordingly.])],
2958   [_$0_BODY])]dnl
2959 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])]dnl
2960 [ac_fn_[]_AC_LANG_ABBREV[]_check_decl ]dnl
2961 ["$LINENO" "$1" "ac_Symbol" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
2962 AS_VAR_IF([ac_Symbol], [yes], [$2], [$3])
2963 AS_VAR_POPDEF([ac_Symbol])dnl
2964 ])# AC_CHECK_DECL
2967 # _AC_CHECK_DECLS(SYMBOL, ACTION-IF_FOUND, ACTION-IF-NOT-FOUND,
2968 #                 INCLUDES)
2969 # -------------------------------------------------------------
2970 # Helper to AC_CHECK_DECLS, which generates the check for a single
2971 # SYMBOL with INCLUDES, performs the AC_DEFINE, then expands
2972 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.
2973 m4_define([_AC_CHECK_DECLS],
2974 [AC_CHECK_DECL([$1], [ac_have_decl=1], [ac_have_decl=0], [$4])]dnl
2975 [AC_DEFINE_UNQUOTED(AS_TR_CPP(m4_bpatsubst(HAVE_DECL_[$1],[ *(.*])),
2976   [$ac_have_decl],
2977   [Define to 1 if you have the declaration of `$1',
2978    and to 0 if you don't.])]dnl
2979 [m4_ifvaln([$2$3], [AS_IF([test $ac_have_decl = 1], [$2], [$3])])])
2981 # AC_CHECK_DECLS(SYMBOLS,
2982 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2983 #                [INCLUDES = DEFAULT-INCLUDES])
2984 # --------------------------------------------------------
2985 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
2986 # documentation for a detailed explanation of this difference with
2987 # other AC_CHECK_*S macros.  SYMBOLS is an m4 list.
2988 AC_DEFUN([AC_CHECK_DECLS],
2989 [m4_map_args_sep([_$0(], [, [$2], [$3], [$4])], [], $1)])
2992 # _AC_CHECK_DECL_ONCE(SYMBOL)
2993 # ---------------------------
2994 # Check for a single SYMBOL once.
2995 m4_define([_AC_CHECK_DECL_ONCE],
2996 [AC_DEFUN([_AC_Check_Decl_$1], [_AC_CHECK_DECLS([$1])])]dnl
2997 [AC_REQUIRE([_AC_Check_Decl_$1])])
2999 # AC_CHECK_DECLS_ONCE(SYMBOLS)
3000 # ----------------------------
3001 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
3002 AC_DEFUN([AC_CHECK_DECLS_ONCE],
3003 [m4_map_args_sep([_AC_CHECK_DECL_ONCE(], [)], [], $1)])
3007 ## ---------------------------------- ##
3008 ## Replacement of library functions.  ##
3009 ## ---------------------------------- ##
3012 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
3013 # -----------------------------
3014 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
3015 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
3016 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
3019 # AC_LIBSOURCE(FILE-NAME)
3020 # -----------------------
3021 # Announce we might need the file `FILE-NAME'.
3022 m4_define([AC_LIBSOURCE], [])
3025 # AC_LIBSOURCES([FILE-NAME1, ...])
3026 # --------------------------------
3027 # Announce we might need these files.
3028 AC_DEFUN([AC_LIBSOURCES],
3029 [m4_map_args([AC_LIBSOURCE], $1)])
3032 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
3033 # --------------------------------------------
3034 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
3035 m4_define([_AC_LIBOBJ],
3036 [case " $LIB@&t@OBJS " in
3037   *" $1.$ac_objext "* ) ;;
3038   *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
3039 esac
3043 # AC_LIBOBJ(FILE-NAME-NOEXT)
3044 # --------------------------
3045 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
3046 AC_DEFUN([AC_LIBOBJ],
3047 [_AC_LIBOBJ([$1])]dnl
3048 [AS_LITERAL_WORD_IF([$1], [AC_LIBSOURCE([$1.c])],
3049   [AC_DIAGNOSE([syntax], [$0($1): you should use literals])])])
3052 # _AC_LIBOBJS_NORMALIZE
3053 # ---------------------
3054 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
3055 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
3056 # Used with AC_CONFIG_COMMANDS_PRE.
3057 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
3058 [ac_libobjs=
3059 ac_ltlibobjs=
3060 m4_ifndef([AM_C_PROTOTYPES], [U=
3061 ])dnl
3062 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
3063   # 1. Remove the extension, and $U if already installed.
3064   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
3065   ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
3066   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
3067   #    will be set to the directory where LIBOBJS objects are built.
3068   AS_VAR_APPEND([ac_libobjs], [" \${LIBOBJDIR}$ac_i\$U.$ac_objext"])
3069   AS_VAR_APPEND([ac_ltlibobjs], [" \${LIBOBJDIR}$ac_i"'$U.lo'])
3070 done
3071 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
3072 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
3076 ## ----------------------------------- ##
3077 ## Checking compiler characteristics.  ##
3078 ## ----------------------------------- ##
3081 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS],
3082 #                         [IF-FAILURE])
3083 # ---------------------------------------------------------------------
3084 # Compute the integer EXPRESSION and store the result in the VARIABLE.
3085 # Works OK if cross compiling, but assumes twos-complement arithmetic.
3086 m4_define([_AC_COMPUTE_INT_COMPILE],
3087 [# Depending upon the size, compute the lo and hi bounds.
3088 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
3089  [ac_lo=0 ac_mid=0
3090   while :; do
3091     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
3092                        [ac_hi=$ac_mid; break],
3093                        [AS_VAR_ARITH([ac_lo], [$ac_mid + 1])
3094                         if test $ac_lo -le $ac_mid; then
3095                           ac_lo= ac_hi=
3096                           break
3097                         fi
3098                         AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid + 1])])
3099   done],
3100 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
3101  [ac_hi=-1 ac_mid=-1
3102   while :; do
3103     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
3104                        [ac_lo=$ac_mid; break],
3105                        [AS_VAR_ARITH([ac_hi], ['(' $ac_mid ')' - 1])
3106                         if test $ac_mid -le $ac_hi; then
3107                           ac_lo= ac_hi=
3108                           break
3109                         fi
3110                         AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid])])
3111   done],
3112  [ac_lo= ac_hi=])])
3113 # Binary search between lo and hi bounds.
3114 while test "x$ac_lo" != "x$ac_hi"; do
3115   AS_VAR_ARITH([ac_mid], ['(' $ac_hi - $ac_lo ')' / 2 + $ac_lo])
3116   _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
3117                      [ac_hi=$ac_mid],
3118                      [AS_VAR_ARITH([ac_lo], ['(' $ac_mid ')' + 1])])
3119 done
3120 case $ac_lo in @%:@((
3121 ?*) AS_VAR_SET([$2], [$ac_lo]); $4 ;;
3122 '') $5 ;;
3123 esac[]dnl
3124 ])# _AC_COMPUTE_INT_COMPILE
3127 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS],
3128 #                     [IF-FAILURE])
3129 # -----------------------------------------------------------------
3130 # Store the evaluation of the integer EXPRESSION in VARIABLE.
3132 # AC_LANG_INT_SAVE intentionally does not end the file in a newline, so
3133 # we must add one to make it a text file before passing it to read.
3134 m4_define([_AC_COMPUTE_INT_RUN],
3135 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
3136                 [echo >>conftest.val; read $2 <conftest.val; $4], [$5])
3137 rm -f conftest.val
3138 ])# _AC_COMPUTE_INT_RUN
3141 # _AC_COMPUTE_INT_BODY
3142 # --------------------
3143 # Shell function body for AC_COMPUTE_INT.
3144 m4_define([_AC_COMPUTE_INT_BODY],
3145 [  AS_LINENO_PUSH([$[]1])
3146   if test "$cross_compiling" = yes; then
3147     _AC_COMPUTE_INT_COMPILE([$[]2], [$[]3], [$[]4],
3148                             [ac_retval=0], [ac_retval=1])
3149   else
3150     _AC_COMPUTE_INT_RUN([$[]2], [$[]3], [$[]4],
3151                         [ac_retval=0], [ac_retval=1])
3152   fi
3153   AS_LINENO_POP
3154   AS_SET_STATUS([$ac_retval])
3155 ])# _AC_COMPUTE_INT_BODY
3157 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
3158 # ----------------------------------------------------------
3159 # Store into the shell variable VARIABLE the value of the integer C expression
3160 # EXPRESSION.  The value should fit in an initializer in a C variable of type
3161 # `signed long'.  If no PROLOGUE are specified, the default includes are used.
3162 # IF-FAILS is evaluated if the value cannot be found (which includes the
3163 # case of cross-compilation, if EXPRESSION is not computable at compile-time.
3164 AC_DEFUN([AC_COMPUTE_INT],
3165 [AC_LANG_COMPILER_REQUIRE()]dnl
3166 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_compute_int],
3167   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_compute_int],
3168     [LINENO EXPR VAR INCLUDES],
3169     [Tries to find the compile-time value of EXPR in a program that includes
3170      INCLUDES, setting VAR accordingly.  Returns whether the value could
3171      be computed])],
3172     [_$0_BODY])]dnl
3173 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_compute_int "$LINENO" "$2" "$1" ]dnl
3174        ["AS_ESCAPE([$3], [""])"],
3175        [], [$4])
3176 ])# AC_COMPUTE_INT
3178 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
3179 # -----------------------------------------------------------
3180 # FIXME: this private interface was used by several packages.
3181 # Give them time to transition to AC_COMPUTE_INT and then delete this one.
3182 AC_DEFUN([_AC_COMPUTE_INT],
3183 [AC_COMPUTE_INT([$2], [$1], [$3], [$4])
3184 AC_DIAGNOSE([obsolete],
3185 [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
3186 future version or Autoconf.  Hence, it is suggested that you use
3187 instead the public AC_COMPUTE_INT macro.  Note that the arguments are
3188 slightly different between the two.])dnl
3189 ])# _AC_COMPUTE_INT