]> git.saurik.com Git - wxWidgets.git/blob - build/autoconf_prepend-include/autoconf/general.m4
copy wxAutohacks into main tree
[wxWidgets.git] / build / autoconf_prepend-include / autoconf / general.m4
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.
5
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.
10 #
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.
15 #
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.
20
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.
28 #
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.
36 #
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.
47 #
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.
51
52
53 ## ---------------- ##
54 ## The diversions. ##
55 ## ---------------- ##
56
57
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.
61 #
62 # KILL is only used to suppress output.
63 #
64 # The layers of `configure'. We let m4 undivert them by itself, when
65 # it reaches the end of `configure.ac'.
66 #
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.
77 #
78 # - DEFAULTS
79 # early initializations (defaults)
80 # - PARSE_ARGS
81 # initialization code, option handling loop.
82 #
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.
97 #
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.
106 #
107 # - INIT_PREPARE
108 # Tail of initialization code.
109 #
110 # - BODY
111 # the tests and output code
112 #
113
114
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'!
121 #
122 # From M4sugar:
123 # -1. KILL
124 # 10000. GROW
125 #
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)
135
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)
143
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)
148
149 m4_define([_m4_divert(INIT_PREPARE)], 300)
150
151
152
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])
158
159
160
161 ## ------------------------------------ ##
162 ## Defining/requiring Autoconf macros. ##
163 ## ------------------------------------ ##
164
165
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])
179
180
181 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
182 # ------------------------------------------
183 m4_define([AC_OBSOLETE],
184 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
185
186
187
188 ## ----------------------------- ##
189 ## Implementing Autoconf loops. ##
190 ## ----------------------------- ##
191
192
193 # AC_FOREACH(VARIABLE, LIST, EXPRESSION)
194 # --------------------------------------
195 #
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.
200 #
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])])
208
209
210
211
212 ## ----------------------------------- ##
213 ## Helping macros to display strings. ##
214 ## ----------------------------------- ##
215
216
217 # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
218 # --------------------------------------
219 AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
220
221
222
223 ## ---------------------------------------------- ##
224 ## Information on the package being Autoconf'ed. ##
225 ## ---------------------------------------------- ##
226
227
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.
233
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.
236
237
238
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])])
260 ])
261
262
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:
271 #
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]),
278 [
279 $1])dnl
280 ])# AC_COPYRIGHT
281
282
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
290 ])
291
292
293
294
295 ## ---------------------------------------- ##
296 ## Requirements over the Autoconf version. ##
297 ## ---------------------------------------- ##
298
299
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.
304 #
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])[[)]])
314
315
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])
320
321
322
323
324
325
326 ## ---------------- ##
327 ## Initialization. ##
328 ## ---------------- ##
329
330
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.
334
335
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]).])
343
344 m4_ifset([AC_PACKAGE_BUGREPORT],
345 [m4_divert_text([HEADER-COMMENT],
346 [@%:@
347 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
348 ])
349
350
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
361 ])
362
363
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
373
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])
378
379
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
386
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`
391
392 exec AS_MESSAGE_FD>&1
393
394 #
395 # Initializations.
396 #
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
405
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}
410
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
422
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
428
429
430 # AC_PREFIX_DEFAULT(PREFIX)
431 # -------------------------
432 AC_DEFUN([AC_PREFIX_DEFAULT],
433 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
434
435
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
454 fi
455 ])# AC_PREFIX_PROGRAM
456
457
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"])])
465
466
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
472
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
484 fi
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
491 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
499
500
501 # _AC_INIT_PARSE_ARGS
502 # -------------------
503 m4_define([_AC_INIT_PARSE_ARGS],
504 [m4_divert_push([PARSE_ARGS])dnl
505
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
525
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
543
544 ac_prev=
545 for ac_option
546 do
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
553
554 ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
555
556 # Accept the important Cygnus configure options, so we can diagnose typos.
557
558 case $ac_option in
559
560 -bindir | --bindir | --bindi | --bind | --bin | --bi)
561 ac_prev=bindir ;;
562 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
563 bindir=$ac_optarg ;;
564
565 -build | --build | --buil | --bui | --bu)
566 ac_prev=build_alias ;;
567 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
568 build_alias=$ac_optarg ;;
569
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 ;;
576
577 --config-cache | -C)
578 cache_file=config.cache ;;
579
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 ;;
585
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" ;;
593
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'" ;;
605
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 ;;
614
615 -gas | --gas | --ga | --g)
616 # Obsolete; use --with-gas.
617 with_gas=yes ;;
618
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 ;;
625
626 -host | --host | --hos | --ho)
627 ac_prev=host_alias ;;
628 -host=* | --host=* | --hos=* | --ho=*)
629 host_alias=$ac_optarg ;;
630
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 ;;
637
638 -infodir | --infodir | --infodi | --infod | --info | --inf)
639 ac_prev=infodir ;;
640 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
641 infodir=$ac_optarg ;;
642
643 -libdir | --libdir | --libdi | --libd)
644 ac_prev=libdir ;;
645 -libdir=* | --libdir=* | --libdi=* | --libd=*)
646 libdir=$ac_optarg ;;
647
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 ;;
654
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 ;;
663
664 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
665 ac_prev=mandir ;;
666 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
667 mandir=$ac_optarg ;;
668
669 -nfp | --nfp | --nf)
670 # Obsolete; use --without-fp.
671 with_fp=no ;;
672
673 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
674 | --no-cr | --no-c | -n)
675 no_create=yes ;;
676
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 ;;
680
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 ;;
689
690 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
691 ac_prev=prefix ;;
692 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
693 prefix=$ac_optarg ;;
694
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 ;;
701
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 ;;
708
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 ;;
725
726 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
727 | -silent | --silent | --silen | --sile | --sil)
728 silent=yes ;;
729
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 ;;
735
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 ;;
746
747 -site | --site | --sit)
748 ac_prev=site ;;
749 -site=* | --site=* | --sit=*)
750 site=$ac_optarg ;;
751
752 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
753 ac_prev=srcdir ;;
754 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
755 srcdir=$ac_optarg ;;
756
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 ;;
763
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 ;;
768
769 -v | -verbose | --verbose | --verbos | --verbo | --verb)
770 verbose=yes ;;
771
772 -version | --version | --versio | --versi | --vers | -V)
773 ac_init_version=: ;;
774
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'" ;;
786
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" ;;
794
795 --x)
796 # Obsolete; use --with-x.
797 with_x=yes ;;
798
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 ;;
805
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 ;;
812
813 -*) AC_MSG_ERROR([unrecognized option: $ac_option
814 Try `$[0] --help' for more information.])
815 ;;
816
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 ;;
825
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 ;;
833
834 esac
835 done
836
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])
840 fi
841
842 # Be sure to have absolute paths.
843 for ac_var in exec_prefix prefix
844 do
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
851
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
855 do
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
862
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
869
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
879 fi
880
881 ac_tool_prefix=
882 test -n "$host_alias" && ac_tool_prefix=$host_alias-
883
884 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
885
886 m4_divert_pop([PARSE_ARGS])dnl
887 ])# _AC_INIT_PARSE_ARGS
888
889
890 # _AC_INIT_HELP
891 # -------------
892 # Handle the `configure --help' message.
893 m4_define([_AC_INIT_HELP],
894 [m4_divert_push([HELP_BEGIN])dnl
895
896 #
897 # Report the --help message.
898 #
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.
906
907 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
908
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.
911
912 Defaults for the options are specified in brackets.
913
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 \`..']
924
925 _ACEOF
926
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]
933
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'.
938
939 For better control, use the options below.
940
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
955
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.
962 dnl
963 dnl - HELP_CANON
964 dnl Support for cross compilation (--build, --host and --target).
965 dnl Display only in long --help.
966 dnl
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.
970 dnl
971 dnl - HELP_WITH
972 dnl
973 dnl - HELP_VAR
974 dnl
975 dnl - HELP_VAR_END
976 dnl
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
982 fi
983
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
995 fi
996
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
1020 fi
1021
1022 test -n "$ac_init_help" && exit 0
1023 m4_divert_pop([HELP_END])dnl
1024 ])# _AC_INIT_HELP
1025
1026
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
1045
1046
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.
1057
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
1061
1062 $ $[0] $[@]
1063
1064 _ACEOF
1065 AS_UNAME >&AS_MESSAGE_LOG_FD
1066
1067 cat >&AS_MESSAGE_LOG_FD <<_ACEOF
1068
1069
1070 m4_text_box([Core tests.])
1071
1072 _ACEOF
1073 ])])# _AC_INIT_CONFIG_LOG
1074
1075
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
1086
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
1098 do
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)
1145
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
1155
1156 AS_BOX([Cache variables.])
1157 echo
1158 m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
1159 [^ *\(#.*\)?
1160 ], [],
1161 ['], ['"'"'])
1162 echo
1163
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
1172
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
1183
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 &&
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
1202
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
1207
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.])
1220
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)
1229
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
1238
1239
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
1248 ])
1249
1250
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
1278 ])
1279
1280
1281
1282
1283 ## ----------------------------- ##
1284 ## Selecting optional features. ##
1285 ## ----------------------------- ##
1286
1287
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
1304
1305
1306 AU_DEFUN([AC_ENABLE],
1307 [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
1308
1309
1310 ## ------------------------------ ##
1311 ## Working with optional software ##
1312 ## ------------------------------ ##
1313
1314
1315
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
1332
1333 AU_DEFUN([AC_WITH],
1334 [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
1335
1336
1337
1338 ## ----------------------------------------- ##
1339 ## Remembering variables for reconfiguring. ##
1340 ## ----------------------------------------- ##
1341
1342
1343 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1344 # -----------------------------
1345 # Declare VARNAME is precious.
1346 #
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).
1354 #
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
1364 ])
1365
1366
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.
1373 #
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.
1377 #
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])
1424 fi
1425 ])# _AC_ARG_VAR_VALIDATE
1426
1427
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
1443
1444
1445
1446
1447
1448 ## ---------------------------- ##
1449 ## Transforming program names. ##
1450 ## ---------------------------- ##
1451
1452
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
1460
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
1479
1480
1481
1482
1483
1484 ## ------------------------- ##
1485 ## Finding auxiliary files. ##
1486 ## ------------------------- ##
1487
1488
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)])
1496
1497
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/../..)])
1504
1505
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])
1531 fi
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
1537
1538
1539
1540
1541 ## ------------------------ ##
1542 ## Finding aclocal macros. ##
1543 ## ------------------------ ##
1544
1545
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'])
1558 fi
1559 ])# AC_CONFIG_MACRO_DIR
1560
1561
1562
1563
1564 ## ----------------------------------- ##
1565 ## Getting the canonical system type. ##
1566 ## ----------------------------------- ##
1567
1568 # The inputs are:
1569 # configure --host=HOST --target=TARGET --build=BUILD
1570 #
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.
1575
1576
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
1590
1591
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],
1597 [[
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])
1603
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])
1612 ])
1613 _AC_CANONICAL_SPLIT(build)
1614 ])# AC_CANONICAL_BUILD
1615
1616
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])
1629 ])
1630 _AC_CANONICAL_SPLIT([host])
1631 ])# AC_CANONICAL_HOST
1632
1633
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])
1648 ])
1649 _AC_CANONICAL_SPLIT([target])
1650
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
1658
1659
1660 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1661
1662
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], [])
1669
1670
1671 ## ---------------------- ##
1672 ## Caching test results. ##
1673 ## ---------------------- ##
1674
1675
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
1687 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
1695 ])
1696
1697
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
1714 fi
1715 ])# AC_CACHE_LOAD
1716
1717
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.
1727 {
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
1745
1746
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.
1758 #
1759 # config.status only pays attention to the cache file if you give it
1760 # the --recheck option to rerun configure.
1761 #
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.
1765
1766 _ACEOF
1767
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
1783 fi
1784 rm -f confcache[]dnl
1785 ])# AC_CACHE_SAVE
1786
1787
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])])
1800
1801
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])])])
1809
1810
1811
1812 ## ---------------------- ##
1813 ## Defining CPP symbols. ##
1814 ## ---------------------- ##
1815
1816
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])
1822
1823
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])])])
1830
1831
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
1843 ])
1844
1845
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
1855 ])
1856
1857
1858
1859 ## -------------------------- ##
1860 ## Setting output variables. ##
1861 ## -------------------------- ##
1862
1863
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.
1869 #
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
1876
1877
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], [ ])])
1883
1884
1885
1886 ## --------------------------------------- ##
1887 ## Printing messages at autoconf runtime. ##
1888 ## --------------------------------------- ##
1889
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.
1893
1894
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($@)])
1900
1901
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])])
1908
1909
1910
1911
1912 ## ---------------------------------------- ##
1913 ## Printing messages at configure runtime. ##
1914 ## ---------------------------------------- ##
1915
1916
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
1922 ])
1923
1924
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
1930 ])
1931
1932
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
1939 ])
1940
1941
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])])
1953
1954
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
1960 ])
1961
1962
1963 # AU::AC_CHECKING(FEATURE)
1964 # ------------------------
1965 AU_DEFUN([AC_CHECKING],
1966 [AS_MESSAGE([checking $1...])])
1967
1968
1969 # AU::AC_VERBOSE(STRING)
1970 # ----------------------
1971 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
1972
1973
1974
1975
1976
1977
1978 ## ---------------------------- ##
1979 ## Compiler-running mechanics. ##
1980 ## ---------------------------- ##
1981
1982
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); }])
1992
1993
1994 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
1995 # -----------------------------------------
1996 # Run COMMAND, save its stderr into conftest.err, save the exit status
1997 # in ac_status, and log it. Don't forget to clean up conftest.err after
1998 # use.
1999 # Note that when tracing, most shells will leave the traces in stderr
2000 # starting with "+": that's what this macro tries to address.
2001 AC_DEFUN([_AC_RUN_LOG_STDERR],
2002 [{ ($2) >&AS_MESSAGE_LOG_FD
2003 ($1) 2>conftest.er1
2004 ac_status=$?
2005 grep -v '^ *+' conftest.er1 >conftest.err
2006 rm -f conftest.er1
2007 cat conftest.err >&AS_MESSAGE_LOG_FD
2008 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2009 (exit $ac_status); }])
2010
2011
2012 # _AC_EVAL(COMMAND)
2013 # -----------------
2014 # Eval COMMAND, save the exit status in ac_status, and log it.
2015 AC_DEFUN([_AC_EVAL],
2016 [_AC_RUN_LOG([eval $1],
2017 [eval echo "$as_me:$LINENO: \"$1\""])])
2018
2019
2020 # _AC_EVAL_STDERR(COMMAND)
2021 # ------------------------
2022 # Same as _AC_RUN_LOG_STDERR, but evals (instead of the running) the
2023 # COMMAND.
2024 AC_DEFUN([_AC_EVAL_STDERR],
2025 [_AC_RUN_LOG_STDERR([eval $1],
2026 [eval echo "$as_me:$LINENO: \"$1\""])])
2027
2028
2029 # AC_TRY_EVAL(VARIABLE)
2030 # ---------------------
2031 # The purpose of this macro is to "configure:123: command line"
2032 # written into config.log for every test run.
2033 AC_DEFUN([AC_TRY_EVAL],
2034 [_AC_EVAL([$$1])])
2035
2036
2037 # AC_TRY_COMMAND(COMMAND)
2038 # -----------------------
2039 AC_DEFUN([AC_TRY_COMMAND],
2040 [{ ac_try='$1'
2041 _AC_EVAL([$ac_try]); }])
2042
2043
2044 # AC_RUN_LOG(COMMAND)
2045 # -------------------
2046 AC_DEFUN([AC_RUN_LOG],
2047 [_AC_RUN_LOG([$1],
2048 [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])])
2049
2050
2051
2052
2053 ## ------------------------ ##
2054 ## Examining declarations. ##
2055 ## ------------------------ ##
2056
2057
2058
2059 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2060 # ----------------------------------------------------------------
2061 # Try to preprocess PROGRAM.
2062 #
2063 # This macro can be used during the selection of a preprocessor.
2064 # Run cpp and set ac_cpp_err to "yes" for an error, to
2065 # "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
2066 # neither warnings nor errors have been detected. eval is necessary
2067 # to expand ac_cpp.
2068 AC_DEFUN([_AC_PREPROC_IFELSE],
2069 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2070 if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then
2071 if test -s conftest.err; then
2072 ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
2073 ac_cpp_err=$ac_cpp_err$ac_[]_AC_LANG_ABBREV[]_werror_flag
2074 else
2075 ac_cpp_err=
2076 fi
2077 else
2078 ac_cpp_err=yes
2079 fi
2080 if test -z "$ac_cpp_err"; then
2081 m4_default([$2], :)
2082 else
2083 _AC_MSG_LOG_CONFTEST
2084 $3
2085 fi
2086 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2087 ])# _AC_PREPROC_IFELSE
2088
2089
2090 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2091 # ---------------------------------------------------------------
2092 # Try to preprocess PROGRAM. Requires that the preprocessor for the
2093 # current language was checked for, hence do not use this macro in macros
2094 # looking for a preprocessor.
2095 AC_DEFUN([AC_PREPROC_IFELSE],
2096 [AC_LANG_PREPROC_REQUIRE()dnl
2097 _AC_PREPROC_IFELSE($@)])
2098
2099
2100 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2101 # ---------------------------------------------------------
2102 # AC_TRY_CPP is used to check whether particular header files exist.
2103 # (But it actually tests whether INCLUDES produces no CPP errors.)
2104 #
2105 # INCLUDES are not defaulted and are double quoted.
2106 AU_DEFUN([AC_TRY_CPP],
2107 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2108
2109
2110 # AC_EGREP_CPP(PATTERN, PROGRAM,
2111 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2112 # ------------------------------------------------------
2113 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2114 # come early, it is not included in AC_BEFORE checks.
2115 AC_DEFUN([AC_EGREP_CPP],
2116 [AC_LANG_PREPROC_REQUIRE()dnl
2117 AC_REQUIRE([AC_PROG_EGREP])dnl
2118 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2119 dnl eval is necessary to expand ac_cpp.
2120 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2121 if (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2122 dnl Quote $1 to prevent m4 from eating character classes
2123 $EGREP "[$1]" >/dev/null 2>&1; then
2124 m4_default([$3], :)
2125 m4_ifvaln([$4], [else
2126 $4])dnl
2127 fi
2128 rm -f conftest*
2129 ])# AC_EGREP_CPP
2130
2131
2132 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2133 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2134 # ---------------------------------------------------------
2135 AC_DEFUN([AC_EGREP_HEADER],
2136 [AC_EGREP_CPP([$1],
2137 [#include <$2>
2138 ], [$3], [$4])])
2139
2140
2141
2142
2143 ## ------------------ ##
2144 ## Examining syntax. ##
2145 ## ------------------ ##
2146
2147
2148 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2149 # ---------------------------------------------------------------------
2150 # Try to compile PROGRAM.
2151 # This macro can be used during the selection of a compiler.
2152 m4_define([_AC_COMPILE_IFELSE],
2153 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2154 rm -f conftest.$ac_objext
2155 AS_IF([_AC_EVAL_STDERR($ac_compile) &&
2156 AC_TRY_COMMAND([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) &&
2157 AC_TRY_COMMAND([test -s conftest.$ac_objext])],
2158 [$2],
2159 [_AC_MSG_LOG_CONFTEST
2160 m4_ifvaln([$3],[$3])dnl])dnl
2161 rm -f conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2162 ])# _AC_COMPILE_IFELSE
2163
2164
2165 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2166 # --------------------------------------------------------------------
2167 # Try to compile PROGRAM. Requires that the compiler for the current
2168 # language was checked for, hence do not use this macro in macros looking
2169 # for a compiler.
2170 AC_DEFUN([AC_COMPILE_IFELSE],
2171 [AC_LANG_COMPILER_REQUIRE()dnl
2172 _AC_COMPILE_IFELSE($@)])
2173
2174
2175 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2176 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2177 # --------------------------------------------------------
2178 AU_DEFUN([AC_TRY_COMPILE],
2179 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2180
2181
2182
2183 ## --------------------- ##
2184 ## Examining libraries. ##
2185 ## --------------------- ##
2186
2187
2188 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2189 # ------------------------------------------------------------------
2190 # Try to link PROGRAM.
2191 # This macro can be used during the selection of a compiler.
2192 m4_define([_AC_LINK_IFELSE],
2193 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2194 rm -f conftest.$ac_objext conftest$ac_exeext
2195 AS_IF([_AC_EVAL_STDERR($ac_link) &&
2196 AC_TRY_COMMAND([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) &&
2197 AC_TRY_COMMAND([test -s conftest$ac_exeext])],
2198 [$2],
2199 [_AC_MSG_LOG_CONFTEST
2200 m4_ifvaln([$3], [$3])dnl])[]dnl
2201 rm -f conftest.err conftest.$ac_objext \
2202 conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2203 ])# _AC_LINK_IFELSE
2204
2205
2206 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2207 # -----------------------------------------------------------------
2208 # Try to link PROGRAM. Requires that the compiler for the current
2209 # language was checked for, hence do not use this macro in macros looking
2210 # for a compiler.
2211 AC_DEFUN([AC_LINK_IFELSE],
2212 [AC_LANG_COMPILER_REQUIRE()dnl
2213 _AC_LINK_IFELSE($@)])
2214
2215
2216 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2217 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2218 # -----------------------------------------------------
2219 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2220 AU_DEFUN([AC_TRY_LINK],
2221 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2222
2223
2224 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2225 # ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
2226 # --------------------------------------------------------
2227 AU_DEFUN([AC_COMPILE_CHECK],
2228 [m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl
2229 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
2230 ])
2231
2232
2233
2234
2235 ## -------------------------------- ##
2236 ## Checking for run-time features. ##
2237 ## -------------------------------- ##
2238
2239
2240 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2241 # ------------------------------------------------------------
2242 # Compile, link, and run.
2243 # This macro can be used during the selection of a compiler.
2244 # We also remove conftest.o as if the compilation fails, some compilers
2245 # don't remove it. We remove gmon.out and bb.out, which may be
2246 # created during the run if the program is built with profiling support.
2247 m4_define([_AC_RUN_IFELSE],
2248 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2249 rm -f conftest$ac_exeext
2250 AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
2251 [$2],
2252 [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
2253 _AC_MSG_LOG_CONFTEST
2254 m4_ifvaln([$3],
2255 [( exit $ac_status )
2256 $3])dnl])[]dnl
2257 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1],
2258 [conftest.$ac_ext])[]dnl
2259 ])# _AC_RUN_IFELSE
2260
2261
2262 # AC_RUN_IFELSE(PROGRAM,
2263 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2264 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2265 # ----------------------------------------------------------
2266 # Compile, link, and run. Requires that the compiler for the current
2267 # language was checked for, hence do not use this macro in macros looking
2268 # for a compiler.
2269 AC_DEFUN([AC_RUN_IFELSE],
2270 [AC_LANG_COMPILER_REQUIRE()dnl
2271 m4_ifval([$4], [],
2272 [AC_DIAGNOSE([cross],
2273 [$0 called without default to allow cross compiling])])dnl
2274 if test "$cross_compiling" = yes; then
2275 m4_default([$4],
2276 [AC_MSG_ERROR([internal error: not reached in cross-compile])])
2277 else
2278 _AC_RUN_IFELSE($@)
2279 fi])
2280
2281
2282 # AC_TRY_RUN(PROGRAM,
2283 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2284 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2285 # --------------------------------------------------------
2286 AU_DEFUN([AC_TRY_RUN],
2287 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2288
2289
2290
2291 ## ------------------------------------- ##
2292 ## Checking for the existence of files. ##
2293 ## ------------------------------------- ##
2294
2295 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2296 # -------------------------------------------------------------
2297 #
2298 # Check for the existence of FILE.
2299 AC_DEFUN([AC_CHECK_FILE],
2300 [AC_DIAGNOSE([cross],
2301 [cannot check for file existence when cross compiling])dnl
2302 AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2303 AC_CACHE_CHECK([for $1], ac_File,
2304 [test "$cross_compiling" = yes &&
2305 AC_MSG_ERROR([cannot check for file existence when cross compiling])
2306 if test -r "$1"; then
2307 AS_VAR_SET(ac_File, yes)
2308 else
2309 AS_VAR_SET(ac_File, no)
2310 fi])
2311 AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
2312 AS_VAR_POPDEF([ac_File])dnl
2313 ])# AC_CHECK_FILE
2314
2315
2316 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2317 # -----------------------------------------------------------------
2318 AC_DEFUN([AC_CHECK_FILES],
2319 [AC_FOREACH([AC_FILE_NAME], [$1],
2320 [AC_CHECK_FILE(AC_FILE_NAME,
2321 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2322 [Define to 1 if you have the
2323 file `]AC_File['.])
2324 $2],
2325 [$3])])])
2326
2327
2328 ## ------------------------------- ##
2329 ## Checking for declared symbols. ##
2330 ## ------------------------------- ##
2331
2332
2333 # AC_CHECK_DECL(SYMBOL,
2334 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2335 # [INCLUDES = DEFAULT-INCLUDES])
2336 # -------------------------------------------------------
2337 # Check if SYMBOL (a variable or a function) is declared.
2338 AC_DEFUN([AC_CHECK_DECL],
2339 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2340 AC_CACHE_CHECK([whether $1 is declared], ac_Symbol,
2341 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2342 [#ifndef $1
2343 char *p = (char *) $1;
2344 #endif
2345 ])],
2346 [AS_VAR_SET(ac_Symbol, yes)],
2347 [AS_VAR_SET(ac_Symbol, no)])])
2348 AS_IF([test AS_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl
2349 AS_VAR_POPDEF([ac_Symbol])dnl
2350 ])# AC_CHECK_DECL
2351
2352
2353 # AC_CHECK_DECLS(SYMBOLS,
2354 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2355 # [INCLUDES = DEFAULT-INCLUDES])
2356 # --------------------------------------------------------
2357 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
2358 # documentation for a detailed explanation of this difference with
2359 # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
2360 AC_DEFUN([AC_CHECK_DECLS],
2361 [m4_foreach([AC_Symbol], [$1],
2362 [AC_CHECK_DECL(AC_Symbol,
2363 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2364 [Define to 1 if you have the declaration
2365 of `]AC_Symbol[', and to 0 if you don't.])
2366 $2],
2367 [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2368 $3],
2369 [$4])])
2370 ])# AC_CHECK_DECLS
2371
2372
2373
2374 ## ---------------------------------- ##
2375 ## Replacement of library functions. ##
2376 ## ---------------------------------- ##
2377
2378
2379 # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
2380 # -----------------------------
2381 # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
2382 AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
2383 [m4_bmatch([$1], [^]m4_defn([m4_cr_symbols2]),
2384 [AC_WARNING([invalid replacement directory: $1])])dnl
2385 m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])[]dnl
2386 ])
2387
2388
2389 # AC_LIBSOURCE(FILENAME)
2390 # ----------------------
2391 # Announce we might need the file `FILENAME'.
2392 m4_define([AC_LIBSOURCE], [])
2393
2394
2395 # AC_LIBSOURCES([FILENAME1, ...])
2396 # -------------------------------
2397 # Announce we might need these files.
2398 m4_define([AC_LIBSOURCES],
2399 [m4_foreach([_AC_FILENAME], [$1],
2400 [AC_LIBSOURCE(_AC_FILENAME)])])
2401
2402
2403 # _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
2404 # -------------------------------------------
2405 # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
2406 # We don't use AC_SUBST/2 because it forces an unnecessary eol.
2407 m4_define([_AC_LIBOBJ],
2408 [AS_LITERAL_IF([$1],
2409 [AC_LIBSOURCE([$1.c])],
2410 [$2])dnl
2411 AC_SUBST([LIB@&t@OBJS])dnl
2412 case $LIB@&t@OBJS in
2413 "$1.$ac_objext" | \
2414 *" $1.$ac_objext" | \
2415 "$1.$ac_objext "* | \
2416 *" $1.$ac_objext "* ) ;;
2417 *) LIB@&t@OBJS="$LIB@&t@OBJS $1.$ac_objext" ;;
2418 esac
2419 ])
2420
2421
2422
2423 # AC_LIBOBJ(FILENAME-NOEXT)
2424 # -------------------------
2425 # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
2426 # We don't use AC_SUBST/2 because it forces an unnecessary eol.
2427 m4_define([AC_LIBOBJ],
2428 [_AC_LIBOBJ([$1],
2429 [AC_DIAGNOSE(syntax,
2430 [$0($1): you should use literals])])dnl
2431 ])
2432
2433
2434 # _AC_LIBOBJS_NORMALIZE
2435 # ---------------------
2436 # Clean up LIBOBJS abd LTLIBOBJS so that they work with 1. ac_objext,
2437 # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
2438 # Used with AC_CONFIG_COMMANDS_PRE.
2439 AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
2440 [ac_libobjs=
2441 ac_ltlibobjs=
2442 for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
2443 # 1. Remove the extension, and $U if already installed.
2444 ac_i=`echo "$ac_i" |
2445 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
2446 # 2. Add them.
2447 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
2448 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
2449 done
2450 AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
2451 AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
2452 ])
2453
2454
2455 ## ----------------------------------- ##
2456 ## Checking compiler characteristics. ##
2457 ## ----------------------------------- ##
2458
2459
2460 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
2461 # ---------------------------------------------------------------------
2462 # Compute the integer EXPRESSION and store the result in the VARIABLE.
2463 # Works OK if cross compiling, but assumes twos-complement arithmetic.
2464 m4_define([_AC_COMPUTE_INT_COMPILE],
2465 [# Depending upon the size, compute the lo and hi bounds.
2466 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
2467 [ac_lo=0 ac_mid=0
2468 while :; do
2469 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2470 [ac_hi=$ac_mid; break],
2471 [ac_lo=`expr $ac_mid + 1`
2472 if test $ac_lo -le $ac_mid; then
2473 ac_lo= ac_hi=
2474 break
2475 fi
2476 ac_mid=`expr 2 '*' $ac_mid + 1`])
2477 done],
2478 [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
2479 [ac_hi=-1 ac_mid=-1
2480 while :; do
2481 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
2482 [ac_lo=$ac_mid; break],
2483 [ac_hi=`expr '(' $ac_mid ')' - 1`
2484 if test $ac_mid -le $ac_hi; then
2485 ac_lo= ac_hi=
2486 break
2487 fi
2488 ac_mid=`expr 2 '*' $ac_mid`])
2489 done],
2490 [ac_lo= ac_hi=])])
2491 # Binary search between lo and hi bounds.
2492 while test "x$ac_lo" != "x$ac_hi"; do
2493 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
2494 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
2495 [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`])
2496 done
2497 case $ac_lo in
2498 ?*) $2=$ac_lo;;
2499 '') $4 ;;
2500 esac[]dnl
2501 ])# _AC_COMPUTE_INT_COMPILE
2502
2503
2504 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
2505 # -----------------------------------------------------------------
2506 # Store the evaluation of the integer EXPRESSION in VARIABLE.
2507 m4_define([_AC_COMPUTE_INT_RUN],
2508 [AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
2509 [$2=`cat conftest.val`], [$4])])
2510
2511
2512 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
2513 # ---------------------------------------------------------
2514 m4_define([_AC_COMPUTE_INT],
2515 [if test "$cross_compiling" = yes; then
2516 _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3], [$4])
2517 else
2518 _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
2519 fi
2520 rm -f conftest.val[]dnl
2521 ])# _AC_COMPUTE_INT