GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / share / autoconf / autoconf / general.m4
blobe34bea4d04b0857e611b0205b4e46c1b7f34e75a
1 # This file is part of Autoconf.                       -*- Autoconf -*-
2 # Parameterized macros.
3 m4_define([_AC_COPYRIGHT_YEARS], [
4 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
5 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6 Inc.
7 ])
9 # This file is part of Autoconf.  This program is free
10 # software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the
12 # Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
20 # Under Section 7 of GPL version 3, you are granted additional
21 # permissions described in the Autoconf Configure Script Exception,
22 # version 3.0, as published by the Free Software Foundation.
24 # You should have received a copy of the GNU General Public License
25 # and a copy of the Autoconf Configure Script Exception along with
26 # this program; see the files COPYINGv3 and COPYING.EXCEPTION
27 # respectively.  If not, see <http://www.gnu.org/licenses/>.
29 # Written by David MacKenzie, with help from
30 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
31 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
34 ## ---------------- ##
35 ## The diversions.  ##
36 ## ---------------- ##
39 # We heavily use m4's diversions both for the initializations and for
40 # required macros (see AC_REQUIRE), because in both cases we have to
41 # issue high in `configure' something which is discovered late.
43 # KILL is only used to suppress output.
45 # The layers of `configure'.  We let m4 undivert them by itself, when
46 # it reaches the end of `configure.ac'.
48 # - BINSH
49 #   #! /bin/sh
50 # - HEADER-REVISION
51 #   Sent by AC_REVISION
52 # - HEADER-COMMENT
53 #   Purpose of the script.
54 # - HEADER-COPYRIGHT
55 #   Copyright notice(s)
56 # - M4SH-INIT
57 #   Initialization of bottom layers.
59 # - DEFAULTS
60 #   early initializations (defaults)
61 # - PARSE_ARGS
62 #   initialization code, option handling loop.
64 # - HELP_BEGIN
65 #   Handling `configure --help'.
66 # - HELP_CANON
67 #   Help msg for AC_CANONICAL_*
68 # - HELP_ENABLE
69 #   Help msg from AC_ARG_ENABLE.
70 # - HELP_WITH
71 #   Help msg from AC_ARG_WITH.
72 # - HELP_VAR
73 #   Help msg from AC_ARG_VAR.
74 # - HELP_VAR_END
75 #   A small paragraph on the use of the variables.
76 # - HELP_END
77 #   Tail of the handling of --help.
79 # - VERSION_BEGIN
80 #   Head of the handling of --version.
81 # - VERSION_FSF
82 #   FSF copyright notice for --version.
83 # - VERSION_USER
84 #   User copyright notice for --version.
85 # - VERSION_END
86 #   Tail of the handling of --version.
88 # - SHELL_FN
89 #   Shell functions.
91 # - INIT_PREPARE
92 #   Tail of initialization code.
94 # - BODY
95 #   the tests and output code
99 # _m4_divert(DIVERSION-NAME)
100 # --------------------------
101 # Convert a diversion name into its number.  Otherwise, return
102 # DIVERSION-NAME which is supposed to be an actual diversion number.
103 # Of course it would be nicer to use m4_case here, instead of zillions
104 # of little macros, but it then takes twice longer to run `autoconf'!
106 # From M4sugar:
107 #    -1. KILL
108 # 10000. GROW
110 # From M4sh:
111 #    0. BINSH
112 #    1. HEADER-REVISION
113 #    2. HEADER-COMMENT
114 #    3. HEADER-COPYRIGHT
115 #    4. M4SH-INIT
116 # 1000. BODY
117 m4_define([_m4_divert(DEFAULTS)],        10)
118 m4_define([_m4_divert(PARSE_ARGS)],      20)
120 m4_define([_m4_divert(HELP_BEGIN)],     100)
121 m4_define([_m4_divert(HELP_CANON)],     101)
122 m4_define([_m4_divert(HELP_ENABLE)],    102)
123 m4_define([_m4_divert(HELP_WITH)],      103)
124 m4_define([_m4_divert(HELP_VAR)],       104)
125 m4_define([_m4_divert(HELP_VAR_END)],   105)
126 m4_define([_m4_divert(HELP_END)],       106)
128 m4_define([_m4_divert(VERSION_BEGIN)],  200)
129 m4_define([_m4_divert(VERSION_FSF)],    201)
130 m4_define([_m4_divert(VERSION_USER)],   202)
131 m4_define([_m4_divert(VERSION_END)],    203)
133 m4_define([_m4_divert(SHELL_FN)],       250)
135 m4_define([_m4_divert(INIT_PREPARE)],   300)
139 # AC_DIVERT_PUSH(DIVERSION-NAME)
140 # AC_DIVERT_POP
141 # ------------------------------
142 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
143 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
147 ## ------------------------------------ ##
148 ## Defining/requiring Autoconf macros.  ##
149 ## ------------------------------------ ##
152 # AC_DEFUN(NAME, EXPANSION)
153 # AC_DEFUN_ONCE(NAME, EXPANSION)
154 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
155 # AC_REQUIRE(STRING)
156 # AC_PROVIDE(MACRO-NAME)
157 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
158 # -----------------------------------------------------------
159 m4_copy([m4_defun],       [AC_DEFUN])
160 m4_copy([m4_defun_once],  [AC_DEFUN_ONCE])
161 m4_copy([m4_before],      [AC_BEFORE])
162 m4_copy([m4_require],     [AC_REQUIRE])
163 m4_copy([m4_provide],     [AC_PROVIDE])
164 m4_copy([m4_provide_if],  [AC_PROVIDE_IFELSE])
167 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
168 # ------------------------------------------
169 m4_define([AC_OBSOLETE],
170 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
174 ## ----------------------------- ##
175 ## Implementing shell functions. ##
176 ## ----------------------------- ##
179 # AC_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY, [DIVERSION = SHELL_FN]
180 # ------------------------------------------------------------------------
181 # Same as AS_REQUIRE_SHELL_FN except that the default diversion comes
182 # later in the script (speeding up configure --help and --version).
183 AC_DEFUN([AC_REQUIRE_SHELL_FN],
184 [AS_REQUIRE_SHELL_FN([$1], [$2], [$3], m4_default_quoted([$4], [SHELL_FN]))])
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], [URL])
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])])
250 m4_ifndef([AC_PACKAGE_URL],
251           [m4_define([AC_PACKAGE_URL],
252   m4_if([$5], [], [m4_if(m4_index([$1], [GNU ]), [0],
253           [[http://www.gnu.org/software/]m4_defn([AC_PACKAGE_TARNAME])[/]])],
254         [[$5]]))])
258 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER],
259 #              [FILTER = m4_newline])
260 # ------------------------------------------------------
261 # Emit TEXT, a copyright notice, in the top of `configure' and in
262 # --version output.  Macros in TEXT are evaluated once.  Process
263 # the --version output through FILTER (m4_newline, m4_do, and
264 # m4_copyright_condense are common filters).
265 m4_define([AC_COPYRIGHT],
266 [AS_COPYRIGHT([$1])[]]dnl
267 [m4_divert_text(m4_default_quoted([$2], [VERSION_USER]),
268 [m4_default([$3], [m4_newline])([$1])])])# AC_COPYRIGHT
271 # AC_REVISION(REVISION-INFO)
272 # --------------------------
273 # The second quote in the translit is just to cope with font-lock-mode
274 # which sees the opening of a string.
275 m4_define([AC_REVISION],
276 [m4_divert_text([HEADER-REVISION],
277                 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
283 ## ---------------------------------------- ##
284 ## Requirements over the Autoconf version.  ##
285 ## ---------------------------------------- ##
288 # AU::AC_PREREQ(VERSION)
289 # ----------------------
290 # Update this `AC_PREREQ' statement to require the current version of
291 # Autoconf.  But fail if ever this autoupdate is too old.
293 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
294 # calling `AU_DEFUN', i.e., it is hard coded.  Otherwise it would be
295 # quite complex for autoupdate to import the value of
296 # `m4_PACKAGE_VERSION'.  We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
297 # this would replace all its occurrences with the current version of
298 # Autoconf, which is certainly not what the user intended.
299 AU_DEFUN([AC_PREREQ],
300 [m4_version_prereq([$1])[]dnl
301 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
304 # AC_PREREQ(VERSION)
305 # ------------------
306 # Complain and exit if the Autoconf version is less than VERSION.
307 m4_undefine([AC_PREREQ])
308 m4_copy([m4_version_prereq], [AC_PREREQ])
311 # AC_AUTOCONF_VERSION
312 # -------------------
313 # The current version of Autoconf parsing this file.
314 m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])
320 ## ---------------- ##
321 ## Initialization.  ##
322 ## ---------------- ##
325 # All the following macros are used by AC_INIT.  Ideally, they should
326 # be presented in the order in which they are output.  Please, help us
327 # sorting it, or at least, don't augment the entropy.
330 # _AC_INIT_NOTICE
331 # ---------------
332 # Provide useful headers; override the HEADER-COMMENT created by M4sh.
333 m4_define([_AC_INIT_NOTICE],
334 [m4_cleardivert([HEADER-COMMENT])]dnl
335 [m4_divert_text([HEADER-COMMENT],
336 [@%:@ Guess values for system-dependent variables and create Makefiles.
337 @%:@ Generated by m4_PACKAGE_STRING[]dnl
338 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
340 m4_ifset([AC_PACKAGE_BUGREPORT],
341          [m4_divert_text([HEADER-COMMENT],
342                          [@%:@
343 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
347 # _AC_INIT_COPYRIGHT
348 # ------------------
349 # We dump to VERSION_FSF to make sure we are inserted before the
350 # user copyrights, and after the setup of the --version handling.
351 m4_define([_AC_INIT_COPYRIGHT],
352 [AC_COPYRIGHT(m4_defn([_AC_COPYRIGHT_YEARS]), [VERSION_FSF], [
353 m4_copyright_condense])dnl
354 AC_COPYRIGHT(
355 [This configure script is free software; the Free Software Foundation
356 gives unlimited permission to copy, distribute and modify it.],
357              [VERSION_FSF], [m4_echo])])
360 # File Descriptors
361 # ----------------
362 # Set up the file descriptors used by `configure'.
363 # File descriptor usage:
364 # 0 standard input (/dev/null)
365 # 1 file creation
366 # 2 errors and warnings
367 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
368 # AS_MESSAGE_FD checking for... messages and results
369 # AS_ORIGINAL_STDIN_FD original standard input (still open)
371 # stdin is /dev/null because checks that run programs may
372 # inadvertently run interactive ones, which would stop configuration
373 # until someone typed an EOF.
374 m4_define([AS_MESSAGE_FD], 6)
375 m4_define([AS_ORIGINAL_STDIN_FD], 7)
376 # That's how they used to be named.
377 AU_ALIAS([AC_FD_CC],  [AS_MESSAGE_LOG_FD])
378 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
381 # _AC_INIT_DEFAULTS
382 # -----------------
383 # Values which defaults can be set from `configure.ac'.
384 # `/bin/machine' is used in `glibcbug'.  The others are used in config.*
385 m4_define([_AC_INIT_DEFAULTS],
386 [m4_divert_push([DEFAULTS])dnl
388 test -n "$DJDIR" || exec AS_ORIGINAL_STDIN_FD<&0 </dev/null
389 exec AS_MESSAGE_FD>&1
391 # Name of the host.
392 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
393 # so uname gets run too.
394 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
397 # Initializations.
399 ac_default_prefix=/usr/local
400 ac_clean_files=
401 ac_config_libobj_dir=.
402 LIB@&t@OBJS=
403 cross_compiling=no
404 subdirs=
405 MFLAGS=
406 MAKEFLAGS=
407 AC_SUBST([SHELL])dnl
408 AC_SUBST([PATH_SEPARATOR])dnl
410 # Identity of this package.
411 AC_SUBST([PACKAGE_NAME],
412          [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])dnl
413 AC_SUBST([PACKAGE_TARNAME],
414          [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])dnl
415 AC_SUBST([PACKAGE_VERSION],
416          [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])dnl
417 AC_SUBST([PACKAGE_STRING],
418          [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
419 AC_SUBST([PACKAGE_BUGREPORT],
420          [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
421 AC_SUBST([PACKAGE_URL],
422          [m4_ifdef([AC_PACKAGE_URL],       ['AC_PACKAGE_URL'])])dnl
424 m4_divert_pop([DEFAULTS])dnl
425 m4_wrap_lifo([m4_divert_text([DEFAULTS],
426 [ac_subst_vars='m4_set_dump([_AC_SUBST_VARS], m4_newline)'
427 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
428 ac_user_opts='
429 enable_option_checking
430 m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
432 m4_ifdef([_AC_PRECIOUS_VARS],
433   [_AC_ARG_VAR_STORE[]dnl
434    _AC_ARG_VAR_VALIDATE[]dnl
435    ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
436 m4_ifdef([_AC_LIST_SUBDIRS],
437   [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
438 ])])dnl
439 ])# _AC_INIT_DEFAULTS
442 # AC_PREFIX_DEFAULT(PREFIX)
443 # -------------------------
444 AC_DEFUN([AC_PREFIX_DEFAULT],
445 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
448 # AC_PREFIX_PROGRAM(PROGRAM)
449 # --------------------------
450 # Guess the value for the `prefix' variable by looking for
451 # the argument program along PATH and taking its parent.
452 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
453 # set `prefix' to /usr/local/gnu.
454 # This comes too late to find a site file based on the prefix,
455 # and it might use a cached value for the path.
456 # No big loss, I think, since most configures don't use this macro anyway.
457 AC_DEFUN([AC_PREFIX_PROGRAM],
458 [if test "x$prefix" = xNONE; then
459 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
460   _AS_ECHO_N([checking for prefix by ])
461   AC_PATH_PROG(ac_prefix_program, [$1])
462   if test -n "$ac_prefix_program"; then
463     prefix=`AS_DIRNAME(["$ac_prefix_program"])`
464     prefix=`AS_DIRNAME(["$prefix"])`
465   fi
467 ])# AC_PREFIX_PROGRAM
470 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
471 # ---------------------------------------------
472 # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
473 # relative to the directory that configure is in, which we can look
474 # for to find out if srcdir is correct.
475 AC_DEFUN([AC_CONFIG_SRCDIR],
476 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
479 # _AC_INIT_DIRCHECK
480 # -----------------
481 # Set ac_pwd, and sanity-check it and the source and installation directories.
483 # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
485 AC_DEFUN([_AC_INIT_DIRCHECK],
486 [m4_divert_push([PARSE_ARGS])dnl
488 ac_pwd=`pwd` && test -n "$ac_pwd" &&
489 ac_ls_di=`ls -di .` &&
490 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
491   AC_MSG_ERROR([working directory cannot be determined])
492 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
493   AC_MSG_ERROR([pwd does not report name of working directory])
495 m4_divert_pop([PARSE_ARGS])dnl
496 ])# _AC_INIT_DIRCHECK
498 # _AC_INIT_SRCDIR
499 # ---------------
500 # Compute `srcdir' based on `$ac_unique_file'.
502 # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
504 AC_DEFUN([_AC_INIT_SRCDIR],
505 [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
506 m4_divert_push([PARSE_ARGS])dnl
508 # Find the source files, if location was not specified.
509 if test -z "$srcdir"; then
510   ac_srcdir_defaulted=yes
511   # Try the directory containing this script, then the parent directory.
512   ac_confdir=`AS_DIRNAME(["$as_myself"])`
513   srcdir=$ac_confdir
514   if test ! -r "$srcdir/$ac_unique_file"; then
515     srcdir=..
516   fi
517 else
518   ac_srcdir_defaulted=no
520 if test ! -r "$srcdir/$ac_unique_file"; then
521   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
522   AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
524 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
525 ac_abs_confdir=`(
526         cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
527         pwd)`
528 # When building in place, set srcdir=.
529 if test "$ac_abs_confdir" = "$ac_pwd"; then
530   srcdir=.
532 # Remove unnecessary trailing slashes from srcdir.
533 # Double slashes in file names in object file debugging info
534 # mess up M-x gdb in Emacs.
535 case $srcdir in
536 */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
537 esac
538 m4_divert_pop([PARSE_ARGS])dnl
539 ])# _AC_INIT_SRCDIR
542 # _AC_INIT_PARSE_ARGS
543 # -------------------
544 m4_define([_AC_INIT_PARSE_ARGS],
545 [m4_divert_push([PARSE_ARGS])dnl
547 # Initialize some variables set by options.
548 ac_init_help=
549 ac_init_version=false
550 ac_unrecognized_opts=
551 ac_unrecognized_sep=
552 # The variables have the same names as the options, with
553 # dashes changed to underlines.
554 cache_file=/dev/null
555 AC_SUBST(exec_prefix, NONE)dnl
556 no_create=
557 no_recursion=
558 AC_SUBST(prefix, NONE)dnl
559 program_prefix=NONE
560 program_suffix=NONE
561 AC_SUBST(program_transform_name, [s,x,x,])dnl
562 silent=
563 site=
564 srcdir=
565 verbose=
566 x_includes=NONE
567 x_libraries=NONE
569 # Installation directory options.
570 # These are left unexpanded so users can "make install exec_prefix=/foo"
571 # and all the variables that are supposed to be based on exec_prefix
572 # by default will actually change.
573 # Use braces instead of parens because sh, perl, etc. also accept them.
574 # (The list follows the same order as the GNU Coding Standards.)
575 AC_SUBST([bindir],         ['${exec_prefix}/bin'])dnl
576 AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl
577 AC_SUBST([libexecdir],     ['${exec_prefix}/libexec'])dnl
578 AC_SUBST([datarootdir],    ['${prefix}/share'])dnl
579 AC_SUBST([datadir],        ['${datarootdir}'])dnl
580 AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl
581 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
582 AC_SUBST([localstatedir],  ['${prefix}/var'])dnl
583 AC_SUBST([includedir],     ['${prefix}/include'])dnl
584 AC_SUBST([oldincludedir],  ['/usr/include'])dnl
585 AC_SUBST([docdir],         [m4_ifset([AC_PACKAGE_TARNAME],
586                                      ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
587                                      ['${datarootdir}/doc/${PACKAGE}'])])dnl
588 AC_SUBST([infodir],        ['${datarootdir}/info'])dnl
589 AC_SUBST([htmldir],        ['${docdir}'])dnl
590 AC_SUBST([dvidir],         ['${docdir}'])dnl
591 AC_SUBST([pdfdir],         ['${docdir}'])dnl
592 AC_SUBST([psdir],          ['${docdir}'])dnl
593 AC_SUBST([libdir],         ['${exec_prefix}/lib'])dnl
594 AC_SUBST([localedir],      ['${datarootdir}/locale'])dnl
595 AC_SUBST([mandir],         ['${datarootdir}/man'])dnl
597 ac_prev=
598 ac_dashdash=
599 for ac_option
601   # If the previous option needs an argument, assign it.
602   if test -n "$ac_prev"; then
603     eval $ac_prev=\$ac_option
604     ac_prev=
605     continue
606   fi
608   case $ac_option in
609   *=*)  ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
610   *)    ac_optarg=yes ;;
611   esac
613   # Accept the important Cygnus configure options, so we can diagnose typos.
615   case $ac_dashdash$ac_option in
616   --)
617     ac_dashdash=yes ;;
619   -bindir | --bindir | --bindi | --bind | --bin | --bi)
620     ac_prev=bindir ;;
621   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
622     bindir=$ac_optarg ;;
624   -build | --build | --buil | --bui | --bu)
625     ac_prev=build_alias ;;
626   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
627     build_alias=$ac_optarg ;;
629   -cache-file | --cache-file | --cache-fil | --cache-fi \
630   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
631     ac_prev=cache_file ;;
632   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
633   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
634     cache_file=$ac_optarg ;;
636   --config-cache | -C)
637     cache_file=config.cache ;;
639   -datadir | --datadir | --datadi | --datad)
640     ac_prev=datadir ;;
641   -datadir=* | --datadir=* | --datadi=* | --datad=*)
642     datadir=$ac_optarg ;;
644   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
645   | --dataroo | --dataro | --datar)
646     ac_prev=datarootdir ;;
647   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
648   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
649     datarootdir=$ac_optarg ;;
651   _AC_INIT_PARSE_ENABLE([disable])
653   -docdir | --docdir | --docdi | --doc | --do)
654     ac_prev=docdir ;;
655   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
656     docdir=$ac_optarg ;;
658   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
659     ac_prev=dvidir ;;
660   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
661     dvidir=$ac_optarg ;;
663   _AC_INIT_PARSE_ENABLE([enable])
665   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
666   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
667   | --exec | --exe | --ex)
668     ac_prev=exec_prefix ;;
669   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
670   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
671   | --exec=* | --exe=* | --ex=*)
672     exec_prefix=$ac_optarg ;;
674   -gas | --gas | --ga | --g)
675     # Obsolete; use --with-gas.
676     with_gas=yes ;;
678   -help | --help | --hel | --he | -h)
679     ac_init_help=long ;;
680   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
681     ac_init_help=recursive ;;
682   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
683     ac_init_help=short ;;
685   -host | --host | --hos | --ho)
686     ac_prev=host_alias ;;
687   -host=* | --host=* | --hos=* | --ho=*)
688     host_alias=$ac_optarg ;;
690   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
691     ac_prev=htmldir ;;
692   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
693   | --ht=*)
694     htmldir=$ac_optarg ;;
696   -includedir | --includedir | --includedi | --included | --include \
697   | --includ | --inclu | --incl | --inc)
698     ac_prev=includedir ;;
699   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
700   | --includ=* | --inclu=* | --incl=* | --inc=*)
701     includedir=$ac_optarg ;;
703   -infodir | --infodir | --infodi | --infod | --info | --inf)
704     ac_prev=infodir ;;
705   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
706     infodir=$ac_optarg ;;
708   -libdir | --libdir | --libdi | --libd)
709     ac_prev=libdir ;;
710   -libdir=* | --libdir=* | --libdi=* | --libd=*)
711     libdir=$ac_optarg ;;
713   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
714   | --libexe | --libex | --libe)
715     ac_prev=libexecdir ;;
716   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
717   | --libexe=* | --libex=* | --libe=*)
718     libexecdir=$ac_optarg ;;
720   -localedir | --localedir | --localedi | --localed | --locale)
721     ac_prev=localedir ;;
722   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
723     localedir=$ac_optarg ;;
725   -localstatedir | --localstatedir | --localstatedi | --localstated \
726   | --localstate | --localstat | --localsta | --localst | --locals)
727     ac_prev=localstatedir ;;
728   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
729   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
730     localstatedir=$ac_optarg ;;
732   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
733     ac_prev=mandir ;;
734   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
735     mandir=$ac_optarg ;;
737   -nfp | --nfp | --nf)
738     # Obsolete; use --without-fp.
739     with_fp=no ;;
741   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
742   | --no-cr | --no-c | -n)
743     no_create=yes ;;
745   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
746   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
747     no_recursion=yes ;;
749   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
750   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
751   | --oldin | --oldi | --old | --ol | --o)
752     ac_prev=oldincludedir ;;
753   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
754   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
755   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
756     oldincludedir=$ac_optarg ;;
758   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
759     ac_prev=prefix ;;
760   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
761     prefix=$ac_optarg ;;
763   -program-prefix | --program-prefix | --program-prefi | --program-pref \
764   | --program-pre | --program-pr | --program-p)
765     ac_prev=program_prefix ;;
766   -program-prefix=* | --program-prefix=* | --program-prefi=* \
767   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
768     program_prefix=$ac_optarg ;;
770   -program-suffix | --program-suffix | --program-suffi | --program-suff \
771   | --program-suf | --program-su | --program-s)
772     ac_prev=program_suffix ;;
773   -program-suffix=* | --program-suffix=* | --program-suffi=* \
774   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
775     program_suffix=$ac_optarg ;;
777   -program-transform-name | --program-transform-name \
778   | --program-transform-nam | --program-transform-na \
779   | --program-transform-n | --program-transform- \
780   | --program-transform | --program-transfor \
781   | --program-transfo | --program-transf \
782   | --program-trans | --program-tran \
783   | --progr-tra | --program-tr | --program-t)
784     ac_prev=program_transform_name ;;
785   -program-transform-name=* | --program-transform-name=* \
786   | --program-transform-nam=* | --program-transform-na=* \
787   | --program-transform-n=* | --program-transform-=* \
788   | --program-transform=* | --program-transfor=* \
789   | --program-transfo=* | --program-transf=* \
790   | --program-trans=* | --program-tran=* \
791   | --progr-tra=* | --program-tr=* | --program-t=*)
792     program_transform_name=$ac_optarg ;;
794   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
795     ac_prev=pdfdir ;;
796   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
797     pdfdir=$ac_optarg ;;
799   -psdir | --psdir | --psdi | --psd | --ps)
800     ac_prev=psdir ;;
801   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
802     psdir=$ac_optarg ;;
804   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
805   | -silent | --silent | --silen | --sile | --sil)
806     silent=yes ;;
808   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
809     ac_prev=sbindir ;;
810   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
811   | --sbi=* | --sb=*)
812     sbindir=$ac_optarg ;;
814   -sharedstatedir | --sharedstatedir | --sharedstatedi \
815   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
816   | --sharedst | --shareds | --shared | --share | --shar \
817   | --sha | --sh)
818     ac_prev=sharedstatedir ;;
819   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
820   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
821   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
822   | --sha=* | --sh=*)
823     sharedstatedir=$ac_optarg ;;
825   -site | --site | --sit)
826     ac_prev=site ;;
827   -site=* | --site=* | --sit=*)
828     site=$ac_optarg ;;
830   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
831     ac_prev=srcdir ;;
832   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
833     srcdir=$ac_optarg ;;
835   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
836   | --syscon | --sysco | --sysc | --sys | --sy)
837     ac_prev=sysconfdir ;;
838   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
839   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
840     sysconfdir=$ac_optarg ;;
842   -target | --target | --targe | --targ | --tar | --ta | --t)
843     ac_prev=target_alias ;;
844   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
845     target_alias=$ac_optarg ;;
847   -v | -verbose | --verbose | --verbos | --verbo | --verb)
848     verbose=yes ;;
850   -version | --version | --versio | --versi | --vers | -V)
851     ac_init_version=: ;;
853   _AC_INIT_PARSE_ENABLE([with])
855   _AC_INIT_PARSE_ENABLE([without])
857   --x)
858     # Obsolete; use --with-x.
859     with_x=yes ;;
861   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
862   | --x-incl | --x-inc | --x-in | --x-i)
863     ac_prev=x_includes ;;
864   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
865   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
866     x_includes=$ac_optarg ;;
868   -x-libraries | --x-libraries | --x-librarie | --x-librari \
869   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
870     ac_prev=x_libraries ;;
871   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
872   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
873     x_libraries=$ac_optarg ;;
875   -*) AC_MSG_ERROR([unrecognized option: `$ac_option'
876 Try `$[0] --help' for more information.])
877     ;;
879   *=*)
880     ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
881     # Reject names that are not valid shell variable names.
882     case $ac_envvar in #(
883       '' | [[0-9]]* | *[[!_$as_cr_alnum]]* )
884       AC_MSG_ERROR([invalid variable name: `$ac_envvar']) ;;
885     esac
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 if test -n "$ac_unrecognized_opts"; then
906   case $enable_option_checking in
907     no) ;;
908     fatal) AC_MSG_ERROR([unrecognized options: $ac_unrecognized_opts]) ;;
909     *)     AC_MSG_WARN( [unrecognized options: $ac_unrecognized_opts]) ;;
910   esac
913 # Check all directory arguments for consistency.
914 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
915                 datadir sysconfdir sharedstatedir localstatedir includedir \
916                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
917                 libdir localedir mandir
919   eval ac_val=\$$ac_var
920   # Remove trailing slashes.
921   case $ac_val in
922     */ )
923       ac_val=`expr "X$ac_val" : 'X\(.*[[^/]]\)' \| "X$ac_val" : 'X\(.*\)'`
924       eval $ac_var=\$ac_val;;
925   esac
926   # Be sure to have absolute directory names.
927   case $ac_val in
928     [[\\/$]]* | ?:[[\\/]]* )  continue;;
929     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
930   esac
931   AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
932 done
934 # There might be people who depend on the old broken behavior: `$host'
935 # used to hold the argument of --host etc.
936 # FIXME: To remove some day.
937 build=$build_alias
938 host=$host_alias
939 target=$target_alias
941 # FIXME: To remove some day.
942 if test "x$host_alias" != x; then
943   if test "x$build_alias" = x; then
944     cross_compiling=maybe
945     AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
946     If a cross compiler is detected then cross compile mode will be used.])
947   elif test "x$build_alias" != "x$host_alias"; then
948     cross_compiling=yes
949   fi
952 ac_tool_prefix=
953 test -n "$host_alias" && ac_tool_prefix=$host_alias-
955 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
957 m4_divert_pop([PARSE_ARGS])dnl
958 ])# _AC_INIT_PARSE_ARGS
961 # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
962 # ----------------------------------
963 # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
965 m4_define([_AC_INIT_PARSE_ENABLE],
966 [m4_bmatch([$1], [^with],
967            [_AC_INIT_PARSE_ENABLE2([$1], [with])],
968            [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
971 # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
972 # --------------------------------------------------
973 # Handle an `--enable' or a `--with' option.
975 # OPTION-NAME is `enable', `disable', `with', or `without'.
976 # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'.
978 # Positive variant of the option is recognized by the condition
979 #       OPTION-NAME == POSITIVE-NAME .
981 m4_define([_AC_INIT_PARSE_ENABLE2],
982 [-$1-* | --$1-*)
983     ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
984     # Reject names that are not valid shell variable names.
985     expr "x$ac_useropt" : "[.*[^-+._$as_cr_alnum]]" >/dev/null &&
986       AC_MSG_ERROR(
987         [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt])
988     ac_useropt_orig=$ac_useropt
989     ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-+.]]/_/g'`
990     case $ac_user_opts in
991       *"
992 "$2_$ac_useropt"
993 "*) ;;
994       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
995          ac_unrecognized_sep=', ';;
996     esac
997     eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
1001 # _AC_INIT_HELP
1002 # -------------
1003 # Handle the `configure --help' message.
1004 m4_define([_AC_INIT_HELP],
1005 [m4_divert_push([HELP_BEGIN])dnl
1008 # Report the --help message.
1010 if test "$ac_init_help" = "long"; then
1011   # Omit some internal or obsolete options to make the list less imposing.
1012   # This message is too long to be a string in the A/UX 3.1 sh.
1013   cat <<_ACEOF
1014 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
1015                         [AC_PACKAGE_STRING],
1016                         [this package]) to adapt to many kinds of systems.
1018 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1020 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
1021 VAR=VALUE.  See below for descriptions of some of the useful variables.
1023 Defaults for the options are specified in brackets.
1025 Configuration:
1026   -h, --help              display this help and exit
1027       --help=short        display options specific to this package
1028       --help=recursive    display the short help of all the included packages
1029   -V, --version           display version information and exit
1030   -q, --quiet, --silent   do not print \`checking...' messages
1031       --cache-file=FILE   cache test results in FILE [disabled]
1032   -C, --config-cache      alias for \`--cache-file=config.cache'
1033   -n, --no-create         do not create output files
1034       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1036 Installation directories:
1037 ]AS_HELP_STRING([--prefix=PREFIX],
1038   [install architecture-independent files in PREFIX [$ac_default_prefix]])
1039 AS_HELP_STRING([--exec-prefix=EPREFIX],
1040   [install architecture-dependent files in EPREFIX [PREFIX]])[
1042 By default, \`make install' will install all the files in
1043 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1044 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1045 for instance \`--prefix=\$HOME'.
1047 For better control, use the options below.
1049 Fine tuning of the installation directories:
1050   --bindir=DIR            user executables [EPREFIX/bin]
1051   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1052   --libexecdir=DIR        program executables [EPREFIX/libexec]
1053   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1054   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1055   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1056   --libdir=DIR            object code libraries [EPREFIX/lib]
1057   --includedir=DIR        C header files [PREFIX/include]
1058   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1059   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1060   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1061   --infodir=DIR           info documentation [DATAROOTDIR/info]
1062   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1063   --mandir=DIR            man documentation [DATAROOTDIR/man]
1064 ]AS_HELP_STRING([--docdir=DIR],
1065   [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME],
1066     [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[
1067   --htmldir=DIR           html documentation [DOCDIR]
1068   --dvidir=DIR            dvi documentation [DOCDIR]
1069   --pdfdir=DIR            pdf documentation [DOCDIR]
1070   --psdir=DIR             ps documentation [DOCDIR]
1071 _ACEOF
1073   cat <<\_ACEOF]
1074 m4_divert_pop([HELP_BEGIN])dnl
1075 dnl The order of the diversions here is
1076 dnl - HELP_BEGIN
1077 dnl   which may be extended by extra generic options such as with X or
1078 dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
1080 dnl - HELP_CANON
1081 dnl   Support for cross compilation (--build, --host and --target).
1082 dnl   Display only in long --help.
1084 dnl - HELP_ENABLE
1085 dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1086 dnl   then implements the header of the non generic options.
1088 dnl - HELP_WITH
1090 dnl - HELP_VAR
1092 dnl - HELP_VAR_END
1094 dnl - HELP_END
1095 dnl   initialized below, in which we dump the trailer (handling of the
1096 dnl   recursion for instance).
1097 m4_divert_push([HELP_ENABLE])dnl
1098 _ACEOF
1101 if test -n "$ac_init_help"; then
1102 m4_ifset([AC_PACKAGE_STRING],
1103 [  case $ac_init_help in
1104      short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1105    esac])
1106   cat <<\_ACEOF
1107 m4_divert_pop([HELP_ENABLE])dnl
1108 m4_divert_push([HELP_END])dnl
1110 Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
1111   [the package provider]).dnl
1112 m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
1113 AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
1114 m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
1115 General help using GNU software: <http://www.gnu.org/gethelp/>.])])
1116 _ACEOF
1117 ac_status=$?
1120 if test "$ac_init_help" = "recursive"; then
1121   # If there are subdirs, report their specific --help.
1122   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1123     test -d "$ac_dir" ||
1124       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1125       continue
1126     _AC_SRCDIRS(["$ac_dir"])
1127     cd "$ac_dir" || { ac_status=$?; continue; }
1128     # Check for guested configure.
1129     if test -f "$ac_srcdir/configure.gnu"; then
1130       echo &&
1131       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1132     elif test -f "$ac_srcdir/configure"; then
1133       echo &&
1134       $SHELL "$ac_srcdir/configure" --help=recursive
1135     else
1136       AC_MSG_WARN([no configuration information is in $ac_dir])
1137     fi || ac_status=$?
1138     cd "$ac_pwd" || { ac_status=$?; break; }
1139   done
1142 test -n "$ac_init_help" && exit $ac_status
1143 m4_divert_pop([HELP_END])dnl
1144 ])# _AC_INIT_HELP
1147 # _AC_INIT_VERSION
1148 # ----------------
1149 # Handle the `configure --version' message.
1150 m4_define([_AC_INIT_VERSION],
1151 [m4_divert_text([VERSION_BEGIN],
1152 [if $ac_init_version; then
1153   cat <<\_ACEOF
1154 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1155 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1156 generated by m4_PACKAGE_STRING])
1157 m4_divert_text([VERSION_END],
1158 [_ACEOF
1159   exit
1160 fi])dnl
1161 ])# _AC_INIT_VERSION
1164 # _AC_INIT_CONFIG_LOG
1165 # -------------------
1166 # Initialize the config.log file descriptor and write header to it.
1167 m4_define([_AC_INIT_CONFIG_LOG],
1168 [m4_divert_text([INIT_PREPARE],
1169 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1170 cat >config.log <<_ACEOF
1171 This file contains any messages produced by compilers while
1172 running configure, to aid debugging if configure makes a mistake.
1174 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1175 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1176 generated by m4_PACKAGE_STRING.  Invocation command line was
1178   $ $[0] $[@]
1180 _ACEOF
1181 exec AS_MESSAGE_LOG_FD>>config.log
1182 AS_UNAME >&AS_MESSAGE_LOG_FD
1184 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1187 m4_text_box([Core tests.])
1189 _ACEOF
1190 ])])# _AC_INIT_CONFIG_LOG
1193 # _AC_INIT_PREPARE
1194 # ----------------
1195 # Called by AC_INIT to build the preamble of the `configure' scripts.
1196 # 1. Trap and clean up various tmp files.
1197 # 2. Set up the fd and output files
1198 # 3. Remember the options given to `configure' for `config.status --recheck'.
1199 # 4. Initiates confdefs.h
1200 # 5. Loads site and cache files
1201 m4_define([_AC_INIT_PREPARE],
1202 [m4_divert_push([INIT_PREPARE])dnl
1204 # Keep a trace of the command line.
1205 # Strip out --no-create and --no-recursion so they do not pile up.
1206 # Strip out --silent because we don't want to record it for future runs.
1207 # Also quote any args containing shell meta-characters.
1208 # Make two passes to allow for proper duplicate-argument suppression.
1209 ac_configure_args=
1210 ac_configure_args0=
1211 ac_configure_args1=
1212 ac_must_keep_next=false
1213 for ac_pass in 1 2
1215   for ac_arg
1216   do
1217     case $ac_arg in
1218     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1219     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1220     | -silent | --silent | --silen | --sile | --sil)
1221       continue ;;
1222     *\'*)
1223       ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1224     esac
1225     case $ac_pass in
1226     1) AS_VAR_APPEND([ac_configure_args0], [" '$ac_arg'"]) ;;
1227     2)
1228       AS_VAR_APPEND([ac_configure_args1], [" '$ac_arg'"])
1229 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1230 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1231 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1232 dnl give --prefix foo bar).
1233       if test $ac_must_keep_next = true; then
1234         ac_must_keep_next=false # Got value, back to normal.
1235       else
1236         case $ac_arg in
1237 dnl Use broad patterns, as arguments that would have already made configure
1238 dnl exit don't matter.
1239           *=* | --config-cache | -C | -disable-* | --disable-* \
1240           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1241           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1242           | -with-* | --with-* | -without-* | --without-* | --x)
1243             case "$ac_configure_args0 " in
1244               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1245             esac
1246             ;;
1247           -* ) ac_must_keep_next=true ;;
1248         esac
1249       fi
1250       AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"])
1251       ;;
1252     esac
1253   done
1254 done
1255 AS_UNSET(ac_configure_args0)
1256 AS_UNSET(ac_configure_args1)
1258 # When interrupted or exit'd, cleanup temporary files, and complete
1259 # config.log.  We remove comments because anyway the quotes in there
1260 # would cause problems or look ugly.
1261 # WARNING: Use '\'' to represent an apostrophe within the trap.
1262 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1263 trap 'exit_status=$?
1264   # Save into config.log some information that might help in debugging.
1265   {
1266     echo
1268     AS_BOX([Cache variables.])
1269     echo
1270     m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1271                   [^ *\(#.*\)?
1272 ],                [],
1273                   ['], ['\\''])
1274     echo
1276     AS_BOX([Output variables.])
1277     echo
1278     for ac_var in $ac_subst_vars
1279     do
1280       eval ac_val=\$$ac_var
1281       case $ac_val in
1282       *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1283       esac
1284       AS_ECHO(["$ac_var='\''$ac_val'\''"])
1285     done | sort
1286     echo
1288     if test -n "$ac_subst_files"; then
1289       AS_BOX([File substitutions.])
1290       echo
1291       for ac_var in $ac_subst_files
1292       do
1293         eval ac_val=\$$ac_var
1294         case $ac_val in
1295         *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1296         esac
1297         AS_ECHO(["$ac_var='\''$ac_val'\''"])
1298       done | sort
1299       echo
1300     fi
1302     if test -s confdefs.h; then
1303       AS_BOX([confdefs.h.])
1304       echo
1305       cat confdefs.h
1306       echo
1307     fi
1308     test "$ac_signal" != 0 &&
1309       AS_ECHO(["$as_me: caught signal $ac_signal"])
1310     AS_ECHO(["$as_me: exit $exit_status"])
1311   } >&AS_MESSAGE_LOG_FD
1312   rm -f core *.core core.conftest.* &&
1313     rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
1314     exit $exit_status
1315 ' 0
1316 for ac_signal in 1 2 13 15; do
1317   trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1318 done
1319 ac_signal=0
1321 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1322 rm -f -r conftest* confdefs.h
1324 dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
1325 dnl containing less than 14 bytes (including the newline).
1326 AS_ECHO(["/* confdefs.h */"]) > confdefs.h
1328 # Predefined preprocessor variables.
1329 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1330                    [Define to the full name of this package.])dnl
1331 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1332                    [Define to the one symbol short name of this package.])dnl
1333 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1334                    [Define to the version of this package.])dnl
1335 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1336                    [Define to the full name and version of this package.])dnl
1337 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1338                    [Define to the address where bug reports for this package
1339                     should be sent.])dnl
1340 AC_DEFINE_UNQUOTED([PACKAGE_URL], ["$PACKAGE_URL"],
1341                    [Define to the home page for this package.])
1343 # Let the site file select an alternate cache file if it wants to.
1344 AC_SITE_LOAD
1345 AC_CACHE_LOAD
1346 m4_divert_pop([INIT_PREPARE])dnl
1347 ])# _AC_INIT_PREPARE
1350 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1351 # ----------------------------------------
1352 # This macro is used only for Autoupdate.
1353 AU_DEFUN([AC_INIT],
1354 [m4_ifval([$2], [[AC_INIT($@)]],
1355           [m4_ifval([$1],
1356 [[AC_INIT]
1357 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1361 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
1362 # ----------------------------------------------------------
1363 # Include the user macro files, prepare the diversions, and output the
1364 # preamble of the `configure' script.
1366 # If BUG-REPORT is omitted, do without (unless the user previously
1367 # defined the m4 macro AC_PACKAGE_BUGREPORT).  If TARNAME is omitted,
1368 # use PACKAGE to seed it.  If URL is omitted, use
1369 # `http://www.gnu.org/software/TARNAME/' if PACKAGE begins with `GNU',
1370 # otherwise, do without.
1372 # Note that the order is important: first initialize, then set the
1373 # AC_CONFIG_SRCDIR.
1374 m4_define([AC_INIT],
1375 [# Forbidden tokens and exceptions.
1376 m4_pattern_forbid([^_?A[CHUM]_])
1377 m4_pattern_forbid([_AC_])
1378 m4_pattern_forbid([^LIBOBJS$],
1379                   [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1380 # Actually reserved by M4sh.
1381 m4_pattern_allow([^AS_FLAGS$])
1382 AS_INIT[]dnl
1383 AS_PREPARE[]dnl
1384 m4_divert_push([KILL])
1385 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1386 _AC_INIT_DEFAULTS
1387 _AC_INIT_PARSE_ARGS
1388 _AC_INIT_DIRCHECK
1389 _AC_INIT_SRCDIR
1390 _AC_INIT_HELP
1391 _AC_INIT_VERSION
1392 _AC_INIT_CONFIG_LOG
1393 _AC_INIT_PREPARE
1394 _AC_INIT_NOTICE
1395 _AC_INIT_COPYRIGHT
1396 m4_divert_text([SHELL_FN], [
1397 m4_text_box([Autoconf initialization.])])
1398 m4_divert_pop
1399 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1401 dnl Substitute for predefined variables.
1402 AC_SUBST([DEFS])dnl
1403 AC_SUBST([ECHO_C])dnl
1404 AC_SUBST([ECHO_N])dnl
1405 AC_SUBST([ECHO_T])dnl
1406 AC_SUBST([LIBS])dnl
1407 _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
1408 _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
1409 _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
1411 AC_LANG_PUSH(C)
1417 ## ------------------------------------------------------------- ##
1418 ## Selecting optional features, working with optional software.  ##
1419 ## ------------------------------------------------------------- ##
1421 # AC_PRESERVE_HELP_ORDER
1422 # ----------------------
1423 # Emit help strings in the order given, rather than grouping all --enable-FOO
1424 # and all --with-BAR.
1425 AC_DEFUN([AC_PRESERVE_HELP_ORDER],
1426 [m4_divert_once([HELP_ENABLE], [[
1427 Optional Features and Packages:
1428   --disable-option-checking  ignore unrecognized --enable/--with options
1429   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1430   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1431   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1432   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
1433 m4_define([_m4_divert(HELP_ENABLE)],    _m4_divert(HELP_WITH))
1434 ])# AC_PRESERVE_HELP_ORDER
1436 # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1437 # -------------------------------------------------------------------
1438 # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
1439 # OPTION is either "enable" or "with".
1441 m4_define([_AC_ENABLE_IF],
1442 [@%:@ Check whether --$1-$2 was given.
1443 _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])
1446 m4_define([_AC_ENABLE_IF_ACTION],
1447 [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
1448 ])dnl
1449 AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
1452 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1453 # ------------------------------------------------------------------------
1454 AC_DEFUN([AC_ARG_ENABLE],
1455 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1457 [m4_divert_once([HELP_ENABLE], [[
1458 Optional Features:
1459   --disable-option-checking  ignore unrecognized --enable/--with options
1460   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1461   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])])dnl
1462 m4_divert_once([HELP_ENABLE], [$2])dnl
1463 _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
1464 ])# AC_ARG_ENABLE
1467 AU_DEFUN([AC_ENABLE],
1468 [AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])])
1471 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1472 # --------------------------------------------------------------------
1473 AC_DEFUN([AC_ARG_WITH],
1474 [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
1476 [m4_divert_once([HELP_WITH], [[
1477 Optional Packages:
1478   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1479   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])])
1480 m4_divert_once([HELP_WITH], [$2])dnl
1481 _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
1482 ])# AC_ARG_WITH
1484 AU_DEFUN([AC_WITH],
1485 [AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])])
1487 # AC_DISABLE_OPTION_CHECKING
1488 # --------------------------------------------------------------------
1489 AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
1490 [m4_divert_once([DEFAULTS], [enable_option_checking=no])
1491 ])# AC_DISABLE_OPTION_CHECKING
1494 ## ----------------------------------------- ##
1495 ## Remembering variables for reconfiguring.  ##
1496 ## ----------------------------------------- ##
1499 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1500 # ----------------------------------
1501 # Register VARNAME as a precious variable, and document it in
1502 # `configure --help' (but only once).
1503 AC_DEFUN([AC_ARG_VAR],
1504 [m4_divert_once([HELP_VAR], [[
1505 Some influential environment variables:]])dnl
1506 m4_divert_once([HELP_VAR_END], [[
1507 Use these variables to override the choices made by `configure' or to help
1508 it to find libraries and programs with nonstandard names/locations.]])dnl
1509 m4_expand_once([m4_divert_text([HELP_VAR],
1510                                [AS_HELP_STRING([$1], [$2], [              ])])],
1511                [$0($1)])dnl
1512 AC_SUBST([$1])dnl
1513 _AC_ARG_VAR_PRECIOUS([$1])dnl
1514 ])# AC_ARG_VAR
1517 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1518 # -----------------------------
1519 # Declare VARNAME is precious.
1520 m4_define([_AC_ARG_VAR_PRECIOUS],
1521 [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
1522 ])dnl
1526 # _AC_ARG_VAR_STORE
1527 # -----------------
1528 # We try to diagnose when precious variables have changed.  To do this,
1529 # make two early snapshots (after the option processing to take
1530 # explicit variables into account) of those variables: one (ac_env_)
1531 # which represents the current run, and a second (ac_cv_env_) which,
1532 # at the first run, will be saved in the cache.  As an exception to
1533 # the cache mechanism, its loading will override these variables (non
1534 # `ac_cv_env_' cache value are only set when unset).
1536 # In subsequent runs, after having loaded the cache, compare
1537 # ac_cv_env_foo against ac_env_foo.  See _AC_ARG_VAR_VALIDATE.
1538 m4_define([_AC_ARG_VAR_STORE],
1539 [m4_divert_text([PARSE_ARGS],
1540 [for ac_var in $ac_precious_vars; do
1541   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1542   eval ac_env_${ac_var}_value=\$${ac_var}
1543   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1544   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1545 done])dnl
1549 # _AC_ARG_VAR_VALIDATE
1550 # --------------------
1551 # The precious variables are saved twice at the beginning of
1552 # configure.  E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
1553 # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
1554 # and `ac_cv_env_PRECIOUS_value' on the other hand.
1556 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1557 # content of the cached values, while `ac_env_' represents that of the
1558 # current values.
1560 # So we check that `ac_env_' and `ac_cv_env_' are consistent.  If
1561 # they aren't, die.
1562 m4_define([_AC_ARG_VAR_VALIDATE],
1563 [m4_divert_text([INIT_PREPARE],
1564 [# Check that the precious variables saved in the cache have kept the same
1565 # value.
1566 ac_cache_corrupted=false
1567 for ac_var in $ac_precious_vars; do
1568   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1569   eval ac_new_set=\$ac_env_${ac_var}_set
1570   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1571   eval ac_new_val=\$ac_env_${ac_var}_value
1572   case $ac_old_set,$ac_new_set in
1573     set,)
1574       AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1575       ac_cache_corrupted=: ;;
1576     ,set)
1577       AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1578       ac_cache_corrupted=: ;;
1579     ,);;
1580     *)
1581       if test "x$ac_old_val" != "x$ac_new_val"; then
1582         # differences in whitespace do not lead to failure.
1583         ac_old_val_w=`echo x $ac_old_val`
1584         ac_new_val_w=`echo x $ac_new_val`
1585         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1586           AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1587           ac_cache_corrupted=:
1588         else
1589           AS_MESSAGE([warning: ignoring whitespace changes in `$ac_var' since the previous run:], 2)
1590           eval $ac_var=\$ac_old_val
1591         fi
1592         AS_MESSAGE([  former value:  `$ac_old_val'], 2)
1593         AS_MESSAGE([  current value: `$ac_new_val'], 2)
1594       fi;;
1595   esac
1596   # Pass precious variables to config.status.
1597   if test "$ac_new_set" = set; then
1598     case $ac_new_val in
1599     *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1600     *) ac_arg=$ac_var=$ac_new_val ;;
1601     esac
1602     case " $ac_configure_args " in
1603       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1604       *) AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;;
1605     esac
1606   fi
1607 done
1608 if $ac_cache_corrupted; then
1609   AS_MESSAGE([error: in `$ac_pwd':], 2)
1610   AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1611   AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1612 fi])dnl
1613 ])# _AC_ARG_VAR_VALIDATE
1619 ## ---------------------------- ##
1620 ## Transforming program names.  ##
1621 ## ---------------------------- ##
1624 # AC_ARG_PROGRAM
1625 # --------------
1626 # This macro is expanded only once, to avoid that `foo' ends up being
1627 # installed as `ggfoo'.
1628 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1629 [dnl Document the options.
1630 m4_divert_push([HELP_BEGIN])dnl
1632 Program names:
1633   --program-prefix=PREFIX            prepend PREFIX to installed program names
1634   --program-suffix=SUFFIX            append SUFFIX to installed program names
1635   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1636 m4_divert_pop([HELP_BEGIN])dnl
1637 test "$program_prefix" != NONE &&
1638   program_transform_name="s&^&$program_prefix&;$program_transform_name"
1639 # Use a double $ so make ignores it.
1640 test "$program_suffix" != NONE &&
1641   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1642 # Double any \ or $.
1643 # By default was `s,x,x', remove it if useless.
1644 [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
1645 program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
1646 ])# AC_ARG_PROGRAM
1652 ## ------------------------- ##
1653 ## Finding auxiliary files.  ##
1654 ## ------------------------- ##
1657 # AC_CONFIG_AUX_DIR(DIR)
1658 # ----------------------
1659 # Find install-sh, config.sub, config.guess, and Cygnus configure
1660 # in directory DIR.  These are auxiliary files used in configuration.
1661 # DIR can be either absolute or relative to $srcdir.
1662 AC_DEFUN([AC_CONFIG_AUX_DIR],
1663 [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
1666 # AC_CONFIG_AUX_DIR_DEFAULT
1667 # -------------------------
1668 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1669 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1670 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1671 [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
1674 # AC_CONFIG_AUX_DIRS(DIR ...)
1675 # ---------------------------
1676 # Internal subroutine.
1677 # Search for the configuration auxiliary files in directory list $1.
1678 # We look only for install-sh, so users of AC_PROG_INSTALL
1679 # do not automatically need to distribute the other auxiliary files.
1680 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1681 [ac_aux_dir=
1682 for ac_dir in $1; do
1683   for ac_t in install-sh install.sh shtool; do
1684     if test -f "$ac_dir/$ac_t"; then
1685       ac_aux_dir=$ac_dir
1686       ac_install_sh="$ac_aux_dir/$ac_t -c"
1687       break 2
1688     fi
1689   done
1690 done
1691 if test -z "$ac_aux_dir"; then
1692   AC_MSG_ERROR([cannot find install-sh, install.sh, or shtool in $1])
1695 # These three variables are undocumented and unsupported,
1696 # and are intended to be withdrawn in a future Autoconf release.
1697 # They can cause serious problems if a builder's source tree is in a directory
1698 # whose full name contains unusual characters.
1699 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1700 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1701 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1703 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1704 ])# AC_CONFIG_AUX_DIRS
1709 ## ------------------------ ##
1710 ## Finding aclocal macros.  ##
1711 ## ------------------------ ##
1714 # AC_CONFIG_MACRO_DIR(DIR)
1715 # ------------------------
1716 # Declare directory containing additional macros for aclocal.
1717 AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
1721 ## --------------------- ##
1722 ## Requiring aux files.  ##
1723 ## --------------------- ##
1725 # AC_REQUIRE_AUX_FILE(FILE)
1726 # -------------------------
1727 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
1728 # It announces FILE is required in the auxdir.
1729 m4_define([AC_REQUIRE_AUX_FILE],
1730 [AS_LITERAL_IF([$1], [],
1731                [m4_fatal([$0: requires a literal argument])])])
1735 ## ----------------------------------- ##
1736 ## Getting the canonical system type.  ##
1737 ## ----------------------------------- ##
1739 # The inputs are:
1740 #    configure --host=HOST --target=TARGET --build=BUILD
1742 # The rules are:
1743 # 1. Build defaults to the current platform, as determined by config.guess.
1744 # 2. Host defaults to build.
1745 # 3. Target defaults to host.
1748 # _AC_CANONICAL_SPLIT(THING)
1749 # --------------------------
1750 # Generate the variables THING, THING_{alias cpu vendor os}.
1751 m4_define([_AC_CANONICAL_SPLIT],
1752 [case $ac_cv_$1 in
1753 *-*-*) ;;
1754 *) AC_MSG_ERROR([invalid value of canonical $1]);;
1755 esac
1756 AC_SUBST([$1], [$ac_cv_$1])dnl
1757 ac_save_IFS=$IFS; IFS='-'
1758 set x $ac_cv_$1
1759 shift
1760 AC_SUBST([$1_cpu], [$[1]])dnl
1761 AC_SUBST([$1_vendor], [$[2]])dnl
1762 shift; shift
1763 [# Remember, the first character of IFS is used to create $]*,
1764 # except with old shells:
1765 $1_os=$[*]
1766 IFS=$ac_save_IFS
1767 case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
1768 AC_SUBST([$1_os])dnl
1769 ])# _AC_CANONICAL_SPLIT
1772 # AC_CANONICAL_BUILD
1773 # ------------------
1774 AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
1775 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1776 AC_REQUIRE_AUX_FILE([config.sub])dnl
1777 AC_REQUIRE_AUX_FILE([config.guess])dnl
1778 m4_divert_once([HELP_CANON],
1780 System types:
1781   --build=BUILD     configure for building on BUILD [guessed]]])dnl
1782 # Make sure we can run config.sub.
1783 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1784   AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
1786 AC_CACHE_CHECK([build system type], [ac_cv_build],
1787 [ac_build_alias=$build_alias
1788 test "x$ac_build_alias" = x &&
1789   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1790 test "x$ac_build_alias" = x &&
1791   AC_MSG_ERROR([cannot guess build type; you must specify one])
1792 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1793   AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
1795 _AC_CANONICAL_SPLIT(build)
1796 ])# AC_CANONICAL_BUILD
1799 # AC_CANONICAL_HOST
1800 # -----------------
1801 AC_DEFUN_ONCE([AC_CANONICAL_HOST],
1802 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1803 m4_divert_once([HELP_CANON],
1804 [[  --host=HOST       cross-compile to build programs to run on HOST [BUILD]]])dnl
1805 AC_CACHE_CHECK([host system type], [ac_cv_host],
1806 [if test "x$host_alias" = x; then
1807   ac_cv_host=$ac_cv_build
1808 else
1809   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1810     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
1813 _AC_CANONICAL_SPLIT([host])
1814 ])# AC_CANONICAL_HOST
1817 # AC_CANONICAL_TARGET
1818 # -------------------
1819 AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
1820 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1821 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1822 m4_divert_once([HELP_CANON],
1823 [[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
1824 AC_CACHE_CHECK([target system type], [ac_cv_target],
1825 [if test "x$target_alias" = x; then
1826   ac_cv_target=$ac_cv_host
1827 else
1828   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
1829     AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
1832 _AC_CANONICAL_SPLIT([target])
1834 # The aliases save the names the user supplied, while $host etc.
1835 # will get canonicalized.
1836 test -n "$target_alias" &&
1837   test "$program_prefix$program_suffix$program_transform_name" = \
1838     NONENONEs,x,x, &&
1839   program_prefix=${target_alias}-[]dnl
1840 ])# AC_CANONICAL_TARGET
1843 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1846 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1847 # ------------------------------------------
1848 # If the cache file is inconsistent with the current host,
1849 # target and build system types, execute CMD or print a default
1850 # error message.  Now handled via _AC_ARG_VAR_PRECIOUS.
1851 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1854 ## ---------------------- ##
1855 ## Caching test results.  ##
1856 ## ---------------------- ##
1859 # AC_SITE_LOAD
1860 # ------------
1861 # Look for site- or system-specific initialization scripts.
1862 m4_define([AC_SITE_LOAD],
1863 [# Prefer an explicitly selected file to automatically selected ones.
1864 ac_site_file1=NONE
1865 ac_site_file2=NONE
1866 if test -n "$CONFIG_SITE"; then
1867   ac_site_file1=$CONFIG_SITE
1868 elif test "x$prefix" != xNONE; then
1869   ac_site_file1=$prefix/share/config.site
1870   ac_site_file2=$prefix/etc/config.site
1871 else
1872   ac_site_file1=$ac_default_prefix/share/config.site
1873   ac_site_file2=$ac_default_prefix/etc/config.site
1875 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1877   test "x$ac_site_file" = xNONE && continue
1878   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1879     AC_MSG_NOTICE([loading site script $ac_site_file])
1880     sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1881     . "$ac_site_file"
1882   fi
1883 done
1887 # AC_CACHE_LOAD
1888 # -------------
1889 m4_define([AC_CACHE_LOAD],
1890 [if test -r "$cache_file"; then
1891   # Some versions of bash will fail to source /dev/null (special files
1892   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
1893   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1894     AC_MSG_NOTICE([loading cache $cache_file])
1895     case $cache_file in
1896       [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
1897       *)                      . "./$cache_file";;
1898     esac
1899   fi
1900 else
1901   AC_MSG_NOTICE([creating cache $cache_file])
1902   >$cache_file
1904 ])# AC_CACHE_LOAD
1907 # _AC_CACHE_DUMP
1908 # --------------
1909 # Dump the cache to stdout.  It can be in a pipe (this is a requirement).
1910 m4_define([_AC_CACHE_DUMP],
1911 [# The following way of writing the cache mishandles newlines in values,
1912 # but we know of no workaround that is simple, portable, and efficient.
1913 # So, we kill variables containing newlines.
1914 # Ultrix sh set writes to stderr and can't be redirected directly,
1915 # and sets the high bit in the cache file unless we assign to the vars.
1917   for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
1918     eval ac_val=\$$ac_var
1919     case $ac_val in #(
1920     *${as_nl}*)
1921       case $ac_var in #(
1922       *_cv_*) AC_MSG_WARN([cache variable $ac_var contains a newline]) ;;
1923       esac
1924       case $ac_var in #(
1925       _ | IFS | as_nl) ;; #(
1926       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1927       *) AS_UNSET([$ac_var]) ;;
1928       esac ;;
1929     esac
1930   done
1932   (set) 2>&1 |
1933     case $as_nl`(ac_space=' '; set) 2>&1` in #(
1934     *${as_nl}ac_space=\ *)
1935       # `set' does not quote correctly, so add quotes: double-quote
1936       # substitution turns \\\\ into \\, and sed turns \\ into \.
1937       sed -n \
1938         ["s/'/'\\\\''/g;
1939           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1940       ;; #(
1941     *)
1942       # `set' quotes correctly as required by POSIX, so do not add quotes.
1943       sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
1944       ;;
1945     esac |
1946     sort
1947 )dnl
1948 ])# _AC_CACHE_DUMP
1951 # AC_CACHE_SAVE
1952 # -------------
1953 # Save the cache.
1954 # Allow a site initialization script to override cache values.
1955 m4_define([AC_CACHE_SAVE],
1956 [cat >confcache <<\_ACEOF
1957 # This file is a shell script that caches the results of configure
1958 # tests run on this system so they can be shared between configure
1959 # scripts and configure runs, see configure's option --config-cache.
1960 # It is not useful on other systems.  If it contains results you don't
1961 # want to keep, you may remove or edit it.
1963 # config.status only pays attention to the cache file if you give it
1964 # the --recheck option to rerun configure.
1966 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1967 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1968 # following values.
1970 _ACEOF
1972 _AC_CACHE_DUMP() |
1973   sed ['
1974      /^ac_cv_env_/b end
1975      t clear
1976      :clear
1977      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1978      t end
1979      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1980      :end'] >>confcache
1981 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1982   if test -w "$cache_file"; then
1983     test "x$cache_file" != "x/dev/null" &&
1984       AC_MSG_NOTICE([updating cache $cache_file])
1985     cat confcache >$cache_file
1986   else
1987     AC_MSG_NOTICE([not updating unwritable cache $cache_file])
1988   fi
1990 rm -f confcache[]dnl
1991 ])# AC_CACHE_SAVE
1994 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1995 # ------------------------------------------
1996 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1997 # Should be dnl'ed.  Try to catch common mistakes.
1998 m4_defun([AC_CACHE_VAL],
1999 [AS_LITERAL_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
2000                             [AC_DIAGNOSE([syntax],
2001 [$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl
2002 m4_if(m4_index([$2], [AC_DEFINE]), [-1], [],
2003       [AC_DIAGNOSE([syntax],
2004 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
2005 [where no actions should be taken])])dnl
2006 m4_if(m4_index([$2], [AC_SUBST]), [-1], [],
2007       [AC_DIAGNOSE([syntax],
2008 [$0($1, ...): suspicious presence of an AC_SUBST in the second argument, ]dnl
2009 [where no actions should be taken])])dnl
2010 AS_VAR_SET_IF([$1],
2011               [_AS_ECHO_N([(cached) ])],
2012               [$2])
2016 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
2017 # -------------------------------------------
2018 # Do not call this macro with a dnl right behind.
2019 m4_defun([AC_CACHE_CHECK],
2020 [AC_MSG_CHECKING([$1])
2021 AC_CACHE_VAL([$2], [$3])dnl
2022 AS_LITERAL_IF([$2],
2023               [AC_MSG_RESULT([$$2])],
2024               [AS_VAR_COPY([ac_res], [$2])
2025                AC_MSG_RESULT([$ac_res])])dnl
2028 # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
2029 #                     [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
2030 # -------------------------------------------------------------
2031 AC_DEFUN([_AC_CACHE_CHECK_INT],
2032 [AC_CACHE_CHECK([$1], [$2],
2033    [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
2034 ])# _AC_CACHE_CHECK_INT
2038 ## ---------------------- ##
2039 ## Defining CPP symbols.  ##
2040 ## ---------------------- ##
2043 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
2044 # -------------------------------------------
2045 # Used by --trace to collect the list of AC_DEFINEd macros.
2046 m4_define([AC_DEFINE_TRACE_LITERAL],
2047 [m4_pattern_allow([^$1$])dnl
2048 AS_IDENTIFIER_IF([$1], [],
2049   [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
2050 ])# AC_DEFINE_TRACE_LITERAL
2053 # AC_DEFINE_TRACE(CPP-SYMBOL)
2054 # ---------------------------
2055 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
2056 # out non literal symbols.  CPP-SYMBOL must not include any parameters.
2057 m4_define([AC_DEFINE_TRACE],
2058 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL(_m4_expand([$1]))])])
2061 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2062 # -------------------------------------------
2063 # Set VARIABLE to VALUE, verbatim, or 1.  Remember the value
2064 # and if VARIABLE is affected the same VALUE, do nothing, else
2065 # die.  The third argument is used by autoheader.
2066 m4_define([AC_DEFINE], [_AC_DEFINE_Q([_$0], $@)])
2068 # _AC_DEFINE(STRING)
2069 # ------------------
2070 # Append the pre-expanded STRING and a newline to confdefs.h, as if by
2071 # a quoted here-doc.
2072 m4_define([_AC_DEFINE],
2073 [AS_ECHO(["AS_ESCAPE([[$1]])"]) >>confdefs.h])
2076 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2077 # ----------------------------------------------------
2078 # Similar, but perform shell substitutions $ ` \ once on VALUE, as
2079 # in an unquoted here-doc.
2080 m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([_$0], $@)])
2082 # _AC_DEFINE_UNQUOTED(STRING)
2083 # ---------------------------
2084 # Append the pre-expanded STRING and a newline to confdefs.h, as if
2085 # with an unquoted here-doc, but avoiding a fork in the common case of
2086 # no backslash, no command substitution, no complex variable
2087 # substitution, and no quadrigraphs.
2088 m4_define([_AC_DEFINE_UNQUOTED],
2089 [m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\${\|@]), [-1],
2090        [AS_ECHO(["AS_ESCAPE([$1], [""])"]) >>confdefs.h],
2091        [cat >>confdefs.h <<_ACEOF
2092 [$1]
2093 _ACEOF])])
2096 # _AC_DEFINE_Q(MACRO, VARIABLE, [VALUE], [DESCRIPTION])
2097 # -----------------------------------------------------
2098 # Internal function that performs common elements of AC_DEFINE{,_UNQUOTED}.
2099 # MACRO must take one argument, which is the fully expanded string to
2100 # append to confdefs.h as if by a possibly-quoted here-doc.
2102 # m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so we use
2103 # m4_format rather than regex to grab prefix up to first ().  AC_name
2104 # is defined with over-quotation, so that we can avoid m4_defn; this
2105 # is only safe because the name should not contain $.
2107 # Guarantee a match in m4_index, so as to avoid a bug with precision
2108 # -1 in m4_format in older m4.
2109 m4_define([_AC_DEFINE_Q],
2110 [m4_pushdef([AC_name], m4_format([[[%.*s]]], m4_index([$2(], [(]), [$2]))]dnl
2111 [AC_DEFINE_TRACE(AC_name)]dnl
2112 [m4_cond([m4_index([$3], [
2113 ])], [-1], [],
2114         [AS_LITERAL_IF([$3], [m4_bregexp([[$3]], [[^\\]
2115 ], [-])])], [], [],
2116         [m4_warn([syntax], [AC_DEFINE]m4_if([$1], [_AC_DEFINE], [],
2117   [[_UNQUOTED]])[: `$3' is not a valid preprocessor define value])])]dnl
2118 [m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4])
2119 ])_m4_popdef([AC_name])]dnl
2120 [$1(m4_expand([[@%:@define] $2 ]m4_if([$#], 2, 1,
2121   [$3], [], [/**/], [[$3]])))
2126 ## -------------------------- ##
2127 ## Setting output variables.  ##
2128 ## -------------------------- ##
2131 # AC_SUBST_TRACE(VARIABLE)
2132 # ------------------------
2133 # This macro is used with --trace to collect the list of substituted variables.
2134 m4_define([AC_SUBST_TRACE])
2137 # AC_SUBST(VARIABLE, [VALUE])
2138 # ---------------------------
2139 # Create an output variable from a shell VARIABLE.  If VALUE is given
2140 # assign it to VARIABLE.  Use `""' if you want to set VARIABLE to an
2141 # empty value, not an empty second argument.
2143 m4_define([AC_SUBST],
2144 [AS_IDENTIFIER_IF([$1], [],
2145   [m4_fatal([$0: `$1' is not a valid shell variable name])])]dnl
2146 [AC_SUBST_TRACE([$1])]dnl
2147 [m4_pattern_allow([^$1$])]dnl
2148 [m4_ifvaln([$2], [$1=$2])[]]dnl
2149 [m4_set_add([_AC_SUBST_VARS], [$1])])# AC_SUBST
2152 # AC_SUBST_FILE(VARIABLE)
2153 # -----------------------
2154 # Read the comments of the preceding macro.
2155 m4_define([AC_SUBST_FILE],
2156 [m4_pattern_allow([^$1$])dnl
2157 m4_append_uniq([_AC_SUBST_FILES], [$1], [
2158 ])])
2162 ## --------------------------------------- ##
2163 ## Printing messages at autoconf runtime.  ##
2164 ## --------------------------------------- ##
2166 # In fact, I think we should promote the use of m4_warn and m4_fatal
2167 # directly.  This will also avoid to some people to get it wrong
2168 # between AC_FATAL and AC_MSG_ERROR.
2171 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2172 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2173 # --------------------------------
2174 m4_define([AC_DIAGNOSE], [m4_warn($@)])
2175 m4_define([AC_FATAL],    [m4_fatal($@)])
2178 # AC_WARNING(MESSAGE)
2179 # -------------------
2180 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2181 # specified.
2182 m4_define([AC_WARNING],
2183 [AC_DIAGNOSE([syntax], [$1])])
2188 ## ---------------------------------------- ##
2189 ## Printing messages at configure runtime.  ##
2190 ## ---------------------------------------- ##
2193 # AC_MSG_CHECKING(FEATURE)
2194 # ------------------------
2195 m4_define([AC_MSG_CHECKING],
2196 [{ _AS_ECHO_LOG([checking $1])
2197 _AS_ECHO_N([checking $1... ]); }dnl
2201 # AC_MSG_RESULT(RESULT)
2202 # ---------------------
2203 m4_define([AC_MSG_RESULT],
2204 [{ _AS_ECHO_LOG([result: $1])
2205 _AS_ECHO([$1]); }dnl
2209 # AC_MSG_WARN(PROBLEM)
2210 # AC_MSG_NOTICE(STRING)
2211 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2212 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
2213 # ----------------------------------------
2214 m4_copy([AS_WARN],    [AC_MSG_WARN])
2215 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2216 m4_copy([AS_ERROR],   [AC_MSG_ERROR])
2217 m4_define([AC_MSG_FAILURE],
2218 [{ AS_MESSAGE([error: in `$ac_pwd':], 2)
2219 AC_MSG_ERROR([$1
2220 See `config.log' for more details.], [$2]); }])
2223 # _AC_MSG_LOG_CONFTEST
2224 # --------------------
2225 m4_define([_AC_MSG_LOG_CONFTEST],
2226 [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
2227 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2231 # AU::AC_CHECKING(FEATURE)
2232 # ------------------------
2233 AU_DEFUN([AC_CHECKING],
2234 [AS_MESSAGE([checking $1...])])
2237 # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
2238 # ----------------------------------
2239 # No escaping, so it performed also backtick substitution.
2240 AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
2241 [_AS_ECHO_UNQUOTED([$as_me:${as_lineno-$LINENO}: result: $1], AS_MESSAGE_LOG_FD)
2242 _AS_ECHO_UNQUOTED([$1])[]dnl
2246 # AU::AC_VERBOSE(STRING)
2247 # ----------------------
2248 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2255 ## ---------------------------- ##
2256 ## Compiler-running mechanics.  ##
2257 ## ---------------------------- ##
2260 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2261 # ----------------------------------
2262 # Eval COMMAND, save the exit status in ac_status, and log it.  The return
2263 # code is 0 if COMMAND succeeded, so that it can be used directly in AS_IF
2264 # constructs.
2265 AC_DEFUN([_AC_RUN_LOG],
2266 [{ { $2; } >&AS_MESSAGE_LOG_FD
2267   ($1) 2>&AS_MESSAGE_LOG_FD
2268   ac_status=$?
2269   _AS_ECHO_LOG([\$? = $ac_status])
2270   test $ac_status = 0; }])
2273 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2274 # -----------------------------------------
2275 # Run COMMAND, save its stderr into conftest.err, save the exit status
2276 # in ac_status, and log it.  Don't forget to clean up conftest.err after
2277 # use.
2278 # Note that when tracing, most shells will leave the traces in stderr
2279 # starting with "+": that's what this macro tries to address.
2280 # The return code is 0 if COMMAND succeeded, so that it can be used directly
2281 # in AS_IF constructs.
2282 AC_DEFUN([_AC_RUN_LOG_STDERR],
2283 [{ { $2; } >&AS_MESSAGE_LOG_FD
2284   ($1) 2>conftest.err
2285   ac_status=$?
2286   if test -s conftest.err; then
2287     grep -v '^ *+' conftest.err >conftest.er1
2288     cat conftest.er1 >&AS_MESSAGE_LOG_FD
2289     mv -f conftest.er1 conftest.err
2290   fi
2291   _AS_ECHO_LOG([\$? = $ac_status])
2292   test $ac_status = 0; }])
2295 # _AC_RUN_LOG_LIMIT(COMMAND, LOG-COMMANDS, [LINES])
2296 # -------------------------------------------------
2297 # Like _AC_RUN_LOG, but only log LINES lines from stderr,
2298 # defaulting to 10 lines.
2299 AC_DEFUN([_AC_RUN_LOG_LIMIT],
2300 [{ { $2; } >&AS_MESSAGE_LOG_FD
2301   ($1) 2>conftest.err
2302   ac_status=$?
2303   if test -s conftest.err; then
2304     sed 'm4_default([$3], [10])a\
2305 ... rest of stderr output deleted ...
2306          m4_default([$3], [10])q' conftest.err >conftest.er1
2307     cat conftest.er1 >&AS_MESSAGE_LOG_FD
2308   fi
2309   rm -f conftest.er1 conftest.err
2310   _AS_ECHO_LOG([\$? = $ac_status])
2311   test $ac_status = 0; }])
2314 # _AC_DO_ECHO(COMMAND)
2315 # --------------------
2316 # Echo COMMAND.  This is designed to be used just before evaluating COMMAND.
2317 AC_DEFUN([_AC_DO_ECHO],
2318 [m4_if([$1], [$ac_try], [], [ac_try="$1"
2319 ])]dnl
2320 dnl If the string contains '\"', '`', or '\\', then just echo it rather
2321 dnl than expanding it.  This is a hack, but it is safer, while also
2322 dnl typically expanding simple substrings like '$CC', which is what we want.
2324 dnl Much of this macro body is quoted, to work around misuses like
2325 dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
2326 dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
2327 dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
2328 dnl underquoting misuses, such as
2329 dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
2330 dnl We normally wouldn't bother with this kind of workaround for invalid code
2331 dnl but this change was put in just before Autoconf 2.60 and we wanted to
2332 dnl minimize the integration hassle.
2333 [[case "(($ac_try" in
2334   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2335   *) ac_try_echo=$ac_try;;
2336 esac
2337 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""]
2338 AS_ECHO(["$ac_try_echo"])])
2340 # _AC_DO(COMMAND)
2341 # ---------------
2342 # Eval COMMAND, save the exit status in ac_status, and log it.
2343 # For internal use only.
2344 AC_DEFUN([_AC_DO],
2345 [_AC_RUN_LOG([eval "$1"],
2346              [_AC_DO_ECHO([$1])])])
2349 # _AC_DO_STDERR(COMMAND)
2350 # ----------------------
2351 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2352 AC_DEFUN([_AC_DO_STDERR],
2353 [_AC_RUN_LOG_STDERR([eval "$1"],
2354                     [_AC_DO_ECHO([$1])])])
2357 # _AC_DO_VAR(VARIABLE)
2358 # --------------------
2359 # Evaluate "$VARIABLE", which should be a valid shell command.
2360 # The purpose of this macro is to write "configure:123: command line"
2361 # into config.log for every test run.
2362 AC_DEFUN([_AC_DO_VAR],
2363 [_AC_DO([$$1])])
2366 # _AC_DO_TOKENS(COMMAND)
2367 # ----------------------
2368 # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
2369 # tokens of the shell command language.
2370 AC_DEFUN([_AC_DO_TOKENS],
2371 [{ ac_try='$1'
2372   _AC_DO([$ac_try]); }])
2375 # _AC_DO_LIMIT(COMMAND, [LINES])
2376 # ------------------------------
2377 # Like _AC_DO, but limit the amount of stderr lines logged to LINES.
2378 # For internal use only.
2379 AC_DEFUN([_AC_DO_LIMIT],
2380 [_AC_RUN_LOG_LIMIT([eval "$1"],
2381                    [_AC_DO_ECHO([$1])], [$2])])
2384 # _AC_EVAL(COMMAND)
2385 # -----------------
2386 # Eval COMMAND, save the exit status in ac_status, and log it.
2387 # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
2388 # It is present only for backward compatibility with previous Autoconf versions.
2389 AC_DEFUN([_AC_EVAL],
2390 [_AC_RUN_LOG([eval $1],
2391              [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])])
2394 # _AC_EVAL_STDERR(COMMAND)
2395 # ------------------------
2396 # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
2397 # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
2398 # It is present only for backward compatibility with previous Autoconf versions.
2399 AC_DEFUN([_AC_EVAL_STDERR],
2400 [_AC_RUN_LOG_STDERR([eval $1],
2401                     [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])])
2404 # AC_TRY_EVAL(VARIABLE)
2405 # ---------------------
2406 # Evaluate $VARIABLE, which should be a valid shell command.
2407 # The purpose of this macro is to write "configure:123: command line"
2408 # into config.log for every test run.
2410 # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
2411 # undocumented, and should not be used.
2412 # They may be removed or their API changed in a future release.
2413 # Autoconf itself no longer uses these two macros; they are present
2414 # only for backward compatibility with previous versions of Autoconf.
2415 # Not every shell command will work due to problems with eval
2416 # and quoting, and the rules for exactly what does work are tricky.
2417 # Worse, due to double-expansion during evaluation, arbitrary unintended
2418 # shell commands could be executed in some situations.
2419 AC_DEFUN([AC_TRY_EVAL],
2420 [_AC_EVAL([$$1])])
2423 # AC_TRY_COMMAND(COMMAND)
2424 # -----------------------
2425 # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
2426 # tokens of the shell command language.
2427 # This macro should not be used; see the comments under AC_TRY_EVAL for why.
2428 AC_DEFUN([AC_TRY_COMMAND],
2429 [{ ac_try='$1'
2430   _AC_EVAL([$ac_try]); }])
2433 # AC_RUN_LOG(COMMAND)
2434 # -------------------
2435 AC_DEFUN([AC_RUN_LOG],
2436 [_AC_RUN_LOG([$1],
2437              [AS_ECHO(["$as_me:${as_lineno-$LINENO}: AS_ESCAPE([$1])"])])])
2442 ## ------------------------ ##
2443 ## Examining declarations.  ##
2444 ## ------------------------ ##
2447 # _AC_PREPROC_IFELSE_BODY
2448 # -----------------------
2449 # Shell function body for _AC_PREPROC_IFELSE.
2450 m4_define([_AC_PREPROC_IFELSE_BODY],
2451 [  AS_LINENO_PUSH([$[]1])
2452   AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && {
2453          test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2454          test ! -s conftest.err
2455        }],
2456     [ac_retval=0],
2457     [_AC_MSG_LOG_CONFTEST
2458     ac_retval=1])
2459   AS_LINENO_POP
2460   AS_SET_STATUS([$ac_retval])
2461 ])# _AC_PREPROC_IFELSE_BODY
2464 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2465 # ----------------------------------------------------------------
2466 # Try to preprocess PROGRAM.
2468 # This macro can be used during the selection of a preprocessor.
2469 # eval is necessary to expand ac_cpp.
2470 AC_DEFUN([_AC_PREPROC_IFELSE],
2471 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_cpp],
2472   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_cpp], [LINENO],
2473     [Try to preprocess conftest.$ac_ext, and return whether this succeeded.])],
2474   [$0_BODY])]dnl
2475 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2476 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3])
2477 rm -f conftest.err[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2478 ])# _AC_PREPROC_IFELSE
2480 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2481 # ---------------------------------------------------------------
2482 # Try to preprocess PROGRAM.  Requires that the preprocessor for the
2483 # current language was checked for, hence do not use this macro in macros
2484 # looking for a preprocessor.
2485 AC_DEFUN([AC_PREPROC_IFELSE],
2486 [AC_LANG_PREPROC_REQUIRE()dnl
2487 _AC_PREPROC_IFELSE($@)])
2490 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2491 # ---------------------------------------------------------
2492 # AC_TRY_CPP is used to check whether particular header files exist.
2493 # (But it actually tests whether INCLUDES produces no CPP errors.)
2495 # INCLUDES are not defaulted and are double quoted.
2496 AU_DEFUN([AC_TRY_CPP],
2497 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2500 # AC_EGREP_CPP(PATTERN, PROGRAM,
2501 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2502 # ------------------------------------------------------
2503 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2504 # come early, it is not included in AC_BEFORE checks.
2505 AC_DEFUN([AC_EGREP_CPP],
2506 [AC_LANG_PREPROC_REQUIRE()dnl
2507 AC_REQUIRE([AC_PROG_EGREP])dnl
2508 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2509 AS_IF([dnl eval is necessary to expand ac_cpp.
2510 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2511 (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2512 dnl Quote $1 to prevent m4 from eating character classes
2513   $EGREP "[$1]" >/dev/null 2>&1],
2514   [$3],
2515   [$4])
2516 rm -f conftest*
2517 ])# AC_EGREP_CPP
2520 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2521 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2522 # ---------------------------------------------------------
2523 AC_DEFUN([AC_EGREP_HEADER],
2524 [AC_EGREP_CPP([$1],
2525 [#include <$2>
2526 ], [$3], [$4])])
2531 ## ------------------ ##
2532 ## Examining syntax.  ##
2533 ## ------------------ ##
2535 # _AC_COMPILE_IFELSE_BODY
2536 # -----------------------
2537 # Shell function body for _AC_COMPILE_IFELSE.
2538 m4_define([_AC_COMPILE_IFELSE_BODY],
2539 [  AS_LINENO_PUSH([$[]1])
2540   rm -f conftest.$ac_objext
2541   AS_IF([_AC_DO_STDERR($ac_compile) && {
2542          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2543          test ! -s conftest.err
2544        } && test -s conftest.$ac_objext],
2545       [ac_retval=0],
2546       [_AC_MSG_LOG_CONFTEST
2547         ac_retval=1])
2548   AS_LINENO_POP
2549   AS_SET_STATUS([$ac_retval])
2550 ])# _AC_COMPILE_IFELSE_BODY
2553 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2554 # ----------------------------------------------------------------
2555 # Try to compile PROGRAM.
2556 # This macro can be used during the selection of a compiler.
2557 AC_DEFUN([_AC_COMPILE_IFELSE],
2558 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_compile],
2559   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_compile], [LINENO],
2560     [Try to compile conftest.$ac_ext, and return whether this succeeded.])],
2561   [$0_BODY])]dnl
2562 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2563 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3])
2564 rm -f core conftest.err conftest.$ac_objext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2565 ])# _AC_COMPILE_IFELSE
2568 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2569 # ---------------------------------------------------------------
2570 # Try to compile PROGRAM.  Requires that the compiler for the current
2571 # language was checked for, hence do not use this macro in macros looking
2572 # for a compiler.
2573 AC_DEFUN([AC_COMPILE_IFELSE],
2574 [AC_LANG_COMPILER_REQUIRE()dnl
2575 _AC_COMPILE_IFELSE($@)])
2578 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2579 #                [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2580 # ---------------------------------------------------
2581 AU_DEFUN([AC_TRY_COMPILE],
2582 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2586 ## --------------------- ##
2587 ## Examining libraries.  ##
2588 ## --------------------- ##
2591 # _AC_LINK_IFELSE_BODY
2592 # --------------------
2593 # Shell function body for _AC_LINK_IFELSE.
2594 m4_define([_AC_LINK_IFELSE_BODY],
2595 [  AS_LINENO_PUSH([$[]1])
2596   rm -f conftest.$ac_objext conftest$ac_exeext
2597   AS_IF([_AC_DO_STDERR($ac_link) && {
2598          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
2599          test ! -s conftest.err
2600        } && test -s conftest$ac_exeext && {
2601          test "$cross_compiling" = yes ||
2602          AS_TEST_X([conftest$ac_exeext])
2603        }],
2604       [ac_retval=0],
2605       [_AC_MSG_LOG_CONFTEST
2606         ac_retval=1])
2607   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2608   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2609   # interfere with the next link command; also delete a directory that is
2610   # left behind by Apple's compiler.  We do this before executing the actions.
2611   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2612   AS_LINENO_POP
2613   AS_SET_STATUS([$ac_retval])
2614 ])# _AC_LINK_IFELSE_BODY
2617 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2618 # -------------------------------------------------------------
2619 # Try to link PROGRAM.
2620 # This macro can be used during the selection of a compiler.
2622 # Test that resulting file is executable; see the problem reported by mwoehlke
2623 # in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
2624 # But skip the test when cross-compiling, to prevent problems like the one
2625 # reported by Chris Johns in
2626 # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
2628 AC_DEFUN([_AC_LINK_IFELSE],
2629 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_link],
2630   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_link], [LINENO],
2631     [Try to link conftest.$ac_ext, and return whether this succeeded.])],
2632   [$0_BODY])]dnl
2633 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2634 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_link "$LINENO"], [$2], [$3])
2635 rm -f core conftest.err conftest.$ac_objext \
2636     conftest$ac_exeext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2637 ])# _AC_LINK_IFELSE
2640 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2641 # ------------------------------------------------------------
2642 # Try to link PROGRAM.  Requires that the compiler for the current
2643 # language was checked for, hence do not use this macro in macros looking
2644 # for a compiler.
2645 AC_DEFUN([AC_LINK_IFELSE],
2646 [AC_LANG_COMPILER_REQUIRE()dnl
2647 _AC_LINK_IFELSE($@)])
2650 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2651 #             [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2652 # ------------------------------------------------
2653 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2654 AU_DEFUN([AC_TRY_LINK],
2655 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2658 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2659 #                  ACTION-IF-TRUE, [ACTION-IF-FALSE])
2660 # ---------------------------------------------------
2661 AU_DEFUN([AC_COMPILE_CHECK],
2662 [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
2663 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
2668 ## ------------------------------- ##
2669 ## Checking for runtime features.  ##
2670 ## ------------------------------- ##
2673 # _AC_RUN_IFELSE_BODY
2674 # -------------------
2675 # Shell function body for _AC_RUN_IFELSE.
2676 m4_define([_AC_RUN_IFELSE_BODY],
2677 [  AS_LINENO_PUSH([$[]1])
2678   AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
2679       [ac_retval=0],
2680       [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
2681        _AC_MSG_LOG_CONFTEST
2682        ac_retval=$ac_status])
2683   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2684   AS_LINENO_POP
2685   AS_SET_STATUS([$ac_retval])
2686 ])# _AC_RUN_IFELSE_BODY
2689 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2690 # ------------------------------------------------------------
2691 # Compile, link, and run.
2692 # This macro can be used during the selection of a compiler.
2693 # We also remove conftest.o as if the compilation fails, some compilers
2694 # don't remove it.  We remove gmon.out and bb.out, which may be
2695 # created during the run if the program is built with profiling support.
2696 AC_DEFUN([_AC_RUN_IFELSE],
2697 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_run],
2698   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_run], [LINENO],
2699     [Try to link conftest.$ac_ext, and return whether this succeeded.
2700      Assumes that executables *can* be run.])],
2701   [$0_BODY])]dnl
2702 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
2703 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_run "$LINENO"], [$2], [$3])
2704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2705   conftest.$ac_objext conftest.beam[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
2706 ])# _AC_RUN_IFELSE
2708 # AC_RUN_IFELSE(PROGRAM,
2709 #               [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2710 #               [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2711 # ----------------------------------------------------------
2712 # Compile, link, and run. Requires that the compiler for the current
2713 # language was checked for, hence do not use this macro in macros looking
2714 # for a compiler.
2715 AC_DEFUN([AC_RUN_IFELSE],
2716 [AC_LANG_COMPILER_REQUIRE()dnl
2717 m4_ifval([$4], [],
2718          [AC_DIAGNOSE([cross],
2719                      [$0 called without default to allow cross compiling])])dnl
2720 AS_IF([test "$cross_compiling" = yes],
2721   [m4_default([$4],
2722            [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
2723   [_AC_RUN_IFELSE($@)])
2727 # AC_TRY_RUN(PROGRAM,
2728 #            [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2729 #            [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2730 # --------------------------------------------------------
2731 AU_DEFUN([AC_TRY_RUN],
2732 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2736 ## ------------------------------------- ##
2737 ## Checking for the existence of files.  ##
2738 ## ------------------------------------- ##
2740 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2741 # -------------------------------------------------------------
2743 # Check for the existence of FILE.
2744 AC_DEFUN([AC_CHECK_FILE],
2745 [AC_DIAGNOSE([cross],
2746              [cannot check for file existence when cross compiling])dnl
2747 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2748 AC_CACHE_CHECK([for $1], [ac_File],
2749 [test "$cross_compiling" = yes &&
2750   AC_MSG_ERROR([cannot check for file existence when cross compiling])
2751 if test -r "$1"; then
2752   AS_VAR_SET([ac_File], [yes])
2753 else
2754   AS_VAR_SET([ac_File], [no])
2755 fi])
2756 AS_VAR_IF([ac_File], [yes], [$2], [$3])
2757 AS_VAR_POPDEF([ac_File])dnl
2758 ])# AC_CHECK_FILE
2761 # _AC_CHECK_FILES(FILE)
2762 # ---------------------
2763 # Helper to AC_CHECK_FILES, which generates two of the three arguments
2764 # to AC_CHECK_FILE based on FILE.
2765 m4_define([_AC_CHECK_FILES],
2766 [[$1], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
2767   [Define to 1 if you have the file `$1'.])]])
2770 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2771 # -----------------------------------------------------------------
2772 # For each word in the whitespace-separated FILE list, perform either
2773 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.  For files that exist, also
2774 # provide the preprocessor variable HAVE_FILE.
2775 AC_DEFUN([AC_CHECK_FILES],
2776 [m4_map_args_w([$1], [AC_CHECK_FILE(_$0(], [)[$2], [$3])])])
2779 ## ------------------------------- ##
2780 ## Checking for declared symbols.  ##
2781 ## ------------------------------- ##
2784 # _AC_CHECK_DECL_BODY
2785 # -------------------
2786 # Shell function body for AC_CHECK_DECL.
2787 m4_define([_AC_CHECK_DECL_BODY],
2788 [  AS_LINENO_PUSH([$[]1])
2789   AC_CACHE_CHECK([whether $[]2 is declared], [$[]3],
2790   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]4],
2791 [@%:@ifndef $[]2
2792   (void) $[]2;
2793 @%:@endif
2794 ])],
2795                    [AS_VAR_SET([$[]3], [yes])],
2796                    [AS_VAR_SET([$[]3], [no])])])
2797   AS_LINENO_POP
2798 ])# _AC_CHECK_DECL_BODY
2800 # AC_CHECK_DECL(SYMBOL,
2801 #               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2802 #               [INCLUDES = DEFAULT-INCLUDES])
2803 # -------------------------------------------------------
2804 # Check whether SYMBOL (a function, variable, or constant) is declared.
2805 AC_DEFUN([AC_CHECK_DECL],
2806 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_decl],
2807   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_decl],
2808     [LINENO SYMBOL VAR],
2809     [Tests whether SYMBOL is declared, setting cache variable VAR accordingly.])],
2810   [_$0_BODY])]dnl
2811 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])]dnl
2812 [ac_fn_[]_AC_LANG_ABBREV[]_check_decl ]dnl
2813 ["$LINENO" "$1" "ac_Symbol" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
2814 AS_VAR_IF([ac_Symbol], [yes], [$2], [$3])
2815 AS_VAR_POPDEF([ac_Symbol])dnl
2816 ])# AC_CHECK_DECL
2819 # _AC_CHECK_DECLS(SYMBOL, ACTION-IF_FOUND, ACTION-IF-NOT-FOUND,
2820 #                 INCLUDES)
2821 # -------------------------------------------------------------
2822 # Helper to AC_CHECK_DECLS, which generates the check for a single
2823 # SYMBOL with INCLUDES, performs the AC_DEFINE, then expands
2824 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.
2825 m4_define([_AC_CHECK_DECLS],
2826 [AC_CHECK_DECL([$1], [ac_have_decl=1], [ac_have_decl=0], [$4])]dnl
2827 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_$1]), [$ac_have_decl],
2828   [Define to 1 if you have the declaration of `$1',
2829    and to 0 if you don't.])]dnl
2830 [m4_ifvaln([$2$3], [AS_IF([test $ac_have_decl = 1], [$2], [$3])])])
2832 # AC_CHECK_DECLS(SYMBOLS,
2833 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2834 #                [INCLUDES = DEFAULT-INCLUDES])
2835 # --------------------------------------------------------
2836 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
2837 # documentation for a detailed explanation of this difference with
2838 # other AC_CHECK_*S macros.  SYMBOLS is an m4 list.
2839 AC_DEFUN([AC_CHECK_DECLS],
2840 [m4_map_args_sep([_$0(], [, [$2], [$3], [$4])], [], $1)])
2843 # _AC_CHECK_DECL_ONCE(SYMBOL)
2844 # ---------------------------
2845 # Check for a single SYMBOL once.
2846 m4_define([_AC_CHECK_DECL_ONCE],
2847 [AC_DEFUN([_AC_Check_Decl_$1], [_AC_CHECK_DECLS([$1])])]dnl
2848 [AC_REQUIRE([_AC_Check_Decl_$1])])
2850 # AC_CHECK_DECLS_ONCE(SYMBOLS)
2851 # ----------------------------
2852 # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
2853 AC_DEFUN([AC_CHECK_DECLS_ONCE],
2854 [m4_map_args_sep([_AC_CHECK_DECL_ONCE(], [)], [], $1)])
2858 ## ---------------------------------- ##
2859 ## Replacement of library functions.  ##
2860 ## ---------------------------------- ##
2863 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2864 # -----------------------------
2865 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2866 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2867 [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
2870 # AC_LIBSOURCE(FILE-NAME)
2871 # -----------------------
2872 # Announce we might need the file `FILE-NAME'.
2873 m4_define([AC_LIBSOURCE], [])
2876 # AC_LIBSOURCES([FILE-NAME1, ...])
2877 # -------------------------------
2878 # Announce we might need these files.
2879 AC_DEFUN([AC_LIBSOURCES],
2880 [m4_map_args([AC_LIBSOURCE], $1)])
2883 # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
2884 # --------------------------------------------
2885 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2886 m4_define([_AC_LIBOBJ],
2887 [AS_LITERAL_IF([$1],
2888                [AC_LIBSOURCE([$1.c])],
2889                [$2])dnl
2890 case " $LIB@&t@OBJS " in
2891   *" $1.$ac_objext "* ) ;;
2892   *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
2893 esac
2897 # AC_LIBOBJ(FILE-NAME-NOEXT)
2898 # -------------------------
2899 # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
2900 AC_DEFUN([AC_LIBOBJ],
2901 [_AC_LIBOBJ([$1],
2902             [AC_DIAGNOSE(syntax,
2903                          [$0($1): you should use literals])])dnl
2907 # _AC_LIBOBJS_NORMALIZE
2908 # ---------------------
2909 # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
2910 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2911 # Used with AC_CONFIG_COMMANDS_PRE.
2912 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2913 [ac_libobjs=
2914 ac_ltlibobjs=
2915 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2916   # 1. Remove the extension, and $U if already installed.
2917   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
2918   ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
2919   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
2920   #    will be set to the directory where LIBOBJS objects are built.
2921   AS_VAR_APPEND([ac_libobjs], [" \${LIBOBJDIR}$ac_i\$U.$ac_objext"])
2922   AS_VAR_APPEND([ac_ltlibobjs], [" \${LIBOBJDIR}$ac_i"'$U.lo'])
2923 done
2924 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2925 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2929 ## ----------------------------------- ##
2930 ## Checking compiler characteristics.  ##
2931 ## ----------------------------------- ##
2934 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS],
2935 #                         [IF-FAILURE])
2936 # ---------------------------------------------------------------------
2937 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2938 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2939 m4_define([_AC_COMPUTE_INT_COMPILE],
2940 [# Depending upon the size, compute the lo and hi bounds.
2941 _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2942  [ac_lo=0 ac_mid=0
2943   while :; do
2944     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2945                        [ac_hi=$ac_mid; break],
2946                        [AS_VAR_ARITH([ac_lo], [$ac_mid + 1])
2947                         if test $ac_lo -le $ac_mid; then
2948                           ac_lo= ac_hi=
2949                           break
2950                         fi
2951                         AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid + 1])])
2952   done],
2953 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2954  [ac_hi=-1 ac_mid=-1
2955   while :; do
2956     _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2957                        [ac_lo=$ac_mid; break],
2958                        [AS_VAR_ARITH([ac_hi], ['(' $ac_mid ')' - 1])
2959                         if test $ac_mid -le $ac_hi; then
2960                           ac_lo= ac_hi=
2961                           break
2962                         fi
2963                         AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid])])
2964   done],
2965  [ac_lo= ac_hi=])])
2966 # Binary search between lo and hi bounds.
2967 while test "x$ac_lo" != "x$ac_hi"; do
2968   AS_VAR_ARITH([ac_mid], ['(' $ac_hi - $ac_lo ')' / 2 + $ac_lo])
2969   _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2970                      [ac_hi=$ac_mid],
2971                      [AS_VAR_ARITH([ac_lo], ['(' $ac_mid ')' + 1])])
2972 done
2973 case $ac_lo in @%:@((
2974 ?*) AS_VAR_SET([$2], [$ac_lo]); $4 ;;
2975 '') $5 ;;
2976 esac[]dnl
2977 ])# _AC_COMPUTE_INT_COMPILE
2980 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS],
2981 #                     [IF-FAILURE])
2982 # -----------------------------------------------------------------
2983 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2985 # AC_LANG_INT_SAVE intentionally does not end the file in a newline, so
2986 # we must add one to make it a text file before passing it to read.
2987 m4_define([_AC_COMPUTE_INT_RUN],
2988 [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2989                 [echo >>conftest.val; read $2 <conftest.val; $4], [$5])
2990 rm -f conftest.val
2991 ])# _AC_COMPUTE_INT_RUN
2994 # _AC_COMPUTE_INT_BODY
2995 # --------------------
2996 # Shell function body for AC_COMPUTE_INT.
2997 m4_define([_AC_COMPUTE_INT_BODY],
2998 [  AS_LINENO_PUSH([$[]1])
2999   if test "$cross_compiling" = yes; then
3000     _AC_COMPUTE_INT_COMPILE([$[]2], [$[]3], [$[]4],
3001                             [ac_retval=0], [ac_retval=1])
3002   else
3003     _AC_COMPUTE_INT_RUN([$[]2], [$[]3], [$[]4],
3004                         [ac_retval=0], [ac_retval=1])
3005   fi
3006   AS_LINENO_POP
3007   AS_SET_STATUS([$ac_retval])
3008 ])# _AC_COMPUTE_INT_BODY
3010 # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
3011 # ----------------------------------------------------------
3012 # Store into the shell variable VARIABLE the value of the integer C expression
3013 # EXPRESSION.  The value should fit in an initializer in a C variable of type
3014 # `signed long'.  If no PROLOGUE are specified, the default includes are used.
3015 # IF-FAILS is evaluated if the value cannot be found (which includes the
3016 # case of cross-compilation, if EXPRESSION is not computable at compile-time.
3017 AC_DEFUN([AC_COMPUTE_INT],
3018 [AC_LANG_COMPILER_REQUIRE()]dnl
3019 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_compute_int],
3020   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_compute_int],
3021     [LINENO EXPR VAR INCLUDES],
3022     [Tries to find the compile-time value of EXPR in a program that includes
3023      INCLUDES, setting VAR accordingly.  Returns whether the value could
3024      be computed])],
3025     [_$0_BODY])]dnl
3026 [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_compute_int "$LINENO" "$2" "$1" ]dnl
3027        ["AS_ESCAPE([$3], [""])"],
3028        [], [$4])
3029 ])# AC_COMPUTE_INT
3031 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
3032 # -----------------------------------------------------------
3033 # FIXME: this private interface was used by several packages.
3034 # Give them time to transition to AC_COMPUTE_INT and then delete this one.
3035 AC_DEFUN([_AC_COMPUTE_INT],
3036 [AC_COMPUTE_INT([$2], [$1], [$3], [$4])
3037 AC_DIAGNOSE([obsolete],
3038 [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
3039 future version or Autoconf.  Hence, it is suggested that you use
3040 instead the public AC_COMPUTE_INT macro.  Note that the arguments are
3041 slightly different between the two.])dnl
3042 ])# _AC_COMPUTE_INT