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