Another empty argument through expr workaround.
[autoconf.git] / lib / autoconf / status.m4
blob56190a4238393d40aa9288a50cce4af6d446bd7a
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, 2009, 2010 Free Software
5 # Foundation, Inc.
7 # This file is part of Autoconf.  This program is free
8 # software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the
10 # Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # Under Section 7 of GPL version 3, you are granted additional
19 # permissions described in the Autoconf Configure Script Exception,
20 # version 3.0, as published by the Free Software Foundation.
22 # You should have received a copy of the GNU General Public License
23 # and a copy of the Autoconf Configure Script Exception along with
24 # this program; see the files COPYINGv3 and COPYING.EXCEPTION
25 # respectively.  If not, see <http://www.gnu.org/licenses/>.
28 # Written by David MacKenzie, with help from
29 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
30 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
33 # This file handles about all the preparation aspects for
34 # `config.status': registering the configuration files, the headers,
35 # the links, and the commands `config.status' will run.  There is a
36 # little mixture though of things actually handled by `configure',
37 # such as running the `configure' in the sub directories.  Minor
38 # detail.
40 # There are two kinds of commands:
42 # COMMANDS:
44 #   They are output into `config.status' via a quoted here doc.  These
45 #   commands are always associated to a tag which the user can use to
46 #   tell `config.status' what are the commands she wants to run.
48 # INIT-CMDS:
50 #   They are output via an *unquoted* here-doc.  As a consequence $var
51 #   will be output as the value of VAR.  This is typically used by
52 #   `configure' to give `config.status' some variables it needs to run
53 #   the COMMANDS.  At the difference of COMMANDS, the INIT-CMDS are
54 #   always run.
57 # Honorable members of this family are AC_CONFIG_FILES,
58 # AC_CONFIG_HEADERS, AC_CONFIG_LINKS and AC_CONFIG_COMMANDS.  Bad boys
59 # are AC_LINK_FILES, AC_OUTPUT_COMMANDS and AC_OUTPUT when used with
60 # arguments.  False members are AC_CONFIG_SRCDIR, AC_CONFIG_SUBDIRS
61 # and AC_CONFIG_AUX_DIR.  Cousins are AC_CONFIG_COMMANDS_PRE and
62 # AC_CONFIG_COMMANDS_POST.
65 ## ------------------ ##
66 ## Auxiliary macros.  ##
67 ## ------------------ ##
69 # _AC_SRCDIRS(BUILD-DIR-NAME)
70 # ---------------------------
71 # Inputs:
72 #   - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src'
73 #   - `$srcdir' is `top-build -> top-src'
75 # Outputs:
76 # - `ac_builddir' is `.', for symmetry only.
77 # - `ac_top_builddir_sub' is `build -> top_build'.
78 #      This is used for @top_builddir@.
79 # - `ac_top_build_prefix' is `build -> top_build'.
80 #      If not empty, has a trailing slash.
81 # - `ac_srcdir' is `build -> src'.
82 # - `ac_top_srcdir' is `build -> top-src'.
83 # and `ac_abs_builddir' etc., the absolute directory names.
84 m4_define([_AC_SRCDIRS],
85 [ac_builddir=.
87 case $1 in
88 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
90   ac_dir_suffix=/`AS_ECHO([$1]) | sed 's|^\.[[\\/]]||'`
91   # A ".." for each directory in $ac_dir_suffix.
92   ac_top_builddir_sub=`AS_ECHO(["$ac_dir_suffix"]) | sed 's|/[[^\\/]]*|/..|g;s|/||'`
93   case $ac_top_builddir_sub in
94   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
95   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
96   esac ;;
97 esac
98 ac_abs_top_builddir=$ac_pwd
99 ac_abs_builddir=$ac_pwd$ac_dir_suffix
100 # for backward compatibility:
101 ac_top_builddir=$ac_top_build_prefix
103 case $srcdir in
104   .)  # We are building in place.
105     ac_srcdir=.
106     ac_top_srcdir=$ac_top_builddir_sub
107     ac_abs_top_srcdir=$ac_pwd ;;
108   [[\\/]]* | ?:[[\\/]]* )  # Absolute name.
109     ac_srcdir=$srcdir$ac_dir_suffix;
110     ac_top_srcdir=$srcdir
111     ac_abs_top_srcdir=$srcdir ;;
112   *) # Relative name.
113     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
114     ac_top_srcdir=$ac_top_build_prefix$srcdir
115     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
116 esac
117 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
118 ])# _AC_SRCDIRS
121 # _AC_HAVE_TOP_BUILD_PREFIX
122 # -------------------------
123 # Announce to the world (to Libtool) that we substitute @top_build_prefix@.
124 AC_DEFUN([_AC_HAVE_TOP_BUILD_PREFIX])
127 ## ---------------------- ##
128 ## Registering the tags.  ##
129 ## ---------------------- ##
132 # _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS])
133 # -----------------------------------------
135 # Register INIT-COMMANDS as command pasted *unquoted* in
136 # `config.status'.  This is typically used to pass variables from
137 # `configure' to `config.status'.  Note that $[1] is not over quoted as
138 # was the case in AC_OUTPUT_COMMANDS.
139 m4_define([_AC_CONFIG_COMMANDS_INIT],
140 [m4_ifval([$1],
141           [m4_append([_AC_OUTPUT_COMMANDS_INIT],
142                      [$1
143 ])])])
146 # AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
147 # -----------------------------------------------------
148 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
150 # It announces DEST depends upon the SOURCE1 etc.
151 m4_define([AC_FILE_DEPENDENCY_TRACE], [])
154 # _AC_FILE_DEPENDENCY_TRACE_COLON(DEST:SOURCE1[:SOURCE2...])
155 # ----------------------------------------------------------
156 # Declare that DEST depends upon SOURCE1 etc.
158 m4_define([_AC_FILE_DEPENDENCY_TRACE_COLON],
159 [AC_FILE_DEPENDENCY_TRACE(m4_translit([$1], [:], [,]))])
162 # _AC_CONFIG_DEPENDENCY(MODE, DEST[:SOURCE1...])
163 # ----------------------------------------------
164 # MODE is `FILES', `HEADERS', or `LINKS'.
166 # Be sure that a missing dependency is expressed as a dependency upon
167 # `DEST.in' (except with config links).
169 m4_define([_AC_CONFIG_DEPENDENCY],
170 [_AC_FILE_DEPENDENCY_TRACE_COLON([$2]_AC_CONFIG_DEPENDENCY_DEFAULT($@))dnl
174 # _AC_CONFIG_DEPENDENCY_DEFAULT(MODE, DEST[:SOURCE1...])
175 # ------------------------------------------------------
176 # Expand to `:DEST.in' if appropriate, or to empty string otherwise.
178 # More detailed description:
179 # If the tag contains `:', expand to nothing.
180 # Otherwise, for a config file or header, add `:DEST.in'.
181 # For a config link, DEST.in is not appropriate:
182 #  - if the tag is literal, complain.
183 #  - otherwise, just expand to nothing and proceed with fingers crossed.
184 #    (We get to this case from the obsolete AC_LINK_FILES, for example.)
186 m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
187 [m4_if(m4_index([$2], [:]), [-1],
188            [m4_if([$1], [LINKS],
189                   [AS_LITERAL_IF([$2],
190                     [m4_fatal([Invalid AC_CONFIG_LINKS tag: `$2'])])],
191                   [:$2.in])])])
194 # _AC_CONFIG_UNIQUE(MODE, DEST)
195 # -----------------------------
196 # MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'.
198 # Verify that there is no double definition of an output file.
200 m4_define([_AC_CONFIG_UNIQUE],
201 [m4_ifdef([_AC_SEEN_TAG($2)],
202    [m4_fatal([`$2' is already registered with AC_CONFIG_]m4_defn(
203      [_AC_SEEN_TAG($2)]).)],
204    [m4_define([_AC_SEEN_TAG($2)], [$1])])dnl
208 # _AC_CONFIG_FOOS(MODE, TAGS..., [COMMANDS], [INIT-CMDS])
209 # -------------------------------------------------------
210 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
212 # Associate the COMMANDS to each TAG, i.e., when config.status creates TAG,
213 # run COMMANDS afterwards.  (This is done in _AC_CONFIG_REGISTER_DEST.)
215 # For COMMANDS, do not m4_normalize TAGS before adding it to ac_config_commands.
216 # This historical difference allows macro calls in TAGS.
218 m4_define([_AC_CONFIG_FOOS],
219 [m4_map_args_w([$2], [_AC_CONFIG_REGISTER([$1],], [, [$3])])]dnl
220 [m4_define([_AC_SEEN_CONFIG(ANY)])]dnl
221 [m4_define([_AC_SEEN_CONFIG($1)])]dnl
222 [_AC_CONFIG_COMMANDS_INIT([$4])]dnl
223 [ac_config_[]m4_tolower([$1])="$ac_config_[]m4_tolower([$1]) ]dnl
224 [m4_if([$1], [COMMANDS], [$2], [m4_normalize([$2])])"
227 # _AC_CONFIG_COMPUTE_DEST(STRING)
228 # -------------------------------
229 # Compute the DEST from STRING by stripping any : and following
230 # characters.  Guarantee a match in m4_index, so as to avoid a bug
231 # with precision -1 in m4_format in older m4.
232 m4_define([_AC_CONFIG_COMPUTE_DEST],
233 [m4_format([[%.*s]], m4_index([$1:], [:]), [$1])])
235 # _AC_CONFIG_REGISTER(MODE, TAG, [COMMANDS])
236 # ------------------------------------------
237 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
239 m4_define([_AC_CONFIG_REGISTER],
240 [m4_if([$1], [COMMANDS],
241        [],
242        [_AC_CONFIG_DEPENDENCY([$1], [$2])])]dnl
243 [_AC_CONFIG_REGISTER_DEST([$1], [$2],
244   _AC_CONFIG_COMPUTE_DEST([$2]), [$3])])
247 # _AC_CONFIG_REGISTER_DEST(MODE, TAG, DEST, [COMMANDS])
248 # -----------------------------------------------------
249 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
250 # TAG is in the form DEST[:SOURCE...].
251 # Thus parameter $3 is the first part of $2.
253 # With CONFIG_LINKS, reject DEST=., because it is makes it hard for ./config.status
254 # to guess the links to establish (`./config.status .').
256 # Save the name of the first config header to AH_HEADER.
258 m4_define([_AC_CONFIG_REGISTER_DEST],
259 [_AC_CONFIG_UNIQUE([$1], [$3])]dnl
260 [m4_if([$1 $3], [LINKS .],
261        [m4_fatal([invalid destination of a config link: `.'])],
262        [$1], [HEADERS],
263        [m4_define_default([AH_HEADER], [$3])])]dnl
265 dnl Recognize TAG as an argument to config.status:
267 [m4_append([_AC_LIST_TAGS],
268 [    "$3") CONFIG_$1="$CONFIG_$1 $2" ;;
269 ])]dnl
271 dnl Register the associated commands, if any:
273 [m4_ifval([$4],
274 [m4_append([_AC_LIST_TAG_COMMANDS],
275 [    "$3":]m4_format([[%.1s]], [$1])[) $4 ;;
276 ])])])# _AC_CONFIG_REGISTER_DEST
281 ## --------------------- ##
282 ## Configuration files.  ##
283 ## --------------------- ##
286 # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
287 # -------------------------------------------------
288 # Specify output files, i.e., files that are configured with AC_SUBST.
290 AC_DEFUN([AC_CONFIG_FILES], [_AC_CONFIG_FOOS([FILES], $@)])
293 # _AC_SED_CMD_LIMIT
294 # -----------------
295 # Evaluate to an m4 number equal to the maximum number of commands to put
296 # in any single sed program, not counting ":" commands.
298 # Some seds have small command number limits, like on Digital OSF/1 and HP-UX.
299 m4_define([_AC_SED_CMD_LIMIT],
300 dnl One cannot portably go further than 99 commands because of HP-UX.
301 [99])
304 # _AC_AWK_LITERAL_LIMIT
305 # ---------------------
306 # Evaluate to the maximum number of characters to put in an awk
307 # string literal, not counting escape characters.
309 # Some awk's have small limits, such as Solaris and AIX awk.
310 m4_define([_AC_AWK_LITERAL_LIMIT],
311 [148])
314 # _AC_OUTPUT_FILES_PREPARE
315 # ------------------------
316 # Create the awk scripts needed for CONFIG_FILES.
317 # Support multiline substitutions and make sure that the substitutions are
318 # not evaluated recursively.
319 # The intention is to have readable config.status and configure, even
320 # though this m4 code might be scary.
322 # This code was written by Dan Manthey and rewritten by Ralf Wildenhues.
324 # This macro is expanded inside a here document.  If the here document is
325 # closed, it has to be reopened with
326 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
328 m4_define([_AC_OUTPUT_FILES_PREPARE],
329 [# Set up the scripts for CONFIG_FILES section.
330 # No need to generate them if there are no CONFIG_FILES.
331 # This happens for instance with `./config.status config.h'.
332 if test -n "$CONFIG_FILES"; then
334 dnl For AC_SUBST_FILE, check for usable getline support in awk,
335 dnl at config.status execution time.
336 dnl Otherwise, do the interpolation in sh, which is slower.
337 dnl Without any AC_SUBST_FILE, omit all related code.
338 dnl Note the expansion is double-quoted for readability.
339 m4_ifdef([_AC_SUBST_FILES],
340 [[if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
341   ac_cs_awk_getline=:
342   ac_cs_awk_pipe_init=
343   ac_cs_awk_read_file='
344       while ((getline aline < (F[key])) > 0)
345         print(aline)
346       close(F[key])'
347   ac_cs_awk_pipe_fini=
348 else
349   ac_cs_awk_getline=false
350   ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
351   ac_cs_awk_read_file='
352       print "|#_!!_#|"
353       print "cat " F[key] " &&"
354       '$ac_cs_awk_pipe_init
355   # The final `:' finishes the AND list.
356   ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
357 fi]])
358 ac_cr=`echo X | tr X '\015'`
359 # On cygwin, bash can eat \r inside `` if the user requested igncr.
360 # But we know of no other shell where ac_cr would be empty at this
361 # point, so we can use a bashism as a fallback.
362 if test "x$ac_cr" = x; then
363   eval ac_cr=\$\'\\r\'
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
367   ac_cs_awk_cr='\\r'
368 else
369   ac_cs_awk_cr=$ac_cr
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"
377 else
378   $AWK -f "$tmp/subs.awk" | $SHELL
379 fi])],
380 [m4_define([_AC_SUBST_CMDS],
381 [| $AWK -f "$tmp/subs.awk"])])dnl
383 echo 'BEGIN {' >"$tmp/subs1.awk" &&
384 _ACEOF
386 m4_ifdef([_AC_SUBST_FILES],
387 [# Create commands to substitute file output variables.
389   echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
390   echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
391   echo "$ac_subst_files" | sed 's/.*/F@<:@"&"@:>@="$&"/' &&
392   echo "_ACAWK" &&
393   echo "_ACEOF"
394 } >conf$$files.sh &&
395 . ./conf$$files.sh ||
396   AC_MSG_ERROR([could not make $CONFIG_STATUS])
397 rm -f conf$$files.sh
398 ])dnl
401   echo "cat >conf$$subs.awk <<_ACEOF" &&
402   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
403   echo "_ACEOF"
404 } >conf$$subs.sh ||
405   AC_MSG_ERROR([could not make $CONFIG_STATUS])
406 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
407 ac_delim='%!_!# '
408 for ac_last_try in false false false false false :; do
409   . ./conf$$subs.sh ||
410     AC_MSG_ERROR([could not make $CONFIG_STATUS])
412 dnl Do not use grep on conf$$subs.awk, since AIX grep has a line length limit.
413   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
414   if test $ac_delim_n = $ac_delim_num; then
415     break
416   elif $ac_last_try; then
417     AC_MSG_ERROR([could not make $CONFIG_STATUS])
418   else
419     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
420   fi
421 done
422 rm -f conf$$subs.sh
424 dnl Initialize an awk array of substitutions, keyed by variable name.
426 dnl The initial line contains the variable name VAR, then a `!'.
427 dnl Construct `S["VAR"]=' from it.
428 dnl The rest of the line, and potentially further lines, contain the
429 dnl substituted value; the last of those ends with $ac_delim.  We split
430 dnl the output both along those substituted newlines and at intervals of
431 dnl length _AC_AWK_LITERAL_LIMIT.  The latter is done to comply with awk
432 dnl string literal limitations, the former for simplicity in doing so.
434 dnl We deal with one input line at a time to avoid sed pattern space
435 dnl limitations.  We kill the delimiter $ac_delim before splitting the
436 dnl string (otherwise we risk splitting the delimiter).  And we do the
437 dnl splitting before the quoting of awk special characters (otherwise we
438 dnl risk splitting an escape sequence).
440 dnl Output as separate string literals, joined with backslash-newline.
441 dnl Eliminate the newline after `=' in a second script, for readability.
443 dnl Notes to the main part of the awk script:
444 dnl - the unusual FS value helps prevent running into the limit of 99 fields,
445 dnl - we avoid sub/gsub because of the \& quoting issues, see
446 dnl   http://www.gnu.org/software/gawk/manual/html_node/Gory-Details.html
447 dnl - Writing `$ 0' prevents expansion by both the shell and m4 here.
449 dnl m4-double-quote most of the scripting for readability.
450 [cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
451 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
452 _ACEOF
453 sed -n '
455 s/^/S["/; s/!.*/"]=/
458 s/^[^!]*!//
459 :repl
460 t repl
461 s/'"$ac_delim"'$//
462 t delim
465 s/\(.\{]_AC_AWK_LITERAL_LIMIT[\}\)..*/\1/
466 t more1
467 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
470 b repl
471 :more1
472 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
475 s/.\{]_AC_AWK_LITERAL_LIMIT[\}//
476 t nl
477 :delim
479 s/\(.\{]_AC_AWK_LITERAL_LIMIT[\}\)..*/\1/
480 t more2
481 s/["\\]/\\&/g; s/^/"/; s/$/"/
484 :more2
485 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
488 s/.\{]_AC_AWK_LITERAL_LIMIT[\}//
489 t delim
490 ' <conf$$subs.awk | sed '
491 /^[^""]/{
492   N
493   s/\n//
495 ' >>$CONFIG_STATUS || ac_write_fail=1
496 rm -f conf$$subs.awk
497 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
498 _ACAWK
499 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
500   for (key in S) S_is_set[key] = 1
501   FS = "\a"
502 ]m4_ifdef([_AC_SUBST_FILES],
503 [  \$ac_cs_awk_pipe_init])[
506   line = $ 0
507   nfields = split(line, field, "@")
508   substed = 0
509   len = length(field[1])
510   for (i = 2; i < nfields; i++) {
511     key = field[i]
512     keylen = length(key)
513     if (S_is_set[key]) {
514       value = S[key]
515       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
516       len += length(value) + length(field[++i])
517       substed = 1
518     } else
519       len += 1 + keylen
520   }
521 ]m4_ifdef([_AC_SUBST_FILES],
522 [[  if (nfields == 3 && !substed) {
523     key = field[2]
524     if (F[key] != "" && line ~ /^[       ]*@.*@[         ]*$/) {
525       \$ac_cs_awk_read_file
526       next
527     }
528   }]])[
529   print line
531 ]dnl end of double-quoted part
532 m4_ifdef([_AC_SUBST_FILES],
533 [\$ac_cs_awk_pipe_fini])
534 _ACAWK
535 _ACEOF
536 dnl See if CR is the EOL marker.  If not, remove any EOL-related
537 dnl ^M bytes and escape any remaining ones.  If so, just use mv.
538 dnl In case you're wondering how ^M bytes can make it into subs1.awk,
539 dnl [from Ralf Wildenhues] one way is if you have e.g.,
540 dnl AC_SUBST([variable_that_contains_cr], ["
541 dnl "])
542 dnl The original aim was that users should be able to substitute any
543 dnl characters they like (except for \0).  And the above is not so
544 dnl unlikely if the configure script itself happens to be converted
545 dnl to w32 text mode.
546 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
547 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
548   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
549 else
550   cat
551 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
552   || AC_MSG_ERROR([could not setup config files machinery])
553 _ACEOF
555 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
556 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
557 # trailing colons and then remove the whole line if VPATH becomes empty
558 # (actually we leave an empty line to preserve line numbers).
559 if test "x$srcdir" = x.; then
560   ac_vpsub=['/^[         ]*VPATH[        ]*=[    ]*/{
562 s///
563 s/^/:/
564 s/[      ]*$/:/
565 s/:\$(srcdir):/:/g
566 s/:\${srcdir}:/:/g
567 s/:@srcdir@:/:/g
568 s/^:*//
569 s/:*$//
571 s/\(=[   ]*\).*/\1/
573 s/\n//
574 s/^[^=]*=[       ]*$//
578 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
579 fi # test -n "$CONFIG_FILES"
581 ])# _AC_OUTPUT_FILES_PREPARE
583 # _AC_OUTPUT_FILE_ADJUST_DIR(VAR)
584 # -------------------------------
585 # Generate the sed snippet needed to output VAR relative to the
586 # top-level directory.
587 m4_define([_AC_OUTPUT_FILE_ADJUST_DIR],
588 [s&@$1@&$ac_$1&;t t[]AC_SUBST_TRACE([$1])])
591 # _AC_OUTPUT_FILE
592 # ---------------
593 # Do the variable substitutions to create the Makefiles or whatever.
595 # This macro is expanded inside a here document.  If the here document is
596 # closed, it has to be reopened with
597 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
599 m4_define([_AC_OUTPUT_FILE],
601   #
602   # CONFIG_FILE
603   #
605 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
606 [  case $INSTALL in
607   [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
608   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
609   esac
610 ])dnl
611 AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
612 [  ac_MKDIR_P=$MKDIR_P
613   case $MKDIR_P in
614   [[\\/$]]* | ?:[[\\/]]* ) ;;
615   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
616   esac
617 ])dnl
618 _ACEOF
620 m4_ifndef([AC_DATAROOTDIR_CHECKED],
621 [cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
622 # If the template does not know about datarootdir, expand it.
623 # FIXME: This hack should be removed a few years after 2.60.
624 ac_datarootdir_hack=; ac_datarootdir_seen=
625 m4_define([_AC_datarootdir_vars],
626           [datadir, docdir, infodir, localedir, mandir])]dnl
627 [m4_define([_AC_datarootdir_subst], [  s&@$][1@&$$][1&g])]dnl
628 [ac_sed_dataroot='
629 /datarootdir/ {
630   p
631   q
633 m4_map_args_sep([/@], [@/p], [
634 ], _AC_datarootdir_vars)'
635 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
636 *datarootdir*) ac_datarootdir_seen=yes;;
637 *@[]m4_join([@*|*@], _AC_datarootdir_vars)@*)
638   AC_MSG_WARN([$ac_file_inputs seems to ignore the --datarootdir setting])
639 _ACEOF
640 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
641   ac_datarootdir_hack='
642 m4_map_args_sep([_AC_datarootdir_subst(], [)], [
643 ], _AC_datarootdir_vars)
644   s&\\\${datarootdir}&$datarootdir&g' ;;
645 esac
646 _ACEOF
647 ])dnl
649 # Neutralize VPATH when `$srcdir' = `.'.
650 # Shell code in configure.ac might set extrasub.
651 # FIXME: do we really want to maintain this feature?
652 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
653 ac_sed_extra="$ac_vpsub
654 $extrasub
655 _ACEOF
656 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
658 [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
659 dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE.
660 dnl Note if you change the s||| delimiter here, don't forget to adjust
661 dnl ac_sed_conf_input accordingly.  Using & is a bad idea if & appears in
662 dnl the replacement string.
663 s|@configure_input@|$ac_sed_conf_input|;t t
664 dnl During the transition period, this is a special case:
665 s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir])
666 dnl For this substitution see the witness macro _AC_HAVE_TOP_BUILD_PREFIX above.
667 s&@top_build_prefix@&$ac_top_build_prefix&;t t[]AC_SUBST_TRACE([top_build_prefix])
668 m4_map_args_sep([$0_ADJUST_DIR(], [)], [
669 ], [srcdir], [abs_srcdir], [top_srcdir], [abs_top_srcdir],
670    [builddir], [abs_builddir],
671    [abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
672      [, [INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [, [MKDIR_P]]))
673 m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack
674 ])dnl
676 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" m4_defn([_AC_SUBST_CMDS]) >$tmp/out \
677   || AC_MSG_ERROR([could not create $ac_file])
679 m4_ifndef([AC_DATAROOTDIR_CHECKED],
680 [test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
681   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
682   { ac_out=`sed -n '/^[[         ]]*datarootdir[[        ]]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
683   AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir'
684 which seems to be undefined.  Please make sure it is defined])
685 ])dnl
687   rm -f "$tmp/stdin"
688   case $ac_file in
689   -) cat "$tmp/out" && rm -f "$tmp/out";;
690   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
691   esac \
692   || AC_MSG_ERROR([could not create $ac_file])
693 dnl This would break Makefile dependencies:
694 dnl  if diff "$ac_file" "$tmp/out" >/dev/null 2>&1; then
695 dnl    echo "$ac_file is unchanged"
696 dnl  else
697 dnl     rm -f "$ac_file"; mv "$tmp/out" "$ac_file"
698 dnl  fi
699 ])# _AC_OUTPUT_FILE
704 ## ----------------------- ##
705 ## Configuration headers.  ##
706 ## ----------------------- ##
709 # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
710 # ------------------------------------------------------
711 # Specify that the HEADERS are to be created by instantiation of the
712 # AC_DEFINEs.
714 AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)])
717 # AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
718 # --------------------------------------
719 # FIXME: Make it obsolete?
720 AC_DEFUN([AC_CONFIG_HEADER],
721 [AC_CONFIG_HEADERS([$1])])
724 # _AC_OUTPUT_HEADERS_PREPARE
725 # --------------------------
726 # Create the awk scripts needed for CONFIG_HEADERS.
727 # Support multiline #defines.
729 # This macro is expanded inside a here document.  If the here document is
730 # closed, it has to be reopened with
731 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
733 m4_define([_AC_OUTPUT_HEADERS_PREPARE],
734 [# Set up the scripts for CONFIG_HEADERS section.
735 # No need to generate them if there are no CONFIG_HEADERS.
736 # This happens for instance with `./config.status Makefile'.
737 if test -n "$CONFIG_HEADERS"; then
738 dnl This `||' list is finished at the end of _AC_OUTPUT_HEADERS_PREPARE.
739 cat >"$tmp/defines.awk" <<\_ACAWK ||
740 BEGIN {
741 _ACEOF
743 # Transform confdefs.h into an awk script `defines.awk', embedded as
744 # here-document in config.status, that substitutes the proper values into
745 # config.h.in to produce config.h.
747 # Create a delimiter string that does not exist in confdefs.h, to ease
748 # handling of long lines.
749 ac_delim='%!_!# '
750 for ac_last_try in false false :; do
751   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
752   if test -z "$ac_t"; then
753     break
754   elif $ac_last_try; then
755     AC_MSG_ERROR([could not make $CONFIG_HEADERS])
756   else
757     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
758   fi
759 done
761 # For the awk script, D is an array of macro values keyed by name,
762 # likewise P contains macro parameters if any.  Preserve backslash
763 # newline sequences.
765 dnl Structure of the sed script that reads confdefs.h:
766 dnl rset:  main loop, searches for `#define' lines
767 dnl def:   deal with a `#define' line
768 dnl bsnl:  deal with a `#define' line that ends with backslash-newline
769 dnl cont:  handle a continuation line
770 dnl bsnlc: handle a continuation line that ends with backslash-newline
772 dnl Each sub part escapes the awk special characters and outputs a statement
773 dnl inserting the macro value into the array D, keyed by name.  If the macro
774 dnl uses parameters, they are added in the array P, keyed by name.
776 dnl Long values are split into several string literals with help of ac_delim.
777 dnl Assume nobody uses macro names of nearly 150 bytes length.
779 dnl The initial replace for `#define' lines inserts a leading space
780 dnl in order to ease later matching; otherwise, output lines may be
781 dnl repeatedly matched.
783 dnl m4-double-quote most of this for [, ], define, and substr:
785 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
786 sed -n '
787 s/.\{]_AC_AWK_LITERAL_LIMIT[\}/&'"$ac_delim"'/g
788 t rset
789 :rset
790 s/^[     ]*#[    ]*define[       ][      ]*/ /
791 t def
793 :def
794 s/\\$//
795 t bsnl
796 s/["\\]/\\&/g
797 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
798 D["\1"]=" \3"/p
799 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
801 :bsnl
802 s/["\\]/\\&/g
803 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
804 D["\1"]=" \3\\\\\\n"\\/p
805 t cont
806 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
807 t cont
809 :cont
811 s/.\{]_AC_AWK_LITERAL_LIMIT[\}/&'"$ac_delim"'/g
812 t clear
813 :clear
814 s/\\$//
815 t bsnlc
816 s/["\\]/\\&/g; s/^/"/; s/$/"/p
818 :bsnlc
819 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
820 b cont
821 ' <confdefs.h | sed '
822 s/'"$ac_delim"'/"\\\
823 "/g' >>$CONFIG_STATUS || ac_write_fail=1
825 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
826   for (key in D) D_is_set[key] = 1
827   FS = "\a"
829 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
830   line = \$ 0
831   split(line, arg, " ")
832   if (arg[1] == "#") {
833     defundef = arg[2]
834     mac1 = arg[3]
835   } else {
836     defundef = substr(arg[1], 2)
837     mac1 = arg[2]
838   }
839   split(mac1, mac2, "(") #)
840   macro = mac2[1]
841   prefix = substr(line, 1, index(line, defundef) - 1)
842   if (D_is_set[macro]) {
843     # Preserve the white space surrounding the "#".
844     print prefix "define", macro P[macro] D[macro]
845     next
846   } else {
847     # Replace #undef with comments.  This is necessary, for example,
848     # in the case of _POSIX_SOURCE, which is predefined and required
849     # on some systems where configure will not decide to define it.
850     if (defundef == "undef") {
851       print "/*", prefix defundef, macro, "*/"
852       next
853     }
854   }
856 { print }
857 ]dnl End of double-quoted section
858 _ACAWK
859 _ACEOF
860 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
861 dnl finish `||' list indicating write error:
862   AC_MSG_ERROR([could not setup config headers machinery])
863 fi # test -n "$CONFIG_HEADERS"
865 ])# _AC_OUTPUT_HEADERS_PREPARE
868 # _AC_OUTPUT_HEADER
869 # -----------------
871 # Output the code which instantiates the `config.h' files from their
872 # `config.h.in'.
874 # This macro is expanded inside a here document.  If the here document is
875 # closed, it has to be reopened with
876 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
878 m4_define([_AC_OUTPUT_HEADER],
880   #
881   # CONFIG_HEADER
882   #
883   if test x"$ac_file" != x-; then
884     {
885       AS_ECHO(["/* $configure_input  */"]) \
886       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
887     } >"$tmp/config.h" \
888       || AC_MSG_ERROR([could not create $ac_file])
889     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
890       AC_MSG_NOTICE([$ac_file is unchanged])
891     else
892       rm -f "$ac_file"
893       mv "$tmp/config.h" "$ac_file" \
894         || AC_MSG_ERROR([could not create $ac_file])
895     fi
896   else
897     AS_ECHO(["/* $configure_input  */"]) \
898       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
899       || AC_MSG_ERROR([could not create -])
900   fi
901 dnl If running for Automake, be ready to perform additional
902 dnl commands to set up the timestamp files.
903 m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK],
904          [_AC_AM_CONFIG_HEADER_HOOK(["$ac_file"])
905 ])dnl
906 ])# _AC_OUTPUT_HEADER
910 ## --------------------- ##
911 ## Configuration links.  ##
912 ## --------------------- ##
915 # AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS])
916 # --------------------------------------------------------
917 # Specify that config.status should establish a (symbolic if possible)
918 # link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
919 # Reject DEST=., because it is makes it hard for ./config.status
920 # to guess the links to establish (`./config.status .').
922 AC_DEFUN([AC_CONFIG_LINKS], [_AC_CONFIG_FOOS([LINKS], $@)])
925 # AC_LINK_FILES(SOURCE..., DEST...)
926 # ---------------------------------
927 # Link each of the existing files SOURCE... to the corresponding
928 # link name in DEST...
930 # Unfortunately we can't provide a very good autoupdate service here,
931 # since in `AC_LINK_FILES($from, $to)' it is possible that `$from'
932 # and `$to' are actually lists.  It would then be completely wrong to
933 # replace it with `AC_CONFIG_LINKS($to:$from).  It is possible in the
934 # case of literal values though, but because I don't think there is any
935 # interest in creating config links with literal values, no special
936 # mechanism is implemented to handle them.
938 # _AC_LINK_FILES_CNT is used to be robust to multiple calls.
939 AU_DEFUN([AC_LINK_FILES],
940 [m4_if($#, 2, ,
941        [m4_fatal([$0: incorrect number of arguments])])dnl
942 m4_define_default([_AC_LINK_FILES_CNT], 0)dnl
943 m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
944 ac_sources="$1"
945 ac_dests="$2"
946 while test -n "$ac_sources"; do
947   set $ac_dests; ac_dest=$[1]; shift; ac_dests=$[*]
948   set $ac_sources; ac_source=$[1]; shift; ac_sources=$[*]
949   [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
950 done
951 AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
953 [It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
954 to AC_CONFIG_LINKS.  `autoupdate' provides a functional but inelegant
955 update, you should probably tune the result yourself.])# AC_LINK_FILES
958 # _AC_OUTPUT_LINK
959 # ---------------
960 # This macro is expanded inside a here document.  If the here document is
961 # closed, it has to be reopened with
962 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
963 m4_define([_AC_OUTPUT_LINK],
965   #
966   # CONFIG_LINK
967   #
969   if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
970     :
971   else
972     # Prefer the file from the source tree if names are identical.
973     if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
974       ac_source=$srcdir/$ac_source
975     fi
977     AC_MSG_NOTICE([linking $ac_source to $ac_file])
979     if test ! -r "$ac_source"; then
980       AC_MSG_ERROR([$ac_source: file not found])
981     fi
982     rm -f "$ac_file"
984     # Try a relative symlink, then a hard link, then a copy.
985     case $ac_source in
986     [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$ac_source ;;
987         *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
988     esac
989     ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
990       ln "$ac_source" "$ac_file" 2>/dev/null ||
991       cp -p "$ac_source" "$ac_file" ||
992       AC_MSG_ERROR([cannot link or copy $ac_source to $ac_file])
993   fi
994 ])# _AC_OUTPUT_LINK
998 ## ------------------------ ##
999 ## Configuration commands.  ##
1000 ## ------------------------ ##
1003 # AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
1004 # ---------------------------------------------------
1006 # Specify additional commands to be run by config.status.  This
1007 # commands must be associated with a NAME, which should be thought
1008 # as the name of a file the COMMANDS create.
1010 AC_DEFUN([AC_CONFIG_COMMANDS], [_AC_CONFIG_FOOS([COMMANDS], $@)])
1013 # AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
1014 # -----------------------------------------
1016 # Add additional commands for AC_OUTPUT to put into config.status.
1018 # This macro is an obsolete version of AC_CONFIG_COMMANDS.  The only
1019 # difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is
1020 # to give a unique key.  The scheme we have chosen is `default-1',
1021 # `default-2' etc. for each call.
1023 # Unfortunately this scheme is fragile: bad things might happen
1024 # if you update an included file and configure.ac: you might have
1025 # clashes :(  On the other hand, I'd like to avoid weird keys (e.g.,
1026 # depending upon __file__ or the pid).
1027 AU_DEFUN([AC_OUTPUT_COMMANDS],
1028 [m4_define_default([_AC_OUTPUT_COMMANDS_CNT], 0)dnl
1029 m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
1030 dnl Double quoted since that was the case in the original macro.
1031 AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
1035 # _AC_OUTPUT_COMMAND
1036 # ------------------
1037 # This macro is expanded inside a here document.  If the here document is
1038 # closed, it has to be reopened with
1039 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
1040 m4_define([_AC_OUTPUT_COMMAND],
1041 [  AC_MSG_NOTICE([executing $ac_file commands])
1046 ## -------------------------------------- ##
1047 ## Pre- and post-config.status commands.  ##
1048 ## -------------------------------------- ##
1051 # AC_CONFIG_COMMANDS_PRE(CMDS)
1052 # ----------------------------
1053 # Commands to run right before config.status is created. Accumulates.
1054 AC_DEFUN([AC_CONFIG_COMMANDS_PRE],
1055 [m4_append([AC_OUTPUT_COMMANDS_PRE], [$1
1056 ])])
1059 # AC_OUTPUT_COMMANDS_PRE
1060 # ----------------------
1061 # A *variable* in which we append all the actions that must be
1062 # performed before *creating* config.status.  For a start, clean
1063 # up all the LIBOBJ mess.
1064 m4_define([AC_OUTPUT_COMMANDS_PRE],
1065 [_AC_LIBOBJS_NORMALIZE
1069 # AC_CONFIG_COMMANDS_POST(CMDS)
1070 # -----------------------------
1071 # Commands to run after config.status was created.  Accumulates.
1072 AC_DEFUN([AC_CONFIG_COMMANDS_POST],
1073 [m4_append([AC_OUTPUT_COMMANDS_POST], [$1
1074 ])])
1076 # Initialize.
1077 m4_define([AC_OUTPUT_COMMANDS_POST])
1081 ## ----------------------- ##
1082 ## Configuration subdirs.  ##
1083 ## ----------------------- ##
1086 # AC_CONFIG_SUBDIRS(DIR ...)
1087 # --------------------------
1088 # We define two variables:
1089 # - _AC_LIST_SUBDIRS
1090 #   A statically built list, should contain *all* the arguments of
1091 #   AC_CONFIG_SUBDIRS.  The final value is assigned to ac_subdirs_all in
1092 #   the `default' section, and used for --help=recursive.
1093 #   It makes no sense for arguments which are sh variables.
1094 # - subdirs
1095 #   Shell variable built at runtime, so some of these dirs might not be
1096 #   included, if for instance the user refused a part of the tree.
1097 #   This is used in _AC_OUTPUT_SUBDIRS.
1098 AC_DEFUN([AC_CONFIG_SUBDIRS],
1099 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])]dnl
1100 [AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])]dnl
1101 [m4_map_args_w([$1], [_AC_CONFIG_UNIQUE([SUBDIRS],
1102   _AC_CONFIG_COMPUTE_DEST(], [))])]dnl
1103 [m4_append([_AC_LIST_SUBDIRS], [$1], [
1104 ])]dnl
1105 [AS_LITERAL_IF([$1], [],
1106                [AC_DIAGNOSE([syntax], [$0: you should use literals])])]dnl
1107 [AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])])
1110 # _AC_OUTPUT_SUBDIRS
1111 # ------------------
1112 # This is a subroutine of AC_OUTPUT, but it does not go into
1113 # config.status, rather, it is called after running config.status.
1114 m4_define([_AC_OUTPUT_SUBDIRS],
1117 # CONFIG_SUBDIRS section.
1119 if test "$no_recursion" != yes; then
1121   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
1122   # so they do not pile up.
1123   ac_sub_configure_args=
1124   ac_prev=
1125   eval "set x $ac_configure_args"
1126   shift
1127   for ac_arg
1128   do
1129     if test -n "$ac_prev"; then
1130       ac_prev=
1131       continue
1132     fi
1133     case $ac_arg in
1134     -cache-file | --cache-file | --cache-fil | --cache-fi \
1135     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1136       ac_prev=cache_file ;;
1137     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1138     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
1139     | --c=*)
1140       ;;
1141     --config-cache | -C)
1142       ;;
1143     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1144       ac_prev=srcdir ;;
1145     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1146       ;;
1147     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1148       ac_prev=prefix ;;
1149     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1150       ;;
1151     --disable-option-checking)
1152       ;;
1153     *)
1154       case $ac_arg in
1155       *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1156       esac
1157       AS_VAR_APPEND([ac_sub_configure_args], [" '$ac_arg'"]) ;;
1158     esac
1159   done
1161   # Always prepend --prefix to ensure using the same prefix
1162   # in subdir configurations.
1163   ac_arg="--prefix=$prefix"
1164   case $ac_arg in
1165   *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1166   esac
1167   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
1169   # Pass --silent
1170   if test "$silent" = yes; then
1171     ac_sub_configure_args="--silent $ac_sub_configure_args"
1172   fi
1174   # Always prepend --disable-option-checking to silence warnings, since
1175   # different subdirs can have different --enable and --with options.
1176   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
1178   ac_popdir=`pwd`
1179   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
1181     # Do not complain, so a configure script can configure whichever
1182     # parts of a large source tree are present.
1183     test -d "$srcdir/$ac_dir" || continue
1185     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
1186     _AS_ECHO_LOG([$ac_msg])
1187     _AS_ECHO([$ac_msg])
1188     AS_MKDIR_P(["$ac_dir"])
1189     _AC_SRCDIRS(["$ac_dir"])
1191     cd "$ac_dir"
1193     # Check for guested configure; otherwise get Cygnus style configure.
1194     if test -f "$ac_srcdir/configure.gnu"; then
1195       ac_sub_configure=$ac_srcdir/configure.gnu
1196     elif test -f "$ac_srcdir/configure"; then
1197       ac_sub_configure=$ac_srcdir/configure
1198     elif test -f "$ac_srcdir/configure.in"; then
1199       # This should be Cygnus configure.
1200       ac_sub_configure=$ac_aux_dir/configure
1201     else
1202       AC_MSG_WARN([no configuration information is in $ac_dir])
1203       ac_sub_configure=
1204     fi
1206     # The recursion is here.
1207     if test -n "$ac_sub_configure"; then
1208       # Make the cache file name correct relative to the subdirectory.
1209       case $cache_file in
1210       [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
1211       *) # Relative name.
1212         ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
1213       esac
1215       AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
1216       # The eval makes quoting arguments work.
1217       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
1218            --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
1219         AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
1220     fi
1222     cd "$ac_popdir"
1223   done
1225 ])# _AC_OUTPUT_SUBDIRS
1230 ## -------------------------- ##
1231 ## Outputting config.status.  ##
1232 ## -------------------------- ##
1235 # AU::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1236 # -----------------------------------------------------------
1238 # If there are arguments given to AC_OUTPUT, dispatch them to the
1239 # proper modern macros.
1240 AU_DEFUN([AC_OUTPUT],
1241 [m4_ifvaln([$1],
1242            [AC_CONFIG_FILES([$1])])dnl
1243 m4_ifvaln([$2$3],
1244           [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
1245 [AC_OUTPUT]])
1248 # AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1249 # -------------------------------------------------------
1250 # The big finish.
1251 # Produce config.status, config.h, and links; and configure subdirs.
1253 m4_define([AC_OUTPUT],
1254 [dnl Dispatch the extra arguments to their native macros.
1255 m4_ifvaln([$1],
1256           [AC_CONFIG_FILES([$1])])dnl
1257 m4_ifvaln([$2$3],
1258           [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
1259 m4_ifval([$1$2$3],
1260          [AC_DIAGNOSE([obsolete],
1261                       [$0 should be used without arguments.
1262 You should run autoupdate.])])dnl
1263 AC_CACHE_SAVE
1265 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1266 # Let make expand exec_prefix.
1267 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1269 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
1271 dnl Commands to run before creating config.status.
1272 AC_OUTPUT_COMMANDS_PRE()dnl
1274 : ${CONFIG_STATUS=./config.status}
1275 ac_write_fail=0
1276 ac_clean_files_save=$ac_clean_files
1277 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1278 _AC_OUTPUT_CONFIG_STATUS()dnl
1279 ac_clean_files=$ac_clean_files_save
1281 test $ac_write_fail = 0 ||
1282   AC_MSG_ERROR([write failure creating $CONFIG_STATUS])
1284 dnl Commands to run after config.status was created
1285 AC_OUTPUT_COMMANDS_POST()dnl
1287 # configure is writing to config.log, and then calls config.status.
1288 # config.status does its own redirection, appending to config.log.
1289 # Unfortunately, on DOS this fails, as config.log is still kept open
1290 # by configure, so config.status won't be able to write to it; its
1291 # output is simply discarded.  So we exec the FD to /dev/null,
1292 # effectively closing config.log, so it can be properly (re)opened and
1293 # appended to by config.status.  When coming back to configure, we
1294 # need to make the FD available again.
1295 if test "$no_create" != yes; then
1296   ac_cs_success=:
1297   ac_config_status_args=
1298   test "$silent" = yes &&
1299     ac_config_status_args="$ac_config_status_args --quiet"
1300   exec AS_MESSAGE_LOG_FD>/dev/null
1301   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
1302   exec AS_MESSAGE_LOG_FD>>config.log
1303   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
1304   # would make configure fail if this is the last instruction.
1305   $ac_cs_success || AS_EXIT([1])
1307 dnl config.status should not do recursion.
1308 AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
1309 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
1310   AC_MSG_WARN([unrecognized options: $ac_unrecognized_opts])
1312 ])# AC_OUTPUT
1315 # _AC_OUTPUT_CONFIG_STATUS
1316 # ------------------------
1317 # Produce config.status.  Called by AC_OUTPUT.
1318 # Pay special attention not to have too long here docs: some old
1319 # shells die.  Unfortunately the limit is not known precisely...
1320 m4_define([_AC_OUTPUT_CONFIG_STATUS],
1321 [AC_MSG_NOTICE([creating $CONFIG_STATUS])
1322 dnl AS_MESSAGE_LOG_FD is not available yet:
1323 m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1324 [AS_INIT_GENERATED([$CONFIG_STATUS],
1325 [# Run this file to recreate the current configuration.
1326 # Compiler output produced by configure, useful for debugging
1327 # configure, is in config.log if it exists.
1329 debug=false
1330 ac_cs_recheck=false
1331 ac_cs_silent=false
1332 ]) || ac_write_fail=1
1334 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1335 [#] Save the log message, to keep $[0] and so on meaningful, and to
1336 # report actual input values of CONFIG_FILES etc. instead of their
1337 # values after options handling.
1338 ac_log="
1339 This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1340 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1341 generated by m4_PACKAGE_STRING.  Invocation command line was
1343   CONFIG_FILES    = $CONFIG_FILES
1344   CONFIG_HEADERS  = $CONFIG_HEADERS
1345   CONFIG_LINKS    = $CONFIG_LINKS
1346   CONFIG_COMMANDS = $CONFIG_COMMANDS
1347   $ $[0] $[@]
1349 on `(hostname || uname -n) 2>/dev/null | sed 1q`
1352 _ACEOF
1354 dnl remove any newlines from these variables.
1355 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1356 [case $ac_config_files in *"
1357 "*) set x $ac_config_files; shift; ac_config_files=$[*];;
1358 esac
1360 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1361 [case $ac_config_headers in *"
1362 "*) set x $ac_config_headers; shift; ac_config_headers=$[*];;
1363 esac
1366 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1367 # Files that config.status was made for.
1368 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1369 [config_files="$ac_config_files"
1370 ])dnl
1371 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1372 [config_headers="$ac_config_headers"
1373 ])dnl
1374 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1375 [config_links="$ac_config_links"
1376 ])dnl
1377 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1378 [config_commands="$ac_config_commands"
1379 ])dnl
1381 _ACEOF
1383 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1384 ac_cs_usage="\
1385 \`$as_me' instantiates files and other configuration actions
1386 from templates according to the current configuration.  Unless the files
1387 and actions are specified as TAGs, all are instantiated by default.
1389 Usage: $[0] [[OPTION]]... [[TAG]]...
1391   -h, --help       print this help, then exit
1392   -V, --version    print version number and configuration settings, then exit
1393       --config     print configuration, then exit
1394   -q, --quiet, --silent
1395 []                   do not print progress messages
1396   -d, --debug      don't remove temporary files
1397       --recheck    update $as_me by reconfiguring in the same conditions
1398 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1399   [AS_HELP_STRING([[    --file=FILE[:TEMPLATE]]],
1400     [instantiate the configuration file FILE], [                   ])
1401 ])dnl
1402 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1403   [AS_HELP_STRING([[    --header=FILE[:TEMPLATE]]],
1404     [instantiate the configuration header FILE], [                   ])
1405 ])dnl
1407 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1408 [Configuration files:
1409 $config_files
1411 ])dnl
1412 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1413 [Configuration headers:
1414 $config_headers
1416 ])dnl
1417 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1418 [Configuration links:
1419 $config_links
1421 ])dnl
1422 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1423 [Configuration commands:
1424 $config_commands
1426 ])dnl
1427 Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
1428   [the package provider]).dnl
1429 m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
1430 AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
1431 m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
1432 General help using GNU software: <http://www.gnu.org/gethelp/>.])])"
1434 _ACEOF
1435 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1436 ac_cs_config="`AS_ECHO(["$ac_configure_args"]) | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`"
1437 ac_cs_version="\\
1438 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
1439 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1440 configured by $[0], generated by m4_PACKAGE_STRING,
1441   with options \\"\$ac_cs_config\\"
1443 Copyright (C) m4_PACKAGE_YEAR Free Software Foundation, Inc.
1444 This config.status script is free software; the Free Software Foundation
1445 gives unlimited permission to copy, distribute and modify it."
1447 ac_pwd='$ac_pwd'
1448 srcdir='$srcdir'
1449 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
1450 [INSTALL='$INSTALL'
1451 ])dnl
1452 AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
1453 [MKDIR_P='$MKDIR_P'
1454 ])dnl
1455 AC_PROVIDE_IFELSE([AC_PROG_AWK],
1456 [AWK='$AWK'
1457 ])dnl
1458 test -n "\$AWK" || AWK=awk
1459 _ACEOF
1461 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1462 # The default lists apply if the user does not specify any file.
1463 ac_need_defaults=:
1464 while test $[#] != 0
1466   case $[1] in
1467   --*=?*)
1468     ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='`
1469     ac_optarg=`expr "X$[1]" : 'X[[^=]]*=\(.*\)'`
1470     ac_shift=:
1471     ;;
1472   --*=)
1473     ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='`
1474     ac_optarg=
1475     ac_shift=:
1476     ;;
1477   *)
1478     ac_option=$[1]
1479     ac_optarg=$[2]
1480     ac_shift=shift
1481     ;;
1482   esac
1484   case $ac_option in
1485   # Handling of the options.
1486   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1487     ac_cs_recheck=: ;;
1488   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
1489     AS_ECHO(["$ac_cs_version"]); exit ;;
1490   --config | --confi | --conf | --con | --co | --c )
1491     AS_ECHO(["$ac_cs_config"]); exit ;;
1492   --debug | --debu | --deb | --de | --d | -d )
1493     debug=: ;;
1494 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl
1495   --file | --fil | --fi | --f )
1496     $ac_shift
1497     case $ac_optarg in
1498     *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1499     '') AC_MSG_ERROR([missing file argument]) ;;
1500     esac
1501     AS_VAR_APPEND([CONFIG_FILES], [" '$ac_optarg'"])
1502     ac_need_defaults=false;;
1503 ])dnl
1504 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl
1505   --header | --heade | --head | --hea )
1506     $ac_shift
1507     case $ac_optarg in
1508     *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
1509     esac
1510     AS_VAR_APPEND([CONFIG_HEADERS], [" '$ac_optarg'"])
1511     ac_need_defaults=false;;
1512   --he | --h)
1513     # Conflict between --help and --header
1514     AC_MSG_ERROR([ambiguous option: `$[1]'
1515 Try `$[0] --help' for more information.]);;
1516 ], [  --he | --h |])dnl
1517   --help | --hel | -h )
1518     AS_ECHO(["$ac_cs_usage"]); exit ;;
1519   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1520   | -silent | --silent | --silen | --sile | --sil | --si | --s)
1521     ac_cs_silent=: ;;
1523   # This is an error.
1524   -*) AC_MSG_ERROR([unrecognized option: `$[1]'
1525 Try `$[0] --help' for more information.]) ;;
1527   *) AS_VAR_APPEND([ac_config_targets], [" $[1]"])
1528      ac_need_defaults=false ;;
1530   esac
1531   shift
1532 done
1534 ac_configure_extra_args=
1536 if $ac_cs_silent; then
1537   exec AS_MESSAGE_FD>/dev/null
1538   ac_configure_extra_args="$ac_configure_extra_args --silent"
1541 _ACEOF
1542 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1543 dnl Check this before opening the log, to avoid a bug on MinGW,
1544 dnl which prohibits the recursive instance from truncating an open log.
1545 if \$ac_cs_recheck; then
1546   set X '$SHELL' '$[0]' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
1547   shift
1548   \AS_ECHO(["running CONFIG_SHELL=$SHELL \$[*]"]) >&AS_MESSAGE_FD
1549   CONFIG_SHELL='$SHELL'
1550   export CONFIG_SHELL
1551   exec "\$[@]"
1554 _ACEOF
1555 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1556 dnl Open the log:
1557 m4_popdef([AS_MESSAGE_LOG_FD])dnl
1558 exec AS_MESSAGE_LOG_FD>>config.log
1560   echo
1561   AS_BOX([Running $as_me.])
1562   AS_ECHO(["$ac_log"])
1563 } >&AS_MESSAGE_LOG_FD
1565 _ACEOF
1566 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1567 m4_ifdef([_AC_OUTPUT_COMMANDS_INIT],
1569 # INIT-COMMANDS
1571 _AC_OUTPUT_COMMANDS_INIT
1572 ])dnl
1573 _ACEOF
1575 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1577 # Handling of arguments.
1578 for ac_config_target in $ac_config_targets
1580   case $ac_config_target in
1581 m4_ifdef([_AC_LIST_TAGS], [_AC_LIST_TAGS])
1582   *) AC_MSG_ERROR([invalid argument: `$ac_config_target']);;
1583   esac
1584 done
1586 m4_ifdef([_AC_SEEN_CONFIG(ANY)], [_AC_OUTPUT_MAIN_LOOP])[]dnl
1588 AS_EXIT(0)
1589 _ACEOF
1590 ])# _AC_OUTPUT_CONFIG_STATUS
1592 # _AC_OUTPUT_MAIN_LOOP
1593 # --------------------
1594 # The main loop in $CONFIG_STATUS.
1596 # This macro is expanded inside a here document.  If the here document is
1597 # closed, it has to be reopened with
1598 # "cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1".
1600 AC_DEFUN([_AC_OUTPUT_MAIN_LOOP],
1602 # If the user did not use the arguments to specify the items to instantiate,
1603 # then the envvar interface is used.  Set only those that are not.
1604 # We use the long form for the default assignment because of an extremely
1605 # bizarre bug on SunOS 4.1.3.
1606 if $ac_need_defaults; then
1607 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1608 [  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
1609 ])dnl
1610 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1611 [  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
1612 ])dnl
1613 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1614 [  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
1615 ])dnl
1616 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1617 [  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
1618 ])dnl
1621 # Have a temporary directory for convenience.  Make it in the build tree
1622 # simply because there is no reason against having it here, and in addition,
1623 # creating and moving files from /tmp can sometimes cause problems.
1624 # Hook for its removal unless debugging.
1625 # Note that there is a small window in which the directory will not be cleaned:
1626 # after its creation but before its name has been assigned to `$tmp'.
1627 $debug ||
1629   tmp=
1630   trap 'exit_status=$?
1631   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
1632 ' 0
1633   trap 'AS_EXIT([1])' 1 2 13 15
1635 dnl The comment above AS_TMPDIR says at most 4 chars are allowed.
1636 AS_TMPDIR([conf], [.])
1638 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl
1639 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [_AC_OUTPUT_HEADERS_PREPARE])[]dnl
1641 eval set X "dnl
1642   m4_ifdef([_AC_SEEN_CONFIG(FILES)],    [:F $CONFIG_FILES])[]dnl
1643   m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],  [:H $CONFIG_HEADERS])[]dnl
1644   m4_ifdef([_AC_SEEN_CONFIG(LINKS)],    [:L $CONFIG_LINKS])[]dnl
1645   m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS])[]dnl
1647 shift
1648 for ac_tag
1650   case $ac_tag in
1651   :[[FHLC]]) ac_mode=$ac_tag; continue;;
1652   esac
1653   case $ac_mode$ac_tag in
1654   :[[FHL]]*:*);;
1655   :L* | :C*:*) AC_MSG_ERROR([invalid tag `$ac_tag']);;
1656   :[[FH]]-) ac_tag=-:-;;
1657   :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;;
1658   esac
1659   ac_save_IFS=$IFS
1660   IFS=:
1661   set x $ac_tag
1662   IFS=$ac_save_IFS
1663   shift
1664   ac_file=$[1]
1665   shift
1667   case $ac_mode in
1668   :L) ac_source=$[1];;
1669   :[[FH]])
1670     ac_file_inputs=
1671     for ac_f
1672     do
1673       case $ac_f in
1674       -) ac_f="$tmp/stdin";;
1675       *) # Look for the file first in the build tree, then in the source tree
1676          # (if the path is not absolute).  The absolute path cannot be DOS-style,
1677          # because $ac_f cannot contain `:'.
1678          test -f "$ac_f" ||
1679            case $ac_f in
1680            [[\\/$]]*) false;;
1681            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1682            esac ||
1683            AC_MSG_ERROR([cannot find input file: `$ac_f'], [1]);;
1684       esac
1685       case $ac_f in *\'*) ac_f=`AS_ECHO(["$ac_f"]) | sed "s/'/'\\\\\\\\''/g"`;; esac
1686       AS_VAR_APPEND([ac_file_inputs], [" '$ac_f'"])
1687     done
1689     # Let's still pretend it is `configure' which instantiates (i.e., don't
1690     # use $as_me), people would be surprised to read:
1691     #    /* config.h.  Generated by config.status.  */
1692     configure_input='Generated from '`
1693           AS_ECHO(["$[*]"]) | sed ['s|^[^:]*/||;s|:[^:]*/|, |g']
1694         `' by configure.'
1695     if test x"$ac_file" != x-; then
1696       configure_input="$ac_file.  $configure_input"
1697       AC_MSG_NOTICE([creating $ac_file])
1698     fi
1699     # Neutralize special characters interpreted by sed in replacement strings.
1700     case $configure_input in #(
1701     *\&* | *\|* | *\\* )
1702        ac_sed_conf_input=`AS_ECHO(["$configure_input"]) |
1703        sed 's/[[\\\\&|]]/\\\\&/g'`;; #(
1704     *) ac_sed_conf_input=$configure_input;;
1705     esac
1707     case $ac_tag in
1708     *:-:* | *:-) cat >"$tmp/stdin" \
1709       || AC_MSG_ERROR([could not create $ac_file]) ;;
1710     esac
1711     ;;
1712   esac
1714   ac_dir=`AS_DIRNAME(["$ac_file"])`
1715   AS_MKDIR_P(["$ac_dir"])
1716   _AC_SRCDIRS(["$ac_dir"])
1718   case $ac_mode in
1719   m4_ifdef([_AC_SEEN_CONFIG(FILES)],    [:F)_AC_OUTPUT_FILE ;;])
1720   m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],  [:H)_AC_OUTPUT_HEADER ;;])
1721   m4_ifdef([_AC_SEEN_CONFIG(LINKS)],    [:L)_AC_OUTPUT_LINK ;;])
1722   m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C)_AC_OUTPUT_COMMAND ;;])
1723   esac
1725 dnl Some shells don't like empty case/esac
1726 m4_ifdef([_AC_LIST_TAG_COMMANDS], [
1727   case $ac_file$ac_mode in
1728 _AC_LIST_TAG_COMMANDS
1729   esac
1730 ])dnl
1731 done # for ac_tag
1733 ])# _AC_OUTPUT_MAIN_LOOP
1736 # AC_OUTPUT_MAKE_DEFS
1737 # -------------------
1738 # Set the DEFS variable to the -D options determined earlier.
1739 # This is a subroutine of AC_OUTPUT.
1740 # It is called inside configure, outside of config.status.
1741 m4_define([AC_OUTPUT_MAKE_DEFS],
1742 [[# Transform confdefs.h into DEFS.
1743 # Protect against shell expansion while executing Makefile rules.
1744 # Protect against Makefile macro expansion.
1746 # If the first sed substitution is executed (which looks for macros that
1747 # take arguments), then branch to the quote section.  Otherwise,
1748 # look for a macro that doesn't take arguments.
1749 ac_script='
1750 :mline
1751 /\\$/{
1753  s,\\\n,,
1754  b mline
1756 t clear
1757 :clear
1758 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
1759 t quote
1760 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
1761 t quote
1762 b any
1763 :quote
1764 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
1765 s/\[/\\&/g
1766 s/\]/\\&/g
1767 s/\$/$$/g
1769 :any
1771         g
1772         s/^\n//
1773         s/\n/ /g
1774         p
1777 DEFS=`sed -n "$ac_script" confdefs.h`
1778 ]])# AC_OUTPUT_MAKE_DEFS