]> git.saurik.com Git - wxWidgets.git/blame - build/autoconf_prepend-include/autoconf/status.m4
Delete the menu on close in the wxWebView sample. Fixes most of the memory leaks.
[wxWidgets.git] / build / autoconf_prepend-include / autoconf / status.m4
CommitLineData
194f742f
RD
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,
580e09f7 4# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
194f742f
RD
5
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
10#
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.
15#
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
580e09f7
DE
18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19# 02110-1301, USA.
194f742f
RD
20
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.
28#
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.
36#
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.
47#
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.
51
52
53# This file handles about all the preparation aspects for
54# `config.status': registering the configuration files, the headers,
55# the links, and the commands `config.status' will run. There is a
56# little mixture though of things actually handled by `configure',
57# such as running the `configure' in the sub directories. Minor
58# detail.
59#
60# There are two kinds of commands:
61#
62# COMMANDS:
63#
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.
67#
68# INIT-CMDS:
69#
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
580e09f7
DE
72# `configure' to give `config.status' some variables it needs to run
73# the COMMANDS. At the difference of COMMANDS, the INIT-CMDS are
194f742f
RD
74# always run.
75#
76#
194f742f
RD
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.
83
84
85## ------------------ ##
86## Auxiliary macros. ##
87## ------------------ ##
88
580e09f7
DE
89# _AC_SRCDIRS(BUILD-DIR-NAME)
90# ---------------------------
194f742f
RD
91# Inputs:
92# - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src'
93# - `$srcdir' is `top-build -> top-src'
94#
580e09f7 95# Outputs:
194f742f 96# - `ac_builddir' is `.', for symmetry only.
580e09f7
DE
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'.
194f742f
RD
100# If not empty, has a trailing slash.
101# - `ac_srcdir' is `build -> src'.
102# - `ac_top_srcdir' is `build -> top-src'.
580e09f7
DE
103# and `ac_abs_builddir' etc., the absolute directory names.
104m4_define([_AC_SRCDIRS],
194f742f
RD
105[ac_builddir=.
106
580e09f7
DE
107case $1 in
108.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
109*)
194f742f 110 ac_dir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'`
580e09f7
DE
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/ ;;
116 esac ;;
117esac
118ac_abs_top_builddir=$ac_pwd
119ac_abs_builddir=$ac_pwd$ac_dir_suffix
120# for backward compatibility:
121ac_top_builddir=$ac_top_build_prefix
194f742f
RD
122
123case $srcdir in
580e09f7 124 .) # We are building in place.
194f742f 125 ac_srcdir=.
580e09f7
DE
126 ac_top_srcdir=$ac_top_builddir_sub
127 ac_abs_top_srcdir=$ac_pwd ;;
128 [[\\/]]* | ?:[[\\/]]* ) # Absolute name.
194f742f 129 ac_srcdir=$srcdir$ac_dir_suffix;
580e09f7
DE
130 ac_top_srcdir=$srcdir
131 ac_abs_top_srcdir=$srcdir ;;
132 *) # Relative name.
133 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
134 ac_top_srcdir=$ac_top_build_prefix$srcdir
135 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
194f742f 136esac
580e09f7
DE
137ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
138])# _AC_SRCDIRS
194f742f 139
194f742f
RD
140
141
580e09f7
DE
142## ---------------------- ##
143## Registering the tags. ##
144## ---------------------- ##
194f742f 145
194f742f 146
580e09f7
DE
147# _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS])
148# -----------------------------------------
194f742f 149#
580e09f7
DE
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.
154m4_define([_AC_CONFIG_COMMANDS_INIT],
155[m4_ifval([$1],
156 [m4_append([_AC_OUTPUT_COMMANDS_INIT],
157 [$1
158])])])
194f742f
RD
159
160
161# AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
162# -----------------------------------------------------
163# This macro does nothing, it's a hook to be read with `autoconf --trace'.
580e09f7 164#
194f742f
RD
165# It announces DEST depends upon the SOURCE1 etc.
166m4_define([AC_FILE_DEPENDENCY_TRACE], [])
167
168
580e09f7
DE
169# _AC_FILE_DEPENDENCY_TRACE_COLON(DEST:SOURCE1[:SOURCE2...])
170# ----------------------------------------------------------
171# Declare that DEST depends upon SOURCE1 etc.
172#
173m4_define([_AC_FILE_DEPENDENCY_TRACE_COLON],
174[AC_FILE_DEPENDENCY_TRACE(m4_bpatsubst([$1], [:], [,]))dnl
175])
176
177
178# _AC_CONFIG_DEPENDENCY(MODE, DEST[:SOURCE1...])
179# ---------------------------------------------
180# MODE is `FILES', `HEADERS', or `LINKS'.
181#
194f742f 182# Be sure that a missing dependency is expressed as a dependency upon
580e09f7
DE
183# `DEST.in' (except with config links).
184#
194f742f 185m4_define([_AC_CONFIG_DEPENDENCY],
580e09f7
DE
186[_AC_FILE_DEPENDENCY_TRACE_COLON([$2]_AC_CONFIG_DEPENDENCY_DEFAULT($@))dnl
187])
194f742f
RD
188
189
580e09f7
DE
190# _AC_CONFIG_DEPENDENCY_DEFAULT(MODE, DEST[:SOURCE1...])
191# ------------------------------------------------------
192# Expand to `:DEST.in' if appropriate, or to empty string otherwise.
193#
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.)
201#
202m4_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'])])],
206 [:$2.in])])dnl
194f742f
RD
207])
208
209
580e09f7
DE
210# _AC_CONFIG_UNIQUE(MODE, DEST)
211# -----------------------------
212# MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'.
194f742f 213#
580e09f7 214# Verify that there is no double definition of an output file.
194f742f 215#
194f742f 216m4_define([_AC_CONFIG_UNIQUE],
580e09f7
DE
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
194f742f
RD
220])
221
222
580e09f7
DE
223# _AC_CONFIG_FOOS(MODE, TAGS..., [COMMANDS], [INIT-CMDS])
224# -------------------------------------------------------
225# MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
226#
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.)
229#
230# For COMMANDS, do not m4_normalize TAGS before adding it to ac_config_commands.
231# This historical difference allows macro calls in TAGS.
232#
233m4_define([_AC_CONFIG_FOOS],
234[m4_foreach_w([AC_File], [$2],
235 [_AC_CONFIG_REGISTER([$1], m4_defn([AC_File]), [$3])])dnl
236m4_define([_AC_SEEN_CONFIG(ANY)])dnl
237m4_define([_AC_SEEN_CONFIG($1)])dnl
238_AC_CONFIG_COMMANDS_INIT([$4])dnl
239ac_config_[]m4_tolower([$1])="$ac_config_[]m4_tolower([$1]) dnl
240m4_if([$1], [COMMANDS], [$2], [m4_normalize([$2])])"
241])
194f742f
RD
242
243
580e09f7
DE
244# _AC_CONFIG_REGISTER(MODE, TAG, [COMMANDS])
245# ------------------------------------------
246# MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
194f742f 247#
580e09f7
DE
248m4_define([_AC_CONFIG_REGISTER],
249[m4_if([$1], [COMMANDS],
250 [],
251 [_AC_CONFIG_DEPENDENCY([$1], [$2])])dnl
252_AC_CONFIG_REGISTER_DEST([$1], [$2], m4_bpatsubst([[$2]], [:.*\(.\)$], [\1]), [$3])dnl
253])
194f742f 254
580e09f7
DE
255
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.
261#
262# With CONFIG_LINKS, reject DEST=., because it is makes it hard for ./config.status
263# to guess the links to establish (`./config.status .').
264#
265# Save the name of the first config header to AH_HEADER.
266#
267m4_define([_AC_CONFIG_REGISTER_DEST],
268[_AC_CONFIG_UNIQUE([$1], [$3])dnl
269m4_if([$1 $3], [LINKS .],
270 [AC_FATAL([invalid destination of a config link: `.'])])dnl
271m4_if([$1], [HEADERS],
272 [m4_define_default([AH_HEADER], [$3])])dnl
273dnl
274dnl Recognize TAG as an argument to config.status:
275dnl
276m4_append([_AC_LIST_TAGS],
277[ "$3") CONFIG_$1="$CONFIG_$1 $2" ;;
278])dnl
279dnl
280dnl Register the associated commands, if any:
281dnl
282m4_ifval([$4],
283[m4_append([_AC_LIST_TAG_COMMANDS],
284[ "$3":]m4_bpatsubst([$1], [^\(.\).*$], [\1])[) $4 ;;
194f742f 285])])dnl
580e09f7 286])# _AC_CONFIG_REGISTER_DEST
194f742f 287
580e09f7
DE
288
289
290
291## --------------------- ##
292## Configuration files. ##
293## --------------------- ##
294
295
296# AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
297# -------------------------------------------------
298# Specify output files, i.e., files that are configured with AC_SUBST.
194f742f 299#
580e09f7 300AC_DEFUN([AC_CONFIG_FILES], [_AC_CONFIG_FOOS([FILES], $@)])
194f742f 301
194f742f 302
580e09f7
DE
303# _AC_SED_CMD_LIMIT
304# -----------------
305# Evaluate to an m4 number equal to the maximum number of commands to put
306# in any single sed program, not counting ":" commands.
307#
308# Some seds have small command number limits, like on Digital OSF/1 and HP-UX.
309m4_define([_AC_SED_CMD_LIMIT],
310dnl One cannot portably go further than 99 commands because of HP-UX.
311[99])
194f742f 312
580e09f7
DE
313
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.
194f742f 321#
580e09f7 322# This code was written by Dan Manthey.
194f742f 323#
580e09f7
DE
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".
194f742f 326#
580e09f7
DE
327m4_define([_AC_OUTPUT_FILES_PREPARE],
328[#
329# Set up the sed scripts for CONFIG_FILES section.
330#
331dnl ... and define _AC_SED_CMDS, the pipeline which executes them.
332m4_define([_AC_SED_CMDS], [])dnl
194f742f 333
580e09f7
DE
334# No need to generate the scripts if there are no CONFIG_FILES.
335# This happens for instance when ./config.status config.h
336if test -n "$CONFIG_FILES"; then
194f742f 337
580e09f7 338_ACEOF
194f742f 339
580e09f7
DE
340m4_pushdef([_AC_SED_FRAG_NUM], 0)dnl Fragment number.
341m4_pushdef([_AC_SED_CMD_NUM], 2)dnl Num of commands in current frag so far.
342m4_pushdef([_AC_SED_DELIM_NUM], 0)dnl Expected number of delimiters in file.
343m4_pushdef([_AC_SED_FRAG], [])dnl The constant part of the current fragment.
344dnl
345m4_ifdef([_AC_SUBST_FILES],
346[# Create sed commands to just substitute file output variables.
347
348m4_foreach_w([_AC_Var], m4_defn([_AC_SUBST_FILES]),
349[dnl End fragments at beginning of loop so that last fragment is not ended.
350m4_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.
352dnl Increment fragment number.
353m4_define([_AC_SED_FRAG_NUM], m4_incr(_AC_SED_FRAG_NUM))dnl
354dnl Record that this fragment will need to be used.
355m4_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
358cat >"\$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
361[CEOF
194f742f 362
580e09f7
DE
363_ACEOF
364]m4_define([_AC_SED_CMD_NUM], 2)m4_define([_AC_SED_FRAG])dnl
365])dnl Last fragment ended.
366m4_define([_AC_SED_CMD_NUM], m4_eval(_AC_SED_CMD_NUM + 3))dnl
367m4_define([_AC_SED_FRAG],
368m4_defn([_AC_SED_FRAG])dnl
369[/^[ ]*@]_AC_Var[@[ ]*$/{
370r $]_AC_Var[
371d
372}
373])dnl
374])dnl
375# Remaining file output variables are in a fragment that also has non-file
376# output varibles.
194f742f 377
194f742f 378])
580e09f7
DE
379dnl
380m4_define([_AC_SED_FRAG], [
381]m4_defn([_AC_SED_FRAG]))dnl
382m4_foreach_w([_AC_Var],
383m4_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 `|#_!!_#|'.
387m4_define([_AC_SED_CMDS], m4_defn([_AC_SED_CMDS])[| sed 's/|#_!!_#|//g' ])],
388[
389ac_delim='%!_!# '
390for ac_last_try in false false false false false :; do
391 cat >conf$$subs.sed <<_ACEOF
392])])dnl
393m4_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
397m4_define([_AC_SED_DELIM_NUM], m4_incr(_AC_SED_DELIM_NUM))dnl
398_AC_Var!$_AC_Var$ac_delim
399])dnl
400m4_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),
402[_ACEOF
403
404dnl 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
406 break
407 elif $ac_last_try; then
408 AC_MSG_ERROR([could not make $CONFIG_STATUS])
409 else
410 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
411 fi
412done
194f742f 413
580e09f7
DE
414dnl Similarly, avoid grep here too.
415ac_eof=`sed -n '/^CEOF[[0-9]]*$/s/CEOF/0/p' conf$$subs.sed`
416if test -n "$ac_eof"; then
417 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
418 ac_eof=`expr $ac_eof + 1`
419fi
194f742f 420
580e09f7
DE
421dnl Increment fragment number.
422m4_define([_AC_SED_FRAG_NUM], m4_incr(_AC_SED_FRAG_NUM))dnl
423dnl Record that this fragment will need to be used.
424m4_define([_AC_SED_CMDS],
425m4_defn([_AC_SED_CMDS])[| sed -f "$tmp/subs-]_AC_SED_FRAG_NUM[.sed" ])dnl
426[cat >>$CONFIG_STATUS <<_ACEOF
427cat >"\$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
429[_ACEOF
430sed '
431s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
432s/^/s,@/; s/!/@,|#_!!_#|/
433:n
434t n
435s/'"$ac_delim"'$/,g/; t
436s/$/\\/; p
437N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
438' >>$CONFIG_STATUS <conf$$subs.sed
439rm -f conf$$subs.sed
440cat >>$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' ])],
444[[:end
445s/|#_!!_#|//g
446]])])dnl
447CEOF$ac_eof
448_ACEOF
449m4_define([_AC_SED_FRAG], [
450])m4_define([_AC_SED_DELIM_NUM], 0)m4_define([_AC_SED_CMD_NUM], 2)dnl
194f742f 451
580e09f7
DE
452])])dnl
453dnl
454m4_popdef([_AC_SED_FRAG_NUM])dnl
455m4_popdef([_AC_SED_CMD_NUM])dnl
456m4_popdef([_AC_SED_DELIM_NUM])dnl
457m4_popdef([_AC_SED_FRAG])dnl
194f742f 458
580e09f7
DE
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).
463if test "x$srcdir" = x.; then
464 ac_vpsub=['/^[ ]*VPATH[ ]*=/{
465s/:*\$(srcdir):*/:/
466s/:*\${srcdir}:*/:/
467s/:*@srcdir@:*/:/
468s/^\([^=]*=[ ]*\):*/\1/
469s/:*$//
470s/^[^=]*=[ ]*$//
471}']
472fi
194f742f 473
580e09f7
DE
474cat >>$CONFIG_STATUS <<\_ACEOF
475fi # test -n "$CONFIG_FILES"
194f742f 476
580e09f7 477])# _AC_OUTPUT_FILES_PREPARE
194f742f 478
580e09f7
DE
479
480# _AC_OUTPUT_FILE
481# ---------------
482# Do the variable substitutions to create the Makefiles or whatever.
194f742f 483#
580e09f7
DE
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".
194f742f 486#
580e09f7
DE
487m4_define([_AC_OUTPUT_FILE],
488[
489 #
490 # CONFIG_FILE
491 #
194f742f 492
580e09f7
DE
493AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
494[ case $INSTALL in
495 [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
496 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
194f742f
RD
497 esac
498])dnl
580e09f7
DE
499AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
500[ ac_MKDIR_P=$MKDIR_P
501 case $MKDIR_P in
502 [[\\/$]]* | ?:[[\\/]]* ) ;;
503 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
504 esac
505])dnl
506_ACEOF
507
508m4_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.
512ac_datarootdir_hack=; ac_datarootdir_seen=
513m4_define([_AC_datarootdir_vars],
514 [datadir, docdir, infodir, localedir, mandir])
515case `sed -n '/datarootdir/ {
516 p
517 q
518}
519m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
520 [/@_AC_Var@/p
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])
525_ACEOF
526cat >>$CONFIG_STATUS <<_ACEOF
527 ac_datarootdir_hack='
528 m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
529 [s&@_AC_Var@&$_AC_Var&g
530 ])dnl
531 s&\\\${datarootdir}&$datarootdir&g' ;;
532esac
194f742f 533_ACEOF
580e09f7
DE
534])dnl
535
536# Neutralize VPATH when `$srcdir' = `.'.
537# Shell code in configure.ac might set extrasub.
538# FIXME: do we really want to maintain this feature?
539cat >>$CONFIG_STATUS <<_ACEOF
540 sed "$ac_vpsub
541$extrasub
542_ACEOF
543cat >>$CONFIG_STATUS <<\_ACEOF
544:t
545[/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
546dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE.
547s&@configure_input@&$configure_input&;t t
548dnl During the transition period, this is a special case:
549s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir])
550m4_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)
554])dnl
555m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack
556])dnl
557" $ac_file_inputs m4_defn([_AC_SED_CMDS])>$tmp/out
558
559m4_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'
564which seems to be undefined. Please make sure it is defined.])
565])dnl
566
567 rm -f "$tmp/stdin"
568 case $ac_file in
569 -) cat "$tmp/out"; rm -f "$tmp/out";;
570 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
571 esac
572dnl This would break Makefile dependencies:
573dnl if diff $ac_file "$tmp/out" >/dev/null 2>&1; then
574dnl echo "$ac_file is unchanged"
575dnl else
576dnl rm -f $ac_file; mv "$tmp/out" $ac_file
577dnl fi
578])# _AC_OUTPUT_FILE
194f742f
RD
579
580
581
582
583## ----------------------- ##
584## Configuration headers. ##
585## ----------------------- ##
586
587
194f742f
RD
588# AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
589# ------------------------------------------------------
590# Specify that the HEADERS are to be created by instantiation of the
580e09f7 591# AC_DEFINEs.
194f742f 592#
580e09f7 593AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)])
194f742f
RD
594
595
596# AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
597# --------------------------------------
598# FIXME: Make it obsolete?
599AC_DEFUN([AC_CONFIG_HEADER],
600[AC_CONFIG_HEADERS([$1])])
601
602
580e09f7
DE
603# _AC_OUTPUT_HEADER
604# -----------------
194f742f
RD
605#
606# Output the code which instantiates the `config.h' files from their
607# `config.h.in'.
608#
580e09f7
DE
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".
194f742f 611#
580e09f7
DE
612m4_define([_AC_OUTPUT_HEADER],
613[
614 #
615 # CONFIG_HEADER
616 #
194f742f
RD
617_ACEOF
618
580e09f7
DE
619# Transform confdefs.h into a sed script `conftest.defines', that
620# substitutes the proper values into config.h.in to produce config.h.
621rm -f conftest.defines conftest.tail
622# First, append a space to every undef/define line, to ease matching.
623echo '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.
629dnl
630dnl 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.
636ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
637ac_dB='\\)[ (].*,\\1define\\2'
638ac_dC=' '
639ac_dD=' ,']
640dnl ac_dD used to contain `;t' at the end, but that was both slow and incorrect.
641dnl 1) Since the script must be broken into chunks containing 100 commands,
642dnl the extra command meant extra calls to sed.
643dnl 2) The code was incorrect: in the unusual case where a symbol has multiple
644dnl different AC_DEFINEs, the last one should be honored.
645dnl
646dnl ac_dB works because every line has a space appended. ac_dD reinserts
647dnl the space, because some symbol may have been AC_DEFINEd several times.
648dnl
649dnl The first use of ac_dA has a space prepended, so that the second
650dnl use does not match the initial 's' of $ac_dA.
651[
652uniq confdefs.h |
653 sed -n '
654 t rset
655 :rset
656 s/^[ ]*#[ ]*define[ ][ ]*//
657 t ok
658 d
659 :ok
660 s/[\\&,]/\\&/g
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
663 ' >>conftest.defines
664]
665# Remove the space that was appended to ease matching.
666# Then replace #undef with comments. This is necessary, for
194f742f
RD
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.
580e09f7
DE
669# (The regexp can be short, since the line contains either #define or #undef.)
670echo 's/ $//
671[s,^[ #]*u.*,/* & */,]' >>conftest.defines
672
673# Break up conftest.defines:
674dnl If we cared only about not exceeding line count limits, we would use this:
675dnl ac_max_sed_lines=m4_eval(_AC_SED_CMD_LIMIT - 3)
676dnl But in practice this can generate scripts that contain too many bytes;
677dnl and this can cause obscure 'sed' failures, e.g.,
678dnl http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00127.html
679dnl So instead, we use the following, which is about half the size we'd like:
680ac_max_sed_lines=50
681dnl In the future, let's use awk or sh instead of sed to do substitutions,
682dnl since we have so many problems with sed.
683
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"
687# et cetera.
688ac_in='$ac_file_inputs'
689ac_out='"$tmp/out1"'
690ac_nxt='"$tmp/out2"'
691
692while :
194f742f 693do
580e09f7
DE
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
701b
702:def
703_ACEOF]
704 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
194f742f 705 echo 'CEOF
580e09f7
DE
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
194f742f
RD
710 rm -f conftest.defines
711 mv conftest.tail conftest.defines
712done
580e09f7 713rm -f conftest.defines conftest.tail
194f742f
RD
714
715dnl Now back to your regularly scheduled config.status.
580e09f7 716echo "ac_result=$ac_in" >>$CONFIG_STATUS
194f742f 717cat >>$CONFIG_STATUS <<\_ACEOF
194f742f 718 if test x"$ac_file" != x-; then
580e09f7
DE
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
194f742f
RD
722 AC_MSG_NOTICE([$ac_file is unchanged])
723 else
194f742f 724 rm -f $ac_file
580e09f7 725 mv "$tmp/config.h" $ac_file
194f742f
RD
726 fi
727 else
580e09f7
DE
728 echo "/* $configure_input */"
729 cat "$ac_result"
194f742f 730 fi
580e09f7 731 rm -f "$tmp/out[12]"
194f742f
RD
732dnl If running for Automake, be ready to perform additional
733dnl commands to set up the timestamp files.
734m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK],
735 [_AC_AM_CONFIG_HEADER_HOOK([$ac_file])
736])dnl
580e09f7 737])# _AC_OUTPUT_HEADER
194f742f
RD
738
739
740
741## --------------------- ##
742## Configuration links. ##
743## --------------------- ##
744
745
194f742f
RD
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 .').
580e09f7
DE
752#
753AC_DEFUN([AC_CONFIG_LINKS], [_AC_CONFIG_FOOS([LINKS], $@)])
194f742f
RD
754
755
756# AC_LINK_FILES(SOURCE..., DEST...)
757# ---------------------------------
758# Link each of the existing files SOURCE... to the corresponding
759# link name in DEST...
760#
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.
768#
580e09f7 769# _AC_LINK_FILES_CNT is used to be robust to multiple calls.
194f742f
RD
770AU_DEFUN([AC_LINK_FILES],
771[m4_if($#, 2, ,
772 [m4_fatal([$0: incorrect number of arguments])])dnl
580e09f7 773m4_define_default([_AC_LINK_FILES_CNT], 0)dnl
194f742f
RD
774m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
775ac_sources="$1"
776ac_dests="$2"
777while 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"
781done
782AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
783],
580e09f7
DE
784[It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
785to AC_CONFIG_LINKS. `autoupdate' provides a functional but inelegant
786update, you should probably tune the result yourself.])# AC_LINK_FILES
194f742f
RD
787
788
580e09f7
DE
789# _AC_OUTPUT_LINK
790# ---------------
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".
793m4_define([_AC_OUTPUT_LINK],
794[
795 #
796 # CONFIG_LINK
797 #
194f742f 798
580e09f7 799 AC_MSG_NOTICE([linking $srcdir/$ac_source to $ac_file])
194f742f 800
580e09f7 801 if test ! -r "$srcdir/$ac_source"; then
194f742f
RD
802 AC_MSG_ERROR([$srcdir/$ac_source: file not found])
803 fi
580e09f7 804 rm -f "$ac_file"
194f742f 805
580e09f7 806 # Try a relative symlink, then a hard link, then a copy.
194f742f
RD
807 case $srcdir in
808 [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$srcdir/$ac_source ;;
580e09f7 809 *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;;
194f742f 810 esac
580e09f7
DE
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])
815])# _AC_OUTPUT_LINK
194f742f 816
194f742f
RD
817
818
580e09f7
DE
819## ------------------------ ##
820## Configuration commands. ##
821## ------------------------ ##
194f742f 822
194f742f 823
580e09f7
DE
824# AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
825# ---------------------------------------------------
826#
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.
830#
831AC_DEFUN([AC_CONFIG_COMMANDS], [_AC_CONFIG_FOOS([COMMANDS], $@)])
194f742f 832
194f742f 833
580e09f7
DE
834# AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
835# -----------------------------------------
194f742f 836#
580e09f7 837# Add additional commands for AC_OUTPUT to put into config.status.
194f742f 838#
580e09f7
DE
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.
843#
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).
848AU_DEFUN([AC_OUTPUT_COMMANDS],
849[m4_define_default([_AC_OUTPUT_COMMANDS_CNT], 0)dnl
850m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
851dnl Double quoted since that was the case in the original macro.
852AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
194f742f
RD
853])
854
194f742f 855
580e09f7
DE
856# _AC_OUTPUT_COMMAND
857# ------------------
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".
860m4_define([_AC_OUTPUT_COMMAND],
861[ AC_MSG_NOTICE([executing $ac_file commands])
862])
194f742f 863
194f742f 864
194f742f 865
580e09f7
DE
866## -------------------------------------- ##
867## Pre- and post-config.status commands. ##
868## -------------------------------------- ##
194f742f 869
194f742f 870
580e09f7
DE
871# AC_CONFIG_COMMANDS_PRE(CMDS)
872# ----------------------------
873# Commands to run right before config.status is created. Accumulates.
874AC_DEFUN([AC_CONFIG_COMMANDS_PRE],
875[m4_append([AC_OUTPUT_COMMANDS_PRE], [$1
876])])
194f742f 877
194f742f 878
580e09f7
DE
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.
884m4_define([AC_OUTPUT_COMMANDS_PRE],
885[_AC_LIBOBJS_NORMALIZE
886])
194f742f 887
194f742f 888
580e09f7
DE
889# AC_CONFIG_COMMANDS_POST(CMDS)
890# -----------------------------
891# Commands to run after config.status was created. Accumulates.
892AC_DEFUN([AC_CONFIG_COMMANDS_POST],
893[m4_append([AC_OUTPUT_COMMANDS_POST], [$1
894])])
194f742f 895
580e09f7
DE
896# Initialize.
897m4_define([AC_OUTPUT_COMMANDS_POST])
194f742f
RD
898
899
900
901## ----------------------- ##
902## Configuration subdirs. ##
903## ----------------------- ##
904
905
906# AC_CONFIG_SUBDIRS(DIR ...)
907# --------------------------
908# We define two variables:
580e09f7
DE
909# - _AC_LIST_SUBDIRS
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.
194f742f
RD
914# It makes no sense for arguments which are sh variables.
915# - subdirs
580e09f7 916# Shell variable built at runtime, so some of these dirs might not be
194f742f
RD
917# included, if for instance the user refused a part of the tree.
918# This is used in _AC_OUTPUT_SUBDIRS.
194f742f 919AC_DEFUN([AC_CONFIG_SUBDIRS],
580e09f7
DE
920[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
921m4_foreach_w([_AC_Sub], [$1],
922 [_AC_CONFIG_UNIQUE([SUBDIRS],
923 m4_bpatsubst(m4_defn([_AC_Sub]), [:.*]))])dnl
924m4_append([_AC_LIST_SUBDIRS], [$1], [
925])dnl
194f742f 926AS_LITERAL_IF([$1], [],
580e09f7
DE
927 [AC_DIAGNOSE([syntax], [$0: you should use literals])])dnl
928AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])dnl
194f742f
RD
929])
930
194f742f
RD
931
932# _AC_OUTPUT_SUBDIRS
933# ------------------
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.
936m4_define([_AC_OUTPUT_SUBDIRS],
937[
938#
939# CONFIG_SUBDIRS section.
940#
941if test "$no_recursion" != yes; then
942
943 # Remove --cache-file and --srcdir arguments so they do not pile up.
944 ac_sub_configure_args=
945 ac_prev=
580e09f7
DE
946 eval "set x $ac_configure_args"
947 shift
948 for ac_arg
949 do
194f742f
RD
950 if test -n "$ac_prev"; then
951 ac_prev=
952 continue
953 fi
954 case $ac_arg in
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=* \
960 | --c=*)
961 ;;
962 --config-cache | -C)
963 ;;
964 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
965 ac_prev=srcdir ;;
966 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
967 ;;
968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
969 ac_prev=prefix ;;
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
971 ;;
580e09f7
DE
972 *)
973 case $ac_arg in
974 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
975 esac
976 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
194f742f
RD
977 esac
978 done
979
980 # Always prepend --prefix to ensure using the same prefix
981 # in subdir configurations.
580e09f7
DE
982 ac_arg="--prefix=$prefix"
983 case $ac_arg in
984 *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
985 esac
986 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
987
988 # Pass --silent
989 if test "$silent" = yes; then
990 ac_sub_configure_args="--silent $ac_sub_configure_args"
991 fi
194f742f
RD
992
993 ac_popdir=`pwd`
994 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
995
996 # Do not complain, so a configure script can configure whichever
997 # parts of a large source tree are present.
580e09f7 998 test -d "$srcdir/$ac_dir" || continue
194f742f 999
580e09f7
DE
1000 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
1001 _AS_ECHO_LOG([$ac_msg])
1002 _AS_ECHO([$ac_msg])
194f742f 1003 AS_MKDIR_P(["$ac_dir"])
580e09f7 1004 _AC_SRCDIRS(["$ac_dir"])
194f742f 1005
580e09f7 1006 cd "$ac_dir"
194f742f
RD
1007
1008 # Check for guested configure; otherwise get Cygnus style configure.
580e09f7
DE
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
194f742f
RD
1016 else
1017 AC_MSG_WARN([no configuration information is in $ac_dir])
1018 ac_sub_configure=
1019 fi
1020
1021 # The recursion is here.
1022 if test -n "$ac_sub_configure"; then
1023 # Make the cache file name correct relative to the subdirectory.
1024 case $cache_file in
1025 [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
580e09f7
DE
1026 *) # Relative name.
1027 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
194f742f
RD
1028 esac
1029
580e09f7 1030 AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
194f742f 1031 # The eval makes quoting arguments work.
580e09f7
DE
1032 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
1033 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
194f742f
RD
1034 AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
1035 fi
1036
1037 cd "$ac_popdir"
1038 done
1039fi
1040])# _AC_OUTPUT_SUBDIRS
1041
1042
1043
1044
1045## -------------------------- ##
1046## Outputting config.status. ##
1047## -------------------------- ##
1048
1049
580e09f7
DE
1050# AU::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1051# -----------------------------------------------------------
194f742f
RD
1052#
1053# If there are arguments given to AC_OUTPUT, dispatch them to the
1054# proper modern macros.
1055AU_DEFUN([AC_OUTPUT],
1056[m4_ifvaln([$1],
1057 [AC_CONFIG_FILES([$1])])dnl
1058m4_ifvaln([$2$3],
580e09f7 1059 [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
194f742f
RD
1060[AC_OUTPUT]])
1061
1062
1063# AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
1064# -------------------------------------------------------
1065# The big finish.
1066# Produce config.status, config.h, and links; and configure subdirs.
580e09f7 1067#
194f742f
RD
1068m4_define([AC_OUTPUT],
1069[dnl Dispatch the extra arguments to their native macros.
580e09f7
DE
1070m4_ifvaln([$1],
1071 [AC_CONFIG_FILES([$1])])dnl
1072m4_ifvaln([$2$3],
1073 [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
194f742f
RD
1074m4_ifval([$1$2$3],
1075 [AC_DIAGNOSE([obsolete],
1076 [$0 should be used without arguments.
1077You should run autoupdate.])])dnl
1078AC_CACHE_SAVE
1079
1080test "x$prefix" = xNONE && prefix=$ac_default_prefix
1081# Let make expand exec_prefix.
1082test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1083
580e09f7 1084m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
194f742f
RD
1085
1086dnl Commands to run before creating config.status.
1087AC_OUTPUT_COMMANDS_PRE()dnl
1088
1089: ${CONFIG_STATUS=./config.status}
1090ac_clean_files_save=$ac_clean_files
1091ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1092_AC_OUTPUT_CONFIG_STATUS()dnl
1093ac_clean_files=$ac_clean_files_save
1094
1095dnl Commands to run after config.status was created
1096AC_OUTPUT_COMMANDS_POST()dnl
1097
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.
1106if test "$no_create" != yes; then
1107 ac_cs_success=:
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])
1117fi
1118dnl config.status should not do recursion.
1119AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
1120])# AC_OUTPUT
1121
1122
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...
1128m4_define([_AC_OUTPUT_CONFIG_STATUS],
1129[AC_MSG_NOTICE([creating $CONFIG_STATUS])
580e09f7
DE
1130dnl AS_MESSAGE_LOG_FD is not available yet:
1131m4_rename([AS_MESSAGE_LOG_FD], [_AC_save_AS_MESSAGE_LOG_FD])dnl
194f742f
RD
1132cat >$CONFIG_STATUS <<_ACEOF
1133#! $SHELL
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.
1138
1139debug=false
1140ac_cs_recheck=false
1141ac_cs_silent=false
1142SHELL=\${CONFIG_SHELL-$SHELL}
1143_ACEOF
1144
1145cat >>$CONFIG_STATUS <<\_ACEOF
1146AS_SHELL_SANITIZE
1147dnl Watch out, this is directly the initializations, do not use
1148dnl AS_PREPARE, otherwise you'd get it output in the initialization
1149dnl of configure, not config.status.
1150_AS_PREPARE
1151exec AS_MESSAGE_FD>&1
1152
580e09f7 1153# Save the log message, to keep $[0] and so on meaningful, and to
194f742f 1154# report actual input values of CONFIG_FILES etc. instead of their
580e09f7
DE
1155# values after options handling.
1156ac_log="
194f742f
RD
1157This 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
1159generated by m4_PACKAGE_STRING. Invocation command line was
1160
1161 CONFIG_FILES = $CONFIG_FILES
1162 CONFIG_HEADERS = $CONFIG_HEADERS
1163 CONFIG_LINKS = $CONFIG_LINKS
1164 CONFIG_COMMANDS = $CONFIG_COMMANDS
1165 $ $[0] $[@]
1166
580e09f7
DE
1167on `(hostname || uname -n) 2>/dev/null | sed 1q`
1168"
1169
194f742f
RD
1170_ACEOF
1171
580e09f7 1172cat >>$CONFIG_STATUS <<_ACEOF
194f742f 1173# Files that config.status was made for.
580e09f7
DE
1174m4_ifdef([_AC_SEEN_CONFIG(FILES)],
1175[config_files="$ac_config_files"
1176])dnl
1177m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
1178[config_headers="$ac_config_headers"
1179])dnl
1180m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
1181[config_links="$ac_config_links"
1182])dnl
1183m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
1184[config_commands="$ac_config_commands"
1185])dnl
194f742f 1186
580e09f7 1187_ACEOF
194f742f
RD
1188
1189cat >>$CONFIG_STATUS <<\_ACEOF
194f742f
RD
1190ac_cs_usage="\
1191\`$as_me' instantiates files from templates according to the
1192current configuration.
1193
1194Usage: $[0] [[OPTIONS]] [[FILE]]...
1195
1196 -h, --help print this help, then exit
580e09f7 1197 -V, --version print version number and configuration settings, then exit
194f742f
RD
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
580e09f7 1201m4_ifdef([_AC_SEEN_CONFIG(FILES)],
194f742f
RD
1202[[ --file=FILE[:TEMPLATE]
1203 instantiate the configuration file FILE
1204]])dnl
580e09f7 1205m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
194f742f
RD
1206[[ --header=FILE[:TEMPLATE]
1207 instantiate the configuration header FILE
1208]])dnl
1209
580e09f7 1210m4_ifdef([_AC_SEEN_CONFIG(FILES)],
194f742f
RD
1211[Configuration files:
1212$config_files
1213
1214])dnl
580e09f7 1215m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
194f742f
RD
1216[Configuration headers:
1217$config_headers
1218
1219])dnl
580e09f7 1220m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
194f742f
RD
1221[Configuration links:
1222$config_links
1223
1224])dnl
580e09f7 1225m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
194f742f
RD
1226[Configuration commands:
1227$config_commands
1228
1229])dnl
1230Report bugs to <bug-autoconf@gnu.org>."
194f742f 1231
580e09f7 1232_ACEOF
194f742f
RD
1233cat >>$CONFIG_STATUS <<_ACEOF
1234ac_cs_version="\\
1235m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
1236m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1237configured by $[0], generated by m4_PACKAGE_STRING,
580e09f7 1238 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\"
194f742f 1239
580e09f7 1240Copyright (C) 2006 Free Software Foundation, Inc.
194f742f
RD
1241This config.status script is free software; the Free Software Foundation
1242gives unlimited permission to copy, distribute and modify it."
580e09f7
DE
1243
1244ac_pwd='$ac_pwd'
1245srcdir='$srcdir'
194f742f 1246AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
580e09f7
DE
1247[INSTALL='$INSTALL'
1248])dnl
1249AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
1250[MKDIR_P='$MKDIR_P'
194f742f
RD
1251])dnl
1252_ACEOF
1253
1254cat >>$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.
1257ac_need_defaults=:
1258while test $[#] != 0
1259do
1260 case $[1] in
1261 --*=*)
580e09f7
DE
1262 ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='`
1263 ac_optarg=`expr "X$[1]" : 'X[[^=]]*=\(.*\)'`
194f742f
RD
1264 ac_shift=:
1265 ;;
580e09f7 1266 *)
194f742f
RD
1267 ac_option=$[1]
1268 ac_optarg=$[2]
1269 ac_shift=shift
1270 ;;
194f742f
RD
1271 esac
1272
1273 case $ac_option in
1274 # Handling of the options.
194f742f
RD
1275 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1276 ac_cs_recheck=: ;;
580e09f7
DE
1277 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
1278 echo "$ac_cs_version"; exit ;;
1279 --debug | --debu | --deb | --de | --d | -d )
194f742f 1280 debug=: ;;
580e09f7 1281m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl
194f742f
RD
1282 --file | --fil | --fi | --f )
1283 $ac_shift
1284 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
1285 ac_need_defaults=false;;
580e09f7
DE
1286])dnl
1287m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl
194f742f
RD
1288 --header | --heade | --head | --hea )
1289 $ac_shift
1290 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
1291 ac_need_defaults=false;;
580e09f7
DE
1292 --he | --h)
1293 # Conflict between --help and --header
1294 AC_MSG_ERROR([ambiguous option: $[1]
1295Try `$[0] --help' for more information.]);;
1296], [ --he | --h |])dnl
1297 --help | --hel | -h )
1298 echo "$ac_cs_usage"; exit ;;
194f742f
RD
1299 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1300 | -silent | --silent | --silen | --sile | --sil | --si | --s)
1301 ac_cs_silent=: ;;
1302
1303 # This is an error.
1304 -*) AC_MSG_ERROR([unrecognized option: $[1]
1305Try `$[0] --help' for more information.]) ;;
1306
580e09f7
DE
1307 *) ac_config_targets="$ac_config_targets $[1]"
1308 ac_need_defaults=false ;;
194f742f
RD
1309
1310 esac
1311 shift
1312done
1313
1314ac_configure_extra_args=
1315
1316if $ac_cs_silent; then
1317 exec AS_MESSAGE_FD>/dev/null
1318 ac_configure_extra_args="$ac_configure_extra_args --silent"
1319fi
1320
1321_ACEOF
1322cat >>$CONFIG_STATUS <<_ACEOF
580e09f7
DE
1323dnl Check this before opening the log, to avoid a bug on MinGW,
1324dnl which prohibits the recursive instance from truncating an open log.
194f742f 1325if \$ac_cs_recheck; then
580e09f7
DE
1326 echo "running CONFIG_SHELL=$SHELL $SHELL $[0] "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD
1327 CONFIG_SHELL=$SHELL
1328 export CONFIG_SHELL
1329 exec $SHELL "$[0]"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
194f742f
RD
1330fi
1331
1332_ACEOF
580e09f7
DE
1333cat >>$CONFIG_STATUS <<\_ACEOF
1334dnl Open the log:
1335m4_rename([_AC_save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl
1336exec AS_MESSAGE_LOG_FD>>config.log
1337{
1338 echo
1339 AS_BOX([Running $as_me.])
1340 echo "$ac_log"
1341} >&AS_MESSAGE_LOG_FD
194f742f 1342
580e09f7
DE
1343_ACEOF
1344cat >>$CONFIG_STATUS <<_ACEOF
1345m4_ifdef([_AC_OUTPUT_COMMANDS_INIT],
1346[#
1347# INIT-COMMANDS
194f742f 1348#
580e09f7
DE
1349_AC_OUTPUT_COMMANDS_INIT
1350])dnl
1351_ACEOF
194f742f 1352
194f742f 1353cat >>$CONFIG_STATUS <<\_ACEOF
580e09f7
DE
1354
1355# Handling of arguments.
194f742f
RD
1356for ac_config_target in $ac_config_targets
1357do
580e09f7
DE
1358 case $ac_config_target in
1359m4_ifdef([_AC_LIST_TAGS], [_AC_LIST_TAGS])
194f742f
RD
1360 *) AC_MSG_ERROR([invalid argument: $ac_config_target]);;
1361 esac
1362done
1363
580e09f7
DE
1364m4_ifdef([_AC_SEEN_CONFIG(ANY)], [_AC_OUTPUT_MAIN_LOOP])[]dnl
1365
1366AS_EXIT(0)
1367_ACEOF
1368chmod +x $CONFIG_STATUS
1369])# _AC_OUTPUT_CONFIG_STATUS
1370
1371# _AC_OUTPUT_MAIN_LOOP
1372# --------------------
1373# The main loop in $CONFIG_STATUS.
1374#
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".
1377#
1378AC_DEFUN([_AC_OUTPUT_MAIN_LOOP],
1379[
194f742f
RD
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.
1384if $ac_need_defaults; then
580e09f7 1385m4_ifdef([_AC_SEEN_CONFIG(FILES)],
194f742f
RD
1386[ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
1387])dnl
580e09f7 1388m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
194f742f
RD
1389[ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
1390])dnl
580e09f7 1391m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
194f742f
RD
1392[ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
1393])dnl
580e09f7 1394m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
194f742f
RD
1395[ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
1396])dnl
1397fi
1398
1399# Have a temporary directory for convenience. Make it in the build tree
580e09f7 1400# simply because there is no reason against having it here, and in addition,
194f742f 1401# creating and moving files from /tmp can sometimes cause problems.
580e09f7
DE
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'.
1405$debug ||
1406{
1407 tmp=
1408 trap 'exit_status=$?
1409 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
1410' 0
1411 trap 'AS_EXIT([1])' 1 2 13 15
1412}
1413dnl The comment above AS_TMPDIR says at most 4 chars are allowed.
1414AS_TMPDIR([conf], [.])
1415
1416m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl
1417
1418for ac_tag in[]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])
1423do
1424 case $ac_tag in
1425 :[[FHLC]]) ac_mode=$ac_tag; continue;;
1426 esac
1427 case $ac_mode$ac_tag in
1428 :[[FHL]]*:*);;
1429 :L* | :C*:*) AC_MSG_ERROR([Invalid tag $ac_tag.]);;
1430 :[[FH]]-) ac_tag=-:-;;
1431 :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;;
1432 esac
1433 ac_save_IFS=$IFS
1434 IFS=:
1435 set x $ac_tag
1436 IFS=$ac_save_IFS
1437 shift
1438 ac_file=$[1]
1439 shift
194f742f 1440
580e09f7
DE
1441 case $ac_mode in
1442 :L) ac_source=$[1];;
1443 :[[FH]])
1444 ac_file_inputs=
1445 for ac_f
1446 do
1447 case $ac_f in
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 `:'.
1452 test -f "$ac_f" ||
1453 case $ac_f in
1454 [[\\/$]]*) false;;
1455 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1456 esac ||
1457 AC_MSG_ERROR([cannot find input file: $ac_f]);;
1458 esac
1459 ac_file_inputs="$ac_file_inputs $ac_f"
1460 done
1461
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])
1470 fi
1471
1472 case $ac_tag in
1473 *:-:* | *:-) cat >"$tmp/stdin";;
1474 esac
1475 ;;
1476 esac
194f742f 1477
580e09f7
DE
1478 ac_dir=`AS_DIRNAME(["$ac_file"])`
1479 AS_MKDIR_P(["$ac_dir"])
1480 _AC_SRCDIRS(["$ac_dir"])
194f742f 1481
580e09f7
DE
1482 case $ac_mode in
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 ;;])
1487 esac
194f742f 1488
580e09f7
DE
1489dnl Some shells don't like empty case/esac
1490m4_ifdef([_AC_LIST_TAG_COMMANDS], [
1491 case $ac_file$ac_mode in
1492_AC_LIST_TAG_COMMANDS
1493 esac
1494])dnl
1495done # for ac_tag
1496
1497])# _AC_OUTPUT_MAIN_LOOP
194f742f
RD
1498
1499
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.
194f742f
RD
1505m4_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.
1509#
1510# If the first sed substitution is executed (which looks for macros that
580e09f7 1511# take arguments), then branch to the quote section. Otherwise,
194f742f 1512# look for a macro that doesn't take arguments.
580e09f7 1513ac_script='
194f742f 1514t clear
580e09f7
DE
1515:clear
1516s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
194f742f 1517t quote
580e09f7 1518s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
194f742f 1519t quote
580e09f7
DE
1520b any
1521:quote
1522s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
1523s/\[/\\&/g
1524s/\]/\\&/g
1525s/\$/$$/g
1526H
1527:any
1528${
1529 g
1530 s/^\n//
1531 s/\n/ /g
1532 p
1533}
1534'
1535DEFS=`sed -n "$ac_script" confdefs.h`
194f742f 1536]])# AC_OUTPUT_MAKE_DEFS