Add and document AS_INIT_GENERATED.
[autoconf.git] / lib / autoconf / status.m4
blob6d622b9e42487e058913f018619dac012b2fd8d2
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, 2008 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 # 02110-1301, USA.
21 # As a special exception, the Free Software Foundation gives unlimited
22 # permission to copy, distribute and modify the configure scripts that
23 # are the output of Autoconf.  You need not follow the terms of the GNU
24 # General Public License when using or distributing such scripts, even
25 # though portions of the text of Autoconf appear in them.  The GNU
26 # General Public License (GPL) does govern all other use of the material
27 # that constitutes the Autoconf program.
29 # Certain portions of the Autoconf source text are designed to be copied
30 # (in certain cases, depending on the input) into the output of
31 # Autoconf.  We call these the "data" portions.  The rest of the Autoconf
32 # source text consists of comments plus executable code that decides which
33 # of the data portions to output in any given case.  We call these
34 # comments and executable code the "non-data" portions.  Autoconf never
35 # copies any of the non-data portions into its output.
37 # This special exception to the GPL applies to versions of Autoconf
38 # released by the Free Software Foundation.  When you make and
39 # distribute a modified version of Autoconf, you may extend this special
40 # exception to the GPL to apply to your modified version as well, *unless*
41 # your modified version has the potential to copy into its output some
42 # of the text that was the non-data portion of the version that you started
43 # with.  (In other words, unless your change moves or copies text from
44 # the non-data portions to the data portions.)  If your modification has
45 # such potential, you must delete any notice of this special exception
46 # to the GPL from your modified version.
48 # Written by David MacKenzie, with help from
49 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
50 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
53 # This file handles about all the preparation aspects for
54 # `config.status': registering the configuration files, the headers,
55 # the links, and the commands `config.status' will run.  There is a
56 # little mixture though of things actually handled by `configure',
57 # such as running the `configure' in the sub directories.  Minor
58 # detail.
60 # There are two kinds of commands:
62 # COMMANDS:
64 #   They are output into `config.status' via a quoted here doc.  These
65 #   commands are always associated to a tag which the user can use to
66 #   tell `config.status' what are the commands she wants to run.
68 # INIT-CMDS:
70 #   They are output via an *unquoted* here-doc.  As a consequence $var
71 #   will be output as the value of VAR.  This is typically used by
72 #   `configure' to give `config.status' some variables it needs to run
73 #   the COMMANDS.  At the difference of COMMANDS, the INIT-CMDS are
74 #   always run.
77 # Honorable members of this family are AC_CONFIG_FILES,
78 # AC_CONFIG_HEADERS, AC_CONFIG_LINKS and AC_CONFIG_COMMANDS.  Bad boys
79 # are AC_LINK_FILES, AC_OUTPUT_COMMANDS and AC_OUTPUT when used with
80 # arguments.  False members are AC_CONFIG_SRCDIR, AC_CONFIG_SUBDIRS
81 # and AC_CONFIG_AUX_DIR.  Cousins are AC_CONFIG_COMMANDS_PRE and
82 # AC_CONFIG_COMMANDS_POST.
85 ## ------------------ ##
86 ## Auxiliary macros.  ##
87 ## ------------------ ##
89 # _AC_SRCDIRS(BUILD-DIR-NAME)
90 # ---------------------------
91 # Inputs:
92 #   - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src'
93 #   - `$srcdir' is `top-build -> top-src'
95 # Outputs:
96 # - `ac_builddir' is `.', for symmetry only.
97 # - `ac_top_builddir_sub' is `build -> top_build'.
98 #      This is used for @top_builddir@.
99 # - `ac_top_build_prefix' is `build -> top_build'.
100 #      If not empty, has a trailing slash.
101 # - `ac_srcdir' is `build -> src'.
102 # - `ac_top_srcdir' is `build -> top-src'.
103 # and `ac_abs_builddir' etc., the absolute directory names.
104 m4_define([_AC_SRCDIRS],
105 [ac_builddir=.
107 case $1 in
108 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
110   ac_dir_suffix=/`AS_ECHO([$1]) | sed 's|^\.[[\\/]]||'`
111   # A ".." for each directory in $ac_dir_suffix.
112   ac_top_builddir_sub=`AS_ECHO(["$ac_dir_suffix"]) | sed 's|/[[^\\/]]*|/..|g;s|/||'`
113   case $ac_top_builddir_sub in
114   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
115   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
116   esac ;;
117 esac
118 ac_abs_top_builddir=$ac_pwd
119 ac_abs_builddir=$ac_pwd$ac_dir_suffix
120 # for backward compatibility:
121 ac_top_builddir=$ac_top_build_prefix
123 case $srcdir in
124   .)  # We are building in place.
125     ac_srcdir=.
126     ac_top_srcdir=$ac_top_builddir_sub
127     ac_abs_top_srcdir=$ac_pwd ;;
128   [[\\/]]* | ?:[[\\/]]* )  # Absolute name.
129     ac_srcdir=$srcdir$ac_dir_suffix;
130     ac_top_srcdir=$srcdir
131     ac_abs_top_srcdir=$srcdir ;;
132   *) # Relative name.
133     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
134     ac_top_srcdir=$ac_top_build_prefix$srcdir
135     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
136 esac
137 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
138 ])# _AC_SRCDIRS
141 # _AC_HAVE_TOP_BUILD_PREFIX
142 # -------------------------
143 # Announce to the world (to Libtool) that we substitute @top_build_prefix@.
144 AC_DEFUN([_AC_HAVE_TOP_BUILD_PREFIX])
147 ## ---------------------- ##
148 ## Registering the tags.  ##
149 ## ---------------------- ##
152 # _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS])
153 # -----------------------------------------
155 # Register INIT-COMMANDS as command pasted *unquoted* in
156 # `config.status'.  This is typically used to pass variables from
157 # `configure' to `config.status'.  Note that $[1] is not over quoted as
158 # was the case in AC_OUTPUT_COMMANDS.
159 m4_define([_AC_CONFIG_COMMANDS_INIT],
160 [m4_ifval([$1],
161           [m4_append([_AC_OUTPUT_COMMANDS_INIT],
162                      [$1
163 ])])])
166 # AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
167 # -----------------------------------------------------
168 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
170 # It announces DEST depends upon the SOURCE1 etc.
171 m4_define([AC_FILE_DEPENDENCY_TRACE], [])
174 # _AC_FILE_DEPENDENCY_TRACE_COLON(DEST:SOURCE1[:SOURCE2...])
175 # ----------------------------------------------------------
176 # Declare that DEST depends upon SOURCE1 etc.
178 m4_define([_AC_FILE_DEPENDENCY_TRACE_COLON],
179 [AC_FILE_DEPENDENCY_TRACE(m4_bpatsubst([$1], [:], [,]))dnl
183 # _AC_CONFIG_DEPENDENCY(MODE, DEST[:SOURCE1...])
184 # ---------------------------------------------
185 # MODE is `FILES', `HEADERS', or `LINKS'.
187 # Be sure that a missing dependency is expressed as a dependency upon
188 # `DEST.in' (except with config links).
190 m4_define([_AC_CONFIG_DEPENDENCY],
191 [_AC_FILE_DEPENDENCY_TRACE_COLON([$2]_AC_CONFIG_DEPENDENCY_DEFAULT($@))dnl
195 # _AC_CONFIG_DEPENDENCY_DEFAULT(MODE, DEST[:SOURCE1...])
196 # ------------------------------------------------------
197 # Expand to `:DEST.in' if appropriate, or to empty string otherwise.
199 # More detailed description:
200 # If the tag contains `:', expand to nothing.
201 # Otherwise, for a config file or header, add `:DEST.in'.
202 # For a config link, DEST.in is not appropriate:
203 #  - if the tag is literal, complain.
204 #  - otherwise, just expand to nothing and proceed with fingers crossed.
205 #    (We get to this case from the obsolete AC_LINK_FILES, for example.)
207 m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
208 [m4_bmatch([$2], [:], [],
209            [m4_if([$1], [LINKS],
210                   [AS_LITERAL_IF([$2], [AC_FATAL([Invalid AC_CONFIG_LINKS tag: `$2'])])],
211                   [:$2.in])])dnl
215 # _AC_CONFIG_UNIQUE(MODE, DEST)
216 # -----------------------------
217 # MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'.
219 # Verify that there is no double definition of an output file.
221 m4_define([_AC_CONFIG_UNIQUE],
222 [m4_ifdef([_AC_SEEN_TAG($2)],
223    [AC_FATAL([`$2' is already registered with AC_CONFIG_]m4_defn([_AC_SEEN_TAG($2)]).)],
224    [m4_define([_AC_SEEN_TAG($2)], [$1])])dnl
228 # _AC_CONFIG_FOOS(MODE, TAGS..., [COMMANDS], [INIT-CMDS])
229 # -------------------------------------------------------
230 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
232 # Associate the COMMANDS to each TAG, i.e., when config.status creates TAG,
233 # run COMMANDS afterwards.  (This is done in _AC_CONFIG_REGISTER_DEST.)
235 # For COMMANDS, do not m4_normalize TAGS before adding it to ac_config_commands.
236 # This historical difference allows macro calls in TAGS.
238 m4_define([_AC_CONFIG_FOOS],
239 [m4_foreach_w([AC_File], [$2],
240               [_AC_CONFIG_REGISTER([$1], m4_defn([AC_File]), [$3])])dnl
241 m4_define([_AC_SEEN_CONFIG(ANY)])dnl
242 m4_define([_AC_SEEN_CONFIG($1)])dnl
243 _AC_CONFIG_COMMANDS_INIT([$4])dnl
244 ac_config_[]m4_tolower([$1])="$ac_config_[]m4_tolower([$1]) dnl
245 m4_if([$1], [COMMANDS], [$2], [m4_normalize([$2])])"
249 # _AC_CONFIG_REGISTER(MODE, TAG, [COMMANDS])
250 # ------------------------------------------
251 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
253 m4_define([_AC_CONFIG_REGISTER],
254 [m4_if([$1], [COMMANDS],
255        [],
256        [_AC_CONFIG_DEPENDENCY([$1], [$2])])dnl
257 _AC_CONFIG_REGISTER_DEST([$1], [$2], m4_bpatsubst([[$2]], [:.*\(.\)$], [\1]), [$3])dnl
261 # _AC_CONFIG_REGISTER_DEST(MODE, TAG, DEST, [COMMANDS])
262 # -----------------------------------------------------
263 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
264 # TAG is in the form DEST[:SOURCE...].
265 # Thus parameter $3 is the first part of $2.
267 # With CONFIG_LINKS, reject DEST=., because it is makes it hard for ./config.status
268 # to guess the links to establish (`./config.status .').
270 # Save the name of the first config header to AH_HEADER.
272 m4_define([_AC_CONFIG_REGISTER_DEST],
273 [_AC_CONFIG_UNIQUE([$1], [$3])dnl
274 m4_if([$1 $3], [LINKS .],
275       [AC_FATAL([invalid destination of a config link: `.'])])dnl
276 m4_if([$1], [HEADERS],
277       [m4_define_default([AH_HEADER], [$3])])dnl
279 dnl Recognize TAG as an argument to config.status:
281 m4_append([_AC_LIST_TAGS],
282 [    "$3") CONFIG_$1="$CONFIG_$1 $2" ;;
283 ])dnl
285 dnl Register the associated commands, if any:
287 m4_ifval([$4],
288 [m4_append([_AC_LIST_TAG_COMMANDS],
289 [    "$3":]m4_bpatsubst([$1], [^\(.\).*$], [\1])[) $4 ;;
290 ])])dnl
291 ])# _AC_CONFIG_REGISTER_DEST
296 ## --------------------- ##
297 ## Configuration files.  ##
298 ## --------------------- ##
301 # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
302 # -------------------------------------------------
303 # Specify output files, i.e., files that are configured with AC_SUBST.
305 AC_DEFUN([AC_CONFIG_FILES], [_AC_CONFIG_FOOS([FILES], $@)])
308 # _AC_SED_CMD_LIMIT
309 # -----------------
310 # Evaluate to an m4 number equal to the maximum number of commands to put
311 # in any single sed program, not counting ":" commands.
313 # Some seds have small command number limits, like on Digital OSF/1 and HP-UX.
314 m4_define([_AC_SED_CMD_LIMIT],
315 dnl One cannot portably go further than 99 commands because of HP-UX.
316 [99])
319 # _AC_AWK_LITERAL_LIMIT
320 # ---------------------
321 # Evaluate to the maximum number of characters to put in an awk
322 # string literal, not counting escape characters.
324 # Some awk's have small limits, such as Solaris and AIX awk.
325 m4_define([_AC_AWK_LITERAL_LIMIT],
326 [148])
329 # _AC_OUTPUT_FILES_PREPARE
330 # ------------------------
331 # Create the awk scripts needed for CONFIG_FILES.
332 # Support multiline substitutions and make sure that the substitutions are
333 # not evaluated recursively.
334 # The intention is to have readable config.status and configure, even
335 # though this m4 code might be scary.
337 # This code was written by Dan Manthey and rewritten by Ralf Wildenhues.
339 # This macro is expanded inside a here document.  If the here document is
340 # closed, it has to be reopened with
341 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
343 m4_define([_AC_OUTPUT_FILES_PREPARE],
344 [# Set up the scripts for CONFIG_FILES section.
345 # No need to generate them if there are no CONFIG_FILES.
346 # This happens for instance with `./config.status config.h'.
347 if test -n "$CONFIG_FILES"; then
349 dnl For AC_SUBST_FILE, check for usable getline support in awk,
350 dnl at config.status execution time.
351 dnl Otherwise, do the interpolation in sh, which is slower.
352 dnl Without any AC_SUBST_FILE, omit all related code.
353 dnl Note the expansion is double-quoted for readability.
354 m4_ifdef([_AC_SUBST_FILES],
355 [[if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
356   ac_cs_awk_getline=:
357   ac_cs_awk_pipe_init=
358   ac_cs_awk_read_file='
359       while ((getline aline < (F[key])) > 0)
360         print(aline)
361       close(F[key])'
362   ac_cs_awk_pipe_fini=
363 else
364   ac_cs_awk_getline=false
365   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
366   ac_cs_awk_read_file='
367       print "|#_!!_#|"
368       print "cat " F[key] " &&"
369       '$ac_cs_awk_pipe_init
370   # The final `:' finishes the AND list.
371   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
372 fi]])
373 ac_cr='\r'
374 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
375 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
376   ac_cs_awk_cr='\\r'
377 else
378   ac_cs_awk_cr=$ac_cr
381 dnl Define the pipe that does the substitution.
382 m4_ifdef([_AC_SUBST_FILES],
383 [m4_define([_AC_SUBST_CMDS], [|
384 if $ac_cs_awk_getline; then
385   $AWK -f "$tmp/subs.awk"
386 else
387   $AWK -f "$tmp/subs.awk" | $SHELL
388 fi])],
389 [m4_define([_AC_SUBST_CMDS],
390 [| $AWK -f "$tmp/subs.awk"])])dnl
392 echo 'BEGIN {' >"$tmp/subs1.awk" &&
393 _ACEOF
395 m4_ifdef([_AC_SUBST_FILES],
396 [# Create commands to substitute file output variables.
398   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
399   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
400   echo "$ac_subst_files" | sed 's/.*/F@<:@"&"@:>@="$&"/' &&
401   echo "_ACAWK" &&
402   echo "_ACEOF"
403 } >conf$$files.sh &&
404 . ./conf$$files.sh ||
405   AC_MSG_ERROR([could not make $CONFIG_STATUS])
406 rm -f conf$$files.sh
407 ])dnl
410   echo "cat >conf$$subs.awk <<_ACEOF" &&
411   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
412   echo "_ACEOF"
413 } >conf$$subs.sh ||
414   AC_MSG_ERROR([could not make $CONFIG_STATUS])
415 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
416 ac_delim='%!_!# '
417 for ac_last_try in false false false false false :; do
418   . ./conf$$subs.sh ||
419     AC_MSG_ERROR([could not make $CONFIG_STATUS])
421 dnl Do not use grep on conf$$subs.awk, since AIX grep has a line length limit.
422   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
423   if test $ac_delim_n = $ac_delim_num; then
424     break
425   elif $ac_last_try; then
426     AC_MSG_ERROR([could not make $CONFIG_STATUS])
427   else
428     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
429   fi
430 done
431 rm -f conf$$subs.sh
433 dnl Initialize an awk array of substitutions, keyed by variable name.
435 dnl The initial line contains the variable name VAR, then a `!'.
436 dnl Construct `S["VAR"]=' from it.
437 dnl The rest of the line, and potentially further lines, contain the
438 dnl substituted value; the last of those ends with $ac_delim.  We split
439 dnl the output both along those substituted newlines and at intervals of
440 dnl length _AC_AWK_LITERAL_LIMIT.  The latter is done to comply with awk
441 dnl string literal limitations, the former for simplicity in doing so.
443 dnl We deal with one input line at a time to avoid sed pattern space
444 dnl limitations.  We kill the delimiter $ac_delim before splitting the
445 dnl string (otherwise we risk splitting the delimiter).  And we do the
446 dnl splitting before the quoting of awk special characters (otherwise we
447 dnl risk splitting an escape sequence).
449 dnl Output as separate string literals, joined with backslash-newline.
450 dnl Eliminate the newline after `=' in a second script, for readability.
452 dnl Notes to the main part of the awk script:
453 dnl - the unusual FS value helps prevent running into the limit of 99 fields,
454 dnl - we avoid sub/gsub because of the \& quoting issues, see
455 dnl   http://www.gnu.org/software/gawk/manual/html_node/Gory-Details.html
456 dnl - Writing `$ 0' prevents expansion by both the shell and m4 here.
458 dnl m4-double-quote most of the scripting for readability.
459 [cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
460 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
461 _ACEOF
462 sed -n '
464 s/^/S["/; s/!.*/"]=/
467 s/^[^!]*!//
468 :repl
469 t repl
470 s/'"$ac_delim"'$//
471 t delim
474 s/\(.\{]_AC_AWK_LITERAL_LIMIT[\}\).*/\1/
475 t more1
476 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
479 b repl
480 :more1
481 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
484 s/.\{]_AC_AWK_LITERAL_LIMIT[\}//
485 t nl
486 :delim
488 s/\(.\{]_AC_AWK_LITERAL_LIMIT[\}\).*/\1/
489 t more2
490 s/["\\]/\\&/g; s/^/"/; s/$/"/
493 :more2
494 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
497 s/.\{]_AC_AWK_LITERAL_LIMIT[\}//
498 t delim
499 ' <conf$$subs.awk | sed '
500 /^[^""]/{
501   N
502   s/\n//
504 ' >>$CONFIG_STATUS || ac_write_fail=1
505 rm -f conf$$subs.awk
506 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
507 _ACAWK
508 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
509   for (key in S) S_is_set[key] = 1
510   FS = "\a"
511 ]m4_ifdef([_AC_SUBST_FILES],
512 [  \$ac_cs_awk_pipe_init])[
515   line = $ 0
516   nfields = split(line, field, "@")
517   substed = 0
518   len = length(field[1])
519   for (i = 2; i < nfields; i++) {
520     key = field[i]
521     keylen = length(key)
522     if (S_is_set[key]) {
523       value = S[key]
524       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
525       len += length(value) + length(field[++i])
526       substed = 1
527     } else
528       len += 1 + keylen
529   }
530 ]m4_ifdef([_AC_SUBST_FILES],
531 [[  if (nfields == 3 && !substed) {
532     key = field[2]
533     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
534       \$ac_cs_awk_read_file
535       next
536     }
537   }]])[
538   print line
540 ]dnl end of double-quoted part
541 m4_ifdef([_AC_SUBST_FILES],
542 [\$ac_cs_awk_pipe_fini])
543 _ACAWK
544 _ACEOF
545 dnl See if CR is the EOL marker.  If not, remove any EOL-related
546 dnl ^M bytes and escape any remaining ones.  If so, just use mv.
547 dnl In case you're wondering how ^M bytes can make it into subs1.awk,
548 dnl [from Ralf Wildenhues] one way is if you have e.g.,
549 dnl AC_SUBST([variable_that_contains_cr], ["
550 dnl "])
551 dnl The original aim was that users should be able to substitute any
552 dnl characters they like (except for \0).  And the above is not so
553 dnl unlikely if the configure script itself happens to be converted
554 dnl to w32 text mode.
555 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
556 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
557   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
558 else
559   cat
560 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
561   || AC_MSG_ERROR([could not setup config files machinery])
562 _ACEOF
564 # VPATH may cause trouble with some makes, so we remove $(srcdir),
565 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
566 # trailing colons and then remove the whole line if VPATH becomes empty
567 # (actually we leave an empty line to preserve line numbers).
568 if test "x$srcdir" = x.; then
569   ac_vpsub=['/^[         ]*VPATH[        ]*=/{
570 s/:*\$(srcdir):*/:/
571 s/:*\${srcdir}:*/:/
572 s/:*@srcdir@:*/:/
573 s/^\([^=]*=[     ]*\):*/\1/
574 s/:*$//
575 s/^[^=]*=[       ]*$//
579 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
580 fi # test -n "$CONFIG_FILES"
582 ])# _AC_OUTPUT_FILES_PREPARE
585 # _AC_OUTPUT_FILE
586 # ---------------
587 # Do the variable substitutions to create the Makefiles or whatever.
589 # This macro is expanded inside a here document.  If the here document is
590 # closed, it has to be reopened with
591 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
593 m4_define([_AC_OUTPUT_FILE],
595   #
596   # CONFIG_FILE
597   #
599 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
600 [  case $INSTALL in
601   [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
602   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
603   esac
604 ])dnl
605 AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
606 [  ac_MKDIR_P=$MKDIR_P
607   case $MKDIR_P in
608   [[\\/$]]* | ?:[[\\/]]* ) ;;
609   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
610   esac
611 ])dnl
612 _ACEOF
614 m4_ifndef([AC_DATAROOTDIR_CHECKED],
615 [cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
616 # If the template does not know about datarootdir, expand it.
617 # FIXME: This hack should be removed a few years after 2.60.
618 ac_datarootdir_hack=; ac_datarootdir_seen=
619 m4_define([_AC_datarootdir_vars],
620           [datadir, docdir, infodir, localedir, mandir])
621 ac_sed_dataroot='
622 /datarootdir/ {
623   p
624   q
626 m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
627            [/@_AC_Var@/p
629 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
630 *datarootdir*) ac_datarootdir_seen=yes;;
631 *@[]m4_join([@*|*@], _AC_datarootdir_vars)@*)
632   AC_MSG_WARN([$ac_file_inputs seems to ignore the --datarootdir setting])
633 _ACEOF
634 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
635   ac_datarootdir_hack='
636   m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
637                [s&@_AC_Var@&$_AC_Var&g
638   ])dnl
639   s&\\\${datarootdir}&$datarootdir&g' ;;
640 esac
641 _ACEOF
642 ])dnl
644 # Neutralize VPATH when `$srcdir' = `.'.
645 # Shell code in configure.ac might set extrasub.
646 # FIXME: do we really want to maintain this feature?
647 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
648 ac_sed_extra="$ac_vpsub
649 $extrasub
650 _ACEOF
651 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
653 [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
654 dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE.
655 dnl Note if you change the s||| delimiter here, don't forget to adjust
656 dnl ac_sed_conf_input accordingly.  Using & is a bad idea if & appears in
657 dnl the replacement string.
658 s|@configure_input@|$ac_sed_conf_input|;t t
659 dnl During the transition period, this is a special case:
660 s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir])
661 dnl For this substitution see the witness macro _AC_HAVE_TOP_BUILD_PREFIX above.
662 s&@top_build_prefix@&$ac_top_build_prefix&;t t[]AC_SUBST_TRACE([top_build_prefix])
663 m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir,
664                         builddir, abs_builddir,
665                         abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [[, MKDIR_P]]),
666            [s&@_AC_Var@&$ac_[]_AC_Var&;t t[]AC_SUBST_TRACE(_AC_Var)
667 ])dnl
668 m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack
669 ])dnl
671 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" m4_defn([_AC_SUBST_CMDS]) >$tmp/out \
672   || AC_MSG_ERROR([could not create $ac_file])
674 m4_ifndef([AC_DATAROOTDIR_CHECKED],
675 [test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
676   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
677   { ac_out=`sed -n '/^[[         ]]*datarootdir[[        ]]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
678   AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir'
679 which seems to be undefined.  Please make sure it is defined.])
680 ])dnl
682   rm -f "$tmp/stdin"
683   case $ac_file in
684   -) cat "$tmp/out" && rm -f "$tmp/out";;
685   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
686   esac \
687   || AC_MSG_ERROR([could not create $ac_file])
688 dnl This would break Makefile dependencies:
689 dnl  if diff "$ac_file" "$tmp/out" >/dev/null 2>&1; then
690 dnl    echo "$ac_file is unchanged"
691 dnl  else
692 dnl     rm -f "$ac_file"; mv "$tmp/out" "$ac_file"
693 dnl  fi
694 ])# _AC_OUTPUT_FILE
699 ## ----------------------- ##
700 ## Configuration headers.  ##
701 ## ----------------------- ##
704 # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
705 # ------------------------------------------------------
706 # Specify that the HEADERS are to be created by instantiation of the
707 # AC_DEFINEs.
709 AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)])
712 # AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
713 # --------------------------------------
714 # FIXME: Make it obsolete?
715 AC_DEFUN([AC_CONFIG_HEADER],
716 [AC_CONFIG_HEADERS([$1])])
719 # _AC_OUTPUT_HEADERS_PREPARE
720 # --------------------------
721 # Create the awk scripts needed for CONFIG_HEADERS.
722 # Support multiline #defines.
724 # This macro is expanded inside a here document.  If the here document is
725 # closed, it has to be reopened with
726 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
728 m4_define([_AC_OUTPUT_HEADERS_PREPARE],
729 [# Set up the scripts for CONFIG_HEADERS section.
730 # No need to generate them if there are no CONFIG_HEADERS.
731 # This happens for instance with `./config.status Makefile'.
732 if test -n "$CONFIG_HEADERS"; then
733 dnl This `||' list is finished at the end of _AC_OUTPUT_HEADERS_PREPARE.
734 cat >"$tmp/defines.awk" <<\_ACAWK ||
735 BEGIN {
736 _ACEOF
738 # Transform confdefs.h into an awk script `defines.awk', embedded as
739 # here-document in config.status, that substitutes the proper values into
740 # config.h.in to produce config.h.
742 # Create a delimiter string that does not exist in confdefs.h, to ease
743 # handling of long lines.
744 ac_delim='%!_!# '
745 for ac_last_try in false false :; do
746   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
747   if test -z "$ac_t"; then
748     break
749   elif $ac_last_try; then
750     AC_MSG_ERROR([could not make $CONFIG_HEADERS])
751   else
752     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
753   fi
754 done
756 # For the awk script, D is an array of macro values keyed by name,
757 # likewise P contains macro parameters if any.  Preserve backslash
758 # newline sequences.
760 dnl Structure of the sed script that reads confdefs.h:
761 dnl rset:  main loop, searches for `#define' lines
762 dnl def:   deal with a `#define' line
763 dnl bsnl:  deal with a `#define' line that ends with backslash-newline
764 dnl cont:  handle a continuation line
765 dnl bsnlc: handle a continuation line that ends with backslash-newline
767 dnl Each sub part escapes the awk special characters and outputs a statement
768 dnl inserting the macro value into the array D, keyed by name.  If the macro
769 dnl uses parameters, they are added in the array P, keyed by name.
771 dnl Long values are split into several string literals with help of ac_delim.
772 dnl Assume nobody uses macro names of nearly 150 bytes length.
774 dnl The initial replace for `#define' lines inserts a leading space
775 dnl in order to ease later matching; otherwise, output lines may be
776 dnl repeatedly matched.
778 dnl m4-double-quote most of this for [, ], define, and substr:
780 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
781 sed -n '
782 s/.\{]_AC_AWK_LITERAL_LIMIT[\}/&'"$ac_delim"'/g
783 t rset
784 :rset
785 s/^[     ]*#[    ]*define[       ][      ]*/ /
786 t def
788 :def
789 s/\\$//
790 t bsnl
791 s/["\\]/\\&/g
792 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
793 D["\1"]=" \3"/p
794 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
796 :bsnl
797 s/["\\]/\\&/g
798 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
799 D["\1"]=" \3\\\\\\n"\\/p
800 t cont
801 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
802 t cont
804 :cont
806 s/.\{]_AC_AWK_LITERAL_LIMIT[\}/&'"$ac_delim"'/g
807 t clear
808 :clear
809 s/\\$//
810 t bsnlc
811 s/["\\]/\\&/g; s/^/"/; s/$/"/p
813 :bsnlc
814 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
815 b cont
816 ' <confdefs.h | sed '
817 s/'"$ac_delim"'/"\\\
818 "/g' >>$CONFIG_STATUS || ac_write_fail=1
820 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
821   for (key in D) D_is_set[key] = 1
822   FS = "\a"
824 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
825   line = \$ 0
826   split(line, arg, " ")
827   if (arg[1] == "#") {
828     defundef = arg[2]
829     mac1 = arg[3]
830   } else {
831     defundef = substr(arg[1], 2)
832     mac1 = arg[2]
833   }
834   split(mac1, mac2, "(") #)
835   macro = mac2[1]
836   prefix = substr(line, 1, index(line, defundef) - 1)
837   if (D_is_set[macro]) {
838     # Preserve the white space surrounding the "#".
839     print prefix "define", macro P[macro] D[macro]
840     next
841   } else {
842     # Replace #undef with comments.  This is necessary, for example,
843     # in the case of _POSIX_SOURCE, which is predefined and required
844     # on some systems where configure will not decide to define it.
845     if (defundef == "undef") {
846       print "/*", prefix defundef, macro, "*/"
847       next
848     }
849   }
851 { print }
852 ]dnl End of double-quoted section
853 _ACAWK
854 _ACEOF
855 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
856 dnl finish `||' list indicating write error:
857   AC_MSG_ERROR([could not setup config headers machinery])
858 fi # test -n "$CONFIG_HEADERS"
860 ])# _AC_OUTPUT_HEADERS_PREPARE
863 # _AC_OUTPUT_HEADER
864 # -----------------
866 # Output the code which instantiates the `config.h' files from their
867 # `config.h.in'.
869 # This macro is expanded inside a here document.  If the here document is
870 # closed, it has to be reopened with
871 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
873 m4_define([_AC_OUTPUT_HEADER],
875   #
876   # CONFIG_HEADER
877   #
878   if test x"$ac_file" != x-; then
879     {
880       AS_ECHO(["/* $configure_input  */"]) \
881       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
882     } >"$tmp/config.h" \
883       || AC_MSG_ERROR([could not create $ac_file])
884     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
885       AC_MSG_NOTICE([$ac_file is unchanged])
886     else
887       rm -f "$ac_file"
888       mv "$tmp/config.h" "$ac_file" \
889         || AC_MSG_ERROR([could not create $ac_file])
890     fi
891   else
892     AS_ECHO(["/* $configure_input  */"]) \
893       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
894       || AC_MSG_ERROR([could not create -])
895   fi
896 dnl If running for Automake, be ready to perform additional
897 dnl commands to set up the timestamp files.
898 m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK],
899          [_AC_AM_CONFIG_HEADER_HOOK(["$ac_file"])
900 ])dnl
901 ])# _AC_OUTPUT_HEADER
905 ## --------------------- ##
906 ## Configuration links.  ##
907 ## --------------------- ##
910 # AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS])
911 # --------------------------------------------------------
912 # Specify that config.status should establish a (symbolic if possible)
913 # link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
914 # Reject DEST=., because it is makes it hard for ./config.status
915 # to guess the links to establish (`./config.status .').
917 AC_DEFUN([AC_CONFIG_LINKS], [_AC_CONFIG_FOOS([LINKS], $@)])
920 # AC_LINK_FILES(SOURCE..., DEST...)
921 # ---------------------------------
922 # Link each of the existing files SOURCE... to the corresponding
923 # link name in DEST...
925 # Unfortunately we can't provide a very good autoupdate service here,
926 # since in `AC_LINK_FILES($from, $to)' it is possible that `$from'
927 # and `$to' are actually lists.  It would then be completely wrong to
928 # replace it with `AC_CONFIG_LINKS($to:$from).  It is possible in the
929 # case of literal values though, but because I don't think there is any
930 # interest in creating config links with literal values, no special
931 # mechanism is implemented to handle them.
933 # _AC_LINK_FILES_CNT is used to be robust to multiple calls.
934 AU_DEFUN([AC_LINK_FILES],
935 [m4_if($#, 2, ,
936        [m4_fatal([$0: incorrect number of arguments])])dnl
937 m4_define_default([_AC_LINK_FILES_CNT], 0)dnl
938 m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
939 ac_sources="$1"
940 ac_dests="$2"
941 while test -n "$ac_sources"; do
942   set $ac_dests; ac_dest=$[1]; shift; ac_dests=$[*]
943   set $ac_sources; ac_source=$[1]; shift; ac_sources=$[*]
944   [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
945 done
946 AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
948 [It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
949 to AC_CONFIG_LINKS.  `autoupdate' provides a functional but inelegant
950 update, you should probably tune the result yourself.])# AC_LINK_FILES
953 # _AC_OUTPUT_LINK
954 # ---------------
955 # This macro is expanded inside a here document.  If the here document is
956 # closed, it has to be reopened with
957 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
958 m4_define([_AC_OUTPUT_LINK],
960   #
961   # CONFIG_LINK
962   #
964   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
965     :
966   else
967     # Prefer the file from the source tree if names are identical.
968     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
969       ac_source=$srcdir/$ac_source
970     fi
972     AC_MSG_NOTICE([linking $ac_source to $ac_file])
974     if test ! -r "$ac_source"; then
975       AC_MSG_ERROR([$ac_source: file not found])
976     fi
977     rm -f "$ac_file"
979     # Try a relative symlink, then a hard link, then a copy.
980     case $srcdir in
981     [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$ac_source ;;
982         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
983     esac
984     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
985       ln "$ac_source" "$ac_file" 2>/dev/null ||
986       cp -p "$ac_source" "$ac_file" ||
987       AC_MSG_ERROR([cannot link or copy $ac_source to $ac_file])
988   fi
989 ])# _AC_OUTPUT_LINK
993 ## ------------------------ ##
994 ## Configuration commands.  ##
995 ## ------------------------ ##
998 # AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
999 # ---------------------------------------------------
1001 # Specify additional commands to be run by config.status.  This
1002 # commands must be associated with a NAME, which should be thought
1003 # as the name of a file the COMMANDS create.
1005 AC_DEFUN([AC_CONFIG_COMMANDS], [_AC_CONFIG_FOOS([COMMANDS], $@)])
1008 # AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
1009 # -----------------------------------------
1011 # Add additional commands for AC_OUTPUT to put into config.status.
1013 # This macro is an obsolete version of AC_CONFIG_COMMANDS.  The only
1014 # difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is
1015 # to give a unique key.  The scheme we have chosen is `default-1',
1016 # `default-2' etc. for each call.
1018 # Unfortunately this scheme is fragile: bad things might happen
1019 # if you update an included file and configure.ac: you might have
1020 # clashes :(  On the other hand, I'd like to avoid weird keys (e.g.,
1021 # depending upon __file__ or the pid).
1022 AU_DEFUN([AC_OUTPUT_COMMANDS],
1023 [m4_define_default([_AC_OUTPUT_COMMANDS_CNT], 0)dnl
1024 m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
1025 dnl Double quoted since that was the case in the original macro.
1026 AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
1030 # _AC_OUTPUT_COMMAND
1031 # ------------------
1032 # This macro is expanded inside a here document.  If the here document is
1033 # closed, it has to be reopened with
1034 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
1035 m4_define([_AC_OUTPUT_COMMAND],
1036 [  AC_MSG_NOTICE([executing $ac_file commands])
1041 ## -------------------------------------- ##
1042 ## Pre- and post-config.status commands.  ##
1043 ## -------------------------------------- ##
1046 # AC_CONFIG_COMMANDS_PRE(CMDS)
1047 # ----------------------------
1048 # Commands to run right before config.status is created. Accumulates.
1049 AC_DEFUN([AC_CONFIG_COMMANDS_PRE],
1050 [m4_append([AC_OUTPUT_COMMANDS_PRE], [$1
1051 ])])
1054 # AC_OUTPUT_COMMANDS_PRE
1055 # ----------------------
1056 # A *variable* in which we append all the actions that must be
1057 # performed before *creating* config.status.  For a start, clean
1058 # up all the LIBOBJ mess.
1059 m4_define([AC_OUTPUT_COMMANDS_PRE],
1060 [_AC_LIBOBJS_NORMALIZE
1064 # AC_CONFIG_COMMANDS_POST(CMDS)
1065 # -----------------------------
1066 # Commands to run after config.status was created.  Accumulates.
1067 AC_DEFUN([AC_CONFIG_COMMANDS_POST],
1068 [m4_append([AC_OUTPUT_COMMANDS_POST], [$1
1069 ])])
1071 # Initialize.
1072 m4_define([AC_OUTPUT_COMMANDS_POST])
1076 ## ----------------------- ##
1077 ## Configuration subdirs.  ##
1078 ## ----------------------- ##
1081 # AC_CONFIG_SUBDIRS(DIR ...)
1082 # --------------------------
1083 # We define two variables:
1084 # - _AC_LIST_SUBDIRS
1085 #   A statically built list, should contain *all* the arguments of
1086 #   AC_CONFIG_SUBDIRS.  The final value is assigned to ac_subdirs_all in
1087 #   the `default' section, and used for --help=recursive.
1088 #   It makes no sense for arguments which are sh variables.
1089 # - subdirs
1090 #   Shell variable built at runtime, so some of these dirs might not be
1091 #   included, if for instance the user refused a part of the tree.
1092 #   This is used in _AC_OUTPUT_SUBDIRS.
1093 AC_DEFUN([AC_CONFIG_SUBDIRS],
1094 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1095 AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])dnl
1096 m4_foreach_w([_AC_Sub], [$1],
1097              [_AC_CONFIG_UNIQUE([SUBDIRS],
1098                                 m4_bpatsubst(m4_defn([_AC_Sub]), [:.*]))])dnl
1099 m4_append([_AC_LIST_SUBDIRS], [$1], [
1100 ])dnl
1101 AS_LITERAL_IF([$1], [],
1102               [AC_DIAGNOSE([syntax], [$0: you should use literals])])dnl
1103 AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])dnl
1107 # _AC_OUTPUT_SUBDIRS
1108 # ------------------
1109 # This is a subroutine of AC_OUTPUT, but it does not go into
1110 # config.status, rather, it is called after running config.status.
1111 m4_define([_AC_OUTPUT_SUBDIRS],
1114 # CONFIG_SUBDIRS section.
1116 if test "$no_recursion" != yes; then
1118   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
1119   # so they do not pile up.
1120   ac_sub_configure_args=
1121   ac_prev=
1122   eval "set x $ac_configure_args"
1123   shift
1124   for ac_arg
1125   do
1126     if test -n "$ac_prev"; then
1127       ac_prev=
1128       continue
1129     fi
1130     case $ac_arg in
1131     -cache-file | --cache-file | --cache-fil | --cache-fi \
1132     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1133       ac_prev=cache_file ;;
1134     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1135     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
1136     | --c=*)
1137       ;;
1138     --config-cache | -C)
1139       ;;
1140     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1141       ac_prev=srcdir ;;
1142     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1143       ;;
1144     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1145       ac_prev=prefix ;;
1146     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1147       ;;
1148     --disable-option-checking)
1149       ;;
1150     *)
1151       case $ac_arg in
1152       *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1153       esac
1154       ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
1155     esac
1156   done
1158   # Always prepend --prefix to ensure using the same prefix
1159   # in subdir configurations.
1160   ac_arg="--prefix=$prefix"
1161   case $ac_arg in
1162   *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1163   esac
1164   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
1166   # Pass --silent
1167   if test "$silent" = yes; then
1168     ac_sub_configure_args="--silent $ac_sub_configure_args"
1169   fi
1171   # Always prepend --disable-option-checking to silence warnings, since
1172   # different subdirs can have different --enable and --with options.
1173   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
1175   ac_popdir=`pwd`
1176   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
1178     # Do not complain, so a configure script can configure whichever
1179     # parts of a large source tree are present.
1180     test -d "$srcdir/$ac_dir" || continue
1182     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
1183     _AS_ECHO_LOG([$ac_msg])
1184     _AS_ECHO([$ac_msg])
1185     AS_MKDIR_P(["$ac_dir"])
1186     _AC_SRCDIRS(["$ac_dir"])
1188     cd "$ac_dir"
1190     # Check for guested configure; otherwise get Cygnus style configure.
1191     if test -f "$ac_srcdir/configure.gnu"; then
1192       ac_sub_configure=$ac_srcdir/configure.gnu
1193     elif test -f "$ac_srcdir/configure"; then
1194       ac_sub_configure=$ac_srcdir/configure
1195     elif test -f "$ac_srcdir/configure.in"; then
1196       # This should be Cygnus configure.
1197       ac_sub_configure=$ac_aux_dir/configure
1198     else
1199       AC_MSG_WARN([no configuration information is in $ac_dir])
1200       ac_sub_configure=
1201     fi
1203     # The recursion is here.
1204     if test -n "$ac_sub_configure"; then
1205       # Make the cache file name correct relative to the subdirectory.
1206       case $cache_file in
1207       [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
1208       *) # Relative name.
1209         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
1210       esac
1212       AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
1213       # The eval makes quoting arguments work.
1214       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
1215            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
1216         AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
1217     fi
1219     cd "$ac_popdir"
1220   done
1222 ])# _AC_OUTPUT_SUBDIRS
1227 ## -------------------------- ##
1228 ## Outputting config.status.  ##
1229 ## -------------------------- ##
1232 # AU::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1233 # -----------------------------------------------------------
1235 # If there are arguments given to AC_OUTPUT, dispatch them to the
1236 # proper modern macros.
1237 AU_DEFUN([AC_OUTPUT],
1238 [m4_ifvaln([$1],
1239            [AC_CONFIG_FILES([$1])])dnl
1240 m4_ifvaln([$2$3],
1241           [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
1242 [AC_OUTPUT]])
1245 # AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1246 # -------------------------------------------------------
1247 # The big finish.
1248 # Produce config.status, config.h, and links; and configure subdirs.
1250 m4_define([AC_OUTPUT],
1251 [dnl Dispatch the extra arguments to their native macros.
1252 m4_ifvaln([$1],
1253           [AC_CONFIG_FILES([$1])])dnl
1254 m4_ifvaln([$2$3],
1255           [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
1256 m4_ifval([$1$2$3],
1257          [AC_DIAGNOSE([obsolete],
1258                       [$0 should be used without arguments.
1259 You should run autoupdate.])])dnl
1260 AC_CACHE_SAVE
1262 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1263 # Let make expand exec_prefix.
1264 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1266 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
1268 dnl Commands to run before creating config.status.
1269 AC_OUTPUT_COMMANDS_PRE()dnl
1271 : ${CONFIG_STATUS=./config.status}
1272 ac_write_fail=0
1273 ac_clean_files_save=$ac_clean_files
1274 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1275 _AC_OUTPUT_CONFIG_STATUS()dnl
1276 ac_clean_files=$ac_clean_files_save
1278 test $ac_write_fail = 0 ||
1279   AC_MSG_ERROR([write failure creating $CONFIG_STATUS])
1281 dnl Commands to run after config.status was created
1282 AC_OUTPUT_COMMANDS_POST()dnl
1284 # configure is writing to config.log, and then calls config.status.
1285 # config.status does its own redirection, appending to config.log.
1286 # Unfortunately, on DOS this fails, as config.log is still kept open
1287 # by configure, so config.status won't be able to write to it; its
1288 # output is simply discarded.  So we exec the FD to /dev/null,
1289 # effectively closing config.log, so it can be properly (re)opened and
1290 # appended to by config.status.  When coming back to configure, we
1291 # need to make the FD available again.
1292 if test "$no_create" != yes; then
1293   ac_cs_success=:
1294   ac_config_status_args=
1295   test "$silent" = yes &&
1296     ac_config_status_args="$ac_config_status_args --quiet"
1297   exec AS_MESSAGE_LOG_FD>/dev/null
1298   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
1299   exec AS_MESSAGE_LOG_FD>>config.log
1300   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
1301   # would make configure fail if this is the last instruction.
1302   $ac_cs_success || AS_EXIT([1])
1304 dnl config.status should not do recursion.
1305 AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
1306 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
1307   AC_MSG_WARN([unrecognized options: $ac_unrecognized_opts])
1309 ])# AC_OUTPUT
1312 # _AC_OUTPUT_CONFIG_STATUS
1313 # ------------------------
1314 # Produce config.status.  Called by AC_OUTPUT.
1315 # Pay special attention not to have too long here docs: some old
1316 # shells die.  Unfortunately the limit is not known precisely...
1317 m4_define([_AC_OUTPUT_CONFIG_STATUS],
1318 [AC_MSG_NOTICE([creating $CONFIG_STATUS])
1319 dnl AS_MESSAGE_LOG_FD is not available yet:
1320 m4_rename([AS_MESSAGE_LOG_FD], [_AC_save_AS_MESSAGE_LOG_FD])dnl
1321 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1322 #! $SHELL
1323 # Generated by $as_me.
1324 # Run this file to recreate the current configuration.
1325 # Compiler output produced by configure, useful for debugging
1326 # configure, is in config.log if it exists.
1328 debug=false
1329 ac_cs_recheck=false
1330 ac_cs_silent=false
1331 SHELL=\${CONFIG_SHELL-$SHELL}
1332 _ACEOF
1334 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1335 AS_INIT_GENERATED
1336 exec AS_MESSAGE_FD>&1
1338 # Save the log message, to keep $[0] and so on meaningful, and to
1339 # report actual input values of CONFIG_FILES etc. instead of their
1340 # values after options handling.
1341 ac_log="
1342 This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1343 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1344 generated by m4_PACKAGE_STRING.  Invocation command line was
1346   CONFIG_FILES    = $CONFIG_FILES
1347   CONFIG_HEADERS  = $CONFIG_HEADERS
1348   CONFIG_LINKS    = $CONFIG_LINKS
1349   CONFIG_COMMANDS = $CONFIG_COMMANDS
1350   $ $[0] $[@]
1352 on `(hostname || uname -n) 2>/dev/null | sed 1q`
1355 _ACEOF
1357 dnl remove any newlines from these variables.
1358 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1359 [case $ac_config_files in *"
1360 "*) set x $ac_config_files; shift; ac_config_files=$[*];;
1361 esac
1363 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1364 [case $ac_config_headers in *"
1365 "*) set x $ac_config_headers; shift; ac_config_headers=$[*];;
1366 esac
1369 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1370 # Files that config.status was made for.
1371 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1372 [config_files="$ac_config_files"
1373 ])dnl
1374 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1375 [config_headers="$ac_config_headers"
1376 ])dnl
1377 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1378 [config_links="$ac_config_links"
1379 ])dnl
1380 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1381 [config_commands="$ac_config_commands"
1382 ])dnl
1384 _ACEOF
1386 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1387 ac_cs_usage="\
1388 \`$as_me' instantiates files from templates according to the
1389 current configuration.
1391 Usage: $[0] [[OPTION]]... [[FILE]]...
1393   -h, --help       print this help, then exit
1394   -V, --version    print version number and configuration settings, then exit
1395   -q, --quiet, --silent
1396 []                   do not print progress messages
1397   -d, --debug      don't remove temporary files
1398       --recheck    update $as_me by reconfiguring in the same conditions
1399 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1400   [AS_HELP_STRING([[    --file=FILE[:TEMPLATE]]],
1401     [instantiate the configuration file FILE], [                   ])
1402 ])dnl
1403 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1404   [AS_HELP_STRING([[    --header=FILE[:TEMPLATE]]],
1405     [instantiate the configuration header FILE], [                   ])
1406 ])dnl
1408 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1409 [Configuration files:
1410 $config_files
1412 ])dnl
1413 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1414 [Configuration headers:
1415 $config_headers
1417 ])dnl
1418 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1419 [Configuration links:
1420 $config_links
1422 ])dnl
1423 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1424 [Configuration commands:
1425 $config_commands
1427 ])dnl
1428 Report bugs to <bug-autoconf@gnu.org>."
1430 _ACEOF
1431 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1432 ac_cs_version="\\
1433 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
1434 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1435 configured by $[0], generated by m4_PACKAGE_STRING,
1436   with options \\"`AS_ECHO(["$ac_configure_args"]) | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\"
1438 Copyright (C) 2008 Free Software Foundation, Inc.
1439 This config.status script is free software; the Free Software Foundation
1440 gives unlimited permission to copy, distribute and modify it."
1442 ac_pwd='$ac_pwd'
1443 srcdir='$srcdir'
1444 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
1445 [INSTALL='$INSTALL'
1446 ])dnl
1447 AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
1448 [MKDIR_P='$MKDIR_P'
1449 ])dnl
1450 AC_PROVIDE_IFELSE([AC_PROG_AWK],
1451 [AWK='$AWK'
1452 ])dnl
1453 test -n "\$AWK" || AWK=awk
1454 _ACEOF
1456 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1457 # The default lists apply if the user does not specify any file.
1458 ac_need_defaults=:
1459 while test $[#] != 0
1461   case $[1] in
1462   --*=*)
1463     ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='`
1464     ac_optarg=`expr "X$[1]" : 'X[[^=]]*=\(.*\)'`
1465     ac_shift=:
1466     ;;
1467   *)
1468     ac_option=$[1]
1469     ac_optarg=$[2]
1470     ac_shift=shift
1471     ;;
1472   esac
1474   case $ac_option in
1475   # Handling of the options.
1476   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1477     ac_cs_recheck=: ;;
1478   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
1479     AS_ECHO(["$ac_cs_version"]); exit ;;
1480   --debug | --debu | --deb | --de | --d | -d )
1481     debug=: ;;
1482 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl
1483   --file | --fil | --fi | --f )
1484     $ac_shift
1485     case $ac_optarg in
1486     *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1487     esac
1488     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
1489     ac_need_defaults=false;;
1490 ])dnl
1491 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl
1492   --header | --heade | --head | --hea )
1493     $ac_shift
1494     case $ac_optarg in
1495     *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1496     esac
1497     CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
1498     ac_need_defaults=false;;
1499   --he | --h)
1500     # Conflict between --help and --header
1501     AC_MSG_ERROR([ambiguous option: $[1]
1502 Try `$[0] --help' for more information.]);;
1503 ], [  --he | --h |])dnl
1504   --help | --hel | -h )
1505     AS_ECHO(["$ac_cs_usage"]); exit ;;
1506   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1507   | -silent | --silent | --silen | --sile | --sil | --si | --s)
1508     ac_cs_silent=: ;;
1510   # This is an error.
1511   -*) AC_MSG_ERROR([unrecognized option: $[1]
1512 Try `$[0] --help' for more information.]) ;;
1514   *) ac_config_targets="$ac_config_targets $[1]"
1515      ac_need_defaults=false ;;
1517   esac
1518   shift
1519 done
1521 ac_configure_extra_args=
1523 if $ac_cs_silent; then
1524   exec AS_MESSAGE_FD>/dev/null
1525   ac_configure_extra_args="$ac_configure_extra_args --silent"
1528 _ACEOF
1529 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1530 dnl Check this before opening the log, to avoid a bug on MinGW,
1531 dnl which prohibits the recursive instance from truncating an open log.
1532 if \$ac_cs_recheck; then
1533   set X '$SHELL' '$[0]' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
1534   shift
1535   \AS_ECHO(["running CONFIG_SHELL=$SHELL \$[*]"]) >&AS_MESSAGE_FD
1536   CONFIG_SHELL='$SHELL'
1537   export CONFIG_SHELL
1538   exec "\$[@]"
1541 _ACEOF
1542 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1543 dnl Open the log:
1544 m4_rename([_AC_save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl
1545 exec AS_MESSAGE_LOG_FD>>config.log
1547   echo
1548   AS_BOX([Running $as_me.])
1549   AS_ECHO(["$ac_log"])
1550 } >&AS_MESSAGE_LOG_FD
1552 _ACEOF
1553 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1554 m4_ifdef([_AC_OUTPUT_COMMANDS_INIT],
1556 # INIT-COMMANDS
1558 _AC_OUTPUT_COMMANDS_INIT
1559 ])dnl
1560 _ACEOF
1562 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1564 # Handling of arguments.
1565 for ac_config_target in $ac_config_targets
1567   case $ac_config_target in
1568 m4_ifdef([_AC_LIST_TAGS], [_AC_LIST_TAGS])
1569   *) AC_MSG_ERROR([invalid argument: $ac_config_target]);;
1570   esac
1571 done
1573 m4_ifdef([_AC_SEEN_CONFIG(ANY)], [_AC_OUTPUT_MAIN_LOOP])[]dnl
1575 AS_EXIT(0)
1576 _ACEOF
1577 chmod +x $CONFIG_STATUS
1578 ])# _AC_OUTPUT_CONFIG_STATUS
1580 # _AC_OUTPUT_MAIN_LOOP
1581 # --------------------
1582 # The main loop in $CONFIG_STATUS.
1584 # This macro is expanded inside a here document.  If the here document is
1585 # closed, it has to be reopened with
1586 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
1588 AC_DEFUN([_AC_OUTPUT_MAIN_LOOP],
1590 # If the user did not use the arguments to specify the items to instantiate,
1591 # then the envvar interface is used.  Set only those that are not.
1592 # We use the long form for the default assignment because of an extremely
1593 # bizarre bug on SunOS 4.1.3.
1594 if $ac_need_defaults; then
1595 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1596 [  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
1597 ])dnl
1598 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1599 [  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
1600 ])dnl
1601 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1602 [  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
1603 ])dnl
1604 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1605 [  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
1606 ])dnl
1609 # Have a temporary directory for convenience.  Make it in the build tree
1610 # simply because there is no reason against having it here, and in addition,
1611 # creating and moving files from /tmp can sometimes cause problems.
1612 # Hook for its removal unless debugging.
1613 # Note that there is a small window in which the directory will not be cleaned:
1614 # after its creation but before its name has been assigned to `$tmp'.
1615 $debug ||
1617   tmp=
1618   trap 'exit_status=$?
1619   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
1620 ' 0
1621   trap 'AS_EXIT([1])' 1 2 13 15
1623 dnl The comment above AS_TMPDIR says at most 4 chars are allowed.
1624 AS_TMPDIR([conf], [.])
1626 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl
1627 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [_AC_OUTPUT_HEADERS_PREPARE])[]dnl
1629 eval set X "dnl
1630   m4_ifdef([_AC_SEEN_CONFIG(FILES)],    [:F $CONFIG_FILES])[]dnl
1631   m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],  [:H $CONFIG_HEADERS])[]dnl
1632   m4_ifdef([_AC_SEEN_CONFIG(LINKS)],    [:L $CONFIG_LINKS])[]dnl
1633   m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS])[]dnl
1635 shift
1636 for ac_tag
1638   case $ac_tag in
1639   :[[FHLC]]) ac_mode=$ac_tag; continue;;
1640   esac
1641   case $ac_mode$ac_tag in
1642   :[[FHL]]*:*);;
1643   :L* | :C*:*) AC_MSG_ERROR([invalid tag $ac_tag]);;
1644   :[[FH]]-) ac_tag=-:-;;
1645   :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;;
1646   esac
1647   ac_save_IFS=$IFS
1648   IFS=:
1649   set x $ac_tag
1650   IFS=$ac_save_IFS
1651   shift
1652   ac_file=$[1]
1653   shift
1655   case $ac_mode in
1656   :L) ac_source=$[1];;
1657   :[[FH]])
1658     ac_file_inputs=
1659     for ac_f
1660     do
1661       case $ac_f in
1662       -) ac_f="$tmp/stdin";;
1663       *) # Look for the file first in the build tree, then in the source tree
1664          # (if the path is not absolute).  The absolute path cannot be DOS-style,
1665          # because $ac_f cannot contain `:'.
1666          test -f "$ac_f" ||
1667            case $ac_f in
1668            [[\\/$]]*) false;;
1669            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1670            esac ||
1671            AC_MSG_ERROR([cannot find input file: $ac_f]);;
1672       esac
1673       case $ac_f in *\'*) ac_f=`AS_ECHO(["$ac_f"]) | sed "s/'/'\\\\\\\\''/g"`;; esac
1674       ac_file_inputs="$ac_file_inputs '$ac_f'"
1675     done
1677     # Let's still pretend it is `configure' which instantiates (i.e., don't
1678     # use $as_me), people would be surprised to read:
1679     #    /* config.h.  Generated by config.status.  */
1680     configure_input='Generated from '`
1681           AS_ECHO(["$[*]"]) | sed ['s|^[^:]*/||;s|:[^:]*/|, |g']
1682         `' by configure.'
1683     if test x"$ac_file" != x-; then
1684       configure_input="$ac_file.  $configure_input"
1685       AC_MSG_NOTICE([creating $ac_file])
1686     fi
1687     # Neutralize special characters interpreted by sed in replacement strings.
1688     case $configure_input in #(
1689     *\&* | *\|* | *\\* )
1690        ac_sed_conf_input=`AS_ECHO(["$configure_input"]) |
1691        sed 's/[[\\\\&|]]/\\\\&/g'`;; #(
1692     *) ac_sed_conf_input=$configure_input;;
1693     esac
1695     case $ac_tag in
1696     *:-:* | *:-) cat >"$tmp/stdin" \
1697       || AC_MSG_ERROR([could not create $ac_file]) ;;
1698     esac
1699     ;;
1700   esac
1702   ac_dir=`AS_DIRNAME(["$ac_file"])`
1703   AS_MKDIR_P(["$ac_dir"])
1704   _AC_SRCDIRS(["$ac_dir"])
1706   case $ac_mode in
1707   m4_ifdef([_AC_SEEN_CONFIG(FILES)],    [:F)_AC_OUTPUT_FILE ;;])
1708   m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],  [:H)_AC_OUTPUT_HEADER ;;])
1709   m4_ifdef([_AC_SEEN_CONFIG(LINKS)],    [:L)_AC_OUTPUT_LINK ;;])
1710   m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C)_AC_OUTPUT_COMMAND ;;])
1711   esac
1713 dnl Some shells don't like empty case/esac
1714 m4_ifdef([_AC_LIST_TAG_COMMANDS], [
1715   case $ac_file$ac_mode in
1716 _AC_LIST_TAG_COMMANDS
1717   esac
1718 ])dnl
1719 done # for ac_tag
1721 ])# _AC_OUTPUT_MAIN_LOOP
1724 # AC_OUTPUT_MAKE_DEFS
1725 # -------------------
1726 # Set the DEFS variable to the -D options determined earlier.
1727 # This is a subroutine of AC_OUTPUT.
1728 # It is called inside configure, outside of config.status.
1729 m4_define([AC_OUTPUT_MAKE_DEFS],
1730 [[# Transform confdefs.h into DEFS.
1731 # Protect against shell expansion while executing Makefile rules.
1732 # Protect against Makefile macro expansion.
1734 # If the first sed substitution is executed (which looks for macros that
1735 # take arguments), then branch to the quote section.  Otherwise,
1736 # look for a macro that doesn't take arguments.
1737 ac_script='
1738 :mline
1739 /\\$/{
1741  s,\\\n,,
1742  b mline
1744 t clear
1745 :clear
1746 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
1747 t quote
1748 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
1749 t quote
1750 b any
1751 :quote
1752 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
1753 s/\[/\\&/g
1754 s/\]/\\&/g
1755 s/\$/$$/g
1757 :any
1759         g
1760         s/^\n//
1761         s/\n/ /g
1762         p
1765 DEFS=`sed -n "$ac_script" confdefs.h`
1766 ]])# AC_OUTPUT_MAKE_DEFS