2006-07-07 Paolo Bonzini <bonzini@gnu.org>
[autoconf.git] / lib / autoconf / general.m4
blob869848d69e03b622c55a3c5b5aca0bac52c0e8a0
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 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # 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, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 # 02110-1301, USA.
21 # As a special exception, the Free Software Foundation gives unlimited
22 # permission to copy, distribute and modify the configure scripts that
23 # are the output of Autoconf.  You need not follow the terms of the GNU
24 # General Public License when using or distributing such scripts, even
25 # though portions of the text of Autoconf appear in them.  The GNU
26 # General Public License (GPL) does govern all other use of the material
27 # that constitutes the Autoconf program.
29 # Certain portions of the Autoconf source text are designed to be copied
30 # (in certain cases, depending on the input) into the output of
31 # Autoconf.  We call these the "data" portions.  The rest of the Autoconf
32 # source text consists of comments plus executable code that decides which
33 # of the data portions to output in any given case.  We call these
34 # comments and executable code the "non-data" portions.  Autoconf never
35 # copies any of the non-data portions into its output.
37 # This special exception to the GPL applies to versions of Autoconf
38 # released by the Free Software Foundation.  When you make and
39 # distribute a modified version of Autoconf, you may extend this special
40 # exception to the GPL to apply to your modified version as well, *unless*
41 # your modified version has the potential to copy into its output some
42 # of the text that was the non-data portion of the version that you started
43 # with.  (In other words, unless your change moves or copies text from
44 # the non-data portions to the data portions.)  If your modification has
45 # such potential, you must delete any notice of this special exception
46 # to the GPL from your modified version.
48 # Written by David MacKenzie, with help from
49 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
50 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
53 ## ---------------- ##
54 ## The diversions.  ##
55 ## ---------------- ##
58 # We heavily use m4's diversions both for the initializations and for
59 # required macros (see AC_REQUIRE), because in both cases we have to
60 # issue high in `configure' something which is discovered late.
62 # KILL is only used to suppress output.
64 # The layers of `configure'.  We let m4 undivert them by itself, when
65 # it reaches the end of `configure.ac'.
67 # - BINSH
68 #   #! /bin/sh
69 # - HEADER-REVISION
70 #   Sent by AC_REVISION
71 # - HEADER-COMMENT
72 #   Purpose of the script.
73 # - HEADER-COPYRIGHT
74 #   Copyright notice(s)
75 # - M4SH-INIT
76 #   Initialization of bottom layers.
78 # - DEFAULTS
79 #   early initializations (defaults)
80 # - PARSE_ARGS
81 #   initialization code, option handling loop.
83 # - HELP_BEGIN
84 #   Handling `configure --help'.
85 # - HELP_CANON
86 #   Help msg for AC_CANONICAL_*
87 # - HELP_ENABLE
88 #   Help msg from AC_ARG_ENABLE.
89 # - HELP_WITH
90 #   Help msg from AC_ARG_WITH.
91 # - HELP_VAR
92 #   Help msg from AC_ARG_VAR.
93 # - HELP_VAR_END
94 #   A small paragraph on the use of the variables.
95 # - HELP_END
96 #   Tail of the handling of --help.
98 # - VERSION_BEGIN
99 #   Head of the handling of --version.
100 # - VERSION_FSF
101 #   FSF copyright notice for --version.
102 # - VERSION_USER
103 #   User copyright notice for --version.
104 # - VERSION_END
105 #   Tail of the handling of --version.
107 # - INIT_PREPARE
108 #   Tail of initialization code.
110 # - BODY
111 #   the tests and output code
115 # _m4_divert(DIVERSION-NAME)
116 # --------------------------
117 # Convert a diversion name into its number.  Otherwise, return
118 # DIVERSION-NAME which is supposed to be an actual diversion number.
119 # Of course it would be nicer to use m4_case here, instead of zillions
120 # of little macros, but it then takes twice longer to run `autoconf'!
122 # From M4sugar:
123 #    -1. KILL
124 # 10000. GROW
126 # From M4sh:
127 #    0. BINSH
128 #    1. HEADER-REVISION
129 #    2. HEADER-COMMENT
130 #    3. HEADER-COPYRIGHT
131 #    4. M4SH-INIT
132 # 1000. BODY
133 m4_define([_m4_divert(DEFAULTS)],        10)
134 m4_define([_m4_divert(PARSE_ARGS)],      20)
136 m4_define([_m4_divert(HELP_BEGIN)],     100)
137 m4_define([_m4_divert(HELP_CANON)],     101)
138 m4_define([_m4_divert(HELP_ENABLE)],    102)
139 m4_define([_m4_divert(HELP_WITH)],      103)
140 m4_define([_m4_divert(HELP_VAR)],       104)
141 m4_define([_m4_divert(HELP_VAR_END)],   105)
142 m4_define([_m4_divert(HELP_END)],       106)
144 m4_define([_m4_divert(VERSION_BEGIN)],  200)
145 m4_define([_m4_divert(VERSION_FSF)],    201)
146 m4_define([_m4_divert(VERSION_USER)],   202)
147 m4_define([_m4_divert(VERSION_END)],    203)
149 m4_define([_m4_divert(INIT_PREPARE)],   300)
153 # AC_DIVERT_PUSH(DIVERSION-NAME)
154 # AC_DIVERT_POP
155 # ------------------------------
156 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
157 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
161 ## ------------------------------------ ##
162 ## Defining/requiring Autoconf macros.  ##
163 ## ------------------------------------ ##
166 # AC_DEFUN(NAME, EXPANSION)
167 # AC_DEFUN_ONCE(NAME, EXPANSION)
168 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
169 # AC_REQUIRE(STRING)
170 # AC_PROVIDE(MACRO-NAME)
171 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
172 # -----------------------------------------------------------
173 m4_copy([m4_defun],       [AC_DEFUN])
174 m4_copy([m4_defun_once],  [AC_DEFUN_ONCE])
175 m4_copy([m4_before],      [AC_BEFORE])
176 m4_copy([m4_require],     [AC_REQUIRE])
177 m4_copy([m4_provide],     [AC_PROVIDE])
178 m4_copy([m4_provide_if],  [AC_PROVIDE_IFELSE])
181 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
182 # ------------------------------------------
183 m4_define([AC_OBSOLETE],
184 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
188 ## ----------------------------- ##
189 ## Implementing Autoconf loops.  ##
190 ## ----------------------------- ##
193 # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION)
194 # ------------------------------------------
195 AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]])
196 AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl
197 AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete.
198 You should run autoupdate.])])
202 ## ----------------------------------- ##
203 ## Helping macros to display strings.  ##
204 ## ----------------------------------- ##
207 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
208 # --------------------------------------
209 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
213 ## ---------------------------------------------- ##
214 ## Information on the package being Autoconf'ed.  ##
215 ## ---------------------------------------------- ##
218 # It is suggested that the macros in this section appear before
219 # AC_INIT in `configure.ac'.  Nevertheless, this is just stylistic,
220 # and from the implementation point of view, AC_INIT *must* be expanded
221 # beforehand: it puts data in diversions which must appear before the
222 # data provided by the macros of this section.
224 # The solution is to require AC_INIT in each of these macros.  AC_INIT
225 # has the needed magic so that it can't be expanded twice.
229 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
230 # --------------------------------------------------------------
231 m4_define([_AC_INIT_PACKAGE],
232 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
233 AS_LITERAL_IF([$2], [],  [m4_warn([syntax], [AC_INIT: not a literal: $2])])
234 AS_LITERAL_IF([$3], [],  [m4_warn([syntax], [AC_INIT: not a literal: $3])])
235 m4_ifndef([AC_PACKAGE_NAME],
236           [m4_define([AC_PACKAGE_NAME],     [$1])])
237 m4_ifndef([AC_PACKAGE_TARNAME],
238           [m4_define([AC_PACKAGE_TARNAME],
239                      m4_default([$4],
240                                 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
241                                                                      [GNU ])),
242                                  [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
243                                  [-])]))])
244 m4_ifndef([AC_PACKAGE_VERSION],
245           [m4_define([AC_PACKAGE_VERSION],   [$2])])
246 m4_ifndef([AC_PACKAGE_STRING],
247           [m4_define([AC_PACKAGE_STRING],    [$1 $2])])
248 m4_ifndef([AC_PACKAGE_BUGREPORT],
249           [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
253 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
254 # ------------------------------------------------------
255 # Emit TEXT, a copyright notice, in the top of `configure' and in
256 # --version output.  Macros in TEXT are evaluated once.
257 m4_define([AC_COPYRIGHT],
258 [AS_COPYRIGHT([$1])[]dnl
259 m4_divert_text(m4_default([$2], [VERSION_USER]),
261 $1])dnl
262 ])# AC_COPYRIGHT
265 # AC_REVISION(REVISION-INFO)
266 # --------------------------
267 # The second quote in the translit is just to cope with font-lock-mode
268 # which sees the opening of a string.
269 m4_define([AC_REVISION],
270 [m4_divert_text([HEADER-REVISION],
271                 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
277 ## ---------------------------------------- ##
278 ## Requirements over the Autoconf version.  ##
279 ## ---------------------------------------- ##
282 # AU::AC_PREREQ(VERSION)
283 # ----------------------
284 # Update this `AC_PREREQ' statement to require the current version of
285 # Autoconf.  But fail if ever this autoupdate is too old.
287 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
288 # calling `AU_DEFUN', i.e., it is hard coded.  Otherwise it would be
289 # quite complex for autoupdate to import the value of
290 # `m4_PACKAGE_VERSION'.  We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
291 # this would replace all its occurrences with the current version of
292 # Autoconf, which is certainly not what the user intended.
293 AU_DEFUN([AC_PREREQ],
294 [m4_version_prereq([$1])[]dnl
295 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
298 # AC_PREREQ(VERSION)
299 # ------------------
300 # Complain and exit if the Autoconf version is less than VERSION.
301 m4_copy([m4_version_prereq], [AC_PREREQ])
308 ## ---------------- ##
309 ## Initialization.  ##
310 ## ---------------- ##
313 # All the following macros are used by AC_INIT.  Ideally, they should
314 # be presented in the order in which they are output.  Please, help us
315 # sorting it, or at least, don't augment the entropy.
318 # _AC_INIT_NOTICE
319 # ---------------
320 m4_define([_AC_INIT_NOTICE],
321 [m4_divert_text([HEADER-COMMENT],
322 [@%:@ Guess values for system-dependent variables and create Makefiles.
323 @%:@ Generated by m4_PACKAGE_STRING[]dnl
324 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
326 m4_ifset([AC_PACKAGE_BUGREPORT],
327          [m4_divert_text([HEADER-COMMENT],
328                          [@%:@
329 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
333 # _AC_INIT_COPYRIGHT
334 # ------------------
335 # We dump to VERSION_FSF to make sure we are inserted before the
336 # user copyrights, and after the setup of the --version handling.
337 m4_define([_AC_INIT_COPYRIGHT],
338 [AC_COPYRIGHT(
339 [Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
340 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
341 This configure script is free software; the Free Software Foundation
342 gives unlimited permission to copy, distribute and modify it.],
343               [VERSION_FSF])dnl
347 # File Descriptors
348 # ----------------
349 # Set up the file descriptors used by `configure'.
350 # File descriptor usage:
351 # 0 standard input (/dev/null)
352 # 1 file creation
353 # 2 errors and warnings
354 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
355 # AS_MESSAGE_FD checking for... messages and results
356 # AS_ORIGINAL_STDIN_FD original standard input (still open)
358 # stdin is /dev/null because checks that run programs may
359 # inadvertently run interactive ones, which would stop configuration
360 # until someone typed an EOF.
361 m4_define([AS_MESSAGE_FD], 6)
362 m4_define([AS_ORIGINAL_STDIN_FD], 7)
363 # That's how they used to be named.
364 AU_ALIAS([AC_FD_CC],  [AS_MESSAGE_LOG_FD])
365 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
368 # _AC_INIT_DEFAULTS
369 # -----------------
370 # Values which defaults can be set from `configure.ac'.
371 # `/bin/machine' is used in `glibcbug'.  The others are used in config.*
372 m4_define([_AC_INIT_DEFAULTS],
373 [m4_divert_push([DEFAULTS])dnl
375 exec AS_ORIGINAL_STDIN_FD<&0 </dev/null AS_MESSAGE_FD>&1
377 # Name of the host.
378 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
379 # so uname gets run too.
380 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
383 # Initializations.
385 ac_default_prefix=/usr/local
386 ac_clean_files=
387 ac_config_libobj_dir=.
388 LIB@&t@OBJS=
389 cross_compiling=no
390 subdirs=
391 MFLAGS=
392 MAKEFLAGS=
393 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
394 AC_SUBST([PATH_SEPARATOR])dnl
396 # Identity of this package.
397 AC_SUBST([PACKAGE_NAME],
398          [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])dnl
399 AC_SUBST([PACKAGE_TARNAME],
400          [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])dnl
401 AC_SUBST([PACKAGE_VERSION],
402          [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])dnl
403 AC_SUBST([PACKAGE_STRING],
404          [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
405 AC_SUBST([PACKAGE_BUGREPORT],
406          [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
408 m4_divert_pop([DEFAULTS])dnl
409 m4_wrap([m4_divert_text([DEFAULTS],
410 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS],  [m4_defn([_AC_SUBST_VARS])])'
411 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
412 m4_ifdef([_AC_PRECIOUS_VARS],
413   [_AC_ARG_VAR_STORE[]dnl
414    _AC_ARG_VAR_VALIDATE[]dnl
415    ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
416 m4_ifdef([_AC_LIST_SUBDIRS],
417   [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
418 ])])dnl
419 ])# _AC_INIT_DEFAULTS
422 # AC_PREFIX_DEFAULT(PREFIX)
423 # -------------------------
424 AC_DEFUN([AC_PREFIX_DEFAULT],
425 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
428 # AC_PREFIX_PROGRAM(PROGRAM)
429 # --------------------------
430 # Guess the value for the `prefix' variable by looking for
431 # the argument program along PATH and taking its parent.
432 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
433 # set `prefix' to /usr/local/gnu.
434 # This comes too late to find a site file based on the prefix,
435 # and it might use a cached value for the path.
436 # No big loss, I think, since most configures don't use this macro anyway.
437 AC_DEFUN([AC_PREFIX_PROGRAM],
438 [if test "x$prefix" = xNONE; then
439 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
440   _AS_ECHO_N([checking for prefix by ])
441   AC_PATH_PROG(ac_prefix_program, [$1])
442   if test -n "$ac_prefix_program"; then
443     prefix=`AS_DIRNAME(["$ac_prefix_program"])`
444     prefix=`AS_DIRNAME(["$prefix"])`
445   fi
447 ])# AC_PREFIX_PROGRAM
450 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
451 # ---------------------------------------------
452 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
453 # relative to the directory that configure is in, which we can look
454 # for to find out if srcdir is correct.
455 AC_DEFUN([AC_CONFIG_SRCDIR],
456 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
459 # _AC_INIT_DIRCHECK
460 # -----------------
461 # Set ac_pwd, and sanity-check it and the source and installation directories.
463 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
465 AC_DEFUN([_AC_INIT_DIRCHECK],
466 [m4_divert_push([PARSE_ARGS])dnl
468 ac_pwd=`pwd` && test -n "$ac_pwd" &&
469 ac_ls_di=`ls -di .` &&
470 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
471   AC_MSG_ERROR([Working directory cannot be determined])
472 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
473   AC_MSG_ERROR([pwd does not report name of working directory])
475 m4_divert_pop([PARSE_ARGS])dnl
476 ])# _AC_INIT_DIRCHECK
478 # _AC_INIT_SRCDIR
479 # ---------------
480 # Compute `srcdir' based on `$ac_unique_file'.
482 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
484 AC_DEFUN([_AC_INIT_SRCDIR],
485 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
486 m4_divert_push([PARSE_ARGS])dnl
488 # Find the source files, if location was not specified.
489 if test -z "$srcdir"; then
490   ac_srcdir_defaulted=yes
491   # Try the directory containing this script, then the parent directory.
492   ac_confdir=`AS_DIRNAME(["$[0]"])`
493   srcdir=$ac_confdir
494   if test ! -r "$srcdir/$ac_unique_file"; then
495     srcdir=..
496   fi
497 else
498   ac_srcdir_defaulted=no
500 if test ! -r "$srcdir/$ac_unique_file"; then
501   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
502   AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
504 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
505 ac_abs_confdir=`(
506         cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
507         pwd)`
508 # When building in place, set srcdir=.
509 if test "$ac_abs_confdir" = "$ac_pwd"; then
510   srcdir=.
512 # Remove unnecessary trailing slashes from srcdir.
513 # Double slashes in file names in object file debugging info
514 # mess up M-x gdb in Emacs.
515 case $srcdir in
516 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
517 esac
518 m4_divert_pop([PARSE_ARGS])dnl
519 ])# _AC_INIT_SRCDIR
522 # _AC_INIT_PARSE_ARGS
523 # -------------------
524 m4_define([_AC_INIT_PARSE_ARGS],
525 [m4_divert_push([PARSE_ARGS])dnl
527 # Initialize some variables set by options.
528 ac_init_help=
529 ac_init_version=false
530 # The variables have the same names as the options, with
531 # dashes changed to underlines.
532 cache_file=/dev/null
533 AC_SUBST(exec_prefix, NONE)dnl
534 no_create=
535 no_recursion=
536 AC_SUBST(prefix, NONE)dnl
537 program_prefix=NONE
538 program_suffix=NONE
539 AC_SUBST(program_transform_name, [s,x,x,])dnl
540 silent=
541 site=
542 srcdir=
543 verbose=
544 x_includes=NONE
545 x_libraries=NONE
547 # Installation directory options.
548 # These are left unexpanded so users can "make install exec_prefix=/foo"
549 # and all the variables that are supposed to be based on exec_prefix
550 # by default will actually change.
551 # Use braces instead of parens because sh, perl, etc. also accept them.
552 # (The list follows the same order as the GNU Coding Standards.)
553 AC_SUBST([bindir],         ['${exec_prefix}/bin'])dnl
554 AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl
555 AC_SUBST([libexecdir],     ['${exec_prefix}/libexec'])dnl
556 AC_SUBST([datarootdir],    ['${prefix}/share'])dnl
557 AC_SUBST([datadir],        ['${datarootdir}'])dnl
558 AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl
559 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
560 AC_SUBST([localstatedir],  ['${prefix}/var'])dnl
561 AC_SUBST([includedir],     ['${prefix}/include'])dnl
562 AC_SUBST([oldincludedir],  ['/usr/include'])dnl
563 AC_SUBST([docdir],         [m4_ifset([AC_PACKAGE_TARNAME],
564                                      ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
565                                      ['${datarootdir}/doc/${PACKAGE}'])])dnl
566 AC_SUBST([infodir],        ['${datarootdir}/info'])dnl
567 AC_SUBST([htmldir],        ['${docdir}'])dnl
568 AC_SUBST([dvidir],         ['${docdir}'])dnl
569 AC_SUBST([pdfdir],         ['${docdir}'])dnl
570 AC_SUBST([psdir],          ['${docdir}'])dnl
571 AC_SUBST([libdir],         ['${exec_prefix}/lib'])dnl
572 AC_SUBST([localedir],      ['${datarootdir}/locale'])dnl
573 AC_SUBST([mandir],         ['${datarootdir}/man'])dnl
575 ac_prev=
576 ac_dashdash=
577 for ac_option
579   # If the previous option needs an argument, assign it.
580   if test -n "$ac_prev"; then
581     eval $ac_prev=\$ac_option
582     ac_prev=
583     continue
584   fi
586   case $ac_option in
587   *=*)  ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
588   *)    ac_optarg=yes ;;
589   esac
591   # Accept the important Cygnus configure options, so we can diagnose typos.
593   case $ac_dashdash$ac_option in
594   --)
595     ac_dashdash=yes ;;
597   -bindir | --bindir | --bindi | --bind | --bin | --bi)
598     ac_prev=bindir ;;
599   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
600     bindir=$ac_optarg ;;
602   -build | --build | --buil | --bui | --bu)
603     ac_prev=build_alias ;;
604   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
605     build_alias=$ac_optarg ;;
607   -cache-file | --cache-file | --cache-fil | --cache-fi \
608   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
609     ac_prev=cache_file ;;
610   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
611   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
612     cache_file=$ac_optarg ;;
614   --config-cache | -C)
615     cache_file=config.cache ;;
617   -datadir | --datadir | --datadi | --datad)
618     ac_prev=datadir ;;
619   -datadir=* | --datadir=* | --datadi=* | --datad=*)
620     datadir=$ac_optarg ;;
622   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
623   | --dataroo | --dataro | --datar)
624     ac_prev=datarootdir ;;
625   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
626   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
627     datarootdir=$ac_optarg ;;
629   -disable-* | --disable-*)
630     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
631     # Reject names that are not valid shell variable names.
632     expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
633       AC_MSG_ERROR([invalid feature name: $ac_feature])
634     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
635     eval enable_$ac_feature=no ;;
637   -docdir | --docdir | --docdi | --doc | --do)
638     ac_prev=docdir ;;
639   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
640     docdir=$ac_optarg ;;
642   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
643     ac_prev=dvidir ;;
644   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
645     dvidir=$ac_optarg ;;
647   -enable-* | --enable-*)
648     ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
649     # Reject names that are not valid shell variable names.
650     expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
651       AC_MSG_ERROR([invalid feature name: $ac_feature])
652     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
653     eval enable_$ac_feature=\$ac_optarg ;;
655   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
656   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
657   | --exec | --exe | --ex)
658     ac_prev=exec_prefix ;;
659   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
660   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
661   | --exec=* | --exe=* | --ex=*)
662     exec_prefix=$ac_optarg ;;
664   -gas | --gas | --ga | --g)
665     # Obsolete; use --with-gas.
666     with_gas=yes ;;
668   -help | --help | --hel | --he | -h)
669     ac_init_help=long ;;
670   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
671     ac_init_help=recursive ;;
672   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
673     ac_init_help=short ;;
675   -host | --host | --hos | --ho)
676     ac_prev=host_alias ;;
677   -host=* | --host=* | --hos=* | --ho=*)
678     host_alias=$ac_optarg ;;
680   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
681     ac_prev=htmldir ;;
682   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
683   | --ht=*)
684     htmldir=$ac_optarg ;;
686   -includedir | --includedir | --includedi | --included | --include \
687   | --includ | --inclu | --incl | --inc)
688     ac_prev=includedir ;;
689   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
690   | --includ=* | --inclu=* | --incl=* | --inc=*)
691     includedir=$ac_optarg ;;
693   -infodir | --infodir | --infodi | --infod | --info | --inf)
694     ac_prev=infodir ;;
695   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
696     infodir=$ac_optarg ;;
698   -libdir | --libdir | --libdi | --libd)
699     ac_prev=libdir ;;
700   -libdir=* | --libdir=* | --libdi=* | --libd=*)
701     libdir=$ac_optarg ;;
703   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
704   | --libexe | --libex | --libe)
705     ac_prev=libexecdir ;;
706   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
707   | --libexe=* | --libex=* | --libe=*)
708     libexecdir=$ac_optarg ;;
710   -localedir | --localedir | --localedi | --localed | --locale)
711     ac_prev=localedir ;;
712   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
713     localedir=$ac_optarg ;;
715   -localstatedir | --localstatedir | --localstatedi | --localstated \
716   | --localstate | --localstat | --localsta | --localst | --locals)
717     ac_prev=localstatedir ;;
718   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
719   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
720     localstatedir=$ac_optarg ;;
722   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
723     ac_prev=mandir ;;
724   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
725     mandir=$ac_optarg ;;
727   -nfp | --nfp | --nf)
728     # Obsolete; use --without-fp.
729     with_fp=no ;;
731   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
732   | --no-cr | --no-c | -n)
733     no_create=yes ;;
735   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
736   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
737     no_recursion=yes ;;
739   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
740   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
741   | --oldin | --oldi | --old | --ol | --o)
742     ac_prev=oldincludedir ;;
743   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
744   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
745   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
746     oldincludedir=$ac_optarg ;;
748   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
749     ac_prev=prefix ;;
750   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
751     prefix=$ac_optarg ;;
753   -program-prefix | --program-prefix | --program-prefi | --program-pref \
754   | --program-pre | --program-pr | --program-p)
755     ac_prev=program_prefix ;;
756   -program-prefix=* | --program-prefix=* | --program-prefi=* \
757   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
758     program_prefix=$ac_optarg ;;
760   -program-suffix | --program-suffix | --program-suffi | --program-suff \
761   | --program-suf | --program-su | --program-s)
762     ac_prev=program_suffix ;;
763   -program-suffix=* | --program-suffix=* | --program-suffi=* \
764   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
765     program_suffix=$ac_optarg ;;
767   -program-transform-name | --program-transform-name \
768   | --program-transform-nam | --program-transform-na \
769   | --program-transform-n | --program-transform- \
770   | --program-transform | --program-transfor \
771   | --program-transfo | --program-transf \
772   | --program-trans | --program-tran \
773   | --progr-tra | --program-tr | --program-t)
774     ac_prev=program_transform_name ;;
775   -program-transform-name=* | --program-transform-name=* \
776   | --program-transform-nam=* | --program-transform-na=* \
777   | --program-transform-n=* | --program-transform-=* \
778   | --program-transform=* | --program-transfor=* \
779   | --program-transfo=* | --program-transf=* \
780   | --program-trans=* | --program-tran=* \
781   | --progr-tra=* | --program-tr=* | --program-t=*)
782     program_transform_name=$ac_optarg ;;
784   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
785     ac_prev=pdfdir ;;
786   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
787     pdfdir=$ac_optarg ;;
789   -psdir | --psdir | --psdi | --psd | --ps)
790     ac_prev=psdir ;;
791   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
792     psdir=$ac_optarg ;;
794   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
795   | -silent | --silent | --silen | --sile | --sil)
796     silent=yes ;;
798   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
799     ac_prev=sbindir ;;
800   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
801   | --sbi=* | --sb=*)
802     sbindir=$ac_optarg ;;
804   -sharedstatedir | --sharedstatedir | --sharedstatedi \
805   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
806   | --sharedst | --shareds | --shared | --share | --shar \
807   | --sha | --sh)
808     ac_prev=sharedstatedir ;;
809   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
810   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
811   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
812   | --sha=* | --sh=*)
813     sharedstatedir=$ac_optarg ;;
815   -site | --site | --sit)
816     ac_prev=site ;;
817   -site=* | --site=* | --sit=*)
818     site=$ac_optarg ;;
820   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
821     ac_prev=srcdir ;;
822   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
823     srcdir=$ac_optarg ;;
825   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
826   | --syscon | --sysco | --sysc | --sys | --sy)
827     ac_prev=sysconfdir ;;
828   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
829   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
830     sysconfdir=$ac_optarg ;;
832   -target | --target | --targe | --targ | --tar | --ta | --t)
833     ac_prev=target_alias ;;
834   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
835     target_alias=$ac_optarg ;;
837   -v | -verbose | --verbose | --verbos | --verbo | --verb)
838     verbose=yes ;;
840   -version | --version | --versio | --versi | --vers | -V)
841     ac_init_version=: ;;
843   -with-* | --with-*)
844     ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
845     # Reject names that are not valid shell variable names.
846     expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
847       AC_MSG_ERROR([invalid package name: $ac_package])
848     ac_package=`echo $ac_package| sed 's/-/_/g'`
849     eval with_$ac_package=\$ac_optarg ;;
851   -without-* | --without-*)
852     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
853     # Reject names that are not valid shell variable names.
854     expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
855       AC_MSG_ERROR([invalid package name: $ac_package])
856     ac_package=`echo $ac_package | sed 's/-/_/g'`
857     eval with_$ac_package=no ;;
859   --x)
860     # Obsolete; use --with-x.
861     with_x=yes ;;
863   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
864   | --x-incl | --x-inc | --x-in | --x-i)
865     ac_prev=x_includes ;;
866   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
867   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
868     x_includes=$ac_optarg ;;
870   -x-libraries | --x-libraries | --x-librarie | --x-librari \
871   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
872     ac_prev=x_libraries ;;
873   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
874   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
875     x_libraries=$ac_optarg ;;
877   -*) AC_MSG_ERROR([unrecognized option: $ac_option
878 Try `$[0] --help' for more information.])
879     ;;
881   *=*)
882     ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
883     # Reject names that are not valid shell variable names.
884     expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
885       AC_MSG_ERROR([invalid variable name: $ac_envvar])
886     eval $ac_envvar=\$ac_optarg
887     export $ac_envvar ;;
889   *)
890     # FIXME: should be removed in autoconf 3.0.
891     AC_MSG_WARN([you should use --build, --host, --target])
892     expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
893       AC_MSG_WARN([invalid host type: $ac_option])
894     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
895     ;;
897   esac
898 done
900 if test -n "$ac_prev"; then
901   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
902   AC_MSG_ERROR([missing argument to $ac_option])
905 # Be sure to have absolute directory names.
906 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
907                 datadir sysconfdir sharedstatedir localstatedir includedir \
908                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
909                 libdir localedir mandir
911   eval ac_val=\$$ac_var
912   case $ac_val in
913     [[\\/$]]* | ?:[[\\/]]* )  continue;;
914     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
915   esac
916   AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
917 done
919 # There might be people who depend on the old broken behavior: `$host'
920 # used to hold the argument of --host etc.
921 # FIXME: To remove some day.
922 build=$build_alias
923 host=$host_alias
924 target=$target_alias
926 # FIXME: To remove some day.
927 if test "x$host_alias" != x; then
928   if test "x$build_alias" = x; then
929     cross_compiling=maybe
930     AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
931     If a cross compiler is detected then cross compile mode will be used.])
932   elif test "x$build_alias" != "x$host_alias"; then
933     cross_compiling=yes
934   fi
937 ac_tool_prefix=
938 test -n "$host_alias" && ac_tool_prefix=$host_alias-
940 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
942 m4_divert_pop([PARSE_ARGS])dnl
943 ])# _AC_INIT_PARSE_ARGS
946 # _AC_INIT_HELP
947 # -------------
948 # Handle the `configure --help' message.
949 m4_define([_AC_INIT_HELP],
950 [m4_divert_push([HELP_BEGIN])dnl
953 # Report the --help message.
955 if test "$ac_init_help" = "long"; then
956   # Omit some internal or obsolete options to make the list less imposing.
957   # This message is too long to be a string in the A/UX 3.1 sh.
958   cat <<_ACEOF
959 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
960                         [AC_PACKAGE_STRING],
961                         [this package]) to adapt to many kinds of systems.
963 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
965 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
966 VAR=VALUE.  See below for descriptions of some of the useful variables.
968 Defaults for the options are specified in brackets.
970 Configuration:
971   -h, --help              display this help and exit
972       --help=short        display options specific to this package
973       --help=recursive    display the short help of all the included packages
974   -V, --version           display version information and exit
975   -q, --quiet, --silent   do not print \`checking...' messages
976       --cache-file=FILE   cache test results in FILE [disabled]
977   -C, --config-cache      alias for \`--cache-file=config.cache'
978   -n, --no-create         do not create output files
979       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
981 Installation directories:
982   --prefix=PREFIX         install architecture-independent files in PREFIX
983                           [$ac_default_prefix]
984   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
985                           [PREFIX]
987 By default, \`make install' will install all the files in
988 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
989 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
990 for instance \`--prefix=\$HOME'.
992 For better control, use the options below.
994 Fine tuning of the installation directories:
995   --bindir=DIR           user executables [EPREFIX/bin]
996   --sbindir=DIR          system admin executables [EPREFIX/sbin]
997   --libexecdir=DIR       program executables [EPREFIX/libexec]
998   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
999   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1000   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1001   --libdir=DIR           object code libraries [EPREFIX/lib]
1002   --includedir=DIR       C header files [PREFIX/include]
1003   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1004   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1005   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1006   --infodir=DIR          info documentation [DATAROOTDIR/info]
1007   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1008   --mandir=DIR           man documentation [DATAROOTDIR/man]
1009   --docdir=DIR           documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME], [AC_PACKAGE_TARNAME], [PACKAGE])@:>@[
1010   --htmldir=DIR          html documentation [DOCDIR]
1011   --dvidir=DIR           dvi documentation [DOCDIR]
1012   --pdfdir=DIR           pdf documentation [DOCDIR]
1013   --psdir=DIR            ps documentation [DOCDIR]
1014 _ACEOF
1016   cat <<\_ACEOF]
1017 m4_divert_pop([HELP_BEGIN])dnl
1018 dnl The order of the diversions here is
1019 dnl - HELP_BEGIN
1020 dnl   which may be extended by extra generic options such as with X or
1021 dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
1023 dnl - HELP_CANON
1024 dnl   Support for cross compilation (--build, --host and --target).
1025 dnl   Display only in long --help.
1027 dnl - HELP_ENABLE
1028 dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1029 dnl   then implements the header of the non generic options.
1031 dnl - HELP_WITH
1033 dnl - HELP_VAR
1035 dnl - HELP_VAR_END
1037 dnl - HELP_END
1038 dnl   initialized below, in which we dump the trailer (handling of the
1039 dnl   recursion for instance).
1040 m4_divert_push([HELP_ENABLE])dnl
1041 _ACEOF
1044 if test -n "$ac_init_help"; then
1045 m4_ifset([AC_PACKAGE_STRING],
1046 [  case $ac_init_help in
1047      short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1048    esac])
1049   cat <<\_ACEOF
1050 m4_divert_pop([HELP_ENABLE])dnl
1051 m4_divert_push([HELP_END])dnl
1052 m4_ifset([AC_PACKAGE_BUGREPORT], [
1053 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1054 _ACEOF
1055 ac_status=$?
1058 if test "$ac_init_help" = "recursive"; then
1059   # If there are subdirs, report their specific --help.
1060   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1061     test -d "$ac_dir" || continue
1062     _AC_SRCDIRS(["$ac_dir"])
1063     cd "$ac_dir" || { ac_status=$?; continue; }
1064     # Check for guested configure.
1065     if test -f "$ac_srcdir/configure.gnu"; then
1066       echo &&
1067       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1068     elif test -f "$ac_srcdir/configure"; then
1069       echo &&
1070       $SHELL "$ac_srcdir/configure" --help=recursive
1071     else
1072       AC_MSG_WARN([no configuration information is in $ac_dir])
1073     fi || ac_status=$?
1074     cd "$ac_pwd" || { ac_status=$?; break; }
1075   done
1078 test -n "$ac_init_help" && exit $ac_status
1079 m4_divert_pop([HELP_END])dnl
1080 ])# _AC_INIT_HELP
1083 # _AC_INIT_VERSION
1084 # ----------------
1085 # Handle the `configure --version' message.
1086 m4_define([_AC_INIT_VERSION],
1087 [m4_divert_text([VERSION_BEGIN],
1088 [if $ac_init_version; then
1089   cat <<\_ACEOF
1090 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1091 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1092 generated by m4_PACKAGE_STRING])
1093 m4_divert_text([VERSION_END],
1094 [_ACEOF
1095   exit
1096 fi])dnl
1097 ])# _AC_INIT_VERSION
1100 # _AC_INIT_CONFIG_LOG
1101 # -------------------
1102 # Initialize the config.log file descriptor and write header to it.
1103 m4_define([_AC_INIT_CONFIG_LOG],
1104 [m4_divert_text([INIT_PREPARE],
1105 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1106 cat >config.log <<_ACEOF
1107 This file contains any messages produced by compilers while
1108 running configure, to aid debugging if configure makes a mistake.
1110 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1111 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1112 generated by m4_PACKAGE_STRING.  Invocation command line was
1114   $ $[0] $[@]
1116 _ACEOF
1117 exec AS_MESSAGE_LOG_FD>>config.log
1118 AS_UNAME >&AS_MESSAGE_LOG_FD
1120 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1123 m4_text_box([Core tests.])
1125 _ACEOF
1126 ])])# _AC_INIT_CONFIG_LOG
1129 # _AC_INIT_PREPARE
1130 # ----------------
1131 # Called by AC_INIT to build the preamble of the `configure' scripts.
1132 # 1. Trap and clean up various tmp files.
1133 # 2. Set up the fd and output files
1134 # 3. Remember the options given to `configure' for `config.status --recheck'.
1135 # 4. Initiates confdefs.h
1136 # 5. Loads site and cache files
1137 m4_define([_AC_INIT_PREPARE],
1138 [m4_divert_push([INIT_PREPARE])dnl
1140 # Keep a trace of the command line.
1141 # Strip out --no-create and --no-recursion so they do not pile up.
1142 # Strip out --silent because we don't want to record it for future runs.
1143 # Also quote any args containing shell meta-characters.
1144 # Make two passes to allow for proper duplicate-argument suppression.
1145 ac_configure_args=
1146 ac_configure_args0=
1147 ac_configure_args1=
1148 ac_must_keep_next=false
1149 for ac_pass in 1 2
1151   for ac_arg
1152   do
1153     case $ac_arg in
1154     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1155     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1156     | -silent | --silent | --silen | --sile | --sil)
1157       continue ;;
1158     *\'*)
1159       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1160     esac
1161     case $ac_pass in
1162     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1163     2)
1164       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1165 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1166 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1167 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1168 dnl give --prefix foo bar).
1169       if test $ac_must_keep_next = true; then
1170         ac_must_keep_next=false # Got value, back to normal.
1171       else
1172         case $ac_arg in
1173 dnl Use broad patterns, as arguments that would have already made configure
1174 dnl exit don't matter.
1175           *=* | --config-cache | -C | -disable-* | --disable-* \
1176           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1177           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1178           | -with-* | --with-* | -without-* | --without-* | --x)
1179             case "$ac_configure_args0 " in
1180               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1181             esac
1182             ;;
1183           -* ) ac_must_keep_next=true ;;
1184         esac
1185       fi
1186       ac_configure_args="$ac_configure_args '$ac_arg'"
1187       ;;
1188     esac
1189   done
1190 done
1191 AS_UNSET(ac_configure_args0)
1192 AS_UNSET(ac_configure_args1)
1194 # When interrupted or exit'd, cleanup temporary files, and complete
1195 # config.log.  We remove comments because anyway the quotes in there
1196 # would cause problems or look ugly.
1197 # WARNING: Use '\'' to represent an apostrophe within the trap.
1198 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1199 trap 'exit_status=$?
1200   # Save into config.log some information that might help in debugging.
1201   {
1202     echo
1204     AS_BOX([Cache variables.])
1205     echo
1206     m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1207                   [^ *\(#.*\)?
1208 ],                [],
1209                   ['], ['\\''])
1210     echo
1212     AS_BOX([Output variables.])
1213     echo
1214     for ac_var in $ac_subst_vars
1215     do
1216       eval ac_val=\$$ac_var
1217       case $ac_val in
1218       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1219       esac
1220       echo "$ac_var='\''$ac_val'\''"
1221     done | sort
1222     echo
1224     if test -n "$ac_subst_files"; then
1225       AS_BOX([File substitutions.])
1226       echo
1227       for ac_var in $ac_subst_files
1228       do
1229         eval ac_val=\$$ac_var
1230         case $ac_val in
1231         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1232         esac
1233         echo "$ac_var='\''$ac_val'\''"
1234       done | sort
1235       echo
1236     fi
1238     if test -s confdefs.h; then
1239       AS_BOX([confdefs.h.])
1240       echo
1241       cat confdefs.h
1242       echo
1243     fi
1244     test "$ac_signal" != 0 &&
1245       echo "$as_me: caught signal $ac_signal"
1246     echo "$as_me: exit $exit_status"
1247   } >&AS_MESSAGE_LOG_FD
1248   rm -f core *.core core.conftest.* &&
1249     rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1250     exit $exit_status
1251 ' 0
1252 for ac_signal in 1 2 13 15; do
1253   trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1254 done
1255 ac_signal=0
1257 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1258 rm -f -r conftest* confdefs.h
1259 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1260 dnl containing less than 14 bytes (including the newline).
1261 dnl But the defines below solve this problem.
1263 # Predefined preprocessor variables.
1264 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1265                    [Define to the full name of this package.])
1266 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1267                    [Define to the one symbol short name of this package.])
1268 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1269                    [Define to the version of this package.])
1270 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1271                    [Define to the full name and version of this package.])
1272 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1273                    [Define to the address where bug reports for this package
1274                     should be sent.])
1276 # Let the site file select an alternate cache file if it wants to.
1277 AC_SITE_LOAD
1278 AC_CACHE_LOAD
1279 m4_divert_pop([INIT_PREPARE])dnl
1280 ])# _AC_INIT_PREPARE
1283 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1284 # ----------------------------------------
1285 # This macro is used only for Autoupdate.
1286 AU_DEFUN([AC_INIT],
1287 [m4_ifval([$2], [[AC_INIT($@)]],
1288           [m4_ifval([$1],
1289 [[AC_INIT]
1290 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1294 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1295 # ----------------------------------------
1296 # Include the user macro files, prepare the diversions, and output the
1297 # preamble of the `configure' script.
1298 # Note that the order is important: first initialize, then set the
1299 # AC_CONFIG_SRCDIR.
1300 m4_define([AC_INIT],
1301 [# Forbidden tokens and exceptions.
1302 m4_pattern_forbid([^_?A[CHUM]_])
1303 m4_pattern_forbid([_AC_])
1304 m4_pattern_forbid([^LIBOBJS$],
1305                   [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1306 # Actually reserved by M4sh.
1307 m4_pattern_allow([^AS_FLAGS$])
1308 AS_INIT
1309 AS_PREPARE
1310 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1311 _AC_INIT_DEFAULTS
1312 _AC_INIT_PARSE_ARGS
1313 _AC_INIT_DIRCHECK
1314 _AC_INIT_SRCDIR
1315 _AC_INIT_HELP
1316 _AC_INIT_VERSION
1317 _AC_INIT_CONFIG_LOG
1318 _AC_INIT_PREPARE
1319 _AC_INIT_NOTICE
1320 _AC_INIT_COPYRIGHT
1321 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1323 dnl Substitute for predefined variables.
1324 AC_SUBST([DEFS])dnl
1325 AC_SUBST([ECHO_C])dnl
1326 AC_SUBST([ECHO_N])dnl
1327 AC_SUBST([ECHO_T])dnl
1328 AC_SUBST([LIBS])dnl
1329 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1330 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1331 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1333 AC_LANG_PUSH(C)
1339 ## ------------------------------------------------------------- ##
1340 ## Selecting optional features, working with optional software.  ##
1341 ## ------------------------------------------------------------- ##
1343 # AC_PRESERVE_HELP_ORDER
1344 # ----------------------
1345 # Emit help strings in the order given, rather than grouping all --enable-FOO
1346 # and all --with-BAR.
1347 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1348 [m4_divert_once([HELP_ENABLE], [[
1349 Optional Features and Packages:
1350   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1351   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1352   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1353   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
1354 m4_define([_m4_divert(HELP_ENABLE)],    _m4_divert(HELP_WITH))
1355 ])# AC_PRESERVE_HELP_ORDER
1357 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1358 # -------------------------------------------------------------------
1359 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1360 # OPTION is either "enable" or "with".
1362 m4_define([_AC_ENABLE_IF],
1363 [# Check whether --$1-$2 was given.
1364 _AC_ENABLE_IF_ACTION([$1], m4_bpatsubst([$2], -, _), [$3], [$4])[]dnl
1367 m4_define([_AC_ENABLE_IF_ACTION],
1368 [AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
1371 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1372 # ------------------------------------------------------------------------
1373 AC_DEFUN([AC_ARG_ENABLE],
1374 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1376 [m4_divert_once([HELP_ENABLE], [[
1377 Optional Features:
1378   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1379   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])])dnl
1380 m4_divert_once([HELP_ENABLE], [$2])dnl
1381 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1382 ])# AC_ARG_ENABLE
1385 AU_DEFUN([AC_ENABLE],
1386 [AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])])
1389 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1390 # --------------------------------------------------------------------
1391 AC_DEFUN([AC_ARG_WITH],
1392 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1394 [m4_divert_once([HELP_WITH], [[
1395 Optional Packages:
1396   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1397   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])])
1398 m4_divert_once([HELP_WITH], [$2])dnl
1399 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1400 ])# AC_ARG_WITH
1402 AU_DEFUN([AC_WITH],
1403 [AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])])
1407 ## ----------------------------------------- ##
1408 ## Remembering variables for reconfiguring.  ##
1409 ## ----------------------------------------- ##
1412 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1413 # ----------------------------------
1414 # Register VARNAME as a precious variable, and document it in
1415 # `configure --help' (but only once).
1416 AC_DEFUN([AC_ARG_VAR],
1417 [m4_divert_once([HELP_VAR], [[
1418 Some influential environment variables:]])dnl
1419 m4_divert_once([HELP_VAR_END], [[
1420 Use these variables to override the choices made by `configure' or to help
1421 it to find libraries and programs with nonstandard names/locations.]])dnl
1422 m4_expand_once([m4_divert_text([HELP_VAR],
1423                                [AS_HELP_STRING([$1], [$2], [              ])])],
1424                [$0($1)])dnl
1425 AC_SUBST([$1])dnl
1426 _AC_ARG_VAR_PRECIOUS([$1])dnl
1427 ])# AC_ARG_VAR
1430 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1431 # -----------------------------
1432 # Declare VARNAME is precious.
1433 m4_define([_AC_ARG_VAR_PRECIOUS],
1434 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1435 ])dnl
1439 # _AC_ARG_VAR_STORE
1440 # -----------------
1441 # We try to diagnose when precious variables have changed.  To do this,
1442 # make two early snapshots (after the option processing to take
1443 # explicit variables into account) of those variables: one (ac_env_)
1444 # which represents the current run, and a second (ac_cv_env_) which,
1445 # at the first run, will be saved in the cache.  As an exception to
1446 # the cache mechanism, its loading will override these variables (non
1447 # `ac_cv_env_' cache value are only set when unset).
1449 # In subsequent runs, after having loaded the cache, compare
1450 # ac_cv_env_foo against ac_env_foo.  See _AC_ARG_VAR_VALIDATE.
1451 m4_define([_AC_ARG_VAR_STORE],
1452 [m4_divert_text([PARSE_ARGS],
1453 [for ac_var in $ac_precious_vars; do
1454   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1455   eval ac_env_${ac_var}_value=\$${ac_var}
1456   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1457   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1458 done])dnl
1462 # _AC_ARG_VAR_VALIDATE
1463 # --------------------
1464 # The precious variables are saved twice at the beginning of
1465 # configure.  E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1466 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1467 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1469 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1470 # content of the cached values, while `ac_env_' represents that of the
1471 # current values.
1473 # So we check that `ac_env_' and `ac_cv_env_' are consistent.  If
1474 # they aren't, die.
1475 m4_define([_AC_ARG_VAR_VALIDATE],
1476 [m4_divert_text([INIT_PREPARE],
1477 [# Check that the precious variables saved in the cache have kept the same
1478 # value.
1479 ac_cache_corrupted=false
1480 for ac_var in $ac_precious_vars; do
1481   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1482   eval ac_new_set=\$ac_env_${ac_var}_set
1483   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1484   eval ac_new_val=\$ac_env_${ac_var}_value
1485   case $ac_old_set,$ac_new_set in
1486     set,)
1487       AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1488       ac_cache_corrupted=: ;;
1489     ,set)
1490       AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1491       ac_cache_corrupted=: ;;
1492     ,);;
1493     *)
1494       if test "x$ac_old_val" != "x$ac_new_val"; then
1495         AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1496         AS_MESSAGE([  former value:  $ac_old_val], 2)
1497         AS_MESSAGE([  current value: $ac_new_val], 2)
1498         ac_cache_corrupted=:
1499       fi;;
1500   esac
1501   # Pass precious variables to config.status.
1502   if test "$ac_new_set" = set; then
1503     case $ac_new_val in
1504     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1505     *) ac_arg=$ac_var=$ac_new_val ;;
1506     esac
1507     case " $ac_configure_args " in
1508       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1509       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1510     esac
1511   fi
1512 done
1513 if $ac_cache_corrupted; then
1514   AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1515   AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1516 fi])dnl
1517 ])# _AC_ARG_VAR_VALIDATE
1523 ## ---------------------------- ##
1524 ## Transforming program names.  ##
1525 ## ---------------------------- ##
1528 # AC_ARG_PROGRAM
1529 # --------------
1530 # This macro is expanded only once, to avoid that `foo' ends up being
1531 # installed as `ggfoo'.
1532 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1533 [dnl Document the options.
1534 m4_divert_push([HELP_BEGIN])dnl
1536 Program names:
1537   --program-prefix=PREFIX            prepend PREFIX to installed program names
1538   --program-suffix=SUFFIX            append SUFFIX to installed program names
1539   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1540 m4_divert_pop([HELP_BEGIN])dnl
1541 test "$program_prefix" != NONE &&
1542   program_transform_name="s&^&$program_prefix&;$program_transform_name"
1543 # Use a double $ so make ignores it.
1544 test "$program_suffix" != NONE &&
1545   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1546 # Double any \ or $.  echo might interpret backslashes.
1547 # By default was `s,x,x', remove it if useless.
1548 cat <<\_ACEOF >conftest.sed
1549 [s/[\\$]/&&/g;s/;s,x,x,$//]
1550 _ACEOF
1551 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1552 rm -f conftest.sed
1553 ])# AC_ARG_PROGRAM
1559 ## ------------------------- ##
1560 ## Finding auxiliary files.  ##
1561 ## ------------------------- ##
1564 # AC_CONFIG_AUX_DIR(DIR)
1565 # ----------------------
1566 # Find install-sh, config.sub, config.guess, and Cygnus configure
1567 # in directory DIR.  These are auxiliary files used in configuration.
1568 # DIR can be either absolute or relative to $srcdir.
1569 AC_DEFUN([AC_CONFIG_AUX_DIR],
1570 [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
1573 # AC_CONFIG_AUX_DIR_DEFAULT
1574 # -------------------------
1575 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1576 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1577 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1578 [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
1581 # AC_CONFIG_AUX_DIRS(DIR ...)
1582 # ---------------------------
1583 # Internal subroutine.
1584 # Search for the configuration auxiliary files in directory list $1.
1585 # We look only for install-sh, so users of AC_PROG_INSTALL
1586 # do not automatically need to distribute the other auxiliary files.
1587 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1588 [ac_aux_dir=
1589 for ac_dir in $1; do
1590   if test -f "$ac_dir/install-sh"; then
1591     ac_aux_dir=$ac_dir
1592     ac_install_sh="$ac_aux_dir/install-sh -c"
1593     break
1594   elif test -f "$ac_dir/install.sh"; then
1595     ac_aux_dir=$ac_dir
1596     ac_install_sh="$ac_aux_dir/install.sh -c"
1597     break
1598   elif test -f "$ac_dir/shtool"; then
1599     ac_aux_dir=$ac_dir
1600     ac_install_sh="$ac_aux_dir/shtool install -c"
1601     break
1602   fi
1603 done
1604 if test -z "$ac_aux_dir"; then
1605   AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1608 # These three variables are undocumented and unsupported,
1609 # and are intended to be withdrawn in a future Autoconf release.
1610 # They can cause serious problems if a builder's source tree is in a directory
1611 # whose full name contains unusual characters.
1612 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1613 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1614 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1616 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1617 ])# AC_CONFIG_AUX_DIRS
1622 ## ------------------------ ##
1623 ## Finding aclocal macros.  ##
1624 ## ------------------------ ##
1627 # AC_CONFIG_MACRO_DIR(DIR)
1628 # ------------------------
1629 # Declare directory containing additional macros for aclocal.
1630 # DIR can be either absolute or relative to $srcdir.
1631 AC_DEFUN([AC_CONFIG_MACRO_DIR],
1632 [case $1 in
1633   [[\\/]]* | ?:[[\\/]]* ) ac_macro_dir=$1         ;;
1634   *)                      ac_macro_dir=$srcdir/$1 ;;
1635 esac
1636 test -d "$ac_macro_dir" ||
1637   AC_MSG_ERROR([cannot find macro directory `$1'])
1638 ])# AC_CONFIG_MACRO_DIR
1642 ## --------------------- ##
1643 ## Requiring aux files.  ##
1644 ## --------------------- ##
1646 # AC_REQUIRE_AUX_FILE(FILE)
1647 # -------------------------
1648 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1649 # It announces FILE is required in the auxdir.
1650 m4_define([AC_REQUIRE_AUX_FILE],
1651 [AS_LITERAL_IF([$1], [],
1652                [AC_FATAL([$0: requires a literal argument])])])
1656 ## ----------------------------------- ##
1657 ## Getting the canonical system type.  ##
1658 ## ----------------------------------- ##
1660 # The inputs are:
1661 #    configure --host=HOST --target=TARGET --build=BUILD
1663 # The rules are:
1664 # 1. Build defaults to the current platform, as determined by config.guess.
1665 # 2. Host defaults to build.
1666 # 3. Target defaults to host.
1669 # _AC_CANONICAL_SPLIT(THING)
1670 # --------------------------
1671 # Generate the variables THING, THING_{alias cpu vendor os}.
1672 m4_define([_AC_CANONICAL_SPLIT],
1673 [case $ac_cv_$1 in
1674 *-*-*) ;;
1675 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1676 esac
1677 AC_SUBST([$1], [$ac_cv_$1])dnl
1678 ac_save_IFS=$IFS; IFS='-'
1679 set x $ac_cv_$1
1680 shift
1681 AC_SUBST([$1_cpu], [$[1]])dnl
1682 AC_SUBST([$1_vendor], [$[2]])dnl
1683 shift; shift
1684 [# Remember, the first character of IFS is used to create $]*,
1685 # except with old shells:
1686 $1_os=$[*]
1687 IFS=$ac_save_IFS
1688 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
1689 AC_SUBST([$1_os])dnl
1690 ])# _AC_CANONICAL_SPLIT
1693 # AC_CANONICAL_BUILD
1694 # ------------------
1695 AC_DEFUN([AC_CANONICAL_BUILD],
1696 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1697 AC_REQUIRE_AUX_FILE([config.sub])dnl
1698 AC_REQUIRE_AUX_FILE([config.guess])dnl
1699 m4_divert_once([HELP_CANON],
1701 System types:
1702   --build=BUILD     configure for building on BUILD [guessed]]])dnl
1703 # Make sure we can run config.sub.
1704 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1705   AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
1707 AC_CACHE_CHECK([build system type], [ac_cv_build],
1708 [ac_build_alias=$build_alias
1709 test "x$ac_build_alias" = x &&
1710   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1711 test "x$ac_build_alias" = x &&
1712   AC_MSG_ERROR([cannot guess build type; you must specify one])
1713 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1714   AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
1716 _AC_CANONICAL_SPLIT(build)
1717 ])# AC_CANONICAL_BUILD
1720 # AC_CANONICAL_HOST
1721 # -----------------
1722 AC_DEFUN([AC_CANONICAL_HOST],
1723 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1724 m4_divert_once([HELP_CANON],
1725 [[  --host=HOST       cross-compile to build programs to run on HOST [BUILD]]])dnl
1726 AC_CACHE_CHECK([host system type], [ac_cv_host],
1727 [if test "x$host_alias" = x; then
1728   ac_cv_host=$ac_cv_build
1729 else
1730   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1731     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
1734 _AC_CANONICAL_SPLIT([host])
1735 ])# AC_CANONICAL_HOST
1738 # AC_CANONICAL_TARGET
1739 # -------------------
1740 AC_DEFUN([AC_CANONICAL_TARGET],
1741 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1742 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1743 m4_divert_once([HELP_CANON],
1744 [[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
1745 AC_CACHE_CHECK([target system type], [ac_cv_target],
1746 [if test "x$target_alias" = x; then
1747   ac_cv_target=$ac_cv_host
1748 else
1749   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
1750     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
1753 _AC_CANONICAL_SPLIT([target])
1755 # The aliases save the names the user supplied, while $host etc.
1756 # will get canonicalized.
1757 test -n "$target_alias" &&
1758   test "$program_prefix$program_suffix$program_transform_name" = \
1759     NONENONEs,x,x, &&
1760   program_prefix=${target_alias}-[]dnl
1761 ])# AC_CANONICAL_TARGET
1764 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1767 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1768 # ------------------------------------------
1769 # If the cache file is inconsistent with the current host,
1770 # target and build system types, execute CMD or print a default
1771 # error message.  Now handled via _AC_ARG_VAR_PRECIOUS.
1772 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1775 ## ---------------------- ##
1776 ## Caching test results.  ##
1777 ## ---------------------- ##
1780 # AC_SITE_LOAD
1781 # ------------
1782 # Look for site or system specific initialization scripts.
1783 m4_define([AC_SITE_LOAD],
1784 [# Prefer explicitly selected file to automatically selected ones.
1785 if test -n "$CONFIG_SITE"; then
1786   set x "$CONFIG_SITE"
1787 elif test "x$prefix" != xNONE; then
1788   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1789 else
1790   set x "$ac_default_prefix/share/config.site" \
1791         "$ac_default_prefix/etc/config.site"
1793 shift
1794 for ac_site_file
1796   if test -r "$ac_site_file"; then
1797     AC_MSG_NOTICE([loading site script $ac_site_file])
1798     sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1799     . "$ac_site_file"
1800   fi
1801 done
1805 # AC_CACHE_LOAD
1806 # -------------
1807 m4_define([AC_CACHE_LOAD],
1808 [if test -r "$cache_file"; then
1809   # Some versions of bash will fail to source /dev/null (special
1810   # files actually), so we avoid doing that.
1811   if test -f "$cache_file"; then
1812     AC_MSG_NOTICE([loading cache $cache_file])
1813     case $cache_file in
1814       [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
1815       *)                      . "./$cache_file";;
1816     esac
1817   fi
1818 else
1819   AC_MSG_NOTICE([creating cache $cache_file])
1820   >$cache_file
1822 ])# AC_CACHE_LOAD
1825 # _AC_CACHE_DUMP
1826 # --------------
1827 # Dump the cache to stdout.  It can be in a pipe (this is a requirement).
1828 m4_define([_AC_CACHE_DUMP],
1829 [# The following way of writing the cache mishandles newlines in values,
1830 # but we know of no workaround that is simple, portable, and efficient.
1831 # So, we kill variables containing newlines.
1832 # Ultrix sh set writes to stderr and can't be redirected directly,
1833 # and sets the high bit in the cache file unless we assign to the vars.
1835   for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
1836     eval ac_val=\$$ac_var
1837     case $ac_val in #(
1838     *${as_nl}*)
1839       case $ac_var in #(
1840       *_cv_*) AC_MSG_WARN([Cache variable $ac_var contains a newline.]) ;;
1841       esac
1842       case $ac_var in #(
1843       _ | IFS | as_nl) ;; #(
1844       *) $as_unset $ac_var ;;
1845       esac ;;
1846     esac
1847   done
1849   (set) 2>&1 |
1850     case $as_nl`(ac_space=' '; set) 2>&1` in #(
1851     *${as_nl}ac_space=\ *)
1852       # `set' does not quote correctly, so add quotes (double-quote
1853       # substitution turns \\\\ into \\, and sed turns \\ into \).
1854       sed -n \
1855         ["s/'/'\\\\''/g;
1856           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1857       ;; #(
1858     *)
1859       # `set' quotes correctly as required by POSIX, so do not add quotes.
1860       sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
1861       ;;
1862     esac |
1863     sort
1864 )dnl
1865 ])# _AC_CACHE_DUMP
1868 # AC_CACHE_SAVE
1869 # -------------
1870 # Save the cache.
1871 # Allow a site initialization script to override cache values.
1872 m4_define([AC_CACHE_SAVE],
1873 [cat >confcache <<\_ACEOF
1874 # This file is a shell script that caches the results of configure
1875 # tests run on this system so they can be shared between configure
1876 # scripts and configure runs, see configure's option --config-cache.
1877 # It is not useful on other systems.  If it contains results you don't
1878 # want to keep, you may remove or edit it.
1880 # config.status only pays attention to the cache file if you give it
1881 # the --recheck option to rerun configure.
1883 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1884 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1885 # following values.
1887 _ACEOF
1889 _AC_CACHE_DUMP() |
1890   sed ['
1891      /^ac_cv_env_/b end
1892      t clear
1893      :clear
1894      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1895      t end
1896      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1897      :end'] >>confcache
1898 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1899   if test -w "$cache_file"; then
1900     test "x$cache_file" != "x/dev/null" &&
1901       AC_MSG_NOTICE([updating cache $cache_file])
1902     cat confcache >$cache_file
1903   else
1904     AC_MSG_NOTICE([not updating unwritable cache $cache_file])
1905   fi
1907 rm -f confcache[]dnl
1908 ])# AC_CACHE_SAVE
1911 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1912 # ------------------------------------------
1913 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1914 # Should be dnl'ed.  Try to catch common mistakes.
1915 m4_defun([AC_CACHE_VAL],
1916 [m4_bmatch([$2], [AC_DEFINE],
1917            [AC_DIAGNOSE([syntax],
1918 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1919 [where no actions should be taken])])dnl
1920 AS_VAR_SET_IF([$1],
1921               [_AS_ECHO_N([(cached) ])],
1922               [$2])])
1925 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1926 # -------------------------------------------
1927 # Do not call this macro with a dnl right behind.
1928 m4_defun([AC_CACHE_CHECK],
1929 [AC_MSG_CHECKING([$1])
1930 AC_CACHE_VAL([$2], [$3])dnl
1931 AS_LITERAL_IF([$2],
1932               [AC_MSG_RESULT([$$2])],
1933               [ac_res=AS_VAR_GET([$2])
1934                AC_MSG_RESULT([$ac_res])])dnl
1939 ## ---------------------- ##
1940 ## Defining CPP symbols.  ##
1941 ## ---------------------- ##
1944 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
1945 # -------------------------------------------
1946 # Used by --trace to collect the list of AC_DEFINEd macros.
1947 m4_define([AC_DEFINE_TRACE_LITERAL],
1948 [m4_pattern_allow([^$1$])])
1951 # AC_DEFINE_TRACE(CPP-SYMBOL)
1952 # ---------------------------
1953 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
1954 # out non literal symbols.
1955 m4_define([AC_DEFINE_TRACE],
1956 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
1959 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
1960 # -------------------------------------------
1961 # Set VARIABLE to VALUE, verbatim, or 1.  Remember the value
1962 # and if VARIABLE is affected the same VALUE, do nothing, else
1963 # die.  The third argument is used by autoheader.
1964 m4_define([AC_DEFINE], [_AC_DEFINE_Q([\], $@)])
1967 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
1968 # ----------------------------------------------------
1969 # Similar, but perform shell substitutions $ ` \ once on VALUE.
1970 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([], $@)])
1973 # _AC_DEFINE_Q(QUOTE, VARIABLE, [VALUE], [DESCRIPTION])
1974 # -----------------------------------------------------
1975 m4_define([_AC_DEFINE_Q],
1976 [AC_DEFINE_TRACE([$2])dnl
1977 m4_ifval([$4], [AH_TEMPLATE(m4_bpatsubst([[$2]], [(.*)]), [$4])])dnl
1978 cat >>confdefs.h <<$1_ACEOF
1979 [@%:@define] $2 m4_if($#, 2, 1, [$3])
1980 _ACEOF
1985 ## -------------------------- ##
1986 ## Setting output variables.  ##
1987 ## -------------------------- ##
1990 # AC_SUBST_TRACE(VARIABLE)
1991 # ------------------------
1992 # This macro is used with --trace to collect the list of substituted variables.
1993 m4_define([AC_SUBST_TRACE])
1996 # AC_SUBST(VARIABLE, [VALUE])
1997 # ---------------------------
1998 # Create an output variable from a shell VARIABLE.  If VALUE is given
1999 # assign it to VARIABLE.  Use `""' is you want to set VARIABLE to an
2000 # empty value, not an empty second argument.
2002 m4_define([AC_SUBST],
2003 [AC_SUBST_TRACE([$1])dnl
2004 m4_pattern_allow([^$1$])dnl
2005 m4_ifvaln([$2], [$1=$2])[]dnl
2006 m4_append_uniq([_AC_SUBST_VARS], [$1], [
2007 ])dnl
2008 ])# AC_SUBST
2011 # AC_SUBST_FILE(VARIABLE)
2012 # -----------------------
2013 # Read the comments of the preceding macro.
2014 m4_define([AC_SUBST_FILE],
2015 [m4_pattern_allow([^$1$])dnl
2016 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2017 ])])
2021 ## --------------------------------------- ##
2022 ## Printing messages at autoconf runtime.  ##
2023 ## --------------------------------------- ##
2025 # In fact, I think we should promote the use of m4_warn and m4_fatal
2026 # directly.  This will also avoid to some people to get it wrong
2027 # between AC_FATAL and AC_MSG_ERROR.
2030 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2031 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2032 # --------------------------------
2033 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2034 m4_define([AC_FATAL],    [m4_fatal($@)])
2037 # AC_WARNING(MESSAGE)
2038 # -------------------
2039 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2040 # specified.
2041 m4_define([AC_WARNING],
2042 [AC_DIAGNOSE([syntax], [$1])])
2047 ## ---------------------------------------- ##
2048 ## Printing messages at configure runtime.  ##
2049 ## ---------------------------------------- ##
2052 # AC_MSG_CHECKING(FEATURE)
2053 # ------------------------
2054 m4_define([AC_MSG_CHECKING],
2055 [{ _AS_ECHO_LOG([checking $1])
2056 _AS_ECHO_N([checking $1... ]); }dnl
2060 # AC_MSG_RESULT(RESULT)
2061 # ---------------------
2062 m4_define([AC_MSG_RESULT],
2063 [{ _AS_ECHO_LOG([result: $1])
2064 _AS_ECHO([${ECHO_T}$1]); }dnl
2068 # AC_MSG_WARN(PROBLEM)
2069 # AC_MSG_NOTICE(STRING)
2070 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2071 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2072 # ----------------------------------------
2073 m4_copy([AS_WARN],    [AC_MSG_WARN])
2074 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2075 m4_copy([AS_ERROR],   [AC_MSG_ERROR])
2076 m4_define([AC_MSG_FAILURE],
2077 [AC_MSG_ERROR([$1
2078 See `config.log' for more details.], [$2])])
2081 # _AC_MSG_LOG_CONFTEST
2082 # --------------------
2083 m4_define([_AC_MSG_LOG_CONFTEST],
2084 [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
2085 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2089 # AU::AC_CHECKING(FEATURE)
2090 # ------------------------
2091 AU_DEFUN([AC_CHECKING],
2092 [AS_MESSAGE([checking $1...])])
2095 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2096 # ----------------------------------
2097 # No escaping, so it performed also backtick substitution.
2098 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2099 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
2100 _AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
2104 # AU::AC_VERBOSE(STRING)
2105 # ----------------------
2106 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2113 ## ---------------------------- ##
2114 ## Compiler-running mechanics.  ##
2115 ## ---------------------------- ##
2118 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2119 # ----------------------------------
2120 # Eval COMMAND, save the exit status in ac_status, and log it.
2121 AC_DEFUN([_AC_RUN_LOG],
2122 [{ ($2) >&AS_MESSAGE_LOG_FD
2123   ($1) 2>&AS_MESSAGE_LOG_FD
2124   ac_status=$?
2125   _AS_ECHO_LOG([\$? = $ac_status])
2126   (exit $ac_status); }])
2129 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2130 # -----------------------------------------
2131 # Run COMMAND, save its stderr into conftest.err, save the exit status
2132 # in ac_status, and log it.  Don't forget to clean up conftest.err after
2133 # use.
2134 # Note that when tracing, most shells will leave the traces in stderr
2135 # starting with "+": that's what this macro tries to address.
2136 AC_DEFUN([_AC_RUN_LOG_STDERR],
2137 [{ ($2) >&AS_MESSAGE_LOG_FD
2138   ($1) 2>conftest.er1
2139   ac_status=$?
2140   grep -v '^ *+' conftest.er1 >conftest.err
2141   rm -f conftest.er1
2142   cat conftest.err >&AS_MESSAGE_LOG_FD
2143   _AS_ECHO_LOG([\$? = $ac_status])
2144   (exit $ac_status); }])
2146 # _AC_DO_ECHO(COMMAND)
2147 # --------------------
2148 # Echo COMMAND.  This is designed to be used just before evaluating COMMAND.
2149 AC_DEFUN([_AC_DO_ECHO],
2150 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2151 ])dnl
2152 dnl If the string contains '"', '`', or '\', then just echo it rather
2153 dnl than expanding it.  This is a hack, but it is safer, while also
2154 dnl typically expanding simple substrings like '$CC', which is what we want.
2156 dnl The rest of this macro body is quoted, to work around misuses like
2157 dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2158 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2159 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2160 dnl underquoting misuses, such as
2161 dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2162 dnl We normally wouldn't bother with this kind of workaround for invalid code
2163 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2164 dnl minimize the integration hassle.
2165 [case "(($ac_try" in
2166   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2167   *) ac_try_echo=$ac_try;;
2168 esac
2169 eval "echo \"\$as_me:$LINENO: $ac_try_echo\""]])
2171 # _AC_DO(COMMAND)
2172 # ---------------
2173 # Eval COMMAND, save the exit status in ac_status, and log it.
2174 # For internal use only.
2175 AC_DEFUN([_AC_DO],
2176 [_AC_RUN_LOG([eval "$1"],
2177              [_AC_DO_ECHO([$1])])])
2180 # _AC_DO_STDERR(COMMAND)
2181 # ----------------------
2182 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2183 AC_DEFUN([_AC_DO_STDERR],
2184 [_AC_RUN_LOG_STDERR([eval "$1"],
2185                     [_AC_DO_ECHO([$1])])])
2188 # _AC_DO_VAR(VARIABLE)
2189 # --------------------
2190 # Evaluate "$VARIABLE", which should be a valid shell command.
2191 # The purpose of this macro is to write "configure:123: command line"
2192 # into config.log for every test run.
2193 AC_DEFUN([_AC_DO_VAR],
2194 [_AC_DO([$$1])])
2197 # _AC_DO_TOKENS(COMMAND)
2198 # ----------------------
2199 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2200 # tokens of the shell command language.
2201 AC_DEFUN([_AC_DO_TOKENS],
2202 [{ ac_try='$1'
2203   _AC_DO([$ac_try]); }])
2206 # _AC_EVAL(COMMAND)
2207 # -----------------
2208 # Eval COMMAND, save the exit status in ac_status, and log it.
2209 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2210 # It is present only for backward compatibility with previous Autoconf versions.
2211 AC_DEFUN([_AC_EVAL],
2212 [_AC_RUN_LOG([eval $1],
2213              [eval echo "$as_me:$LINENO: \"$1\""])])
2216 # _AC_EVAL_STDERR(COMMAND)
2217 # ------------------------
2218 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2219 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2220 # It is present only for backward compatibility with previous Autoconf versions.
2221 AC_DEFUN([_AC_EVAL_STDERR],
2222 [_AC_RUN_LOG_STDERR([eval $1],
2223                     [eval echo "$as_me:$LINENO: \"$1\""])])
2226 # AC_TRY_EVAL(VARIABLE)
2227 # ---------------------
2228 # Evaluate $VARIABLE, which should be a valid shell command.
2229 # The purpose of this macro is to write "configure:123: command line"
2230 # into config.log for every test run.
2232 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2233 # undocumented, and should not be used.
2234 # They may be removed or their API changed in a future release.
2235 # Autoconf itself no longer uses these two macros; they are present
2236 # only for backward compatibility with previous versions of Autoconf.
2237 # Not every shell command will work due to problems with eval
2238 # and quoting, and the rules for exactly what does work are tricky.
2239 # Worse, due to double-expansion during evaluation, arbitrary unintended
2240 # shell commands could be executed in some situations.
2241 AC_DEFUN([AC_TRY_EVAL],
2242 [_AC_EVAL([$$1])])
2245 # AC_TRY_COMMAND(COMMAND)
2246 # -----------------------
2247 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2248 # tokens of the shell command language.
2249 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2250 AC_DEFUN([AC_TRY_COMMAND],
2251 [{ ac_try='$1'
2252   _AC_EVAL([$ac_try]); }])
2255 # AC_RUN_LOG(COMMAND)
2256 # -------------------
2257 AC_DEFUN([AC_RUN_LOG],
2258 [_AC_RUN_LOG([$1],
2259              [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])])
2264 ## ------------------------ ##
2265 ## Examining declarations.  ##
2266 ## ------------------------ ##
2270 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2271 # ----------------------------------------------------------------
2272 # Try to preprocess PROGRAM.
2274 # This macro can be used during the selection of a preprocessor.
2275 # Run cpp and set ac_cpp_err to "yes" for an error, to
2276 # "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
2277 # neither warnings nor errors have been detected.  eval is necessary
2278 # to expand ac_cpp.
2279 AC_DEFUN([_AC_PREPROC_IFELSE],
2280 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2281 if _AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then
2282   if test -s conftest.err; then
2283     ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
2284     ac_cpp_err=$ac_cpp_err$ac_[]_AC_LANG_ABBREV[]_werror_flag
2285   else
2286     ac_cpp_err=
2287   fi
2288 else
2289   ac_cpp_err=yes
2291 AS_IF([test -z "$ac_cpp_err"], [$2], [_AC_MSG_LOG_CONFTEST
2292   $3])
2293 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2294 ])# _AC_PREPROC_IFELSE
2297 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2298 # ---------------------------------------------------------------
2299 # Try to preprocess PROGRAM.  Requires that the preprocessor for the
2300 # current language was checked for, hence do not use this macro in macros
2301 # looking for a preprocessor.
2302 AC_DEFUN([AC_PREPROC_IFELSE],
2303 [AC_LANG_PREPROC_REQUIRE()dnl
2304 _AC_PREPROC_IFELSE($@)])
2307 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2308 # ---------------------------------------------------------
2309 # AC_TRY_CPP is used to check whether particular header files exist.
2310 # (But it actually tests whether INCLUDES produces no CPP errors.)
2312 # INCLUDES are not defaulted and are double quoted.
2313 AU_DEFUN([AC_TRY_CPP],
2314 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2317 # AC_EGREP_CPP(PATTERN, PROGRAM,
2318 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2319 # ------------------------------------------------------
2320 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2321 # come early, it is not included in AC_BEFORE checks.
2322 AC_DEFUN([AC_EGREP_CPP],
2323 [AC_LANG_PREPROC_REQUIRE()dnl
2324 AC_REQUIRE([AC_PROG_EGREP])dnl
2325 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2326 AS_IF([dnl eval is necessary to expand ac_cpp.
2327 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2328 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2329 dnl Quote $1 to prevent m4 from eating character classes
2330   $EGREP "[$1]" >/dev/null 2>&1],
2331   [$3],
2332   [$4])dnl
2333 rm -f conftest*
2334 ])# AC_EGREP_CPP
2337 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2338 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2339 # ---------------------------------------------------------
2340 AC_DEFUN([AC_EGREP_HEADER],
2341 [AC_EGREP_CPP([$1],
2342 [#include <$2>
2343 ], [$3], [$4])])
2348 ## ------------------ ##
2349 ## Examining syntax.  ##
2350 ## ------------------ ##
2353 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2354 # ----------------------------------------------------------------
2355 # Try to compile PROGRAM.
2356 # This macro can be used during the selection of a compiler.
2357 m4_define([_AC_COMPILE_IFELSE],
2358 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2359 rm -f conftest.$ac_objext
2360 AS_IF([_AC_DO_STDERR($ac_compile) &&
2361          _AC_DO_TOKENS([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) &&
2362          _AC_DO_TOKENS([test -s conftest.$ac_objext])],
2363       [$2],
2364       [_AC_MSG_LOG_CONFTEST
2365         $3])
2366 rm -f core conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2367 ])# _AC_COMPILE_IFELSE
2370 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2371 # ---------------------------------------------------------------
2372 # Try to compile PROGRAM.  Requires that the compiler for the current
2373 # language was checked for, hence do not use this macro in macros looking
2374 # for a compiler.
2375 AC_DEFUN([AC_COMPILE_IFELSE],
2376 [AC_LANG_COMPILER_REQUIRE()dnl
2377 _AC_COMPILE_IFELSE($@)])
2380 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2381 #                [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2382 # ---------------------------------------------------
2383 AU_DEFUN([AC_TRY_COMPILE],
2384 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2388 ## --------------------- ##
2389 ## Examining libraries.  ##
2390 ## --------------------- ##
2393 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2394 # -------------------------------------------------------------
2395 # Try to link PROGRAM.
2396 # This macro can be used during the selection of a compiler.
2397 m4_define([_AC_LINK_IFELSE],
2398 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2399 rm -f conftest.$ac_objext conftest$ac_exeext
2400 AS_IF([_AC_DO_STDERR($ac_link) &&
2401          _AC_DO_TOKENS([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) &&
2402          _AC_DO_TOKENS([test -s conftest$ac_exeext])],
2403       [$2],
2404       [_AC_MSG_LOG_CONFTEST
2405         $3])
2406 rm -f core conftest.err conftest.$ac_objext \
2407       conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2408 ])# _AC_LINK_IFELSE
2411 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2412 # ------------------------------------------------------------
2413 # Try to link PROGRAM.  Requires that the compiler for the current
2414 # language was checked for, hence do not use this macro in macros looking
2415 # for a compiler.
2416 AC_DEFUN([AC_LINK_IFELSE],
2417 [AC_LANG_COMPILER_REQUIRE()dnl
2418 _AC_LINK_IFELSE($@)])
2421 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2422 #             [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2423 # ------------------------------------------------
2424 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2425 AU_DEFUN([AC_TRY_LINK],
2426 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2429 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2430 #                  ACTION-IF-TRUE, [ACTION-IF-FALSE])
2431 # ---------------------------------------------------
2432 AU_DEFUN([AC_COMPILE_CHECK],
2433 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2434 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2439 ## ------------------------------- ##
2440 ## Checking for runtime features.  ##
2441 ## ------------------------------- ##
2444 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2445 # ------------------------------------------------------------
2446 # Compile, link, and run.
2447 # This macro can be used during the selection of a compiler.
2448 # We also remove conftest.o as if the compilation fails, some compilers
2449 # don't remove it.  We remove gmon.out and bb.out, which may be
2450 # created during the run if the program is built with profiling support.
2451 m4_define([_AC_RUN_IFELSE],
2452 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2453 rm -f conftest$ac_exeext
2454 AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2455       [$2],
2456       [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
2457 _AC_MSG_LOG_CONFTEST
2458 m4_ifvaln([$3],
2459           [( exit $ac_status )
2460 $3])dnl])[]dnl
2461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2462                                                      [conftest.$ac_ext])[]dnl
2463 ])# _AC_RUN_IFELSE
2466 # AC_RUN_IFELSE(PROGRAM,
2467 #               [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2468 #               [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2469 # ----------------------------------------------------------
2470 # Compile, link, and run. Requires that the compiler for the current
2471 # language was checked for, hence do not use this macro in macros looking
2472 # for a compiler.
2473 AC_DEFUN([AC_RUN_IFELSE],
2474 [AC_LANG_COMPILER_REQUIRE()dnl
2475 m4_ifval([$4], [],
2476          [AC_DIAGNOSE([cross],
2477                      [$0 called without default to allow cross compiling])])dnl
2478 AS_IF([test "$cross_compiling" = yes],
2479   [m4_default([$4],
2480            [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2481   [_AC_RUN_IFELSE($@)])
2485 # AC_TRY_RUN(PROGRAM,
2486 #            [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2487 #            [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2488 # --------------------------------------------------------
2489 AU_DEFUN([AC_TRY_RUN],
2490 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2494 ## ------------------------------------- ##
2495 ## Checking for the existence of files.  ##
2496 ## ------------------------------------- ##
2498 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2499 # -------------------------------------------------------------
2501 # Check for the existence of FILE.
2502 AC_DEFUN([AC_CHECK_FILE],
2503 [AC_DIAGNOSE([cross],
2504              [cannot check for file existence when cross compiling])dnl
2505 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2506 AC_CACHE_CHECK([for $1], ac_File,
2507 [test "$cross_compiling" = yes &&
2508   AC_MSG_ERROR([cannot check for file existence when cross compiling])
2509 if test -r "$1"; then
2510   AS_VAR_SET(ac_File, yes)
2511 else
2512   AS_VAR_SET(ac_File, no)
2513 fi])
2514 AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
2515 AS_VAR_POPDEF([ac_File])dnl
2516 ])# AC_CHECK_FILE
2519 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2520 # -----------------------------------------------------------------
2521 AC_DEFUN([AC_CHECK_FILES],
2522 [m4_foreach_w([AC_FILE_NAME], [$1],
2523   [AC_CHECK_FILE(AC_FILE_NAME,
2524                  [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2525                                     [Define to 1 if you have the
2526                                      file `]AC_File['.])
2527 $2],
2528                  [$3])])])
2531 ## ------------------------------- ##
2532 ## Checking for declared symbols.  ##
2533 ## ------------------------------- ##
2536 # AC_CHECK_DECL(SYMBOL,
2537 #               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2538 #               [INCLUDES = DEFAULT-INCLUDES])
2539 # -------------------------------------------------------
2540 # Check if SYMBOL (a variable or a function) is declared.
2541 AC_DEFUN([AC_CHECK_DECL],
2542 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2543 AC_CACHE_CHECK([whether $1 is declared], ac_Symbol,
2544 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2545 [#ifndef $1
2546   char *p = (char *) $1;
2547   return !p;
2548 #endif
2549 ])],
2550                    [AS_VAR_SET(ac_Symbol, yes)],
2551                    [AS_VAR_SET(ac_Symbol, no)])])
2552 AS_IF([test AS_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl
2553 AS_VAR_POPDEF([ac_Symbol])dnl
2554 ])# AC_CHECK_DECL
2557 # AC_CHECK_DECLS(SYMBOLS,
2558 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2559 #                [INCLUDES = DEFAULT-INCLUDES])
2560 # --------------------------------------------------------
2561 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
2562 # documentation for a detailed explanation of this difference with
2563 # other AC_CHECK_*S macros.  SYMBOLS is an m4 list.
2564 AC_DEFUN([AC_CHECK_DECLS],
2565 [m4_foreach([AC_Symbol], [$1],
2566   [AC_CHECK_DECL(AC_Symbol,
2567                  [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2568                                      [Define to 1 if you have the declaration
2569                                      of `]AC_Symbol[', and to 0 if you don't.])
2570 $2],
2571                  [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2572 $3],
2573                  [$4])])
2574 ])# AC_CHECK_DECLS
2577 # AC_CHECK_DECLS_ONCE(SYMBOLS)
2578 # ----------------------------
2579 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
2580 AC_DEFUN([AC_CHECK_DECLS_ONCE],
2582   m4_foreach([AC_Symbol], [$1],
2583     [AC_DEFUN([_AC_Check_Decl_]m4_defn([AC_Symbol]),
2584        [AC_CHECK_DECLS(m4_defn([AC_Symbol]))])
2585      AC_REQUIRE([_AC_Check_Decl_]m4_defn([AC_Symbol]))])
2590 ## ---------------------------------- ##
2591 ## Replacement of library functions.  ##
2592 ## ---------------------------------- ##
2595 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2596 # -----------------------------
2597 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2598 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2599 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
2602 # AC_LIBSOURCE(FILE-NAME)
2603 # -----------------------
2604 # Announce we might need the file `FILE-NAME'.
2605 m4_define([AC_LIBSOURCE], [])
2608 # AC_LIBSOURCES([FILE-NAME1, ...])
2609 # -------------------------------
2610 # Announce we might need these files.
2611 m4_define([AC_LIBSOURCES],
2612 [m4_foreach([_AC_FILE_NAME], [$1],
2613             [AC_LIBSOURCE(_AC_FILE_NAME)])])
2616 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
2617 # --------------------------------------------
2618 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2619 m4_define([_AC_LIBOBJ],
2620 [AS_LITERAL_IF([$1],
2621                [AC_LIBSOURCE([$1.c])],
2622                [$2])dnl
2623 case " $LIB@&t@OBJS " in
2624   *" $1.$ac_objext "* ) ;;
2625   *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
2626 esac
2630 # AC_LIBOBJ(FILE-NAME-NOEXT)
2631 # -------------------------
2632 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2633 m4_define([AC_LIBOBJ],
2634 [_AC_LIBOBJ([$1],
2635             [AC_DIAGNOSE(syntax,
2636                          [$0($1): you should use literals])])dnl
2640 # _AC_LIBOBJS_NORMALIZE
2641 # ---------------------
2642 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
2643 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2644 # Used with AC_CONFIG_COMMANDS_PRE.
2645 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2646 [ac_libobjs=
2647 ac_ltlibobjs=
2648 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2649   # 1. Remove the extension, and $U if already installed.
2650   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2651   ac_i=`echo "$ac_i" | sed "$ac_script"`
2652   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
2653   #    will be set to the directory where LIBOBJS objects are built.
2654   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
2655   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
2656 done
2657 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2658 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2662 ## ----------------------------------- ##
2663 ## Checking compiler characteristics.  ##
2664 ## ----------------------------------- ##
2667 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2668 # -------------------------------------------------------------------
2669 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2670 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2671 m4_define([_AC_COMPUTE_INT_COMPILE],
2672 [# Depending upon the size, compute the lo and hi bounds.
2673 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2674  [ac_lo=0 ac_mid=0
2675   while :; do
2676     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2677                        [ac_hi=$ac_mid; break],
2678                        [ac_lo=`expr $ac_mid + 1`
2679                         if test $ac_lo -le $ac_mid; then
2680                           ac_lo= ac_hi=
2681                           break
2682                         fi
2683                         ac_mid=`expr 2 '*' $ac_mid + 1`])
2684   done],
2685 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2686  [ac_hi=-1 ac_mid=-1
2687   while :; do
2688     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2689                        [ac_lo=$ac_mid; break],
2690                        [ac_hi=`expr '(' $ac_mid ')' - 1`
2691                         if test $ac_mid -le $ac_hi; then
2692                           ac_lo= ac_hi=
2693                           break
2694                         fi
2695                         ac_mid=`expr 2 '*' $ac_mid`])
2696   done],
2697  [ac_lo= ac_hi=])])
2698 # Binary search between lo and hi bounds.
2699 while test "x$ac_lo" != "x$ac_hi"; do
2700   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2701   _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2702                      [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2703 done
2704 case $ac_lo in
2705 ?*) $2=$ac_lo;;
2706 '') $4 ;;
2707 esac[]dnl
2708 ])# _AC_COMPUTE_INT_COMPILE
2711 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2712 # ---------------------------------------------------------------
2713 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2714 m4_define([_AC_COMPUTE_INT_RUN],
2715 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2716                 [$2=`cat conftest.val`], [$4])])
2719 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
2720 # ---------------------------------------------------------
2721 # FIXME: this private interface was used by several packages.
2722 # Give them time to transition to AC_COMPUTE_INT (which is cleaner)
2723 # and then delete this one.  Or if they do not transition,
2724 # it may make sense to limit the code duplication and use
2725 # _AC_COMPUTE_INT from within the public macro.
2726 AC_DEFUN([_AC_COMPUTE_INT],
2727 [AC_LANG_COMPILER_REQUIRE()dnl
2728 if test "$cross_compiling" = yes; then
2729   _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3], [$4])
2730 else
2731   _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
2733 rm -f conftest.val[]dnl
2734 AC_DIAGNOSE([obsolete],
2735 [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
2736 future version or Autoconf.  Hence, it is suggested that you use
2737 instead the public AC_COMPUTE_INT macro.  Note that the arguments are
2738 slightly different between the two.])dnl
2739 ])# _AC_COMPUTE_INT
2741 # AC_COMPUTE_INT(MESSAGE, CACHE-ID, EXPRESSION, [PROLOGUE = DEFAULT-INCLUDES],
2742 #                [IF-FAILS])
2743 # ---------------------------------------------------------
2744 AC_DEFUN([AC_COMPUTE_INT],
2745 [AC_LANG_COMPILER_REQUIRE()dnl
2746 AC_CACHE_CHECK([$1], [$2],
2747 [if test "$cross_compiling" = yes; then
2748   _AC_COMPUTE_INT_COMPILE([$3], [$2], [AC_INCLUDES_DEFAULT([$4])], [$5])
2749 else
2750   _AC_COMPUTE_INT_RUN([$3], [$2], [AC_INCLUDES_DEFAULT([$4])], [$5])
2752 rm -f conftest.val[]dnl
2754 ])# AC_COMPUTE_INT