* lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR): Stub out a macro
[autoconf.git] / lib / autoconf / general.m4
blob968b3509f21229f765239cc6bfed6bf369fe02c5
1 # This file is part of Autoconf.                       -*- Autoconf -*-
2 # Parameterized macros.
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
4 # 2002, 2003, Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
21 # As a special exception, the Free Software Foundation gives unlimited
22 # permission to copy, distribute and modify the configure scripts that
23 # are the output of Autoconf.  You need not follow the terms of the GNU
24 # General Public License when using or distributing such scripts, even
25 # though portions of the text of Autoconf appear in them.  The GNU
26 # General Public License (GPL) does govern all other use of the material
27 # that constitutes the Autoconf program.
29 # Certain portions of the Autoconf source text are designed to be copied
30 # (in certain cases, depending on the input) into the output of
31 # Autoconf.  We call these the "data" portions.  The rest of the Autoconf
32 # source text consists of comments plus executable code that decides which
33 # of the data portions to output in any given case.  We call these
34 # comments and executable code the "non-data" portions.  Autoconf never
35 # copies any of the non-data portions into its output.
37 # This special exception to the GPL applies to versions of Autoconf
38 # released by the Free Software Foundation.  When you make and
39 # distribute a modified version of Autoconf, you may extend this special
40 # exception to the GPL to apply to your modified version as well, *unless*
41 # your modified version has the potential to copy into its output some
42 # of the text that was the non-data portion of the version that you started
43 # with.  (In other words, unless your change moves or copies text from
44 # the non-data portions to the data portions.)  If your modification has
45 # such potential, you must delete any notice of this special exception
46 # to the GPL from your modified version.
48 # Written by David MacKenzie, with help from
49 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
50 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
53 ## ---------------- ##
54 ## The diversions.  ##
55 ## ---------------- ##
58 # We heavily use m4's diversions both for the initializations and for
59 # required macros (see AC_REQUIRE), because in both cases we have to
60 # issue high in `configure' something which is discovered late.
62 # KILL is only used to suppress output.
64 # The layers of `configure'.  We let m4 undivert them by itself, when
65 # it reaches the end of `configure.ac'.
67 # - BINSH
68 #   #! /bin/sh
69 # - HEADER-REVISION
70 #   Sent by AC_REVISION
71 # - HEADER-COMMENT
72 #   Purpose of the script.
73 # - HEADER-COPYRIGHT
74 #   Copyright notice(s)
75 # - M4SH-INIT
76 #   Initialization of bottom layers.
78 # - DEFAULTS
79 #   early initializations (defaults)
80 # - PARSE_ARGS
81 #   initialization code, option handling loop.
83 # - HELP_BEGIN
84 #   Handling `configure --help'.
85 # - HELP_CANON
86 #   Help msg for AC_CANONICAL_*
87 # - HELP_ENABLE
88 #   Help msg from AC_ARG_ENABLE.
89 # - HELP_WITH
90 #   Help msg from AC_ARG_WITH.
91 # - HELP_VAR
92 #   Help msg from AC_ARG_VAR.
93 # - HELP_VAR_END
94 #   A small paragraph on the use of the variables.
95 # - HELP_END
96 #   Tail of the handling of --help.
98 # - VERSION_BEGIN
99 #   Head of the handling of --version.
100 # - VERSION_FSF
101 #   FSF copyright notice for --version.
102 # - VERSION_USER
103 #   User copyright notice for --version.
104 # - VERSION_END
105 #   Tail of the handling of --version.
107 # - INIT_PREPARE
108 #   Tail of initialization code.
110 # - BODY
111 #   the tests and output code
115 # _m4_divert(DIVERSION-NAME)
116 # --------------------------
117 # Convert a diversion name into its number.  Otherwise, return
118 # DIVERSION-NAME which is supposed to be an actual diversion number.
119 # Of course it would be nicer to use m4_case here, instead of zillions
120 # of little macros, but it then takes twice longer to run `autoconf'!
122 # From M4sugar:
123 #    -1. KILL
124 # 10000. GROW
126 # From M4sh:
127 #    0. BINSH
128 #    1. HEADER-REVISION
129 #    2. HEADER-COMMENT
130 #    3. HEADER-COPYRIGHT
131 #    4. M4SH-INIT
132 # 1000. BODY
133 m4_define([_m4_divert(DEFAULTS)],        10)
134 m4_define([_m4_divert(PARSE_ARGS)],      20)
136 m4_define([_m4_divert(HELP_BEGIN)],     100)
137 m4_define([_m4_divert(HELP_CANON)],     101)
138 m4_define([_m4_divert(HELP_ENABLE)],    102)
139 m4_define([_m4_divert(HELP_WITH)],      103)
140 m4_define([_m4_divert(HELP_VAR)],       104)
141 m4_define([_m4_divert(HELP_VAR_END)],   105)
142 m4_define([_m4_divert(HELP_END)],       106)
144 m4_define([_m4_divert(VERSION_BEGIN)],  200)
145 m4_define([_m4_divert(VERSION_FSF)],    201)
146 m4_define([_m4_divert(VERSION_USER)],   202)
147 m4_define([_m4_divert(VERSION_END)],    203)
149 m4_define([_m4_divert(INIT_PREPARE)],   300)
153 # AC_DIVERT_PUSH(DIVERSION-NAME)
154 # AC_DIVERT_POP
155 # ------------------------------
156 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
157 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
161 ## ------------------------------------ ##
162 ## Defining/requiring Autoconf macros.  ##
163 ## ------------------------------------ ##
166 # AC_DEFUN(NAME, EXPANSION)
167 # AC_DEFUN_ONCE(NAME, EXPANSION)
168 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
169 # AC_REQUIRE(STRING)
170 # AC_PROVIDE(MACRO-NAME)
171 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
172 # -----------------------------------------------------------
173 m4_copy([m4_defun],       [AC_DEFUN])
174 m4_copy([m4_defun_once],  [AC_DEFUN_ONCE])
175 m4_copy([m4_before],      [AC_BEFORE])
176 m4_copy([m4_require],     [AC_REQUIRE])
177 m4_copy([m4_provide],     [AC_PROVIDE])
178 m4_copy([m4_provide_if],  [AC_PROVIDE_IFELSE])
181 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
182 # ------------------------------------------
183 m4_define([AC_OBSOLETE],
184 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
188 ## ----------------------------- ##
189 ## Implementing Autoconf loops.  ##
190 ## ----------------------------- ##
193 # AC_FOREACH(VARIABLE, LIST, EXPRESSION)
194 # --------------------------------------
196 # Compute EXPRESSION assigning to VARIABLE each value of the LIST.
197 # LIST is a /bin/sh list, i.e., it has the form ` item_1 item_2
198 # ... item_n ': white spaces are separators, and leading and trailing
199 # spaces are meaningless.
201 # This macro is robust to active symbols:
202 #    AC_FOREACH([Var], [ active
203 #    b  act\
204 #    ive  ], [-Var-])end
205 #    => -active--b--active-end
206 m4_define([AC_FOREACH],
207 [m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
212 ## ----------------------------------- ##
213 ## Helping macros to display strings.  ##
214 ## ----------------------------------- ##
217 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
218 # --------------------------------------
219 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
223 ## ---------------------------------------------- ##
224 ## Information on the package being Autoconf'ed.  ##
225 ## ---------------------------------------------- ##
228 # It is suggested that the macros in this section appear before
229 # AC_INIT in `configure.ac'.  Nevertheless, this is just stylistic,
230 # and from the implementation point of, AC_INIT *must* be expanded
231 # beforehand: it puts data in diversions which must appear before the
232 # data provided by the macros of this section.
234 # The solution is to require AC_INIT in each of these macros.  AC_INIT
235 # has the needed magic so that it can't be expanded twice.
239 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME])
240 # --------------------------------------------------------------
241 m4_define([_AC_INIT_PACKAGE],
242 [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])])
243 AS_LITERAL_IF([$2], [],  [m4_warn([syntax], [AC_INIT: not a literal: $2])])
244 AS_LITERAL_IF([$3], [],  [m4_warn([syntax], [AC_INIT: not a literal: $3])])
245 m4_ifndef([AC_PACKAGE_NAME],
246           [m4_define([AC_PACKAGE_NAME],     [$1])])
247 m4_ifndef([AC_PACKAGE_TARNAME],
248           [m4_define([AC_PACKAGE_TARNAME],
249                      m4_default([$4],
250                                 [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]],
251                                                                      [GNU ])),
252                                  [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
253                                  [-])]))])
254 m4_ifndef([AC_PACKAGE_VERSION],
255           [m4_define([AC_PACKAGE_VERSION],   [$2])])
256 m4_ifndef([AC_PACKAGE_STRING],
257           [m4_define([AC_PACKAGE_STRING],    [$1 $2])])
258 m4_ifndef([AC_PACKAGE_BUGREPORT],
259           [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
263 # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
264 # ------------------------------------------------------
265 # Append Copyright information in the top of `configure'.  TEXT is
266 # evaluated once, hence TEXT can use macros.  Note that we do not
267 # prepend `# ' but `@%:@ ', since m4 does not evaluate the comments.
268 # Had we used `# ', the Copyright sent in the beginning of `configure'
269 # would have not been evaluated.  Another solution, a bit fragile,
270 # would have be to use m4_quote to force an evaluation:
272 #     m4_bpatsubst(m4_quote($1), [^], [# ])
273 m4_define([AC_COPYRIGHT],
274 [m4_divert_text([HEADER-COPYRIGHT],
275 [m4_bpatsubst([
276 $1], [^], [@%:@ ])])dnl
277 m4_divert_text(m4_default([$2], [VERSION_USER]),
279 $1])dnl
280 ])# AC_COPYRIGHT
283 # AC_REVISION(REVISION-INFO)
284 # --------------------------
285 # The second quote in the translit is just to cope with font-lock-mode
286 # which sees the opening of a string.
287 m4_define([AC_REVISION],
288 [m4_divert_text([HEADER-REVISION],
289                 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
295 ## ---------------------------------------- ##
296 ## Requirements over the Autoconf version.  ##
297 ## ---------------------------------------- ##
300 # AU::AC_PREREQ(VERSION)
301 # ----------------------
302 # Update this `AC_PREREQ' statement to require the current version of
303 # Autoconf.  But fail if ever this autoupdate is too old.
305 # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
306 # calling `AU_DEFUN', i.e., it is hard coded.  Otherwise it would be
307 # quite complex for autoupdate to import the value of
308 # `m4_PACKAGE_VERSION'.  We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
309 # this would replace all its occurrences with the current version of
310 # Autoconf, which is certainly not what the user intended.
311 AU_DEFUN([AC_PREREQ],
312 [m4_version_prereq([$1])[]dnl
313 [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]])
316 # AC_PREREQ(VERSION)
317 # ------------------
318 # Complain and exit if the Autoconf version is less than VERSION.
319 m4_copy([m4_version_prereq], [AC_PREREQ])
326 ## ---------------- ##
327 ## Initialization.  ##
328 ## ---------------- ##
331 # All the following macros are used by AC_INIT.  Ideally, they should
332 # be presented in the order in which they are output.  Please, help us
333 # sorting it, or at least, don't augment the entropy.
336 # _AC_INIT_NOTICE
337 # ---------------
338 m4_define([_AC_INIT_NOTICE],
339 [m4_divert_text([HEADER-COMMENT],
340 [@%:@ Guess values for system-dependent variables and create Makefiles.
341 @%:@ Generated by m4_PACKAGE_STRING[]dnl
342 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
344 m4_ifset([AC_PACKAGE_BUGREPORT],
345          [m4_divert_text([HEADER-COMMENT],
346                          [@%:@
347 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
351 # _AC_INIT_COPYRIGHT
352 # ------------------
353 # We dump to VERSION_FSF to make sure we are inserted before the
354 # user copyrights, and after the setup of the --version handling.
355 m4_define([_AC_INIT_COPYRIGHT],
356 [AC_COPYRIGHT(
357 [Copyright (C) 2003 Free Software Foundation, Inc.
358 This configure script is free software; the Free Software Foundation
359 gives unlimited permission to copy, distribute and modify it.],
360               [VERSION_FSF])dnl
364 # File Descriptors
365 # ----------------
366 # Set up the file descriptors used by `configure'.
367 # File descriptor usage:
368 # 0 standard input
369 # 1 file creation
370 # 2 errors and warnings
371 # AS_MESSAGE_LOG_FD compiler messages saved in config.log
372 # AS_MESSAGE_FD checking for... messages and results
374 m4_define([AS_MESSAGE_FD], 6)
375 # That's how they used to be named.
376 AU_ALIAS([AC_FD_CC],  [AS_MESSAGE_LOG_FD])
377 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
380 # _AC_INIT_DEFAULTS
381 # -----------------
382 # Values which defaults can be set from `configure.ac'.
383 # `/bin/machine' is used in `glibcbug'.  The others are used in config.*
384 m4_define([_AC_INIT_DEFAULTS],
385 [m4_divert_push([DEFAULTS])dnl
387 # Name of the host.
388 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
389 # so uname gets run too.
390 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
392 exec AS_MESSAGE_FD>&1
395 # Initializations.
397 ac_default_prefix=/usr/local
398 ac_config_libobj_dir=.
399 cross_compiling=no
400 subdirs=
401 MFLAGS=
402 MAKEFLAGS=
403 AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl
404 AC_SUBST([PATH_SEPARATOR])dnl
406 # Maximum number of lines to put in a shell here document.
407 # This variable seems obsolete.  It should probably be removed, and
408 # only ac_max_sed_lines should be used.
409 : ${ac_max_here_lines=38}
411 # Identity of this package.
412 AC_SUBST([PACKAGE_NAME],
413          [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])dnl
414 AC_SUBST([PACKAGE_TARNAME],
415          [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])dnl
416 AC_SUBST([PACKAGE_VERSION],
417          [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])dnl
418 AC_SUBST([PACKAGE_STRING],
419          [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])dnl
420 AC_SUBST([PACKAGE_BUGREPORT],
421          [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
423 m4_divert_pop([DEFAULTS])dnl
424 m4_wrap([m4_divert_text([DEFAULTS],
425 [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS],  [m4_defn([_AC_SUBST_VARS])])'
426 ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'])])dnl
427 ])# _AC_INIT_DEFAULTS
430 # AC_PREFIX_DEFAULT(PREFIX)
431 # -------------------------
432 AC_DEFUN([AC_PREFIX_DEFAULT],
433 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
436 # AC_PREFIX_PROGRAM(PROGRAM)
437 # --------------------------
438 # Guess the value for the `prefix' variable by looking for
439 # the argument program along PATH and taking its parent.
440 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
441 # set `prefix' to /usr/local/gnu.
442 # This comes too late to find a site file based on the prefix,
443 # and it might use a cached value for the path.
444 # No big loss, I think, since most configures don't use this macro anyway.
445 AC_DEFUN([AC_PREFIX_PROGRAM],
446 [if test "x$prefix" = xNONE; then
447 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
448   _AS_ECHO_N([checking for prefix by ])
449   AC_PATH_PROG(ac_prefix_program, [$1])
450   if test -n "$ac_prefix_program"; then
451     prefix=`AS_DIRNAME(["$ac_prefix_program"])`
452     prefix=`AS_DIRNAME(["$prefix"])`
453   fi
455 ])# AC_PREFIX_PROGRAM
458 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
459 # ---------------------------------------------
460 # UNIQUE-FILE-IN-SOURCE-DIR is a filename unique to this package,
461 # relative to the directory that configure is in, which we can look
462 # for to find out if srcdir is correct.
463 AC_DEFUN([AC_CONFIG_SRCDIR],
464 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
467 # _AC_INIT_SRCDIR
468 # ---------------
469 # Compute `srcdir' based on `$ac_unique_file'.
470 m4_define([_AC_INIT_SRCDIR],
471 [m4_divert_push([PARSE_ARGS])dnl
473 # Find the source files, if location was not specified.
474 if test -z "$srcdir"; then
475   ac_srcdir_defaulted=yes
476   # Try the directory containing this script, then its parent.
477   ac_confdir=`AS_DIRNAME(["$[0]"])`
478   srcdir=$ac_confdir
479   if test ! -r $srcdir/$ac_unique_file; then
480     srcdir=..
481   fi
482 else
483   ac_srcdir_defaulted=no
485 if test ! -r $srcdir/$ac_unique_file; then
486   if test "$ac_srcdir_defaulted" = yes; then
487     AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $ac_confdir or ..])
488   else
489     AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
490   fi
492 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
493   AC_MSG_ERROR([sources are in $srcdir, but `cd $srcdir' does not work])
494 dnl Double slashes in pathnames in object file debugging info
495 dnl mess up M-x gdb in Emacs.
496 srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`
497 m4_divert_pop([PARSE_ARGS])dnl
498 ])# _AC_INIT_SRCDIR
501 # _AC_INIT_PARSE_ARGS
502 # -------------------
503 m4_define([_AC_INIT_PARSE_ARGS],
504 [m4_divert_push([PARSE_ARGS])dnl
506 # Initialize some variables set by options.
507 ac_init_help=
508 ac_init_version=false
509 # The variables have the same names as the options, with
510 # dashes changed to underlines.
511 cache_file=/dev/null
512 AC_SUBST(exec_prefix, NONE)dnl
513 no_create=
514 no_recursion=
515 AC_SUBST(prefix, NONE)dnl
516 program_prefix=NONE
517 program_suffix=NONE
518 AC_SUBST(program_transform_name, [s,x,x,])dnl
519 silent=
520 site=
521 srcdir=
522 verbose=
523 x_includes=NONE
524 x_libraries=NONE
526 # Installation directory options.
527 # These are left unexpanded so users can "make install exec_prefix=/foo"
528 # and all the variables that are supposed to be based on exec_prefix
529 # by default will actually change.
530 # Use braces instead of parens because sh, perl, etc. also accept them.
531 AC_SUBST([bindir],         ['${exec_prefix}/bin'])dnl
532 AC_SUBST([sbindir],        ['${exec_prefix}/sbin'])dnl
533 AC_SUBST([libexecdir],     ['${exec_prefix}/libexec'])dnl
534 AC_SUBST([datadir],        ['${prefix}/share'])dnl
535 AC_SUBST([sysconfdir],     ['${prefix}/etc'])dnl
536 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
537 AC_SUBST([localstatedir],  ['${prefix}/var'])dnl
538 AC_SUBST([libdir],         ['${exec_prefix}/lib'])dnl
539 AC_SUBST([includedir],     ['${prefix}/include'])dnl
540 AC_SUBST([oldincludedir],  ['/usr/include'])dnl
541 AC_SUBST([infodir],        ['${prefix}/info'])dnl
542 AC_SUBST([mandir],         ['${prefix}/man'])dnl
544 ac_prev=
545 for ac_option
547   # If the previous option needs an argument, assign it.
548   if test -n "$ac_prev"; then
549     eval "$ac_prev=\$ac_option"
550     ac_prev=
551     continue
552   fi
554   ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
556   # Accept the important Cygnus configure options, so we can diagnose typos.
558   case $ac_option in
560   -bindir | --bindir | --bindi | --bind | --bin | --bi)
561     ac_prev=bindir ;;
562   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
563     bindir=$ac_optarg ;;
565   -build | --build | --buil | --bui | --bu)
566     ac_prev=build_alias ;;
567   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
568     build_alias=$ac_optarg ;;
570   -cache-file | --cache-file | --cache-fil | --cache-fi \
571   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
572     ac_prev=cache_file ;;
573   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
574   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
575     cache_file=$ac_optarg ;;
577   --config-cache | -C)
578     cache_file=config.cache ;;
580   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
581     ac_prev=datadir ;;
582   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
583   | --da=*)
584     datadir=$ac_optarg ;;
586   -disable-* | --disable-*)
587     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
588     # Reject names that are not valid shell variable names.
589     expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
590       AC_MSG_ERROR([invalid feature name: $ac_feature])
591     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
592     eval "enable_$ac_feature=no" ;;
594   -enable-* | --enable-*)
595     ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
596     # Reject names that are not valid shell variable names.
597     expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
598       AC_MSG_ERROR([invalid feature name: $ac_feature])
599     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
600     case $ac_option in
601       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
602       *) ac_optarg=yes ;;
603     esac
604     eval "enable_$ac_feature='$ac_optarg'" ;;
606   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
607   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
608   | --exec | --exe | --ex)
609     ac_prev=exec_prefix ;;
610   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
611   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
612   | --exec=* | --exe=* | --ex=*)
613     exec_prefix=$ac_optarg ;;
615   -gas | --gas | --ga | --g)
616     # Obsolete; use --with-gas.
617     with_gas=yes ;;
619   -help | --help | --hel | --he | -h)
620     ac_init_help=long ;;
621   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
622     ac_init_help=recursive ;;
623   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
624     ac_init_help=short ;;
626   -host | --host | --hos | --ho)
627     ac_prev=host_alias ;;
628   -host=* | --host=* | --hos=* | --ho=*)
629     host_alias=$ac_optarg ;;
631   -includedir | --includedir | --includedi | --included | --include \
632   | --includ | --inclu | --incl | --inc)
633     ac_prev=includedir ;;
634   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
635   | --includ=* | --inclu=* | --incl=* | --inc=*)
636     includedir=$ac_optarg ;;
638   -infodir | --infodir | --infodi | --infod | --info | --inf)
639     ac_prev=infodir ;;
640   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
641     infodir=$ac_optarg ;;
643   -libdir | --libdir | --libdi | --libd)
644     ac_prev=libdir ;;
645   -libdir=* | --libdir=* | --libdi=* | --libd=*)
646     libdir=$ac_optarg ;;
648   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
649   | --libexe | --libex | --libe)
650     ac_prev=libexecdir ;;
651   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
652   | --libexe=* | --libex=* | --libe=*)
653     libexecdir=$ac_optarg ;;
655   -localstatedir | --localstatedir | --localstatedi | --localstated \
656   | --localstate | --localstat | --localsta | --localst \
657   | --locals | --local | --loca | --loc | --lo)
658     ac_prev=localstatedir ;;
659   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
660   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
661   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
662     localstatedir=$ac_optarg ;;
664   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
665     ac_prev=mandir ;;
666   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
667     mandir=$ac_optarg ;;
669   -nfp | --nfp | --nf)
670     # Obsolete; use --without-fp.
671     with_fp=no ;;
673   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
674   | --no-cr | --no-c | -n)
675     no_create=yes ;;
677   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
678   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
679     no_recursion=yes ;;
681   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
682   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
683   | --oldin | --oldi | --old | --ol | --o)
684     ac_prev=oldincludedir ;;
685   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
686   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
687   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
688     oldincludedir=$ac_optarg ;;
690   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
691     ac_prev=prefix ;;
692   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
693     prefix=$ac_optarg ;;
695   -program-prefix | --program-prefix | --program-prefi | --program-pref \
696   | --program-pre | --program-pr | --program-p)
697     ac_prev=program_prefix ;;
698   -program-prefix=* | --program-prefix=* | --program-prefi=* \
699   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
700     program_prefix=$ac_optarg ;;
702   -program-suffix | --program-suffix | --program-suffi | --program-suff \
703   | --program-suf | --program-su | --program-s)
704     ac_prev=program_suffix ;;
705   -program-suffix=* | --program-suffix=* | --program-suffi=* \
706   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
707     program_suffix=$ac_optarg ;;
709   -program-transform-name | --program-transform-name \
710   | --program-transform-nam | --program-transform-na \
711   | --program-transform-n | --program-transform- \
712   | --program-transform | --program-transfor \
713   | --program-transfo | --program-transf \
714   | --program-trans | --program-tran \
715   | --progr-tra | --program-tr | --program-t)
716     ac_prev=program_transform_name ;;
717   -program-transform-name=* | --program-transform-name=* \
718   | --program-transform-nam=* | --program-transform-na=* \
719   | --program-transform-n=* | --program-transform-=* \
720   | --program-transform=* | --program-transfor=* \
721   | --program-transfo=* | --program-transf=* \
722   | --program-trans=* | --program-tran=* \
723   | --progr-tra=* | --program-tr=* | --program-t=*)
724     program_transform_name=$ac_optarg ;;
726   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
727   | -silent | --silent | --silen | --sile | --sil)
728     silent=yes ;;
730   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
731     ac_prev=sbindir ;;
732   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
733   | --sbi=* | --sb=*)
734     sbindir=$ac_optarg ;;
736   -sharedstatedir | --sharedstatedir | --sharedstatedi \
737   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
738   | --sharedst | --shareds | --shared | --share | --shar \
739   | --sha | --sh)
740     ac_prev=sharedstatedir ;;
741   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
742   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
743   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
744   | --sha=* | --sh=*)
745     sharedstatedir=$ac_optarg ;;
747   -site | --site | --sit)
748     ac_prev=site ;;
749   -site=* | --site=* | --sit=*)
750     site=$ac_optarg ;;
752   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
753     ac_prev=srcdir ;;
754   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
755     srcdir=$ac_optarg ;;
757   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
758   | --syscon | --sysco | --sysc | --sys | --sy)
759     ac_prev=sysconfdir ;;
760   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
761   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
762     sysconfdir=$ac_optarg ;;
764   -target | --target | --targe | --targ | --tar | --ta | --t)
765     ac_prev=target_alias ;;
766   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
767     target_alias=$ac_optarg ;;
769   -v | -verbose | --verbose | --verbos | --verbo | --verb)
770     verbose=yes ;;
772   -version | --version | --versio | --versi | --vers | -V)
773     ac_init_version=: ;;
775   -with-* | --with-*)
776     ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
777     # Reject names that are not valid shell variable names.
778     expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
779       AC_MSG_ERROR([invalid package name: $ac_package])
780     ac_package=`echo $ac_package| sed 's/-/_/g'`
781     case $ac_option in
782       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
783       *) ac_optarg=yes ;;
784     esac
785     eval "with_$ac_package='$ac_optarg'" ;;
787   -without-* | --without-*)
788     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
789     # Reject names that are not valid shell variable names.
790     expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
791       AC_MSG_ERROR([invalid package name: $ac_package])
792     ac_package=`echo $ac_package | sed 's/-/_/g'`
793     eval "with_$ac_package=no" ;;
795   --x)
796     # Obsolete; use --with-x.
797     with_x=yes ;;
799   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
800   | --x-incl | --x-inc | --x-in | --x-i)
801     ac_prev=x_includes ;;
802   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
803   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
804     x_includes=$ac_optarg ;;
806   -x-libraries | --x-libraries | --x-librarie | --x-librari \
807   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
808     ac_prev=x_libraries ;;
809   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
810   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
811     x_libraries=$ac_optarg ;;
813   -*) AC_MSG_ERROR([unrecognized option: $ac_option
814 Try `$[0] --help' for more information.])
815     ;;
817   *=*)
818     ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
819     # Reject names that are not valid shell variable names.
820     expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
821       AC_MSG_ERROR([invalid variable name: $ac_envvar])
822     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
823     eval "$ac_envvar='$ac_optarg'"
824     export $ac_envvar ;;
826   *)
827     # FIXME: should be removed in autoconf 3.0.
828     AC_MSG_WARN([you should use --build, --host, --target])
829     expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
830       AC_MSG_WARN([invalid host type: $ac_option])
831     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
832     ;;
834   esac
835 done
837 if test -n "$ac_prev"; then
838   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
839   AC_MSG_ERROR([missing argument to $ac_option])
842 # Be sure to have absolute paths.
843 for ac_var in exec_prefix prefix
845   eval ac_val=$`echo $ac_var`
846   case $ac_val in
847     [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
848     *)  AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
849   esac
850 done
852 # Be sure to have absolute paths.
853 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
854               localstatedir libdir includedir oldincludedir infodir mandir
856   eval ac_val=$`echo $ac_var`
857   case $ac_val in
858     [[\\/$]]* | ?:[[\\/]]* ) ;;
859     *)  AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);;
860   esac
861 done
863 # There might be people who depend on the old broken behavior: `$host'
864 # used to hold the argument of --host etc.
865 # FIXME: To remove some day.
866 build=$build_alias
867 host=$host_alias
868 target=$target_alias
870 # FIXME: To remove some day.
871 if test "x$host_alias" != x; then
872   if test "x$build_alias" = x; then
873     cross_compiling=maybe
874     AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
875     If a cross compiler is detected then cross compile mode will be used.])
876   elif test "x$build_alias" != "x$host_alias"; then
877     cross_compiling=yes
878   fi
881 ac_tool_prefix=
882 test -n "$host_alias" && ac_tool_prefix=$host_alias-
884 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
886 m4_divert_pop([PARSE_ARGS])dnl
887 ])# _AC_INIT_PARSE_ARGS
890 # _AC_INIT_HELP
891 # -------------
892 # Handle the `configure --help' message.
893 m4_define([_AC_INIT_HELP],
894 [m4_divert_push([HELP_BEGIN])dnl
897 # Report the --help message.
899 if test "$ac_init_help" = "long"; then
900   # Omit some internal or obsolete options to make the list less imposing.
901   # This message is too long to be a string in the A/UX 3.1 sh.
902   cat <<_ACEOF
903 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
904                         [AC_PACKAGE_STRING],
905                         [this package]) to adapt to many kinds of systems.
907 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
909 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
910 VAR=VALUE.  See below for descriptions of some of the useful variables.
912 Defaults for the options are specified in brackets.
914 Configuration:
915   -h, --help              display this help and exit
916       --help=short        display options specific to this package
917       --help=recursive    display the short help of all the included packages
918   -V, --version           display version information and exit
919   -q, --quiet, --silent   do not print \`checking...' messages
920       --cache-file=FILE   cache test results in FILE [disabled]
921   -C, --config-cache      alias for \`--cache-file=config.cache'
922   -n, --no-create         do not create output files
923       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
925 _ACEOF
927   cat <<_ACEOF
928 Installation directories:
929   --prefix=PREFIX         install architecture-independent files in PREFIX
930                           [$ac_default_prefix]
931   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
932                           [PREFIX]
934 By default, \`make install' will install all the files in
935 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
936 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
937 for instance \`--prefix=\$HOME'.
939 For better control, use the options below.
941 Fine tuning of the installation directories:
942   --bindir=DIR           user executables [EPREFIX/bin]
943   --sbindir=DIR          system admin executables [EPREFIX/sbin]
944   --libexecdir=DIR       program executables [EPREFIX/libexec]
945   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
946   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
947   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
948   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
949   --libdir=DIR           object code libraries [EPREFIX/lib]
950   --includedir=DIR       C header files [PREFIX/include]
951   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
952   --infodir=DIR          info documentation [PREFIX/info]
953   --mandir=DIR           man documentation [PREFIX/man]
954 _ACEOF
956   cat <<\_ACEOF]
957 m4_divert_pop([HELP_BEGIN])dnl
958 dnl The order of the diversions here is
959 dnl - HELP_BEGIN
960 dnl   which may be extended by extra generic options such as with X or
961 dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
963 dnl - HELP_CANON
964 dnl   Support for cross compilation (--build, --host and --target).
965 dnl   Display only in long --help.
967 dnl - HELP_ENABLE
968 dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
969 dnl   then implements the header of the non generic options.
971 dnl - HELP_WITH
973 dnl - HELP_VAR
975 dnl - HELP_VAR_END
977 dnl - HELP_END
978 dnl   initialized below, in which we dump the trailer (handling of the
979 dnl   recursion for instance).
980 m4_divert_push([HELP_ENABLE])dnl
981 _ACEOF
984 if test -n "$ac_init_help"; then
985 m4_ifset([AC_PACKAGE_STRING],
986 [  case $ac_init_help in
987      short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
988    esac])
989   cat <<\_ACEOF
990 m4_divert_pop([HELP_ENABLE])dnl
991 m4_divert_push([HELP_END])dnl
992 m4_ifset([AC_PACKAGE_BUGREPORT], [
993 Report bugs to <AC_PACKAGE_BUGREPORT>.])
994 _ACEOF
997 if test "$ac_init_help" = "recursive"; then
998   # If there are subdirs, report their specific --help.
999   ac_popdir=`pwd`
1000   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1001     test -d $ac_dir || continue
1002     _AC_SRCPATHS(["$ac_dir"])
1003     cd $ac_dir
1004     # Check for guested configure; otherwise get Cygnus style configure.
1005     if test -f $ac_srcdir/configure.gnu; then
1006       echo
1007       $SHELL $ac_srcdir/configure.gnu  --help=recursive
1008     elif test -f $ac_srcdir/configure; then
1009       echo
1010       $SHELL $ac_srcdir/configure  --help=recursive
1011     elif test -f $ac_srcdir/configure.ac ||
1012            test -f $ac_srcdir/configure.in; then
1013       echo
1014       $ac_configure --help
1015     else
1016       AC_MSG_WARN([no configuration information is in $ac_dir])
1017     fi
1018     cd $ac_popdir
1019   done
1022 test -n "$ac_init_help" && exit 0
1023 m4_divert_pop([HELP_END])dnl
1024 ])# _AC_INIT_HELP
1027 # _AC_INIT_VERSION
1028 # ----------------
1029 # Handle the `configure --version' message.
1030 m4_define([_AC_INIT_VERSION],
1031 [m4_divert_text([VERSION_BEGIN],
1032 [if $ac_init_version; then
1033   cat <<\_ACEOF])dnl
1034 m4_ifset([AC_PACKAGE_STRING],
1035          [m4_divert_text([VERSION_BEGIN],
1036                          [dnl
1037 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
1038 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1039 generated by m4_PACKAGE_STRING])])
1040 m4_divert_text([VERSION_END],
1041 [_ACEOF
1042   exit 0
1043 fi])dnl
1044 ])# _AC_INIT_VERSION
1047 # _AC_INIT_CONFIG_LOG
1048 # -------------------
1049 # Initialize the config.log file descriptor and write header to it.
1050 m4_define([_AC_INIT_CONFIG_LOG],
1051 [m4_divert_text([INIT_PREPARE],
1052 [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
1053 exec AS_MESSAGE_LOG_FD>config.log
1054 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1055 This file contains any messages produced by compilers while
1056 running configure, to aid debugging if configure makes a mistake.
1058 It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1059 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1060 generated by m4_PACKAGE_STRING.  Invocation command line was
1062   $ $[0] $[@]
1064 _ACEOF
1065 AS_UNAME >&AS_MESSAGE_LOG_FD
1067 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1070 m4_text_box([Core tests.])
1072 _ACEOF
1073 ])])# _AC_INIT_CONFIG_LOG
1076 # _AC_INIT_PREPARE
1077 # ----------------
1078 # Called by AC_INIT to build the preamble of the `configure' scripts.
1079 # 1. Trap and clean up various tmp files.
1080 # 2. Set up the fd and output files
1081 # 3. Remember the options given to `configure' for `config.status --recheck'.
1082 # 4. Ensure a correct environment
1083 # 5. Required macros (cache, default AC_SUBST etc.)
1084 m4_define([_AC_INIT_PREPARE],
1085 [m4_divert_push([INIT_PREPARE])dnl
1087 # Keep a trace of the command line.
1088 # Strip out --no-create and --no-recursion so they do not pile up.
1089 # Strip out --silent because we don't want to record it for future runs.
1090 # Also quote any args containing shell meta-characters.
1091 # Make two passes to allow for proper duplicate-argument suppression.
1092 ac_configure_args=
1093 ac_configure_args0=
1094 ac_configure_args1=
1095 ac_sep=
1096 ac_must_keep_next=false
1097 for ac_pass in 1 2
1099   for ac_arg
1100   do
1101     case $ac_arg in
1102     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1103     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1104     | -silent | --silent | --silen | --sile | --sil)
1105       continue ;;
1106 dnl If you change this globbing pattern, test it on an old shell --
1107 dnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
1108   [  *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
1109       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1110     esac
1111     case $ac_pass in
1112     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1113     2)
1114       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1115 dnl If trying to remove duplicates, be sure to (i) keep the *last*
1116 dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
1117 dnl and (ii) not to strip long options (--prefix foo --prefix bar might
1118 dnl give --prefix foo bar).
1119       if test $ac_must_keep_next = true; then
1120         ac_must_keep_next=false # Got value, back to normal.
1121       else
1122         case $ac_arg in
1123 dnl Use broad patterns, as arguments that would have already made configure
1124 dnl exit don't matter.
1125           *=* | --config-cache | -C | -disable-* | --disable-* \
1126           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1127           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1128           | -with-* | --with-* | -without-* | --without-* | --x)
1129             case "$ac_configure_args0 " in
1130               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1131             esac
1132             ;;
1133           -* ) ac_must_keep_next=true ;;
1134         esac
1135       fi
1136       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1137       # Get rid of the leading space.
1138       ac_sep=" "
1139       ;;
1140     esac
1141   done
1142 done
1143 AS_UNSET(ac_configure_args0)
1144 AS_UNSET(ac_configure_args1)
1146 # When interrupted or exit'd, cleanup temporary files, and complete
1147 # config.log.  We remove comments because anyway the quotes in there
1148 # would cause problems or look ugly.
1149 # WARNING: Be sure not to use single quotes in there, as some shells,
1150 # such as our DU 5.0 friend, will then `close' the trap.
1151 trap 'exit_status=$?
1152   # Save into config.log some information that might help in debugging.
1153   {
1154     echo
1156     AS_BOX([Cache variables.])
1157     echo
1158     m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1159                   [^ *\(#.*\)?
1160 ],                [],
1161                   ['], ['"'"'])
1162     echo
1164     AS_BOX([Output variables.])
1165     echo
1166     for ac_var in $ac_subst_vars
1167     do
1168       eval ac_val=$`echo $ac_var`
1169       echo "$ac_var='"'"'$ac_val'"'"'"
1170     done | sort
1171     echo
1173     if test -n "$ac_subst_files"; then
1174       AS_BOX([Output files.])
1175       echo
1176       for ac_var in $ac_subst_files
1177       do
1178         eval ac_val=$`echo $ac_var`
1179         echo "$ac_var='"'"'$ac_val'"'"'"
1180       done | sort
1181       echo
1182     fi
1184     if test -s confdefs.h; then
1185       AS_BOX([confdefs.h.])
1186       echo
1187       sed "/^$/d" confdefs.h | sort
1188       echo
1189     fi
1190     test "$ac_signal" != 0 &&
1191       echo "$as_me: caught signal $ac_signal"
1192     echo "$as_me: exit $exit_status"
1193   } >&AS_MESSAGE_LOG_FD
1194   rm -f core core.* *.core &&
1195   rm -rf conftest* confdefs* conf$[$]* $ac_clean_files &&
1196     exit $exit_status
1197      ' 0
1198 for ac_signal in 1 2 13 15; do
1199   trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
1200 done
1201 ac_signal=0
1203 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1204 rm -rf conftest* confdefs.h
1205 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1206 echo >confdefs.h
1208 # Predefined preprocessor variables.
1209 AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
1210                    [Define to the full name of this package.])
1211 AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
1212                    [Define to the one symbol short name of this package.])
1213 AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
1214                    [Define to the version of this package.])
1215 AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
1216                    [Define to the full name and version of this package.])
1217 AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
1218                    [Define to the address where bug reports for this package
1219                     should be sent.])
1221 # Let the site file select an alternate cache file if it wants to.
1222 AC_SITE_LOAD
1223 AC_CACHE_LOAD
1224 _AC_ARG_VAR_VALIDATE
1225 _AC_ARG_VAR_PRECIOUS([build_alias])dnl
1226 _AC_ARG_VAR_PRECIOUS([host_alias])dnl
1227 _AC_ARG_VAR_PRECIOUS([target_alias])dnl
1228 AC_LANG_PUSH(C)
1230 dnl Substitute for predefined variables.
1231 AC_SUBST([DEFS])dnl
1232 AC_SUBST([ECHO_C])dnl
1233 AC_SUBST([ECHO_N])dnl
1234 AC_SUBST([ECHO_T])dnl
1235 AC_SUBST([LIBS])dnl
1236 m4_divert_pop([INIT_PREPARE])dnl
1237 ])# _AC_INIT_PREPARE
1240 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1241 # ----------------------------------------
1242 # This macro is used only for Autoupdate.
1243 AU_DEFUN([AC_INIT],
1244 [m4_ifval([$2], [[AC_INIT($@)]],
1245           [m4_ifval([$1],
1246 [[AC_INIT]
1247 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1251 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1252 # ----------------------------------------
1253 # Include the user macro files, prepare the diversions, and output the
1254 # preamble of the `configure' script.
1255 # Note that the order is important: first initialize, then set the
1256 # AC_CONFIG_SRCDIR.
1257 m4_define([AC_INIT],
1258 [# Forbidden tokens and exceptions.
1259 m4_pattern_forbid([^_?A[CHUM]_])
1260 m4_pattern_forbid([_AC_])
1261 m4_pattern_forbid([^LIBOBJS$],
1262                   [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
1263 # Actually reserved by M4sh.
1264 m4_pattern_allow([^AS_FLAGS$])
1265 AS_INIT
1266 AS_PREPARE
1267 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1268 _AC_INIT_DEFAULTS
1269 _AC_INIT_PARSE_ARGS
1270 _AC_INIT_SRCDIR
1271 _AC_INIT_HELP
1272 _AC_INIT_VERSION
1273 _AC_INIT_CONFIG_LOG
1274 _AC_INIT_PREPARE
1275 _AC_INIT_NOTICE
1276 _AC_INIT_COPYRIGHT
1277 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1283 ## ----------------------------- ##
1284 ## Selecting optional features.  ##
1285 ## ----------------------------- ##
1288 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1289 # ------------------------------------------------------------------------
1290 AC_DEFUN([AC_ARG_ENABLE],
1291 [m4_divert_once([HELP_ENABLE], [[
1292 Optional Features:
1293   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1294   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])dnl
1295 m4_divert_once([HELP_ENABLE], [$2])dnl
1296 # Check whether --enable-$1 or --disable-$1 was given.
1297 if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then
1298   enableval="[$enable_]m4_bpatsubst([$1], -, _)"
1299   $3
1300 m4_ifvaln([$4], [else
1301   $4])dnl
1302 fi; dnl
1303 ])# AC_ARG_ENABLE
1306 AU_DEFUN([AC_ENABLE],
1307 [AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])])
1310 ## ------------------------------ ##
1311 ## Working with optional software ##
1312 ## ------------------------------ ##
1316 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1317 # --------------------------------------------------------------------
1318 AC_DEFUN([AC_ARG_WITH],
1319 [m4_divert_once([HELP_WITH], [[
1320 Optional Packages:
1321   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1322   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
1323 m4_divert_once([HELP_WITH], [$2])dnl
1324 # Check whether --with-$1 or --without-$1 was given.
1325 if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then
1326   withval="[$with_]m4_bpatsubst([$1], -, _)"
1327   $3
1328 m4_ifvaln([$4], [else
1329   $4])dnl
1330 fi; dnl
1331 ])# AC_ARG_WITH
1333 AU_DEFUN([AC_WITH],
1334 [AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])])
1338 ## ----------------------------------------- ##
1339 ## Remembering variables for reconfiguring.  ##
1340 ## ----------------------------------------- ##
1343 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1344 # -----------------------------
1345 # Declare VARNAME is precious.
1347 # We try to diagnose when precious variables have changed.  To do this,
1348 # make two early snapshots (after the option processing to take
1349 # explicit variables into account) of those variables: one (ac_env_)
1350 # which represents the current run, and a second (ac_cv_env_) which,
1351 # at the first run, will be saved in the cache.  As an exception to
1352 # the cache mechanism, its loading will override these variables (non
1353 # `ac_cv_env_' cache value are only set when unset).
1355 # In subsequent runs, after having loaded the cache, compare
1356 # ac_cv_env_foo against ac_env_foo.  See _AC_ARG_VAR_VALIDATE.
1357 m4_define([_AC_ARG_VAR_PRECIOUS],
1358 [AC_SUBST([$1])dnl
1359 m4_divert_once([PARSE_ARGS],
1360 [ac_env_$1_set=${$1+set}
1361 ac_env_$1_value=$$1
1362 ac_cv_env_$1_set=${$1+set}
1363 ac_cv_env_$1_value=$$1])dnl
1367 # _AC_ARG_VAR_VALIDATE
1368 # --------------------
1369 # The precious variables are saved twice at the beginning of
1370 # configure.  E.g., PRECIOUS is saved as `ac_env_PRECIOUS_SET' and
1371 # `ac_env_PRECIOUS_VALUE' on the one hand and `ac_cv_env_PRECIOUS_SET'
1372 # and `ac_cv_env_PRECIOUS_VALUE' on the other hand.
1374 # Now the cache has just been loaded, so `ac_cv_env_' represents the
1375 # content of the cached values, while `ac_env_' represents that of the
1376 # current values.
1378 # So we check that `ac_env_' and `ac_cv_env_' are consistent.  If
1379 # they aren't, die.
1380 m4_define([_AC_ARG_VAR_VALIDATE],
1381 [# Check that the precious variables saved in the cache have kept the same
1382 # value.
1383 ac_cache_corrupted=false
1384 for ac_var in `(set) 2>&1 |
1385                sed -n 's/^ac_env_\([[a-zA-Z_0-9]]*\)_set=.*/\1/p'`; do
1386   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1387   eval ac_new_set=\$ac_env_${ac_var}_set
1388   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1389   eval ac_new_val="\$ac_env_${ac_var}_value"
1390   case $ac_old_set,$ac_new_set in
1391     set,)
1392       AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
1393       ac_cache_corrupted=: ;;
1394     ,set)
1395       AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
1396       ac_cache_corrupted=: ;;
1397     ,);;
1398     *)
1399       if test "x$ac_old_val" != "x$ac_new_val"; then
1400         AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
1401         AS_MESSAGE([  former value:  $ac_old_val], 2)
1402         AS_MESSAGE([  current value: $ac_new_val], 2)
1403         ac_cache_corrupted=:
1404       fi;;
1405   esac
1406   # Pass precious variables to config.status.
1407   if test "$ac_new_set" = set; then
1408     case $ac_new_val in
1409 dnl If you change this globbing pattern, test it on an old shell --
1410 dnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
1411 [    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
1412       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1413     *) ac_arg=$ac_var=$ac_new_val ;;
1414     esac
1415     case " $ac_configure_args " in
1416       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1417       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1418     esac
1419   fi
1420 done
1421 if $ac_cache_corrupted; then
1422   AS_MESSAGE([error: changes in the environment can compromise the build], 2)
1423   AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
1425 ])# _AC_ARG_VAR_VALIDATE
1428 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1429 # ----------------------------------
1430 # Register VARNAME as a precious variable, and document it in
1431 # `configure --help' (but only once).
1432 AC_DEFUN([AC_ARG_VAR],
1433 [m4_divert_once([HELP_VAR], [[
1434 Some influential environment variables:]])dnl
1435 m4_divert_once([HELP_VAR_END], [[
1436 Use these variables to override the choices made by `configure' or to help
1437 it to find libraries and programs with nonstandard names/locations.]])dnl
1438 m4_expand_once([m4_divert_once([HELP_VAR],
1439                                [AS_HELP_STRING([$1], [$2], [              ])])],
1440                [$0($1)])dnl
1441 _AC_ARG_VAR_PRECIOUS([$1])dnl
1442 ])# AC_ARG_VAR
1448 ## ---------------------------- ##
1449 ## Transforming program names.  ##
1450 ## ---------------------------- ##
1453 # AC_ARG_PROGRAM
1454 # --------------
1455 # This macro is expanded only once, to avoid that `foo' ends up being
1456 # installed as `ggfoo'.
1457 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1458 [dnl Document the options.
1459 m4_divert_push([HELP_BEGIN])dnl
1461 Program names:
1462   --program-prefix=PREFIX            prepend PREFIX to installed program names
1463   --program-suffix=SUFFIX            append SUFFIX to installed program names
1464   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1465 m4_divert_pop([HELP_BEGIN])dnl
1466 test "$program_prefix" != NONE &&
1467   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1468 # Use a double $ so make ignores it.
1469 test "$program_suffix" != NONE &&
1470   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1471 # Double any \ or $.  echo might interpret backslashes.
1472 # By default was `s,x,x', remove it if useless.
1473 cat <<\_ACEOF >conftest.sed
1474 [s/[\\$]/&&/g;s/;s,x,x,$//]
1475 _ACEOF
1476 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1477 rm conftest.sed
1478 ])# AC_ARG_PROGRAM
1484 ## ------------------------- ##
1485 ## Finding auxiliary files.  ##
1486 ## ------------------------- ##
1489 # AC_CONFIG_AUX_DIR(DIR)
1490 # ----------------------
1491 # Find install-sh, config.sub, config.guess, and Cygnus configure
1492 # in directory DIR.  These are auxiliary files used in configuration.
1493 # DIR can be either absolute or relative to $srcdir.
1494 AC_DEFUN([AC_CONFIG_AUX_DIR],
1495 [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
1498 # AC_CONFIG_AUX_DIR_DEFAULT
1499 # -------------------------
1500 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1501 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1502 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1503 [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
1506 # AC_CONFIG_AUX_DIRS(DIR ...)
1507 # ---------------------------
1508 # Internal subroutine.
1509 # Search for the configuration auxiliary files in directory list $1.
1510 # We look only for install-sh, so users of AC_PROG_INSTALL
1511 # do not automatically need to distribute the other auxiliary files.
1512 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1513 [ac_aux_dir=
1514 for ac_dir in $1; do
1515   if test -f $ac_dir/install-sh; then
1516     ac_aux_dir=$ac_dir
1517     ac_install_sh="$ac_aux_dir/install-sh -c"
1518     break
1519   elif test -f $ac_dir/install.sh; then
1520     ac_aux_dir=$ac_dir
1521     ac_install_sh="$ac_aux_dir/install.sh -c"
1522     break
1523   elif test -f $ac_dir/shtool; then
1524     ac_aux_dir=$ac_dir
1525     ac_install_sh="$ac_aux_dir/shtool install -c"
1526     break
1527   fi
1528 done
1529 if test -z "$ac_aux_dir"; then
1530   AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1532 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1533 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1534 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1535 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1536 ])# AC_CONFIG_AUX_DIRS
1541 ## ------------------------ ##
1542 ## Finding aclocal macros.  ##
1543 ## ------------------------ ##
1546 # AC_CONFIG_MACRO_DIR(DIR)
1547 # ------------------------
1548 # Declare directory containing additional macros for aclocal.
1549 # DIR can be either absolute or relative to $srcdir.
1550 AC_DEFUN([AC_CONFIG_MACRO_DIR],
1551 [case $1 in
1552   [[\\/]]* | ?:[[\\/]]* ) ac_macro_dir=$1         ;;
1553   *)                      ac_macro_dir=$srcdir/$1 ;;
1554 esac
1555 if test -d "$ac_macro_dir"; then :
1556 else
1557   AC_MSG_ERROR([cannot find macro directory `$1'])
1559 ])# AC_CONFIG_MACRO_DIR
1564 ## ----------------------------------- ##
1565 ## Getting the canonical system type.  ##
1566 ## ----------------------------------- ##
1568 # The inputs are:
1569 #    configure --host=HOST --target=TARGET --build=BUILD
1571 # The rules are:
1572 # 1. Build defaults to the current platform, as determined by config.guess.
1573 # 2. Host defaults to build.
1574 # 3. Target defaults to host.
1577 # _AC_CANONICAL_SPLIT(THING)
1578 # --------------------------
1579 # Generate the variables THING, THING_{alias cpu vendor os}.
1580 m4_define([_AC_CANONICAL_SPLIT],
1581 [AC_SUBST([$1],       [$ac_cv_$1])dnl
1582 dnl FIXME: AC_SUBST([$1_alias],  [$ac_cv_$1_alias])dnl
1583 AC_SUBST([$1_cpu],
1584          [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])dnl
1585 AC_SUBST([$1_vendor],
1586          [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])dnl
1587 AC_SUBST([$1_os],
1588          [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])dnl
1589 ])# _AC_CANONICAL_SPLIT
1592 # AC_CANONICAL_BUILD
1593 # ------------------
1594 AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
1595 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1596 m4_divert_text([HELP_CANON],
1598 System types:
1599   --build=BUILD     configure for building on BUILD [guessed]]])dnl
1600 # Make sure we can run config.sub.
1601 $ac_config_sub sun4 >/dev/null 2>&1 ||
1602   AC_MSG_ERROR([cannot run $ac_config_sub])
1604 AC_CACHE_CHECK([build system type], [ac_cv_build],
1605 [ac_cv_build_alias=$build_alias
1606 test -z "$ac_cv_build_alias" &&
1607   ac_cv_build_alias=`$ac_config_guess`
1608 test -z "$ac_cv_build_alias" &&
1609   AC_MSG_ERROR([cannot guess build type; you must specify one])
1610 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1611   AC_MSG_ERROR([$ac_config_sub $ac_cv_build_alias failed])
1613 _AC_CANONICAL_SPLIT(build)
1614 ])# AC_CANONICAL_BUILD
1617 # AC_CANONICAL_HOST
1618 # -----------------
1619 AC_DEFUN_ONCE([AC_CANONICAL_HOST],
1620 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1621 m4_divert_text([HELP_CANON],
1622 [[  --host=HOST       cross-compile to build programs to run on HOST [BUILD]]])dnl
1623 AC_CACHE_CHECK([host system type], [ac_cv_host],
1624 [ac_cv_host_alias=$host_alias
1625 test -z "$ac_cv_host_alias" &&
1626   ac_cv_host_alias=$ac_cv_build_alias
1627 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1628   AC_MSG_ERROR([$ac_config_sub $ac_cv_host_alias failed])
1630 _AC_CANONICAL_SPLIT([host])
1631 ])# AC_CANONICAL_HOST
1634 # AC_CANONICAL_TARGET
1635 # -------------------
1636 AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
1637 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1638 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1639 m4_divert_text([HELP_CANON],
1640 [[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
1641 AC_CACHE_CHECK([target system type], [ac_cv_target],
1642 [dnl Set target_alias.
1643 ac_cv_target_alias=$target_alias
1644 test "x$ac_cv_target_alias" = "x" &&
1645   ac_cv_target_alias=$ac_cv_host_alias
1646 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1647   AC_MSG_ERROR([$ac_config_sub $ac_cv_target_alias failed])
1649 _AC_CANONICAL_SPLIT([target])
1651 # The aliases save the names the user supplied, while $host etc.
1652 # will get canonicalized.
1653 test -n "$target_alias" &&
1654   test "$program_prefix$program_suffix$program_transform_name" = \
1655     NONENONEs,x,x, &&
1656   program_prefix=${target_alias}-[]dnl
1657 ])# AC_CANONICAL_TARGET
1660 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1663 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1664 # ------------------------------------------
1665 # If the cache file is inconsistent with the current host,
1666 # target and build system types, execute CMD or print a default
1667 # error message.  Now handled via _AC_ARG_VAR_PRECIOUS.
1668 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1671 ## ---------------------- ##
1672 ## Caching test results.  ##
1673 ## ---------------------- ##
1676 # AC_SITE_LOAD
1677 # ------------
1678 # Look for site or system specific initialization scripts.
1679 m4_define([AC_SITE_LOAD],
1680 [# Prefer explicitly selected file to automatically selected ones.
1681 if test -z "$CONFIG_SITE"; then
1682   if test "x$prefix" != xNONE; then
1683     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1684   else
1685     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1686   fi
1688 for ac_site_file in $CONFIG_SITE; do
1689   if test -r "$ac_site_file"; then
1690     AC_MSG_NOTICE([loading site script $ac_site_file])
1691     sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
1692     . "$ac_site_file"
1693   fi
1694 done
1698 # AC_CACHE_LOAD
1699 # -------------
1700 m4_define([AC_CACHE_LOAD],
1701 [if test -r "$cache_file"; then
1702   # Some versions of bash will fail to source /dev/null (special
1703   # files actually), so we avoid doing that.
1704   if test -f "$cache_file"; then
1705     AC_MSG_NOTICE([loading cache $cache_file])
1706     case $cache_file in
1707       [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
1708       *)                      . ./$cache_file;;
1709     esac
1710   fi
1711 else
1712   AC_MSG_NOTICE([creating cache $cache_file])
1713   >$cache_file
1715 ])# AC_CACHE_LOAD
1718 # _AC_CACHE_DUMP
1719 # --------------
1720 # Dump the cache to stdout.  It can be in a pipe (this is a requirement).
1721 m4_define([_AC_CACHE_DUMP],
1722 [# The following way of writing the cache mishandles newlines in values,
1723 # but we know of no workaround that is simple, portable, and efficient.
1724 # So, don't put newlines in cache variables' values.
1725 # Ultrix sh set writes to stderr and can't be redirected directly,
1726 # and sets the high bit in the cache file unless we assign to the vars.
1728   (set) 2>&1 |
1729     case `(ac_space=' '; set | grep ac_space) 2>&1` in
1730     *ac_space=\ *)
1731       # `set' does not quote correctly, so add quotes (double-quote
1732       # substitution turns \\\\ into \\, and sed turns \\ into \).
1733       sed -n \
1734         ["s/'/'\\\\''/g;
1735           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1736       ;;
1737     *)
1738       # `set' quotes correctly as required by POSIX, so do not add quotes.
1739       sed -n \
1740         ["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
1741       ;;
1742     esac;
1743 }dnl
1744 ])# _AC_CACHE_DUMP
1747 # AC_CACHE_SAVE
1748 # -------------
1749 # Save the cache.
1750 # Allow a site initialization script to override cache values.
1751 m4_define([AC_CACHE_SAVE],
1752 [cat >confcache <<\_ACEOF
1753 # This file is a shell script that caches the results of configure
1754 # tests run on this system so they can be shared between configure
1755 # scripts and configure runs, see configure's option --config-cache.
1756 # It is not useful on other systems.  If it contains results you don't
1757 # want to keep, you may remove or edit it.
1759 # config.status only pays attention to the cache file if you give it
1760 # the --recheck option to rerun configure.
1762 # `ac_cv_env_foo' variables (set or unset) will be overridden when
1763 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1764 # following values.
1766 _ACEOF
1768 _AC_CACHE_DUMP() |
1769   sed ['
1770      t clear
1771      : clear
1772      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1773      t end
1774      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1775      : end'] >>confcache
1776 if diff $cache_file confcache >/dev/null 2>&1; then :; else
1777   if test -w $cache_file; then
1778     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
1779     cat confcache >$cache_file
1780   else
1781     echo "not updating unwritable cache $cache_file"
1782   fi
1784 rm -f confcache[]dnl
1785 ])# AC_CACHE_SAVE
1788 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1789 # ------------------------------------------
1790 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
1791 # Should be dnl'ed.  Try to catch common mistakes.
1792 m4_defun([AC_CACHE_VAL],
1793 [m4_bmatch([$2], [AC_DEFINE],
1794            [AC_DIAGNOSE(syntax,
1795 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
1796 [where no actions should be taken])])dnl
1797 AS_VAR_SET_IF([$1],
1798               [_AS_ECHO_N([(cached) ])],
1799               [$2])])
1802 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
1803 # -------------------------------------------
1804 # Do not call this macro with a dnl right behind.
1805 m4_defun([AC_CACHE_CHECK],
1806 [AC_MSG_CHECKING([$1])
1807 AC_CACHE_VAL([$2], [$3])dnl
1808 AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])
1812 ## ---------------------- ##
1813 ## Defining CPP symbols.  ##
1814 ## ---------------------- ##
1817 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
1818 # -------------------------------------------
1819 # This macro is useless, it is used only with --trace to collect the
1820 # list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED.
1821 m4_define([AC_DEFINE_TRACE_LITERAL])
1824 # AC_DEFINE_TRACE(CPP-SYMBOL)
1825 # ---------------------------
1826 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
1827 # out non literal symbols.
1828 m4_define([AC_DEFINE_TRACE],
1829 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
1832 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
1833 # -------------------------------------------
1834 # Set VARIABLE to VALUE, verbatim, or 1.  Remember the value
1835 # and if VARIABLE is affected the same VALUE, do nothing, else
1836 # die.  The third argument is used by autoheader.
1837 m4_define([AC_DEFINE],
1838 [AC_DEFINE_TRACE([$1])dnl
1839 m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
1840 cat >>confdefs.h <<\_ACEOF
1841 [@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
1842 _ACEOF
1846 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
1847 # ----------------------------------------------------
1848 # Similar, but perform shell substitutions $ ` \ once on VALUE.
1849 m4_define([AC_DEFINE_UNQUOTED],
1850 [AC_DEFINE_TRACE([$1])dnl
1851 m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
1852 cat >>confdefs.h <<_ACEOF
1853 [@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
1854 _ACEOF
1859 ## -------------------------- ##
1860 ## Setting output variables.  ##
1861 ## -------------------------- ##
1864 # AC_SUBST(VARIABLE, [VALUE])
1865 # ---------------------------
1866 # Create an output variable from a shell VARIABLE.  If VALUE is given
1867 # assign it to VARIABLE.  Use `""' is you want to set VARIABLE to an
1868 # empty value, not an empty second argument.
1870 # Beware that if you change this macro, you also have to change the
1871 # sed script at the top of _AC_OUTPUT_FILES.
1872 m4_define([AC_SUBST],
1873 [m4_ifvaln([$2], [$1=$2])[]dnl
1874 m4_append_uniq([_AC_SUBST_VARS], [$1], [ ])dnl
1875 ])# AC_SUBST
1878 # AC_SUBST_FILE(VARIABLE)
1879 # -----------------------
1880 # Read the comments of the preceding macro.
1881 m4_define([AC_SUBST_FILE],
1882 [m4_append_uniq([_AC_SUBST_FILES], [$1], [ ])])
1886 ## --------------------------------------- ##
1887 ## Printing messages at autoconf runtime.  ##
1888 ## --------------------------------------- ##
1890 # In fact, I think we should promote the use of m4_warn and m4_fatal
1891 # directly.  This will also avoid to some people to get it wrong
1892 # between AC_FATAL and AC_MSG_ERROR.
1895 # AC_DIAGNOSE(CATEGORY, MESSAGE)
1896 # AC_FATAL(MESSAGE, [EXIT-STATUS])
1897 # --------------------------------
1898 m4_define([AC_DIAGNOSE], [m4_warn($@)])
1899 m4_define([AC_FATAL],    [m4_fatal($@)])
1902 # AC_WARNING(MESSAGE)
1903 # -------------------
1904 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
1905 # specified.
1906 m4_define([AC_WARNING],
1907 [AC_DIAGNOSE([syntax], [$1])])
1912 ## ---------------------------------------- ##
1913 ## Printing messages at configure runtime.  ##
1914 ## ---------------------------------------- ##
1917 # AC_MSG_CHECKING(FEATURE)
1918 # ------------------------
1919 m4_define([AC_MSG_CHECKING],
1920 [_AS_ECHO([$as_me:$LINENO: checking $1], AS_MESSAGE_LOG_FD)
1921 _AS_ECHO_N([checking $1... ])[]dnl
1925 # AC_MSG_RESULT(RESULT)
1926 # ---------------------
1927 m4_define([AC_MSG_RESULT],
1928 [_AS_ECHO([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
1929 _AS_ECHO([${ECHO_T}$1])[]dnl
1933 # AC_MSG_RESULT_UNQUOTED(RESULT)
1934 # ------------------------------
1935 # Likewise, but perform $ ` \ shell substitutions.
1936 m4_define([AC_MSG_RESULT_UNQUOTED],
1937 [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)
1938 _AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
1942 # AC_MSG_WARN(PROBLEM)
1943 # AC_MSG_NOTICE(STRING)
1944 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
1945 # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
1946 # ----------------------------------------
1947 m4_copy([AS_WARN],    [AC_MSG_WARN])
1948 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
1949 m4_copy([AS_ERROR],   [AC_MSG_ERROR])
1950 m4_define([AC_MSG_FAILURE],
1951 [AC_MSG_ERROR([$1
1952 See `config.log' for more details.], [$2])])
1955 # _AC_MSG_LOG_CONFTEST
1956 # --------------------
1957 m4_define([_AC_MSG_LOG_CONFTEST],
1958 [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
1959 sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
1963 # AU::AC_CHECKING(FEATURE)
1964 # ------------------------
1965 AU_DEFUN([AC_CHECKING],
1966 [AS_MESSAGE([checking $1...])])
1969 # AU::AC_VERBOSE(STRING)
1970 # ----------------------
1971 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
1978 ## ---------------------------- ##
1979 ## Compiler-running mechanics.  ##
1980 ## ---------------------------- ##
1983 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
1984 # ----------------------------------
1985 # Eval COMMAND, save the exit status in ac_status, and log it.
1986 AC_DEFUN([_AC_RUN_LOG],
1987 [{ ($2) >&AS_MESSAGE_LOG_FD
1988   ($1) 2>&AS_MESSAGE_LOG_FD
1989   ac_status=$?
1990   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1991   (exit $ac_status); }])
1994 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
1995 # -----------------------------------------
1996 # Eval COMMAND, save its stderr into conftest.err, save the exit status
1997 # in ac_status, and log it.
1998 # Note that when tracing, most shells will leave the traces in stderr
1999 AC_DEFUN([_AC_RUN_LOG_STDERR],
2000 [{ ($2) >&AS_MESSAGE_LOG_FD
2001   ($1) 2>conftest.er1
2002   ac_status=$?
2003   grep -v '^ *+' conftest.er1 >conftest.err
2004   rm -f conftest.er1
2005   cat conftest.err >&AS_MESSAGE_LOG_FD
2006   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2007   (exit $ac_status); }])
2010 # _AC_EVAL(COMMAND)
2011 # -----------------
2012 # Eval COMMAND, save the exit status in ac_status, and log it.
2013 AC_DEFUN([_AC_EVAL],
2014 [_AC_RUN_LOG([eval $1],
2015              [eval echo "$as_me:$LINENO: \"$1\""])])
2018 # _AC_EVAL_STDERR(COMMAND)
2019 # ------------------------
2020 # Eval COMMAND, save its stderr into conftest.err, save the exit status
2021 # in ac_status, and log it.
2022 # Note that when tracing, most shells will leave the traces in stderr
2023 AC_DEFUN([_AC_EVAL_STDERR],
2024 [_AC_RUN_LOG_STDERR([eval $1],
2025                     [eval echo "$as_me:$LINENO: \"$1\""])])
2028 # AC_TRY_EVAL(VARIABLE)
2029 # ---------------------
2030 # The purpose of this macro is to "configure:123: command line"
2031 # written into config.log for every test run.
2032 AC_DEFUN([AC_TRY_EVAL],
2033 [_AC_EVAL([$$1])])
2036 # AC_TRY_COMMAND(COMMAND)
2037 # -----------------------
2038 AC_DEFUN([AC_TRY_COMMAND],
2039 [{ ac_try='$1'
2040   _AC_EVAL([$ac_try]); }])
2043 # AC_RUN_LOG(COMMAND)
2044 # -------------------
2045 AC_DEFUN([AC_RUN_LOG],
2046 [_AC_RUN_LOG([$1],
2047              [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])])
2052 ## ------------------------ ##
2053 ## Examining declarations.  ##
2054 ## ------------------------ ##
2058 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2059 # ----------------------------------------------------------------
2060 # Try to preprocess PROGRAM.
2062 # This macro can be used during the selection of a preprocessor.
2063 # Run cpp and set ac_cpp_err to "yes" for an error, to
2064 # "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
2065 # neither warnings nor errors have been detected.  eval is necessary
2066 # to expand ac_cpp.
2067 AC_DEFUN([_AC_PREPROC_IFELSE],
2068 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2069 if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then
2070   if test -s conftest.err; then
2071     ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
2072   else
2073     ac_cpp_err=
2074   fi
2075 else
2076   ac_cpp_err=yes
2078 if test -z "$ac_cpp_err"; then
2079   m4_default([$2], :)
2080 else
2081   _AC_MSG_LOG_CONFTEST
2082   $3
2084 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2085 ])# _AC_PREPROC_IFELSE
2088 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2089 # ---------------------------------------------------------------
2090 # Try to preprocess PROGRAM.  Requires that the preprocessor for the
2091 # current language was checked for, hence do not use this macro in macros
2092 # looking for a preprocessor.
2093 AC_DEFUN([AC_PREPROC_IFELSE],
2094 [AC_LANG_PREPROC_REQUIRE()dnl
2095 _AC_PREPROC_IFELSE($@)])
2098 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2099 # ---------------------------------------------------------
2100 # AC_TRY_CPP is used to check whether particular header files exist.
2101 # (But it actually tests whether INCLUDES produces no CPP errors.)
2103 # INCLUDES are not defaulted and are double quoted.
2104 AU_DEFUN([AC_TRY_CPP],
2105 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2108 # AC_EGREP_CPP(PATTERN, PROGRAM,
2109 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2110 # ------------------------------------------------------
2111 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2112 # come early, it is not included in AC_BEFORE checks.
2113 AC_DEFUN([AC_EGREP_CPP],
2114 [AC_LANG_PREPROC_REQUIRE()dnl
2115 AC_REQUIRE([AC_PROG_EGREP])dnl
2116 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2117 dnl eval is necessary to expand ac_cpp.
2118 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2119 if (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2120 dnl Quote $1 to prevent m4 from eating character classes
2121   $EGREP "[$1]" >/dev/null 2>&1; then
2122   m4_default([$3], :)
2123 m4_ifvaln([$4], [else
2124   $4])dnl
2126 rm -f conftest*
2127 ])# AC_EGREP_CPP
2130 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2131 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2132 # ---------------------------------------------------------
2133 AC_DEFUN([AC_EGREP_HEADER],
2134 [AC_EGREP_CPP([$1],
2135 [#include <$2>
2136 ], [$3], [$4])])
2141 ## ------------------ ##
2142 ## Examining syntax.  ##
2143 ## ------------------ ##
2146 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2147 # ---------------------------------------------------------------------
2148 # Try to compile PROGRAM.
2149 # This macro can be used during the selection of a compiler.
2150 m4_define([_AC_COMPILE_IFELSE],
2151 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2152 rm -f conftest.$ac_objext
2153 AS_IF([AC_TRY_EVAL(ac_compile) &&
2154          AC_TRY_COMMAND([test -s conftest.$ac_objext])],
2155       [$2],
2156       [_AC_MSG_LOG_CONFTEST
2157 m4_ifvaln([$3],[$3])dnl])dnl
2158 rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2159 ])# _AC_COMPILE_IFELSE
2162 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2163 # --------------------------------------------------------------------
2164 # Try to compile PROGRAM.  Requires that the compiler for the current
2165 # language was checked for, hence do not use this macro in macros looking
2166 # for a compiler.
2167 AC_DEFUN([AC_COMPILE_IFELSE],
2168 [AC_LANG_COMPILER_REQUIRE()dnl
2169 _AC_COMPILE_IFELSE($@)])
2172 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2173 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2174 # --------------------------------------------------------
2175 AU_DEFUN([AC_TRY_COMPILE],
2176 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2180 ## --------------------- ##
2181 ## Examining libraries.  ##
2182 ## --------------------- ##
2185 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2186 # ------------------------------------------------------------------
2187 # Try to link PROGRAM.
2188 # This macro can be used during the selection of a compiler.
2189 m4_define([_AC_LINK_IFELSE],
2190 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2191 rm -f conftest.$ac_objext conftest$ac_exeext
2192 AS_IF([AC_TRY_EVAL(ac_link) &&
2193          AC_TRY_COMMAND([test -s conftest$ac_exeext])],
2194       [$2],
2195       [_AC_MSG_LOG_CONFTEST
2196 m4_ifvaln([$3], [$3])dnl])[]dnl
2197 rm -f conftest.$ac_objext conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2198 ])# _AC_LINK_IFELSE
2201 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2202 # -----------------------------------------------------------------
2203 # Try to link PROGRAM.  Requires that the compiler for the current
2204 # language was checked for, hence do not use this macro in macros looking
2205 # for a compiler.
2206 AC_DEFUN([AC_LINK_IFELSE],
2207 [AC_LANG_COMPILER_REQUIRE()dnl
2208 _AC_LINK_IFELSE($@)])
2211 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2212 #             [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2213 # -----------------------------------------------------
2214 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2215 AU_DEFUN([AC_TRY_LINK],
2216 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2219 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2220 #                  ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
2221 # --------------------------------------------------------
2222 AU_DEFUN([AC_COMPILE_CHECK],
2223 [m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl
2224 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
2230 ## -------------------------------- ##
2231 ## Checking for run-time features.  ##
2232 ## -------------------------------- ##
2235 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2236 # ------------------------------------------------------------
2237 # Compile, link, and run.
2238 # This macro can be used during the selection of a compiler.
2239 # We also remove conftest.o as if the compilation fails, some compilers
2240 # don't remove it.  We remove gmon.out and bb.out, which may be
2241 # created during the run if the program is built with profiling support.
2242 m4_define([_AC_RUN_IFELSE],
2243 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2244 rm -f conftest$ac_exeext
2245 AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
2246       [$2],
2247       [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
2248 _AC_MSG_LOG_CONFTEST
2249 m4_ifvaln([$3],
2250           [( exit $ac_status )
2251 $3])dnl])[]dnl
2252 rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2253                                                      [conftest.$ac_ext])[]dnl
2254 ])# _AC_RUN_IFELSE
2257 # AC_RUN_IFELSE(PROGRAM,
2258 #               [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2259 #               [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2260 # ----------------------------------------------------------
2261 # Compile, link, and run. Requires that the compiler for the current
2262 # language was checked for, hence do not use this macro in macros looking
2263 # for a compiler.
2264 AC_DEFUN([AC_RUN_IFELSE],
2265 [AC_LANG_COMPILER_REQUIRE()dnl
2266 m4_ifval([$4], [],
2267          [AC_DIAGNOSE([cross],
2268                      [$0 called without default to allow cross compiling])])dnl
2269 if test "$cross_compiling" = yes; then
2270   m4_default([$4],
2271            [AC_MSG_FAILURE([cannot run test program while cross compiling])])
2272 else
2273   _AC_RUN_IFELSE($@)
2274 fi])
2277 # AC_TRY_RUN(PROGRAM,
2278 #            [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2279 #            [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2280 # --------------------------------------------------------
2281 AU_DEFUN([AC_TRY_RUN],
2282 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2286 ## ------------------------------------- ##
2287 ## Checking for the existence of files.  ##
2288 ## ------------------------------------- ##
2290 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2291 # -------------------------------------------------------------
2293 # Check for the existence of FILE.
2294 AC_DEFUN([AC_CHECK_FILE],
2295 [AC_DIAGNOSE([cross],
2296              [cannot check for file existence when cross compiling])dnl
2297 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2298 AC_CACHE_CHECK([for $1], ac_File,
2299 [test "$cross_compiling" = yes &&
2300   AC_MSG_ERROR([cannot check for file existence when cross compiling])
2301 if test -r "$1"; then
2302   AS_VAR_SET(ac_File, yes)
2303 else
2304   AS_VAR_SET(ac_File, no)
2305 fi])
2306 AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
2307 AS_VAR_POPDEF([ac_File])dnl
2308 ])# AC_CHECK_FILE
2311 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2312 # -----------------------------------------------------------------
2313 AC_DEFUN([AC_CHECK_FILES],
2314 [AC_FOREACH([AC_FILE_NAME], [$1],
2315   [AC_CHECK_FILE(AC_FILE_NAME,
2316                  [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2317                                     [Define to 1 if you have the
2318                                      file `]AC_File['.])
2319 $2],
2320                  [$3])])])
2323 ## ------------------------------- ##
2324 ## Checking for declared symbols.  ##
2325 ## ------------------------------- ##
2328 # AC_CHECK_DECL(SYMBOL,
2329 #               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2330 #               [INCLUDES = DEFAULT-INCLUDES])
2331 # -------------------------------------------------------
2332 # Check if SYMBOL (a variable or a function) is declared.
2333 AC_DEFUN([AC_CHECK_DECL],
2334 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2335 AC_CACHE_CHECK([whether $1 is declared], ac_Symbol,
2336 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2337 [#ifndef $1
2338   char *p = (char *) $1;
2339 #endif
2340 ])],
2341                    [AS_VAR_SET(ac_Symbol, yes)],
2342                    [AS_VAR_SET(ac_Symbol, no)])])
2343 AS_IF([test AS_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl
2344 AS_VAR_POPDEF([ac_Symbol])dnl
2345 ])# AC_CHECK_DECL
2348 # AC_CHECK_DECLS(SYMBOLS,
2349 #                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2350 #                [INCLUDES = DEFAULT-INCLUDES])
2351 # --------------------------------------------------------
2352 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
2353 # documentation for a detailed explanation of this difference with
2354 # other AC_CHECK_*S macros.  SYMBOLS is an m4 list.
2355 AC_DEFUN([AC_CHECK_DECLS],
2356 [m4_foreach([AC_Symbol], [$1],
2357   [AC_CHECK_DECL(AC_Symbol,
2358                  [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2359                                      [Define to 1 if you have the declaration
2360                                      of `]AC_Symbol[', and to 0 if you don't.])
2361 $2],
2362                  [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2363 $3],
2364                  [$4])])
2365 ])# AC_CHECK_DECLS
2369 ## ---------------------------------- ##
2370 ## Replacement of library functions.  ##
2371 ## ---------------------------------- ##
2374 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2375 # -----------------------------
2376 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2377 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2378 [m4_bmatch([$1], [^]m4_defn([m4_cr_symbols2]),
2379            [AC_WARNING([invalid replacement directory: $1])])dnl
2380 m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])[]dnl
2384 # AC_LIBSOURCE(FILENAME)
2385 # ----------------------
2386 # Announce we might need the file `FILENAME'.
2387 m4_define([AC_LIBSOURCE], [])
2390 # AC_LIBSOURCES([FILENAME1, ...])
2391 # -------------------------------
2392 # Announce we might need these files.
2393 m4_define([AC_LIBSOURCES],
2394 [m4_foreach([_AC_FILENAME], [$1],
2395             [AC_LIBSOURCE(_AC_FILENAME)])])
2398 # _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
2399 # -------------------------------------------
2400 # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
2401 # We don't use AC_SUBST/2 because it forces an unnecessary eol.
2402 m4_define([_AC_LIBOBJ],
2403 [AS_LITERAL_IF([$1],
2404                [AC_LIBSOURCE([$1.c])],
2405                [$2])dnl
2406 AC_SUBST([LIB@&t@OBJS])dnl
2407 LIB@&t@OBJS="$LIB@&t@OBJS $1.$ac_objext"])
2411 # AC_LIBOBJ(FILENAME-NOEXT)
2412 # -------------------------
2413 # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
2414 # We don't use AC_SUBST/2 because it forces an unnecessary eol.
2415 m4_define([AC_LIBOBJ],
2416 [_AC_LIBOBJ([$1],
2417             [AC_DIAGNOSE(syntax,
2418                          [$0($1): you should use literals])])dnl
2422 # _AC_LIBOBJS_NORMALIZE
2423 # ---------------------
2424 # Clean up LIBOBJS abd LTLIBOBJS so that they work with 1. ac_objext,
2425 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2426 # Used with AC_CONFIG_COMMANDS_PRE.
2427 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2428 [ac_libobjs=
2429 ac_ltlibobjs=
2430 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2431   # 1. Remove the extension, and $U if already installed.
2432   ac_i=`echo "$ac_i" |
2433          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
2434   # 2. Add them.
2435   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
2436   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
2437 done
2438 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2439 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2443 ## ----------------------------------- ##
2444 ## Checking compiler characteristics.  ##
2445 ## ----------------------------------- ##
2448 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
2449 # ---------------------------------------------------------------------
2450 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2451 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2452 m4_define([_AC_COMPUTE_INT_COMPILE],
2453 [# Depending upon the size, compute the lo and hi bounds.
2454 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2455  [ac_lo=0 ac_mid=0
2456   while :; do
2457     AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2458                    [ac_hi=$ac_mid; break],
2459                    [ac_lo=`expr $ac_mid + 1`
2460                     if test $ac_lo -le $ac_mid; then
2461                       ac_lo= ac_hi=
2462                       break
2463                     fi
2464                     ac_mid=`expr 2 '*' $ac_mid + 1`])
2465   done],
2466 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2467  [ac_hi=-1 ac_mid=-1
2468   while :; do
2469     AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2470                       [ac_lo=$ac_mid; break],
2471                       [ac_hi=`expr '(' $ac_mid ')' - 1`
2472                        if test $ac_mid -le $ac_hi; then
2473                          ac_lo= ac_hi=
2474                          break
2475                        fi
2476                        ac_mid=`expr 2 '*' $ac_mid`])
2477   done],
2478  [ac_lo= ac_hi=])])
2479 # Binary search between lo and hi bounds.
2480 while test "x$ac_lo" != "x$ac_hi"; do
2481   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2482   AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2483                      [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2484 done
2485 case $ac_lo in
2486 ?*) $2=$ac_lo;;
2487 '') $4 ;;
2488 esac[]dnl
2489 ])# _AC_COMPUTE_INT_COMPILE
2492 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
2493 # -----------------------------------------------------------------
2494 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2495 m4_define([_AC_COMPUTE_INT_RUN],
2496 [AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2497                [$2=`cat conftest.val`], [$4])])
2500 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
2501 # ---------------------------------------------------------
2502 m4_define([_AC_COMPUTE_INT],
2503 [if test "$cross_compiling" = yes; then
2504   _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3], [$4])
2505 else
2506   _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
2508 rm -f conftest.val[]dnl
2509 ])# _AC_COMPUTE_INT