* lib/autoconf/general.m4 (AC_SITE_LOAD): Do not overwrite "$@"
[autoconf.git] / lib / autoconf / general.m4
blob6350a56d2fda888bee707d790bcf91e55aa7f869
1 # This file is part of Autoconf.                       -*- Autoconf -*-
2 # Parameterized macros.
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
4 # 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 # As a special exception, the Free Software Foundation gives unlimited
20 # permission to copy, distribute and modify the configure scripts that
21 # are the output of Autoconf.  You need not follow the terms of the GNU
22 # General Public License when using or distributing such scripts, even
23 # though portions of the text of Autoconf appear in them.  The GNU
24 # General Public License (GPL) does govern all other use of the material
25 # that constitutes the Autoconf program.
27 # Certain portions of the Autoconf source text are designed to be copied
28 # (in certain cases, depending on the input) into the output of
29 # Autoconf.  We call these the "data" portions.  The rest of the Autoconf
30 # source text consists of comments plus executable code that decides which
31 # of the data portions to output in any given case.  We call these
32 # comments and executable code the "non-data" portions.  Autoconf never
33 # copies any of the non-data portions into its output.
35 # This special exception to the GPL applies to versions of Autoconf
36 # released by the Free Software Foundation.  When you make and
37 # distribute a modified version of Autoconf, you may extend this special
38 # exception to the GPL to apply to your modified version as well, *unless*
39 # your modified version has the potential to copy into its output some
40 # of the text that was the non-data portion of the version that you started
41 # with.  (In other words, unless your change moves or copies text from
42 # the non-data portions to the data portions.)  If your modification has
43 # such potential, you must delete any notice of this special exception
44 # to the GPL from your modified version.
46 # Written by David MacKenzie, with help from
47 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
48 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
51 ## ---------------- ##
52 ## The diversions.  ##
53 ## ---------------- ##
56 # We heavily use m4's diversions both for the initializations and for
57 # required macros (see AC_REQUIRE), because in both cases we have to
58 # issue high in `configure' something which is discovered late.
60 # KILL is only used to suppress output.
62 # The layers of `configure'.  We let m4 undivert them by itself, when
63 # it reaches the end of `configure.ac'.
65 # - BINSH
66 #   #! /bin/sh
67 # - HEADER-REVISION
68 #   Sent by AC_REVISION
69 # - HEADER-COMMENT
70 #   Purpose of the script.
71 # - HEADER-COPYRIGHT
72 #   Copyright notice(s)
73 # - M4SH-INIT
74 #   Initialization of bottom layers.
76 # - DEFAULTS
77 #   early initializations (defaults)
78 # - PARSE_ARGS
79 #   initialization code, option handling loop.
81 # - HELP_BEGIN
82 #   Handling `configure --help'.
83 # - HELP_CANON
84 #   Help msg for AC_CANONICAL_*
85 # - HELP_ENABLE
86 #   Help msg from AC_ARG_ENABLE.
87 # - HELP_WITH
88 #   Help msg from AC_ARG_WITH.
89 # - HELP_VAR
90 #   Help msg from AC_ARG_VAR.
91 # - HELP_VAR_END
92 #   A small paragraph on the use of the variables.
93 # - HELP_END
94 #   Tail of the handling of --help.
96 # - VERSION_BEGIN
97 #   Head of the handling of --version.
98 # - VERSION_FSF
99 #   FSF copyright notice for --version.
100 # - VERSION_USER
101 #   User copyright notice for --version.
102 # - VERSION_END
103 #   Tail of the handling of --version.
105 # - INIT_PREPARE
106 #   Tail of initialization code.
108 # - BODY
109 #   the tests and output code
113 # _m4_divert(DIVERSION-NAME)
114 # --------------------------
115 # Convert a diversion name into its number.  Otherwise, return
116 # DIVERSION-NAME which is supposed to be an actual diversion number.
117 # Of course it would be nicer to use m4_case here, instead of zillions
118 # of little macros, but it then takes twice longer to run `autoconf'!
120 # From M4sugar:
121 #    -1. KILL
122 # 10000. GROW
124 # From M4sh:
125 #    0. BINSH
126 #    1. HEADER-REVISION
127 #    2. HEADER-COMMENT
128 #    3. HEADER-COPYRIGHT
129 #    4. M4SH-INIT
130 # 1000. BODY
131 m4_define([_m4_divert(DEFAULTS)],        10)
132 m4_define([_m4_divert(PARSE_ARGS)],      20)
134 m4_define([_m4_divert(HELP_BEGIN)],     100)
135 m4_define([_m4_divert(HELP_CANON)],     101)
136 m4_define([_m4_divert(HELP_ENABLE)],    102)
137 m4_define([_m4_divert(HELP_WITH)],      103)
138 m4_define([_m4_divert(HELP_VAR)],       104)
139 m4_define([_m4_divert(HELP_VAR_END)],   105)
140 m4_define([_m4_divert(HELP_END)],       106)
142 m4_define([_m4_divert(VERSION_BEGIN)],  200)
143 m4_define([_m4_divert(VERSION_FSF)],    201)
144 m4_define([_m4_divert(VERSION_USER)],   202)
145 m4_define([_m4_divert(VERSION_END)],    203)
147 m4_define([_m4_divert(INIT_PREPARE)],   300)
151 # AC_DIVERT_PUSH(DIVERSION-NAME)
152 # AC_DIVERT_POP
153 # ------------------------------
154 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
155 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
159 ## ------------------------------------ ##
160 ## Defining/requiring Autoconf macros.  ##
161 ## ------------------------------------ ##
164 # AC_DEFUN(NAME, EXPANSION)
165 # AC_DEFUN_ONCE(NAME, EXPANSION)
166 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
167 # AC_REQUIRE(STRING)
168 # AC_PROVIDE(MACRO-NAME)
169 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
170 # -----------------------------------------------------------
171 m4_copy([m4_defun],       [AC_DEFUN])
172 m4_copy([m4_defun_once],  [AC_DEFUN_ONCE])
173 m4_copy([m4_before],      [AC_BEFORE])
174 m4_copy([m4_require],     [AC_REQUIRE])
175 m4_copy([m4_provide],     [AC_PROVIDE])
176 m4_copy([m4_provide_if],  [AC_PROVIDE_IFELSE])
179 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
180 # ------------------------------------------
181 m4_define([AC_OBSOLETE],
182 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
186 ## ----------------------------- ##
187 ## Implementing Autoconf loops.  ##
188 ## ----------------------------- ##
191 # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION)
192 # ------------------------------------------
193 AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]])
194 AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl
195 AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete.
196 You should run autoupdate.])])
200 ## ----------------------------------- ##
201 ## Helping macros to display strings.  ##
202 ## ----------------------------------- ##
205 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
206 # --------------------------------------
207 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
211 ## ---------------------------------------------- ##
212 ## Information on the package being Autoconf'ed.  ##
213 ## ---------------------------------------------- ##
216 # It is suggested that the macros in this section appear before
217 # AC_INIT in `configure.ac'.  Nevertheless, this is just stylistic,
218 # and from the implementation point of view, AC_INIT *must* be expanded
219 # beforehand: it puts data in diversions which must appear before the
220 # data provided by the macros of this section.
222 # The solution is to require AC_INIT in each of these macros.  AC_INIT
223 # has the needed magic so that it can't be expanded twice.
227 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
228 # --------------------------------------------------------------
229 m4_define([_AC_INIT_PACKAGE],
230 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
231 AS_LITERAL_IF([$2], [],  [m4_warn([syntax], [AC_INIT: not a literal: $2])])
232 AS_LITERAL_IF([$3], [],  [m4_warn([syntax], [AC_INIT: not a literal: $3])])
233 m4_ifndef([AC_PACKAGE_NAME],
234           [m4_define([AC_PACKAGE_NAME],     [$1])])
235 m4_ifndef([AC_PACKAGE_TARNAME],
236           [m4_define([AC_PACKAGE_TARNAME],
237                      m4_default([$4],
238                                 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
239                                                                      [GNU ])),
240                                  [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
241                                  [-])]))])
242 m4_ifndef([AC_PACKAGE_VERSION],
243           [m4_define([AC_PACKAGE_VERSION],   [$2])])
244 m4_ifndef([AC_PACKAGE_STRING],
245           [m4_define([AC_PACKAGE_STRING],    [$1 $2])])
246 m4_ifndef([AC_PACKAGE_BUGREPORT],
247           [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
251 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
252 # ------------------------------------------------------
253 # Emit TEXT, a copyright notice, in the top of `configure' and in
254 # --version output.  Macros in TEXT are evaluated once.
255 m4_define([AC_COPYRIGHT],
256 [AS_COPYRIGHT([$1])[]dnl
257 m4_divert_text(m4_default([$2], [VERSION_USER]),
259 $1])dnl
260 ])# AC_COPYRIGHT
263 # AC_REVISION(REVISION-INFO)
264 # --------------------------
265 # The second quote in the translit is just to cope with font-lock-mode
266 # which sees the opening of a string.
267 m4_define([AC_REVISION],
268 [m4_divert_text([HEADER-REVISION],
269                 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
275 ## ---------------------------------------- ##
276 ## Requirements over the Autoconf version.  ##
277 ## ---------------------------------------- ##
280 # AU::AC_PREREQ(VERSION)
281 # ----------------------
282 # Update this `AC_PREREQ' statement to require the current version of
283 # Autoconf.  But fail if ever this autoupdate is too old.
285 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
286 # calling `AU_DEFUN', i.e., it is hard coded.  Otherwise it would be
287 # quite complex for autoupdate to import the value of
288 # `m4_PACKAGE_VERSION'.  We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
289 # this would replace all its occurrences with the current version of
290 # Autoconf, which is certainly not what the user intended.
291 AU_DEFUN([AC_PREREQ],
292 [m4_version_prereq([$1])[]dnl
293 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
296 # AC_PREREQ(VERSION)
297 # ------------------
298 # Complain and exit if the Autoconf version is less than VERSION.
299 m4_copy([m4_version_prereq], [AC_PREREQ])
306 ## ---------------- ##
307 ## Initialization.  ##
308 ## ---------------- ##
311 # All the following macros are used by AC_INIT.  Ideally, they should
312 # be presented in the order in which they are output.  Please, help us
313 # sorting it, or at least, don't augment the entropy.
316 # _AC_INIT_NOTICE
317 # ---------------
318 m4_define([_AC_INIT_NOTICE],
319 [m4_divert_text([HEADER-COMMENT],
320 [@%:@ Guess values for system-dependent variables and create Makefiles.
321 @%:@ Generated by m4_PACKAGE_STRING[]dnl
322 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
324 m4_ifset([AC_PACKAGE_BUGREPORT],
325          [m4_divert_text([HEADER-COMMENT],
326                          [@%:@
327 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
331 # _AC_INIT_COPYRIGHT
332 # ------------------
333 # We dump to VERSION_FSF to make sure we are inserted before the
334 # user copyrights, and after the setup of the --version handling.
335 m4_define([_AC_INIT_COPYRIGHT],
336 [AC_COPYRIGHT(
337 [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
338 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
339 This configure script is free software; the Free Software Foundation
340 gives unlimited permission to copy, distribute and modify it.],
341               [VERSION_FSF])dnl
345 # File Descriptors
346 # ----------------
347 # Set up the file descriptors used by `configure'.
348 # File descriptor usage:
349 # 0 standard input (/dev/null)
350 # 1 file creation
351 # 2 errors and warnings
352 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
353 # AS_MESSAGE_FD checking for... messages and results
354 # AS_ORIGINAL_STDIN_FD original standard input (still open)
356 # stdin is /dev/null because checks that run programs may
357 # inadvertently run interactive ones, which would stop configuration
358 # until someone typed an EOF.
359 m4_define([AS_MESSAGE_FD], 6)
360 m4_define([AS_ORIGINAL_STDIN_FD], 7)
361 # That's how they used to be named.
362 AU_ALIAS([AC_FD_CC],  [AS_MESSAGE_LOG_FD])
363 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
366 # _AC_INIT_DEFAULTS
367 # -----------------
368 # Values which defaults can be set from `configure.ac'.
369 # `/bin/machine' is used in `glibcbug'.  The others are used in config.*
370 m4_define([_AC_INIT_DEFAULTS],
371 [m4_divert_push([DEFAULTS])dnl
373 exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1
375 # Name of the host.
376 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
377 # so uname gets run too.
378 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
381 # Initializations.
383 ac_default_prefix=/usr/local
384 ac_clean_files=
385 ac_config_libobj_dir=.
386 LIB@&t@OBJS=
387 cross_compiling=no
388 subdirs=
389 MFLAGS=
390 MAKEFLAGS=
391 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
392 AC_SUBST([PATH_SEPARATOR])dnl
394 # Identity of this package.
395 AC_SUBST([PACKAGE_NAME],
396          [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])dnl
397 AC_SUBST([PACKAGE_TARNAME],
398          [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])dnl
399 AC_SUBST([PACKAGE_VERSION],
400          [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])dnl
401 AC_SUBST([PACKAGE_STRING],
402          [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
403 AC_SUBST([PACKAGE_BUGREPORT],
404          [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
406 m4_divert_pop([DEFAULTS])dnl
407 m4_wrap([m4_divert_text([DEFAULTS],
408 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS],  [m4_defn([_AC_SUBST_VARS])])'
409 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
410 ac_user_opts='
411 enable_option_checking
412 m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
414 m4_ifdef([_AC_PRECIOUS_VARS],
415   [_AC_ARG_VAR_STORE[]dnl
416    _AC_ARG_VAR_VALIDATE[]dnl
417    ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
418 m4_ifdef([_AC_LIST_SUBDIRS],
419   [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
420 ])])dnl
421 ])# _AC_INIT_DEFAULTS
424 # AC_PREFIX_DEFAULT(PREFIX)
425 # -------------------------
426 AC_DEFUN([AC_PREFIX_DEFAULT],
427 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
430 # AC_PREFIX_PROGRAM(PROGRAM)
431 # --------------------------
432 # Guess the value for the `prefix' variable by looking for
433 # the argument program along PATH and taking its parent.
434 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
435 # set `prefix' to /usr/local/gnu.
436 # This comes too late to find a site file based on the prefix,
437 # and it might use a cached value for the path.
438 # No big loss, I think, since most configures don't use this macro anyway.
439 AC_DEFUN([AC_PREFIX_PROGRAM],
440 [if test "x$prefix" = xNONE; then
441 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
442   _AS_ECHO_N([checking for prefix by ])
443   AC_PATH_PROG(ac_prefix_program, [$1])
444   if test -n "$ac_prefix_program"; then
445     prefix=`AS_DIRNAME(["$ac_prefix_program"])`
446     prefix=`AS_DIRNAME(["$prefix"])`
447   fi
449 ])# AC_PREFIX_PROGRAM
452 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
453 # ---------------------------------------------
454 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
455 # relative to the directory that configure is in, which we can look
456 # for to find out if srcdir is correct.
457 AC_DEFUN([AC_CONFIG_SRCDIR],
458 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
461 # _AC_INIT_DIRCHECK
462 # -----------------
463 # Set ac_pwd, and sanity-check it and the source and installation directories.
465 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
467 AC_DEFUN([_AC_INIT_DIRCHECK],
468 [m4_divert_push([PARSE_ARGS])dnl
470 ac_pwd=`pwd` && test -n "$ac_pwd" &&
471 ac_ls_di=`ls -di .` &&
472 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
473   AC_MSG_ERROR([Working directory cannot be determined])
474 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
475   AC_MSG_ERROR([pwd does not report name of working directory])
477 m4_divert_pop([PARSE_ARGS])dnl
478 ])# _AC_INIT_DIRCHECK
480 # _AC_INIT_SRCDIR
481 # ---------------
482 # Compute `srcdir' based on `$ac_unique_file'.
484 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
486 AC_DEFUN([_AC_INIT_SRCDIR],
487 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
488 m4_divert_push([PARSE_ARGS])dnl
490 # Find the source files, if location was not specified.
491 if test -z "$srcdir"; then
492   ac_srcdir_defaulted=yes
493   # Try the directory containing this script, then the parent directory.
494   ac_confdir=`AS_DIRNAME(["$[0]"])`
495   srcdir=$ac_confdir
496   if test ! -r "$srcdir/$ac_unique_file"; then
497     srcdir=..
498   fi
499 else
500   ac_srcdir_defaulted=no
502 if test ! -r "$srcdir/$ac_unique_file"; then
503   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
504   AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
506 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
507 ac_abs_confdir=`(
508         cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
509         pwd)`
510 # When building in place, set srcdir=.
511 if test "$ac_abs_confdir" = "$ac_pwd"; then
512   srcdir=.
514 # Remove unnecessary trailing slashes from srcdir.
515 # Double slashes in file names in object file debugging info
516 # mess up M-x gdb in Emacs.
517 case $srcdir in
518 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
519 esac
520 m4_divert_pop([PARSE_ARGS])dnl
521 ])# _AC_INIT_SRCDIR
524 # _AC_INIT_PARSE_ARGS
525 # -------------------
526 m4_define([_AC_INIT_PARSE_ARGS],
527 [m4_divert_push([PARSE_ARGS])dnl
529 # Initialize some variables set by options.
530 ac_init_help=
531 ac_init_version=false
532 ac_unrecognized_opts=
533 ac_unrecognized_sep=
534 # The variables have the same names as the options, with
535 # dashes changed to underlines.
536 cache_file=/dev/null
537 AC_SUBST(exec_prefix, NONE)dnl
538 no_create=
539 no_recursion=
540 AC_SUBST(prefix, NONE)dnl
541 program_prefix=NONE
542 program_suffix=NONE
543 AC_SUBST(program_transform_name, [s,x,x,])dnl
544 silent=
545 site=
546 srcdir=
547 verbose=
548 x_includes=NONE
549 x_libraries=NONE
551 # Installation directory options.
552 # These are left unexpanded so users can "make install exec_prefix=/foo"
553 # and all the variables that are supposed to be based on exec_prefix
554 # by default will actually change.
555 # Use braces instead of parens because sh, perl, etc. also accept them.
556 # (The list follows the same order as the GNU Coding Standards.)
557 AC_SUBST([bindir],         ['${exec_prefix}/bin'])dnl
558 AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl
559 AC_SUBST([libexecdir],     ['${exec_prefix}/libexec'])dnl
560 AC_SUBST([datarootdir],    ['${prefix}/share'])dnl
561 AC_SUBST([datadir],        ['${datarootdir}'])dnl
562 AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl
563 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
564 AC_SUBST([localstatedir],  ['${prefix}/var'])dnl
565 AC_SUBST([includedir],     ['${prefix}/include'])dnl
566 AC_SUBST([oldincludedir],  ['/usr/include'])dnl
567 AC_SUBST([docdir],         [m4_ifset([AC_PACKAGE_TARNAME],
568                                      ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
569                                      ['${datarootdir}/doc/${PACKAGE}'])])dnl
570 AC_SUBST([infodir],        ['${datarootdir}/info'])dnl
571 AC_SUBST([htmldir],        ['${docdir}'])dnl
572 AC_SUBST([dvidir],         ['${docdir}'])dnl
573 AC_SUBST([pdfdir],         ['${docdir}'])dnl
574 AC_SUBST([psdir],          ['${docdir}'])dnl
575 AC_SUBST([libdir],         ['${exec_prefix}/lib'])dnl
576 AC_SUBST([localedir],      ['${datarootdir}/locale'])dnl
577 AC_SUBST([mandir],         ['${datarootdir}/man'])dnl
579 ac_prev=
580 ac_dashdash=
581 for ac_option
583   # If the previous option needs an argument, assign it.
584   if test -n "$ac_prev"; then
585     eval $ac_prev=\$ac_option
586     ac_prev=
587     continue
588   fi
590   case $ac_option in
591   *=*)  ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
592   *)    ac_optarg=yes ;;
593   esac
595   # Accept the important Cygnus configure options, so we can diagnose typos.
597   case $ac_dashdash$ac_option in
598   --)
599     ac_dashdash=yes ;;
601   -bindir | --bindir | --bindi | --bind | --bin | --bi)
602     ac_prev=bindir ;;
603   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
604     bindir=$ac_optarg ;;
606   -build | --build | --buil | --bui | --bu)
607     ac_prev=build_alias ;;
608   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
609     build_alias=$ac_optarg ;;
611   -cache-file | --cache-file | --cache-fil | --cache-fi \
612   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
613     ac_prev=cache_file ;;
614   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
615   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
616     cache_file=$ac_optarg ;;
618   --config-cache | -C)
619     cache_file=config.cache ;;
621   -datadir | --datadir | --datadi | --datad)
622     ac_prev=datadir ;;
623   -datadir=* | --datadir=* | --datadi=* | --datad=*)
624     datadir=$ac_optarg ;;
626   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
627   | --dataroo | --dataro | --datar)
628     ac_prev=datarootdir ;;
629   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
630   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
631     datarootdir=$ac_optarg ;;
633   _AC_INIT_PARSE_ENABLE([disable])
635   -docdir | --docdir | --docdi | --doc | --do)
636     ac_prev=docdir ;;
637   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
638     docdir=$ac_optarg ;;
640   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
641     ac_prev=dvidir ;;
642   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
643     dvidir=$ac_optarg ;;
645   _AC_INIT_PARSE_ENABLE([enable])
647   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
648   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
649   | --exec | --exe | --ex)
650     ac_prev=exec_prefix ;;
651   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
652   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
653   | --exec=* | --exe=* | --ex=*)
654     exec_prefix=$ac_optarg ;;
656   -gas | --gas | --ga | --g)
657     # Obsolete; use --with-gas.
658     with_gas=yes ;;
660   -help | --help | --hel | --he | -h)
661     ac_init_help=long ;;
662   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
663     ac_init_help=recursive ;;
664   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
665     ac_init_help=short ;;
667   -host | --host | --hos | --ho)
668     ac_prev=host_alias ;;
669   -host=* | --host=* | --hos=* | --ho=*)
670     host_alias=$ac_optarg ;;
672   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
673     ac_prev=htmldir ;;
674   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
675   | --ht=*)
676     htmldir=$ac_optarg ;;
678   -includedir | --includedir | --includedi | --included | --include \
679   | --includ | --inclu | --incl | --inc)
680     ac_prev=includedir ;;
681   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
682   | --includ=* | --inclu=* | --incl=* | --inc=*)
683     includedir=$ac_optarg ;;
685   -infodir | --infodir | --infodi | --infod | --info | --inf)
686     ac_prev=infodir ;;
687   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
688     infodir=$ac_optarg ;;
690   -libdir | --libdir | --libdi | --libd)
691     ac_prev=libdir ;;
692   -libdir=* | --libdir=* | --libdi=* | --libd=*)
693     libdir=$ac_optarg ;;
695   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
696   | --libexe | --libex | --libe)
697     ac_prev=libexecdir ;;
698   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
699   | --libexe=* | --libex=* | --libe=*)
700     libexecdir=$ac_optarg ;;
702   -localedir | --localedir | --localedi | --localed | --locale)
703     ac_prev=localedir ;;
704   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
705     localedir=$ac_optarg ;;
707   -localstatedir | --localstatedir | --localstatedi | --localstated \
708   | --localstate | --localstat | --localsta | --localst | --locals)
709     ac_prev=localstatedir ;;
710   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
711   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
712     localstatedir=$ac_optarg ;;
714   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
715     ac_prev=mandir ;;
716   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
717     mandir=$ac_optarg ;;
719   -nfp | --nfp | --nf)
720     # Obsolete; use --without-fp.
721     with_fp=no ;;
723   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
724   | --no-cr | --no-c | -n)
725     no_create=yes ;;
727   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
728   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
729     no_recursion=yes ;;
731   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
732   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
733   | --oldin | --oldi | --old | --ol | --o)
734     ac_prev=oldincludedir ;;
735   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
736   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
737   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
738     oldincludedir=$ac_optarg ;;
740   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
741     ac_prev=prefix ;;
742   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
743     prefix=$ac_optarg ;;
745   -program-prefix | --program-prefix | --program-prefi | --program-pref \
746   | --program-pre | --program-pr | --program-p)
747     ac_prev=program_prefix ;;
748   -program-prefix=* | --program-prefix=* | --program-prefi=* \
749   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
750     program_prefix=$ac_optarg ;;
752   -program-suffix | --program-suffix | --program-suffi | --program-suff \
753   | --program-suf | --program-su | --program-s)
754     ac_prev=program_suffix ;;
755   -program-suffix=* | --program-suffix=* | --program-suffi=* \
756   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
757     program_suffix=$ac_optarg ;;
759   -program-transform-name | --program-transform-name \
760   | --program-transform-nam | --program-transform-na \
761   | --program-transform-n | --program-transform- \
762   | --program-transform | --program-transfor \
763   | --program-transfo | --program-transf \
764   | --program-trans | --program-tran \
765   | --progr-tra | --program-tr | --program-t)
766     ac_prev=program_transform_name ;;
767   -program-transform-name=* | --program-transform-name=* \
768   | --program-transform-nam=* | --program-transform-na=* \
769   | --program-transform-n=* | --program-transform-=* \
770   | --program-transform=* | --program-transfor=* \
771   | --program-transfo=* | --program-transf=* \
772   | --program-trans=* | --program-tran=* \
773   | --progr-tra=* | --program-tr=* | --program-t=*)
774     program_transform_name=$ac_optarg ;;
776   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
777     ac_prev=pdfdir ;;
778   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
779     pdfdir=$ac_optarg ;;
781   -psdir | --psdir | --psdi | --psd | --ps)
782     ac_prev=psdir ;;
783   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
784     psdir=$ac_optarg ;;
786   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
787   | -silent | --silent | --silen | --sile | --sil)
788     silent=yes ;;
790   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
791     ac_prev=sbindir ;;
792   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
793   | --sbi=* | --sb=*)
794     sbindir=$ac_optarg ;;
796   -sharedstatedir | --sharedstatedir | --sharedstatedi \
797   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
798   | --sharedst | --shareds | --shared | --share | --shar \
799   | --sha | --sh)
800     ac_prev=sharedstatedir ;;
801   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
802   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
803   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
804   | --sha=* | --sh=*)
805     sharedstatedir=$ac_optarg ;;
807   -site | --site | --sit)
808     ac_prev=site ;;
809   -site=* | --site=* | --sit=*)
810     site=$ac_optarg ;;
812   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
813     ac_prev=srcdir ;;
814   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
815     srcdir=$ac_optarg ;;
817   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
818   | --syscon | --sysco | --sysc | --sys | --sy)
819     ac_prev=sysconfdir ;;
820   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
821   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
822     sysconfdir=$ac_optarg ;;
824   -target | --target | --targe | --targ | --tar | --ta | --t)
825     ac_prev=target_alias ;;
826   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
827     target_alias=$ac_optarg ;;
829   -v | -verbose | --verbose | --verbos | --verbo | --verb)
830     verbose=yes ;;
832   -version | --version | --versio | --versi | --vers | -V)
833     ac_init_version=: ;;
835   _AC_INIT_PARSE_ENABLE([with])
837   _AC_INIT_PARSE_ENABLE([without])
839   --x)
840     # Obsolete; use --with-x.
841     with_x=yes ;;
843   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
844   | --x-incl | --x-inc | --x-in | --x-i)
845     ac_prev=x_includes ;;
846   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
847   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
848     x_includes=$ac_optarg ;;
850   -x-libraries | --x-libraries | --x-librarie | --x-librari \
851   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
852     ac_prev=x_libraries ;;
853   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
854   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
855     x_libraries=$ac_optarg ;;
857   -*) AC_MSG_ERROR([unrecognized option: $ac_option
858 Try `$[0] --help' for more information.])
859     ;;
861   *=*)
862     ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
863     # Reject names that are not valid shell variable names.
864     expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
865       AC_MSG_ERROR([invalid variable name: $ac_envvar])
866     eval $ac_envvar=\$ac_optarg
867     export $ac_envvar ;;
869   *)
870     # FIXME: should be removed in autoconf 3.0.
871     AC_MSG_WARN([you should use --build, --host, --target])
872     expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
873       AC_MSG_WARN([invalid host type: $ac_option])
874     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
875     ;;
877   esac
878 done
880 if test -n "$ac_prev"; then
881   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
882   AC_MSG_ERROR([missing argument to $ac_option])
885 if test -n "$ac_unrecognized_opts"; then
886   case $enable_option_checking in
887     no) ;;
888     fatal) AC_MSG_ERROR([Unrecognized options: $ac_unrecognized_opts]) ;;
889     *)     AC_MSG_WARN( [Unrecognized options: $ac_unrecognized_opts]) ;;
890   esac
893 # Be sure to have absolute directory names.
894 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
895                 datadir sysconfdir sharedstatedir localstatedir includedir \
896                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
897                 libdir localedir mandir
899   eval ac_val=\$$ac_var
900   case $ac_val in
901     [[\\/$]]* | ?:[[\\/]]* )  continue;;
902     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
903   esac
904   AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
905 done
907 # There might be people who depend on the old broken behavior: `$host'
908 # used to hold the argument of --host etc.
909 # FIXME: To remove some day.
910 build=$build_alias
911 host=$host_alias
912 target=$target_alias
914 # FIXME: To remove some day.
915 if test "x$host_alias" != x; then
916   if test "x$build_alias" = x; then
917     cross_compiling=maybe
918     AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
919     If a cross compiler is detected then cross compile mode will be used.])
920   elif test "x$build_alias" != "x$host_alias"; then
921     cross_compiling=yes
922   fi
925 ac_tool_prefix=
926 test -n "$host_alias" && ac_tool_prefix=$host_alias-
928 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
930 m4_divert_pop([PARSE_ARGS])dnl
931 ])# _AC_INIT_PARSE_ARGS
934 # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
935 # ----------------------------------
936 # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
938 m4_define([_AC_INIT_PARSE_ENABLE],
939 [m4_bmatch([$1], [^with],
940            [_AC_INIT_PARSE_ENABLE2([$1], [with])],
941            [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
944 # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
945 # --------------------------------------------------
946 # Handle an `--enable' or a `--with' option.
948 # OPTION-NAME is `enable', `disable', `with', or `without'.
949 # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'.
951 # Positive variant of the option is recognized by the condition
952 #       OPTION-NAME == POSITIVE-NAME .
954 m4_define([_AC_INIT_PARSE_ENABLE2],
955 [-$1-* | --$1-*)
956     ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
957     # Reject names that are not valid shell variable names.
958     expr "x$ac_useropt" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
959       AC_MSG_ERROR(
960         [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt])
961     ac_useropt_orig=$ac_useropt
962     ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-.]]/_/g'`
963     case $ac_user_opts in
964       *"
965 "$2_$ac_useropt"
966 "*) ;;
967       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
968          ac_unrecognized_sep=', ';;
969     esac
970     eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
974 # _AC_INIT_HELP
975 # -------------
976 # Handle the `configure --help' message.
977 m4_define([_AC_INIT_HELP],
978 [m4_divert_push([HELP_BEGIN])dnl
981 # Report the --help message.
983 if test "$ac_init_help" = "long"; then
984   # Omit some internal or obsolete options to make the list less imposing.
985   # This message is too long to be a string in the A/UX 3.1 sh.
986   cat <<_ACEOF
987 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
988                         [AC_PACKAGE_STRING],
989                         [this package]) to adapt to many kinds of systems.
991 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
993 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
994 VAR=VALUE.  See below for descriptions of some of the useful variables.
996 Defaults for the options are specified in brackets.
998 Configuration:
999   -h, --help              display this help and exit
1000       --help=short        display options specific to this package
1001       --help=recursive    display the short help of all the included packages
1002   -V, --version           display version information and exit
1003   -q, --quiet, --silent   do not print \`checking...' messages
1004       --cache-file=FILE   cache test results in FILE [disabled]
1005   -C, --config-cache      alias for \`--cache-file=config.cache'
1006   -n, --no-create         do not create output files
1007       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1009 Installation directories:
1010   --prefix=PREFIX         install architecture-independent files in PREFIX
1011                           [$ac_default_prefix]
1012   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1013                           [PREFIX]
1015 By default, \`make install' will install all the files in
1016 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1017 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1018 for instance \`--prefix=\$HOME'.
1020 For better control, use the options below.
1022 Fine tuning of the installation directories:
1023   --bindir=DIR           user executables [EPREFIX/bin]
1024   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1025   --libexecdir=DIR       program executables [EPREFIX/libexec]
1026   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1027   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1028   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1029   --libdir=DIR           object code libraries [EPREFIX/lib]
1030   --includedir=DIR       C header files [PREFIX/include]
1031   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1032   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1033   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1034   --infodir=DIR          info documentation [DATAROOTDIR/info]
1035   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1036   --mandir=DIR           man documentation [DATAROOTDIR/man]
1037   --docdir=DIR           documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME], [AC_PACKAGE_TARNAME], [PACKAGE])@:>@[
1038   --htmldir=DIR          html documentation [DOCDIR]
1039   --dvidir=DIR           dvi documentation [DOCDIR]
1040   --pdfdir=DIR           pdf documentation [DOCDIR]
1041   --psdir=DIR            ps documentation [DOCDIR]
1042 _ACEOF
1044   cat <<\_ACEOF]
1045 m4_divert_pop([HELP_BEGIN])dnl
1046 dnl The order of the diversions here is
1047 dnl - HELP_BEGIN
1048 dnl   which may be extended by extra generic options such as with X or
1049 dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
1051 dnl - HELP_CANON
1052 dnl   Support for cross compilation (--build, --host and --target).
1053 dnl   Display only in long --help.
1055 dnl - HELP_ENABLE
1056 dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1057 dnl   then implements the header of the non generic options.
1059 dnl - HELP_WITH
1061 dnl - HELP_VAR
1063 dnl - HELP_VAR_END
1065 dnl - HELP_END
1066 dnl   initialized below, in which we dump the trailer (handling of the
1067 dnl   recursion for instance).
1068 m4_divert_push([HELP_ENABLE])dnl
1069 _ACEOF
1072 if test -n "$ac_init_help"; then
1073 m4_ifset([AC_PACKAGE_STRING],
1074 [  case $ac_init_help in
1075      short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1076    esac])
1077   cat <<\_ACEOF
1078 m4_divert_pop([HELP_ENABLE])dnl
1079 m4_divert_push([HELP_END])dnl
1080 m4_ifset([AC_PACKAGE_BUGREPORT], [
1081 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1082 _ACEOF
1083 ac_status=$?
1086 if test "$ac_init_help" = "recursive"; then
1087   # If there are subdirs, report their specific --help.
1088   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1089     test -d "$ac_dir" || continue
1090     _AC_SRCDIRS(["$ac_dir"])
1091     cd "$ac_dir" || { ac_status=$?; continue; }
1092     # Check for guested configure.
1093     if test -f "$ac_srcdir/configure.gnu"; then
1094       echo &&
1095       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1096     elif test -f "$ac_srcdir/configure"; then
1097       echo &&
1098       $SHELL "$ac_srcdir/configure" --help=recursive
1099     else
1100       AC_MSG_WARN([no configuration information is in $ac_dir])
1101     fi || ac_status=$?
1102     cd "$ac_pwd" || { ac_status=$?; break; }
1103   done
1106 test -n "$ac_init_help" && exit $ac_status
1107 m4_divert_pop([HELP_END])dnl
1108 ])# _AC_INIT_HELP
1111 # _AC_INIT_VERSION
1112 # ----------------
1113 # Handle the `configure --version' message.
1114 m4_define([_AC_INIT_VERSION],
1115 [m4_divert_text([VERSION_BEGIN],
1116 [if $ac_init_version; then
1117   cat <<\_ACEOF
1118 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1119 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1120 generated by m4_PACKAGE_STRING])
1121 m4_divert_text([VERSION_END],
1122 [_ACEOF
1123   exit
1124 fi])dnl
1125 ])# _AC_INIT_VERSION
1128 # _AC_INIT_CONFIG_LOG
1129 # -------------------
1130 # Initialize the config.log file descriptor and write header to it.
1131 m4_define([_AC_INIT_CONFIG_LOG],
1132 [m4_divert_text([INIT_PREPARE],
1133 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1134 cat >config.log <<_ACEOF
1135 This file contains any messages produced by compilers while
1136 running configure, to aid debugging if configure makes a mistake.
1138 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1139 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1140 generated by m4_PACKAGE_STRING.  Invocation command line was
1142   $ $[0] $[@]
1144 _ACEOF
1145 exec AS_MESSAGE_LOG_FD>>config.log
1146 AS_UNAME >&AS_MESSAGE_LOG_FD
1148 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1151 m4_text_box([Core tests.])
1153 _ACEOF
1154 ])])# _AC_INIT_CONFIG_LOG
1157 # _AC_INIT_PREPARE
1158 # ----------------
1159 # Called by AC_INIT to build the preamble of the `configure' scripts.
1160 # 1. Trap and clean up various tmp files.
1161 # 2. Set up the fd and output files
1162 # 3. Remember the options given to `configure' for `config.status --recheck'.
1163 # 4. Initiates confdefs.h
1164 # 5. Loads site and cache files
1165 m4_define([_AC_INIT_PREPARE],
1166 [m4_divert_push([INIT_PREPARE])dnl
1168 # Keep a trace of the command line.
1169 # Strip out --no-create and --no-recursion so they do not pile up.
1170 # Strip out --silent because we don't want to record it for future runs.
1171 # Also quote any args containing shell meta-characters.
1172 # Make two passes to allow for proper duplicate-argument suppression.
1173 ac_configure_args=
1174 ac_configure_args0=
1175 ac_configure_args1=
1176 ac_must_keep_next=false
1177 for ac_pass in 1 2
1179   for ac_arg
1180   do
1181     case $ac_arg in
1182     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1183     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1184     | -silent | --silent | --silen | --sile | --sil)
1185       continue ;;
1186     *\'*)
1187       ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1188     esac
1189     case $ac_pass in
1190     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1191     2)
1192       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1193 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1194 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1195 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1196 dnl give --prefix foo bar).
1197       if test $ac_must_keep_next = true; then
1198         ac_must_keep_next=false # Got value, back to normal.
1199       else
1200         case $ac_arg in
1201 dnl Use broad patterns, as arguments that would have already made configure
1202 dnl exit don't matter.
1203           *=* | --config-cache | -C | -disable-* | --disable-* \
1204           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1205           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1206           | -with-* | --with-* | -without-* | --without-* | --x)
1207             case "$ac_configure_args0 " in
1208               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1209             esac
1210             ;;
1211           -* ) ac_must_keep_next=true ;;
1212         esac
1213       fi
1214       ac_configure_args="$ac_configure_args '$ac_arg'"
1215       ;;
1216     esac
1217   done
1218 done
1219 AS_UNSET(ac_configure_args0)
1220 AS_UNSET(ac_configure_args1)
1222 # When interrupted or exit'd, cleanup temporary files, and complete
1223 # config.log.  We remove comments because anyway the quotes in there
1224 # would cause problems or look ugly.
1225 # WARNING: Use '\'' to represent an apostrophe within the trap.
1226 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1227 trap 'exit_status=$?
1228   # Save into config.log some information that might help in debugging.
1229   {
1230     echo
1232     AS_BOX([Cache variables.])
1233     echo
1234     m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1235                   [^ *\(#.*\)?
1236 ],                [],
1237                   ['], ['\\''])
1238     echo
1240     AS_BOX([Output variables.])
1241     echo
1242     for ac_var in $ac_subst_vars
1243     do
1244       eval ac_val=\$$ac_var
1245       case $ac_val in
1246       *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1247       esac
1248       AS_ECHO(["$ac_var='\''$ac_val'\''"])
1249     done | sort
1250     echo
1252     if test -n "$ac_subst_files"; then
1253       AS_BOX([File substitutions.])
1254       echo
1255       for ac_var in $ac_subst_files
1256       do
1257         eval ac_val=\$$ac_var
1258         case $ac_val in
1259         *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1260         esac
1261         AS_ECHO(["$ac_var='\''$ac_val'\''"])
1262       done | sort
1263       echo
1264     fi
1266     if test -s confdefs.h; then
1267       AS_BOX([confdefs.h.])
1268       echo
1269       cat confdefs.h
1270       echo
1271     fi
1272     test "$ac_signal" != 0 &&
1273       AS_ECHO(["$as_me: caught signal $ac_signal"])
1274     AS_ECHO(["$as_me: exit $exit_status"])
1275   } >&AS_MESSAGE_LOG_FD
1276   rm -f core *.core core.conftest.* &&
1277     rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1278     exit $exit_status
1279 ' 0
1280 for ac_signal in 1 2 13 15; do
1281   trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1282 done
1283 ac_signal=0
1285 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1286 rm -f -r conftest* confdefs.h
1287 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1288 dnl containing less than 14 bytes (including the newline).
1289 dnl But the defines below solve this problem.
1291 # Predefined preprocessor variables.
1292 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1293                    [Define to the full name of this package.])
1294 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1295                    [Define to the one symbol short name of this package.])
1296 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1297                    [Define to the version of this package.])
1298 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1299                    [Define to the full name and version of this package.])
1300 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1301                    [Define to the address where bug reports for this package
1302                     should be sent.])
1304 # Let the site file select an alternate cache file if it wants to.
1305 AC_SITE_LOAD
1306 AC_CACHE_LOAD
1307 m4_divert_pop([INIT_PREPARE])dnl
1308 ])# _AC_INIT_PREPARE
1311 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1312 # ----------------------------------------
1313 # This macro is used only for Autoupdate.
1314 AU_DEFUN([AC_INIT],
1315 [m4_ifval([$2], [[AC_INIT($@)]],
1316           [m4_ifval([$1],
1317 [[AC_INIT]
1318 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1322 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1323 # ----------------------------------------
1324 # Include the user macro files, prepare the diversions, and output the
1325 # preamble of the `configure' script.
1326 # Note that the order is important: first initialize, then set the
1327 # AC_CONFIG_SRCDIR.
1328 m4_define([AC_INIT],
1329 [# Forbidden tokens and exceptions.
1330 m4_pattern_forbid([^_?A[CHUM]_])
1331 m4_pattern_forbid([_AC_])
1332 m4_pattern_forbid([^LIBOBJS$],
1333                   [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1334 # Actually reserved by M4sh.
1335 m4_pattern_allow([^AS_FLAGS$])
1336 AS_INIT
1337 AS_PREPARE
1338 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1339 _AC_INIT_DEFAULTS
1340 _AC_INIT_PARSE_ARGS
1341 _AC_INIT_DIRCHECK
1342 _AC_INIT_SRCDIR
1343 _AC_INIT_HELP
1344 _AC_INIT_VERSION
1345 _AC_INIT_CONFIG_LOG
1346 _AC_INIT_PREPARE
1347 _AC_INIT_NOTICE
1348 _AC_INIT_COPYRIGHT
1349 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1351 dnl Substitute for predefined variables.
1352 AC_SUBST([DEFS])dnl
1353 AC_SUBST([ECHO_C])dnl
1354 AC_SUBST([ECHO_N])dnl
1355 AC_SUBST([ECHO_T])dnl
1356 AC_SUBST([LIBS])dnl
1357 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1358 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1359 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1361 AC_LANG_PUSH(C)
1367 ## ------------------------------------------------------------- ##
1368 ## Selecting optional features, working with optional software.  ##
1369 ## ------------------------------------------------------------- ##
1371 # AC_PRESERVE_HELP_ORDER
1372 # ----------------------
1373 # Emit help strings in the order given, rather than grouping all --enable-FOO
1374 # and all --with-BAR.
1375 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1376 [m4_divert_once([HELP_ENABLE], [[
1377 Optional Features and Packages:
1378   --disable-option-checking  ignore unrecognized --enable/--with options
1379   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1380   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1381   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1382   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
1383 m4_define([_m4_divert(HELP_ENABLE)],    _m4_divert(HELP_WITH))
1384 ])# AC_PRESERVE_HELP_ORDER
1386 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1387 # -------------------------------------------------------------------
1388 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1389 # OPTION is either "enable" or "with".
1391 m4_define([_AC_ENABLE_IF],
1392 [@%:@ Check whether --$1-$2 was given.
1393 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])[]dnl
1396 m4_define([_AC_ENABLE_IF_ACTION],
1397 [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
1398 ])dnl
1399 AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
1402 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1403 # ------------------------------------------------------------------------
1404 AC_DEFUN([AC_ARG_ENABLE],
1405 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1407 [m4_divert_once([HELP_ENABLE], [[
1408 Optional Features:
1409   --disable-option-checking  ignore unrecognized --enable/--with options
1410   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1411   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])])dnl
1412 m4_divert_once([HELP_ENABLE], [$2])dnl
1413 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1414 ])# AC_ARG_ENABLE
1417 AU_DEFUN([AC_ENABLE],
1418 [AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])])
1421 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1422 # --------------------------------------------------------------------
1423 AC_DEFUN([AC_ARG_WITH],
1424 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1426 [m4_divert_once([HELP_WITH], [[
1427 Optional Packages:
1428   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1429   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])])
1430 m4_divert_once([HELP_WITH], [$2])dnl
1431 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1432 ])# AC_ARG_WITH
1434 AU_DEFUN([AC_WITH],
1435 [AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])])
1437 # AC_DISABLE_OPTION_CHECKING
1438 # --------------------------------------------------------------------
1439 AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
1440 [m4_divert_once([DEFAULTS], [enable_option_checking=no])
1441 ])# AC_DISABLE_OPTION_CHECKING
1444 ## ----------------------------------------- ##
1445 ## Remembering variables for reconfiguring.  ##
1446 ## ----------------------------------------- ##
1449 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1450 # ----------------------------------
1451 # Register VARNAME as a precious variable, and document it in
1452 # `configure --help' (but only once).
1453 AC_DEFUN([AC_ARG_VAR],
1454 [m4_divert_once([HELP_VAR], [[
1455 Some influential environment variables:]])dnl
1456 m4_divert_once([HELP_VAR_END], [[
1457 Use these variables to override the choices made by `configure' or to help
1458 it to find libraries and programs with nonstandard names/locations.]])dnl
1459 m4_expand_once([m4_divert_text([HELP_VAR],
1460                                [AS_HELP_STRING([$1], [$2], [              ])])],
1461                [$0($1)])dnl
1462 AC_SUBST([$1])dnl
1463 _AC_ARG_VAR_PRECIOUS([$1])dnl
1464 ])# AC_ARG_VAR
1467 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1468 # -----------------------------
1469 # Declare VARNAME is precious.
1470 m4_define([_AC_ARG_VAR_PRECIOUS],
1471 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1472 ])dnl
1476 # _AC_ARG_VAR_STORE
1477 # -----------------
1478 # We try to diagnose when precious variables have changed.  To do this,
1479 # make two early snapshots (after the option processing to take
1480 # explicit variables into account) of those variables: one (ac_env_)
1481 # which represents the current run, and a second (ac_cv_env_) which,
1482 # at the first run, will be saved in the cache.  As an exception to
1483 # the cache mechanism, its loading will override these variables (non
1484 # `ac_cv_env_' cache value are only set when unset).
1486 # In subsequent runs, after having loaded the cache, compare
1487 # ac_cv_env_foo against ac_env_foo.  See _AC_ARG_VAR_VALIDATE.
1488 m4_define([_AC_ARG_VAR_STORE],
1489 [m4_divert_text([PARSE_ARGS],
1490 [for ac_var in $ac_precious_vars; do
1491   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1492   eval ac_env_${ac_var}_value=\$${ac_var}
1493   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1494   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1495 done])dnl
1499 # _AC_ARG_VAR_VALIDATE
1500 # --------------------
1501 # The precious variables are saved twice at the beginning of
1502 # configure.  E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1503 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1504 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1506 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1507 # content of the cached values, while `ac_env_' represents that of the
1508 # current values.
1510 # So we check that `ac_env_' and `ac_cv_env_' are consistent.  If
1511 # they aren't, die.
1512 m4_define([_AC_ARG_VAR_VALIDATE],
1513 [m4_divert_text([INIT_PREPARE],
1514 [# Check that the precious variables saved in the cache have kept the same
1515 # value.
1516 ac_cache_corrupted=false
1517 for ac_var in $ac_precious_vars; do
1518   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1519   eval ac_new_set=\$ac_env_${ac_var}_set
1520   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1521   eval ac_new_val=\$ac_env_${ac_var}_value
1522   case $ac_old_set,$ac_new_set in
1523     set,)
1524       AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1525       ac_cache_corrupted=: ;;
1526     ,set)
1527       AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1528       ac_cache_corrupted=: ;;
1529     ,);;
1530     *)
1531       if test "x$ac_old_val" != "x$ac_new_val"; then
1532         AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1533         AS_MESSAGE([  former value:  $ac_old_val], 2)
1534         AS_MESSAGE([  current value: $ac_new_val], 2)
1535         ac_cache_corrupted=:
1536       fi;;
1537   esac
1538   # Pass precious variables to config.status.
1539   if test "$ac_new_set" = set; then
1540     case $ac_new_val in
1541     *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1542     *) ac_arg=$ac_var=$ac_new_val ;;
1543     esac
1544     case " $ac_configure_args " in
1545       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1546       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1547     esac
1548   fi
1549 done
1550 if $ac_cache_corrupted; then
1551   AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1552   AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1553 fi])dnl
1554 ])# _AC_ARG_VAR_VALIDATE
1560 ## ---------------------------- ##
1561 ## Transforming program names.  ##
1562 ## ---------------------------- ##
1565 # AC_ARG_PROGRAM
1566 # --------------
1567 # This macro is expanded only once, to avoid that `foo' ends up being
1568 # installed as `ggfoo'.
1569 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1570 [dnl Document the options.
1571 m4_divert_push([HELP_BEGIN])dnl
1573 Program names:
1574   --program-prefix=PREFIX            prepend PREFIX to installed program names
1575   --program-suffix=SUFFIX            append SUFFIX to installed program names
1576   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1577 m4_divert_pop([HELP_BEGIN])dnl
1578 test "$program_prefix" != NONE &&
1579   program_transform_name="s&^&$program_prefix&;$program_transform_name"
1580 # Use a double $ so make ignores it.
1581 test "$program_suffix" != NONE &&
1582   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1583 # Double any \ or $.
1584 # By default was `s,x,x', remove it if useless.
1585 [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
1586 program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
1587 ])# AC_ARG_PROGRAM
1593 ## ------------------------- ##
1594 ## Finding auxiliary files.  ##
1595 ## ------------------------- ##
1598 # AC_CONFIG_AUX_DIR(DIR)
1599 # ----------------------
1600 # Find install-sh, config.sub, config.guess, and Cygnus configure
1601 # in directory DIR.  These are auxiliary files used in configuration.
1602 # DIR can be either absolute or relative to $srcdir.
1603 AC_DEFUN([AC_CONFIG_AUX_DIR],
1604 [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
1607 # AC_CONFIG_AUX_DIR_DEFAULT
1608 # -------------------------
1609 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1610 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1611 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1612 [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
1615 # AC_CONFIG_AUX_DIRS(DIR ...)
1616 # ---------------------------
1617 # Internal subroutine.
1618 # Search for the configuration auxiliary files in directory list $1.
1619 # We look only for install-sh, so users of AC_PROG_INSTALL
1620 # do not automatically need to distribute the other auxiliary files.
1621 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1622 [ac_aux_dir=
1623 for ac_dir in $1; do
1624   if test -f "$ac_dir/install-sh"; then
1625     ac_aux_dir=$ac_dir
1626     ac_install_sh="$ac_aux_dir/install-sh -c"
1627     break
1628   elif test -f "$ac_dir/install.sh"; then
1629     ac_aux_dir=$ac_dir
1630     ac_install_sh="$ac_aux_dir/install.sh -c"
1631     break
1632   elif test -f "$ac_dir/shtool"; then
1633     ac_aux_dir=$ac_dir
1634     ac_install_sh="$ac_aux_dir/shtool install -c"
1635     break
1636   fi
1637 done
1638 if test -z "$ac_aux_dir"; then
1639   AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1642 # These three variables are undocumented and unsupported,
1643 # and are intended to be withdrawn in a future Autoconf release.
1644 # They can cause serious problems if a builder's source tree is in a directory
1645 # whose full name contains unusual characters.
1646 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1647 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1648 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1650 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1651 ])# AC_CONFIG_AUX_DIRS
1656 ## ------------------------ ##
1657 ## Finding aclocal macros.  ##
1658 ## ------------------------ ##
1661 # AC_CONFIG_MACRO_DIR(DIR)
1662 # ------------------------
1663 # Declare directory containing additional macros for aclocal.
1664 AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
1668 ## --------------------- ##
1669 ## Requiring aux files.  ##
1670 ## --------------------- ##
1672 # AC_REQUIRE_AUX_FILE(FILE)
1673 # -------------------------
1674 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1675 # It announces FILE is required in the auxdir.
1676 m4_define([AC_REQUIRE_AUX_FILE],
1677 [AS_LITERAL_IF([$1], [],
1678                [AC_FATAL([$0: requires a literal argument])])])
1682 ## ----------------------------------- ##
1683 ## Getting the canonical system type.  ##
1684 ## ----------------------------------- ##
1686 # The inputs are:
1687 #    configure --host=HOST --target=TARGET --build=BUILD
1689 # The rules are:
1690 # 1. Build defaults to the current platform, as determined by config.guess.
1691 # 2. Host defaults to build.
1692 # 3. Target defaults to host.
1695 # _AC_CANONICAL_SPLIT(THING)
1696 # --------------------------
1697 # Generate the variables THING, THING_{alias cpu vendor os}.
1698 m4_define([_AC_CANONICAL_SPLIT],
1699 [case $ac_cv_$1 in
1700 *-*-*) ;;
1701 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1702 esac
1703 AC_SUBST([$1], [$ac_cv_$1])dnl
1704 ac_save_IFS=$IFS; IFS='-'
1705 set x $ac_cv_$1
1706 shift
1707 AC_SUBST([$1_cpu], [$[1]])dnl
1708 AC_SUBST([$1_vendor], [$[2]])dnl
1709 shift; shift
1710 [# Remember, the first character of IFS is used to create $]*,
1711 # except with old shells:
1712 $1_os=$[*]
1713 IFS=$ac_save_IFS
1714 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
1715 AC_SUBST([$1_os])dnl
1716 ])# _AC_CANONICAL_SPLIT
1719 # AC_CANONICAL_BUILD
1720 # ------------------
1721 AC_DEFUN([AC_CANONICAL_BUILD],
1722 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1723 AC_REQUIRE_AUX_FILE([config.sub])dnl
1724 AC_REQUIRE_AUX_FILE([config.guess])dnl
1725 m4_divert_once([HELP_CANON],
1727 System types:
1728   --build=BUILD     configure for building on BUILD [guessed]]])dnl
1729 # Make sure we can run config.sub.
1730 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1731   AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
1733 AC_CACHE_CHECK([build system type], [ac_cv_build],
1734 [ac_build_alias=$build_alias
1735 test "x$ac_build_alias" = x &&
1736   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1737 test "x$ac_build_alias" = x &&
1738   AC_MSG_ERROR([cannot guess build type; you must specify one])
1739 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1740   AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
1742 _AC_CANONICAL_SPLIT(build)
1743 ])# AC_CANONICAL_BUILD
1746 # AC_CANONICAL_HOST
1747 # -----------------
1748 AC_DEFUN([AC_CANONICAL_HOST],
1749 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1750 m4_divert_once([HELP_CANON],
1751 [[  --host=HOST       cross-compile to build programs to run on HOST [BUILD]]])dnl
1752 AC_CACHE_CHECK([host system type], [ac_cv_host],
1753 [if test "x$host_alias" = x; then
1754   ac_cv_host=$ac_cv_build
1755 else
1756   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1757     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
1760 _AC_CANONICAL_SPLIT([host])
1761 ])# AC_CANONICAL_HOST
1764 # AC_CANONICAL_TARGET
1765 # -------------------
1766 AC_DEFUN([AC_CANONICAL_TARGET],
1767 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1768 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1769 m4_divert_once([HELP_CANON],
1770 [[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
1771 AC_CACHE_CHECK([target system type], [ac_cv_target],
1772 [if test "x$target_alias" = x; then
1773   ac_cv_target=$ac_cv_host
1774 else
1775   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
1776     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
1779 _AC_CANONICAL_SPLIT([target])
1781 # The aliases save the names the user supplied, while $host etc.
1782 # will get canonicalized.
1783 test -n "$target_alias" &&
1784   test "$program_prefix$program_suffix$program_transform_name" = \
1785     NONENONEs,x,x, &&
1786   program_prefix=${target_alias}-[]dnl
1787 ])# AC_CANONICAL_TARGET
1790 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1793 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1794 # ------------------------------------------
1795 # If the cache file is inconsistent with the current host,
1796 # target and build system types, execute CMD or print a default
1797 # error message.  Now handled via _AC_ARG_VAR_PRECIOUS.
1798 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1801 ## ---------------------- ##
1802 ## Caching test results.  ##
1803 ## ---------------------- ##
1806 # AC_SITE_LOAD
1807 # ------------
1808 # Look for site- or system-specific initialization scripts.
1809 m4_define([AC_SITE_LOAD],
1810 [# Prefer an explicitly selected file to automatically selected ones.
1811 ac_site_file1=NONE
1812 ac_site_file2=NONE
1813 if test -n "$CONFIG_SITE"; then
1814   ac_site_file1=$CONFIG_SITE
1815 elif test "x$prefix" != xNONE; then
1816   ac_site_file1=$prefix/share/config.site
1817   ac_site_file2=$prefix/etc/config.site
1818 else
1819   ac_site_file1=$ac_default_prefix/share/config.site
1820   ac_site_file2=$ac_default_prefix/etc/config.site
1822 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1824   test "$ac_site_file" = NONE && continue
1825   if test -r "$ac_site_file"; then
1826     AC_MSG_NOTICE([loading site script $ac_site_file])
1827     sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1828     . "$ac_site_file"
1829   fi
1830 done
1834 # AC_CACHE_LOAD
1835 # -------------
1836 m4_define([AC_CACHE_LOAD],
1837 [if test -r "$cache_file"; then
1838   # Some versions of bash will fail to source /dev/null (special
1839   # files actually), so we avoid doing that.
1840   if test -f "$cache_file"; then
1841     AC_MSG_NOTICE([loading cache $cache_file])
1842     case $cache_file in
1843       [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
1844       *)                      . "./$cache_file";;
1845     esac
1846   fi
1847 else
1848   AC_MSG_NOTICE([creating cache $cache_file])
1849   >$cache_file
1851 ])# AC_CACHE_LOAD
1854 # _AC_CACHE_DUMP
1855 # --------------
1856 # Dump the cache to stdout.  It can be in a pipe (this is a requirement).
1857 m4_define([_AC_CACHE_DUMP],
1858 [# The following way of writing the cache mishandles newlines in values,
1859 # but we know of no workaround that is simple, portable, and efficient.
1860 # So, we kill variables containing newlines.
1861 # Ultrix sh set writes to stderr and can't be redirected directly,
1862 # and sets the high bit in the cache file unless we assign to the vars.
1864   for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
1865     eval ac_val=\$$ac_var
1866     case $ac_val in #(
1867     *${as_nl}*)
1868       case $ac_var in #(
1869       *_cv_*) AC_MSG_WARN([Cache variable $ac_var contains a newline.]) ;;
1870       esac
1871       case $ac_var in #(
1872       _ | IFS | as_nl) ;; #(
1873       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1874       *) $as_unset $ac_var ;;
1875       esac ;;
1876     esac
1877   done
1879   (set) 2>&1 |
1880     case $as_nl`(ac_space=' '; set) 2>&1` in #(
1881     *${as_nl}ac_space=\ *)
1882       # `set' does not quote correctly, so add quotes (double-quote
1883       # substitution turns \\\\ into \\, and sed turns \\ into \).
1884       sed -n \
1885         ["s/'/'\\\\''/g;
1886           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1887       ;; #(
1888     *)
1889       # `set' quotes correctly as required by POSIX, so do not add quotes.
1890       sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
1891       ;;
1892     esac |
1893     sort
1894 )dnl
1895 ])# _AC_CACHE_DUMP
1898 # AC_CACHE_SAVE
1899 # -------------
1900 # Save the cache.
1901 # Allow a site initialization script to override cache values.
1902 m4_define([AC_CACHE_SAVE],
1903 [cat >confcache <<\_ACEOF
1904 # This file is a shell script that caches the results of configure
1905 # tests run on this system so they can be shared between configure
1906 # scripts and configure runs, see configure's option --config-cache.
1907 # It is not useful on other systems.  If it contains results you don't
1908 # want to keep, you may remove or edit it.
1910 # config.status only pays attention to the cache file if you give it
1911 # the --recheck option to rerun configure.
1913 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1914 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1915 # following values.
1917 _ACEOF
1919 _AC_CACHE_DUMP() |
1920   sed ['
1921      /^ac_cv_env_/b end
1922      t clear
1923      :clear
1924      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1925      t end
1926      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1927      :end'] >>confcache
1928 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1929   if test -w "$cache_file"; then
1930     test "x$cache_file" != "x/dev/null" &&
1931       AC_MSG_NOTICE([updating cache $cache_file])
1932     cat confcache >$cache_file
1933   else
1934     AC_MSG_NOTICE([not updating unwritable cache $cache_file])
1935   fi
1937 rm -f confcache[]dnl
1938 ])# AC_CACHE_SAVE
1941 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1942 # ------------------------------------------
1943 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1944 # Should be dnl'ed.  Try to catch common mistakes.
1945 m4_defun([AC_CACHE_VAL],
1946 [m4_bmatch([$2], [AC_DEFINE],
1947            [AC_DIAGNOSE([syntax],
1948 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1949 [where no actions should be taken])])dnl
1950 AS_VAR_SET_IF([$1],
1951               [_AS_ECHO_N([(cached) ])],
1952               [$2])])
1955 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1956 # -------------------------------------------
1957 # Do not call this macro with a dnl right behind.
1958 m4_defun([AC_CACHE_CHECK],
1959 [AC_MSG_CHECKING([$1])
1960 AC_CACHE_VAL([$2], [$3])dnl
1961 AS_LITERAL_IF([$2],
1962               [AC_MSG_RESULT([$$2])],
1963               [ac_res=AS_VAR_GET([$2])
1964                AC_MSG_RESULT([$ac_res])])dnl
1967 # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
1968 #                     [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
1969 # -------------------------------------------------------------
1970 AC_DEFUN([_AC_CACHE_CHECK_INT],
1971 [AC_CACHE_CHECK([$1], [$2],
1972    [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
1973 ])# _AC_CACHE_CHECK_INT
1977 ## ---------------------- ##
1978 ## Defining CPP symbols.  ##
1979 ## ---------------------- ##
1982 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
1983 # -------------------------------------------
1984 # Used by --trace to collect the list of AC_DEFINEd macros.
1985 m4_define([AC_DEFINE_TRACE_LITERAL],
1986 [m4_pattern_allow([^$1$])dnl
1987 m4_bmatch([$1], ^m4_defn([m4_re_word])$, [],
1988   [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
1989 ])# AC_DEFINE_TRACE_LITERAL
1992 # AC_DEFINE_TRACE(CPP-SYMBOL)
1993 # ---------------------------
1994 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
1995 # out non literal symbols.
1996 m4_define([AC_DEFINE_TRACE],
1997 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL(m4_bpatsubst([[$1]], [(.*)]))])])
2000 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2001 # -------------------------------------------
2002 # Set VARIABLE to VALUE, verbatim, or 1.  Remember the value
2003 # and if VARIABLE is affected the same VALUE, do nothing, else
2004 # die.  The third argument is used by autoheader.
2005 m4_define([AC_DEFINE], [_AC_DEFINE_Q([\], $@)])
2008 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2009 # ----------------------------------------------------
2010 # Similar, but perform shell substitutions $ ` \ once on VALUE.
2011 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([], $@)])
2014 # _AC_DEFINE_Q(QUOTE, VARIABLE, [VALUE], [DESCRIPTION])
2015 # -----------------------------------------------------
2016 m4_define([_AC_DEFINE_Q],
2017 [AC_DEFINE_TRACE([$2])dnl
2018 m4_ifval([$4], [AH_TEMPLATE(m4_bpatsubst([[$2]], [(.*)]), [$4])])dnl
2019 cat >>confdefs.h <<$1_ACEOF
2020 [@%:@define] $2 m4_if($#, 2, 1, [$3])
2021 _ACEOF
2026 ## -------------------------- ##
2027 ## Setting output variables.  ##
2028 ## -------------------------- ##
2031 # AC_SUBST_TRACE(VARIABLE)
2032 # ------------------------
2033 # This macro is used with --trace to collect the list of substituted variables.
2034 m4_define([AC_SUBST_TRACE])
2037 # AC_SUBST(VARIABLE, [VALUE])
2038 # ---------------------------
2039 # Create an output variable from a shell VARIABLE.  If VALUE is given
2040 # assign it to VARIABLE.  Use `""' is you want to set VARIABLE to an
2041 # empty value, not an empty second argument.
2043 m4_define([AC_SUBST],
2044 [m4_bmatch(m4_bpatsubst([[$1]], [@&t@]), ^m4_defn([m4_re_word])$, [],
2045   [AC_FATAL([$0: `$1' is not a valid shell variable name])])dnl
2046 AC_SUBST_TRACE([$1])dnl
2047 m4_pattern_allow([^$1$])dnl
2048 m4_ifvaln([$2], [$1=$2])[]dnl
2049 m4_append_uniq([_AC_SUBST_VARS], [$1], [
2050 ])dnl
2051 ])# AC_SUBST
2054 # AC_SUBST_FILE(VARIABLE)
2055 # -----------------------
2056 # Read the comments of the preceding macro.
2057 m4_define([AC_SUBST_FILE],
2058 [m4_pattern_allow([^$1$])dnl
2059 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2060 ])])
2064 ## --------------------------------------- ##
2065 ## Printing messages at autoconf runtime.  ##
2066 ## --------------------------------------- ##
2068 # In fact, I think we should promote the use of m4_warn and m4_fatal
2069 # directly.  This will also avoid to some people to get it wrong
2070 # between AC_FATAL and AC_MSG_ERROR.
2073 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2074 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2075 # --------------------------------
2076 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2077 m4_define([AC_FATAL],    [m4_fatal($@)])
2080 # AC_WARNING(MESSAGE)
2081 # -------------------
2082 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2083 # specified.
2084 m4_define([AC_WARNING],
2085 [AC_DIAGNOSE([syntax], [$1])])
2090 ## ---------------------------------------- ##
2091 ## Printing messages at configure runtime.  ##
2092 ## ---------------------------------------- ##
2095 # AC_MSG_CHECKING(FEATURE)
2096 # ------------------------
2097 m4_define([AC_MSG_CHECKING],
2098 [{ _AS_ECHO_LOG([checking $1])
2099 _AS_ECHO_N([checking $1... ]); }dnl
2103 # AC_MSG_RESULT(RESULT)
2104 # ---------------------
2105 m4_define([AC_MSG_RESULT],
2106 [{ _AS_ECHO_LOG([result: $1])
2107 _AS_ECHO([$1]); }dnl
2111 # AC_MSG_WARN(PROBLEM)
2112 # AC_MSG_NOTICE(STRING)
2113 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2114 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2115 # ----------------------------------------
2116 m4_copy([AS_WARN],    [AC_MSG_WARN])
2117 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2118 m4_copy([AS_ERROR],   [AC_MSG_ERROR])
2119 m4_define([AC_MSG_FAILURE],
2120 [AC_MSG_ERROR([$1
2121 See `config.log' for more details.], [$2])])
2124 # _AC_MSG_LOG_CONFTEST
2125 # --------------------
2126 m4_define([_AC_MSG_LOG_CONFTEST],
2127 [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
2128 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2132 # AU::AC_CHECKING(FEATURE)
2133 # ------------------------
2134 AU_DEFUN([AC_CHECKING],
2135 [AS_MESSAGE([checking $1...])])
2138 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2139 # ----------------------------------
2140 # No escaping, so it performed also backtick substitution.
2141 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2142 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
2143 _AS_ECHO_UNQUOTED([$1])[]dnl
2147 # AU::AC_VERBOSE(STRING)
2148 # ----------------------
2149 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2156 ## ---------------------------- ##
2157 ## Compiler-running mechanics.  ##
2158 ## ---------------------------- ##
2161 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2162 # ----------------------------------
2163 # Eval COMMAND, save the exit status in ac_status, and log it.
2164 AC_DEFUN([_AC_RUN_LOG],
2165 [{ ($2) >&AS_MESSAGE_LOG_FD
2166   ($1) 2>&AS_MESSAGE_LOG_FD
2167   ac_status=$?
2168   _AS_ECHO_LOG([\$? = $ac_status])
2169   (exit $ac_status); }])
2172 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2173 # -----------------------------------------
2174 # Run COMMAND, save its stderr into conftest.err, save the exit status
2175 # in ac_status, and log it.  Don't forget to clean up conftest.err after
2176 # use.
2177 # Note that when tracing, most shells will leave the traces in stderr
2178 # starting with "+": that's what this macro tries to address.
2179 AC_DEFUN([_AC_RUN_LOG_STDERR],
2180 [{ ($2) >&AS_MESSAGE_LOG_FD
2181   ($1) 2>conftest.er1
2182   ac_status=$?
2183   grep -v '^ *+' conftest.er1 >conftest.err
2184   rm -f conftest.er1
2185   cat conftest.err >&AS_MESSAGE_LOG_FD
2186   _AS_ECHO_LOG([\$? = $ac_status])
2187   (exit $ac_status); }])
2189 # _AC_DO_ECHO(COMMAND)
2190 # --------------------
2191 # Echo COMMAND.  This is designed to be used just before evaluating COMMAND.
2192 AC_DEFUN([_AC_DO_ECHO],
2193 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2194 ])dnl
2195 dnl If the string contains '"', '`', or '\', then just echo it rather
2196 dnl than expanding it.  This is a hack, but it is safer, while also
2197 dnl typically expanding simple substrings like '$CC', which is what we want.
2199 dnl Much of this macro body is quoted, to work around misuses like
2200 dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2201 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2202 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2203 dnl underquoting misuses, such as
2204 dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2205 dnl We normally wouldn't bother with this kind of workaround for invalid code
2206 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2207 dnl minimize the integration hassle.
2208 [case "(($ac_try" in
2209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210   *) ac_try_echo=$ac_try;;
2211 esac
2212 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""]
2213 AS_ECHO(["$ac_try_echo"])])
2215 # _AC_DO(COMMAND)
2216 # ---------------
2217 # Eval COMMAND, save the exit status in ac_status, and log it.
2218 # For internal use only.
2219 AC_DEFUN([_AC_DO],
2220 [_AC_RUN_LOG([eval "$1"],
2221              [_AC_DO_ECHO([$1])])])
2224 # _AC_DO_STDERR(COMMAND)
2225 # ----------------------
2226 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2227 AC_DEFUN([_AC_DO_STDERR],
2228 [_AC_RUN_LOG_STDERR([eval "$1"],
2229                     [_AC_DO_ECHO([$1])])])
2232 # _AC_DO_VAR(VARIABLE)
2233 # --------------------
2234 # Evaluate "$VARIABLE", which should be a valid shell command.
2235 # The purpose of this macro is to write "configure:123: command line"
2236 # into config.log for every test run.
2237 AC_DEFUN([_AC_DO_VAR],
2238 [_AC_DO([$$1])])
2241 # _AC_DO_TOKENS(COMMAND)
2242 # ----------------------
2243 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2244 # tokens of the shell command language.
2245 AC_DEFUN([_AC_DO_TOKENS],
2246 [{ ac_try='$1'
2247   _AC_DO([$ac_try]); }])
2250 # _AC_EVAL(COMMAND)
2251 # -----------------
2252 # Eval COMMAND, save the exit status in ac_status, and log it.
2253 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2254 # It is present only for backward compatibility with previous Autoconf versions.
2255 AC_DEFUN([_AC_EVAL],
2256 [_AC_RUN_LOG([eval $1],
2257              [eval echo "$as_me:$LINENO: \"$1\""])])
2260 # _AC_EVAL_STDERR(COMMAND)
2261 # ------------------------
2262 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2263 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2264 # It is present only for backward compatibility with previous Autoconf versions.
2265 AC_DEFUN([_AC_EVAL_STDERR],
2266 [_AC_RUN_LOG_STDERR([eval $1],
2267                     [eval echo "$as_me:$LINENO: \"$1\""])])
2270 # AC_TRY_EVAL(VARIABLE)
2271 # ---------------------
2272 # Evaluate $VARIABLE, which should be a valid shell command.
2273 # The purpose of this macro is to write "configure:123: command line"
2274 # into config.log for every test run.
2276 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2277 # undocumented, and should not be used.
2278 # They may be removed or their API changed in a future release.
2279 # Autoconf itself no longer uses these two macros; they are present
2280 # only for backward compatibility with previous versions of Autoconf.
2281 # Not every shell command will work due to problems with eval
2282 # and quoting, and the rules for exactly what does work are tricky.
2283 # Worse, due to double-expansion during evaluation, arbitrary unintended
2284 # shell commands could be executed in some situations.
2285 AC_DEFUN([AC_TRY_EVAL],
2286 [_AC_EVAL([$$1])])
2289 # AC_TRY_COMMAND(COMMAND)
2290 # -----------------------
2291 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2292 # tokens of the shell command language.
2293 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2294 AC_DEFUN([AC_TRY_COMMAND],
2295 [{ ac_try='$1'
2296   _AC_EVAL([$ac_try]); }])
2299 # AC_RUN_LOG(COMMAND)
2300 # -------------------
2301 AC_DEFUN([AC_RUN_LOG],
2302 [_AC_RUN_LOG([$1],
2303              [AS_ECHO(["$as_me:$LINENO: AS_ESCAPE([$1])"])])])
2308 ## ------------------------ ##
2309 ## Examining declarations.  ##
2310 ## ------------------------ ##
2314 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2315 # ----------------------------------------------------------------
2316 # Try to preprocess PROGRAM.
2318 # This macro can be used during the selection of a preprocessor.
2319 # eval is necessary to expand ac_cpp.
2320 AC_DEFUN([_AC_PREPROC_IFELSE],
2321 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2322 AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && {
2323          test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2324          test ! -s conftest.err
2325        }],
2326   [$2],
2327   [_AC_MSG_LOG_CONFTEST
2328   $3])
2329 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2330 ])# _AC_PREPROC_IFELSE
2333 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2334 # ---------------------------------------------------------------
2335 # Try to preprocess PROGRAM.  Requires that the preprocessor for the
2336 # current language was checked for, hence do not use this macro in macros
2337 # looking for a preprocessor.
2338 AC_DEFUN([AC_PREPROC_IFELSE],
2339 [AC_LANG_PREPROC_REQUIRE()dnl
2340 _AC_PREPROC_IFELSE($@)])
2343 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2344 # ---------------------------------------------------------
2345 # AC_TRY_CPP is used to check whether particular header files exist.
2346 # (But it actually tests whether INCLUDES produces no CPP errors.)
2348 # INCLUDES are not defaulted and are double quoted.
2349 AU_DEFUN([AC_TRY_CPP],
2350 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2353 # AC_EGREP_CPP(PATTERN, PROGRAM,
2354 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2355 # ------------------------------------------------------
2356 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2357 # come early, it is not included in AC_BEFORE checks.
2358 AC_DEFUN([AC_EGREP_CPP],
2359 [AC_LANG_PREPROC_REQUIRE()dnl
2360 AC_REQUIRE([AC_PROG_EGREP])dnl
2361 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2362 AS_IF([dnl eval is necessary to expand ac_cpp.
2363 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2364 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2365 dnl Quote $1 to prevent m4 from eating character classes
2366   $EGREP "[$1]" >/dev/null 2>&1],
2367   [$3],
2368   [$4])dnl
2369 rm -f conftest*
2370 ])# AC_EGREP_CPP
2373 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2374 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2375 # ---------------------------------------------------------
2376 AC_DEFUN([AC_EGREP_HEADER],
2377 [AC_EGREP_CPP([$1],
2378 [#include <$2>
2379 ], [$3], [$4])])
2384 ## ------------------ ##
2385 ## Examining syntax.  ##
2386 ## ------------------ ##
2389 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2390 # ----------------------------------------------------------------
2391 # Try to compile PROGRAM.
2392 # This macro can be used during the selection of a compiler.
2393 m4_define([_AC_COMPILE_IFELSE],
2394 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2395 rm -f conftest.$ac_objext
2396 AS_IF([_AC_DO_STDERR($ac_compile) && {
2397          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2398          test ! -s conftest.err
2399        } && test -s conftest.$ac_objext],
2400       [$2],
2401       [_AC_MSG_LOG_CONFTEST
2402         $3])
2403 rm -f core conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2404 ])# _AC_COMPILE_IFELSE
2407 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2408 # ---------------------------------------------------------------
2409 # Try to compile PROGRAM.  Requires that the compiler for the current
2410 # language was checked for, hence do not use this macro in macros looking
2411 # for a compiler.
2412 AC_DEFUN([AC_COMPILE_IFELSE],
2413 [AC_LANG_COMPILER_REQUIRE()dnl
2414 _AC_COMPILE_IFELSE($@)])
2417 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2418 #                [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2419 # ---------------------------------------------------
2420 AU_DEFUN([AC_TRY_COMPILE],
2421 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2425 ## --------------------- ##
2426 ## Examining libraries.  ##
2427 ## --------------------- ##
2430 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2431 # -------------------------------------------------------------
2432 # Try to link PROGRAM.
2433 # This macro can be used during the selection of a compiler.
2435 # Test that resulting file is executable; see the problem reported by mwoehlke
2436 # in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
2437 # But skip the test when cross-compiling, to prevent problems like the one
2438 # reported by Chris Johns in
2439 # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
2441 m4_define([_AC_LINK_IFELSE],
2442 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2443 rm -f conftest.$ac_objext conftest$ac_exeext
2444 AS_IF([_AC_DO_STDERR($ac_link) && {
2445          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2446          test ! -s conftest.err
2447        } && test -s conftest$ac_exeext && {
2448          test "$cross_compiling" = yes ||
2449          AS_TEST_X([conftest$ac_exeext])
2450        }],
2451       [$2],
2452       [_AC_MSG_LOG_CONFTEST
2453         $3])
2454 dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization)
2455 dnl information created by the PGI compiler (conftest_ipa8_conftest.oo),
2456 dnl as it would interfere with the next link command.
2457 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
2458       conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2459 ])# _AC_LINK_IFELSE
2462 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2463 # ------------------------------------------------------------
2464 # Try to link PROGRAM.  Requires that the compiler for the current
2465 # language was checked for, hence do not use this macro in macros looking
2466 # for a compiler.
2467 AC_DEFUN([AC_LINK_IFELSE],
2468 [AC_LANG_COMPILER_REQUIRE()dnl
2469 _AC_LINK_IFELSE($@)])
2472 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2473 #             [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2474 # ------------------------------------------------
2475 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2476 AU_DEFUN([AC_TRY_LINK],
2477 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2480 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2481 #                  ACTION-IF-TRUE, [ACTION-IF-FALSE])
2482 # ---------------------------------------------------
2483 AU_DEFUN([AC_COMPILE_CHECK],
2484 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2485 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2490 ## ------------------------------- ##
2491 ## Checking for runtime features.  ##
2492 ## ------------------------------- ##
2495 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2496 # ------------------------------------------------------------
2497 # Compile, link, and run.
2498 # This macro can be used during the selection of a compiler.
2499 # We also remove conftest.o as if the compilation fails, some compilers
2500 # don't remove it.  We remove gmon.out and bb.out, which may be
2501 # created during the run if the program is built with profiling support.
2502 m4_define([_AC_RUN_IFELSE],
2503 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2504 rm -f conftest$ac_exeext
2505 AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2506       [$2],
2507       [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
2508 _AC_MSG_LOG_CONFTEST
2509 m4_ifvaln([$3],
2510           [( exit $ac_status )
2511 $3])dnl])[]dnl
2512 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2513                                                      [conftest.$ac_ext])[]dnl
2514 ])# _AC_RUN_IFELSE
2517 # AC_RUN_IFELSE(PROGRAM,
2518 #               [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2519 #               [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2520 # ----------------------------------------------------------
2521 # Compile, link, and run. Requires that the compiler for the current
2522 # language was checked for, hence do not use this macro in macros looking
2523 # for a compiler.
2524 AC_DEFUN([AC_RUN_IFELSE],
2525 [AC_LANG_COMPILER_REQUIRE()dnl
2526 m4_ifval([$4], [],
2527          [AC_DIAGNOSE([cross],
2528                      [$0 called without default to allow cross compiling])])dnl
2529 AS_IF([test "$cross_compiling" = yes],
2530   [m4_default([$4],
2531            [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2532   [_AC_RUN_IFELSE($@)])
2536 # AC_TRY_RUN(PROGRAM,
2537 #            [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2538 #            [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2539 # --------------------------------------------------------
2540 AU_DEFUN([AC_TRY_RUN],
2541 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2545 ## ------------------------------------- ##
2546 ## Checking for the existence of files.  ##
2547 ## ------------------------------------- ##
2549 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2550 # -------------------------------------------------------------
2552 # Check for the existence of FILE.
2553 AC_DEFUN([AC_CHECK_FILE],
2554 [AC_DIAGNOSE([cross],
2555              [cannot check for file existence when cross compiling])dnl
2556 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2557 AC_CACHE_CHECK([for $1], [ac_File],
2558 [test "$cross_compiling" = yes &&
2559   AC_MSG_ERROR([cannot check for file existence when cross compiling])
2560 if test -r "$1"; then
2561   AS_VAR_SET([ac_File], [yes])
2562 else
2563   AS_VAR_SET([ac_File], [no])
2564 fi])
2565 AS_IF([test AS_VAR_GET([ac_File]) = yes], [$2], [$3])[]dnl
2566 AS_VAR_POPDEF([ac_File])dnl
2567 ])# AC_CHECK_FILE
2570 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2571 # -----------------------------------------------------------------
2572 AC_DEFUN([AC_CHECK_FILES],
2573 [m4_foreach_w([AC_FILE_NAME], [$1],
2574   [AC_CHECK_FILE(AC_FILE_NAME,
2575                  [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2576                                     [Define to 1 if you have the
2577                                      file `]AC_File['.])
2578 $2],
2579                  [$3])])])
2582 ## ------------------------------- ##
2583 ## Checking for declared symbols.  ##
2584 ## ------------------------------- ##
2587 # AC_CHECK_DECL(SYMBOL,
2588 #               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2589 #               [INCLUDES = DEFAULT-INCLUDES])
2590 # -------------------------------------------------------
2591 # Check whether SYMBOL (a function, variable, or constant) is declared.
2592 AC_DEFUN([AC_CHECK_DECL],
2593 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2594 AC_CACHE_CHECK([whether $1 is declared], [ac_Symbol],
2595 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2596 [#ifndef $1
2597   (void) $1;
2598 #endif
2599 ])],
2600                    [AS_VAR_SET([ac_Symbol], [yes])],
2601                    [AS_VAR_SET([ac_Symbol], [no])])])
2602 AS_IF([test AS_VAR_GET([ac_Symbol]) = yes], [$2], [$3])[]dnl
2603 AS_VAR_POPDEF([ac_Symbol])dnl
2604 ])# AC_CHECK_DECL
2607 # AC_CHECK_DECLS(SYMBOLS,
2608 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2609 #                [INCLUDES = DEFAULT-INCLUDES])
2610 # --------------------------------------------------------
2611 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
2612 # documentation for a detailed explanation of this difference with
2613 # other AC_CHECK_*S macros.  SYMBOLS is an m4 list.
2614 AC_DEFUN([AC_CHECK_DECLS],
2615 [m4_foreach([AC_Symbol], [$1],
2616   [AC_CHECK_DECL(AC_Symbol,
2617                  [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2618                                      [Define to 1 if you have the declaration
2619                                      of `]AC_Symbol[', and to 0 if you don't.])
2620 $2],
2621                  [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2622 $3],
2623                  [$4])])
2624 ])# AC_CHECK_DECLS
2627 # AC_CHECK_DECLS_ONCE(SYMBOLS)
2628 # ----------------------------
2629 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
2630 AC_DEFUN([AC_CHECK_DECLS_ONCE],
2632   m4_foreach([AC_Symbol], [$1],
2633     [AC_DEFUN([_AC_Check_Decl_]m4_defn([AC_Symbol]),
2634        [AC_CHECK_DECLS(m4_defn([AC_Symbol]))])
2635      AC_REQUIRE([_AC_Check_Decl_]m4_defn([AC_Symbol]))])
2640 ## ---------------------------------- ##
2641 ## Replacement of library functions.  ##
2642 ## ---------------------------------- ##
2645 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2646 # -----------------------------
2647 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2648 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2649 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
2652 # AC_LIBSOURCE(FILE-NAME)
2653 # -----------------------
2654 # Announce we might need the file `FILE-NAME'.
2655 m4_define([AC_LIBSOURCE], [])
2658 # AC_LIBSOURCES([FILE-NAME1, ...])
2659 # -------------------------------
2660 # Announce we might need these files.
2661 m4_define([AC_LIBSOURCES],
2662 [m4_foreach([_AC_FILE_NAME], [$1],
2663             [AC_LIBSOURCE(_AC_FILE_NAME)])])
2666 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
2667 # --------------------------------------------
2668 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2669 m4_define([_AC_LIBOBJ],
2670 [AS_LITERAL_IF([$1],
2671                [AC_LIBSOURCE([$1.c])],
2672                [$2])dnl
2673 case " $LIB@&t@OBJS " in
2674   *" $1.$ac_objext "* ) ;;
2675   *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
2676 esac
2680 # AC_LIBOBJ(FILE-NAME-NOEXT)
2681 # -------------------------
2682 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2683 m4_define([AC_LIBOBJ],
2684 [_AC_LIBOBJ([$1],
2685             [AC_DIAGNOSE(syntax,
2686                          [$0($1): you should use literals])])dnl
2690 # _AC_LIBOBJS_NORMALIZE
2691 # ---------------------
2692 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
2693 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2694 # Used with AC_CONFIG_COMMANDS_PRE.
2695 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2696 [ac_libobjs=
2697 ac_ltlibobjs=
2698 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2699   # 1. Remove the extension, and $U if already installed.
2700   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2701   ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
2702   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
2703   #    will be set to the directory where LIBOBJS objects are built.
2704   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
2705   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
2706 done
2707 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2708 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2712 ## ----------------------------------- ##
2713 ## Checking compiler characteristics.  ##
2714 ## ----------------------------------- ##
2717 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2718 # -------------------------------------------------------------------
2719 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2720 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2721 m4_define([_AC_COMPUTE_INT_COMPILE],
2722 [# Depending upon the size, compute the lo and hi bounds.
2723 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2724  [ac_lo=0 ac_mid=0
2725   while :; do
2726     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2727                        [ac_hi=$ac_mid; break],
2728                        [ac_lo=`expr $ac_mid + 1`
2729                         if test $ac_lo -le $ac_mid; then
2730                           ac_lo= ac_hi=
2731                           break
2732                         fi
2733                         ac_mid=`expr 2 '*' $ac_mid + 1`])
2734   done],
2735 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2736  [ac_hi=-1 ac_mid=-1
2737   while :; do
2738     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2739                        [ac_lo=$ac_mid; break],
2740                        [ac_hi=`expr '(' $ac_mid ')' - 1`
2741                         if test $ac_mid -le $ac_hi; then
2742                           ac_lo= ac_hi=
2743                           break
2744                         fi
2745                         ac_mid=`expr 2 '*' $ac_mid`])
2746   done],
2747  [ac_lo= ac_hi=])])
2748 # Binary search between lo and hi bounds.
2749 while test "x$ac_lo" != "x$ac_hi"; do
2750   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2751   _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2752                      [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2753 done
2754 case $ac_lo in
2755 ?*) $2=$ac_lo;;
2756 '') $4 ;;
2757 esac[]dnl
2758 ])# _AC_COMPUTE_INT_COMPILE
2761 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2762 # ---------------------------------------------------------------
2763 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2764 m4_define([_AC_COMPUTE_INT_RUN],
2765 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2766                 [$2=`cat conftest.val`], [$4])])
2769 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
2770 # ----------------------------------------------------------
2771 AC_DEFUN([AC_COMPUTE_INT],
2772 [AC_LANG_COMPILER_REQUIRE()dnl
2773 if test "$cross_compiling" = yes; then
2774   _AC_COMPUTE_INT_COMPILE([$2], [$1], [$3], [$4])
2775 else
2776   _AC_COMPUTE_INT_RUN([$2], [$1], [$3], [$4])
2778 rm -f conftest.val[]dnl
2779 ])# _AC_COMPUTE_INT
2781 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2782 # -----------------------------------------------------------
2783 # FIXME: this private interface was used by several packages.
2784 # Give them time to transition to AC_COMPUTE_INT and then delete this one.
2785 AC_DEFUN([_AC_COMPUTE_INT],
2786 [AC_COMPUTE_INT([$2], [$1], [$3], [$4])
2787 AC_DIAGNOSE([obsolete],
2788 [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
2789 future version or Autoconf.  Hence, it is suggested that you use
2790 instead the public AC_COMPUTE_INT macro.  Note that the arguments are
2791 slightly different between the two.])dnl
2792 ])# _AC_COMPUTE_INT