1 # This file is part of Autoconf. -*- Autoconf -*-
2 # Parameterized macros.
3 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
4 # 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)
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
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 ## ---------------- ##
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'.
68 # AC_REQUIRE'd #! /bin/sh line
74 # early initializations (defaults)
76 # initialization code, option handling loop.
79 # Handling `configure --help'.
81 # Help msg for AC_CANONICAL_*
83 # Help msg from AC_ARG_ENABLE.
85 # Help msg from AC_ARG_WITH.
87 # Help msg from AC_ARG_VAR.
89 # A small paragraph on the use of the variables.
91 # Tail of the handling of --help.
94 # Copyright notice for --version.
96 # Tail of the handling of --version.
99 # Tail of initialization code.
102 # the tests and output code
106 # _m4_divert(DIVERSION-NAME)
107 # --------------------------
108 # Convert a diversion name into its number. Otherwise, return
109 # DIVERSION-NAME which is supposed to be an actual diversion number.
110 # Of course it would be nicer to use m4_case here, instead of zillions
111 # of little macros, but it then takes twice longer to run `autoconf'!
112 m4_define([_m4_divert(BINSH)], 0)
113 m4_define([_m4_divert(REVISION)], 1)
114 m4_define([_m4_divert(NOTICE)], 2)
115 m4_define([_m4_divert(DEFAULTS)], 3)
116 m4_define([_m4_divert(PARSE_ARGS)], 4)
118 m4_define([_m4_divert(HELP_BEGIN)], 10)
119 m4_define([_m4_divert(HELP_CANON)], 11)
120 m4_define([_m4_divert(HELP_ENABLE)], 12)
121 m4_define([_m4_divert(HELP_WITH)], 13)
122 m4_define([_m4_divert(HELP_VAR)], 14)
123 m4_define([_m4_divert(HELP_VAR_END)], 15)
124 m4_define([_m4_divert(HELP_END)], 16)
126 m4_define([_m4_divert(VERSION_BEGIN)], 20)
127 m4_define([_m4_divert(VERSION_END)], 21)
129 m4_define([_m4_divert(INIT_PREPARE)], 30)
131 m4_define([_m4_divert(BODY)], 40)
133 m4_define([_m4_divert(PREPARE)], 100)
137 # AC_DIVERT_PUSH(DIVERSION-NAME)
139 # ------------------------------
140 m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
141 m4_copy([m4_divert_pop], [AC_DIVERT_POP])
144 ## ------------------------------- ##
145 ## Defining macros in autoconf::. ##
146 ## ------------------------------- ##
149 # AC_DEFUN(NAME, EXPANSION)
150 # -------------------------
151 # Same as `m4_define' but equip the macro with the needed machinery
154 # We don't use this macro to define some frequently called macros that
155 # are not involved in ordering constraints, to save m4 processing.
156 m4_define([AC_DEFUN],
157 [m4_defun([$1], [$2[]AC_PROVIDE([$1])])])
160 # AC_DEFUN_ONCE(NAME, EXPANSION)
161 # ------------------------------
162 # As AC_DEFUN, but issues the EXPANSION only once, and warns if used
164 m4_define([AC_DEFUN_ONCE],
165 [m4_defun_once([$1], [$2[]AC_PROVIDE([$1])])])
168 # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
169 # ------------------------------------------
170 m4_define([AC_OBSOLETE],
171 [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
178 ## ----------------------------- ##
179 ## Dependencies between macros. ##
180 ## ----------------------------- ##
183 # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
184 # ---------------------------------------------
185 m4_define([AC_BEFORE],
186 [AC_PROVIDE_IFELSE([$2], [AC_DIAGNOSE([syntax], [$2 was called before $1])])])
191 # If STRING has never been AC_PROVIDE'd, then expand it. A macro must
192 # be AC_DEFUN'd if either it is AC_REQUIRE'd, or it AC_REQUIRE's.
193 m4_copy([m4_require], [AC_REQUIRE])
196 # AC_PROVIDE(MACRO-NAME)
197 # ----------------------
198 # Ideally we should just use `m4_provide($1)', but unfortunately many
199 # third party macros know that we use `AC_PROVIDE_$1' and they depend
201 m4_define([AC_PROVIDE],
202 [m4_define([AC_PROVIDE_$1])m4_provide([$1])])
205 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
206 # -----------------------------------------------------------
207 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
208 # The purpose of this macro is to provide the user with a means to
209 # check macros which are provided without letting her know how the
210 # information is coded.
211 m4_define([AC_PROVIDE_IFELSE],
212 [m4_ifdef([AC_PROVIDE_$1],
218 ## --------------------------------- ##
219 ## Defining macros in autoupdate::. ##
220 ## --------------------------------- ##
223 # AU_DEFINE(NAME, GLUE-CODE, [MESSAGE])
224 # -------------------------------------
226 # Declare `autoupdate::NAME' to be `GLUE-CODE', with all the needed
227 # wrapping actions required by `autoupdate'.
228 # We do not define anything in `autoconf::'.
229 m4_define([AU_DEFINE],
230 [AC_DEFUN([$1], [$2])])
233 # AU_DEFUN(NAME, NEW-CODE, [MESSAGE])
234 # -----------------------------------
235 # Declare that the macro NAME is now obsoleted, and should be replaced
236 # by NEW-CODE. Tell the user she should run autoupdate, and include
237 # the additional MESSAGE.
239 # Also define NAME as a macro which code is NEW-CODE.
241 # This allows to share the same code for both supporting obsoleted macros,
242 # and to update a configure.ac.
243 # See `acobsolete.m4' for a longer description.
244 m4_define([AU_DEFUN],
246 [AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete.
247 You should run autoupdate.])dnl
253 # AU_ALIAS(OLD-NAME, NEW-NAME)
254 # ----------------------------
255 # The OLD-NAME is no longer used, just use NEW-NAME instead. There is
256 # little difference with using AU_DEFUN but the fact there is little
257 # interest in running the test suite on both OLD-NAME and NEW-NAME.
258 # This macro makes it possible to distinguish such cases.
260 # Do not use `defn' since then autoupdate would replace an old macro
261 # call with the new macro body instead of the new macro call.
262 m4_define([AU_ALIAS],
263 [AU_DEFUN([$1], [$2($][@)])])
267 ## ------------------------- ##
268 ## Interface to autoheader. ##
269 ## ------------------------- ##
272 # AH_OUTPUT(KEY, TEXT)
273 # --------------------
274 # Pass TEXT to autoheader.
275 # This macro is `read' only via `autoconf --trace', it outputs nothing.
276 m4_define([AH_OUTPUT], [])
279 # AH_VERBATIM(KEY, TEMPLATE)
280 # --------------------------
281 # If KEY is direct (i.e., no indirection such as in KEY=$my_func which
282 # may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader
283 # TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
284 # output as is, with no formating.
285 m4_define([AH_VERBATIM],
287 [AH_OUTPUT([$1], _AS_QUOTE([[$2]]))])
291 # AH_TEMPLATE(KEY, DESCRIPTION)
292 # -----------------------------
293 # Issue an autoheader template for KEY, i.e., a comment composed of
294 # DESCRIPTION (properly wrapped), and then #undef KEY.
295 m4_define([AH_TEMPLATE],
297 m4_text_wrap([$2 */], [ ], [/* ])[
303 # Output TEXT at the top of `config.h.in'.
305 [m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
306 AH_VERBATIM([0000]_AH_COUNTER, [$1])])
311 # Output TEXT at the bottom of `config.h.in'.
312 m4_define([AH_BOTTOM],
313 [m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
314 AH_VERBATIM([zzzz]_AH_COUNTER, [$1])])
317 m4_define([_AH_COUNTER], [0])
322 ## --------------------------------------------------- ##
323 ## Common m4/sh handling of variables (indirections). ##
324 ## --------------------------------------------------- ##
327 # The purpose of this section is to provide a uniform API for
328 # reading/setting sh variables with or without indirection.
329 # Typically, one can write
330 # AC_VAR_SET(var, val)
332 # AC_VAR_SET(ac_$var, val)
333 # and expect the right thing to happen.
336 # AC_VAR_SET(VARIABLE, VALUE)
337 # ---------------------------
338 # Set the VALUE of the shell VARIABLE.
339 # If the variable contains indirections (e.g. `ac_cv_func_$ac_func')
340 # perform whenever possible at m4 level, otherwise sh level.
341 m4_define([AC_VAR_SET],
347 # AC_VAR_GET(VARIABLE)
348 # --------------------
349 # Get the value of the shell VARIABLE.
350 # Evaluates to $VARIABLE if there are no indirection in VARIABLE,
351 # else into the appropriate `eval' sequence.
352 m4_define([AC_VAR_GET],
355 [`eval echo '${'m4_patsubst($1, [[\\`]], [\\\&])'}'`])])
358 # AC_VAR_TEST_SET(VARIABLE)
359 # -------------------------
360 # Expands into the `test' expression which is true if VARIABLE
361 # is set. Polymorphic. Should be dnl'ed.
362 m4_define([AC_VAR_TEST_SET],
364 [test "${$1+set}" = set],
365 [eval "test \"\${$1+set}\" = set"])])
368 # AC_VAR_SET_IFELSE(VARIABLE, IF-TRUE, IF-FALSE)
369 # ----------------------------------------------
370 # Implement a shell `if-then-else' depending whether VARIABLE is set
371 # or not. Polymorphic.
372 m4_define([AC_VAR_SET_IFELSE],
373 [AS_IF([AC_VAR_TEST_SET([$1])], [$2], [$3])])
376 # AC_VAR_PUSHDEF and AC_VAR_POPDEF
377 # --------------------------------
380 # Sometimes we may have to handle literals (e.g. `stdlib.h'), while at
381 # other moments, the same code may have to get the value from a
382 # variable (e.g., `ac_header'). To have a uniform handling of both
383 # cases, when a new value is about to be processed, declare a local
386 # AC_VAR_PUSHDEF([header], [ac_cv_header_$1])
388 # and then in the body of the macro, use `header' as is. It is of
389 # first importance to use `AC_VAR_*' to access this variable. Don't
390 # quote its name: it must be used right away by m4.
392 # If the value `$1' was a literal (e.g. `stdlib.h'), then `header' is
393 # in fact the value `ac_cv_header_stdlib_h'. If `$1' was indirect,
394 # then `header's value in m4 is in fact `$ac_header', the shell
395 # variable that holds all of the magic to get the expansion right.
397 # At the end of the block, free the variable with
399 # AC_VAR_POPDEF([header])
402 # AC_VAR_PUSHDEF(VARNAME, VALUE)
403 # ------------------------------
404 # Define the m4 macro VARNAME to an accessor to the shell variable
405 # named VALUE. VALUE does not need to be a valid shell variable name:
406 # the transliteration is handled here. To be dnl'ed.
407 m4_define([AC_VAR_PUSHDEF],
409 [m4_pushdef([$1], [AC_TR_SH($2)])],
411 m4_pushdef([$1], [$ac_[$1]])])])
414 # AC_VAR_POPDEF(VARNAME)
415 # ----------------------
416 # Free the shell variable accessor VARNAME. To be dnl'ed.
417 m4_define([AC_VAR_POPDEF],
422 ## ------------------------------------ ##
423 ## Common m4/sh character translation. ##
424 ## ------------------------------------ ##
426 # The point of this section is to provide high level functions
427 # comparable to m4's `translit' primitive, but m4:sh polymorphic.
428 # Transliteration of literal strings should be handled by m4, while
429 # shell variables' content will be translated at runtime (tr or sed).
431 # AC_TR_CPP(EXPRESSION)
432 # ---------------------
433 # Map EXPRESSION to an upper case string which is valid as rhs for a
434 # `#define'. sh/m4 polymorphic. Make sure to update the definition
435 # of `$ac_tr_cpp' if you change this.
436 m4_define([AC_TR_CPP],
438 [m4_patsubst(m4_translit([[$1]],
439 [*abcdefghijklmnopqrstuvwxyz],
440 [PABCDEFGHIJKLMNOPQRSTUVWXYZ]),
442 [`echo "$1" | $ac_tr_cpp`])])
445 # AC_TR_SH(EXPRESSION)
446 # --------------------
447 # Transform EXPRESSION into a valid shell variable name.
449 # Make sure to update the definition of `$ac_tr_sh' if you change this.
450 m4_define([AC_TR_SH],
452 [m4_patsubst(m4_translit([[$1]], [*+], [pp]),
453 [[^a-zA-Z0-9_]], [_])],
454 [`echo "$1" | $ac_tr_sh`])])
458 ## ----------------------------- ##
459 ## Implementing Autoconf loops. ##
460 ## ----------------------------- ##
463 # AC_FOREACH(VARIABLE, LIST, EXPRESSION)
464 # --------------------------------------
466 # Compute EXPRESSION assigning to VARIABLE each value of the LIST.
467 # LIST is a /bin/sh list, i.e., it has the form ` item_1 item_2
468 # ... item_n ': white spaces are separators, and leading and trailing
469 # spaces are meaningless.
471 # This macro is robust to active symbols:
472 # AC_FOREACH([Var], [ active
475 # => -active--b--active-end
476 m4_define([AC_FOREACH],
477 [m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
482 ## ----------------------------------- ##
483 ## Helping macros to display strings. ##
484 ## ----------------------------------- ##
487 # AC_HELP_STRING(LHS, RHS, [COLUMN])
488 # ----------------------------------
490 # Format an Autoconf macro's help string so that it looks pretty when
491 # the user executes "configure --help". This macro takes three
492 # arguments, a "left hand side" (LHS), a "right hand side" (RHS), and
493 # the COLUMN which is a string of white spaces which leads to the
494 # the RHS column (default: 26 white spaces).
496 # The resulting string is suitable for use in other macros that require
497 # a help string (e.g. AC_ARG_WITH).
499 # Here is the sample string from the Autoconf manual (Node: External
500 # Software) which shows the proper spacing for help strings.
502 # --with-readline support fancy command line editing
505 # | column 2 column 26
509 # A help string is made up of a "left hand side" (LHS) and a "right
510 # hand side" (RHS). In the example above, the LHS is
511 # "--with-readline", while the RHS is "support fancy command line
514 # If the LHS extends past column 24, then the LHS is terminated with a
515 # newline so that the RHS is on a line of its own beginning in column
518 # Therefore, if the LHS were instead "--with-readline-blah-blah-blah",
519 # then the AC_HELP_STRING macro would expand into:
522 # --with-readline-blah-blah-blah
523 # ^ ^ support fancy command line editing
528 m4_define([AC_HELP_STRING],
529 [m4_pushdef([AC_Prefix], m4_default([$3], [ ]))dnl
530 m4_pushdef([AC_Prefix_Format],
531 [ %-]m4_eval(m4_len(AC_Prefix) - 3)[s ])dnl [ %-23s ]
532 m4_text_wrap([$2], AC_Prefix, m4_format(AC_Prefix_Format, [$1]))dnl
533 m4_popdef([AC_Prefix_Format])dnl
534 m4_popdef([AC_Prefix])dnl
540 ## ---------------------------------------------- ##
541 ## Information on the package being Autoconf'ed. ##
542 ## ---------------------------------------------- ##
545 # It is suggested that the macros in this section appear before
546 # AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
547 # and from the implementation point of, AC_INIT *must* be expanded
548 # beforehand: it puts data in diversions which must appear before the
549 # data provided by the macros of this section.
551 # The solution is to require AC_INIT in each of these macros. AC_INIT
552 # has the needed magic so that it can't be expanded twice.
556 # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION,
558 # [TAR-NAME = unGNU'd lower case PACKAGE-NAME])
559 # --------------------------------------------------------------
560 m4_define([_AC_INIT_PACKAGE],
561 [m4_define([AC_PACKAGE_NAME], [$1])
562 m4_define([AC_PACKAGE_TARNAME],
563 m4_tolower(m4_patsubst([[[$1]]], [GNU ])))
564 m4_define([AC_PACKAGE_VERSION], [$2])
565 m4_define([AC_PACKAGE_STRING], [$1 $2])
566 m4_define([AC_PACKAGE_BUGREPORT], [$3])
572 # Append Copyright information in the top of `configure'. TEXT is
573 # evaluated once, hence TEXT can use macros. Note that we do not
574 # prepend `# ' but `@%:@ ', since m4 does not evaluate the comments.
575 # Had we used `# ', the Copyright sent in the beginning of `configure'
576 # would have not been evaluated. Another solution, a bit fragile,
577 # would have be to use m4_quote to force an evaluation:
579 # m4_patsubst(m4_quote($1), [^], [# ])
580 m4_define([AC_COPYRIGHT],
581 [m4_divert_text([NOTICE],
583 $1], [^], [@%:@ ])])dnl
584 m4_divert_text([VERSION_BEGIN],
590 # AC_REVISION(REVISION-INFO)
591 # --------------------------
592 # The second quote in the translit is just to cope with font-lock-mode
593 # which sees the opening of a string.
594 m4_define([AC_REVISION],
595 [m4_divert_text([REVISION],
596 [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
602 ## ---------------------------------------- ##
603 ## Requirements over the Autoconf version. ##
604 ## ---------------------------------------- ##
607 # AU::AC_PREREQ(VERSION)
608 # ----------------------
609 # Update this `AC_PREREQ' statement to require the current version of
610 # Autoconf. But fail if ever this autoupdate is too old.
612 # Note that `m4_defn([AC_ACVERSION])' below are expanded before calling
613 # `AU_DEFUN', i.e., it is hard coded. Otherwise it would be quite
614 # complex for autoupdate to import the value of `AC_ACVERSION'. We
615 # could `AU_DEFUN' `AC_ACVERSION', but this would replace all its
616 # occurrences with the current version of Autoconf, which is certainly
617 # not what mean the user.
618 AU_DEFUN([AC_PREREQ],
619 [m4_if(m4_version_compare(]m4_defn([AC_ACVERSION])[, [$1]), -1,
620 [m4_fatal([Autoconf version $1 or higher is required for this script])])dnl
621 [AC_PREREQ(]]m4_defn([AC_ACVERSION])[[)]])
626 # Complain and exit if the Autoconf version is less than VERSION.
627 m4_define([AC_PREREQ],
628 [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1,
629 [AC_FATAL([Autoconf version $1 or higher is required for this script])])])
636 ## ---------------- ##
637 ## Initialization. ##
638 ## ---------------- ##
641 # All the following macros are used by AC_INIT. Ideally, they should
642 # be presented in the order in which they are output. Please, help us
643 # sorting it, or at least, don't augment the entropy.
648 m4_define([_AC_INIT_NOTICE],
649 [m4_divert_text([NOTICE],
650 [@%:@ Guess values for system-dependent variables and create Makefiles.
651 @%:@ Generated by Autoconf AC_ACVERSION[]dnl
652 m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
654 m4_ifset([AC_PACKAGE_BUGREPORT],
655 [m4_divert_text([NOTICE],
657 @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
663 m4_define([_AC_INIT_COPYRIGHT],
665 [Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
666 Free Software Foundation, Inc.
667 This configure script is free software; the Free Software Foundation
668 gives unlimited permission to copy, distribute and modify it.])dnl
672 # _AC_INIT_DEFAULTS_FDS
673 # ---------------------
674 # Set up the file descriptors used by `configure'.
676 m4_define([AS_MESSAGE_FD], 6)
677 m4_define([AS_MESSAGE_LOG_FD], 5)
678 # That's how they used to be named.
679 AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
680 AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
682 m4_define([_AC_INIT_DEFAULTS_FDS],
683 [# File descriptor usage:
686 # 2 errors and warnings
687 @%:@ AS_MESSAGE_LOG_FD compiler messages saved in config.log
688 @%:@ AS_MESSAGE_FD checking for... messages and results
689 exec AS_MESSAGE_LOG_FD>>config.log
690 exec AS_MESSAGE_FD>&1
691 ])# _AC_INIT_DEFAULTS_FDS
696 # Values which defaults can be set from `configure.ac'.
697 # `/bin/machine' is used in `glibcbug'. The others are used in config.*
698 m4_define([_AC_INIT_DEFAULTS],
699 [m4_divert_push([DEFAULTS])dnl
704 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
705 # so uname gets run too.
706 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
708 # Name of the executable.
709 as_me=`echo "$[0]" | sed 's,.*/,,'`
711 cat >config.log <<EOF
712 This file contains any messages produced by compilers while
713 running configure, to aid debugging if configure makes a mistake.
715 It was created by $as_me m4_ifset([AC_PACKAGE_STRING],
716 [(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
720 AS_UNAME >>config.log
722 cat >>config.log <<EOF
729 _AC_INIT_DEFAULTS_FDS
733 ac_default_prefix=/usr/local
737 AC_SUBST(SHELL, ${CONFIG_SHELL-/bin/sh})dnl
739 # Maximum number of lines to put in a shell here document.
740 # This variable seems obsolete. It should probably be removed, and
741 # only ac_max_sed_lines should be used.
742 : ${ac_max_here_lines=38}
744 # Avoid depending upon Character Ranges.
745 ac_cr_az='abcdefghijklmnopqrstuvwxyz'
746 ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
747 ac_cr_09='0123456789'
748 ac_cr_alnum=$ac_cr_az$ac_cr_AZ$ac_cr_09
750 # Sed expression to map a string onto a valid sh and CPP variable names.
751 ac_tr_sh="sed y%*+%pp%;s%[[^_$ac_cr_alnum]]%_%g"
752 ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[[^_$ac_cr_alnum]]%_%g"
754 m4_divert_pop([DEFAULTS])dnl
755 ])# _AC_INIT_DEFAULTS
758 # AC_PREFIX_DEFAULT(PREFIX)
759 # -------------------------
760 AC_DEFUN([AC_PREFIX_DEFAULT],
761 [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
764 # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
765 # ---------------------------------------------
766 # UNIQUE-FILE-IN-SOURCE-DIR is a filename unique to this package,
767 # relative to the directory that configure is in, which we can look
768 # for to find out if srcdir is correct.
769 AC_DEFUN([AC_CONFIG_SRCDIR],
770 [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
775 # Compute `srcdir' based on `$ac_unique_file'.
776 m4_define([_AC_INIT_SRCDIR],
777 [m4_divert_push([PARSE_ARGS])dnl
779 # Find the source files, if location was not specified.
780 if test -z "$srcdir"; then
781 ac_srcdir_defaulted=yes
782 # Try the directory containing this script, then its parent.
784 ac_confdir=`echo "$ac_prog" | sed 's%/[[^/][^/]]*$%%'`
785 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
787 if test ! -r $srcdir/$ac_unique_file; then
791 ac_srcdir_defaulted=no
793 if test ! -r $srcdir/$ac_unique_file; then
794 if test "$ac_srcdir_defaulted" = yes; then
795 AC_MSG_ERROR([cannot find sources in $ac_confdir or ..])
797 AC_MSG_ERROR([cannot find sources in $srcdir])
800 dnl Double slashes in pathnames in object file debugging info
801 dnl mess up M-x gdb in Emacs.
802 srcdir=`echo "$srcdir" | sed 's%\([[^/]]\)/*$%\1%'`
803 m4_divert_pop([PARSE_ARGS])dnl
807 # _AC_INIT_PARSE_ARGS
808 # -------------------
809 m4_define([_AC_INIT_PARSE_ARGS],
810 [m4_divert_push([PARSE_ARGS])dnl
812 # Initialize some variables set by options.
814 ac_init_version=false
815 # The variables have the same names as the options, with
816 # dashes changed to underlines.
818 AC_SUBST(exec_prefix, NONE)dnl
821 AC_SUBST(prefix, NONE)dnl
824 AC_SUBST(program_transform_name, [s,x,x,])dnl
832 # Installation directory options.
833 # These are left unexpanded so users can "make install exec_prefix=/foo"
834 # and all the variables that are supposed to be based on exec_prefix
835 # by default will actually change.
836 # Use braces instead of parens because sh, perl, etc. also accept them.
837 AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
838 AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
839 AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
840 AC_SUBST([datadir], ['${prefix}/share'])dnl
841 AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
842 AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
843 AC_SUBST([localstatedir], ['${prefix}/var'])dnl
844 AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
845 AC_SUBST([includedir], ['${prefix}/include'])dnl
846 AC_SUBST([oldincludedir], ['/usr/include'])dnl
847 AC_SUBST([infodir], ['${prefix}/info'])dnl
848 AC_SUBST([mandir], ['${prefix}/man'])dnl
850 # Identity of this package.
851 AC_SUBST([PACKAGE_NAME],
852 [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
853 AC_SUBST([PACKAGE_TARNAME],
854 [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
855 AC_SUBST([PACKAGE_VERSION],
856 [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
857 AC_SUBST([PACKAGE_STRING],
858 [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
859 AC_SUBST([PACKAGE_BUGREPORT],
860 [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
865 # If the previous option needs an argument, assign it.
866 if test -n "$ac_prev"; then
867 eval "$ac_prev=\$ac_option"
872 ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
874 # Accept the important Cygnus configure options, so we can diagnose typos.
878 -bindir | --bindir | --bindi | --bind | --bin | --bi)
880 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
883 -build | --build | --buil | --bui | --bu)
884 ac_prev=build_alias ;;
885 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
886 build_alias=$ac_optarg ;;
888 -cache-file | --cache-file | --cache-fil | --cache-fi \
889 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
890 ac_prev=cache_file ;;
891 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
892 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
893 cache_file=$ac_optarg ;;
896 cache_file=config.cache ;;
898 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
900 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
902 datadir=$ac_optarg ;;
904 -disable-* | --disable-*)
905 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
906 # Reject names that are not valid shell variable names.
907 expr "x$ac_feature" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
908 AC_MSG_ERROR([invalid feature name: $ac_feature])
909 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
910 eval "enable_$ac_feature=no" ;;
912 -enable-* | --enable-*)
913 ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
914 # Reject names that are not valid shell variable names.
915 expr "x$ac_feature" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
916 AC_MSG_ERROR([invalid feature name: $ac_feature])
917 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
919 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
922 eval "enable_$ac_feature='$ac_optarg'" ;;
924 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
925 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
926 | --exec | --exe | --ex)
927 ac_prev=exec_prefix ;;
928 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
929 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
930 | --exec=* | --exe=* | --ex=*)
931 exec_prefix=$ac_optarg ;;
933 -gas | --gas | --ga | --g)
934 # Obsolete; use --with-gas.
937 -help | --help | --hel | --he | -h)
939 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
940 ac_init_help=recursive ;;
941 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
942 ac_init_help=short ;;
944 -host | --host | --hos | --ho)
945 ac_prev=host_alias ;;
946 -host=* | --host=* | --hos=* | --ho=*)
947 host_alias=$ac_optarg ;;
949 -includedir | --includedir | --includedi | --included | --include \
950 | --includ | --inclu | --incl | --inc)
951 ac_prev=includedir ;;
952 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
953 | --includ=* | --inclu=* | --incl=* | --inc=*)
954 includedir=$ac_optarg ;;
956 -infodir | --infodir | --infodi | --infod | --info | --inf)
958 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
959 infodir=$ac_optarg ;;
961 -libdir | --libdir | --libdi | --libd)
963 -libdir=* | --libdir=* | --libdi=* | --libd=*)
966 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
967 | --libexe | --libex | --libe)
968 ac_prev=libexecdir ;;
969 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
970 | --libexe=* | --libex=* | --libe=*)
971 libexecdir=$ac_optarg ;;
973 -localstatedir | --localstatedir | --localstatedi | --localstated \
974 | --localstate | --localstat | --localsta | --localst \
975 | --locals | --local | --loca | --loc | --lo)
976 ac_prev=localstatedir ;;
977 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
978 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
979 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
980 localstatedir=$ac_optarg ;;
982 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
984 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
988 # Obsolete; use --without-fp.
991 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
995 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
996 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
999 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1000 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1001 | --oldin | --oldi | --old | --ol | --o)
1002 ac_prev=oldincludedir ;;
1003 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1004 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1005 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1006 oldincludedir=$ac_optarg ;;
1008 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1010 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1011 prefix=$ac_optarg ;;
1013 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1014 | --program-pre | --program-pr | --program-p)
1015 ac_prev=program_prefix ;;
1016 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1017 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1018 program_prefix=$ac_optarg ;;
1020 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1021 | --program-suf | --program-su | --program-s)
1022 ac_prev=program_suffix ;;
1023 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1024 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1025 program_suffix=$ac_optarg ;;
1027 -program-transform-name | --program-transform-name \
1028 | --program-transform-nam | --program-transform-na \
1029 | --program-transform-n | --program-transform- \
1030 | --program-transform | --program-transfor \
1031 | --program-transfo | --program-transf \
1032 | --program-trans | --program-tran \
1033 | --progr-tra | --program-tr | --program-t)
1034 ac_prev=program_transform_name ;;
1035 -program-transform-name=* | --program-transform-name=* \
1036 | --program-transform-nam=* | --program-transform-na=* \
1037 | --program-transform-n=* | --program-transform-=* \
1038 | --program-transform=* | --program-transfor=* \
1039 | --program-transfo=* | --program-transf=* \
1040 | --program-trans=* | --program-tran=* \
1041 | --progr-tra=* | --program-tr=* | --program-t=*)
1042 program_transform_name=$ac_optarg ;;
1044 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1045 | -silent | --silent | --silen | --sile | --sil)
1048 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1050 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1052 sbindir=$ac_optarg ;;
1054 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1055 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1056 | --sharedst | --shareds | --shared | --share | --shar \
1058 ac_prev=sharedstatedir ;;
1059 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1060 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1061 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1063 sharedstatedir=$ac_optarg ;;
1065 -site | --site | --sit)
1067 -site=* | --site=* | --sit=*)
1070 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1072 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1073 srcdir=$ac_optarg ;;
1075 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1076 | --syscon | --sysco | --sysc | --sys | --sy)
1077 ac_prev=sysconfdir ;;
1078 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1079 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1080 sysconfdir=$ac_optarg ;;
1082 -target | --target | --targe | --targ | --tar | --ta | --t)
1083 ac_prev=target_alias ;;
1084 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1085 target_alias=$ac_optarg ;;
1087 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1090 -version | --version | --versio | --versi | --vers | -V)
1091 ac_init_version=: ;;
1094 ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
1095 # Reject names that are not valid shell variable names.
1096 expr "x$ac_package" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
1097 AC_MSG_ERROR([invalid package name: $ac_package])
1098 ac_package=`echo $ac_package| sed 's/-/_/g'`
1100 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
1103 eval "with_$ac_package='$ac_optarg'" ;;
1105 -without-* | --without-*)
1106 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1107 # Reject names that are not valid shell variable names.
1108 expr "x$ac_package" : "[.*[^-_$ac_cr_alnum]]" >/dev/null &&
1109 AC_MSG_ERROR([invalid package name: $ac_package])
1110 ac_package=`echo $ac_package | sed 's/-/_/g'`
1111 eval "with_$ac_package=no" ;;
1114 # Obsolete; use --with-x.
1117 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1118 | --x-incl | --x-inc | --x-in | --x-i)
1119 ac_prev=x_includes ;;
1120 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1121 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1122 x_includes=$ac_optarg ;;
1124 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1125 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1126 ac_prev=x_libraries ;;
1127 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1128 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1129 x_libraries=$ac_optarg ;;
1131 -*) AC_MSG_ERROR([unrecognized option: $ac_option
1132 Try `$[0] --help' for more information.])
1136 ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
1137 # Reject names that are not valid shell variable names.
1138 expr "x$ac_envvar" : "[.*[^_$ac_cr_alnum]]" >/dev/null &&
1139 AC_MSG_ERROR([invalid variable name: $ac_envvar])
1140 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
1141 eval "$ac_envvar='$ac_optarg'"
1142 export $ac_envvar ;;
1145 # FIXME: should be removed in autoconf 3.0.
1146 AC_MSG_WARN([you should use --build, --host, --target])
1147 expr "x$ac_option" : "[.*[^-._$ac_cr_alnum]]" >/dev/null &&
1148 AC_MSG_WARN([invalid host type: $ac_option])
1149 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1155 if test -n "$ac_prev"; then
1156 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1157 AC_MSG_ERROR([missing argument to $ac_option])
1160 # Be sure to have absolute paths.
1161 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
1162 localstatedir libdir includedir oldincludedir infodir mandir \
1165 eval ac_val=$`echo $ac_var`
1167 [[\\/$]]* | ?:[[\\/]]* ) ;;
1169 *) AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
1173 # There might be people who depend on the old broken behavior: `$host'
1174 # used to hold the argument of --host etc.
1177 target=$target_alias
1179 # FIXME: should be removed in autoconf 3.0.
1180 if test "x$host_alias" != x; then
1181 if test "x$build_alias" = x; then
1182 cross_compiling=maybe
1183 AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
1184 If a cross compiler is detected then cross compile mode will be used.])
1185 elif test "x$build_alias" != "x$host_alias"; then
1191 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1193 test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
1195 m4_divert_pop([PARSE_ARGS])dnl
1196 ])# _AC_INIT_PARSE_ARGS
1201 # Handle the `configure --help' message.
1202 m4_define([_AC_INIT_HELP],
1203 [m4_divert_push([HELP_BEGIN])dnl
1206 # Report the --help message.
1208 if test "$ac_init_help" = "long"; then
1209 # Omit some internal or obsolete options to make the list less imposing.
1210 # This message is too long to be a string in the A/UX 3.1 sh.
1212 \`configure' configures m4_ifset([AC_PACKAGE_STRING],
1213 [AC_PACKAGE_STRING],
1214 [this package]) to adapt to many kinds of systems.
1216 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
1218 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
1219 VAR=VALUE. See below for descriptions of some of the useful variables.
1221 Defaults for the options are specified in brackets.
1224 -h, --help display this help and exit
1225 --help=short display options specific to this package
1226 --help=recursive display the short help of all the included packages
1227 -V, --version display version information and exit
1228 -q, --quiet, --silent do not print \`checking...' messages
1229 --cache-file=FILE cache test results in FILE [disabled]
1230 -C, --config-cache alias for \`--cache-file=config.cache'
1231 -n, --no-create do not create output files
1232 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1237 Installation directories:
1238 --prefix=PREFIX install architecture-independent files in PREFIX
1239 [$ac_default_prefix]
1240 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1243 By default, \`make install' will install all the files in
1244 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1245 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1246 for instance \`--prefix=\$HOME'.
1248 For better control, use the options below.
1250 Fine tuning of the installation directories:
1251 --bindir=DIR user executables [EPREFIX/bin]
1252 --sbindir=DIR system admin executables [EPREFIX/sbin]
1253 --libexecdir=DIR program executables [EPREFIX/libexec]
1254 --datadir=DIR read-only architecture-independent data [PREFIX/share]
1255 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1256 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1257 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1258 --libdir=DIR object code libraries [EPREFIX/lib]
1259 --includedir=DIR C header files [PREFIX/include]
1260 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1261 --infodir=DIR info documentation [PREFIX/info]
1262 --mandir=DIR man documentation [PREFIX/man]
1266 m4_divert_pop([HELP_BEGIN])dnl
1267 dnl The order of the diversions here is
1269 dnl which may be prolongated by extra generic options such as with X or
1270 dnl AC_ARG_PROGRAM. Displayed only in long --help.
1273 dnl Support for cross compilation (--build, --host and --target).
1274 dnl Display only in long --help.
1277 dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
1278 dnl then implements the header of the non generic options.
1287 dnl initialized below, in which we dump the trailer (handling of the
1288 dnl recursion for instance).
1289 m4_divert_push([HELP_ENABLE])dnl
1293 if test -n "$ac_init_help"; then
1294 m4_ifset([AC_PACKAGE_STRING],
1295 [ case $ac_init_help in
1296 short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
1299 m4_divert_pop([HELP_ENABLE])dnl
1300 m4_divert_push([HELP_END])dnl
1301 m4_ifset([AC_PACKAGE_BUGREPORT], [
1302 Report bugs to <AC_PACKAGE_BUGREPORT>.])
1306 if test "$ac_init_help" = "recursive"; then
1307 # If there are subdirs, report their specific --help.
1309 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
1311 # A "../" for each directory in /$ac_subdir.
1312 ac_dots=`echo $ac_subdir |
1313 sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
1316 .) # No --srcdir option. We are building in place.
1317 ac_sub_srcdir=$srcdir ;;
1318 [[\\/]]* | ?:[[\\/]]* ) # Absolute path.
1319 ac_sub_srcdir=$srcdir/$ac_subdir ;;
1321 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
1324 # Check for guested configure; otherwise get Cygnus style configure.
1325 if test -f $ac_sub_srcdir/configure.gnu; then
1327 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
1328 elif test -f $ac_sub_srcdir/configure; then
1330 $SHELL $ac_sub_srcdir/configure --help=recursive
1331 elif test -f $ac_sub_srcdir/configure.ac ||
1332 test -f $ac_sub_srcdir/configure.in; then
1334 $ac_configure --help
1336 AC_MSG_WARN([no configuration information is in $ac_subdir])
1342 test -n "$ac_init_help" && exit 0
1343 m4_divert_pop([HELP_END])dnl
1349 # Handle the `configure --version' message.
1350 m4_define([_AC_INIT_VERSION],
1351 [m4_divert_text([VERSION_BEGIN],
1352 [if $ac_init_version; then
1354 m4_ifset([AC_PACKAGE_STRING],
1355 [m4_divert_text([VERSION_BEGIN],
1356 [configure (AC_PACKAGE_STRING) AC_ACVERSION])])
1357 m4_divert_text([VERSION_END],
1361 ])# _AC_INIT_VERSION
1364 # _AC_INIT_PREPARE_FS_SEPARATORS
1365 # ------------------------------
1366 # Compute the directory and path separators.
1367 # FIXME: Full version should include dir separator, documentation about
1368 # AC_SUBST'ed variables etc.
1369 m4_define([_AC_INIT_PREPARE_FS_SEPARATORS],
1370 [echo "#! $SHELL" >conftest.sh
1371 echo "exit 0" >>conftest.sh
1372 chmod +x conftest.sh
1373 if AC_RUN_LOG([PATH=".;`pwd`"; conftest.sh]); then
1374 ac_path_separator=';'
1378 AC_SUBST([PATH_SEPARATOR], "$ac_path_separator")dnl
1385 # Called by AC_INIT to build the preamble of the `configure' scripts.
1386 # 1. Trap and clean up various tmp files.
1387 # 2. Set up the fd and output files
1388 # 3. Remember the options given to `configure' for `config.status --recheck'.
1389 # 4. Ensure a correct environment
1390 # 5. Required macros (cache, default AC_SUBST etc.)
1391 m4_define([_AC_INIT_PREPARE],
1392 [m4_divert_push([INIT_PREPARE])dnl
1394 # Keep a trace of the command line.
1395 # Strip out --no-create and --no-recursion so they do not pile up.
1396 # Also quote any args containing shell meta-characters.
1402 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1403 | --no-cr | --no-c) ;;
1404 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1405 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1406 dnl If you change this globbing pattern, test it on an old shell --
1407 dnl it's sensitive. Putting any kind of quote in it causes syntax errors.
1408 [ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
1409 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1410 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1412 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1415 # Get rid of the leading space.
1418 # When interrupted or exit'd, cleanup temporary files, and complete
1419 # config.log. We remove comments because anyway the quotes in there
1420 # would cause problems or look ugly.
1421 trap 'exit_status=$?
1422 # Save into config.log some information that might help in debugging.
1423 echo >&AS_MESSAGE_LOG_FD
1424 echo ["## ----------------- ##"] >&AS_MESSAGE_LOG_FD
1425 echo ["## Cache variables. ##"] >&AS_MESSAGE_LOG_FD
1426 echo ["## ----------------- ##"] >&AS_MESSAGE_LOG_FD
1427 echo >&AS_MESSAGE_LOG_FD
1428 m4_patsubst(m4_patsubst(m4_dquote(m4_defn([_AC_CACHE_DUMP])),
1431 ['], ['"'"']) >&AS_MESSAGE_LOG_FD
1432 sed "/^$/d" confdefs.h >conftest.log
1433 if test -s conftest.log; then
1434 echo >&AS_MESSAGE_LOG_FD
1435 echo ["## ------------ ##"] >&AS_MESSAGE_LOG_FD
1436 echo ["## confdefs.h. ##"] >&AS_MESSAGE_LOG_FD
1437 echo ["## ------------ ##"] >&AS_MESSAGE_LOG_FD
1438 echo >&AS_MESSAGE_LOG_FD
1439 cat conftest.log >&AS_MESSAGE_LOG_FD
1441 (echo; echo) >&AS_MESSAGE_LOG_FD
1442 test "$ac_signal" != 0 &&
1443 echo "$as_me: caught signal $ac_signal" >&AS_MESSAGE_LOG_FD
1444 echo "$as_me: exit $exit_status" >&AS_MESSAGE_LOG_FD
1445 rm -rf conftest* confdefs* core core.* *.core $ac_clean_files &&
1448 for ac_signal in 1 2 13 15; do
1449 trap 'ac_status=$?; ac_signal='$ac_signal'; AS_EXIT([$ac_status])' $ac_signal
1453 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1454 rm -rf conftest* confdefs.h
1455 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1458 # Let the site file select an alternate cache file if it wants to.
1461 _AC_ARG_VAR_VALIDATE
1462 _AC_ARG_VAR_PRECIOUS(build_alias)dnl
1463 _AC_ARG_VAR_PRECIOUS(host_alias)dnl
1464 _AC_ARG_VAR_PRECIOUS(target_alias)dnl
1468 _AC_INIT_PREPARE_FS_SEPARATORS
1470 dnl Substitute for predefined variables.
1473 m4_divert_pop([INIT_PREPARE])dnl
1474 ])# _AC_INIT_PREPARE
1477 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
1478 # ----------------------------------------
1479 # This macro is used only for Autoupdate.
1481 [m4_ifval([$2], [[AC_INIT($@)]],
1484 AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
1490 # Simulate AC_INIT, i.e., pretend this is the beginning of the `configure'
1491 # generation. This is used by some tests, and let `autoconf' be used to
1492 # generate other scripts than `configure'.
1493 m4_define([AC_PLAIN_SCRIPT],
1496 # Forbidden tokens and exceptions.
1497 m4_pattern_forbid([^_?A[CHUM]_])
1498 m4_pattern_forbid([_AC_])
1499 # Actually reserved by M4sh.
1500 m4_pattern_allow([^AS_FLAGS$])
1502 m4_divert_push([BODY])dnl
1503 m4_wrap([m4_divert_pop([BODY])[]])dnl
1508 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
1509 # ----------------------------------------
1510 # Include the user macro files, prepare the diversions, and output the
1511 # preamble of the `configure' script.
1512 # Note that the order is important: first initialize, then set the
1514 m4_define([AC_INIT],
1516 m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
1517 m4_divert_text([BINSH], [@%:@! /bin/sh])
1524 dnl _AC_INIT_COPYRIGHT must be called after _AC_INIT_VERSION, since
1525 dnl it dumps into a diversion prepared by _AC_INIT_VERSION.
1528 m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
1534 ## ----------------------------- ##
1535 ## Selecting optional features. ##
1536 ## ----------------------------- ##
1539 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
1540 # ------------------------------------------------------------------------
1541 AC_DEFUN([AC_ARG_ENABLE],
1542 [m4_divert_once([HELP_ENABLE], [[
1544 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1545 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])dnl
1546 m4_divert_once([HELP_ENABLE], [$2])dnl
1547 # Check whether --enable-$1 or --disable-$1 was given.
1548 if test "[${enable_]m4_patsubst([$1], -, _)+set}" = set; then
1549 enableval="[$enable_]m4_patsubst([$1], -, _)"
1551 m4_ifvaln([$4], [else
1557 AU_DEFUN([AC_ENABLE],
1558 [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
1561 ## ------------------------------ ##
1562 ## Working with optional software ##
1563 ## ------------------------------ ##
1567 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
1568 # --------------------------------------------------------------------
1569 AC_DEFUN([AC_ARG_WITH],
1570 [m4_divert_once([HELP_WITH], [[
1572 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1573 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
1574 m4_divert_once([HELP_WITH], [$2])dnl
1575 # Check whether --with-$1 or --without-$1 was given.
1576 if test "[${with_]m4_patsubst([$1], -, _)+set}" = set; then
1577 withval="[$with_]m4_patsubst([$1], -, _)"
1579 m4_ifvaln([$4], [else
1585 [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
1589 ## ----------------------------------------- ##
1590 ## Remembering variables for reconfiguring. ##
1591 ## ----------------------------------------- ##
1594 # _AC_ARG_VAR_PRECIOUS(VARNAME)
1595 # -----------------------------
1596 # Declare VARNAME is precious.
1598 # We try to diagnose when precious variables have changed. To do this,
1599 # make two early snapshots (after the option processing to take
1600 # explicit variables into account) of those variables: one (ac_env_)
1601 # which represents the current run, and a second (ac_cv_env_) which,
1602 # at the first run, will be saved in the cache. As an exception to
1603 # the cache mechanism, its loading will override these variables (non
1604 # `ac_cv_env_' cache value are only set when unset).
1606 # In subsequent runs, after having loaded the cache, compare
1607 # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
1608 m4_define([_AC_ARG_VAR_PRECIOUS],
1609 [m4_divert_once([PARSE_ARGS],
1610 [ac_env_$1_set=${$1+set}
1612 ac_cv_env_$1_set=${$1+set}
1613 ac_cv_env_$1_value=$$1])dnl
1617 # _AC_ARG_VAR_VALIDATE
1618 # --------------------
1619 m4_define([_AC_ARG_VAR_VALIDATE],
1620 [# Check that the precious variables saved in the cache have kept the same
1622 ac_suggest_removing_cache=false
1623 for ac_var in `(set) 2>&1 |
1624 sed -n 's/^ac_env_\([[a-zA-Z_0-9]]*\)_set=.*/\1/p'`; do
1625 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1626 eval ac_new_set=\$ac_env_${ac_var}_set
1627 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1628 eval ac_new_val="\$ac_env_${ac_var}_value"
1629 case $ac_old_set,$ac_new_set in
1631 AC_MSG_WARN([`$ac_var' was set to `$ac_old_val' in the previous run])
1632 ac_suggest_removing_cache=: ;;
1634 AC_MSG_WARN([`$ac_var' was not set in the previous run])
1635 ac_suggest_removing_cache=: ;;
1638 if test "x$ac_old_val" != "x$ac_new_val"; then
1639 AC_MSG_WARN([`$ac_var' has changed since the previous run:])
1640 AC_MSG_WARN([ former value: $ac_old_val])
1641 AC_MSG_WARN([ current value: $ac_new_val])
1642 ac_suggest_removing_cache=:
1646 if $ac_suggest_removing_cache; then
1647 AC_MSG_WARN([changes in the environment can compromise the build])
1648 AC_MSG_WARN([consider removing $cache_file and starting over])
1650 ])# _AC_ARG_VAR_VALIDATE
1653 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
1654 # ----------------------------------
1655 # Register VARNAME as a precious variable, and document it in
1656 # `configure --help' (but only once).
1657 AC_DEFUN([AC_ARG_VAR],
1658 [m4_divert_once([HELP_VAR], [[
1659 Some influential environment variables:]])dnl
1660 m4_divert_once([HELP_VAR_END], [[
1661 Use these variables to override the choices made by `configure' or to help
1662 it to find libraries and programs with nonstandard names/locations.]])dnl
1663 m4_expand_once([m4_divert_once([HELP_VAR],
1664 [AC_HELP_STRING([$1], [$2], [ ])])],
1666 _AC_ARG_VAR_PRECIOUS([$1])dnl
1674 ## ---------------------------- ##
1675 ## Transforming program names. ##
1676 ## ---------------------------- ##
1681 # This macro is expanded only once, to avoid that `foo' ends up being
1682 # installed as `ggfoo'.
1683 AC_DEFUN_ONCE([AC_ARG_PROGRAM],
1684 [dnl Document the options.
1685 m4_divert_push([HELP_BEGIN])dnl
1688 --program-prefix=PREFIX prepend PREFIX to installed program names
1689 --program-suffix=SUFFIX append SUFFIX to installed program names
1690 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1691 m4_divert_pop([HELP_BEGIN])dnl
1692 if test "$program_transform_name" = s,x,x,; then
1693 program_transform_name=
1695 # Double any \ or $. echo might interpret backslashes.
1696 cat <<\EOF >conftest.sed
1697 s,\\,\\\\,g; s,\$,$$,g
1699 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1702 test "$program_prefix" != NONE &&
1703 program_transform_name="s,^,${program_prefix},;$program_transform_name"
1704 # Use a double $ so make ignores it.
1705 test "$program_suffix" != NONE &&
1706 program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1708 # sed with no file args requires a program.
1709 test -z "$program_transform_name" && program_transform_name="s,x,x,"
1716 ## ------------------------- ##
1717 ## Finding auxiliary files. ##
1718 ## ------------------------- ##
1721 # AC_CONFIG_AUX_DIR(DIR)
1722 # ----------------------
1723 # Find install-sh, config.sub, config.guess, and Cygnus configure
1724 # in directory DIR. These are auxiliary files used in configuration.
1725 # DIR can be either absolute or relative to $srcdir.
1726 AC_DEFUN([AC_CONFIG_AUX_DIR],
1727 [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
1730 # AC_CONFIG_AUX_DIR_DEFAULT
1731 # -------------------------
1732 # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
1733 # There's no need to call this macro explicitly; just AC_REQUIRE it.
1734 AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
1735 [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
1738 # AC_CONFIG_AUX_DIRS(DIR ...)
1739 # ---------------------------
1740 # Internal subroutine.
1741 # Search for the configuration auxiliary files in directory list $1.
1742 # We look only for install-sh, so users of AC_PROG_INSTALL
1743 # do not automatically need to distribute the other auxiliary files.
1744 AC_DEFUN([AC_CONFIG_AUX_DIRS],
1746 for ac_dir in $1; do
1747 if test -f $ac_dir/install-sh; then
1749 ac_install_sh="$ac_aux_dir/install-sh -c"
1751 elif test -f $ac_dir/install.sh; then
1753 ac_install_sh="$ac_aux_dir/install.sh -c"
1755 elif test -f $ac_dir/shtool; then
1757 ac_install_sh="$ac_aux_dir/shtool install -c"
1761 if test -z "$ac_aux_dir"; then
1762 AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
1764 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1765 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1766 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1767 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1768 ])# AC_CONFIG_AUX_DIRS
1773 ## ----------------------------------- ##
1774 ## Getting the canonical system type. ##
1775 ## ----------------------------------- ##
1778 # configure --host=HOST --target=TARGET --build=BUILD
1781 # 1. Build defaults to the current platform, as determined by config.guess.
1782 # 2. Host defaults to build.
1783 # 3. Target defaults to host.
1786 # _AC_CANONICAL_SPLIT(THING)
1787 # --------------------------
1788 # Generate the variables THING, THING_{alias cpu vendor os}.
1789 m4_define([_AC_CANONICAL_SPLIT],
1790 [AC_SUBST([$1], [$ac_cv_$1])dnl
1791 dnl FIXME: AC_SUBST([$1_alias], [$ac_cv_$1_alias])dnl
1793 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])dnl
1794 AC_SUBST([$1_vendor],
1795 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])dnl
1797 [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])dnl
1798 ])# _AC_CANONICAL_SPLIT
1801 # AC_CANONICAL_BUILD
1802 # ------------------
1803 AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
1804 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1805 m4_divert_text([HELP_CANON],
1808 --build=BUILD configure for building on BUILD [guessed]]])dnl
1809 # Make sure we can run config.sub.
1810 $ac_config_sub sun4 >/dev/null 2>&1 ||
1811 AC_MSG_ERROR([cannot run $ac_config_sub])
1813 AC_CACHE_CHECK([build system type], [ac_cv_build],
1814 [ac_cv_build_alias=$build_alias
1815 test -z "$ac_cv_build_alias" &&
1816 ac_cv_build_alias=`$ac_config_guess`
1817 test -z "$ac_cv_build_alias" &&
1818 AC_MSG_ERROR([cannot guess build type; you must specify one])
1819 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1820 AC_MSG_ERROR([$ac_config_sub $ac_cv_build_alias failed.])
1822 _AC_CANONICAL_SPLIT(build)
1823 ])# AC_CANONICAL_BUILD
1828 AC_DEFUN_ONCE([AC_CANONICAL_HOST],
1829 [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1830 m4_divert_text([HELP_CANON],
1831 [[ --host=HOST build programs to run on HOST [BUILD]]])dnl
1832 AC_CACHE_CHECK([host system type], [ac_cv_host],
1833 [ac_cv_host_alias=$host_alias
1834 test -z "$ac_cv_host_alias" &&
1835 ac_cv_host_alias=$ac_cv_build_alias
1836 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1837 AC_MSG_ERROR([$ac_config_sub $ac_cv_host_alias failed])
1839 _AC_CANONICAL_SPLIT([host])
1840 ])# AC_CANONICAL_HOST
1843 # AC_CANONICAL_TARGET
1844 # -------------------
1845 AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
1846 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1847 AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
1848 m4_divert_text([HELP_CANON],
1849 [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
1850 AC_CACHE_CHECK([target system type], [ac_cv_target],
1851 [dnl Set target_alias.
1852 ac_cv_target_alias=$target_alias
1853 test "x$ac_cv_target_alias" = "x" &&
1854 ac_cv_target_alias=$ac_cv_host_alias
1855 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1856 AC_MSG_ERROR([$ac_config_sub $ac_cv_target_alias failed])
1858 _AC_CANONICAL_SPLIT([target])
1860 # The aliases save the names the user supplied, while $host etc.
1861 # will get canonicalized.
1862 test -n "$target_alias" &&
1863 test "$program_prefix$program_suffix$program_transform_name" = \
1865 program_prefix=${target_alias}-[]dnl
1866 ])# AC_CANONICAL_TARGET
1869 AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
1872 # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
1873 # ------------------------------------------
1874 # If the cache file is inconsistent with the current host,
1875 # target and build system types, execute CMD or print a default
1876 # error message. Now handled via _AC_ARG_VAR_PRECIOUS.
1877 AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
1880 ## ---------------------- ##
1881 ## Caching test results. ##
1882 ## ---------------------- ##
1887 # Look for site or system specific initialization scripts.
1888 m4_define([AC_SITE_LOAD],
1889 [# Prefer explicitly selected file to automatically selected ones.
1890 if test -z "$CONFIG_SITE"; then
1891 if test "x$prefix" != xNONE; then
1892 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1894 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1897 for ac_site_file in $CONFIG_SITE; do
1898 if test -r "$ac_site_file"; then
1899 AC_MSG_NOTICE([loading site script $ac_site_file])
1900 cat "$ac_site_file" >&AS_MESSAGE_LOG_FD
1909 m4_define([AC_CACHE_LOAD],
1910 [if test -r "$cache_file"; then
1911 # Some versions of bash will fail to source /dev/null (special
1912 # files actually), so we avoid doing that.
1913 if test -f "$cache_file"; then
1914 AC_MSG_NOTICE([loading cache $cache_file])
1916 [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
1917 *) . ./$cache_file;;
1921 AC_MSG_NOTICE([creating cache $cache_file])
1929 # Dump the cache to stdout. It can be in a pipe (this is a requirement).
1930 m4_define([_AC_CACHE_DUMP],
1931 [# The following way of writing the cache mishandles newlines in values,
1932 # but we know of no workaround that is simple, portable, and efficient.
1933 # So, don't put newlines in cache variables' values.
1934 # Ultrix sh set writes to stderr and can't be redirected directly,
1935 # and sets the high bit in the cache file unless we assign to the vars.
1938 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1940 # `set' does not quote correctly, so add quotes (double-quote
1941 # substitution turns \\\\ into \\, and sed turns \\ into \).
1944 s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
1947 # `set' quotes correctly as required by POSIX, so do not add quotes.
1949 ["s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
1959 # Allow a site initialization script to override cache values.
1960 m4_define([AC_CACHE_SAVE],
1961 [cat >confcache <<\_ACEOF
1962 # This file is a shell script that caches the results of configure
1963 # tests run on this system so they can be shared between configure
1964 # scripts and configure runs, see configure's option --config-cache.
1965 # It is not useful on other systems. If it contains results you don't
1966 # want to keep, you may remove or edit it.
1968 # config.status only pays attention to the cache file if you give it
1969 # the --recheck option to rerun configure.
1971 # `ac_cv_env_foo' variables (set or unset) will be overriden when
1972 # loading this file, other *unset* `ac_cv_foo' will be assigned the
1981 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
1983 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1985 if cmp -s $cache_file confcache; then :; else
1986 if test -w $cache_file; then
1987 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
1988 cat confcache >$cache_file
1990 echo "not updating unwritable cache $cache_file"
1993 rm -f confcache[]dnl
1997 # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
1998 # ------------------------------------------
1999 # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
2000 # Should be dnl'ed. Try to catch common mistakes.
2001 m4_define([AC_CACHE_VAL],
2002 [m4_if(m4_regexp([$2], [AC_DEFINE]), [-1], [],
2003 [AC_DIAGNOSE(syntax,
2004 [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
2005 [where no actions should be taken])])dnl
2006 AC_VAR_SET_IFELSE([$1],
2007 [echo $ECHO_N "(cached) $ECHO_C" >&AS_MESSAGE_FD],
2011 # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
2012 # -------------------------------------------
2013 # Do not call this macro with a dnl right behind.
2014 m4_define([AC_CACHE_CHECK],
2015 [AC_MSG_CHECKING([$1])
2016 AC_CACHE_VAL([$2], [$3])dnl
2017 AC_MSG_RESULT_UNQUOTED([AC_VAR_GET([$2])])])
2021 ## ---------------------- ##
2022 ## Defining CPP symbols. ##
2023 ## ---------------------- ##
2026 # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
2027 # -------------------------------------------
2028 # This macro is useless, it is used only with --trace to collect the
2029 # list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED.
2030 m4_define([AC_DEFINE_TRACE_LITERAL])
2033 # AC_DEFINE_TRACE(CPP-SYMBOL)
2034 # ---------------------------
2035 # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
2036 # out non literal symbols.
2037 m4_define([AC_DEFINE_TRACE],
2038 [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
2041 # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
2042 # -------------------------------------------
2043 # Set VARIABLE to VALUE, verbatim, or 1. Remember the value
2044 # and if VARIABLE is affected the same VALUE, do nothing, else
2045 # die. The third argument is used by autoheader.
2046 m4_define([AC_DEFINE],
2047 [AC_DEFINE_TRACE([$1])dnl
2048 m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
2049 cat >>confdefs.h <<\EOF
2050 [@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
2055 # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
2056 # ----------------------------------------------------
2057 # Similar, but perform shell substitutions $ ` \ once on VALUE.
2058 m4_define([AC_DEFINE_UNQUOTED],
2059 [AC_DEFINE_TRACE([$1])dnl
2060 m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
2061 cat >>confdefs.h <<EOF
2062 [@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
2068 ## -------------------------- ##
2069 ## Setting output variables. ##
2070 ## -------------------------- ##
2073 # _AC_SUBST(VARIABLE, PROGRAM)
2074 # ----------------------------
2075 # If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
2076 # to `_AC_SUBST_SED_PROGRAM'.
2077 m4_define([_AC_SUBST],
2078 [m4_expand_once([m4_append([_AC_SUBST_SED_PROGRAM],
2084 m4_define([_AC_SUBST_SED_PROGRAM])
2087 # AC_SUBST(VARIABLE, [VALUE])
2088 # ---------------------------
2089 # Create an output variable from a shell VARIABLE. If VALUE is given
2090 # assign it to VARIABLE. Use `""' is you want to set VARIABLE to an
2091 # empty value, not an empty second argument.
2093 # Beware that if you change this macro, you also have to change the
2094 # sed script at the top of _AC_OUTPUT_FILES.
2095 m4_define([AC_SUBST],
2096 [m4_ifvaln([$2], [$1=$2])[]dnl
2097 _AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
2101 # AC_SUBST_FILE(VARIABLE)
2102 # -----------------------
2103 # Read the comments of the preceding macro.
2104 m4_define([AC_SUBST_FILE],
2105 [_AC_SUBST([$1], [/@$1@/r [$]$1
2110 ## --------------------------------------- ##
2111 ## Printing messages at autoconf runtime. ##
2112 ## --------------------------------------- ##
2114 # In fact, I think we should promote the use of m4_warn and m4_fatal
2115 # directly. This will also avoid to some people to get it wrong
2116 # between AC_FATAL and AC_MSG_ERROR.
2119 # AC_DIAGNOSE(CATEGORY, MESSAGE)
2120 # AC_FATAL(MESSAGE, [EXIT-STATUS])
2121 # --------------------------------
2122 m4_copy([m4_warn], [AC_DIAGNOSE])
2123 m4_copy([m4_fatal], [AC_FATAL])
2126 # AC_WARNING(MESSAGE)
2127 # -------------------
2128 # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
2130 m4_define([AC_WARNING],
2131 [AC_DIAGNOSE([syntax], [$1])])
2136 ## ---------------------------------------- ##
2137 ## Printing messages at configure runtime. ##
2138 ## ---------------------------------------- ##
2141 # _AC_ECHO_N(STRING, [FD = AS_MESSAGE_FD])
2142 # ------------------------------------
2143 # Same as _AS_ECHO, but echo doesn't return to a new line.
2144 m4_define([_AC_ECHO_N],
2145 [echo $ECHO_N "_AS_QUOTE([$1])$ECHO_C" >&m4_default([$2],
2149 # AC_MSG_CHECKING(FEATURE)
2150 # ------------------------
2151 m4_define([AC_MSG_CHECKING],
2152 [_AS_ECHO([$as_me:__oline__: checking $1], AS_MESSAGE_LOG_FD)
2153 _AC_ECHO_N([checking $1... ])[]dnl
2157 # AC_MSG_RESULT(RESULT)
2158 # ---------------------
2159 m4_define([AC_MSG_RESULT],
2160 [_AS_ECHO([$as_me:__oline__: result: $1], AS_MESSAGE_LOG_FD)
2161 _AS_ECHO([${ECHO_T}$1])[]dnl
2165 # AC_MSG_RESULT_UNQUOTED(RESULT)
2166 # ------------------------------
2167 # Likewise, but perform $ ` \ shell substitutions.
2168 m4_define([AC_MSG_RESULT_UNQUOTED],
2169 [_AS_ECHO_UNQUOTED([$as_me:__oline__: result: $1], AS_MESSAGE_LOG_FD)
2170 _AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
2174 # AC_MSG_WARN(PROBLEM)
2175 # AC_MSG_NOTICE(STRING)
2176 # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
2177 # --------------------------------------
2178 m4_copy([AS_WARN], [AC_MSG_WARN])
2179 m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
2180 m4_copy([AS_ERROR], [AC_MSG_ERROR])
2183 # AU::AC_CHECKING(FEATURE)
2184 # ------------------------
2185 AU_DEFUN([AC_CHECKING],
2186 [AS_MESSAGE([checking $1...])])
2189 # AU::AC_VERBOSE(STRING)
2190 # ----------------------
2191 AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
2198 ## ---------------------------- ##
2199 ## Compiler-running mechanics. ##
2200 ## ---------------------------- ##
2203 # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
2204 # ----------------------------------
2205 # Eval COMMAND, save the exit status in ac_status, and log it.
2206 AC_DEFUN([_AC_RUN_LOG],
2207 [{ ($2) >&AS_MESSAGE_LOG_FD
2208 ($1) 2>&AS_MESSAGE_LOG_FD
2210 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2211 (exit $ac_status); }])
2214 # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
2215 # -----------------------------------------
2216 # Eval COMMAND, save its stderr into conftest.err, save the exit status
2217 # in ac_status, and log it.
2218 # Note that when tracing, most shells will leave the traces in stderr
2219 AC_DEFUN([_AC_RUN_LOG_STDERR],
2220 [{ ($2) >&AS_MESSAGE_LOG_FD
2223 egrep -v '^ *\+' conftest.er1 >conftest.err
2225 cat conftest.err >&AS_MESSAGE_LOG_FD
2226 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2227 (exit $ac_status); }])
2232 # Eval COMMAND, save the exit status in ac_status, and log it.
2233 AC_DEFUN([_AC_EVAL],
2234 [_AC_RUN_LOG([eval $1],
2235 [eval echo "$as_me:__oline__: \"$1\""])])
2238 # _AC_EVAL_STDERR(COMMAND)
2239 # ------------------------
2240 # Eval COMMAND, save its stderr into conftest.err, save the exit status
2241 # in ac_status, and log it.
2242 # Note that when tracing, most shells will leave the traces in stderr
2243 AC_DEFUN([_AC_EVAL_STDERR],
2244 [_AC_RUN_LOG_STDERR([eval $1],
2245 [eval echo "$as_me:__oline__: \"$1\""])])
2248 # AC_TRY_EVAL(VARIABLE)
2249 # ---------------------
2250 # The purpose of this macro is to "configure:123: command line"
2251 # written into config.log for every test run.
2252 AC_DEFUN([AC_TRY_EVAL],
2256 # AC_TRY_COMMAND(COMMAND)
2257 # -----------------------
2258 AC_DEFUN([AC_TRY_COMMAND],
2260 _AC_EVAL([$ac_try]); }])
2263 # AC_RUN_LOG(COMMAND)
2264 # -------------------
2265 AC_DEFUN([AC_RUN_LOG],
2267 [echo "$as_me:__oline__: AS_ESCAPE([$1])"])])
2270 ## ------------------ ##
2271 ## Default includes. ##
2272 ## ------------------ ##
2274 # Always use the same set of default headers for all the generic
2275 # macros. It is easier to document, to extend, and to understand than
2276 # having specific defaults for each macro.
2278 # _AC_INCLUDES_DEFAULT_REQUIREMENTS
2279 # ---------------------------------
2280 # Required when AC_INCLUDES_DEFAULT uses its default branch.
2281 AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
2282 [m4_divert_text([DEFAULTS],
2283 [# Factoring default headers for most tests.
2284 dnl If ever you change this variable, please keep autoconf.texi in sync.
2285 ac_includes_default="\
2287 #include <sys/types.h>
2288 #include <sys/stat.h>
2290 # include <stdlib.h>
2291 # include <stddef.h>
2294 # include <stdlib.h>
2298 # if !STDC_HEADERS && HAVE_MEMORY_H
2299 # include <memory.h>
2301 # include <string.h>
2304 # include <strings.h>
2308 # include <inttypes.h>
2311 # include <unistd.h>
2314 AC_REQUIRE([AC_HEADER_STDC])dnl
2315 AC_CHECK_HEADERS(stdlib.h string.h memory.h strings.h inttypes.h unistd.h)
2319 # AC_INCLUDES_DEFAULT([INCLUDES])
2320 # -------------------------------
2321 # If INCLUDES is empty, expand in default includes, otherwise in
2323 # In most cases INCLUDES is not double quoted as it should, and if
2324 # for instance INCLUDES = `#include <stdio.h>' then unless we force
2325 # a newline, the hash will swallow the closing paren etc. etc.
2326 # The usual failure.
2327 # Take no risk: for the newline.
2328 AC_DEFUN([AC_INCLUDES_DEFAULT],
2331 [AC_REQUIRE([_AC_INCLUDES_DEFAULT_REQUIREMENTS])dnl
2332 $ac_includes_default])])
2337 ## ----------------------- ##
2338 ## Checking for programs. ##
2339 ## ----------------------- ##
2342 # AC_SHELL_PATH_WALK([PATH = $PATH], BODY)
2343 # ----------------------------------------
2344 # Walk through PATH running BODY for each `ac_dir'.
2346 # `$ac_dummy' forces splitting on constant user-supplied paths.
2347 # POSIX.2 word splitting is done only on the output of word
2348 # expansions, not every word. This closes a longstanding sh security
2350 m4_define([AC_SHELL_PATH_WALK],
2351 [ac_save_IFS=$IFS; IFS=$ac_path_separator
2352 ac_dummy="m4_default([$1], [$PATH])"
2353 for ac_dir in $ac_dummy; do
2355 test -z "$ac_dir" && ac_dir=.
2361 # AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR,
2362 # [VALUE-IF-FOUND], [VALUE-IF-NOT-FOUND],
2364 # -----------------------------------------------------
2365 AC_DEFUN([AC_CHECK_PROG],
2366 [# Extract the first word of "$2", so it can be a program name with args.
2367 set dummy $2; ac_word=$[2]
2368 AC_MSG_CHECKING([for $ac_word])
2369 AC_CACHE_VAL(ac_cv_prog_$1,
2370 [if test -n "$$1"; then
2371 ac_cv_prog_$1="$$1" # Let the user override the test.
2374 [ ac_prog_rejected=no])dnl
2375 AC_SHELL_PATH_WALK([$5],
2376 [AS_EXECUTABLE_P("$ac_dir/$ac_word") || continue
2378 [if test "$ac_dir/$ac_word" = "$6"; then
2379 ac_prog_rejected=yes
2385 [if test $ac_prog_rejected = yes; then
2386 # We found a bogon in the path, so make sure we never use it.
2387 set dummy $ac_cv_prog_$1
2389 if test $[@%:@] != 0; then
2390 # We chose a different compiler from the bogus one.
2391 # However, it has the same basename, so the bogon will be chosen
2392 # first if we set $1 to just the basename; use the full file name.
2394 set dummy "$ac_dir/$ac_word" ${1+"$[@]"}
2396 ac_cv_prog_$1="$[@]"
2399 # Default is a loser.
2400 AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
2401 m4_default([$5], [\$PATH])])
2405 dnl If no 4th arg is given, leave the cache variable unset,
2406 dnl so AC_CHECK_PROGS will keep looking.
2408 [ test -z "$ac_cv_prog_$1" && ac_cv_prog_$1="$4"])dnl
2411 if test -n "$$1"; then
2412 AC_MSG_RESULT([$$1])
2420 # AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
2422 # ------------------------------------------------------------------
2423 AC_DEFUN([AC_CHECK_PROGS],
2426 AC_CHECK_PROG([$1], [$ac_prog], [$ac_prog], , [$4])
2427 test -n "$$1" && break
2429 m4_ifvaln([$3], [test -n "$$1" || $1="$3"])])
2432 # AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
2433 # -----------------------------------------------------------------------
2434 AC_DEFUN([AC_PATH_PROG],
2435 [# Extract the first word of "$2", so it can be a program name with args.
2436 set dummy $2; ac_word=$[2]
2437 AC_MSG_CHECKING([for $ac_word])
2438 AC_CACHE_VAL([ac_cv_path_$1],
2440 [[\\/]]* | ?:[[\\/]]*)
2441 ac_cv_path_$1="$$1" # Let the user override the test with a path.
2444 AC_SHELL_PATH_WALK([$4],
2445 [if AS_EXECUTABLE_P("$ac_dir/$ac_word"); then
2446 ac_cv_path_$1="$ac_dir/$ac_word"
2449 dnl If no 3rd arg is given, leave the cache variable unset,
2450 dnl so AC_PATH_PROGS will keep looking.
2452 [ test -z "$ac_cv_path_$1" && ac_cv_path_$1="$3"])dnl
2455 AC_SUBST([$1], [$ac_cv_path_$1])
2456 if test -n "$$1"; then
2457 AC_MSG_RESULT([$$1])
2464 # AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
2466 # -----------------------------------------------------------------
2467 AC_DEFUN([AC_PATH_PROGS],
2470 AC_PATH_PROG([$1], [$ac_prog], , [$4])
2471 test -n "$$1" && break
2473 m4_ifvaln([$3], [test -n "$$1" || $1="$3"])dnl
2479 ## -------------------- ##
2480 ## Checking for tools. ##
2481 ## -------------------- ##
2484 # AC_CHECK_TOOL_PREFIX
2485 # --------------------
2486 AU_DEFUN([AC_CHECK_TOOL_PREFIX])
2489 # AC_PATH_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
2490 # -----------------------------------------------------------------------
2491 # (Use different variables $1 and ac_pt_$1 so that cache vars don't conflict.)
2492 AC_DEFUN([AC_PATH_TOOL],
2493 [if test -n "$ac_tool_prefix"; then
2494 AC_PATH_PROG([$1], [${ac_tool_prefix}$2], , [$4])
2496 if test -z "$ac_cv_path_$1"; then
2498 AC_PATH_PROG([ac_pt_$1], [$2], [$3], [$4])
2506 # AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
2507 # ------------------------------------------------------------------------
2508 # (Use different variables $1 and ac_ct_$1 so that cache vars don't conflict.)
2509 AC_DEFUN([AC_CHECK_TOOL],
2510 [if test -n "$ac_tool_prefix"; then
2511 AC_CHECK_PROG([$1], [${ac_tool_prefix}$2], [${ac_tool_prefix}$2], , [$4])
2513 if test -z "$ac_cv_prog_$1"; then
2515 AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4])
2523 # AC_CHECK_TOOLS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
2525 # ------------------------------------------------------------------
2526 # Check for each tool in PROGS-TO-CHECK-FOR with the cross prefix. If
2527 # none can be found with a cross prefix, then use the first one that
2528 # was found without the cross prefix.
2529 AC_DEFUN([AC_CHECK_TOOLS],
2530 [if test -n "$ac_tool_prefix"; then
2534 [$ac_tool_prefix$ac_prog], [$ac_tool_prefix$ac_prog],,
2536 test -n "$$1" && break
2539 if test -z "$$1"; then
2541 AC_CHECK_PROGS([ac_ct_$1], [$2], [$3], [$4])
2547 # AC_PREFIX_PROGRAM(PROGRAM)
2548 # --------------------------
2549 # Guess the value for the `prefix' variable by looking for
2550 # the argument program along PATH and taking its parent.
2551 # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
2552 # set `prefix' to /usr/local/gnu.
2553 # This comes too late to find a site file based on the prefix,
2554 # and it might use a cached value for the path.
2555 # No big loss, I think, since most configures don't use this macro anyway.
2556 AC_DEFUN([AC_PREFIX_PROGRAM],
2557 [dnl Get an upper case version of $[1].
2558 m4_pushdef([AC_Prog], m4_toupper([$1]))dnl
2559 if test "x$prefix" = xNONE; then
2560 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
2561 echo $ECHO_N "checking for prefix by $ECHO_C" >&AS_MESSAGE_FD
2562 AC_PATH_PROG(m4_quote(AC_Prog), [$1])
2563 if test -n "$ac_cv_path_[]AC_Prog"; then
2564 prefix=`AS_DIRNAME(["$ac_cv_path_[]AC_Prog"])`
2567 m4_popdef([AC_Prog])dnl
2568 ])# AC_PREFIX_PROGRAM
2573 ## ------------------------ ##
2574 ## Checking for libraries. ##
2575 ## ------------------------ ##
2578 # AC_TRY_LINK_FUNC(FUNC, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
2579 # ------------------------------------------------------------
2580 # Try to link a program that calls FUNC, handling GCC builtins. If
2581 # the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
2582 # ACTION-IF-NOT-FOUND.
2583 AC_DEFUN([AC_TRY_LINK_FUNC],
2584 [AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [$2], [$3])])
2587 # AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
2588 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2589 # [OTHER-LIBRARIES])
2590 # --------------------------------------------------------
2591 # Search for a library defining FUNC, if it's not already available.
2592 AC_DEFUN([AC_SEARCH_LIBS],
2593 [AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
2594 [ac_func_search_save_LIBS=$LIBS
2596 AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
2597 test "$ac_cv_search_$1" = no && for ac_lib in $2; do
2598 LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
2599 AC_TRY_LINK_FUNC([$1],
2600 [ac_cv_search_$1="-l$ac_lib"
2603 LIBS=$ac_func_search_save_LIBS])
2604 AS_IF([test "$ac_cv_search_$1" != no],
2605 [test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
2612 # AC_CHECK_LIB(LIBRARY, FUNCTION,
2613 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2614 # [OTHER-LIBRARIES])
2615 # ------------------------------------------------------
2617 # Use a cache variable name containing both the library and function name,
2618 # because the test really is for library $1 defining function $2, not
2619 # just for library $1. Separate tests with the same $1 and different $2s
2620 # may have different results.
2622 # FIXME: This macro is extremely suspicious. It DEFINEs unconditionnally,
2623 # whatever the FUNCTION, in addition to not being a *S macro. Note
2624 # that the cache does depend upon the function we are looking for.
2626 # It is on purpose we used `ac_check_lib_save_LIBS' and not just
2627 # `ac_save_LIBS': there are many macros which don't want to see `LIBS'
2628 # changed but still want to use AC_CHECK_LIB, so they save `LIBS'.
2629 # And ``ac_save_LIBS' is too tempting a name, so let's leave them some
2631 AC_DEFUN([AC_CHECK_LIB],
2632 [m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl
2633 AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl
2634 AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
2635 [ac_check_lib_save_LIBS=$LIBS
2636 LIBS="-l$1 $5 $LIBS"
2637 AC_TRY_LINK_FUNC([$2],
2638 [AC_VAR_SET(ac_Lib, yes)],
2639 [AC_VAR_SET(ac_Lib, no)])
2640 LIBS=$ac_check_lib_save_LIBS])
2641 AS_IF([test AC_VAR_GET(ac_Lib) = yes],
2642 [m4_default([$3], [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1))
2646 AC_VAR_POPDEF([ac_Lib])dnl
2650 # AH_CHECK_LIB(LIBNAME)
2651 # ---------------------
2652 m4_define([AH_CHECK_LIB],
2653 [AH_TEMPLATE(AC_TR_CPP(HAVE_LIB$1),
2654 [Define if you have the `]$1[' library (-l]$1[).])])
2657 # AC_HAVE_LIBRARY(LIBRARY,
2658 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2659 # [OTHER-LIBRARIES])
2660 # ---------------------------------------------------------
2662 # This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION
2663 # argument of `main'. In addition, LIBRARY can be written as any of
2664 # `foo', `-lfoo', or `libfoo.a'. In all of those cases, the compiler
2665 # is passed `-lfoo'. However, LIBRARY cannot be a shell variable;
2666 # it must be a literal name.
2667 AU_DEFUN([AC_HAVE_LIBRARY],
2668 [m4_pushdef([AC_Lib_Name],
2669 m4_patsubst(m4_patsubst([[$1]],
2670 [lib\([^\.]*\)\.a], [\1]),
2672 AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl
2673 ac_cv_lib_[]AC_Lib_Name()=ac_cv_lib_[]AC_Lib_Name()_main
2674 m4_popdef([AC_Lib_Name])dnl
2679 ## ------------------------ ##
2680 ## Examining declarations. ##
2681 ## ------------------------ ##
2685 # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2686 # ----------------------------------------------------------------
2687 # Try to preprocess PROGRAM.
2689 # Run cpp and set ac_cpp_err to "yes" for an error, to
2690 # "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
2691 # neither warnings nor errors have been detected. eval is necessary
2694 # This macro can be used during the selection of a preprocessor.
2695 AC_DEFUN([_AC_PREPROC_IFELSE],
2696 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2697 if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext >/dev/null]); then
2698 if test -s conftest.err; then
2699 ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
2706 if test -z "$ac_cpp_err"; then
2709 echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
2710 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2713 rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
2714 ])# _AC_PREPROC_IFELSE
2717 # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2718 # ---------------------------------------------------------------
2719 # Try to preprocess PROGRAM. Requires that the preprocessor for the
2720 # current language was checked for, hence do not use this macro in macros
2721 # looking for a preprocessor.
2722 AC_DEFUN([AC_PREPROC_IFELSE],
2723 [AC_LANG_PREPROC_REQUIRE()dnl
2724 _AC_PREPROC_IFELSE($@)])
2727 # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2728 # ---------------------------------------------------------
2729 # AC_TRY_CPP is used to check whether particular header files exist.
2730 # (But it actually tests whether INCLUDES produces no CPP errors.)
2732 # INCLUDES are not defaulted and are double quoted.
2733 AC_DEFUN([AC_TRY_CPP],
2734 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
2737 # AC_EGREP_CPP(PATTERN, PROGRAM,
2738 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2739 # ------------------------------------------------------
2740 # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
2741 # come early, it is not included in AC_BEFORE checks.
2742 AC_DEFUN([AC_EGREP_CPP],
2743 [AC_LANG_PREPROC_REQUIRE()dnl
2744 AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
2745 dnl eval is necessary to expand ac_cpp.
2746 dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
2747 if (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
2748 dnl Quote $1 to prevent m4 from eating character classes
2749 egrep "[$1]" >/dev/null 2>&1; then
2751 m4_ifvaln([$4], [else
2758 # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
2759 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2760 # ---------------------------------------------------------
2761 AC_DEFUN([AC_EGREP_HEADER],
2769 ## ------------------ ##
2770 ## Examining syntax. ##
2771 ## ------------------ ##
2774 # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2775 # ---------------------------------------------------------------------
2776 # Try to compile PROGRAM.
2777 # This macro can be used during the selection of a compiler.
2778 m4_define([_AC_COMPILE_IFELSE],
2779 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2780 rm -f conftest.$ac_objext
2781 AS_IF([AC_TRY_EVAL(ac_compile) &&
2782 AC_TRY_COMMAND([test -s conftest.$ac_objext])],
2784 [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
2785 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2786 m4_ifvaln([$3],[$3])dnl])dnl
2787 rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2788 ])# _AC_COMPILE_IFELSE
2791 # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2792 # --------------------------------------------------------------------
2793 # Try to compile PROGRAM. Requires that the compiler for the current
2794 # language was checked for, hence do not use this macro in macros looking
2796 AC_DEFUN([AC_COMPILE_IFELSE],
2797 [AC_LANG_COMPILER_REQUIRE()dnl
2798 _AC_COMPILE_IFELSE($@)])
2801 # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
2802 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2803 # --------------------------------------------------------
2804 AC_DEFUN([AC_TRY_COMPILE],
2805 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2809 ## --------------------- ##
2810 ## Examining libraries. ##
2811 ## --------------------- ##
2814 # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2815 # ------------------------------------------------------------------
2816 # Try to link PROGRAM.
2817 # This macro can be used during the selection of a compiler.
2818 m4_define([_AC_LINK_IFELSE],
2819 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2820 rm -f conftest.$ac_objext conftest$ac_exeext
2821 AS_IF([AC_TRY_EVAL(ac_link) &&
2822 AC_TRY_COMMAND([test -s conftest$ac_exeext])],
2824 [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
2825 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2826 m4_ifvaln([$3], [$3])dnl])[]dnl
2827 rm -f conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2831 # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2832 # -----------------------------------------------------------------
2833 # Try to link PROGRAM. Requires that the compiler for the current
2834 # language was checked for, hence do not use this macro in macros looking
2836 AC_DEFUN([AC_LINK_IFELSE],
2837 [AC_LANG_COMPILER_REQUIRE()dnl
2838 _AC_LINK_IFELSE($@)])
2841 # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
2842 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2843 # -----------------------------------------------------
2844 # Should the INCLUDES be defaulted here?
2845 # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
2846 # FIXME: WARNING: The code to compile was different in the case of
2847 # Fortran between AC_TRY_COMPILE and AC_TRY_LINK, though they should
2848 # equivalent as far as I can tell from the semantics and the docs. In
2849 # the former, $[2] is used as is, in the latter, it is `call' ed.
2850 # Remove these FIXME: once truth established.
2851 AC_DEFUN([AC_TRY_LINK],
2852 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
2855 # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
2856 # ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
2857 # --------------------------------------------------------
2858 AU_DEFUN([AC_COMPILE_CHECK],
2859 [m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl
2860 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
2866 ## -------------------------------- ##
2867 ## Checking for run-time features. ##
2868 ## -------------------------------- ##
2871 # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
2872 # ------------------------------------------------------------
2873 # Compile, link, and run.
2874 # This macro can be used during the selection of a compiler.
2875 m4_define([_AC_RUN_IFELSE],
2876 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
2877 rm -f conftest$ac_exeext
2878 AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
2880 [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
2881 echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
2882 cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
2883 m4_ifvaln([$3], [$3])dnl])[]dnl
2884 rm -f conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
2888 # AC_RUN_IFELSE(PROGRAM,
2889 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2890 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2891 # ----------------------------------------------------------
2892 # Compile, link, and run. Requires that the compiler for the current
2893 # language was checked for, hence do not use this macro in macros looking
2895 AC_DEFUN([AC_RUN_IFELSE],
2896 [AC_LANG_COMPILER_REQUIRE()dnl
2898 [AC_DIAGNOSE([cross],
2899 [$0 called without default to allow cross compiling])])dnl
2900 if test "$cross_compiling" = yes; then
2902 [AC_MSG_ERROR([cannot run test program while cross compiling])])
2908 # AC_TRY_RUN(PROGRAM,
2909 # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
2910 # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
2911 # --------------------------------------------------------
2912 AC_DEFUN([AC_TRY_RUN],
2913 [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
2917 ## ------------------------------------- ##
2918 ## Checking for the existence of files. ##
2919 ## ------------------------------------- ##
2921 # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2922 # -------------------------------------------------------------
2924 # Check for the existence of FILE.
2925 AC_DEFUN([AC_CHECK_FILE],
2926 [AC_DIAGNOSE([cross],
2927 [cannot check for file existence when cross compiling])dnl
2928 AC_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
2929 AC_CACHE_CHECK([for $1], ac_File,
2930 [test "$cross_compiling" = yes &&
2931 AC_MSG_ERROR([cannot check for file existence when cross compiling])
2932 if test -r "$1"; then
2933 AC_VAR_SET(ac_File, yes)
2935 AC_VAR_SET(ac_File, no)
2937 AS_IF([test AC_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
2938 AC_VAR_POPDEF([ac_File])dnl
2942 # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2943 # -----------------------------------------------------------------
2944 AC_DEFUN([AC_CHECK_FILES],
2945 [AC_FOREACH([AC_FILE_NAME], [$1],
2946 [AC_CHECK_FILE(AC_FILE_NAME,
2947 [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
2948 [Define if you have the file `]AC_File['.])
2953 ## ------------------------------- ##
2954 ## Checking for declared symbols. ##
2955 ## ------------------------------- ##
2958 # AC_CHECK_DECL(SYMBOL,
2959 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2961 # -------------------------------------------------------
2962 # Check if SYMBOL (a variable or a function) is declared.
2963 AC_DEFUN([AC_CHECK_DECL],
2964 [AC_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
2965 AC_CACHE_CHECK([whether $1 is declared], ac_Symbol,
2966 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
2968 char *p = (char *) $1;
2971 [AC_VAR_SET(ac_Symbol, yes)],
2972 [AC_VAR_SET(ac_Symbol, no)])])
2973 AS_IF([test AC_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl
2974 AC_VAR_POPDEF([ac_Symbol])dnl
2978 # AC_CHECK_DECLS(SYMBOLS,
2979 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
2981 # --------------------------------------------------------
2982 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
2983 # documentation for a detailed explanation of this difference with
2984 # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
2985 AC_DEFUN([AC_CHECK_DECLS],
2986 [m4_foreach([AC_Symbol], [$1],
2987 [AC_CHECK_DECL(AC_Symbol,
2988 [AC_DEFINE_UNQUOTED(AC_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
2989 [Define to 1 if you have the declaration
2990 of `]AC_Symbol[', and to 0 if you don't.])
2992 [AC_DEFINE_UNQUOTED(AC_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
2998 ## -------------------------------- ##
2999 ## Checking for library functions. ##
3000 ## -------------------------------- ##
3003 # AC_LIBSOURCE(FILENAME)
3004 # ----------------------
3005 # Announce we might need the file `FILENAME'.
3006 m4_define([AC_LIBSOURCE], [])
3009 # AC_LIBSOURCES([FILENAME1, ...])
3010 # -------------------------------
3011 # Announce we might need these files.
3012 m4_define([AC_LIBSOURCES],
3013 [m4_foreach([_AC_FILENAME], [$1],
3014 [AC_LIBSOURCE(_AC_FILENAME)])])
3017 # _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
3018 # -------------------------------------------
3019 # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
3020 # We don't use AC_SUBST/2 because it forces an unneeded eol.
3021 m4_define([_AC_LIBOBJ],
3022 [AS_LITERAL_IF([$1],
3023 [AC_LIBSOURCE([$1.c])],
3025 AC_SUBST([LIBOBJS])dnl
3026 LIBOBJS="$LIBOBJS $1.$ac_objext"])
3029 # AC_LIBOBJ(FILENAME-NOEXT)
3030 # -------------------------
3031 # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
3032 # We don't use AC_SUBST/2 because it forces an unneeded eol.
3033 m4_define([AC_LIBOBJ],
3035 [AC_DIAGNOSE(syntax,
3036 [$0($1): you should use literals])])dnl
3041 ## ----------------------------------- ##
3042 ## Checking compiler characteristics. ##
3043 ## ----------------------------------- ##
3046 # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES])
3047 # ---------------------------------------------------------
3048 # Compute the integer EXPRESSION and store the result in the VARIABLE.
3049 # Works OK if cross compiling.
3050 m4_define([_AC_COMPUTE_INT_COMPILE],
3051 [# Depending upon the size, compute the lo and hi bounds.
3052 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
3055 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
3056 [ac_hi=$ac_mid; break],
3057 [ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`])
3061 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
3062 [ac_lo=$ac_mid; break],
3063 [ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`])
3065 # Binary search between lo and hi bounds.
3066 while test "x$ac_lo" != "x$ac_hi"; do
3067 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
3068 AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
3069 [ac_hi=$ac_mid], [ac_lo=`expr $ac_mid + 1`])
3072 ])# _AC_COMPUTE_INT_COMPILE
3075 # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
3076 # -----------------------------------------------------------------
3077 # Store the evaluation of the integer EXPRESSION in VARIABLE.
3078 m4_define([_AC_COMPUTE_INT_RUN],
3079 [AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
3080 [$2=`cat conftest.val`], [$4])])
3083 # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
3084 # ---------------------------------------------------------
3085 m4_define([_AC_COMPUTE_INT],
3086 [if test "$cross_compiling" = yes; then
3087 _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3])
3089 _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
3091 rm -f conftest.val[]dnl
3095 ## ----------------------- ##
3096 ## Creating output files. ##
3097 ## ----------------------- ##
3100 # This section handles about all the preparation aspects for
3101 # `config.status': registering the configuration files, the headers,
3102 # the links, and the commands `config.status' will run. There is a
3103 # little mixture though of things actually handled by `configure',
3104 # such as running the `configure' in the sub directories. Minor
3107 # There are two kinds of commands:
3111 # They are output into `config.status' via a quoted here doc. These
3112 # commands are always associated to a tag which the user can use to
3113 # tell `config.status' what are the commands she wants to run.
3117 # They are output via an *unquoted* here-doc. As a consequence $var
3118 # will be output as the value of VAR. This is typically used by
3119 # `configure' to give `config,.status' some variables it needs to run
3120 # the COMMANDS. At the difference of `COMMANDS', the INIT-CMDS are
3124 # Some uniformity exists around here, please respect it!
3126 # A macro named AC_CONFIG_FOOS has three args: the `TAG...' (or
3127 # `FILE...' when it applies), the `COMMANDS' and the `INIT-CMDS'. It
3128 # first checks that TAG was not registered elsewhere thanks to
3129 # AC_CONFIG_UNIQUE. Then it registers `TAG...' in AC_LIST_FOOS, and for
3130 # each `TAG', a special line in AC_LIST_FOOS_COMMANDS which is used in
3131 # `config.status' like this:
3134 # AC_LIST_FOOS_COMMANDS
3137 # Finally, the `INIT-CMDS' are dumped into a special diversion, via
3138 # `_AC_CONFIG_COMMANDS_INIT'. While `COMMANDS' are output once per TAG,
3139 # `INIT-CMDS' are dumped only once per call to AC_CONFIG_FOOS.
3141 # It also leave the TAG in the shell variable ac_config_foo which contains
3142 # those which will actually be executed. In other words:
3145 # AC_CONFIG_FOOS(bar, [touch bar])
3148 # will not create bar.
3150 # AC_CONFIG_FOOS can be called several times (with different TAGs of
3153 # Because these macros should not output anything, there should be `dnl'
3154 # everywhere. A pain my friend, a pain. So instead in each macro we
3155 # divert(-1) and restore the diversion at the end.
3158 # Honorable members of this family are AC_CONFIG_FILES,
3159 # AC_CONFIG_HEADERS, AC_CONFIG_LINKS and AC_CONFIG_COMMANDS. Bad boys
3160 # are AC_LINK_FILES, AC_OUTPUT_COMMANDS and AC_OUTPUT when used with
3161 # arguments. False members are AC_CONFIG_SRCDIR, AC_CONFIG_SUBDIRS
3162 # and AC_CONFIG_AUX_DIR. Cousins are AC_CONFIG_COMMANDS_PRE and
3163 # AC_CONFIG_COMMANDS_POST.
3167 # AC_CONFIG_IF_MEMBER(DEST, LIST, ACTION-IF-TRUE, ACTION-IF-FALSE)
3168 # ----------------------------------------------------------------
3169 # If DEST is member of LIST, expand to ACTION-IF-TRUE, else ACTION-IF-FALSE.
3171 # LIST is an AC_CONFIG list, i.e., a list of DEST[:SOURCE], separated
3174 # FIXME: This macro is badly designed, but I'm not guilty: m4 is. There
3175 # is just no way to simply compare two strings in m4, but to use pattern
3176 # matching. The big problem is then that the active characters should
3177 # be quoted. Currently `+*.' are quoted.
3178 m4_define([AC_CONFIG_IF_MEMBER],
3179 [m4_if(m4_regexp($2, [\(^\| \)]m4_patsubst([$1],
3180 [\([+*.]\)], [\\\1])[\(:\| \|$\)]),
3184 # AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
3185 # -----------------------------------------------------
3186 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
3187 # It announces DEST depends upon the SOURCE1 etc.
3188 m4_define([AC_FILE_DEPENDENCY_TRACE], [])
3191 # _AC_CONFIG_DEPENDENCY(DEST, [SOURCE1], [SOURCE2...])
3192 # ----------------------------------------------------
3193 # Be sure that a missing dependency is expressed as a dependency upon
3195 m4_define([_AC_CONFIG_DEPENDENCY],
3197 [AC_FILE_DEPENDENCY_TRACE($@)],
3198 [AC_FILE_DEPENDENCY_TRACE([$1], [$1.in])])])
3201 # _AC_CONFIG_DEPENDENCIES(DEST[:SOURCE1[:SOURCE2...]]...)
3202 # -------------------------------------------------------
3203 # Declare the DESTs depend upon their SOURCE1 etc.
3204 m4_define([_AC_CONFIG_DEPENDENCIES],
3205 [m4_divert_push([KILL])
3206 AC_FOREACH([AC_File], [$1],
3207 [_AC_CONFIG_DEPENDENCY(m4_patsubst(AC_File, [:], [,]))])
3208 m4_divert_pop([KILL])dnl
3212 # _AC_CONFIG_UNIQUE(DEST[:SOURCE]...)
3213 # -----------------------------------
3215 # Verify that there is no double definition of an output file
3216 # (precisely, guarantees there is no common elements between
3217 # CONFIG_HEADERS, CONFIG_FILES, CONFIG_LINKS, and CONFIG_SUBDIRS).
3219 # Note that this macro does not check if the list $[1] itself
3221 m4_define([_AC_CONFIG_UNIQUE],
3222 [m4_divert_push([KILL])
3223 AC_FOREACH([AC_File], [$1],
3224 [m4_pushdef([AC_Dest], m4_patsubst(AC_File, [:.*]))
3225 AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_HEADERS],
3226 [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_HEADER or AC_CONFIG_HEADERS.])])
3227 AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_LINKS],
3228 [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_LINKS.])])
3229 AC_CONFIG_IF_MEMBER(AC_Dest, [_AC_LIST_SUBDIRS],
3230 [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_SUBDIRS.])])
3231 AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_COMMANDS],
3232 [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_COMMANDS.])])
3233 AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_FILES],
3234 [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_FILES or AC_OUTPUT.])])
3235 m4_popdef([AC_Dest])])
3236 m4_divert_pop([KILL])dnl
3240 # _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS])
3241 # -----------------------------------------
3243 # Register INIT-COMMANDS as command pasted *unquoted* in
3244 # `config.status'. This is typically used to pass variables from
3245 # `configure' to `config.status'. Note that $[1] is not over quoted as
3246 # was the case in AC_OUTPUT_COMMANDS.
3247 m4_define([_AC_CONFIG_COMMANDS_INIT],
3249 [m4_append([_AC_OUTPUT_COMMANDS_INIT],
3254 m4_define([_AC_OUTPUT_COMMANDS_INIT])
3257 # AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
3258 # ---------------------------------------------------
3260 # Specify additional commands to be run by config.status. This
3261 # commands must be associated with a NAME, which should be thought
3262 # as the name of a file the COMMANDS create.
3263 AC_DEFUN([AC_CONFIG_COMMANDS],
3264 [m4_divert_push([KILL])
3265 _AC_CONFIG_UNIQUE([$1])
3266 m4_append([AC_LIST_COMMANDS], [ $1])
3268 m4_if([$2],,, [AC_FOREACH([AC_Name], [$1],
3269 [m4_append([AC_LIST_COMMANDS_COMMANDS],
3270 [ ]m4_patsubst(AC_Name, [:.*])[ ) $2 ;;
3272 _AC_CONFIG_COMMANDS_INIT([$3])
3273 m4_divert_pop([KILL])dnl
3274 ac_config_commands="$ac_config_commands $1"
3277 # Initialize the lists.
3278 m4_define([AC_LIST_COMMANDS])
3279 m4_define([AC_LIST_COMMANDS_COMMANDS])
3282 # AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
3283 # -----------------------------------------
3285 # Add additional commands for AC_OUTPUT to put into config.status.
3287 # This macro is an obsolete version of AC_CONFIG_COMMANDS. The only
3288 # difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is
3289 # to give a unique key. The scheme we have chosen is `default-1',
3290 # `default-2' etc. for each call.
3292 # Unfortunately this scheme is fragile: bad things might happen
3293 # if you update an included file and configure.ac: you might have
3294 # clashes :( On the other hand, I'd like to avoid weird keys (e.g.,
3295 # depending upon __file__ or the pid).
3296 AU_DEFUN([AC_OUTPUT_COMMANDS],
3297 [m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
3298 dnl Double quoted since that was the case in the original macro.
3299 AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
3303 AU_DEFUN([_AC_OUTPUT_COMMANDS_CNT], 0)
3306 # AC_CONFIG_COMMANDS_PRE(CMDS)
3307 # ----------------------------
3308 # Commands to run right before config.status is created. Accumulates.
3309 AC_DEFUN([AC_CONFIG_COMMANDS_PRE],
3310 [m4_append([AC_OUTPUT_COMMANDS_PRE], [$1
3314 m4_define([AC_OUTPUT_COMMANDS_PRE])
3317 # AC_CONFIG_COMMANDS_POST(CMDS)
3318 # -----------------------------
3319 # Commands to run after config.status was created. Accumulates.
3320 AC_DEFUN([AC_CONFIG_COMMANDS_POST],
3321 [m4_append([AC_OUTPUT_COMMANDS_POST], [$1
3325 m4_define([AC_OUTPUT_COMMANDS_POST])
3328 # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
3329 # ------------------------------------------------------
3330 # Specify that the HEADERS are to be created by instantiation of the
3331 # AC_DEFINEs. Associate the COMMANDS to the HEADERS. This macro
3332 # accumulates if called several times.
3334 # The commands are stored in a growing string AC_LIST_HEADERS_COMMANDS
3335 # which should be used like this:
3338 # AC_LIST_HEADERS_COMMANDS
3340 AC_DEFUN([AC_CONFIG_HEADERS],
3341 [m4_divert_push([KILL])
3342 _AC_CONFIG_UNIQUE([$1])
3343 _AC_CONFIG_DEPENDENCIES([$1])
3344 m4_append([AC_LIST_HEADERS], [ $1])
3345 dnl Register the commands
3346 m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
3347 [m4_append([AC_LIST_HEADERS_COMMANDS],
3348 [ ]m4_patsubst(AC_File, [:.*])[ ) $2 ;;
3350 _AC_CONFIG_COMMANDS_INIT([$3])
3351 m4_divert_pop([KILL])dnl
3352 ac_config_headers="$ac_config_headers m4_normalize([$1])"
3355 # Initialize to empty. It is much easier and uniform to have a config
3356 # list expand to empty when undefined, instead of special casing when
3357 # not defined (since in this case, AC_CONFIG_FOO expands to AC_CONFIG_FOO).
3358 m4_define([AC_LIST_HEADERS])
3359 m4_define([AC_LIST_HEADERS_COMMANDS])
3362 # AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
3363 # --------------------------------------
3364 # FIXME: Make it obsolete?
3365 AC_DEFUN([AC_CONFIG_HEADER],
3366 [AC_CONFIG_HEADERS([$1])])
3369 # AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS])
3370 # --------------------------------------------------------
3371 # Specify that config.status should establish a (symbolic if possible)
3372 # link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
3373 # Reject DEST=., because it is makes it hard for ./config.status
3374 # to guess the links to establish (`./config.status .').
3375 AC_DEFUN([AC_CONFIG_LINKS],
3376 [m4_divert_push([KILL])
3377 _AC_CONFIG_UNIQUE([$1])
3378 _AC_CONFIG_DEPENDENCIES([$1])
3379 m4_if(m4_regexp([$1], [^\.:\| \.:]), -1,,
3380 [AC_FATAL([$0: invalid destination: `.'])])
3381 m4_append([AC_LIST_LINKS], [ $1])
3382 dnl Register the commands
3383 m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
3384 [m4_append([AC_LIST_LINKS_COMMANDS],
3385 [ ]m4_patsubst(AC_File, [:.*])[ ) $2 ;;
3387 _AC_CONFIG_COMMANDS_INIT([$3])
3388 m4_divert_pop([KILL])dnl
3389 ac_config_links="$ac_config_links m4_normalize([$1])"
3393 # Initialize the list.
3394 m4_define([AC_LIST_LINKS])
3395 m4_define([AC_LIST_LINKS_COMMANDS])
3398 # AC_LINK_FILES(SOURCE..., DEST...)
3399 # ---------------------------------
3400 # Link each of the existing files SOURCE... to the corresponding
3401 # link name in DEST...
3403 # Unfortunately we can't provide a very good autoupdate service here,
3404 # since in `AC_LINK_FILES($from, $to)' it is possible that `$from'
3405 # and `$to' are actually lists. It would then be completely wrong to
3406 # replace it with `AC_CONFIG_LINKS($to:$from). It is possible in the
3407 # case of literal values though, but because I don't think there is any
3408 # interest in creating config links with literal values, no special
3409 # mechanism is implemented to handle them.
3411 # _AC_LINK_CNT is used to be robust to multiple calls.
3412 AU_DEFUN([AC_LINK_FILES],
3414 [m4_fatal([$0: incorrect number of arguments])])dnl
3415 m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
3418 while test -n "$ac_sources"; do
3419 set $ac_dests; ac_dest=$[1]; shift; ac_dests=$[*]
3420 set $ac_sources; ac_source=$[1]; shift; ac_sources=$[*]
3421 [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
3423 AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
3426 It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
3427 to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant
3428 update, you should probably tune the result yourself.])# AC_LINK_FILES
3432 AU_DEFUN([_AC_LINK_FILES_CNT], 0)
3436 # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
3437 # -------------------------------------------------
3438 # Specify output files, as with AC_OUTPUT, i.e., files that are
3439 # configured with AC_SUBST. Associate the COMMANDS to each FILE,
3440 # i.e., when config.status creates FILE, run COMMANDS afterwards.
3442 # The commands are stored in a growing string AC_LIST_FILES_COMMANDS
3443 # which should be used like this:
3446 # AC_LIST_FILES_COMMANDS
3448 AC_DEFUN([AC_CONFIG_FILES],
3449 [m4_divert_push([KILL])
3450 _AC_CONFIG_UNIQUE([$1])
3451 _AC_CONFIG_DEPENDENCIES([$1])
3452 m4_append([AC_LIST_FILES], [ $1])
3453 dnl Register the commands.
3454 m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
3455 [m4_append([AC_LIST_FILES_COMMANDS],
3456 [ ]m4_patsubst(AC_File, [:.*])[ ) $2 ;;
3458 _AC_CONFIG_COMMANDS_INIT([$3])
3459 m4_divert_pop([KILL])dnl
3460 ac_config_files="$ac_config_files m4_normalize([$1])"
3463 # Initialize the lists.
3464 m4_define([AC_LIST_FILES])
3465 m4_define([AC_LIST_FILES_COMMANDS])
3468 # AC_CONFIG_SUBDIRS(DIR ...)
3469 # --------------------------
3470 # We define two variables:
3472 # is built in the `default' section, and should contain *all*
3473 # the arguments of AC_CONFIG_SUBDIRS. It is used for --help=recursive.
3474 # It makes no sense for arguments which are sh variables.
3476 # which is built at runtime, so some of these dirs might not be
3477 # included, if for instance the user refused a part of the tree.
3478 # This is used in _AC_OUTPUT_SUBDIRS.
3479 # _AC_LIST_SUBDIRS is used only for _AC_CONFIG_UNIQUE.
3480 AC_DEFUN([AC_CONFIG_SUBDIRS],
3481 [_AC_CONFIG_UNIQUE([$1])dnl
3482 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
3483 m4_append([_AC_LIST_SUBDIRS], [ $1])dnl
3484 AS_LITERAL_IF([$1], [],
3485 [AC_DIAGNOSE(syntax, [$0: you should use literals])])
3486 m4_divert_text([DEFAULTS],
3487 [ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
3488 AC_SUBST(subdirs, "$subdirs $1")dnl
3491 # Initialize the list.
3492 m4_define([_AC_LIST_SUBDIRS])
3495 # autoupdate::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
3496 # -------------------------------------------------------------------
3498 # If there are arguments given to AC_OUTPUT, dispatch them to the
3499 # proper modern macros.
3500 AU_DEFUN([AC_OUTPUT],
3502 [AC_CONFIG_FILES([$1])])dnl
3504 [AC_CONFIG_COMMANDS(default, [[$2]], [[$3]])])dnl
3506 [`AC_OUTPUT' should be used without arguments.])
3509 # AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
3510 # -------------------------------------------------------
3512 # Produce config.status, config.h, and links; and configure subdirs.
3513 # The CONFIG_HEADERS are defined in the m4 variable AC_LIST_HEADERS.
3514 # Pay special attention not to have too long here docs: some old
3515 # shells die. Unfortunately the limit is not known precisely...
3516 m4_define([AC_OUTPUT],
3517 [dnl Dispatch the extra arguments to their native macros.
3519 [AC_CONFIG_FILES([$1])])dnl
3521 [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
3524 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3525 # Let make expand exec_prefix.
3526 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3528 # VPATH may cause trouble with some makes, so we remove $(srcdir),
3529 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
3530 # trailing colons and then remove the whole line if VPATH becomes empty
3531 # (actually we leave an empty line to preserve line numbers).
3532 if test "x$srcdir" = x.; then
3533 ac_vpsub=['/^[ ]*VPATH[ ]*=/{
3534 s/:*\$(srcdir):*/:/;
3535 s/:*\${srcdir}:*/:/;
3537 s/^\([^=]*=[ ]*\):*/\1/;
3543 m4_ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
3545 dnl Commands to run before creating config.status.
3546 AC_OUTPUT_COMMANDS_PRE()dnl
3548 : ${CONFIG_STATUS=./config.status}
3549 ac_clean_files_save=$ac_clean_files
3550 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
3551 _AC_OUTPUT_CONFIG_STATUS()dnl
3552 ac_clean_files=$ac_clean_files_save
3554 dnl Commands to run after config.status was created
3555 AC_OUTPUT_COMMANDS_POST()dnl
3557 test "$no_create" = yes || $SHELL $CONFIG_STATUS || AS_EXIT([1])
3558 dnl config.status should not do recursion.
3559 AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
3563 # _AC_OUTPUT_CONFIG_STATUS
3564 # ------------------------
3565 # Produce config.status. Called by AC_OUTPUT.
3566 # Pay special attention not to have too long here docs: some old
3567 # shells die. Unfortunately the limit is not known precisely...
3568 m4_define([_AC_OUTPUT_CONFIG_STATUS],
3569 [AC_MSG_NOTICE([creating $CONFIG_STATUS])
3570 cat >$CONFIG_STATUS <<\_ACEOF
3572 # Generated automatically by configure.
3573 # Run this file to recreate the current configuration.
3574 # Compiler output produced by configure, useful for debugging
3575 # configure, is in config.log if it exists.
3578 as_me=`echo "$[0]" | sed 's,.*/,,'`
3579 SHELL=${CONFIG_SHELL-/bin/sh}
3582 _AC_INIT_DEFAULTS_FDS
3583 cat >&AS_MESSAGE_LOG_FD << EOF
3585 ## ----------------------- ##
3586 ## Running config.status. ##
3587 ## ----------------------- ##
3589 This file was extended by $as_me m4_ifset([AC_PACKAGE_STRING],
3590 [(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
3592 on `(hostname || uname -n) 2>/dev/null | sed 1q`
3598 # Files that config.status was made for.
3599 if test -n "$ac_config_files"; then
3600 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
3603 if test -n "$ac_config_headers"; then
3604 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
3607 if test -n "$ac_config_links"; then
3608 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
3611 if test -n "$ac_config_commands"; then
3612 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
3615 cat >>$CONFIG_STATUS <<\EOF
3618 \`$as_me' instantiates files from templates according to the
3619 current configuration.
3621 Usage: $[0] [[OPTIONS]] [[FILE]]...
3623 -h, --help print this help, then exit
3624 -V, --version print version number, then exit
3625 -d, --debug don't remove temporary files
3626 --recheck update $as_me by reconfiguring in the same conditions
3627 m4_ifset([AC_LIST_FILES],
3628 [[ --file=FILE[:TEMPLATE]
3629 instantiate the configuration file FILE
3631 m4_ifset([AC_LIST_HEADERS],
3632 [[ --header=FILE[:TEMPLATE]
3633 instantiate the configuration header FILE
3636 m4_ifset([AC_LIST_FILES],
3637 [Configuration files:
3641 m4_ifset([AC_LIST_HEADERS],
3642 [Configuration headers:
3646 m4_ifset([AC_LIST_LINKS],
3647 [Configuration links:
3651 m4_ifset([AC_LIST_COMMANDS],
3652 [Configuration commands:
3656 Report bugs to <bug-autoconf@gnu.org>."
3659 cat >>$CONFIG_STATUS <<EOF
3661 $CONFIG_STATUS generated by $as_me (Autoconf AC_ACVERSION).
3662 Configured on host $ac_hostname by
3663 `echo "[$]0 $ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`"
3665 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
3666 [dnl Leave those double quotes here: this $INSTALL is evaluated in a
3667 dnl here document, which might result in `INSTALL=/bin/install -c'.
3672 cat >>$CONFIG_STATUS <<\EOF
3673 # If no file are specified by the user, then we need to provide default
3674 # value. By we need to know if files were specified by the user.
3676 while test $[#] != 0
3680 ac_option=`expr "x$[1]" : 'x\([[^=]]*\)='`
3681 ac_optarg=`expr "x$[1]" : 'x[[^=]]*=\(.*\)'`
3683 set dummy "$ac_option" "$ac_optarg" ${1+"$[@]"}
3687 *) # This is not an option, so the user has probably given explicit
3689 ac_need_defaults=false;;
3693 # Handling of the options.
3695 cat >>$CONFIG_STATUS <<EOF
3696 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3697 echo "running $SHELL $[0] " $ac_configure_args " --no-create --no-recursion"
3698 exec $SHELL $[0] $ac_configure_args --no-create --no-recursion ;;
3700 cat >>$CONFIG_STATUS <<\EOF
3701 --version | --vers* | -V )
3702 echo "$ac_cs_version"; exit 0 ;;
3704 # Conflict between --help and --header
3705 AC_MSG_ERROR([ambiguous option: $[1]
3706 Try `$[0] --help' for more information.]);;
3707 --help | --hel | -h )
3708 echo "$ac_cs_usage"; exit 0 ;;
3709 --debug | --d* | -d )
3711 --file | --fil | --fi | --f )
3713 CONFIG_FILES="$CONFIG_FILES $[1]"
3714 ac_need_defaults=false;;
3715 --header | --heade | --head | --hea )
3717 CONFIG_HEADERS="$CONFIG_HEADERS $[1]"
3718 ac_need_defaults=false;;
3720 # Handling of arguments.
3721 AC_FOREACH([AC_File], AC_LIST_FILES,
3722 [ 'm4_patsubst(AC_File, [:.*])' )dnl
3723 CONFIG_FILES="$CONFIG_FILES AC_File" ;;
3725 AC_FOREACH([AC_File], AC_LIST_LINKS,
3726 [ 'm4_patsubst(AC_File, [:.*])' )dnl
3727 CONFIG_LINKS="$CONFIG_LINKS AC_File" ;;
3729 AC_FOREACH([AC_File], AC_LIST_COMMANDS,
3730 [ 'm4_patsubst(AC_File, [:.*])' )dnl
3731 CONFIG_COMMANDS="$CONFIG_COMMANDS AC_File" ;;
3733 AC_FOREACH([AC_File], AC_LIST_HEADERS,
3734 [ 'm4_patsubst(AC_File, [:.*])' )dnl
3735 CONFIG_HEADERS="$CONFIG_HEADERS AC_File" ;;
3739 -*) AC_MSG_ERROR([unrecognized option: $[1]
3740 Try `$[0] --help' for more information.]) ;;
3741 *) AC_MSG_ERROR([invalid argument: $[1]]);;
3748 dnl Issue this section only if there were actually config files.
3749 dnl This checks if one of AC_LIST_HEADERS, AC_LIST_FILES, AC_LIST_COMMANDS,
3750 dnl or AC_LIST_LINKS is set.
3751 m4_ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(),
3752 [cat >>$CONFIG_STATUS <<\EOF
3753 # If the user did not use the arguments to specify the items to instantiate,
3754 # then the envvar interface is used. Set only those that are not.
3755 # We use the long form for the default assignment because of an extremely
3756 # bizarre bug on SunOS 4.1.3.
3757 if $ac_need_defaults; then
3758 m4_ifset([AC_LIST_FILES],
3759 [ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
3761 m4_ifset([AC_LIST_HEADERS],
3762 [ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
3764 m4_ifset([AC_LIST_LINKS],
3765 [ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
3767 m4_ifset([AC_LIST_COMMANDS],
3768 [ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
3777 dnl We output the INIT-CMDS first for obvious reasons :)
3778 m4_ifset([_AC_OUTPUT_COMMANDS_INIT],
3779 [cat >>$CONFIG_STATUS <<EOF
3781 # INIT-COMMANDS section.
3784 _AC_OUTPUT_COMMANDS_INIT()
3788 dnl The following four sections are in charge of their own here
3789 dnl documenting into $CONFIG_STATUS.
3790 m4_ifset([AC_LIST_FILES], [_AC_OUTPUT_FILES()])dnl
3791 m4_ifset([AC_LIST_HEADERS], [_AC_OUTPUT_HEADERS()])dnl
3792 m4_ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl
3793 m4_ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl
3795 cat >>$CONFIG_STATUS <<\EOF
3799 chmod +x $CONFIG_STATUS
3800 ])# _AC_OUTPUT_CONFIG_STATUS
3803 # AC_OUTPUT_MAKE_DEFS
3804 # -------------------
3805 # Set the DEFS variable to the -D options determined earlier.
3806 # This is a subroutine of AC_OUTPUT.
3807 # It is called inside configure, outside of config.status.
3808 # Using a here document instead of a string reduces the quoting nightmare.
3809 m4_define([AC_OUTPUT_MAKE_DEFS],
3810 [[# Transform confdefs.h into DEFS.
3811 # Protect against shell expansion while executing Makefile rules.
3812 # Protect against Makefile macro expansion.
3814 # If the first sed substitution is executed (which looks for macros that
3815 # take arguments), then we branch to the quote section. Otherwise,
3816 # look for a macro that doesn't take arguments.
3817 cat >confdef2opt.sed <<\EOF
3820 s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
3822 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
3826 s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
3832 # We use echo to avoid assuming a particular line-breaking character.
3833 # The extra dot is to prevent the shell from consuming trailing
3834 # line-breaks from the sub-command output. A line-break within
3835 # single-quotes doesn't work because, if this script is created in a
3836 # platform that uses two characters for line-breaks (e.g., DOS), tr
3838 ac_LF_and_DOT=`echo; echo .`
3839 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
3840 rm -f confdef2opt.sed
3841 ]])# AC_OUTPUT_MAKE_DEFS
3846 # Do the variable substitutions to create the Makefiles or whatever.
3847 # This is a subroutine of AC_OUTPUT.
3849 # It has to send itself into $CONFIG_STATUS (eg, via here documents).
3850 # Upon exit, no here document shall be opened.
3851 m4_define([_AC_OUTPUT_FILES],
3852 [cat >>$CONFIG_STATUS <<EOF
3855 # CONFIG_FILES section.
3858 # No need to generate the scripts if there are no CONFIG_FILES.
3859 # This happens for instance when ./config.status config.h
3860 if test -n "\$CONFIG_FILES"; then
3861 # Protect against being on the right side of a sed subst in config.status.
3862 dnl Please, pay attention that this sed code depends a lot on the shape
3863 dnl of the sed commands issued by AC_SUBST. So if you change one, change
3865 [ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
3866 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF]
3867 dnl These here document variables are unquoted when configure runs
3868 dnl but quoted when config.status runs, so variables are expanded once.
3869 dnl Insert the sed substitutions of variables.
3870 _AC_SUBST_SED_PROGRAM()dnl
3875 cat >>$CONFIG_STATUS <<\EOF
3876 # Split the substitutions into bite-sized pieces for seds with
3877 # small command number limits, like on Digital OSF/1 and HP-UX.
3878 dnl One cannot portably go further than 100 commands because of HP-UX.
3879 dnl Here, there are 2 cmd per line, and two cmd are added later.
3881 ac_sed_frag=1 # Number of current file.
3882 ac_beg=1 # First line for current file.
3883 ac_end=$ac_max_sed_lines # Line after last line for current file.
3886 while $ac_more_lines; do
3887 if test $ac_beg -gt 1; then
3888 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
3890 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
3892 if test ! -s $tmp/subs.frag; then
3895 # The purpose of the label and of the branching condition is to
3896 # speed up the sed processing (if there are no `@' at all, there
3897 # is no need to browse any of the substitutions).
3898 # These are the two extra sed commands mentioned above.
3900 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b'] && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
3901 if test -z "$ac_sed_cmds"; then
3902 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
3904 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
3906 ac_sed_frag=`expr $ac_sed_frag + 1`
3908 ac_end=`expr $ac_end + $ac_max_sed_lines`
3911 if test -z "$ac_sed_cmds"; then
3914 fi # test -n "$CONFIG_FILES"
3917 cat >>$CONFIG_STATUS <<\EOF
3918 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
3919 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3921 - | *:- | *:-:* ) # input from stdin
3923 ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
3924 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
3925 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
3926 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
3927 * ) ac_file_in=$ac_file.in ;;
3930 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
3931 ac_dir=`AS_DIRNAME(["$ac_file"])`
3932 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3933 AS_MKDIR_P(["$ac_dir"])
3934 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
3935 # A "../" for each directory in $ac_dir_suffix.
3936 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[[^/]]*,../,g'`
3938 ac_dir_suffix= ac_dots=
3943 if test -z "$ac_dots"; then
3946 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
3948 [[\\/]]* | ?:[[\\/]]* )
3949 ac_srcdir=$srcdir$ac_dir_suffix;
3950 ac_top_srcdir=$srcdir ;;
3952 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
3953 ac_top_srcdir=$ac_dots$srcdir ;;
3956 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
3958 [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
3959 *) ac_INSTALL=$ac_dots$INSTALL ;;
3963 if test x"$ac_file" != x-; then
3964 AC_MSG_NOTICE([creating $ac_file])
3967 # Let's still pretend it is `configure' which instantiates (i.e., don't
3968 # use $as_me), people would be surprised to read:
3969 # /* config.h. Generated automatically by config.status. */
3970 configure_input="Generated automatically from `echo $ac_file_in |
3971 sed 's,.*/,,'` by configure."
3973 # First look for the input files in the build tree, otherwise in the
3975 ac_file_inputs=`IFS=:
3976 for f in $ac_file_in; do
3978 -) echo $tmp/stdin ;;
3979 [[\\/$]]* | ?:[[\\/]]*)
3981 test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
3984 if test -f "$f"; then
3987 elif test -f "$srcdir/$f"; then
3992 AC_MSG_ERROR([cannot find input file: $f])
3995 done` || AS_EXIT([1])
3997 cat >>$CONFIG_STATUS <<EOF
3998 dnl Neutralize VPATH when `$srcdir' = `.'.
4000 dnl Shell code in configure.ac might set extrasub.
4001 dnl FIXME: do we really want to maintain this feature?
4004 cat >>$CONFIG_STATUS <<\EOF
4006 [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
4007 s,@configure_input@,$configure_input,;t t
4008 s,@srcdir@,$ac_srcdir,;t t
4009 s,@top_srcdir@,$ac_top_srcdir,;t t
4010 AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$ac_INSTALL,;t t
4012 dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
4013 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
4015 dnl This would break Makefile dependencies.
4016 dnl if cmp -s $ac_file $tmp/out 2>/dev/null; then
4017 dnl echo "$ac_file is unchanged"
4020 dnl mv $tmp/out $ac_file
4022 if test x"$ac_file" != x-; then
4023 mv $tmp/out $ac_file
4029 m4_ifset([AC_LIST_FILES_COMMANDS],
4030 [ # Run the commands associated with the file.
4032 AC_LIST_FILES_COMMANDS()dnl
4037 ])# _AC_OUTPUT_FILES
4040 # _AC_OUTPUT_HEADERS
4041 # ------------------
4043 # Output the code which instantiates the `config.h' files from their
4046 # This is a subroutine of _AC_OUTPUT_CONFIG_STATUS. It has to send
4047 # itself into $CONFIG_STATUS (eg, via here documents). Upon exit, no
4048 # here document shall be opened.
4051 # The code produced used to be extremely costly: there are was a
4052 # single sed script (n lines) handling both `#define' templates,
4053 # `#undef' templates with trailing space, and `#undef' templates
4054 # without trailing spaces. The full script was run on each of the m
4055 # lines of `config.h.in', i.e., about n x m.
4057 # Now there are two scripts: `conftest.defines' for the `#define'
4058 # templates, and `conftest.undef' for the `#undef' templates.
4060 # Optimization 1. It is incredibly costly to run two `#undef'
4061 # scripts, so just remove trailing spaces first. Removes about a
4062 # third of the cost.
4064 # Optimization 2. Since `#define' are rare and obsoleted,
4065 # `conftest.defines' is built and run only if grep says there are
4066 # `#define'. Improves by at least a factor 2, since in addition we
4067 # avoid the cost of *producing* the sed script.
4069 # Optimization 3. In each script, first check that the current input
4070 # line is a template. This avoids running the full sed script on
4071 # empty lines and comments (divides the cost by about 3 since each
4072 # template chunk is typically a comment, a template, an empty line).
4074 # Optimization 4. Once a substitution performed, since there can be
4075 # only one per line, immediately restart the script on the next input
4076 # line (using the `t' sed instruction). Divides by about 2.
4077 # *Note:* In the case of the AC_SUBST sed script (_AC_OUTPUT_FILES)
4078 # this optimization cannot be applied as is, because there can be
4079 # several substitutions per line.
4082 # The result is about, hm, ... times blah... plus.... Ahem. The
4083 # result is about much faster.
4084 m4_define([_AC_OUTPUT_HEADERS],
4085 [cat >>$CONFIG_STATUS <<\EOF
4088 # CONFIG_HEADER section.
4091 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4092 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4094 # ac_d sets the value in "#define NAME VALUE" lines.
4095 dnl Double quote for the `[ ]' and `define'.
4096 [ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4097 ac_dB='[ ].*$,\1#\2'
4100 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4101 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4102 ac_uB='$,\1#\2define\3'
4106 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
4107 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4109 - | *:- | *:-:* ) # input from stdin
4111 ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
4112 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
4113 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
4114 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
4115 * ) ac_file_in=$ac_file.in ;;
4118 test x"$ac_file" != x- && AC_MSG_NOTICE([creating $ac_file])
4120 # First look for the input files in the build tree, otherwise in the
4122 ac_file_inputs=`IFS=:
4123 for f in $ac_file_in; do
4125 -) echo $tmp/stdin ;;
4126 [[\\/$]]* | ?:[[\\/]]*)
4128 test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
4131 if test -f "$f"; then
4134 elif test -f "$srcdir/$f"; then
4139 AC_MSG_ERROR([cannot find input file: $f])
4142 done` || AS_EXIT([1])
4143 # Remove the trailing spaces.
4144 sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
4148 # Transform confdefs.h into two sed scripts, `conftest.defines' and
4149 # `conftest.undefs', that substitutes the proper values into
4150 # config.h.in to produce config.h. The first handles `#define'
4151 # templates, and the second `#undef' templates.
4152 # And first: Protect against being on the right side of a sed subst in
4153 # config.status. Protect against being in an unquoted here document
4155 rm -f conftest.defines conftest.undefs
4156 # Using a here document instead of a string reduces the quoting nightmare.
4157 # Putting comments in sed scripts is not portable.
4159 # `end' is used to avoid that the second main sed command (meant for
4160 # 0-ary CPP macros) applies to n-ary macro definitions.
4161 # See the Autoconf documentation for `clear'.
4162 cat >confdef2sed.sed <<\EOF
4163 dnl Double quote for `[ ]' and `define'.
4168 s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
4170 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
4173 # If some macros were called several times there might be several times
4174 # the same #defines, which is useless. Nevertheless, we may not want to
4175 # sort them, since we want the *last* AC-DEFINE to be honored.
4176 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
4177 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
4178 rm -f confdef2sed.sed
4180 # This sed command replaces #undef with comments. This is necessary, for
4181 # example, in the case of _POSIX_SOURCE, which is predefined and required
4182 # on some systems where configure will not decide to define it.
4183 cat >>conftest.undefs <<\EOF
4184 [s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,]
4187 # Break up conftest.defines because some shells have a limit on the size
4188 # of here documents, and old seds have small limits too (100 cmds).
4189 echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
4190 echo ' if egrep ["^[ ]*#[ ]*define"] $tmp/in >/dev/null; then' >>$CONFIG_STATUS
4191 echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
4192 echo ' :' >>$CONFIG_STATUS
4194 while grep . conftest.defines >/dev/null
4196 # Write a limited-size here document to $tmp/defines.sed.
4197 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
4198 # Speed up: don't consider the non `#define' lines.
4199 echo ['/^[ ]*#[ ]*define/!b'] >>$CONFIG_STATUS
4200 # Work around the forget-to-reset-the-flag bug.
4201 echo 't clr' >>$CONFIG_STATUS
4202 echo ': clr' >>$CONFIG_STATUS
4203 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
4205 sed -f $tmp/defines.sed $tmp/in >$tmp/out
4209 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
4210 rm -f conftest.defines
4211 mv conftest.tail conftest.defines
4213 rm -f conftest.defines
4214 echo ' fi # egrep' >>$CONFIG_STATUS
4215 echo >>$CONFIG_STATUS
4217 # Break up conftest.undefs because some shells have a limit on the size
4218 # of here documents, and old seds have small limits too (100 cmds).
4219 echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
4221 while grep . conftest.undefs >/dev/null
4223 # Write a limited-size here document to $tmp/undefs.sed.
4224 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
4225 # Speed up: don't consider the non `#undef'
4226 echo ['/^[ ]*#[ ]*undef/!b'] >>$CONFIG_STATUS
4227 # Work around the forget-to-reset-the-flag bug.
4228 echo 't clr' >>$CONFIG_STATUS
4229 echo ': clr' >>$CONFIG_STATUS
4230 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
4232 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
4236 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
4237 rm -f conftest.undefs
4238 mv conftest.tail conftest.undefs
4240 rm -f conftest.undefs
4242 dnl Now back to your regularly scheduled config.status.
4243 cat >>$CONFIG_STATUS <<\EOF
4244 # Let's still pretend it is `configure' which instantiates (i.e., don't
4245 # use $as_me), people would be surprised to read:
4246 # /* config.h. Generated automatically by config.status. */
4247 if test x"$ac_file" = x-; then
4248 echo "/* Generated automatically by configure. */" >$tmp/config.h
4250 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
4252 cat $tmp/in >>$tmp/config.h
4254 if test x"$ac_file" != x-; then
4255 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
4256 AC_MSG_NOTICE([$ac_file is unchanged])
4258 ac_dir=`AS_DIRNAME(["$ac_file"])`
4259 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4260 AS_MKDIR_P(["$ac_dir"])
4263 mv $tmp/config.h $ac_file
4269 m4_ifset([AC_LIST_HEADERS_COMMANDS],
4270 [ # Run the commands associated with the file.
4272 AC_LIST_HEADERS_COMMANDS()dnl
4277 ])# _AC_OUTPUT_HEADERS
4282 # This is a subroutine of AC_OUTPUT.
4284 # It has to send itself into $CONFIG_STATUS (eg, via here documents).
4285 # Upon exit, no here document shall be opened.
4286 m4_define([_AC_OUTPUT_LINKS],
4287 [cat >>$CONFIG_STATUS <<\EOF
4290 # CONFIG_LINKS section.
4293 dnl Here we use : instead of .. because if AC_LINK_FILES was used
4294 dnl with empty parameters (as in gettext.m4), then we obtain here
4295 dnl `:', which we want to skip. So let's keep a single exception: `:'.
4296 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
4297 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
4298 ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
4300 AC_MSG_NOTICE([linking $srcdir/$ac_source to $ac_dest])
4302 if test ! -r $srcdir/$ac_source; then
4303 AC_MSG_ERROR([$srcdir/$ac_source: File not found])
4307 # Make relative symlinks.
4308 ac_dest_dir=`AS_DIRNAME(["$ac_dest"])`
4309 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4310 AS_MKDIR_P(["$ac_dest_dir"])
4311 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`"
4312 # A "../" for each directory in $ac_dest_dir_suffix.
4313 ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[[^/]]*,../,g'`
4315 ac_dest_dir_suffix= ac_dots=
4319 [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$srcdir/$ac_source ;;
4320 *) ac_rel_source=$ac_dots$srcdir/$ac_source ;;
4323 # Make a symlink if possible; otherwise try a hard link.
4324 ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4325 ln $srcdir/$ac_source $ac_dest ||
4326 AC_MSG_ERROR([cannot link $ac_dest to $srcdir/$ac_source])
4327 m4_ifset([AC_LIST_LINKS_COMMANDS],
4328 [ # Run the commands associated with the file.
4330 AC_LIST_LINKS_COMMANDS()dnl
4335 ])# _AC_OUTPUT_LINKS
4338 # _AC_OUTPUT_COMMANDS
4339 # -------------------
4340 # This is a subroutine of AC_OUTPUT, in charge of issuing the code
4341 # related to AC_CONFIG_COMMANDS.
4343 # It has to send itself into $CONFIG_STATUS (eg, via here documents).
4344 # Upon exit, no here document shall be opened.
4345 m4_define([_AC_OUTPUT_COMMANDS],
4346 [cat >>$CONFIG_STATUS <<\EOF
4349 # CONFIG_COMMANDS section.
4351 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
4352 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
4353 ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
4355 dnl FIXME: Until Automake uses the new features of config.status, we
4356 dnl should keep this silent. Otherwise, because Automake runs this in
4357 dnl each directory, it quickly becomes annoying.
4358 dnl echo "executing commands of $ac_dest"
4360 AC_LIST_COMMANDS_COMMANDS()dnl
4364 ])# _AC_OUTPUT_COMMANDS
4367 # _AC_OUTPUT_SUBDIRS
4368 # ------------------
4369 # This is a subroutine of AC_OUTPUT, but it does not go into
4370 # config.status, rather, it is called after running config.status.
4371 m4_define([_AC_OUTPUT_SUBDIRS],
4374 # CONFIG_SUBDIRS section.
4376 if test "$no_recursion" != yes; then
4378 # Remove --cache-file and --srcdir arguments so they do not pile up.
4379 ac_sub_configure_args=
4381 for ac_arg in $ac_configure_args; do
4382 if test -n "$ac_prev"; then
4387 -cache-file | --cache-file | --cache-fil | --cache-fi \
4388 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
4389 ac_prev=cache_file ;;
4390 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
4391 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
4394 --config-cache | -C)
4396 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
4398 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
4400 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
4404 for ac_subdir in : $subdirs; do test "x$ac_subdir" = x: && continue
4406 # Do not complain, so a configure script can configure whichever
4407 # parts of a large source tree are present.
4408 test -d $srcdir/$ac_subdir || continue
4410 AC_MSG_NOTICE([configuring in $ac_subdir])
4413 *) AS_MKDIR_P(["./$ac_subdir"])
4414 if test -d ./$ac_subdir; then :;
4416 AC_MSG_ERROR([cannot create `pwd`/$ac_subdir])
4424 # A "../" for each directory in /$ac_subdir.
4425 ac_dots=`echo $ac_subdir |
4426 sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
4429 .) # No --srcdir option. We are building in place.
4430 ac_sub_srcdir=$srcdir ;;
4431 [[\\/]]* | ?:[[\\/]]* ) # Absolute path.
4432 ac_sub_srcdir=$srcdir/$ac_subdir ;;
4434 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
4437 # Check for guested configure; otherwise get Cygnus style configure.
4438 if test -f $ac_sub_srcdir/configure.gnu; then
4439 ac_sub_configure="$SHELL '$ac_sub_srcdir/configure.gnu'"
4440 elif test -f $ac_sub_srcdir/configure; then
4441 ac_sub_configure="$SHELL '$ac_sub_srcdir/configure'"
4442 elif test -f $ac_sub_srcdir/configure.in; then
4443 ac_sub_configure=$ac_configure
4445 AC_MSG_WARN([no configuration information is in $ac_subdir])
4449 # The recursion is here.
4450 if test -n "$ac_sub_configure"; then
4451 # Make the cache file name correct relative to the subdirectory.
4453 [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
4455 ac_sub_cache_file=$ac_dots$cache_file ;;
4458 AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir])
4459 # The eval makes quoting arguments work.
4460 eval $ac_sub_configure $ac_sub_configure_args \
4461 --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir ||
4462 AC_MSG_ERROR([$ac_sub_configure failed for $ac_subdir])
4468 ])# _AC_OUTPUT_SUBDIRS
4471 # AC_LINKER_OPTION(LINKER-OPTIONS, SHELL-VARIABLE)
4472 # ------------------------------------------------
4474 # Specifying options to the compiler (whether it be the C, C++ or
4475 # Fortran 77 compiler) that are meant for the linker is compiler
4476 # dependent. This macro lets you give options to the compiler that
4477 # are meant for the linker in a portable, compiler-independent way.
4479 # This macro take two arguments, a list of linker options that the
4480 # compiler should pass to the linker (LINKER-OPTIONS) and the name of
4481 # a shell variable (SHELL-VARIABLE). The list of linker options are
4482 # appended to the shell variable in a compiler-dependent way.
4484 # For example, if the selected language is C, then this:
4486 # AC_LINKER_OPTION([-R /usr/local/lib/foo], foo_LDFLAGS)
4488 # will expand into this if the selected C compiler is gcc:
4490 # foo_LDFLAGS="-Xlinker -R -Xlinker /usr/local/lib/foo"
4492 # otherwise, it will expand into this:
4494 # foo_LDFLAGS"-R /usr/local/lib/foo"
4496 # You are encouraged to add support for compilers that this macro
4497 # doesn't currently support.
4498 # FIXME: Get rid of this macro.
4499 AC_DEFUN([AC_LINKER_OPTION],
4500 [if test "$ac_compiler_gnu" = yes; then
4501 for ac_link_opt in $1; do
4502 $2="[$]$2 -Xlinker $ac_link_opt"
4509 # AC_LIST_MEMBER_OF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
4510 # --------------------------------------------------------------------------
4512 # Processing the elements of a list is tedious in shell programming,
4513 # as lists tend to be implemented as space delimited strings.
4515 # This macro searches LIST for ELEMENT, and executes ACTION-IF-FOUND
4516 # if ELEMENT is a member of LIST, otherwise it executes
4517 # ACTION-IF-NOT-FOUND.
4518 AC_DEFUN([AC_LIST_MEMBER_OF],
4519 [dnl Do some sanity checking of the arguments.
4520 m4_if([$1], , [AC_FATAL([$0]: missing argument 1)])dnl
4521 m4_if([$2], , [AC_FATAL([$0]: missing argument 2)])dnl
4525 if test x"$1" = x"$ac_i"; then
4531 AS_IF([test x"$ac_exists" = xtrue], [$3], [$4])[]dnl