Whitespace cleanup.
[autoconf.git] / lib / autoconf / general.m4
blob896362dfcac7d604933b842851b82d9e7c403242
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])
302 # AC_VERSION
303 # ----------
304 # The current version of Autoconf parsing this file.
305 m4_copy([m4_PACKAGE_VERSION], [AC_VERSION])
311 ## ---------------- ##
312 ## Initialization.  ##
313 ## ---------------- ##
316 # All the following macros are used by AC_INIT.  Ideally, they should
317 # be presented in the order in which they are output.  Please, help us
318 # sorting it, or at least, don't augment the entropy.
321 # _AC_INIT_NOTICE
322 # ---------------
323 # Provide useful headers; override the HEADER-COMMENT created by M4sh.
324 m4_define([_AC_INIT_NOTICE],
325 [m4_divert_text([KILL], [m4_undivert([HEADER-COMMENT])])dnl
326 m4_divert_text([HEADER-COMMENT],
327 [@%:@ Guess values for system-dependent variables and create Makefiles.
328 @%:@ Generated by m4_PACKAGE_STRING[]dnl
329 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
331 m4_ifset([AC_PACKAGE_BUGREPORT],
332          [m4_divert_text([HEADER-COMMENT],
333                          [@%:@
334 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
338 # _AC_INIT_COPYRIGHT
339 # ------------------
340 # We dump to VERSION_FSF to make sure we are inserted before the
341 # user copyrights, and after the setup of the --version handling.
342 m4_define([_AC_INIT_COPYRIGHT],
343 [AC_COPYRIGHT(
344 [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
345 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
346 This configure script is free software; the Free Software Foundation
347 gives unlimited permission to copy, distribute and modify it.],
348               [VERSION_FSF])dnl
352 # File Descriptors
353 # ----------------
354 # Set up the file descriptors used by `configure'.
355 # File descriptor usage:
356 # 0 standard input (/dev/null)
357 # 1 file creation
358 # 2 errors and warnings
359 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
360 # AS_MESSAGE_FD checking for... messages and results
361 # AS_ORIGINAL_STDIN_FD original standard input (still open)
363 # stdin is /dev/null because checks that run programs may
364 # inadvertently run interactive ones, which would stop configuration
365 # until someone typed an EOF.
366 m4_define([AS_MESSAGE_FD], 6)
367 m4_define([AS_ORIGINAL_STDIN_FD], 7)
368 # That's how they used to be named.
369 AU_ALIAS([AC_FD_CC],  [AS_MESSAGE_LOG_FD])
370 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
373 # _AC_INIT_DEFAULTS
374 # -----------------
375 # Values which defaults can be set from `configure.ac'.
376 # `/bin/machine' is used in `glibcbug'.  The others are used in config.*
377 m4_define([_AC_INIT_DEFAULTS],
378 [m4_divert_push([DEFAULTS])dnl
380 exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1
382 # Name of the host.
383 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
384 # so uname gets run too.
385 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
388 # Initializations.
390 ac_default_prefix=/usr/local
391 ac_clean_files=
392 ac_config_libobj_dir=.
393 LIB@&t@OBJS=
394 cross_compiling=no
395 subdirs=
396 MFLAGS=
397 MAKEFLAGS=
398 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
399 AC_SUBST([PATH_SEPARATOR])dnl
401 # Identity of this package.
402 AC_SUBST([PACKAGE_NAME],
403          [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])dnl
404 AC_SUBST([PACKAGE_TARNAME],
405          [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])dnl
406 AC_SUBST([PACKAGE_VERSION],
407          [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])dnl
408 AC_SUBST([PACKAGE_STRING],
409          [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
410 AC_SUBST([PACKAGE_BUGREPORT],
411          [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
413 m4_divert_pop([DEFAULTS])dnl
414 m4_wrap([m4_divert_text([DEFAULTS],
415 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS],  [m4_defn([_AC_SUBST_VARS])])'
416 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
417 ac_user_opts='
418 enable_option_checking
419 m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
421 m4_ifdef([_AC_PRECIOUS_VARS],
422   [_AC_ARG_VAR_STORE[]dnl
423    _AC_ARG_VAR_VALIDATE[]dnl
424    ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
425 m4_ifdef([_AC_LIST_SUBDIRS],
426   [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
427 ])])dnl
428 ])# _AC_INIT_DEFAULTS
431 # AC_PREFIX_DEFAULT(PREFIX)
432 # -------------------------
433 AC_DEFUN([AC_PREFIX_DEFAULT],
434 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
437 # AC_PREFIX_PROGRAM(PROGRAM)
438 # --------------------------
439 # Guess the value for the `prefix' variable by looking for
440 # the argument program along PATH and taking its parent.
441 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
442 # set `prefix' to /usr/local/gnu.
443 # This comes too late to find a site file based on the prefix,
444 # and it might use a cached value for the path.
445 # No big loss, I think, since most configures don't use this macro anyway.
446 AC_DEFUN([AC_PREFIX_PROGRAM],
447 [if test "x$prefix" = xNONE; then
448 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
449   _AS_ECHO_N([checking for prefix by ])
450   AC_PATH_PROG(ac_prefix_program, [$1])
451   if test -n "$ac_prefix_program"; then
452     prefix=`AS_DIRNAME(["$ac_prefix_program"])`
453     prefix=`AS_DIRNAME(["$prefix"])`
454   fi
456 ])# AC_PREFIX_PROGRAM
459 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
460 # ---------------------------------------------
461 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
462 # relative to the directory that configure is in, which we can look
463 # for to find out if srcdir is correct.
464 AC_DEFUN([AC_CONFIG_SRCDIR],
465 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
468 # _AC_INIT_DIRCHECK
469 # -----------------
470 # Set ac_pwd, and sanity-check it and the source and installation directories.
472 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
474 AC_DEFUN([_AC_INIT_DIRCHECK],
475 [m4_divert_push([PARSE_ARGS])dnl
477 ac_pwd=`pwd` && test -n "$ac_pwd" &&
478 ac_ls_di=`ls -di .` &&
479 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
480   AC_MSG_ERROR([Working directory cannot be determined])
481 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
482   AC_MSG_ERROR([pwd does not report name of working directory])
484 m4_divert_pop([PARSE_ARGS])dnl
485 ])# _AC_INIT_DIRCHECK
487 # _AC_INIT_SRCDIR
488 # ---------------
489 # Compute `srcdir' based on `$ac_unique_file'.
491 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
493 AC_DEFUN([_AC_INIT_SRCDIR],
494 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
495 m4_divert_push([PARSE_ARGS])dnl
497 # Find the source files, if location was not specified.
498 if test -z "$srcdir"; then
499   ac_srcdir_defaulted=yes
500   # Try the directory containing this script, then the parent directory.
501   ac_confdir=`AS_DIRNAME(["$[0]"])`
502   srcdir=$ac_confdir
503   if test ! -r "$srcdir/$ac_unique_file"; then
504     srcdir=..
505   fi
506 else
507   ac_srcdir_defaulted=no
509 if test ! -r "$srcdir/$ac_unique_file"; then
510   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
511   AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
513 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
514 ac_abs_confdir=`(
515         cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
516         pwd)`
517 # When building in place, set srcdir=.
518 if test "$ac_abs_confdir" = "$ac_pwd"; then
519   srcdir=.
521 # Remove unnecessary trailing slashes from srcdir.
522 # Double slashes in file names in object file debugging info
523 # mess up M-x gdb in Emacs.
524 case $srcdir in
525 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
526 esac
527 m4_divert_pop([PARSE_ARGS])dnl
528 ])# _AC_INIT_SRCDIR
531 # _AC_INIT_PARSE_ARGS
532 # -------------------
533 m4_define([_AC_INIT_PARSE_ARGS],
534 [m4_divert_push([PARSE_ARGS])dnl
536 # Initialize some variables set by options.
537 ac_init_help=
538 ac_init_version=false
539 ac_unrecognized_opts=
540 ac_unrecognized_sep=
541 # The variables have the same names as the options, with
542 # dashes changed to underlines.
543 cache_file=/dev/null
544 AC_SUBST(exec_prefix, NONE)dnl
545 no_create=
546 no_recursion=
547 AC_SUBST(prefix, NONE)dnl
548 program_prefix=NONE
549 program_suffix=NONE
550 AC_SUBST(program_transform_name, [s,x,x,])dnl
551 silent=
552 site=
553 srcdir=
554 verbose=
555 x_includes=NONE
556 x_libraries=NONE
558 # Installation directory options.
559 # These are left unexpanded so users can "make install exec_prefix=/foo"
560 # and all the variables that are supposed to be based on exec_prefix
561 # by default will actually change.
562 # Use braces instead of parens because sh, perl, etc. also accept them.
563 # (The list follows the same order as the GNU Coding Standards.)
564 AC_SUBST([bindir],         ['${exec_prefix}/bin'])dnl
565 AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl
566 AC_SUBST([libexecdir],     ['${exec_prefix}/libexec'])dnl
567 AC_SUBST([datarootdir],    ['${prefix}/share'])dnl
568 AC_SUBST([datadir],        ['${datarootdir}'])dnl
569 AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl
570 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
571 AC_SUBST([localstatedir],  ['${prefix}/var'])dnl
572 AC_SUBST([includedir],     ['${prefix}/include'])dnl
573 AC_SUBST([oldincludedir],  ['/usr/include'])dnl
574 AC_SUBST([docdir],         [m4_ifset([AC_PACKAGE_TARNAME],
575                                      ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
576                                      ['${datarootdir}/doc/${PACKAGE}'])])dnl
577 AC_SUBST([infodir],        ['${datarootdir}/info'])dnl
578 AC_SUBST([htmldir],        ['${docdir}'])dnl
579 AC_SUBST([dvidir],         ['${docdir}'])dnl
580 AC_SUBST([pdfdir],         ['${docdir}'])dnl
581 AC_SUBST([psdir],          ['${docdir}'])dnl
582 AC_SUBST([libdir],         ['${exec_prefix}/lib'])dnl
583 AC_SUBST([localedir],      ['${datarootdir}/locale'])dnl
584 AC_SUBST([mandir],         ['${datarootdir}/man'])dnl
586 ac_prev=
587 ac_dashdash=
588 for ac_option
590   # If the previous option needs an argument, assign it.
591   if test -n "$ac_prev"; then
592     eval $ac_prev=\$ac_option
593     ac_prev=
594     continue
595   fi
597   case $ac_option in
598   *=*)  ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
599   *)    ac_optarg=yes ;;
600   esac
602   # Accept the important Cygnus configure options, so we can diagnose typos.
604   case $ac_dashdash$ac_option in
605   --)
606     ac_dashdash=yes ;;
608   -bindir | --bindir | --bindi | --bind | --bin | --bi)
609     ac_prev=bindir ;;
610   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
611     bindir=$ac_optarg ;;
613   -build | --build | --buil | --bui | --bu)
614     ac_prev=build_alias ;;
615   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
616     build_alias=$ac_optarg ;;
618   -cache-file | --cache-file | --cache-fil | --cache-fi \
619   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
620     ac_prev=cache_file ;;
621   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
622   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
623     cache_file=$ac_optarg ;;
625   --config-cache | -C)
626     cache_file=config.cache ;;
628   -datadir | --datadir | --datadi | --datad)
629     ac_prev=datadir ;;
630   -datadir=* | --datadir=* | --datadi=* | --datad=*)
631     datadir=$ac_optarg ;;
633   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
634   | --dataroo | --dataro | --datar)
635     ac_prev=datarootdir ;;
636   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
637   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
638     datarootdir=$ac_optarg ;;
640   _AC_INIT_PARSE_ENABLE([disable])
642   -docdir | --docdir | --docdi | --doc | --do)
643     ac_prev=docdir ;;
644   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
645     docdir=$ac_optarg ;;
647   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
648     ac_prev=dvidir ;;
649   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
650     dvidir=$ac_optarg ;;
652   _AC_INIT_PARSE_ENABLE([enable])
654   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
655   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
656   | --exec | --exe | --ex)
657     ac_prev=exec_prefix ;;
658   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
659   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
660   | --exec=* | --exe=* | --ex=*)
661     exec_prefix=$ac_optarg ;;
663   -gas | --gas | --ga | --g)
664     # Obsolete; use --with-gas.
665     with_gas=yes ;;
667   -help | --help | --hel | --he | -h)
668     ac_init_help=long ;;
669   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
670     ac_init_help=recursive ;;
671   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
672     ac_init_help=short ;;
674   -host | --host | --hos | --ho)
675     ac_prev=host_alias ;;
676   -host=* | --host=* | --hos=* | --ho=*)
677     host_alias=$ac_optarg ;;
679   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
680     ac_prev=htmldir ;;
681   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
682   | --ht=*)
683     htmldir=$ac_optarg ;;
685   -includedir | --includedir | --includedi | --included | --include \
686   | --includ | --inclu | --incl | --inc)
687     ac_prev=includedir ;;
688   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
689   | --includ=* | --inclu=* | --incl=* | --inc=*)
690     includedir=$ac_optarg ;;
692   -infodir | --infodir | --infodi | --infod | --info | --inf)
693     ac_prev=infodir ;;
694   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
695     infodir=$ac_optarg ;;
697   -libdir | --libdir | --libdi | --libd)
698     ac_prev=libdir ;;
699   -libdir=* | --libdir=* | --libdi=* | --libd=*)
700     libdir=$ac_optarg ;;
702   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
703   | --libexe | --libex | --libe)
704     ac_prev=libexecdir ;;
705   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
706   | --libexe=* | --libex=* | --libe=*)
707     libexecdir=$ac_optarg ;;
709   -localedir | --localedir | --localedi | --localed | --locale)
710     ac_prev=localedir ;;
711   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
712     localedir=$ac_optarg ;;
714   -localstatedir | --localstatedir | --localstatedi | --localstated \
715   | --localstate | --localstat | --localsta | --localst | --locals)
716     ac_prev=localstatedir ;;
717   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
718   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
719     localstatedir=$ac_optarg ;;
721   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
722     ac_prev=mandir ;;
723   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
724     mandir=$ac_optarg ;;
726   -nfp | --nfp | --nf)
727     # Obsolete; use --without-fp.
728     with_fp=no ;;
730   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
731   | --no-cr | --no-c | -n)
732     no_create=yes ;;
734   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
735   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
736     no_recursion=yes ;;
738   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
739   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
740   | --oldin | --oldi | --old | --ol | --o)
741     ac_prev=oldincludedir ;;
742   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
743   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
744   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
745     oldincludedir=$ac_optarg ;;
747   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
748     ac_prev=prefix ;;
749   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
750     prefix=$ac_optarg ;;
752   -program-prefix | --program-prefix | --program-prefi | --program-pref \
753   | --program-pre | --program-pr | --program-p)
754     ac_prev=program_prefix ;;
755   -program-prefix=* | --program-prefix=* | --program-prefi=* \
756   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
757     program_prefix=$ac_optarg ;;
759   -program-suffix | --program-suffix | --program-suffi | --program-suff \
760   | --program-suf | --program-su | --program-s)
761     ac_prev=program_suffix ;;
762   -program-suffix=* | --program-suffix=* | --program-suffi=* \
763   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
764     program_suffix=$ac_optarg ;;
766   -program-transform-name | --program-transform-name \
767   | --program-transform-nam | --program-transform-na \
768   | --program-transform-n | --program-transform- \
769   | --program-transform | --program-transfor \
770   | --program-transfo | --program-transf \
771   | --program-trans | --program-tran \
772   | --progr-tra | --program-tr | --program-t)
773     ac_prev=program_transform_name ;;
774   -program-transform-name=* | --program-transform-name=* \
775   | --program-transform-nam=* | --program-transform-na=* \
776   | --program-transform-n=* | --program-transform-=* \
777   | --program-transform=* | --program-transfor=* \
778   | --program-transfo=* | --program-transf=* \
779   | --program-trans=* | --program-tran=* \
780   | --progr-tra=* | --program-tr=* | --program-t=*)
781     program_transform_name=$ac_optarg ;;
783   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
784     ac_prev=pdfdir ;;
785   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
786     pdfdir=$ac_optarg ;;
788   -psdir | --psdir | --psdi | --psd | --ps)
789     ac_prev=psdir ;;
790   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
791     psdir=$ac_optarg ;;
793   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
794   | -silent | --silent | --silen | --sile | --sil)
795     silent=yes ;;
797   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
798     ac_prev=sbindir ;;
799   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
800   | --sbi=* | --sb=*)
801     sbindir=$ac_optarg ;;
803   -sharedstatedir | --sharedstatedir | --sharedstatedi \
804   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
805   | --sharedst | --shareds | --shared | --share | --shar \
806   | --sha | --sh)
807     ac_prev=sharedstatedir ;;
808   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
809   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
810   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
811   | --sha=* | --sh=*)
812     sharedstatedir=$ac_optarg ;;
814   -site | --site | --sit)
815     ac_prev=site ;;
816   -site=* | --site=* | --sit=*)
817     site=$ac_optarg ;;
819   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
820     ac_prev=srcdir ;;
821   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
822     srcdir=$ac_optarg ;;
824   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
825   | --syscon | --sysco | --sysc | --sys | --sy)
826     ac_prev=sysconfdir ;;
827   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
828   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
829     sysconfdir=$ac_optarg ;;
831   -target | --target | --targe | --targ | --tar | --ta | --t)
832     ac_prev=target_alias ;;
833   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
834     target_alias=$ac_optarg ;;
836   -v | -verbose | --verbose | --verbos | --verbo | --verb)
837     verbose=yes ;;
839   -version | --version | --versio | --versi | --vers | -V)
840     ac_init_version=: ;;
842   _AC_INIT_PARSE_ENABLE([with])
844   _AC_INIT_PARSE_ENABLE([without])
846   --x)
847     # Obsolete; use --with-x.
848     with_x=yes ;;
850   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
851   | --x-incl | --x-inc | --x-in | --x-i)
852     ac_prev=x_includes ;;
853   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
854   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
855     x_includes=$ac_optarg ;;
857   -x-libraries | --x-libraries | --x-librarie | --x-librari \
858   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
859     ac_prev=x_libraries ;;
860   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
861   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
862     x_libraries=$ac_optarg ;;
864   -*) AC_MSG_ERROR([unrecognized option: $ac_option
865 Try `$[0] --help' for more information.])
866     ;;
868   *=*)
869     ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
870     # Reject names that are not valid shell variable names.
871     expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
872       AC_MSG_ERROR([invalid variable name: $ac_envvar])
873     eval $ac_envvar=\$ac_optarg
874     export $ac_envvar ;;
876   *)
877     # FIXME: should be removed in autoconf 3.0.
878     AC_MSG_WARN([you should use --build, --host, --target])
879     expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
880       AC_MSG_WARN([invalid host type: $ac_option])
881     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
882     ;;
884   esac
885 done
887 if test -n "$ac_prev"; then
888   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
889   AC_MSG_ERROR([missing argument to $ac_option])
892 if test -n "$ac_unrecognized_opts"; then
893   case $enable_option_checking in
894     no) ;;
895     fatal) AC_MSG_ERROR([Unrecognized options: $ac_unrecognized_opts]) ;;
896     *)     AC_MSG_WARN( [Unrecognized options: $ac_unrecognized_opts]) ;;
897   esac
900 # Check all directory arguments for consistency.
901 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
902                 datadir sysconfdir sharedstatedir localstatedir includedir \
903                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
904                 libdir localedir mandir
906   eval ac_val=\$$ac_var
907   # Remove trailing slashes.
908   case $ac_val in
909     */ )
910       ac_val=`expr "X$ac_val" : 'X\(.*[[^/]]\)' \| "X$ac_val" : 'X\(.*\)'`
911       eval $ac_var=\$ac_val;;
912   esac
913   # Be sure to have absolute directory names.
914   case $ac_val in
915     [[\\/$]]* | ?:[[\\/]]* )  continue;;
916     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
917   esac
918   AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
919 done
921 # There might be people who depend on the old broken behavior: `$host'
922 # used to hold the argument of --host etc.
923 # FIXME: To remove some day.
924 build=$build_alias
925 host=$host_alias
926 target=$target_alias
928 # FIXME: To remove some day.
929 if test "x$host_alias" != x; then
930   if test "x$build_alias" = x; then
931     cross_compiling=maybe
932     AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
933     If a cross compiler is detected then cross compile mode will be used.])
934   elif test "x$build_alias" != "x$host_alias"; then
935     cross_compiling=yes
936   fi
939 ac_tool_prefix=
940 test -n "$host_alias" && ac_tool_prefix=$host_alias-
942 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
944 m4_divert_pop([PARSE_ARGS])dnl
945 ])# _AC_INIT_PARSE_ARGS
948 # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
949 # ----------------------------------
950 # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
952 m4_define([_AC_INIT_PARSE_ENABLE],
953 [m4_bmatch([$1], [^with],
954            [_AC_INIT_PARSE_ENABLE2([$1], [with])],
955            [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
958 # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
959 # --------------------------------------------------
960 # Handle an `--enable' or a `--with' option.
962 # OPTION-NAME is `enable', `disable', `with', or `without'.
963 # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'.
965 # Positive variant of the option is recognized by the condition
966 #       OPTION-NAME == POSITIVE-NAME .
968 m4_define([_AC_INIT_PARSE_ENABLE2],
969 [-$1-* | --$1-*)
970     ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
971     # Reject names that are not valid shell variable names.
972     expr "x$ac_useropt" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
973       AC_MSG_ERROR(
974         [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt])
975     ac_useropt_orig=$ac_useropt
976     ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-.]]/_/g'`
977     case $ac_user_opts in
978       *"
979 "$2_$ac_useropt"
980 "*) ;;
981       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
982          ac_unrecognized_sep=', ';;
983     esac
984     eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
988 # _AC_INIT_HELP
989 # -------------
990 # Handle the `configure --help' message.
991 m4_define([_AC_INIT_HELP],
992 [m4_divert_push([HELP_BEGIN])dnl
995 # Report the --help message.
997 if test "$ac_init_help" = "long"; then
998   # Omit some internal or obsolete options to make the list less imposing.
999   # This message is too long to be a string in the A/UX 3.1 sh.
1000   cat <<_ACEOF
1001 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
1002                         [AC_PACKAGE_STRING],
1003                         [this package]) to adapt to many kinds of systems.
1005 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1007 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
1008 VAR=VALUE.  See below for descriptions of some of the useful variables.
1010 Defaults for the options are specified in brackets.
1012 Configuration:
1013   -h, --help              display this help and exit
1014       --help=short        display options specific to this package
1015       --help=recursive    display the short help of all the included packages
1016   -V, --version           display version information and exit
1017   -q, --quiet, --silent   do not print \`checking...' messages
1018       --cache-file=FILE   cache test results in FILE [disabled]
1019   -C, --config-cache      alias for \`--cache-file=config.cache'
1020   -n, --no-create         do not create output files
1021       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1023 Installation directories:
1024 ]AS_HELP_STRING([--prefix=PREFIX],
1025   [install architecture-independent files in PREFIX [$ac_default_prefix]])
1026 AS_HELP_STRING([--exec-prefix=EPREFIX],
1027   [install architecture-dependent files in EPREFIX [PREFIX]])[
1029 By default, \`make install' will install all the files in
1030 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1031 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1032 for instance \`--prefix=\$HOME'.
1034 For better control, use the options below.
1036 Fine tuning of the installation directories:
1037   --bindir=DIR            user executables [EPREFIX/bin]
1038   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1039   --libexecdir=DIR        program executables [EPREFIX/libexec]
1040   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1041   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1042   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1043   --libdir=DIR            object code libraries [EPREFIX/lib]
1044   --includedir=DIR        C header files [PREFIX/include]
1045   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1046   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1047   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1048   --infodir=DIR           info documentation [DATAROOTDIR/info]
1049   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1050   --mandir=DIR            man documentation [DATAROOTDIR/man]
1051 ]AS_HELP_STRING([--docdir=DIR],
1052   [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME],
1053     [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[
1054   --htmldir=DIR           html documentation [DOCDIR]
1055   --dvidir=DIR            dvi documentation [DOCDIR]
1056   --pdfdir=DIR            pdf documentation [DOCDIR]
1057   --psdir=DIR             ps documentation [DOCDIR]
1058 _ACEOF
1060   cat <<\_ACEOF]
1061 m4_divert_pop([HELP_BEGIN])dnl
1062 dnl The order of the diversions here is
1063 dnl - HELP_BEGIN
1064 dnl   which may be extended by extra generic options such as with X or
1065 dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
1067 dnl - HELP_CANON
1068 dnl   Support for cross compilation (--build, --host and --target).
1069 dnl   Display only in long --help.
1071 dnl - HELP_ENABLE
1072 dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1073 dnl   then implements the header of the non generic options.
1075 dnl - HELP_WITH
1077 dnl - HELP_VAR
1079 dnl - HELP_VAR_END
1081 dnl - HELP_END
1082 dnl   initialized below, in which we dump the trailer (handling of the
1083 dnl   recursion for instance).
1084 m4_divert_push([HELP_ENABLE])dnl
1085 _ACEOF
1088 if test -n "$ac_init_help"; then
1089 m4_ifset([AC_PACKAGE_STRING],
1090 [  case $ac_init_help in
1091      short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1092    esac])
1093   cat <<\_ACEOF
1094 m4_divert_pop([HELP_ENABLE])dnl
1095 m4_divert_push([HELP_END])dnl
1096 m4_ifset([AC_PACKAGE_BUGREPORT], [
1097 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1098 _ACEOF
1099 ac_status=$?
1102 if test "$ac_init_help" = "recursive"; then
1103   # If there are subdirs, report their specific --help.
1104   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1105     test -d "$ac_dir" || continue
1106     _AC_SRCDIRS(["$ac_dir"])
1107     cd "$ac_dir" || { ac_status=$?; continue; }
1108     # Check for guested configure.
1109     if test -f "$ac_srcdir/configure.gnu"; then
1110       echo &&
1111       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1112     elif test -f "$ac_srcdir/configure"; then
1113       echo &&
1114       $SHELL "$ac_srcdir/configure" --help=recursive
1115     else
1116       AC_MSG_WARN([no configuration information is in $ac_dir])
1117     fi || ac_status=$?
1118     cd "$ac_pwd" || { ac_status=$?; break; }
1119   done
1122 test -n "$ac_init_help" && exit $ac_status
1123 m4_divert_pop([HELP_END])dnl
1124 ])# _AC_INIT_HELP
1127 # _AC_INIT_VERSION
1128 # ----------------
1129 # Handle the `configure --version' message.
1130 m4_define([_AC_INIT_VERSION],
1131 [m4_divert_text([VERSION_BEGIN],
1132 [if $ac_init_version; then
1133   cat <<\_ACEOF
1134 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1135 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1136 generated by m4_PACKAGE_STRING])
1137 m4_divert_text([VERSION_END],
1138 [_ACEOF
1139   exit
1140 fi])dnl
1141 ])# _AC_INIT_VERSION
1144 # _AC_INIT_CONFIG_LOG
1145 # -------------------
1146 # Initialize the config.log file descriptor and write header to it.
1147 m4_define([_AC_INIT_CONFIG_LOG],
1148 [m4_divert_text([INIT_PREPARE],
1149 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1150 cat >config.log <<_ACEOF
1151 This file contains any messages produced by compilers while
1152 running configure, to aid debugging if configure makes a mistake.
1154 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1155 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1156 generated by m4_PACKAGE_STRING.  Invocation command line was
1158   $ $[0] $[@]
1160 _ACEOF
1161 exec AS_MESSAGE_LOG_FD>>config.log
1162 AS_UNAME >&AS_MESSAGE_LOG_FD
1164 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1167 m4_text_box([Core tests.])
1169 _ACEOF
1170 ])])# _AC_INIT_CONFIG_LOG
1173 # _AC_INIT_PREPARE
1174 # ----------------
1175 # Called by AC_INIT to build the preamble of the `configure' scripts.
1176 # 1. Trap and clean up various tmp files.
1177 # 2. Set up the fd and output files
1178 # 3. Remember the options given to `configure' for `config.status --recheck'.
1179 # 4. Initiates confdefs.h
1180 # 5. Loads site and cache files
1181 m4_define([_AC_INIT_PREPARE],
1182 [m4_divert_push([INIT_PREPARE])dnl
1184 # Keep a trace of the command line.
1185 # Strip out --no-create and --no-recursion so they do not pile up.
1186 # Strip out --silent because we don't want to record it for future runs.
1187 # Also quote any args containing shell meta-characters.
1188 # Make two passes to allow for proper duplicate-argument suppression.
1189 ac_configure_args=
1190 ac_configure_args0=
1191 ac_configure_args1=
1192 ac_must_keep_next=false
1193 for ac_pass in 1 2
1195   for ac_arg
1196   do
1197     case $ac_arg in
1198     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1199     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1200     | -silent | --silent | --silen | --sile | --sil)
1201       continue ;;
1202     *\'*)
1203       ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1204     esac
1205     case $ac_pass in
1206     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1207     2)
1208       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1209 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1210 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1211 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1212 dnl give --prefix foo bar).
1213       if test $ac_must_keep_next = true; then
1214         ac_must_keep_next=false # Got value, back to normal.
1215       else
1216         case $ac_arg in
1217 dnl Use broad patterns, as arguments that would have already made configure
1218 dnl exit don't matter.
1219           *=* | --config-cache | -C | -disable-* | --disable-* \
1220           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1221           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1222           | -with-* | --with-* | -without-* | --without-* | --x)
1223             case "$ac_configure_args0 " in
1224               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1225             esac
1226             ;;
1227           -* ) ac_must_keep_next=true ;;
1228         esac
1229       fi
1230       ac_configure_args="$ac_configure_args '$ac_arg'"
1231       ;;
1232     esac
1233   done
1234 done
1235 AS_UNSET(ac_configure_args0)
1236 AS_UNSET(ac_configure_args1)
1238 # When interrupted or exit'd, cleanup temporary files, and complete
1239 # config.log.  We remove comments because anyway the quotes in there
1240 # would cause problems or look ugly.
1241 # WARNING: Use '\'' to represent an apostrophe within the trap.
1242 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1243 trap 'exit_status=$?
1244   # Save into config.log some information that might help in debugging.
1245   {
1246     echo
1248     AS_BOX([Cache variables.])
1249     echo
1250     m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1251                   [^ *\(#.*\)?
1252 ],                [],
1253                   ['], ['\\''])
1254     echo
1256     AS_BOX([Output variables.])
1257     echo
1258     for ac_var in $ac_subst_vars
1259     do
1260       eval ac_val=\$$ac_var
1261       case $ac_val in
1262       *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1263       esac
1264       AS_ECHO(["$ac_var='\''$ac_val'\''"])
1265     done | sort
1266     echo
1268     if test -n "$ac_subst_files"; then
1269       AS_BOX([File substitutions.])
1270       echo
1271       for ac_var in $ac_subst_files
1272       do
1273         eval ac_val=\$$ac_var
1274         case $ac_val in
1275         *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1276         esac
1277         AS_ECHO(["$ac_var='\''$ac_val'\''"])
1278       done | sort
1279       echo
1280     fi
1282     if test -s confdefs.h; then
1283       AS_BOX([confdefs.h.])
1284       echo
1285       cat confdefs.h
1286       echo
1287     fi
1288     test "$ac_signal" != 0 &&
1289       AS_ECHO(["$as_me: caught signal $ac_signal"])
1290     AS_ECHO(["$as_me: exit $exit_status"])
1291   } >&AS_MESSAGE_LOG_FD
1292   rm -f core *.core core.conftest.* &&
1293     rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1294     exit $exit_status
1295 ' 0
1296 for ac_signal in 1 2 13 15; do
1297   trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1298 done
1299 ac_signal=0
1301 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1302 rm -f -r conftest* confdefs.h
1303 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1304 dnl containing less than 14 bytes (including the newline).
1305 dnl But the defines below solve this problem.
1307 # Predefined preprocessor variables.
1308 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1309                    [Define to the full name of this package.])
1310 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1311                    [Define to the one symbol short name of this package.])
1312 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1313                    [Define to the version of this package.])
1314 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1315                    [Define to the full name and version of this package.])
1316 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1317                    [Define to the address where bug reports for this package
1318                     should be sent.])
1320 # Let the site file select an alternate cache file if it wants to.
1321 AC_SITE_LOAD
1322 AC_CACHE_LOAD
1323 m4_divert_pop([INIT_PREPARE])dnl
1324 ])# _AC_INIT_PREPARE
1327 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1328 # ----------------------------------------
1329 # This macro is used only for Autoupdate.
1330 AU_DEFUN([AC_INIT],
1331 [m4_ifval([$2], [[AC_INIT($@)]],
1332           [m4_ifval([$1],
1333 [[AC_INIT]
1334 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1338 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1339 # ----------------------------------------
1340 # Include the user macro files, prepare the diversions, and output the
1341 # preamble of the `configure' script.
1342 # Note that the order is important: first initialize, then set the
1343 # AC_CONFIG_SRCDIR.
1344 m4_define([AC_INIT],
1345 [# Forbidden tokens and exceptions.
1346 m4_pattern_forbid([^_?A[CHUM]_])
1347 m4_pattern_forbid([_AC_])
1348 m4_pattern_forbid([^LIBOBJS$],
1349                   [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1350 # Actually reserved by M4sh.
1351 m4_pattern_allow([^AS_FLAGS$])
1352 AS_INIT
1353 AS_PREPARE
1354 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1355 _AC_INIT_DEFAULTS
1356 _AC_INIT_PARSE_ARGS
1357 _AC_INIT_DIRCHECK
1358 _AC_INIT_SRCDIR
1359 _AC_INIT_HELP
1360 _AC_INIT_VERSION
1361 _AC_INIT_CONFIG_LOG
1362 _AC_INIT_PREPARE
1363 _AC_INIT_NOTICE
1364 _AC_INIT_COPYRIGHT
1365 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1367 dnl Substitute for predefined variables.
1368 AC_SUBST([DEFS])dnl
1369 AC_SUBST([ECHO_C])dnl
1370 AC_SUBST([ECHO_N])dnl
1371 AC_SUBST([ECHO_T])dnl
1372 AC_SUBST([LIBS])dnl
1373 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1374 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1375 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1377 AC_LANG_PUSH(C)
1383 ## ------------------------------------------------------------- ##
1384 ## Selecting optional features, working with optional software.  ##
1385 ## ------------------------------------------------------------- ##
1387 # AC_PRESERVE_HELP_ORDER
1388 # ----------------------
1389 # Emit help strings in the order given, rather than grouping all --enable-FOO
1390 # and all --with-BAR.
1391 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1392 [m4_divert_once([HELP_ENABLE], [[
1393 Optional Features and Packages:
1394   --disable-option-checking  ignore unrecognized --enable/--with options
1395   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1396   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1397   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1398   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
1399 m4_define([_m4_divert(HELP_ENABLE)],    _m4_divert(HELP_WITH))
1400 ])# AC_PRESERVE_HELP_ORDER
1402 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1403 # -------------------------------------------------------------------
1404 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1405 # OPTION is either "enable" or "with".
1407 m4_define([_AC_ENABLE_IF],
1408 [@%:@ Check whether --$1-$2 was given.
1409 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])[]dnl
1412 m4_define([_AC_ENABLE_IF_ACTION],
1413 [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
1414 ])dnl
1415 AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
1418 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1419 # ------------------------------------------------------------------------
1420 AC_DEFUN([AC_ARG_ENABLE],
1421 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1423 [m4_divert_once([HELP_ENABLE], [[
1424 Optional Features:
1425   --disable-option-checking  ignore unrecognized --enable/--with options
1426   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1427   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])])dnl
1428 m4_divert_once([HELP_ENABLE], [$2])dnl
1429 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1430 ])# AC_ARG_ENABLE
1433 AU_DEFUN([AC_ENABLE],
1434 [AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])])
1437 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1438 # --------------------------------------------------------------------
1439 AC_DEFUN([AC_ARG_WITH],
1440 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1442 [m4_divert_once([HELP_WITH], [[
1443 Optional Packages:
1444   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1445   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])])
1446 m4_divert_once([HELP_WITH], [$2])dnl
1447 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1448 ])# AC_ARG_WITH
1450 AU_DEFUN([AC_WITH],
1451 [AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])])
1453 # AC_DISABLE_OPTION_CHECKING
1454 # --------------------------------------------------------------------
1455 AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
1456 [m4_divert_once([DEFAULTS], [enable_option_checking=no])
1457 ])# AC_DISABLE_OPTION_CHECKING
1460 ## ----------------------------------------- ##
1461 ## Remembering variables for reconfiguring.  ##
1462 ## ----------------------------------------- ##
1465 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1466 # ----------------------------------
1467 # Register VARNAME as a precious variable, and document it in
1468 # `configure --help' (but only once).
1469 AC_DEFUN([AC_ARG_VAR],
1470 [m4_divert_once([HELP_VAR], [[
1471 Some influential environment variables:]])dnl
1472 m4_divert_once([HELP_VAR_END], [[
1473 Use these variables to override the choices made by `configure' or to help
1474 it to find libraries and programs with nonstandard names/locations.]])dnl
1475 m4_expand_once([m4_divert_text([HELP_VAR],
1476                                [AS_HELP_STRING([$1], [$2], [              ])])],
1477                [$0($1)])dnl
1478 AC_SUBST([$1])dnl
1479 _AC_ARG_VAR_PRECIOUS([$1])dnl
1480 ])# AC_ARG_VAR
1483 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1484 # -----------------------------
1485 # Declare VARNAME is precious.
1486 m4_define([_AC_ARG_VAR_PRECIOUS],
1487 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1488 ])dnl
1492 # _AC_ARG_VAR_STORE
1493 # -----------------
1494 # We try to diagnose when precious variables have changed.  To do this,
1495 # make two early snapshots (after the option processing to take
1496 # explicit variables into account) of those variables: one (ac_env_)
1497 # which represents the current run, and a second (ac_cv_env_) which,
1498 # at the first run, will be saved in the cache.  As an exception to
1499 # the cache mechanism, its loading will override these variables (non
1500 # `ac_cv_env_' cache value are only set when unset).
1502 # In subsequent runs, after having loaded the cache, compare
1503 # ac_cv_env_foo against ac_env_foo.  See _AC_ARG_VAR_VALIDATE.
1504 m4_define([_AC_ARG_VAR_STORE],
1505 [m4_divert_text([PARSE_ARGS],
1506 [for ac_var in $ac_precious_vars; do
1507   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1508   eval ac_env_${ac_var}_value=\$${ac_var}
1509   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1510   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1511 done])dnl
1515 # _AC_ARG_VAR_VALIDATE
1516 # --------------------
1517 # The precious variables are saved twice at the beginning of
1518 # configure.  E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1519 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1520 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1522 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1523 # content of the cached values, while `ac_env_' represents that of the
1524 # current values.
1526 # So we check that `ac_env_' and `ac_cv_env_' are consistent.  If
1527 # they aren't, die.
1528 m4_define([_AC_ARG_VAR_VALIDATE],
1529 [m4_divert_text([INIT_PREPARE],
1530 [# Check that the precious variables saved in the cache have kept the same
1531 # value.
1532 ac_cache_corrupted=false
1533 for ac_var in $ac_precious_vars; do
1534   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1535   eval ac_new_set=\$ac_env_${ac_var}_set
1536   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1537   eval ac_new_val=\$ac_env_${ac_var}_value
1538   case $ac_old_set,$ac_new_set in
1539     set,)
1540       AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1541       ac_cache_corrupted=: ;;
1542     ,set)
1543       AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1544       ac_cache_corrupted=: ;;
1545     ,);;
1546     *)
1547       if test "x$ac_old_val" != "x$ac_new_val"; then
1548         AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1549         AS_MESSAGE([  former value:  $ac_old_val], 2)
1550         AS_MESSAGE([  current value: $ac_new_val], 2)
1551         ac_cache_corrupted=:
1552       fi;;
1553   esac
1554   # Pass precious variables to config.status.
1555   if test "$ac_new_set" = set; then
1556     case $ac_new_val in
1557     *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1558     *) ac_arg=$ac_var=$ac_new_val ;;
1559     esac
1560     case " $ac_configure_args " in
1561       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1562       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1563     esac
1564   fi
1565 done
1566 if $ac_cache_corrupted; then
1567   AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1568   AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1569 fi])dnl
1570 ])# _AC_ARG_VAR_VALIDATE
1576 ## ---------------------------- ##
1577 ## Transforming program names.  ##
1578 ## ---------------------------- ##
1581 # AC_ARG_PROGRAM
1582 # --------------
1583 # This macro is expanded only once, to avoid that `foo' ends up being
1584 # installed as `ggfoo'.
1585 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1586 [dnl Document the options.
1587 m4_divert_push([HELP_BEGIN])dnl
1589 Program names:
1590   --program-prefix=PREFIX            prepend PREFIX to installed program names
1591   --program-suffix=SUFFIX            append SUFFIX to installed program names
1592   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1593 m4_divert_pop([HELP_BEGIN])dnl
1594 test "$program_prefix" != NONE &&
1595   program_transform_name="s&^&$program_prefix&;$program_transform_name"
1596 # Use a double $ so make ignores it.
1597 test "$program_suffix" != NONE &&
1598   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1599 # Double any \ or $.
1600 # By default was `s,x,x', remove it if useless.
1601 [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
1602 program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
1603 ])# AC_ARG_PROGRAM
1609 ## ------------------------- ##
1610 ## Finding auxiliary files.  ##
1611 ## ------------------------- ##
1614 # AC_CONFIG_AUX_DIR(DIR)
1615 # ----------------------
1616 # Find install-sh, config.sub, config.guess, and Cygnus configure
1617 # in directory DIR.  These are auxiliary files used in configuration.
1618 # DIR can be either absolute or relative to $srcdir.
1619 AC_DEFUN([AC_CONFIG_AUX_DIR],
1620 [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
1623 # AC_CONFIG_AUX_DIR_DEFAULT
1624 # -------------------------
1625 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1626 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1627 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1628 [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
1631 # AC_CONFIG_AUX_DIRS(DIR ...)
1632 # ---------------------------
1633 # Internal subroutine.
1634 # Search for the configuration auxiliary files in directory list $1.
1635 # We look only for install-sh, so users of AC_PROG_INSTALL
1636 # do not automatically need to distribute the other auxiliary files.
1637 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1638 [ac_aux_dir=
1639 for ac_dir in $1; do
1640   if test -f "$ac_dir/install-sh"; then
1641     ac_aux_dir=$ac_dir
1642     ac_install_sh="$ac_aux_dir/install-sh -c"
1643     break
1644   elif test -f "$ac_dir/install.sh"; then
1645     ac_aux_dir=$ac_dir
1646     ac_install_sh="$ac_aux_dir/install.sh -c"
1647     break
1648   elif test -f "$ac_dir/shtool"; then
1649     ac_aux_dir=$ac_dir
1650     ac_install_sh="$ac_aux_dir/shtool install -c"
1651     break
1652   fi
1653 done
1654 if test -z "$ac_aux_dir"; then
1655   AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1658 # These three variables are undocumented and unsupported,
1659 # and are intended to be withdrawn in a future Autoconf release.
1660 # They can cause serious problems if a builder's source tree is in a directory
1661 # whose full name contains unusual characters.
1662 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1663 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1664 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1666 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1667 ])# AC_CONFIG_AUX_DIRS
1672 ## ------------------------ ##
1673 ## Finding aclocal macros.  ##
1674 ## ------------------------ ##
1677 # AC_CONFIG_MACRO_DIR(DIR)
1678 # ------------------------
1679 # Declare directory containing additional macros for aclocal.
1680 AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
1684 ## --------------------- ##
1685 ## Requiring aux files.  ##
1686 ## --------------------- ##
1688 # AC_REQUIRE_AUX_FILE(FILE)
1689 # -------------------------
1690 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1691 # It announces FILE is required in the auxdir.
1692 m4_define([AC_REQUIRE_AUX_FILE],
1693 [AS_LITERAL_IF([$1], [],
1694                [AC_FATAL([$0: requires a literal argument])])])
1698 ## ----------------------------------- ##
1699 ## Getting the canonical system type.  ##
1700 ## ----------------------------------- ##
1702 # The inputs are:
1703 #    configure --host=HOST --target=TARGET --build=BUILD
1705 # The rules are:
1706 # 1. Build defaults to the current platform, as determined by config.guess.
1707 # 2. Host defaults to build.
1708 # 3. Target defaults to host.
1711 # _AC_CANONICAL_SPLIT(THING)
1712 # --------------------------
1713 # Generate the variables THING, THING_{alias cpu vendor os}.
1714 m4_define([_AC_CANONICAL_SPLIT],
1715 [case $ac_cv_$1 in
1716 *-*-*) ;;
1717 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1718 esac
1719 AC_SUBST([$1], [$ac_cv_$1])dnl
1720 ac_save_IFS=$IFS; IFS='-'
1721 set x $ac_cv_$1
1722 shift
1723 AC_SUBST([$1_cpu], [$[1]])dnl
1724 AC_SUBST([$1_vendor], [$[2]])dnl
1725 shift; shift
1726 [# Remember, the first character of IFS is used to create $]*,
1727 # except with old shells:
1728 $1_os=$[*]
1729 IFS=$ac_save_IFS
1730 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
1731 AC_SUBST([$1_os])dnl
1732 ])# _AC_CANONICAL_SPLIT
1735 # AC_CANONICAL_BUILD
1736 # ------------------
1737 AC_DEFUN([AC_CANONICAL_BUILD],
1738 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1739 AC_REQUIRE_AUX_FILE([config.sub])dnl
1740 AC_REQUIRE_AUX_FILE([config.guess])dnl
1741 m4_divert_once([HELP_CANON],
1743 System types:
1744   --build=BUILD     configure for building on BUILD [guessed]]])dnl
1745 # Make sure we can run config.sub.
1746 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1747   AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
1749 AC_CACHE_CHECK([build system type], [ac_cv_build],
1750 [ac_build_alias=$build_alias
1751 test "x$ac_build_alias" = x &&
1752   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1753 test "x$ac_build_alias" = x &&
1754   AC_MSG_ERROR([cannot guess build type; you must specify one])
1755 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1756   AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
1758 _AC_CANONICAL_SPLIT(build)
1759 ])# AC_CANONICAL_BUILD
1762 # AC_CANONICAL_HOST
1763 # -----------------
1764 AC_DEFUN([AC_CANONICAL_HOST],
1765 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1766 m4_divert_once([HELP_CANON],
1767 [[  --host=HOST       cross-compile to build programs to run on HOST [BUILD]]])dnl
1768 AC_CACHE_CHECK([host system type], [ac_cv_host],
1769 [if test "x$host_alias" = x; then
1770   ac_cv_host=$ac_cv_build
1771 else
1772   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1773     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
1776 _AC_CANONICAL_SPLIT([host])
1777 ])# AC_CANONICAL_HOST
1780 # AC_CANONICAL_TARGET
1781 # -------------------
1782 AC_DEFUN([AC_CANONICAL_TARGET],
1783 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1784 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1785 m4_divert_once([HELP_CANON],
1786 [[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
1787 AC_CACHE_CHECK([target system type], [ac_cv_target],
1788 [if test "x$target_alias" = x; then
1789   ac_cv_target=$ac_cv_host
1790 else
1791   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
1792     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
1795 _AC_CANONICAL_SPLIT([target])
1797 # The aliases save the names the user supplied, while $host etc.
1798 # will get canonicalized.
1799 test -n "$target_alias" &&
1800   test "$program_prefix$program_suffix$program_transform_name" = \
1801     NONENONEs,x,x, &&
1802   program_prefix=${target_alias}-[]dnl
1803 ])# AC_CANONICAL_TARGET
1806 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1809 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1810 # ------------------------------------------
1811 # If the cache file is inconsistent with the current host,
1812 # target and build system types, execute CMD or print a default
1813 # error message.  Now handled via _AC_ARG_VAR_PRECIOUS.
1814 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1817 ## ---------------------- ##
1818 ## Caching test results.  ##
1819 ## ---------------------- ##
1822 # AC_SITE_LOAD
1823 # ------------
1824 # Look for site- or system-specific initialization scripts.
1825 m4_define([AC_SITE_LOAD],
1826 [# Prefer an explicitly selected file to automatically selected ones.
1827 ac_site_file1=NONE
1828 ac_site_file2=NONE
1829 if test -n "$CONFIG_SITE"; then
1830   ac_site_file1=$CONFIG_SITE
1831 elif test "x$prefix" != xNONE; then
1832   ac_site_file1=$prefix/share/config.site
1833   ac_site_file2=$prefix/etc/config.site
1834 else
1835   ac_site_file1=$ac_default_prefix/share/config.site
1836   ac_site_file2=$ac_default_prefix/etc/config.site
1838 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1840   test "x$ac_site_file" = xNONE && continue
1841   if test -r "$ac_site_file"; then
1842     AC_MSG_NOTICE([loading site script $ac_site_file])
1843     sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1844     . "$ac_site_file"
1845   fi
1846 done
1850 # AC_CACHE_LOAD
1851 # -------------
1852 m4_define([AC_CACHE_LOAD],
1853 [if test -r "$cache_file"; then
1854   # Some versions of bash will fail to source /dev/null (special
1855   # files actually), so we avoid doing that.
1856   if test -f "$cache_file"; then
1857     AC_MSG_NOTICE([loading cache $cache_file])
1858     case $cache_file in
1859       [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
1860       *)                      . "./$cache_file";;
1861     esac
1862   fi
1863 else
1864   AC_MSG_NOTICE([creating cache $cache_file])
1865   >$cache_file
1867 ])# AC_CACHE_LOAD
1870 # _AC_CACHE_DUMP
1871 # --------------
1872 # Dump the cache to stdout.  It can be in a pipe (this is a requirement).
1873 m4_define([_AC_CACHE_DUMP],
1874 [# The following way of writing the cache mishandles newlines in values,
1875 # but we know of no workaround that is simple, portable, and efficient.
1876 # So, we kill variables containing newlines.
1877 # Ultrix sh set writes to stderr and can't be redirected directly,
1878 # and sets the high bit in the cache file unless we assign to the vars.
1880   for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
1881     eval ac_val=\$$ac_var
1882     case $ac_val in #(
1883     *${as_nl}*)
1884       case $ac_var in #(
1885       *_cv_*) AC_MSG_WARN([Cache variable $ac_var contains a newline.]) ;;
1886       esac
1887       case $ac_var in #(
1888       _ | IFS | as_nl) ;; #(
1889       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1890       *) $as_unset $ac_var ;;
1891       esac ;;
1892     esac
1893   done
1895   (set) 2>&1 |
1896     case $as_nl`(ac_space=' '; set) 2>&1` in #(
1897     *${as_nl}ac_space=\ *)
1898       # `set' does not quote correctly, so add quotes (double-quote
1899       # substitution turns \\\\ into \\, and sed turns \\ into \).
1900       sed -n \
1901         ["s/'/'\\\\''/g;
1902           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1903       ;; #(
1904     *)
1905       # `set' quotes correctly as required by POSIX, so do not add quotes.
1906       sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
1907       ;;
1908     esac |
1909     sort
1910 )dnl
1911 ])# _AC_CACHE_DUMP
1914 # AC_CACHE_SAVE
1915 # -------------
1916 # Save the cache.
1917 # Allow a site initialization script to override cache values.
1918 m4_define([AC_CACHE_SAVE],
1919 [cat >confcache <<\_ACEOF
1920 # This file is a shell script that caches the results of configure
1921 # tests run on this system so they can be shared between configure
1922 # scripts and configure runs, see configure's option --config-cache.
1923 # It is not useful on other systems.  If it contains results you don't
1924 # want to keep, you may remove or edit it.
1926 # config.status only pays attention to the cache file if you give it
1927 # the --recheck option to rerun configure.
1929 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1930 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1931 # following values.
1933 _ACEOF
1935 _AC_CACHE_DUMP() |
1936   sed ['
1937      /^ac_cv_env_/b end
1938      t clear
1939      :clear
1940      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1941      t end
1942      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1943      :end'] >>confcache
1944 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1945   if test -w "$cache_file"; then
1946     test "x$cache_file" != "x/dev/null" &&
1947       AC_MSG_NOTICE([updating cache $cache_file])
1948     cat confcache >$cache_file
1949   else
1950     AC_MSG_NOTICE([not updating unwritable cache $cache_file])
1951   fi
1953 rm -f confcache[]dnl
1954 ])# AC_CACHE_SAVE
1957 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1958 # ------------------------------------------
1959 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1960 # Should be dnl'ed.  Try to catch common mistakes.
1961 m4_defun([AC_CACHE_VAL],
1962 [AS_LITERAL_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
1963                             [AC_DIAGNOSE([syntax],
1964 [$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl
1965 m4_if(m4_index([$2], [AC_DEFINE]), [-1], [],
1966       [AC_DIAGNOSE([syntax],
1967 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1968 [where no actions should be taken])])dnl
1969 m4_if(m4_index([$2], [AC_SUBST]), [-1], [],
1970       [AC_DIAGNOSE([syntax],
1971 [$0($1, ...): suspicious presence of an AC_SUBST in the second argument, ]dnl
1972 [where no actions should be taken])])dnl
1973 AS_VAR_SET_IF([$1],
1974               [_AS_ECHO_N([(cached) ])],
1975               [$2])])
1978 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1979 # -------------------------------------------
1980 # Do not call this macro with a dnl right behind.
1981 m4_defun([AC_CACHE_CHECK],
1982 [AC_MSG_CHECKING([$1])
1983 AC_CACHE_VAL([$2], [$3])dnl
1984 AS_LITERAL_IF([$2],
1985               [AC_MSG_RESULT([$$2])],
1986               [ac_res=AS_VAR_GET([$2])
1987                AC_MSG_RESULT([$ac_res])])dnl
1990 # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
1991 #                     [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
1992 # -------------------------------------------------------------
1993 AC_DEFUN([_AC_CACHE_CHECK_INT],
1994 [AC_CACHE_CHECK([$1], [$2],
1995    [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
1996 ])# _AC_CACHE_CHECK_INT
2000 ## ---------------------- ##
2001 ## Defining CPP symbols.  ##
2002 ## ---------------------- ##
2005 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
2006 # -------------------------------------------
2007 # Used by --trace to collect the list of AC_DEFINEd macros.
2008 m4_define([AC_DEFINE_TRACE_LITERAL],
2009 [m4_pattern_allow([^$1$])dnl
2010 AS_IDENTIFIER_IF([$1], [],
2011   [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
2012 ])# AC_DEFINE_TRACE_LITERAL
2015 # AC_DEFINE_TRACE(CPP-SYMBOL)
2016 # ---------------------------
2017 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
2018 # out non literal symbols.
2020 # m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so only
2021 # use the regex when necessary.
2022 m4_define([AC_DEFINE_TRACE],
2023 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL(
2024   m4_if(m4_index([$1], [(]), [-1], [[$1]],
2025         [m4_bpatsubst([[$1]], [(.*)])]))])])
2028 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2029 # -------------------------------------------
2030 # Set VARIABLE to VALUE, verbatim, or 1.  Remember the value
2031 # and if VARIABLE is affected the same VALUE, do nothing, else
2032 # die.  The third argument is used by autoheader.
2033 m4_define([AC_DEFINE], [_AC_DEFINE_Q([\], $@)])
2036 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2037 # ----------------------------------------------------
2038 # Similar, but perform shell substitutions $ ` \ once on VALUE.
2039 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([], $@)])
2042 # _AC_DEFINE_Q(QUOTE, VARIABLE, [VALUE], [DESCRIPTION])
2043 # -----------------------------------------------------
2044 m4_define([_AC_DEFINE_Q],
2045 [AC_DEFINE_TRACE([$2])dnl
2046 m4_ifval([$4], [AH_TEMPLATE(m4_bpatsubst([[$2]], [(.*)]), [$4])])dnl
2047 cat >>confdefs.h <<$1_ACEOF
2048 [@%:@define] $2 m4_if($#, 2, 1, [$3])
2049 _ACEOF
2054 ## -------------------------- ##
2055 ## Setting output variables.  ##
2056 ## -------------------------- ##
2059 # AC_SUBST_TRACE(VARIABLE)
2060 # ------------------------
2061 # This macro is used with --trace to collect the list of substituted variables.
2062 m4_define([AC_SUBST_TRACE])
2065 # AC_SUBST(VARIABLE, [VALUE])
2066 # ---------------------------
2067 # Create an output variable from a shell VARIABLE.  If VALUE is given
2068 # assign it to VARIABLE.  Use `""' if you want to set VARIABLE to an
2069 # empty value, not an empty second argument.
2071 m4_define([AC_SUBST],
2072 [AS_IDENTIFIER_IF([$1], [],
2073   [AC_FATAL([$0: `$1' is not a valid shell variable name])])dnl
2074 AC_SUBST_TRACE([$1])dnl
2075 m4_pattern_allow([^$1$])dnl
2076 m4_ifvaln([$2], [$1=$2])[]dnl
2077 m4_append_uniq([_AC_SUBST_VARS], [$1], [
2078 ])dnl
2079 ])# AC_SUBST
2082 # AC_SUBST_FILE(VARIABLE)
2083 # -----------------------
2084 # Read the comments of the preceding macro.
2085 m4_define([AC_SUBST_FILE],
2086 [m4_pattern_allow([^$1$])dnl
2087 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2088 ])])
2092 ## --------------------------------------- ##
2093 ## Printing messages at autoconf runtime.  ##
2094 ## --------------------------------------- ##
2096 # In fact, I think we should promote the use of m4_warn and m4_fatal
2097 # directly.  This will also avoid to some people to get it wrong
2098 # between AC_FATAL and AC_MSG_ERROR.
2101 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2102 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2103 # --------------------------------
2104 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2105 m4_define([AC_FATAL],    [m4_fatal($@)])
2108 # AC_WARNING(MESSAGE)
2109 # -------------------
2110 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2111 # specified.
2112 m4_define([AC_WARNING],
2113 [AC_DIAGNOSE([syntax], [$1])])
2118 ## ---------------------------------------- ##
2119 ## Printing messages at configure runtime.  ##
2120 ## ---------------------------------------- ##
2123 # AC_MSG_CHECKING(FEATURE)
2124 # ------------------------
2125 m4_define([AC_MSG_CHECKING],
2126 [{ _AS_ECHO_LOG([checking $1])
2127 _AS_ECHO_N([checking $1... ]); }dnl
2131 # AC_MSG_RESULT(RESULT)
2132 # ---------------------
2133 m4_define([AC_MSG_RESULT],
2134 [{ _AS_ECHO_LOG([result: $1])
2135 _AS_ECHO([$1]); }dnl
2139 # AC_MSG_WARN(PROBLEM)
2140 # AC_MSG_NOTICE(STRING)
2141 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2142 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2143 # ----------------------------------------
2144 m4_copy([AS_WARN],    [AC_MSG_WARN])
2145 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2146 m4_copy([AS_ERROR],   [AC_MSG_ERROR])
2147 m4_define([AC_MSG_FAILURE],
2148 [AC_MSG_ERROR([$1
2149 See `config.log' for more details.], [$2])])
2152 # _AC_MSG_LOG_CONFTEST
2153 # --------------------
2154 m4_define([_AC_MSG_LOG_CONFTEST],
2155 [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
2156 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2160 # AU::AC_CHECKING(FEATURE)
2161 # ------------------------
2162 AU_DEFUN([AC_CHECKING],
2163 [AS_MESSAGE([checking $1...])])
2166 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2167 # ----------------------------------
2168 # No escaping, so it performed also backtick substitution.
2169 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2170 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
2171 _AS_ECHO_UNQUOTED([$1])[]dnl
2175 # AU::AC_VERBOSE(STRING)
2176 # ----------------------
2177 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2184 ## ---------------------------- ##
2185 ## Compiler-running mechanics.  ##
2186 ## ---------------------------- ##
2189 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2190 # ----------------------------------
2191 # Eval COMMAND, save the exit status in ac_status, and log it.
2192 AC_DEFUN([_AC_RUN_LOG],
2193 [{ ($2) >&AS_MESSAGE_LOG_FD
2194   ($1) 2>&AS_MESSAGE_LOG_FD
2195   ac_status=$?
2196   _AS_ECHO_LOG([\$? = $ac_status])
2197   (exit $ac_status); }])
2200 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2201 # -----------------------------------------
2202 # Run COMMAND, save its stderr into conftest.err, save the exit status
2203 # in ac_status, and log it.  Don't forget to clean up conftest.err after
2204 # use.
2205 # Note that when tracing, most shells will leave the traces in stderr
2206 # starting with "+": that's what this macro tries to address.
2207 AC_DEFUN([_AC_RUN_LOG_STDERR],
2208 [{ ($2) >&AS_MESSAGE_LOG_FD
2209   ($1) 2>conftest.er1
2210   ac_status=$?
2211   grep -v '^ *+' conftest.er1 >conftest.err
2212   rm -f conftest.er1
2213   cat conftest.err >&AS_MESSAGE_LOG_FD
2214   _AS_ECHO_LOG([\$? = $ac_status])
2215   (exit $ac_status); }])
2217 # _AC_DO_ECHO(COMMAND)
2218 # --------------------
2219 # Echo COMMAND.  This is designed to be used just before evaluating COMMAND.
2220 AC_DEFUN([_AC_DO_ECHO],
2221 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2222 ])dnl
2223 dnl If the string contains '\"', '`', or '\\', then just echo it rather
2224 dnl than expanding it.  This is a hack, but it is safer, while also
2225 dnl typically expanding simple substrings like '$CC', which is what we want.
2227 dnl Much of this macro body is quoted, to work around misuses like
2228 dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2229 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2230 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2231 dnl underquoting misuses, such as
2232 dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2233 dnl We normally wouldn't bother with this kind of workaround for invalid code
2234 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2235 dnl minimize the integration hassle.
2236 [case "(($ac_try" in
2237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2238   *) ac_try_echo=$ac_try;;
2239 esac
2240 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""]
2241 AS_ECHO(["$ac_try_echo"])])
2243 # _AC_DO(COMMAND)
2244 # ---------------
2245 # Eval COMMAND, save the exit status in ac_status, and log it.
2246 # For internal use only.
2247 AC_DEFUN([_AC_DO],
2248 [_AC_RUN_LOG([eval "$1"],
2249              [_AC_DO_ECHO([$1])])])
2252 # _AC_DO_STDERR(COMMAND)
2253 # ----------------------
2254 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2255 AC_DEFUN([_AC_DO_STDERR],
2256 [_AC_RUN_LOG_STDERR([eval "$1"],
2257                     [_AC_DO_ECHO([$1])])])
2260 # _AC_DO_VAR(VARIABLE)
2261 # --------------------
2262 # Evaluate "$VARIABLE", which should be a valid shell command.
2263 # The purpose of this macro is to write "configure:123: command line"
2264 # into config.log for every test run.
2265 AC_DEFUN([_AC_DO_VAR],
2266 [_AC_DO([$$1])])
2269 # _AC_DO_TOKENS(COMMAND)
2270 # ----------------------
2271 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2272 # tokens of the shell command language.
2273 AC_DEFUN([_AC_DO_TOKENS],
2274 [{ ac_try='$1'
2275   _AC_DO([$ac_try]); }])
2278 # _AC_EVAL(COMMAND)
2279 # -----------------
2280 # Eval COMMAND, save the exit status in ac_status, and log it.
2281 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2282 # It is present only for backward compatibility with previous Autoconf versions.
2283 AC_DEFUN([_AC_EVAL],
2284 [_AC_RUN_LOG([eval $1],
2285              [eval echo "$as_me:$LINENO: \"$1\""])])
2288 # _AC_EVAL_STDERR(COMMAND)
2289 # ------------------------
2290 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2291 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2292 # It is present only for backward compatibility with previous Autoconf versions.
2293 AC_DEFUN([_AC_EVAL_STDERR],
2294 [_AC_RUN_LOG_STDERR([eval $1],
2295                     [eval echo "$as_me:$LINENO: \"$1\""])])
2298 # AC_TRY_EVAL(VARIABLE)
2299 # ---------------------
2300 # Evaluate $VARIABLE, which should be a valid shell command.
2301 # The purpose of this macro is to write "configure:123: command line"
2302 # into config.log for every test run.
2304 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2305 # undocumented, and should not be used.
2306 # They may be removed or their API changed in a future release.
2307 # Autoconf itself no longer uses these two macros; they are present
2308 # only for backward compatibility with previous versions of Autoconf.
2309 # Not every shell command will work due to problems with eval
2310 # and quoting, and the rules for exactly what does work are tricky.
2311 # Worse, due to double-expansion during evaluation, arbitrary unintended
2312 # shell commands could be executed in some situations.
2313 AC_DEFUN([AC_TRY_EVAL],
2314 [_AC_EVAL([$$1])])
2317 # AC_TRY_COMMAND(COMMAND)
2318 # -----------------------
2319 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2320 # tokens of the shell command language.
2321 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2322 AC_DEFUN([AC_TRY_COMMAND],
2323 [{ ac_try='$1'
2324   _AC_EVAL([$ac_try]); }])
2327 # AC_RUN_LOG(COMMAND)
2328 # -------------------
2329 AC_DEFUN([AC_RUN_LOG],
2330 [_AC_RUN_LOG([$1],
2331              [AS_ECHO(["$as_me:$LINENO: AS_ESCAPE([$1])"])])])
2336 ## ------------------------ ##
2337 ## Examining declarations.  ##
2338 ## ------------------------ ##
2342 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2343 # ----------------------------------------------------------------
2344 # Try to preprocess PROGRAM.
2346 # This macro can be used during the selection of a preprocessor.
2347 # eval is necessary to expand ac_cpp.
2348 AC_DEFUN([_AC_PREPROC_IFELSE],
2349 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2350 AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && {
2351          test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2352          test ! -s conftest.err
2353        }],
2354   [$2],
2355   [_AC_MSG_LOG_CONFTEST
2356   $3])
2357 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2358 ])# _AC_PREPROC_IFELSE
2361 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2362 # ---------------------------------------------------------------
2363 # Try to preprocess PROGRAM.  Requires that the preprocessor for the
2364 # current language was checked for, hence do not use this macro in macros
2365 # looking for a preprocessor.
2366 AC_DEFUN([AC_PREPROC_IFELSE],
2367 [AC_LANG_PREPROC_REQUIRE()dnl
2368 _AC_PREPROC_IFELSE($@)])
2371 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2372 # ---------------------------------------------------------
2373 # AC_TRY_CPP is used to check whether particular header files exist.
2374 # (But it actually tests whether INCLUDES produces no CPP errors.)
2376 # INCLUDES are not defaulted and are double quoted.
2377 AU_DEFUN([AC_TRY_CPP],
2378 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2381 # AC_EGREP_CPP(PATTERN, PROGRAM,
2382 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2383 # ------------------------------------------------------
2384 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2385 # come early, it is not included in AC_BEFORE checks.
2386 AC_DEFUN([AC_EGREP_CPP],
2387 [AC_LANG_PREPROC_REQUIRE()dnl
2388 AC_REQUIRE([AC_PROG_EGREP])dnl
2389 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2390 AS_IF([dnl eval is necessary to expand ac_cpp.
2391 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2392 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2393 dnl Quote $1 to prevent m4 from eating character classes
2394   $EGREP "[$1]" >/dev/null 2>&1],
2395   [$3],
2396   [$4])dnl
2397 rm -f conftest*
2398 ])# AC_EGREP_CPP
2401 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2402 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2403 # ---------------------------------------------------------
2404 AC_DEFUN([AC_EGREP_HEADER],
2405 [AC_EGREP_CPP([$1],
2406 [#include <$2>
2407 ], [$3], [$4])])
2412 ## ------------------ ##
2413 ## Examining syntax.  ##
2414 ## ------------------ ##
2417 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2418 # ----------------------------------------------------------------
2419 # Try to compile PROGRAM.
2420 # This macro can be used during the selection of a compiler.
2421 m4_define([_AC_COMPILE_IFELSE],
2422 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2423 rm -f conftest.$ac_objext
2424 AS_IF([_AC_DO_STDERR($ac_compile) && {
2425          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2426          test ! -s conftest.err
2427        } && test -s conftest.$ac_objext],
2428       [$2],
2429       [_AC_MSG_LOG_CONFTEST
2430         $3])
2431 rm -f core conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2432 ])# _AC_COMPILE_IFELSE
2435 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2436 # ---------------------------------------------------------------
2437 # Try to compile PROGRAM.  Requires that the compiler for the current
2438 # language was checked for, hence do not use this macro in macros looking
2439 # for a compiler.
2440 AC_DEFUN([AC_COMPILE_IFELSE],
2441 [AC_LANG_COMPILER_REQUIRE()dnl
2442 _AC_COMPILE_IFELSE($@)])
2445 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2446 #                [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2447 # ---------------------------------------------------
2448 AU_DEFUN([AC_TRY_COMPILE],
2449 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2453 ## --------------------- ##
2454 ## Examining libraries.  ##
2455 ## --------------------- ##
2458 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2459 # -------------------------------------------------------------
2460 # Try to link PROGRAM.
2461 # This macro can be used during the selection of a compiler.
2463 # Test that resulting file is executable; see the problem reported by mwoehlke
2464 # in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
2465 # But skip the test when cross-compiling, to prevent problems like the one
2466 # reported by Chris Johns in
2467 # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
2469 m4_define([_AC_LINK_IFELSE],
2470 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2471 rm -f conftest.$ac_objext conftest$ac_exeext
2472 AS_IF([_AC_DO_STDERR($ac_link) && {
2473          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2474          test ! -s conftest.err
2475        } && test -s conftest$ac_exeext && {
2476          test "$cross_compiling" = yes ||
2477          AS_TEST_X([conftest$ac_exeext])
2478        }],
2479       [$2],
2480       [_AC_MSG_LOG_CONFTEST
2481         $3])
2482 dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization)
2483 dnl information created by the PGI compiler (conftest_ipa8_conftest.oo),
2484 dnl as it would interfere with the next link command.
2485 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
2486       conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2487 ])# _AC_LINK_IFELSE
2490 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2491 # ------------------------------------------------------------
2492 # Try to link PROGRAM.  Requires that the compiler for the current
2493 # language was checked for, hence do not use this macro in macros looking
2494 # for a compiler.
2495 AC_DEFUN([AC_LINK_IFELSE],
2496 [AC_LANG_COMPILER_REQUIRE()dnl
2497 _AC_LINK_IFELSE($@)])
2500 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2501 #             [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2502 # ------------------------------------------------
2503 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2504 AU_DEFUN([AC_TRY_LINK],
2505 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2508 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2509 #                  ACTION-IF-TRUE, [ACTION-IF-FALSE])
2510 # ---------------------------------------------------
2511 AU_DEFUN([AC_COMPILE_CHECK],
2512 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2513 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2518 ## ------------------------------- ##
2519 ## Checking for runtime features.  ##
2520 ## ------------------------------- ##
2523 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2524 # ------------------------------------------------------------
2525 # Compile, link, and run.
2526 # This macro can be used during the selection of a compiler.
2527 # We also remove conftest.o as if the compilation fails, some compilers
2528 # don't remove it.  We remove gmon.out and bb.out, which may be
2529 # created during the run if the program is built with profiling support.
2530 m4_define([_AC_RUN_IFELSE],
2531 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2532 rm -f conftest$ac_exeext
2533 AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2534       [$2],
2535       [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
2536 _AC_MSG_LOG_CONFTEST
2537 m4_ifvaln([$3],
2538           [( exit $ac_status )
2539 $3])dnl])[]dnl
2540 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2541                                                      [conftest.$ac_ext])[]dnl
2542 ])# _AC_RUN_IFELSE
2545 # AC_RUN_IFELSE(PROGRAM,
2546 #               [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2547 #               [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2548 # ----------------------------------------------------------
2549 # Compile, link, and run. Requires that the compiler for the current
2550 # language was checked for, hence do not use this macro in macros looking
2551 # for a compiler.
2552 AC_DEFUN([AC_RUN_IFELSE],
2553 [AC_LANG_COMPILER_REQUIRE()dnl
2554 m4_ifval([$4], [],
2555          [AC_DIAGNOSE([cross],
2556                      [$0 called without default to allow cross compiling])])dnl
2557 AS_IF([test "$cross_compiling" = yes],
2558   [m4_default([$4],
2559            [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2560   [_AC_RUN_IFELSE($@)])
2564 # AC_TRY_RUN(PROGRAM,
2565 #            [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2566 #            [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2567 # --------------------------------------------------------
2568 AU_DEFUN([AC_TRY_RUN],
2569 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2573 ## ------------------------------------- ##
2574 ## Checking for the existence of files.  ##
2575 ## ------------------------------------- ##
2577 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2578 # -------------------------------------------------------------
2580 # Check for the existence of FILE.
2581 AC_DEFUN([AC_CHECK_FILE],
2582 [AC_DIAGNOSE([cross],
2583              [cannot check for file existence when cross compiling])dnl
2584 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2585 AC_CACHE_CHECK([for $1], [ac_File],
2586 [test "$cross_compiling" = yes &&
2587   AC_MSG_ERROR([cannot check for file existence when cross compiling])
2588 if test -r "$1"; then
2589   AS_VAR_SET([ac_File], [yes])
2590 else
2591   AS_VAR_SET([ac_File], [no])
2592 fi])
2593 AS_IF([test AS_VAR_GET([ac_File]) = yes], [$2], [$3])[]dnl
2594 AS_VAR_POPDEF([ac_File])dnl
2595 ])# AC_CHECK_FILE
2598 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2599 # -----------------------------------------------------------------
2600 AC_DEFUN([AC_CHECK_FILES],
2601 [m4_foreach_w([AC_FILE_NAME], [$1],
2602   [AC_CHECK_FILE(AC_FILE_NAME,
2603                  [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2604                                     [Define to 1 if you have the
2605                                      file `]AC_File['.])
2606 $2],
2607                  [$3])])])
2610 ## ------------------------------- ##
2611 ## Checking for declared symbols.  ##
2612 ## ------------------------------- ##
2615 # AC_CHECK_DECL(SYMBOL,
2616 #               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2617 #               [INCLUDES = DEFAULT-INCLUDES])
2618 # -------------------------------------------------------
2619 # Check whether SYMBOL (a function, variable, or constant) is declared.
2620 AC_DEFUN([AC_CHECK_DECL],
2621 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2622 AC_CACHE_CHECK([whether $1 is declared], [ac_Symbol],
2623 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2624 [#ifndef $1
2625   (void) $1;
2626 #endif
2627 ])],
2628                    [AS_VAR_SET([ac_Symbol], [yes])],
2629                    [AS_VAR_SET([ac_Symbol], [no])])])
2630 AS_IF([test AS_VAR_GET([ac_Symbol]) = yes], [$2], [$3])[]dnl
2631 AS_VAR_POPDEF([ac_Symbol])dnl
2632 ])# AC_CHECK_DECL
2635 # AC_CHECK_DECLS(SYMBOLS,
2636 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2637 #                [INCLUDES = DEFAULT-INCLUDES])
2638 # --------------------------------------------------------
2639 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
2640 # documentation for a detailed explanation of this difference with
2641 # other AC_CHECK_*S macros.  SYMBOLS is an m4 list.
2642 AC_DEFUN([AC_CHECK_DECLS],
2643 [m4_foreach([AC_Symbol], [$1],
2644   [AC_CHECK_DECL(AC_Symbol,
2645                  [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2646                                      [Define to 1 if you have the declaration
2647                                      of `]AC_Symbol[', and to 0 if you don't.])
2648 $2],
2649                  [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2650 $3],
2651                  [$4])])
2652 ])# AC_CHECK_DECLS
2655 # AC_CHECK_DECLS_ONCE(SYMBOLS)
2656 # ----------------------------
2657 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
2658 AC_DEFUN([AC_CHECK_DECLS_ONCE],
2660   m4_foreach([AC_Symbol], [$1],
2661     [AC_DEFUN([_AC_Check_Decl_]m4_defn([AC_Symbol]),
2662        [AC_CHECK_DECLS(m4_defn([AC_Symbol]))])
2663      AC_REQUIRE([_AC_Check_Decl_]m4_defn([AC_Symbol]))])
2668 ## ---------------------------------- ##
2669 ## Replacement of library functions.  ##
2670 ## ---------------------------------- ##
2673 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2674 # -----------------------------
2675 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2676 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2677 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
2680 # AC_LIBSOURCE(FILE-NAME)
2681 # -----------------------
2682 # Announce we might need the file `FILE-NAME'.
2683 m4_define([AC_LIBSOURCE], [])
2686 # AC_LIBSOURCES([FILE-NAME1, ...])
2687 # -------------------------------
2688 # Announce we might need these files.
2689 m4_define([AC_LIBSOURCES],
2690 [m4_foreach([_AC_FILE_NAME], [$1],
2691             [AC_LIBSOURCE(_AC_FILE_NAME)])])
2694 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
2695 # --------------------------------------------
2696 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2697 m4_define([_AC_LIBOBJ],
2698 [AS_LITERAL_IF([$1],
2699                [AC_LIBSOURCE([$1.c])],
2700                [$2])dnl
2701 case " $LIB@&t@OBJS " in
2702   *" $1.$ac_objext "* ) ;;
2703   *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
2704 esac
2708 # AC_LIBOBJ(FILE-NAME-NOEXT)
2709 # -------------------------
2710 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2711 m4_define([AC_LIBOBJ],
2712 [_AC_LIBOBJ([$1],
2713             [AC_DIAGNOSE(syntax,
2714                          [$0($1): you should use literals])])dnl
2718 # _AC_LIBOBJS_NORMALIZE
2719 # ---------------------
2720 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
2721 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2722 # Used with AC_CONFIG_COMMANDS_PRE.
2723 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2724 [ac_libobjs=
2725 ac_ltlibobjs=
2726 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2727   # 1. Remove the extension, and $U if already installed.
2728   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2729   ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
2730   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
2731   #    will be set to the directory where LIBOBJS objects are built.
2732   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
2733   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
2734 done
2735 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2736 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2740 ## ----------------------------------- ##
2741 ## Checking compiler characteristics.  ##
2742 ## ----------------------------------- ##
2745 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2746 # -------------------------------------------------------------------
2747 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2748 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2749 m4_define([_AC_COMPUTE_INT_COMPILE],
2750 [# Depending upon the size, compute the lo and hi bounds.
2751 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2752  [ac_lo=0 ac_mid=0
2753   while :; do
2754     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2755                        [ac_hi=$ac_mid; break],
2756                        [ac_lo=`expr $ac_mid + 1`
2757                         if test $ac_lo -le $ac_mid; then
2758                           ac_lo= ac_hi=
2759                           break
2760                         fi
2761                         ac_mid=`expr 2 '*' $ac_mid + 1`])
2762   done],
2763 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2764  [ac_hi=-1 ac_mid=-1
2765   while :; do
2766     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2767                        [ac_lo=$ac_mid; break],
2768                        [ac_hi=`expr '(' $ac_mid ')' - 1`
2769                         if test $ac_mid -le $ac_hi; then
2770                           ac_lo= ac_hi=
2771                           break
2772                         fi
2773                         ac_mid=`expr 2 '*' $ac_mid`])
2774   done],
2775  [ac_lo= ac_hi=])])
2776 # Binary search between lo and hi bounds.
2777 while test "x$ac_lo" != "x$ac_hi"; do
2778   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2779   _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2780                      [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2781 done
2782 case $ac_lo in
2783 ?*) $2=$ac_lo;;
2784 '') $4 ;;
2785 esac[]dnl
2786 ])# _AC_COMPUTE_INT_COMPILE
2789 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2790 # ---------------------------------------------------------------
2791 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2792 m4_define([_AC_COMPUTE_INT_RUN],
2793 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2794                 [$2=`cat conftest.val`], [$4])])
2797 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
2798 # ----------------------------------------------------------
2799 AC_DEFUN([AC_COMPUTE_INT],
2800 [AC_LANG_COMPILER_REQUIRE()dnl
2801 if test "$cross_compiling" = yes; then
2802   _AC_COMPUTE_INT_COMPILE([$2], [$1], [$3], [$4])
2803 else
2804   _AC_COMPUTE_INT_RUN([$2], [$1], [$3], [$4])
2806 rm -f conftest.val[]dnl
2807 ])# _AC_COMPUTE_INT
2809 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2810 # -----------------------------------------------------------
2811 # FIXME: this private interface was used by several packages.
2812 # Give them time to transition to AC_COMPUTE_INT and then delete this one.
2813 AC_DEFUN([_AC_COMPUTE_INT],
2814 [AC_COMPUTE_INT([$2], [$1], [$3], [$4])
2815 AC_DIAGNOSE([obsolete],
2816 [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
2817 future version or Autoconf.  Hence, it is suggested that you use
2818 instead the public AC_COMPUTE_INT macro.  Note that the arguments are
2819 slightly different between the two.])dnl
2820 ])# _AC_COMPUTE_INT