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 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 # As a special exception, the Free Software Foundation gives unlimited
22 # permission to copy, distribute and modify the configure scripts that
23 # are the output of Autoconf. You need not follow the terms of the GNU
24 # General Public License when using or distributing such scripts, even
25 # though portions of the text of Autoconf appear in them. The GNU
26 # General Public License (GPL) does govern all other use of the material
27 # that constitutes the Autoconf program.
29 # Certain portions of the Autoconf source text are designed to be copied
30 # (in certain cases, depending on the input) into the output of
31 # Autoconf. We call these the "data" portions. The rest of the Autoconf
32 # source text consists of comments plus executable code that decides which
33 # of the data portions to output in any given case. We call these
34 # comments and executable code the "non-data" portions. Autoconf never
35 # copies any of the non-data portions into its output.
37 # This special exception to the GPL applies to versions of Autoconf
38 # released by the Free Software Foundation. When you make and
39 # distribute a modified version of Autoconf, you may extend this special
40 # exception to the GPL to apply to your modified version as well, *unless*
41 # your modified version has the potential to copy into its output some
42 # of the text that was the non-data portion of the version that you started
43 # with. (In other words, unless your change moves or copies text from
44 # the non-data portions to the data portions.) If your modification has
45 # such potential, you must delete any notice of this special exception
46 # to the GPL from your modified version.
48 # Written by David MacKenzie, with help from
49 # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
50 # Roland McGrath, Noah Friedman, david d zuhn, and many others.
53 # 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
60 # There are two kinds of 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.
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
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 # ---------------------------
92 # - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src'
93 # - `$srcdir' is `top-build -> top-src'
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],
108 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
110 ac_dir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'`
111 # A ".." for each directory in $ac_dir_suffix.
112 ac_top_builddir_sub=`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/ ;;
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
124 .) # We are building in place.
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 ;;
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 ;;
137 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
142 ## ---------------------- ##
143 ## Registering the tags. ##
144 ## ---------------------- ##
147 # _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS])
148 # -----------------------------------------
150 # Register INIT-COMMANDS as command pasted *unquoted* in
151 # `config.status'. This is typically used to pass variables from
152 # `configure' to `config.status'. Note that $[1] is not over quoted as
153 # was the case in AC_OUTPUT_COMMANDS.
154 m4_define([_AC_CONFIG_COMMANDS_INIT],
156 [m4_append([_AC_OUTPUT_COMMANDS_INIT],
161 # AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
162 # -----------------------------------------------------
163 # This macro does nothing, it's a hook to be read with `autoconf --trace'.
165 # It announces DEST depends upon the SOURCE1 etc.
166 m4_define([AC_FILE_DEPENDENCY_TRACE], [])
169 # _AC_FILE_DEPENDENCY_TRACE_COLON(DEST:SOURCE1[:SOURCE2...])
170 # ----------------------------------------------------------
171 # Declare that DEST depends upon SOURCE1 etc.
173 m4_define([_AC_FILE_DEPENDENCY_TRACE_COLON],
174 [AC_FILE_DEPENDENCY_TRACE(m4_bpatsubst([$1], [:], [,]))dnl
178 # _AC_CONFIG_DEPENDENCY(MODE, DEST[:SOURCE1...])
179 # ---------------------------------------------
180 # MODE is `FILES', `HEADERS', or `LINKS'.
182 # Be sure that a missing dependency is expressed as a dependency upon
183 # `DEST.in' (except with config links).
185 m4_define([_AC_CONFIG_DEPENDENCY],
186 [_AC_FILE_DEPENDENCY_TRACE_COLON([$2]_AC_CONFIG_DEPENDENCY_DEFAULT($@))dnl
190 # _AC_CONFIG_DEPENDENCY_DEFAULT(MODE, DEST[:SOURCE1...])
191 # ------------------------------------------------------
192 # Expand to `:DEST.in' if appropriate, or to empty string otherwise.
194 # More detailed edscription:
195 # If the tag contains `:', expand to nothing.
196 # Otherwise, for a config file or header, add `:DEST.in'.
197 # For config link, DEST.in is not appropriate:
198 # - if the tag is literal, complain.
199 # - otherwise, just expand to nothing and proceed with fingers crossed.
200 # (We get to this case from the obsolete AC_LINK_FILES, for example.)
202 m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
203 [m4_bmatch([$2], [:], [],
204 [m4_if([$1], [LINKS],
205 [AS_LITERAL_IF([$2], [AC_FATAL([Invalid AC_CONFIG_LINKS tag: `$2'])])],
210 # _AC_CONFIG_UNIQUE(MODE, DEST)
211 # -----------------------------
212 # MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'.
214 # Verify that there is no double definition of an output file.
216 m4_define([_AC_CONFIG_UNIQUE],
217 [m4_ifdef([_AC_SEEN_TAG($2)],
218 [AC_FATAL([`$2' is already registered with AC_CONFIG_]m4_defn([_AC_SEEN_TAG($2)]).)],
219 [m4_define([_AC_SEEN_TAG($2)], [$1])])dnl
223 # _AC_CONFIG_FOOS(MODE, TAGS..., [COMMANDS], [INIT-CMDS])
224 # -------------------------------------------------------
225 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
227 # Associate the COMMANDS to each TAG, i.e., when config.status creates TAG,
228 # run COMMANDS afterwards. (This is done in _AC_CONFIG_REGISTER_DEST.)
230 # For COMMANDS, do not m4_normalize TAGS before adding it to ac_config_commands.
231 # This historical difference allows macro calls in TAGS.
233 m4_define([_AC_CONFIG_FOOS],
234 [m4_foreach_w([AC_File], [$2],
235 [_AC_CONFIG_REGISTER([$1], m4_defn([AC_File]), [$3])])dnl
236 m4_define([_AC_SEEN_CONFIG(ANY)])dnl
237 m4_define([_AC_SEEN_CONFIG($1)])dnl
238 _AC_CONFIG_COMMANDS_INIT([$4])dnl
239 ac_config_[]m4_tolower([$1])="$ac_config_[]m4_tolower([$1]) dnl
240 m4_if([$1], [COMMANDS], [$2], [m4_normalize([$2])])"
244 # _AC_CONFIG_REGISTER(MODE, TAG, [COMMANDS])
245 # ------------------------------------------
246 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
248 m4_define([_AC_CONFIG_REGISTER],
249 [m4_if([$1], [COMMANDS],
251 [_AC_CONFIG_DEPENDENCY([$1], [$2])])dnl
252 _AC_CONFIG_REGISTER_DEST([$1], [$2], m4_bpatsubst([[$2]], [:.*\(.\)$], [\1]), [$3])dnl
256 # _AC_CONFIG_REGISTER_DEST(MODE, TAG, DEST, [COMMANDS])
257 # -----------------------------------------------------
258 # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
259 # TAG is in the form DEST[:SOURCE...].
260 # Thus parameter $3 is the first part of $2.
262 # With CONFIG_LINKS, reject DEST=., because it is makes it hard for ./config.status
263 # to guess the links to establish (`./config.status .').
265 # Save the name of the first config header to AH_HEADER.
267 m4_define([_AC_CONFIG_REGISTER_DEST],
268 [_AC_CONFIG_UNIQUE([$1], [$3])dnl
269 m4_if([$1 $3], [LINKS .],
270 [AC_FATAL([invalid destination of a config link: `.'])])dnl
271 m4_if([$1], [HEADERS],
272 [m4_define_default([AH_HEADER], [$3])])dnl
274 dnl Recognize TAG as an argument to config.status:
276 m4_append([_AC_LIST_TAGS],
277 [ "$3") CONFIG_$1="$CONFIG_$1 $2" ;;
280 dnl Register the associated commands, if any:
283 [m4_append([_AC_LIST_TAG_COMMANDS],
284 [ "$3":]m4_bpatsubst([$1], [^\(.\).*$], [\1])[) $4 ;;
286 ])# _AC_CONFIG_REGISTER_DEST
291 ## --------------------- ##
292 ## Configuration files. ##
293 ## --------------------- ##
296 # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
297 # -------------------------------------------------
298 # Specify output files, i.e., files that are configured with AC_SUBST.
300 AC_DEFUN([AC_CONFIG_FILES], [_AC_CONFIG_FOOS([FILES], $@)])
305 # Evaluate to an m4 number equal to the maximum number of commands to put
306 # in any single sed program, not counting ":" commands.
308 # Some seds have small command number limits, like on Digital OSF/1 and HP-UX.
309 m4_define([_AC_SED_CMD_LIMIT],
310 dnl One cannot portably go further than 99 commands because of HP-UX.
314 # _AC_OUTPUT_FILES_PREPARE
315 # ------------------------
316 # Create the sed 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 scaring.
322 # This code was written by Dan Manthey.
324 # This macro is expanded inside a here document. If the here document is
325 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
327 m4_define([_AC_OUTPUT_FILES_PREPARE],
329 # Set up the sed scripts for CONFIG_FILES section.
331 dnl ... and define _AC_SED_CMDS, the pipeline which executes them.
332 m4_define([_AC_SED_CMDS], [])dnl
334 # No need to generate the scripts if there are no CONFIG_FILES.
335 # This happens for instance when ./config.status config.h
336 if test -n "$CONFIG_FILES"; then
340 m4_pushdef([_AC_SED_FRAG_NUM], 0)dnl Fragment number.
341 m4_pushdef([_AC_SED_CMD_NUM], 2)dnl Num of commands in current frag so far.
342 m4_pushdef([_AC_SED_DELIM_NUM], 0)dnl Expected number of delimiters in file.
343 m4_pushdef([_AC_SED_FRAG], [])dnl The constant part of the current fragment.
345 m4_ifdef([_AC_SUBST_FILES],
346 [# Create sed commands to just substitute file output variables.
348 m4_foreach_w([_AC_Var], m4_defn([_AC_SUBST_FILES]),
349 [dnl End fragments at beginning of loop so that last fragment is not ended.
350 m4_if(m4_eval(_AC_SED_CMD_NUM + 3 > _AC_SED_CMD_LIMIT), 1,
351 [dnl Fragment is full and not the last one, so no need for the final un-escape.
352 dnl Increment fragment number.
353 m4_define([_AC_SED_FRAG_NUM], m4_incr(_AC_SED_FRAG_NUM))dnl
354 dnl Record that this fragment will need to be used.
355 m4_define([_AC_SED_CMDS],
356 m4_defn([_AC_SED_CMDS])[| sed -f "$tmp/subs-]_AC_SED_FRAG_NUM[.sed" ])dnl
357 [cat >>$CONFIG_STATUS <<_ACEOF
358 cat >"\$tmp/subs-]_AC_SED_FRAG_NUM[.sed" <<\CEOF
359 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
360 ]m4_defn([_AC_SED_FRAG])dnl
364 ]m4_define([_AC_SED_CMD_NUM], 2)m4_define([_AC_SED_FRAG])dnl
365 ])dnl Last fragment ended.
366 m4_define([_AC_SED_CMD_NUM], m4_eval(_AC_SED_CMD_NUM + 3))dnl
367 m4_define([_AC_SED_FRAG],
368 m4_defn([_AC_SED_FRAG])dnl
369 [/^[ ]*@]_AC_Var[@[ ]*$/{
375 # Remaining file output variables are in a fragment that also has non-file
380 m4_define([_AC_SED_FRAG], [
381 ]m4_defn([_AC_SED_FRAG]))dnl
382 m4_foreach_w([_AC_Var],
383 m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS]) ])[@END@],
384 [m4_if(_AC_SED_DELIM_NUM, 0,
385 [m4_if(_AC_Var, [@END@],
386 [dnl The whole of the last fragment would be the final deletion of `|#_!!_#|'.
387 m4_define([_AC_SED_CMDS], m4_defn([_AC_SED_CMDS])[| sed 's/|#_!!_#|//g' ])],
390 for ac_last_try in false false false false false :; do
391 cat >conf$$subs.sed <<_ACEOF
393 m4_if(_AC_Var, [@END@],
394 [m4_if(m4_eval(_AC_SED_CMD_NUM + 2 <= _AC_SED_CMD_LIMIT), 1,
395 [m4_define([_AC_SED_FRAG], [ end]m4_defn([_AC_SED_FRAG]))])],
396 [m4_define([_AC_SED_CMD_NUM], m4_incr(_AC_SED_CMD_NUM))dnl
397 m4_define([_AC_SED_DELIM_NUM], m4_incr(_AC_SED_DELIM_NUM))dnl
398 _AC_Var!$_AC_Var$ac_delim
400 m4_if(_AC_SED_CMD_LIMIT,
401 m4_if(_AC_Var, [@END@], m4_if(_AC_SED_CMD_NUM, 2, 2, _AC_SED_CMD_LIMIT), _AC_SED_CMD_NUM),
404 dnl Do not use grep on conf$$subs.sed, since AIX grep has a line length limit.
405 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = _AC_SED_DELIM_NUM; then
407 elif $ac_last_try; then
408 AC_MSG_ERROR([could not make $CONFIG_STATUS])
410 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
414 dnl Similarly, avoid grep here too.
415 ac_eof=`sed -n '/^CEOF[[0-9]]*$/s/CEOF/0/p' conf$$subs.sed`
416 if test -n "$ac_eof"; then
417 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
418 ac_eof=`expr $ac_eof + 1`
421 dnl Increment fragment number.
422 m4_define([_AC_SED_FRAG_NUM], m4_incr(_AC_SED_FRAG_NUM))dnl
423 dnl Record that this fragment will need to be used.
424 m4_define([_AC_SED_CMDS],
425 m4_defn([_AC_SED_CMDS])[| sed -f "$tmp/subs-]_AC_SED_FRAG_NUM[.sed" ])dnl
426 [cat >>$CONFIG_STATUS <<_ACEOF
427 cat >"\$tmp/subs-]_AC_SED_FRAG_NUM[.sed" <<\CEOF$ac_eof
428 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b]m4_defn([_AC_SED_FRAG])dnl
431 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
432 s/^/s,@/; s/!/@,|#_!!_#|/
435 s/'"$ac_delim"'$/,g/; t
437 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
438 ' >>$CONFIG_STATUS <conf$$subs.sed
440 cat >>$CONFIG_STATUS <<_ACEOF
441 ]m4_if(_AC_Var, [@END@],
442 [m4_if(m4_eval(_AC_SED_CMD_NUM + 2 > _AC_SED_CMD_LIMIT), 1,
443 [m4_define([_AC_SED_CMDS], m4_defn([_AC_SED_CMDS])[| sed 's/|#_!!_#|//g' ])],
449 m4_define([_AC_SED_FRAG], [
450 ])m4_define([_AC_SED_DELIM_NUM], 0)m4_define([_AC_SED_CMD_NUM], 2)dnl
454 m4_popdef([_AC_SED_FRAG_NUM])dnl
455 m4_popdef([_AC_SED_CMD_NUM])dnl
456 m4_popdef([_AC_SED_DELIM_NUM])dnl
457 m4_popdef([_AC_SED_FRAG])dnl
459 # VPATH may cause trouble with some makes, so we remove $(srcdir),
460 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
461 # trailing colons and then remove the whole line if VPATH becomes empty
462 # (actually we leave an empty line to preserve line numbers).
463 if test "x$srcdir" = x.; then
464 ac_vpsub=['/^[ ]*VPATH[ ]*=/{
468 s/^\([^=]*=[ ]*\):*/\1/
474 cat >>$CONFIG_STATUS <<\_ACEOF
475 fi # test -n "$CONFIG_FILES"
477 ])# _AC_OUTPUT_FILES_PREPARE
482 # Do the variable substitutions to create the Makefiles or whatever.
484 # This macro is expanded inside a here document. If the here document is
485 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
487 m4_define([_AC_OUTPUT_FILE],
493 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
495 [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
496 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
499 AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
500 [ ac_MKDIR_P=$MKDIR_P
502 [[\\/$]]* | ?:[[\\/]]* ) ;;
503 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
508 m4_ifndef([AC_DATAROOTDIR_CHECKED],
509 [cat >>$CONFIG_STATUS <<\_ACEOF
510 # If the template does not know about datarootdir, expand it.
511 # FIXME: This hack should be removed a few years after 2.60.
512 ac_datarootdir_hack=; ac_datarootdir_seen=
513 m4_define([_AC_datarootdir_vars],
514 [datadir, docdir, infodir, localedir, mandir])
515 case `sed -n '/datarootdir/ {
519 m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
521 ])' $ac_file_inputs` in
522 *datarootdir*) ac_datarootdir_seen=yes;;
523 *@[]m4_join([@*|*@], _AC_datarootdir_vars)@*)
524 AC_MSG_WARN([$ac_file_inputs seems to ignore the --datarootdir setting])
526 cat >>$CONFIG_STATUS <<_ACEOF
527 ac_datarootdir_hack='
528 m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
529 [s&@_AC_Var@&$_AC_Var&g
531 s&\\\${datarootdir}&$datarootdir&g' ;;
536 # Neutralize VPATH when `$srcdir' = `.'.
537 # Shell code in configure.ac might set extrasub.
538 # FIXME: do we really want to maintain this feature?
539 cat >>$CONFIG_STATUS <<_ACEOF
543 cat >>$CONFIG_STATUS <<\_ACEOF
545 [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
546 dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE.
547 s&@configure_input@&$configure_input&;t t
548 dnl During the transition period, this is a special case:
549 s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir])
550 m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir,
551 builddir, abs_builddir,
552 abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [[, MKDIR_P]]),
553 [s&@_AC_Var@&$ac_[]_AC_Var&;t t[]AC_SUBST_TRACE(_AC_Var)
555 m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack
557 " $ac_file_inputs m4_defn([_AC_SED_CMDS])>$tmp/out
559 m4_ifndef([AC_DATAROOTDIR_CHECKED],
560 [test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
561 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
562 { ac_out=`sed -n '/^[[ ]]*datarootdir[[ ]]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
563 AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir'
564 which seems to be undefined. Please make sure it is defined.])
569 -) cat "$tmp/out"; rm -f "$tmp/out";;
570 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
572 dnl This would break Makefile dependencies:
573 dnl if diff $ac_file "$tmp/out" >/dev/null 2>&1; then
574 dnl echo "$ac_file is unchanged"
576 dnl rm -f $ac_file; mv "$tmp/out" $ac_file
583 ## ----------------------- ##
584 ## Configuration headers. ##
585 ## ----------------------- ##
588 # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
589 # ------------------------------------------------------
590 # Specify that the HEADERS are to be created by instantiation of the
593 AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)])
596 # AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
597 # --------------------------------------
598 # FIXME: Make it obsolete?
599 AC_DEFUN([AC_CONFIG_HEADER],
600 [AC_CONFIG_HEADERS([$1])])
606 # Output the code which instantiates the `config.h' files from their
609 # This macro is expanded inside a here document. If the here document is
610 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
612 m4_define([_AC_OUTPUT_HEADER],
619 # Transform confdefs.h into a sed script `conftest.defines', that
620 # substitutes the proper values into config.h.in to produce config.h.
621 rm -f conftest.defines conftest.tail
622 # First, append a space to every undef/define line, to ease matching.
623 echo 's/$/ /' >conftest.defines
624 # Then, protect against being on the right side of a sed subst, or in
625 # an unquoted here document, in config.status. If some macros were
626 # called several times there might be several #defines for the same
627 # symbol, which is useless. But do not sort them, since the last
628 # AC_DEFINE must be honored.
630 dnl Quote, for `[ ]' and `define'.
631 [ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
632 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
633 # NAME is the cpp macro being defined, VALUE is the value it is being given.
634 # PARAMS is the parameter list in the macro definition--in most cases, it's
635 # just an empty string.
636 ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
637 ac_dB='\\)[ (].*,\\1define\\2'
640 dnl ac_dD used to contain `;t' at the end, but that was both slow and incorrect.
641 dnl 1) Since the script must be broken into chunks containing 100 commands,
642 dnl the extra command meant extra calls to sed.
643 dnl 2) The code was incorrect: in the unusual case where a symbol has multiple
644 dnl different AC_DEFINEs, the last one should be honored.
646 dnl ac_dB works because every line has a space appended. ac_dD reinserts
647 dnl the space, because some symbol may have been AC_DEFINEd several times.
649 dnl The first use of ac_dA has a space prepended, so that the second
650 dnl use does not match the initial 's' of $ac_dA.
656 s/^[ ]*#[ ]*define[ ][ ]*//
661 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
662 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
665 # Remove the space that was appended to ease matching.
666 # Then replace #undef with comments. This is necessary, for
667 # example, in the case of _POSIX_SOURCE, which is predefined and required
668 # on some systems where configure will not decide to define it.
669 # (The regexp can be short, since the line contains either #define or #undef.)
671 [s,^[ #]*u.*,/* & */,]' >>conftest.defines
673 # Break up conftest.defines:
674 dnl If we cared only about not exceeding line count limits, we would use this:
675 dnl ac_max_sed_lines=m4_eval(_AC_SED_CMD_LIMIT - 3)
676 dnl But in practice this can generate scripts that contain too many bytes;
677 dnl and this can cause obscure 'sed' failures, e.g.,
678 dnl http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00127.html
679 dnl So instead, we use the following, which is about half the size we'd like:
681 dnl In the future, let's use awk or sh instead of sed to do substitutions,
682 dnl since we have so many problems with sed.
684 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
685 # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
686 # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
688 ac_in='$ac_file_inputs'
694 # Write a here document:
695 dnl Quote, for the `[ ]' and `define'.
696 [ cat >>$CONFIG_STATUS <<_ACEOF
697 # First, check the format of the line:
698 cat >"\$tmp/defines.sed" <<\\CEOF
699 /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
700 /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
704 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
706 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
707 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
708 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
709 grep . conftest.tail >/dev/null || break
710 rm -f conftest.defines
711 mv conftest.tail conftest.defines
713 rm -f conftest.defines conftest.tail
715 dnl Now back to your regularly scheduled config.status.
716 echo "ac_result=$ac_in" >>$CONFIG_STATUS
717 cat >>$CONFIG_STATUS <<\_ACEOF
718 if test x"$ac_file" != x-; then
719 echo "/* $configure_input */" >"$tmp/config.h"
720 cat "$ac_result" >>"$tmp/config.h"
721 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
722 AC_MSG_NOTICE([$ac_file is unchanged])
725 mv "$tmp/config.h" $ac_file
728 echo "/* $configure_input */"
732 dnl If running for Automake, be ready to perform additional
733 dnl commands to set up the timestamp files.
734 m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK],
735 [_AC_AM_CONFIG_HEADER_HOOK([$ac_file])
737 ])# _AC_OUTPUT_HEADER
741 ## --------------------- ##
742 ## Configuration links. ##
743 ## --------------------- ##
746 # AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS])
747 # --------------------------------------------------------
748 # Specify that config.status should establish a (symbolic if possible)
749 # link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
750 # Reject DEST=., because it is makes it hard for ./config.status
751 # to guess the links to establish (`./config.status .').
753 AC_DEFUN([AC_CONFIG_LINKS], [_AC_CONFIG_FOOS([LINKS], $@)])
756 # AC_LINK_FILES(SOURCE..., DEST...)
757 # ---------------------------------
758 # Link each of the existing files SOURCE... to the corresponding
759 # link name in DEST...
761 # Unfortunately we can't provide a very good autoupdate service here,
762 # since in `AC_LINK_FILES($from, $to)' it is possible that `$from'
763 # and `$to' are actually lists. It would then be completely wrong to
764 # replace it with `AC_CONFIG_LINKS($to:$from). It is possible in the
765 # case of literal values though, but because I don't think there is any
766 # interest in creating config links with literal values, no special
767 # mechanism is implemented to handle them.
769 # _AC_LINK_FILES_CNT is used to be robust to multiple calls.
770 AU_DEFUN([AC_LINK_FILES],
772 [m4_fatal([$0: incorrect number of arguments])])dnl
773 m4_define_default([_AC_LINK_FILES_CNT], 0)dnl
774 m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
777 while test -n "$ac_sources"; do
778 set $ac_dests; ac_dest=$[1]; shift; ac_dests=$[*]
779 set $ac_sources; ac_source=$[1]; shift; ac_sources=$[*]
780 [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
782 AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
784 [It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
785 to AC_CONFIG_LINKS. `autoupdate' provides a functional but inelegant
786 update, you should probably tune the result yourself.])# AC_LINK_FILES
791 # This macro is expanded inside a here document. If the here document is
792 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
793 m4_define([_AC_OUTPUT_LINK],
799 AC_MSG_NOTICE([linking $srcdir/$ac_source to $ac_file])
801 if test ! -r "$srcdir/$ac_source"; then
802 AC_MSG_ERROR([$srcdir/$ac_source: file not found])
806 # Try a relative symlink, then a hard link, then a copy.
808 [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$srcdir/$ac_source ;;
809 *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;;
811 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
812 ln "$srcdir/$ac_source" "$ac_file" 2>/dev/null ||
813 cp -p "$srcdir/$ac_source" "$ac_file" ||
814 AC_MSG_ERROR([cannot link or copy $srcdir/$ac_source to $ac_file])
819 ## ------------------------ ##
820 ## Configuration commands. ##
821 ## ------------------------ ##
824 # AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
825 # ---------------------------------------------------
827 # Specify additional commands to be run by config.status. This
828 # commands must be associated with a NAME, which should be thought
829 # as the name of a file the COMMANDS create.
831 AC_DEFUN([AC_CONFIG_COMMANDS], [_AC_CONFIG_FOOS([COMMANDS], $@)])
834 # AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
835 # -----------------------------------------
837 # Add additional commands for AC_OUTPUT to put into config.status.
839 # This macro is an obsolete version of AC_CONFIG_COMMANDS. The only
840 # difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is
841 # to give a unique key. The scheme we have chosen is `default-1',
842 # `default-2' etc. for each call.
844 # Unfortunately this scheme is fragile: bad things might happen
845 # if you update an included file and configure.ac: you might have
846 # clashes :( On the other hand, I'd like to avoid weird keys (e.g.,
847 # depending upon __file__ or the pid).
848 AU_DEFUN([AC_OUTPUT_COMMANDS],
849 [m4_define_default([_AC_OUTPUT_COMMANDS_CNT], 0)dnl
850 m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
851 dnl Double quoted since that was the case in the original macro.
852 AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
858 # This macro is expanded inside a here document. If the here document is
859 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
860 m4_define([_AC_OUTPUT_COMMAND],
861 [ AC_MSG_NOTICE([executing $ac_file commands])
866 ## -------------------------------------- ##
867 ## Pre- and post-config.status commands. ##
868 ## -------------------------------------- ##
871 # AC_CONFIG_COMMANDS_PRE(CMDS)
872 # ----------------------------
873 # Commands to run right before config.status is created. Accumulates.
874 AC_DEFUN([AC_CONFIG_COMMANDS_PRE],
875 [m4_append([AC_OUTPUT_COMMANDS_PRE], [$1
879 # AC_OUTPUT_COMMANDS_PRE
880 # ----------------------
881 # A *variable* in which we append all the actions that must be
882 # performed before *creating* config.status. For a start, clean
883 # up all the LIBOBJ mess.
884 m4_define([AC_OUTPUT_COMMANDS_PRE],
885 [_AC_LIBOBJS_NORMALIZE
889 # AC_CONFIG_COMMANDS_POST(CMDS)
890 # -----------------------------
891 # Commands to run after config.status was created. Accumulates.
892 AC_DEFUN([AC_CONFIG_COMMANDS_POST],
893 [m4_append([AC_OUTPUT_COMMANDS_POST], [$1
897 m4_define([AC_OUTPUT_COMMANDS_POST])
901 ## ----------------------- ##
902 ## Configuration subdirs. ##
903 ## ----------------------- ##
906 # AC_CONFIG_SUBDIRS(DIR ...)
907 # --------------------------
908 # We define two variables:
910 # A statically built list, should contain *all* the arguments of
911 # AC_CONFIG_SUBDIRS. The final value is assigned to ac_subdirs_all in
912 # the `default' section, and used for --help=recursive.
913 # It is also used in _AC_CONFIG_UNIQUE.
914 # It makes no sense for arguments which are sh variables.
916 # Shell variable built at runtime, so some of these dirs might not be
917 # included, if for instance the user refused a part of the tree.
918 # This is used in _AC_OUTPUT_SUBDIRS.
919 AC_DEFUN([AC_CONFIG_SUBDIRS],
920 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
921 m4_foreach_w([_AC_Sub], [$1],
922 [_AC_CONFIG_UNIQUE([SUBDIRS],
923 m4_bpatsubst(m4_defn([_AC_Sub]), [:.*]))])dnl
924 m4_append([_AC_LIST_SUBDIRS], [$1], [
926 AS_LITERAL_IF([$1], [],
927 [AC_DIAGNOSE([syntax], [$0: you should use literals])])dnl
928 AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])dnl
934 # This is a subroutine of AC_OUTPUT, but it does not go into
935 # config.status, rather, it is called after running config.status.
936 m4_define([_AC_OUTPUT_SUBDIRS],
939 # CONFIG_SUBDIRS section.
941 if test "$no_recursion" != yes; then
943 # Remove --cache-file and --srcdir arguments so they do not pile up.
944 ac_sub_configure_args=
946 eval "set x $ac_configure_args"
950 if test -n "$ac_prev"; then
955 -cache-file | --cache-file | --cache-fil | --cache-fi \
956 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
957 ac_prev=cache_file ;;
958 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
959 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
964 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
966 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
974 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
976 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
980 # Always prepend --prefix to ensure using the same prefix
981 # in subdir configurations.
982 ac_arg="--prefix=$prefix"
984 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
986 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
989 if test "$silent" = yes; then
990 ac_sub_configure_args="--silent $ac_sub_configure_args"
994 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
996 # Do not complain, so a configure script can configure whichever
997 # parts of a large source tree are present.
998 test -d "$srcdir/$ac_dir" || continue
1000 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
1001 _AS_ECHO_LOG([$ac_msg])
1003 AS_MKDIR_P(["$ac_dir"])
1004 _AC_SRCDIRS(["$ac_dir"])
1008 # Check for guested configure; otherwise get Cygnus style configure.
1009 if test -f "$ac_srcdir/configure.gnu"; then
1010 ac_sub_configure=$ac_srcdir/configure.gnu
1011 elif test -f "$ac_srcdir/configure"; then
1012 ac_sub_configure=$ac_srcdir/configure
1013 elif test -f "$ac_srcdir/configure.in"; then
1014 # This should be Cygnus configure.
1015 ac_sub_configure=$ac_aux_dir/configure
1017 AC_MSG_WARN([no configuration information is in $ac_dir])
1021 # The recursion is here.
1022 if test -n "$ac_sub_configure"; then
1023 # Make the cache file name correct relative to the subdirectory.
1025 [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
1027 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
1030 AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
1031 # The eval makes quoting arguments work.
1032 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
1033 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
1034 AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
1040 ])# _AC_OUTPUT_SUBDIRS
1045 ## -------------------------- ##
1046 ## Outputting config.status. ##
1047 ## -------------------------- ##
1050 # AU::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1051 # -----------------------------------------------------------
1053 # If there are arguments given to AC_OUTPUT, dispatch them to the
1054 # proper modern macros.
1055 AU_DEFUN([AC_OUTPUT],
1057 [AC_CONFIG_FILES([$1])])dnl
1059 [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
1063 # AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1064 # -------------------------------------------------------
1066 # Produce config.status, config.h, and links; and configure subdirs.
1068 m4_define([AC_OUTPUT],
1069 [dnl Dispatch the extra arguments to their native macros.
1071 [AC_CONFIG_FILES([$1])])dnl
1073 [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
1075 [AC_DIAGNOSE([obsolete],
1076 [$0 should be used without arguments.
1077 You should run autoupdate.])])dnl
1080 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1081 # Let make expand exec_prefix.
1082 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1084 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
1086 dnl Commands to run before creating config.status.
1087 AC_OUTPUT_COMMANDS_PRE()dnl
1089 : ${CONFIG_STATUS=./config.status}
1090 ac_clean_files_save=$ac_clean_files
1091 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1092 _AC_OUTPUT_CONFIG_STATUS()dnl
1093 ac_clean_files=$ac_clean_files_save
1095 dnl Commands to run after config.status was created
1096 AC_OUTPUT_COMMANDS_POST()dnl
1098 # configure is writing to config.log, and then calls config.status.
1099 # config.status does its own redirection, appending to config.log.
1100 # Unfortunately, on DOS this fails, as config.log is still kept open
1101 # by configure, so config.status won't be able to write to it; its
1102 # output is simply discarded. So we exec the FD to /dev/null,
1103 # effectively closing config.log, so it can be properly (re)opened and
1104 # appended to by config.status. When coming back to configure, we
1105 # need to make the FD available again.
1106 if test "$no_create" != yes; then
1108 ac_config_status_args=
1109 test "$silent" = yes &&
1110 ac_config_status_args="$ac_config_status_args --quiet"
1111 exec AS_MESSAGE_LOG_FD>/dev/null
1112 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
1113 exec AS_MESSAGE_LOG_FD>>config.log
1114 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
1115 # would make configure fail if this is the last instruction.
1116 $ac_cs_success || AS_EXIT([1])
1118 dnl config.status should not do recursion.
1119 AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
1123 # _AC_OUTPUT_CONFIG_STATUS
1124 # ------------------------
1125 # Produce config.status. Called by AC_OUTPUT.
1126 # Pay special attention not to have too long here docs: some old
1127 # shells die. Unfortunately the limit is not known precisely...
1128 m4_define([_AC_OUTPUT_CONFIG_STATUS],
1129 [AC_MSG_NOTICE([creating $CONFIG_STATUS])
1130 dnl AS_MESSAGE_LOG_FD is not available yet:
1131 m4_rename([AS_MESSAGE_LOG_FD], [_AC_save_AS_MESSAGE_LOG_FD])dnl
1132 cat >$CONFIG_STATUS <<_ACEOF
1134 # Generated by $as_me.
1135 # Run this file to recreate the current configuration.
1136 # Compiler output produced by configure, useful for debugging
1137 # configure, is in config.log if it exists.
1142 SHELL=\${CONFIG_SHELL-$SHELL}
1145 cat >>$CONFIG_STATUS <<\_ACEOF
1147 dnl Watch out, this is directly the initializations, do not use
1148 dnl AS_PREPARE, otherwise you'd get it output in the initialization
1149 dnl of configure, not config.status.
1151 exec AS_MESSAGE_FD>&1
1153 # Save the log message, to keep $[0] and so on meaningful, and to
1154 # report actual input values of CONFIG_FILES etc. instead of their
1155 # values after options handling.
1157 This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
1158 $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
1159 generated by m4_PACKAGE_STRING. Invocation command line was
1161 CONFIG_FILES = $CONFIG_FILES
1162 CONFIG_HEADERS = $CONFIG_HEADERS
1163 CONFIG_LINKS = $CONFIG_LINKS
1164 CONFIG_COMMANDS = $CONFIG_COMMANDS
1167 on `(hostname || uname -n) 2>/dev/null | sed 1q`
1172 cat >>$CONFIG_STATUS <<_ACEOF
1173 # Files that config.status was made for.
1174 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1175 [config_files="$ac_config_files"
1177 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1178 [config_headers="$ac_config_headers"
1180 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1181 [config_links="$ac_config_links"
1183 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1184 [config_commands="$ac_config_commands"
1189 cat >>$CONFIG_STATUS <<\_ACEOF
1191 \`$as_me' instantiates files from templates according to the
1192 current configuration.
1194 Usage: $[0] [[OPTIONS]] [[FILE]]...
1196 -h, --help print this help, then exit
1197 -V, --version print version number and configuration settings, then exit
1198 -q, --quiet do not print progress messages
1199 -d, --debug don't remove temporary files
1200 --recheck update $as_me by reconfiguring in the same conditions
1201 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1202 [[ --file=FILE[:TEMPLATE]
1203 instantiate the configuration file FILE
1205 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1206 [[ --header=FILE[:TEMPLATE]
1207 instantiate the configuration header FILE
1210 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1211 [Configuration files:
1215 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1216 [Configuration headers:
1220 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1221 [Configuration links:
1225 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1226 [Configuration commands:
1230 Report bugs to <bug-autoconf@gnu.org>."
1233 cat >>$CONFIG_STATUS <<_ACEOF
1235 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
1236 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1237 configured by $[0], generated by m4_PACKAGE_STRING,
1238 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\"
1240 Copyright (C) 2006 Free Software Foundation, Inc.
1241 This config.status script is free software; the Free Software Foundation
1242 gives unlimited permission to copy, distribute and modify it."
1246 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
1249 AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
1254 cat >>$CONFIG_STATUS <<\_ACEOF
1255 # If no file are specified by the user, then we need to provide default
1256 # value. By we need to know if files were specified by the user.
1258 while test $[#] != 0
1262 ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='`
1263 ac_optarg=`expr "X$[1]" : 'X[[^=]]*=\(.*\)'`
1274 # Handling of the options.
1275 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1277 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
1278 echo "$ac_cs_version"; exit ;;
1279 --debug | --debu | --deb | --de | --d | -d )
1281 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl
1282 --file | --fil | --fi | --f )
1284 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
1285 ac_need_defaults=false;;
1287 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl
1288 --header | --heade | --head | --hea )
1290 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
1291 ac_need_defaults=false;;
1293 # Conflict between --help and --header
1294 AC_MSG_ERROR([ambiguous option: $[1]
1295 Try `$[0] --help' for more information.]);;
1296 ], [ --he | --h |])dnl
1297 --help | --hel | -h )
1298 echo "$ac_cs_usage"; exit ;;
1299 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1300 | -silent | --silent | --silen | --sile | --sil | --si | --s)
1304 -*) AC_MSG_ERROR([unrecognized option: $[1]
1305 Try `$[0] --help' for more information.]) ;;
1307 *) ac_config_targets="$ac_config_targets $[1]"
1308 ac_need_defaults=false ;;
1314 ac_configure_extra_args=
1316 if $ac_cs_silent; then
1317 exec AS_MESSAGE_FD>/dev/null
1318 ac_configure_extra_args="$ac_configure_extra_args --silent"
1322 cat >>$CONFIG_STATUS <<_ACEOF
1323 dnl Check this before opening the log, to avoid a bug on MinGW,
1324 dnl which prohibits the recursive instance from truncating an open log.
1325 if \$ac_cs_recheck; then
1326 echo "running CONFIG_SHELL=$SHELL $SHELL $[0] "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD
1329 exec $SHELL "$[0]"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
1333 cat >>$CONFIG_STATUS <<\_ACEOF
1335 m4_rename([_AC_save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl
1336 exec AS_MESSAGE_LOG_FD>>config.log
1339 AS_BOX([Running $as_me.])
1341 } >&AS_MESSAGE_LOG_FD
1344 cat >>$CONFIG_STATUS <<_ACEOF
1345 m4_ifdef([_AC_OUTPUT_COMMANDS_INIT],
1349 _AC_OUTPUT_COMMANDS_INIT
1353 cat >>$CONFIG_STATUS <<\_ACEOF
1355 # Handling of arguments.
1356 for ac_config_target in $ac_config_targets
1358 case $ac_config_target in
1359 m4_ifdef([_AC_LIST_TAGS], [_AC_LIST_TAGS])
1360 *) AC_MSG_ERROR([invalid argument: $ac_config_target]);;
1364 m4_ifdef([_AC_SEEN_CONFIG(ANY)], [_AC_OUTPUT_MAIN_LOOP])[]dnl
1368 chmod +x $CONFIG_STATUS
1369 ])# _AC_OUTPUT_CONFIG_STATUS
1371 # _AC_OUTPUT_MAIN_LOOP
1372 # --------------------
1373 # The main loop in $CONFIG_STATUS.
1375 # This macro is expanded inside a here document. If the here document is
1376 # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
1378 AC_DEFUN([_AC_OUTPUT_MAIN_LOOP],
1380 # If the user did not use the arguments to specify the items to instantiate,
1381 # then the envvar interface is used. Set only those that are not.
1382 # We use the long form for the default assignment because of an extremely
1383 # bizarre bug on SunOS 4.1.3.
1384 if $ac_need_defaults; then
1385 m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1386 [ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
1388 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1389 [ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
1391 m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1392 [ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
1394 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1395 [ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
1399 # Have a temporary directory for convenience. Make it in the build tree
1400 # simply because there is no reason against having it here, and in addition,
1401 # creating and moving files from /tmp can sometimes cause problems.
1402 # Hook for its removal unless debugging.
1403 # Note that there is a small window in which the directory will not be cleaned:
1404 # after its creation but before its name has been assigned to `$tmp'.
1408 trap 'exit_status=$?
1409 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
1411 trap 'AS_EXIT([1])' 1 2 13 15
1413 dnl The comment above AS_TMPDIR says at most 4 chars are allowed.
1414 AS_TMPDIR([conf], [.])
1416 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl
1419 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F $CONFIG_FILES])[]dnl
1420 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H $CONFIG_HEADERS])[]dnl
1421 m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L $CONFIG_LINKS])[]dnl
1422 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS])
1425 :[[FHLC]]) ac_mode=$ac_tag; continue;;
1427 case $ac_mode$ac_tag in
1429 :L* | :C*:*) AC_MSG_ERROR([Invalid tag $ac_tag.]);;
1430 :[[FH]]-) ac_tag=-:-;;
1431 :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;;
1442 :L) ac_source=$[1];;
1448 -) ac_f="$tmp/stdin";;
1449 *) # Look for the file first in the build tree, then in the source tree
1450 # (if the path is not absolute). The absolute path cannot be DOS-style,
1451 # because $ac_f cannot contain `:'.
1455 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1457 AC_MSG_ERROR([cannot find input file: $ac_f]);;
1459 ac_file_inputs="$ac_file_inputs $ac_f"
1462 # Let's still pretend it is `configure' which instantiates (i.e., don't
1463 # use $as_me), people would be surprised to read:
1464 # /* config.h. Generated by config.status. */
1465 configure_input="Generated from "`IFS=:
1466 echo $[*] | sed ['s|^[^:]*/||;s|:[^:]*/|, |g']`" by configure."
1467 if test x"$ac_file" != x-; then
1468 configure_input="$ac_file. $configure_input"
1469 AC_MSG_NOTICE([creating $ac_file])
1473 *:-:* | *:-) cat >"$tmp/stdin";;
1478 ac_dir=`AS_DIRNAME(["$ac_file"])`
1479 AS_MKDIR_P(["$ac_dir"])
1480 _AC_SRCDIRS(["$ac_dir"])
1483 m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F)_AC_OUTPUT_FILE ;;])
1484 m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H)_AC_OUTPUT_HEADER ;;])
1485 m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L)_AC_OUTPUT_LINK ;;])
1486 m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C)_AC_OUTPUT_COMMAND ;;])
1489 dnl Some shells don't like empty case/esac
1490 m4_ifdef([_AC_LIST_TAG_COMMANDS], [
1491 case $ac_file$ac_mode in
1492 _AC_LIST_TAG_COMMANDS
1497 ])# _AC_OUTPUT_MAIN_LOOP
1500 # AC_OUTPUT_MAKE_DEFS
1501 # -------------------
1502 # Set the DEFS variable to the -D options determined earlier.
1503 # This is a subroutine of AC_OUTPUT.
1504 # It is called inside configure, outside of config.status.
1505 m4_define([AC_OUTPUT_MAKE_DEFS],
1506 [[# Transform confdefs.h into DEFS.
1507 # Protect against shell expansion while executing Makefile rules.
1508 # Protect against Makefile macro expansion.
1510 # If the first sed substitution is executed (which looks for macros that
1511 # take arguments), then branch to the quote section. Otherwise,
1512 # look for a macro that doesn't take arguments.
1516 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
1518 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
1522 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
1535 DEFS=`sed -n "$ac_script" confdefs.h`
1536 ]])# AC_OUTPUT_MAKE_DEFS