1 # This file is part of Autoconf. -*- Autoconf -*-
2 # Parameterizing and creating config.status.
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
4 # 2002, 2003, 2004, 2005, 2006, 2007 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 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # As a special exception, the Free Software Foundation gives unlimited
20 # permission to copy, distribute and modify the configure scripts that
21 # are the output of Autoconf. You need not follow the terms of the GNU
22 # General Public License when using or distributing such scripts, even
23 # though portions of the text of Autoconf appear in them. The GNU
24 # General Public License (GPL) does govern all other use of the material
25 # that constitutes the Autoconf program.
27 # Certain portions of the Autoconf source text are designed to be copied
28 # (in certain cases, depending on the input) into the output of
29 # Autoconf. We call these the "data" portions. The rest of the Autoconf
30 # source text consists of comments plus executable code that decides which
31 # of the data portions to output in any given case. We call these
32 # comments and executable code the "non-data" portions. Autoconf never
33 # copies any of the non-data portions into its output.
35 # This special exception to the GPL applies to versions of Autoconf
36 # released by the Free Software Foundation. When you make and
37 # distribute a modified version of Autoconf, you may extend this special
38 # exception to the GPL to apply to your modified version as well, *unless*
39 # your modified version has the potential to copy into its output some
40 # of the text that was the non-data portion of the version that you started
41 # with. (In other words, unless your change moves or copies text from
42 # the non-data portions to the data portions.) If your modification has
43 # such potential, you must delete any notice of this special exception
44 # to the GPL from your modified version.
46 # Written by David MacKenzie, with help from
47 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
48 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
51 # This file handles about all the preparation aspects for
52 # `config.status': registering the configuration files, the headers,
53 # the links, and the commands `config.status' will run. There is a
54 # little mixture though of things actually handled by `configure',
55 # such as running the `configure' in the sub directories. Minor
58 # There are two kinds of commands:
62 # They are output into `config.status' via a quoted here doc. These
63 # commands are always associated to a tag which the user can use to
64 # tell `config.status' what are the commands she wants to run.
68 # They are output via an *unquoted* here-doc. As a consequence $var
69 # will be output as the value of VAR. This is typically used by
70 # `configure' to give `config.status' some variables it needs to run
71 # the COMMANDS. At the difference of COMMANDS, the INIT-CMDS are
75 # Honorable members of this family are AC_CONFIG_FILES,
76 # AC_CONFIG_HEADERS, AC_CONFIG_LINKS and AC_CONFIG_COMMANDS. Bad boys
77 # are AC_LINK_FILES, AC_OUTPUT_COMMANDS and AC_OUTPUT when used with
78 # arguments. False members are AC_CONFIG_SRCDIR, AC_CONFIG_SUBDIRS
79 # and AC_CONFIG_AUX_DIR. Cousins are AC_CONFIG_COMMANDS_PRE and
80 # AC_CONFIG_COMMANDS_POST.
83 ## ------------------ ##
84 ## Auxiliary macros. ##
85 ## ------------------ ##
87 # _AC_SRCDIRS(BUILD-DIR-NAME)
88 # ---------------------------
90 # - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src'
91 # - `$srcdir' is `top-build -> top-src'
94 # - `ac_builddir' is `.', for symmetry only.
95 # - `ac_top_builddir_sub' is `build -> top_build'.
96 # This is used for @top_builddir@.
97 # - `ac_top_build_prefix' is `build -> top_build'.
98 # If not empty, has a trailing slash.
99 # - `ac_srcdir' is `build -> src'.
100 # - `ac_top_srcdir' is `build -> top-src'.
101 # and `ac_abs_builddir' etc., the absolute directory names.
102 m4_define([_AC_SRCDIRS],
106 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
108 ac_dir_suffix=/`AS_ECHO([$1]) | sed 's|^\.[[\\/]]||'`
109 # A ".." for each directory in $ac_dir_suffix.
110 ac_top_builddir_sub=`AS_ECHO(["$ac_dir_suffix"]) | sed 's|/[[^\\/]]*|/..|g;s|/||'`
111 case $ac_top_builddir_sub in
112 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
113 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
116 ac_abs_top_builddir=$ac_pwd
117 ac_abs_builddir=$ac_pwd$ac_dir_suffix
118 # for backward compatibility:
119 ac_top_builddir=$ac_top_build_prefix
122 .) # We are building in place.
124 ac_top_srcdir=$ac_top_builddir_sub
125 ac_abs_top_srcdir=$ac_pwd ;;
126 [[\\/]]* | ?:[[\\/]]* ) # Absolute name.
127 ac_srcdir=$srcdir$ac_dir_suffix;
128 ac_top_srcdir=$srcdir
129 ac_abs_top_srcdir=$srcdir ;;
131 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
132 ac_top_srcdir=$ac_top_build_prefix$srcdir
133 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
135 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
140 ## ---------------------- ##
141 ## Registering the tags. ##
142 ## ---------------------- ##
145 # _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS])
146 # -----------------------------------------
148 # Register INIT-COMMANDS as command pasted *unquoted* in
149 # `config.status'. This is typically used to pass variables from
150 # `configure' to `config.status'. Note that $[1] is not over quoted as
151 # was the case in AC_OUTPUT_COMMANDS.
152 m4_define([_AC_CONFIG_COMMANDS_INIT],
154 [m4_append([_AC_OUTPUT_COMMANDS_INIT],
159 # AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
160 # -----------------------------------------------------
161 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
163 # It announces DEST depends upon the SOURCE1 etc.
164 m4_define([AC_FILE_DEPENDENCY_TRACE], [])
167 # _AC_FILE_DEPENDENCY_TRACE_COLON(DEST:SOURCE1[:SOURCE2...])
168 # ----------------------------------------------------------
169 # Declare that DEST depends upon SOURCE1 etc.
171 m4_define([_AC_FILE_DEPENDENCY_TRACE_COLON],
172 [AC_FILE_DEPENDENCY_TRACE(m4_bpatsubst([$1], [:], [,]))dnl
176 # _AC_CONFIG_DEPENDENCY(MODE, DEST[:SOURCE1...])
177 # ---------------------------------------------
178 # MODE is `FILES', `HEADERS', or `LINKS'.
180 # Be sure that a missing dependency is expressed as a dependency upon
181 # `DEST.in' (except with config links).
183 m4_define([_AC_CONFIG_DEPENDENCY],
184 [_AC_FILE_DEPENDENCY_TRACE_COLON([$2]_AC_CONFIG_DEPENDENCY_DEFAULT($@))dnl
188 # _AC_CONFIG_DEPENDENCY_DEFAULT(MODE, DEST[:SOURCE1...])
189 # ------------------------------------------------------
190 # Expand to `:DEST.in' if appropriate, or to empty string otherwise.
192 # More detailed edscription:
193 # If the tag contains `:', expand to nothing.
194 # Otherwise, for a config file or header, add `:DEST.in'.
195 # For config link, DEST.in is not appropriate:
196 # - if the tag is literal, complain.
197 # - otherwise, just expand to nothing and proceed with fingers crossed.
198 # (We get to this case from the obsolete AC_LINK_FILES, for example.)
200 m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
201 [m4_bmatch([$2], [:], [],
202 [m4_if([$1], [LINKS],
203 [AS_LITERAL_IF([$2], [AC_FATAL([Invalid AC_CONFIG_LINKS tag: `$2'])])],
208 # _AC_CONFIG_UNIQUE(MODE, DEST)
209 # -----------------------------
210 # MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'.
212 # Verify that there is no double definition of an output file.
214 m4_define([_AC_CONFIG_UNIQUE],
215 [m4_ifdef([_AC_SEEN_TAG($2)],
216 [AC_FATAL([`$2' is already registered with AC_CONFIG_]m4_defn([_AC_SEEN_TAG($2)]).)],
217 [m4_define([_AC_SEEN_TAG($2)], [$1])])dnl
221 # _AC_CONFIG_FOOS(MODE, TAGS..., [COMMANDS], [INIT-CMDS])
222 # -------------------------------------------------------
223 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
225 # Associate the COMMANDS to each TAG, i.e., when config.status creates TAG,
226 # run COMMANDS afterwards. (This is done in _AC_CONFIG_REGISTER_DEST.)
228 # For COMMANDS, do not m4_normalize TAGS before adding it to ac_config_commands.
229 # This historical difference allows macro calls in TAGS.
231 m4_define([_AC_CONFIG_FOOS],
232 [m4_foreach_w([AC_File], [$2],
233 [_AC_CONFIG_REGISTER([$1], m4_defn([AC_File]), [$3])])dnl
234 m4_define([_AC_SEEN_CONFIG(ANY)])dnl
235 m4_define([_AC_SEEN_CONFIG($1)])dnl
236 _AC_CONFIG_COMMANDS_INIT([$4])dnl
237 ac_config_[]m4_tolower([$1])="$ac_config_[]m4_tolower([$1]) dnl
238 m4_if([$1], [COMMANDS], [$2], [m4_normalize([$2])])"
242 # _AC_CONFIG_REGISTER(MODE, TAG, [COMMANDS])
243 # ------------------------------------------
244 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
246 m4_define([_AC_CONFIG_REGISTER],
247 [m4_if([$1], [COMMANDS],
249 [_AC_CONFIG_DEPENDENCY([$1], [$2])])dnl
250 _AC_CONFIG_REGISTER_DEST([$1], [$2], m4_bpatsubst([[$2]], [:.*\(.\)$], [\1]), [$3])dnl
254 # _AC_CONFIG_REGISTER_DEST(MODE, TAG, DEST, [COMMANDS])
255 # -----------------------------------------------------
256 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
257 # TAG is in the form DEST[:SOURCE...].
258 # Thus parameter $3 is the first part of $2.
260 # With CONFIG_LINKS, reject DEST=., because it is makes it hard for ./config.status
261 # to guess the links to establish (`./config.status .').
263 # Save the name of the first config header to AH_HEADER.
265 m4_define([_AC_CONFIG_REGISTER_DEST],
266 [_AC_CONFIG_UNIQUE([$1], [$3])dnl
267 m4_if([$1 $3], [LINKS .],
268 [AC_FATAL([invalid destination of a config link: `.'])])dnl
269 m4_if([$1], [HEADERS],
270 [m4_define_default([AH_HEADER], [$3])])dnl
272 dnl Recognize TAG as an argument to config.status:
274 m4_append([_AC_LIST_TAGS],
275 [ "$3") CONFIG_$1="$CONFIG_$1 $2" ;;
278 dnl Register the associated commands, if any:
281 [m4_append([_AC_LIST_TAG_COMMANDS],
282 [ "$3":]m4_bpatsubst([$1], [^\(.\).*$], [\1])[) $4 ;;
284 ])# _AC_CONFIG_REGISTER_DEST
289 ## --------------------- ##
290 ## Configuration files. ##
291 ## --------------------- ##
294 # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
295 # -------------------------------------------------
296 # Specify output files, i.e., files that are configured with AC_SUBST.
298 AC_DEFUN([AC_CONFIG_FILES], [_AC_CONFIG_FOOS([FILES], $@)])
303 # Evaluate to an m4 number equal to the maximum number of commands to put
304 # in any single sed program, not counting ":" commands.
306 # Some seds have small command number limits, like on Digital OSF/1 and HP-UX.
307 m4_define([_AC_SED_CMD_LIMIT],
308 dnl One cannot portably go further than 99 commands because of HP-UX.
312 # _AC_AWK_LITERAL_LIMIT
313 # ---------------------
314 # Evaluate to the maximum number of characters to put in an awk
315 # string literal, not counting escape characters.
317 # Some awk's have small limits, such as Solaris and AIX awk.
318 m4_define([_AC_AWK_LITERAL_LIMIT],
322 # _AC_OUTPUT_FILES_PREPARE
323 # ------------------------
324 # Create the awk scripts needed for CONFIG_FILES.
325 # Support multiline substitutions and make sure that the substitutions are
326 # not evaluated recursively.
327 # The intention is to have readable config.status and configure, even
328 # though this m4 code might be scary.
330 # This code was written by Dan Manthey and rewritten by Ralf Wildenhues.
332 # This macro is expanded inside a here document. If the here document is
333 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
335 m4_define([_AC_OUTPUT_FILES_PREPARE],
336 [# Set up the scripts for CONFIG_FILES section.
337 # No need to generate them if there are no CONFIG_FILES.
338 # This happens for instance with `./config.status config.h'.
339 if test -n "$CONFIG_FILES"; then
341 dnl For AC_SUBST_FILE, check for usable getline support in awk,
342 dnl at config.status execution time.
343 dnl Otherwise, do the interpolation in sh, which is slower.
344 dnl Without any AC_SUBST_FILE, omit all related code.
345 dnl Note the expansion is double-quoted for readability.
346 m4_ifdef([_AC_SUBST_FILES],
347 [[if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
350 ac_cs_awk_read_file='
351 while ((getline aline < (F[key])) > 0)
356 ac_cs_awk_getline=false
357 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|'\""
358 ac_cs_awk_read_file='
361 '$ac_cs_awk_pipe_init
362 ac_cs_awk_pipe_fini='END { print "|#_!!_#|" }'
365 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
366 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
372 dnl Define the pipe that does the substitution.
373 m4_ifdef([_AC_SUBST_FILES],
374 [m4_define([_AC_SUBST_CMDS], [|
375 if $ac_cs_awk_getline; then
376 $AWK -f "$tmp/subs.awk"
378 $AWK -f "$tmp/subs.awk" | $SHELL
380 [m4_define([_AC_SUBST_CMDS],
381 [| $AWK -f "$tmp/subs.awk"])])dnl
383 echo 'BEGIN {' >"$tmp/subs1.awk"
386 m4_ifdef([_AC_SUBST_FILES],
387 [# Create commands to substitute file output variables.
389 echo "cat >>$CONFIG_STATUS <<_ACEOF"
390 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK'
391 echo "$ac_subst_files" | sed 's/.*/F@<:@"&"@:>@="$&"/'
400 echo "cat >conf$$subs.awk <<_ACEOF"
401 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/'
404 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
406 for ac_last_try in false false false false false :; do
409 dnl Do not use grep on conf$$subs.awk, since AIX grep has a line length limit.
410 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then
412 elif $ac_last_try; then
413 AC_MSG_ERROR([could not make $CONFIG_STATUS])
415 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
420 dnl Initialize an awk array of substitutions, keyed by variable name.
422 dnl The initial line contains the variable name VAR, then a `!'.
423 dnl Construct `S["VAR"]=' from it.
424 dnl The rest of the line, and potentially further lines, contain the
425 dnl substituted value; the last of those ends with $ac_delim. We split
426 dnl the output both along those substituted newlines and at intervals of
427 dnl length _AC_AWK_LITERAL_LIMIT. The latter is done to comply with awk
428 dnl string literal limitations, the former for simplicity in doing so.
430 dnl We deal with one input line at a time to avoid sed pattern space
431 dnl limitations. We kill the delimiter $ac_delim before splitting the
432 dnl string (otherwise we risk splitting the delimiter). And we do the
433 dnl splitting before the quoting of awk special characters (otherwise we
434 dnl risk splitting an escape sequence).
436 dnl Output as separate string literals, joined with backslash-newline.
437 dnl Eliminate the newline after `=' in a second script, for readability.
439 dnl Notes to the main part of the awk script:
440 dnl - the unusual FS value helps prevent running into the limit of 99 fields,
441 dnl - we avoid sub/gsub because of the \& quoting issues, see
442 dnl http://www.gnu.org/software/gawk/manual/html_node/Gory-Details.html
443 dnl - Writing `$ 0' prevents expansion by both the shell and m4 here.
445 dnl m4-double-quote most of the scripting for readability.
446 [cat >>$CONFIG_STATUS <<_ACEOF
447 cat >>"\$tmp/subs1.awk" <<\\_ACAWK
461 s/\(.\{]_AC_AWK_LITERAL_LIMIT[\}\).*/\1/
463 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
468 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
471 s/.\{]_AC_AWK_LITERAL_LIMIT[\}//
475 s/\(.\{]_AC_AWK_LITERAL_LIMIT[\}\).*/\1/
477 s/["\\]/\\&/g; s/^/"/; s/$/"/
481 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
484 s/.\{]_AC_AWK_LITERAL_LIMIT[\}//
486 ' <conf$$subs.awk | sed '
493 cat >>$CONFIG_STATUS <<_ACEOF
495 cat >>"\$tmp/subs1.awk" <<_ACAWK
496 for (key in S) S_is_set[key] = 1
498 ]m4_ifdef([_AC_SUBST_FILES],
499 [ \$ac_cs_awk_pipe_init])[
503 nfields = split(line, field, "@")
505 len = length(field[1])
506 for (i = 2; i < nfields; i++) {
511 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
512 len += length(value) + length(field[++i])
517 ]m4_ifdef([_AC_SUBST_FILES],
518 [[ if (nfields == 3 && !substed) {
520 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
521 \$ac_cs_awk_read_file
527 ]m4_ifdef([_AC_SUBST_FILES],
528 [\$ac_cs_awk_pipe_fini])[
530 sed "s/\$ac_cr\\\$//; s/\$ac_cr/\$ac_cs_awk_cr/g" < "\$tmp/subs1.awk" > "\$tmp/subs.awk"
532 ]dnl end of double-quoted part
534 # VPATH may cause trouble with some makes, so we remove $(srcdir),
535 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
536 # trailing colons and then remove the whole line if VPATH becomes empty
537 # (actually we leave an empty line to preserve line numbers).
538 if test "x$srcdir" = x.; then
539 ac_vpsub=['/^[ ]*VPATH[ ]*=/{
543 s/^\([^=]*=[ ]*\):*/\1/
549 cat >>$CONFIG_STATUS <<\_ACEOF
550 fi # test -n "$CONFIG_FILES"
552 ])# _AC_OUTPUT_FILES_PREPARE
557 # Do the variable substitutions to create the Makefiles or whatever.
559 # This macro is expanded inside a here document. If the here document is
560 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
562 m4_define([_AC_OUTPUT_FILE],
568 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
570 [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
571 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
574 AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
575 [ ac_MKDIR_P=$MKDIR_P
577 [[\\/$]]* | ?:[[\\/]]* ) ;;
578 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
583 m4_ifndef([AC_DATAROOTDIR_CHECKED],
584 [cat >>$CONFIG_STATUS <<\_ACEOF
585 # If the template does not know about datarootdir, expand it.
586 # FIXME: This hack should be removed a few years after 2.60.
587 ac_datarootdir_hack=; ac_datarootdir_seen=
588 m4_define([_AC_datarootdir_vars],
589 [datadir, docdir, infodir, localedir, mandir])
590 case `sed -n '/datarootdir/ {
594 m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
596 ])' $ac_file_inputs` in
597 *datarootdir*) ac_datarootdir_seen=yes;;
598 *@[]m4_join([@*|*@], _AC_datarootdir_vars)@*)
599 AC_MSG_WARN([$ac_file_inputs seems to ignore the --datarootdir setting])
601 cat >>$CONFIG_STATUS <<_ACEOF
602 ac_datarootdir_hack='
603 m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
604 [s&@_AC_Var@&$_AC_Var&g
606 s&\\\${datarootdir}&$datarootdir&g' ;;
611 # Neutralize VPATH when `$srcdir' = `.'.
612 # Shell code in configure.ac might set extrasub.
613 # FIXME: do we really want to maintain this feature?
614 cat >>$CONFIG_STATUS <<_ACEOF
618 cat >>$CONFIG_STATUS <<\_ACEOF
620 [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
621 dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE.
622 s&@configure_input@&$configure_input&;t t
623 dnl During the transition period, this is a special case:
624 s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir])
625 s&@top_build_prefix@&$ac_top_build_prefix&;t t[]AC_SUBST_TRACE([top_build_prefix])
626 m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir,
627 builddir, abs_builddir,
628 abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [[, MKDIR_P]]),
629 [s&@_AC_Var@&$ac_[]_AC_Var&;t t[]AC_SUBST_TRACE(_AC_Var)
631 m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack
633 " $ac_file_inputs m4_defn([_AC_SUBST_CMDS]) >$tmp/out
635 m4_ifndef([AC_DATAROOTDIR_CHECKED],
636 [test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
637 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
638 { ac_out=`sed -n '/^[[ ]]*datarootdir[[ ]]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
639 AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir'
640 which seems to be undefined. Please make sure it is defined.])
645 -) cat "$tmp/out"; rm -f "$tmp/out";;
646 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
648 dnl This would break Makefile dependencies:
649 dnl if diff $ac_file "$tmp/out" >/dev/null 2>&1; then
650 dnl echo "$ac_file is unchanged"
652 dnl rm -f $ac_file; mv "$tmp/out" $ac_file
659 ## ----------------------- ##
660 ## Configuration headers. ##
661 ## ----------------------- ##
664 # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
665 # ------------------------------------------------------
666 # Specify that the HEADERS are to be created by instantiation of the
669 AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)])
672 # AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
673 # --------------------------------------
674 # FIXME: Make it obsolete?
675 AC_DEFUN([AC_CONFIG_HEADER],
676 [AC_CONFIG_HEADERS([$1])])
679 # _AC_OUTPUT_HEADERS_PREPARE
680 # --------------------------
681 # Create the awk scripts needed for CONFIG_HEADERS.
682 # Support multiline #defines.
684 # This macro is expanded inside a here document. If the here document is
685 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
687 m4_define([_AC_OUTPUT_HEADERS_PREPARE],
688 [# Set up the scripts for CONFIG_HEADERS section.
689 # No need to generate them if there are no CONFIG_HEADERS.
690 # This happens for instance with `./config.status Makefile'.
691 if test -n "$CONFIG_HEADERS"; then
692 cat >"$tmp/defines.awk" <<\_ACAWK
696 # Transform confdefs.h into an awk script `defines.awk', embedded as
697 # here-document in config.status, that substitutes the proper values into
698 # config.h.in to produce config.h.
700 # Create a delimiter string that does not exist in confdefs.h, to ease
701 # handling of long lines.
703 for ac_last_try in false false :; do
704 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
705 if test -z "$ac_t"; then
707 elif $ac_last_try; then
708 AC_MSG_ERROR([could not make $CONFIG_HEADERS])
710 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
714 # For the awk script, D is an array of macro values keyed by name,
715 # likewise P contains macro parameters if any. Preserve backslash
718 dnl Structure of the sed script that reads confdefs.h:
719 dnl rset: main loop, searches for `#define' lines
720 dnl def: deal with a `#define' line
721 dnl bsnl: deal with a `#define' line that ends with backslash-newline
722 dnl cont: handle a continuation line
723 dnl bsnlc: handle a continuation line that ends with backslash-newline
725 dnl Each sub part escapes the awk special characters and outputs a statement
726 dnl inserting the macro value into the array D, keyed by name. If the macro
727 dnl uses parameters, they are added in the array P, keyed by name.
729 dnl Long values are split into several string literals with help of ac_delim.
730 dnl Assume nobody uses macro names of nearly 150 bytes length.
732 dnl The initial replace for `#define' lines inserts a leading space
733 dnl in order to ease later matching; otherwise, output lines may be
734 dnl repeatedly matched.
736 dnl m4-double-quote most of this for [, ], define, and substr:
738 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
740 s/.\{]_AC_AWK_LITERAL_LIMIT[\}/&'"$ac_delim"'/g
743 s/^[ ]*#[ ]*define[ ][ ]*/ /
750 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
752 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
756 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
757 D["\1"]=" \3\\\\\\n"\\/p
759 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
764 s/.\{]_AC_AWK_LITERAL_LIMIT[\}/&'"$ac_delim"'/g
769 s/["\\]/\\&/g; s/^/"/; s/$/"/p
772 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
774 ' <confdefs.h | sed '
776 "/g' >>$CONFIG_STATUS
778 cat >>$CONFIG_STATUS <<_ACEOF
779 for (key in D) D_is_set[key] = 1
782 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
784 split(line, arg, " ")
789 defundef = substr(arg[1], 2)
792 split(mac1, mac2, "(") #)
794 if (D_is_set[macro]) {
795 # Preserve the white space surrounding the "#".
796 prefix = substr(line, 1, index(line, defundef) - 1)
797 print prefix "define", macro P[macro] D[macro]
800 # Replace #undef with comments. This is necessary, for example,
801 # in the case of _POSIX_SOURCE, which is predefined and required
802 # on some systems where configure will not decide to define it.
803 if (defundef == "undef") {
804 print "/*", line, "*/"
810 ]dnl End of double-quoted section
814 cat >>$CONFIG_STATUS <<\_ACEOF
815 fi # test -n "$CONFIG_HEADERS"
817 ])# _AC_OUTPUT_HEADERS_PREPARE
823 # Output the code which instantiates the `config.h' files from their
826 # This macro is expanded inside a here document. If the here document is
827 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
829 m4_define([_AC_OUTPUT_HEADER],
834 if test x"$ac_file" != x-; then
835 AS_ECHO(["/* $configure_input */"]) >"$tmp/config.h"
836 $AWK -f "$tmp/defines.awk" $ac_file_inputs >>"$tmp/config.h"
837 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
838 AC_MSG_NOTICE([$ac_file is unchanged])
841 mv "$tmp/config.h" $ac_file
844 AS_ECHO(["/* $configure_input */"])
845 $AWK -f "$tmp/defines.awk" $ac_file_inputs
847 dnl If running for Automake, be ready to perform additional
848 dnl commands to set up the timestamp files.
849 m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK],
850 [_AC_AM_CONFIG_HEADER_HOOK([$ac_file])
852 ])# _AC_OUTPUT_HEADER
856 ## --------------------- ##
857 ## Configuration links. ##
858 ## --------------------- ##
861 # AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS])
862 # --------------------------------------------------------
863 # Specify that config.status should establish a (symbolic if possible)
864 # link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
865 # Reject DEST=., because it is makes it hard for ./config.status
866 # to guess the links to establish (`./config.status .').
868 AC_DEFUN([AC_CONFIG_LINKS], [_AC_CONFIG_FOOS([LINKS], $@)])
871 # AC_LINK_FILES(SOURCE..., DEST...)
872 # ---------------------------------
873 # Link each of the existing files SOURCE... to the corresponding
874 # link name in DEST...
876 # Unfortunately we can't provide a very good autoupdate service here,
877 # since in `AC_LINK_FILES($from, $to)' it is possible that `$from'
878 # and `$to' are actually lists. It would then be completely wrong to
879 # replace it with `AC_CONFIG_LINKS($to:$from). It is possible in the
880 # case of literal values though, but because I don't think there is any
881 # interest in creating config links with literal values, no special
882 # mechanism is implemented to handle them.
884 # _AC_LINK_FILES_CNT is used to be robust to multiple calls.
885 AU_DEFUN([AC_LINK_FILES],
887 [m4_fatal([$0: incorrect number of arguments])])dnl
888 m4_define_default([_AC_LINK_FILES_CNT], 0)dnl
889 m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
892 while test -n "$ac_sources"; do
893 set $ac_dests; ac_dest=$[1]; shift; ac_dests=$[*]
894 set $ac_sources; ac_source=$[1]; shift; ac_sources=$[*]
895 [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
897 AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
899 [It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
900 to AC_CONFIG_LINKS. `autoupdate' provides a functional but inelegant
901 update, you should probably tune the result yourself.])# AC_LINK_FILES
906 # This macro is expanded inside a here document. If the here document is
907 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
908 m4_define([_AC_OUTPUT_LINK],
914 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
915 AC_MSG_WARN([not linking $ac_source to itself])
917 # Prefer the file from the source tree if names are identical.
918 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
919 ac_source=$srcdir/$ac_source
922 AC_MSG_NOTICE([linking $ac_source to $ac_file])
924 if test ! -r "$ac_source"; then
925 AC_MSG_ERROR([$ac_source: file not found])
929 # Try a relative symlink, then a hard link, then a copy.
931 [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$ac_source ;;
932 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
934 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
935 ln "$ac_source" "$ac_file" 2>/dev/null ||
936 cp -p "$ac_source" "$ac_file" ||
937 AC_MSG_ERROR([cannot link or copy $ac_source to $ac_file])
943 ## ------------------------ ##
944 ## Configuration commands. ##
945 ## ------------------------ ##
948 # AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
949 # ---------------------------------------------------
951 # Specify additional commands to be run by config.status. This
952 # commands must be associated with a NAME, which should be thought
953 # as the name of a file the COMMANDS create.
955 AC_DEFUN([AC_CONFIG_COMMANDS], [_AC_CONFIG_FOOS([COMMANDS], $@)])
958 # AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
959 # -----------------------------------------
961 # Add additional commands for AC_OUTPUT to put into config.status.
963 # This macro is an obsolete version of AC_CONFIG_COMMANDS. The only
964 # difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is
965 # to give a unique key. The scheme we have chosen is `default-1',
966 # `default-2' etc. for each call.
968 # Unfortunately this scheme is fragile: bad things might happen
969 # if you update an included file and configure.ac: you might have
970 # clashes :( On the other hand, I'd like to avoid weird keys (e.g.,
971 # depending upon __file__ or the pid).
972 AU_DEFUN([AC_OUTPUT_COMMANDS],
973 [m4_define_default([_AC_OUTPUT_COMMANDS_CNT], 0)dnl
974 m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
975 dnl Double quoted since that was the case in the original macro.
976 AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
982 # This macro is expanded inside a here document. If the here document is
983 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
984 m4_define([_AC_OUTPUT_COMMAND],
985 [ AC_MSG_NOTICE([executing $ac_file commands])
990 ## -------------------------------------- ##
991 ## Pre- and post-config.status commands. ##
992 ## -------------------------------------- ##
995 # AC_CONFIG_COMMANDS_PRE(CMDS)
996 # ----------------------------
997 # Commands to run right before config.status is created. Accumulates.
998 AC_DEFUN([AC_CONFIG_COMMANDS_PRE],
999 [m4_append([AC_OUTPUT_COMMANDS_PRE], [$1
1003 # AC_OUTPUT_COMMANDS_PRE
1004 # ----------------------
1005 # A *variable* in which we append all the actions that must be
1006 # performed before *creating* config.status. For a start, clean
1007 # up all the LIBOBJ mess.
1008 m4_define([AC_OUTPUT_COMMANDS_PRE],
1009 [_AC_LIBOBJS_NORMALIZE
1013 # AC_CONFIG_COMMANDS_POST(CMDS)
1014 # -----------------------------
1015 # Commands to run after config.status was created. Accumulates.
1016 AC_DEFUN([AC_CONFIG_COMMANDS_POST],
1017 [m4_append([AC_OUTPUT_COMMANDS_POST], [$1
1021 m4_define([AC_OUTPUT_COMMANDS_POST])
1025 ## ----------------------- ##
1026 ## Configuration subdirs. ##
1027 ## ----------------------- ##
1030 # AC_CONFIG_SUBDIRS(DIR ...)
1031 # --------------------------
1032 # We define two variables:
1033 # - _AC_LIST_SUBDIRS
1034 # A statically built list, should contain *all* the arguments of
1035 # AC_CONFIG_SUBDIRS. The final value is assigned to ac_subdirs_all in
1036 # the `default' section, and used for --help=recursive.
1037 # It makes no sense for arguments which are sh variables.
1039 # Shell variable built at runtime, so some of these dirs might not be
1040 # included, if for instance the user refused a part of the tree.
1041 # This is used in _AC_OUTPUT_SUBDIRS.
1042 AC_DEFUN([AC_CONFIG_SUBDIRS],
1043 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1044 AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])dnl
1045 m4_foreach_w([_AC_Sub], [$1],
1046 [_AC_CONFIG_UNIQUE([SUBDIRS],
1047 m4_bpatsubst(m4_defn([_AC_Sub]), [:.*]))])dnl
1048 m4_append([_AC_LIST_SUBDIRS], [$1], [
1050 AS_LITERAL_IF([$1], [],
1051 [AC_DIAGNOSE([syntax], [$0: you should use literals])])dnl
1052 AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])dnl
1056 # _AC_OUTPUT_SUBDIRS
1057 # ------------------
1058 # This is a subroutine of AC_OUTPUT, but it does not go into
1059 # config.status, rather, it is called after running config.status.
1060 m4_define([_AC_OUTPUT_SUBDIRS],
1063 # CONFIG_SUBDIRS section.
1065 if test "$no_recursion" != yes; then
1067 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
1068 # so they do not pile up.
1069 ac_sub_configure_args=
1071 eval "set x $ac_configure_args"
1075 if test -n "$ac_prev"; then
1080 -cache-file | --cache-file | --cache-fil | --cache-fi \
1081 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1082 ac_prev=cache_file ;;
1083 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1084 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
1087 --config-cache | -C)
1089 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1091 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1093 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1095 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1097 --disable-option-checking)
1101 *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1103 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
1107 # Always prepend --prefix to ensure using the same prefix
1108 # in subdir configurations.
1109 ac_arg="--prefix=$prefix"
1111 *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1113 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
1116 if test "$silent" = yes; then
1117 ac_sub_configure_args="--silent $ac_sub_configure_args"
1120 # Always prepend --disable-option-checking to silence warnings, since
1121 # different subdirs can have different --enable and --with options.
1122 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
1125 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
1127 # Do not complain, so a configure script can configure whichever
1128 # parts of a large source tree are present.
1129 test -d "$srcdir/$ac_dir" || continue
1131 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
1132 _AS_ECHO_LOG([$ac_msg])
1134 AS_MKDIR_P(["$ac_dir"])
1135 _AC_SRCDIRS(["$ac_dir"])
1139 # Check for guested configure; otherwise get Cygnus style configure.
1140 if test -f "$ac_srcdir/configure.gnu"; then
1141 ac_sub_configure=$ac_srcdir/configure.gnu
1142 elif test -f "$ac_srcdir/configure"; then
1143 ac_sub_configure=$ac_srcdir/configure
1144 elif test -f "$ac_srcdir/configure.in"; then
1145 # This should be Cygnus configure.
1146 ac_sub_configure=$ac_aux_dir/configure
1148 AC_MSG_WARN([no configuration information is in $ac_dir])
1152 # The recursion is here.
1153 if test -n "$ac_sub_configure"; then
1154 # Make the cache file name correct relative to the subdirectory.
1156 [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
1158 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
1161 AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
1162 # The eval makes quoting arguments work.
1163 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
1164 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
1165 AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
1171 ])# _AC_OUTPUT_SUBDIRS
1176 ## -------------------------- ##
1177 ## Outputting config.status. ##
1178 ## -------------------------- ##
1181 # AU::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1182 # -----------------------------------------------------------
1184 # If there are arguments given to AC_OUTPUT, dispatch them to the
1185 # proper modern macros.
1186 AU_DEFUN([AC_OUTPUT],
1188 [AC_CONFIG_FILES([$1])])dnl
1190 [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
1194 # AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1195 # -------------------------------------------------------
1197 # Produce config.status, config.h, and links; and configure subdirs.
1199 m4_define([AC_OUTPUT],
1200 [dnl Dispatch the extra arguments to their native macros.
1202 [AC_CONFIG_FILES([$1])])dnl
1204 [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
1206 [AC_DIAGNOSE([obsolete],
1207 [$0 should be used without arguments.
1208 You should run autoupdate.])])dnl
1211 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1212 # Let make expand exec_prefix.
1213 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1215 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
1217 dnl Commands to run before creating config.status.
1218 AC_OUTPUT_COMMANDS_PRE()dnl
1220 : ${CONFIG_STATUS=./config.status}
1221 ac_clean_files_save=$ac_clean_files
1222 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1223 _AC_OUTPUT_CONFIG_STATUS()dnl
1224 ac_clean_files=$ac_clean_files_save
1226 dnl Commands to run after config.status was created
1227 AC_OUTPUT_COMMANDS_POST()dnl
1229 # configure is writing to config.log, and then calls config.status.
1230 # config.status does its own redirection, appending to config.log.
1231 # Unfortunately, on DOS this fails, as config.log is still kept open
1232 # by configure, so config.status won't be able to write to it; its
1233 # output is simply discarded. So we exec the FD to /dev/null,
1234 # effectively closing config.log, so it can be properly (re)opened and
1235 # appended to by config.status. When coming back to configure, we
1236 # need to make the FD available again.
1237 if test "$no_create" != yes; then
1239 ac_config_status_args=
1240 test "$silent" = yes &&
1241 ac_config_status_args="$ac_config_status_args --quiet"
1242 exec AS_MESSAGE_LOG_FD>/dev/null
1243 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
1244 exec AS_MESSAGE_LOG_FD>>config.log
1245 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
1246 # would make configure fail if this is the last instruction.
1247 $ac_cs_success || AS_EXIT([1])
1249 dnl config.status should not do recursion.
1250 AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
1251 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
1252 AC_MSG_WARN([Unrecognized options: $ac_unrecognized_opts])
1257 # _AC_OUTPUT_CONFIG_STATUS
1258 # ------------------------
1259 # Produce config.status. Called by AC_OUTPUT.
1260 # Pay special attention not to have too long here docs: some old
1261 # shells die. Unfortunately the limit is not known precisely...
1262 m4_define([_AC_OUTPUT_CONFIG_STATUS],
1263 [AC_MSG_NOTICE([creating $CONFIG_STATUS])
1264 dnl AS_MESSAGE_LOG_FD is not available yet:
1265 m4_rename([AS_MESSAGE_LOG_FD], [_AC_save_AS_MESSAGE_LOG_FD])dnl
1266 cat >$CONFIG_STATUS <<_ACEOF
1268 # Generated by $as_me.
1269 # Run this file to recreate the current configuration.
1270 # Compiler output produced by configure, useful for debugging
1271 # configure, is in config.log if it exists.
1276 SHELL=\${CONFIG_SHELL-$SHELL}
1279 cat >>$CONFIG_STATUS <<\_ACEOF
1281 dnl Watch out, this is directly the initializations, do not use
1282 dnl AS_PREPARE, otherwise you'd get it output in the initialization
1283 dnl of configure, not config.status.
1285 exec AS_MESSAGE_FD>&1
1287 # Save the log message, to keep $[0] and so on meaningful, and to
1288 # report actual input values of CONFIG_FILES etc. instead of their
1289 # values after options handling.
1291 This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1292 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1293 generated by m4_PACKAGE_STRING. Invocation command line was
1295 CONFIG_FILES = $CONFIG_FILES
1296 CONFIG_HEADERS = $CONFIG_HEADERS
1297 CONFIG_LINKS = $CONFIG_LINKS
1298 CONFIG_COMMANDS = $CONFIG_COMMANDS
1301 on `(hostname || uname -n) 2>/dev/null | sed 1q`
1306 cat >>$CONFIG_STATUS <<_ACEOF
1307 # Files that config.status was made for.
1308 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1309 [config_files="$ac_config_files"
1311 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1312 [config_headers="$ac_config_headers"
1314 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1315 [config_links="$ac_config_links"
1317 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1318 [config_commands="$ac_config_commands"
1323 cat >>$CONFIG_STATUS <<\_ACEOF
1325 \`$as_me' instantiates files from templates according to the
1326 current configuration.
1328 Usage: $[0] [[OPTIONS]] [[FILE]]...
1330 -h, --help print this help, then exit
1331 -V, --version print version number and configuration settings, then exit
1332 -q, --quiet do not print progress messages
1333 -d, --debug don't remove temporary files
1334 --recheck update $as_me by reconfiguring in the same conditions
1335 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1336 [AS_HELP_STRING([[--file=FILE[:TEMPLATE]]],
1337 [instantiate the configuration file FILE], [ ])
1339 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1340 [AS_HELP_STRING([[--header=FILE[:TEMPLATE]]],
1341 [instantiate the configuration header FILE], [ ])
1344 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1345 [Configuration files:
1349 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1350 [Configuration headers:
1354 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1355 [Configuration links:
1359 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1360 [Configuration commands:
1364 Report bugs to <bug-autoconf@gnu.org>."
1367 cat >>$CONFIG_STATUS <<_ACEOF
1369 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
1370 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1371 configured by $[0], generated by m4_PACKAGE_STRING,
1372 with options \\"`AS_ECHO(["$ac_configure_args"]) | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\"
1374 Copyright (C) 2007 Free Software Foundation, Inc.
1375 This config.status script is free software; the Free Software Foundation
1376 gives unlimited permission to copy, distribute and modify it."
1380 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
1383 AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
1386 AC_PROVIDE_IFELSE([AC_PROG_AWK],
1389 test -n "\$AWK" || AWK=awk
1392 cat >>$CONFIG_STATUS <<\_ACEOF
1393 # The default lists apply if the user does not specify any file.
1395 while test $[#] != 0
1399 ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='`
1400 ac_optarg=`expr "X$[1]" : 'X[[^=]]*=\(.*\)'`
1411 # Handling of the options.
1412 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1414 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
1415 AS_ECHO(["$ac_cs_version"]); exit ;;
1416 --debug | --debu | --deb | --de | --d | -d )
1418 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl
1419 --file | --fil | --fi | --f )
1421 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
1422 ac_need_defaults=false;;
1424 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl
1425 --header | --heade | --head | --hea )
1427 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
1428 ac_need_defaults=false;;
1430 # Conflict between --help and --header
1431 AC_MSG_ERROR([ambiguous option: $[1]
1432 Try `$[0] --help' for more information.]);;
1433 ], [ --he | --h |])dnl
1434 --help | --hel | -h )
1435 AS_ECHO(["$ac_cs_usage"]); exit ;;
1436 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1437 | -silent | --silent | --silen | --sile | --sil | --si | --s)
1441 -*) AC_MSG_ERROR([unrecognized option: $[1]
1442 Try `$[0] --help' for more information.]) ;;
1444 *) ac_config_targets="$ac_config_targets $[1]"
1445 ac_need_defaults=false ;;
1451 ac_configure_extra_args=
1453 if $ac_cs_silent; then
1454 exec AS_MESSAGE_FD>/dev/null
1455 ac_configure_extra_args="$ac_configure_extra_args --silent"
1459 cat >>$CONFIG_STATUS <<_ACEOF
1460 dnl Check this before opening the log, to avoid a bug on MinGW,
1461 dnl which prohibits the recursive instance from truncating an open log.
1462 if \$ac_cs_recheck; then
1463 set X '$SHELL' '$[0]' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
1465 \AS_ECHO(["running CONFIG_SHELL=$SHELL \$[*]"]) >&AS_MESSAGE_FD
1466 CONFIG_SHELL='$SHELL'
1472 cat >>$CONFIG_STATUS <<\_ACEOF
1474 m4_rename([_AC_save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl
1475 exec AS_MESSAGE_LOG_FD>>config.log
1478 AS_BOX([Running $as_me.])
1479 AS_ECHO(["$ac_log"])
1480 } >&AS_MESSAGE_LOG_FD
1483 cat >>$CONFIG_STATUS <<_ACEOF
1484 m4_ifdef([_AC_OUTPUT_COMMANDS_INIT],
1488 _AC_OUTPUT_COMMANDS_INIT
1492 cat >>$CONFIG_STATUS <<\_ACEOF
1494 # Handling of arguments.
1495 for ac_config_target in $ac_config_targets
1497 case $ac_config_target in
1498 m4_ifdef([_AC_LIST_TAGS], [_AC_LIST_TAGS])
1499 *) AC_MSG_ERROR([invalid argument: $ac_config_target]);;
1503 m4_ifdef([_AC_SEEN_CONFIG(ANY)], [_AC_OUTPUT_MAIN_LOOP])[]dnl
1507 chmod +x $CONFIG_STATUS
1508 ])# _AC_OUTPUT_CONFIG_STATUS
1510 # _AC_OUTPUT_MAIN_LOOP
1511 # --------------------
1512 # The main loop in $CONFIG_STATUS.
1514 # This macro is expanded inside a here document. If the here document is
1515 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
1517 AC_DEFUN([_AC_OUTPUT_MAIN_LOOP],
1519 # If the user did not use the arguments to specify the items to instantiate,
1520 # then the envvar interface is used. Set only those that are not.
1521 # We use the long form for the default assignment because of an extremely
1522 # bizarre bug on SunOS 4.1.3.
1523 if $ac_need_defaults; then
1524 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1525 [ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
1527 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1528 [ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
1530 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1531 [ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
1533 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1534 [ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
1538 # Have a temporary directory for convenience. Make it in the build tree
1539 # simply because there is no reason against having it here, and in addition,
1540 # creating and moving files from /tmp can sometimes cause problems.
1541 # Hook for its removal unless debugging.
1542 # Note that there is a small window in which the directory will not be cleaned:
1543 # after its creation but before its name has been assigned to `$tmp'.
1547 trap 'exit_status=$?
1548 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
1550 trap 'AS_EXIT([1])' 1 2 13 15
1552 dnl The comment above AS_TMPDIR says at most 4 chars are allowed.
1553 AS_TMPDIR([conf], [.])
1555 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl
1556 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [_AC_OUTPUT_HEADERS_PREPARE])[]dnl
1559 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F $CONFIG_FILES])[]dnl
1560 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H $CONFIG_HEADERS])[]dnl
1561 m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L $CONFIG_LINKS])[]dnl
1562 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS])
1565 :[[FHLC]]) ac_mode=$ac_tag; continue;;
1567 case $ac_mode$ac_tag in
1569 :L* | :C*:*) AC_MSG_ERROR([Invalid tag $ac_tag.]);;
1570 :[[FH]]-) ac_tag=-:-;;
1571 :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;;
1582 :L) ac_source=$[1];;
1588 -) ac_f="$tmp/stdin";;
1589 *) # Look for the file first in the build tree, then in the source tree
1590 # (if the path is not absolute). The absolute path cannot be DOS-style,
1591 # because $ac_f cannot contain `:'.
1595 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1597 AC_MSG_ERROR([cannot find input file: $ac_f]);;
1599 ac_file_inputs="$ac_file_inputs $ac_f"
1602 # Let's still pretend it is `configure' which instantiates (i.e., don't
1603 # use $as_me), people would be surprised to read:
1604 # /* config.h. Generated by config.status. */
1605 configure_input='Generated from '`
1606 AS_ECHO(["$[*]"]) | sed ['s|^[^:]*/||;s|:[^:]*/|, |g']
1608 if test x"$ac_file" != x-; then
1609 configure_input="$ac_file. $configure_input"
1610 AC_MSG_NOTICE([creating $ac_file])
1614 *:-:* | *:-) cat >"$tmp/stdin";;
1619 ac_dir=`AS_DIRNAME(["$ac_file"])`
1620 AS_MKDIR_P(["$ac_dir"])
1621 _AC_SRCDIRS(["$ac_dir"])
1624 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F)_AC_OUTPUT_FILE ;;])
1625 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H)_AC_OUTPUT_HEADER ;;])
1626 m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L)_AC_OUTPUT_LINK ;;])
1627 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C)_AC_OUTPUT_COMMAND ;;])
1630 dnl Some shells don't like empty case/esac
1631 m4_ifdef([_AC_LIST_TAG_COMMANDS], [
1632 case $ac_file$ac_mode in
1633 _AC_LIST_TAG_COMMANDS
1638 ])# _AC_OUTPUT_MAIN_LOOP
1641 # AC_OUTPUT_MAKE_DEFS
1642 # -------------------
1643 # Set the DEFS variable to the -D options determined earlier.
1644 # This is a subroutine of AC_OUTPUT.
1645 # It is called inside configure, outside of config.status.
1646 m4_define([AC_OUTPUT_MAKE_DEFS],
1647 [[# Transform confdefs.h into DEFS.
1648 # Protect against shell expansion while executing Makefile rules.
1649 # Protect against Makefile macro expansion.
1651 # If the first sed substitution is executed (which looks for macros that
1652 # take arguments), then branch to the quote section. Otherwise,
1653 # look for a macro that doesn't take arguments.
1663 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
1665 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
1669 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
1682 DEFS=`sed -n "$ac_script" confdefs.h`
1683 ]])# AC_OUTPUT_MAKE_DEFS