status.m4 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536
  1. # This file is part of Autoconf. -*- Autoconf -*-
  2. # Parameterizing and creating config.status.
  3. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
  4. # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  18. # 02110-1301, USA.
  19. # As a special exception, the Free Software Foundation gives unlimited
  20. # permission to copy, distribute and modify the configure scripts that
  21. # are the output of Autoconf. You need not follow the terms of the GNU
  22. # General Public License when using or distributing such scripts, even
  23. # though portions of the text of Autoconf appear in them. The GNU
  24. # General Public License (GPL) does govern all other use of the material
  25. # that constitutes the Autoconf program.
  26. #
  27. # Certain portions of the Autoconf source text are designed to be copied
  28. # (in certain cases, depending on the input) into the output of
  29. # Autoconf. We call these the "data" portions. The rest of the Autoconf
  30. # source text consists of comments plus executable code that decides which
  31. # of the data portions to output in any given case. We call these
  32. # comments and executable code the "non-data" portions. Autoconf never
  33. # copies any of the non-data portions into its output.
  34. #
  35. # This special exception to the GPL applies to versions of Autoconf
  36. # released by the Free Software Foundation. When you make and
  37. # distribute a modified version of Autoconf, you may extend this special
  38. # exception to the GPL to apply to your modified version as well, *unless*
  39. # your modified version has the potential to copy into its output some
  40. # of the text that was the non-data portion of the version that you started
  41. # with. (In other words, unless your change moves or copies text from
  42. # the non-data portions to the data portions.) If your modification has
  43. # such potential, you must delete any notice of this special exception
  44. # to the GPL from your modified version.
  45. #
  46. # Written by David MacKenzie, with help from
  47. # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
  48. # Roland McGrath, Noah Friedman, david d zuhn, and many others.
  49. # This file handles about all the preparation aspects for
  50. # `config.status': registering the configuration files, the headers,
  51. # the links, and the commands `config.status' will run. There is a
  52. # little mixture though of things actually handled by `configure',
  53. # such as running the `configure' in the sub directories. Minor
  54. # detail.
  55. #
  56. # There are two kinds of commands:
  57. #
  58. # COMMANDS:
  59. #
  60. # They are output into `config.status' via a quoted here doc. These
  61. # commands are always associated to a tag which the user can use to
  62. # tell `config.status' what are the commands she wants to run.
  63. #
  64. # INIT-CMDS:
  65. #
  66. # They are output via an *unquoted* here-doc. As a consequence $var
  67. # will be output as the value of VAR. This is typically used by
  68. # `configure' to give `config.status' some variables it needs to run
  69. # the COMMANDS. At the difference of COMMANDS, the INIT-CMDS are
  70. # always run.
  71. #
  72. #
  73. # Honorable members of this family are AC_CONFIG_FILES,
  74. # AC_CONFIG_HEADERS, AC_CONFIG_LINKS and AC_CONFIG_COMMANDS. Bad boys
  75. # are AC_LINK_FILES, AC_OUTPUT_COMMANDS and AC_OUTPUT when used with
  76. # arguments. False members are AC_CONFIG_SRCDIR, AC_CONFIG_SUBDIRS
  77. # and AC_CONFIG_AUX_DIR. Cousins are AC_CONFIG_COMMANDS_PRE and
  78. # AC_CONFIG_COMMANDS_POST.
  79. ## ------------------ ##
  80. ## Auxiliary macros. ##
  81. ## ------------------ ##
  82. # _AC_SRCDIRS(BUILD-DIR-NAME)
  83. # ---------------------------
  84. # Inputs:
  85. # - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src'
  86. # - `$srcdir' is `top-build -> top-src'
  87. #
  88. # Outputs:
  89. # - `ac_builddir' is `.', for symmetry only.
  90. # - `ac_top_builddir_sub' is `build -> top_build'.
  91. # This is used for @top_builddir@.
  92. # - `ac_top_build_prefix' is `build -> top_build'.
  93. # If not empty, has a trailing slash.
  94. # - `ac_srcdir' is `build -> src'.
  95. # - `ac_top_srcdir' is `build -> top-src'.
  96. # and `ac_abs_builddir' etc., the absolute directory names.
  97. m4_define([_AC_SRCDIRS],
  98. [ac_builddir=.
  99. case $1 in
  100. .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
  101. *)
  102. ac_dir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'`
  103. # A ".." for each directory in $ac_dir_suffix.
  104. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[[^\\/]]*,/..,g;s,/,,'`
  105. case $ac_top_builddir_sub in
  106. "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  107. *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  108. esac ;;
  109. esac
  110. ac_abs_top_builddir=$ac_pwd
  111. ac_abs_builddir=$ac_pwd$ac_dir_suffix
  112. # for backward compatibility:
  113. ac_top_builddir=$ac_top_build_prefix
  114. case $srcdir in
  115. .) # We are building in place.
  116. ac_srcdir=.
  117. ac_top_srcdir=$ac_top_builddir_sub
  118. ac_abs_top_srcdir=$ac_pwd ;;
  119. [[\\/]]* | ?:[[\\/]]* ) # Absolute name.
  120. ac_srcdir=$srcdir$ac_dir_suffix;
  121. ac_top_srcdir=$srcdir
  122. ac_abs_top_srcdir=$srcdir ;;
  123. *) # Relative name.
  124. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
  125. ac_top_srcdir=$ac_top_build_prefix$srcdir
  126. ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
  127. esac
  128. ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
  129. ])# _AC_SRCDIRS
  130. ## ---------------------- ##
  131. ## Registering the tags. ##
  132. ## ---------------------- ##
  133. # _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS])
  134. # -----------------------------------------
  135. #
  136. # Register INIT-COMMANDS as command pasted *unquoted* in
  137. # `config.status'. This is typically used to pass variables from
  138. # `configure' to `config.status'. Note that $[1] is not over quoted as
  139. # was the case in AC_OUTPUT_COMMANDS.
  140. m4_define([_AC_CONFIG_COMMANDS_INIT],
  141. [m4_ifval([$1],
  142. [m4_append([_AC_OUTPUT_COMMANDS_INIT],
  143. [$1
  144. ])])])
  145. # AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
  146. # -----------------------------------------------------
  147. # This macro does nothing, it's a hook to be read with `autoconf --trace'.
  148. #
  149. # It announces DEST depends upon the SOURCE1 etc.
  150. m4_define([AC_FILE_DEPENDENCY_TRACE], [])
  151. # _AC_FILE_DEPENDENCY_TRACE_COLON(DEST:SOURCE1[:SOURCE2...])
  152. # ----------------------------------------------------------
  153. # Declare that DEST depends upon SOURCE1 etc.
  154. #
  155. m4_define([_AC_FILE_DEPENDENCY_TRACE_COLON],
  156. [AC_FILE_DEPENDENCY_TRACE(m4_bpatsubst([$1], [:], [,]))dnl
  157. ])
  158. # _AC_CONFIG_DEPENDENCY(MODE, DEST[:SOURCE1...])
  159. # ---------------------------------------------
  160. # MODE is `FILES', `HEADERS', or `LINKS'.
  161. #
  162. # Be sure that a missing dependency is expressed as a dependency upon
  163. # `DEST.in' (except with config links).
  164. #
  165. m4_define([_AC_CONFIG_DEPENDENCY],
  166. [_AC_FILE_DEPENDENCY_TRACE_COLON([$2]_AC_CONFIG_DEPENDENCY_DEFAULT($@))dnl
  167. ])
  168. # _AC_CONFIG_DEPENDENCY_DEFAULT(MODE, DEST[:SOURCE1...])
  169. # ------------------------------------------------------
  170. # Expand to `:DEST.in' if appropriate, or to empty string otherwise.
  171. #
  172. # More detailed edscription:
  173. # If the tag contains `:', expand to nothing.
  174. # Otherwise, for a config file or header, add `:DEST.in'.
  175. # For config link, DEST.in is not appropriate:
  176. # - if the tag is literal, complain.
  177. # - otherwise, just expand to nothing and proceed with fingers crossed.
  178. # (We get to this case from the obsolete AC_LINK_FILES, for example.)
  179. #
  180. m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
  181. [m4_bmatch([$2], [:], [],
  182. [m4_if([$1], [LINKS],
  183. [AS_LITERAL_IF([$2], [AC_FATAL([Invalid AC_CONFIG_LINKS tag: `$2'])])],
  184. [:$2.in])])dnl
  185. ])
  186. # _AC_CONFIG_UNIQUE(MODE, DEST)
  187. # -----------------------------
  188. # MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'.
  189. #
  190. # Verify that there is no double definition of an output file.
  191. #
  192. m4_define([_AC_CONFIG_UNIQUE],
  193. [m4_ifdef([_AC_SEEN_TAG($2)],
  194. [AC_FATAL([`$2' is already registered with AC_CONFIG_]m4_defn([_AC_SEEN_TAG($2)]).)],
  195. [m4_define([_AC_SEEN_TAG($2)], [$1])])dnl
  196. ])
  197. # _AC_CONFIG_FOOS(MODE, TAGS..., [COMMANDS], [INIT-CMDS])
  198. # -------------------------------------------------------
  199. # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
  200. #
  201. # Associate the COMMANDS to each TAG, i.e., when config.status creates TAG,
  202. # run COMMANDS afterwards. (This is done in _AC_CONFIG_REGISTER_DEST.)
  203. #
  204. # For COMMANDS, do not m4_normalize TAGS before adding it to ac_config_commands.
  205. # This historical difference allows macro calls in TAGS.
  206. #
  207. m4_define([_AC_CONFIG_FOOS],
  208. [m4_foreach_w([AC_File], [$2],
  209. [_AC_CONFIG_REGISTER([$1], m4_defn([AC_File]), [$3])])dnl
  210. m4_define([_AC_SEEN_CONFIG(ANY)])dnl
  211. m4_define([_AC_SEEN_CONFIG($1)])dnl
  212. _AC_CONFIG_COMMANDS_INIT([$4])dnl
  213. ac_config_[]m4_tolower([$1])="$ac_config_[]m4_tolower([$1]) dnl
  214. m4_if([$1], [COMMANDS], [$2], [m4_normalize([$2])])"
  215. ])
  216. # _AC_CONFIG_REGISTER(MODE, TAG, [COMMANDS])
  217. # ------------------------------------------
  218. # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
  219. #
  220. m4_define([_AC_CONFIG_REGISTER],
  221. [m4_if([$1], [COMMANDS],
  222. [],
  223. [_AC_CONFIG_DEPENDENCY([$1], [$2])])dnl
  224. _AC_CONFIG_REGISTER_DEST([$1], [$2], m4_bpatsubst([[$2]], [:.*\(.\)$], [\1]), [$3])dnl
  225. ])
  226. # _AC_CONFIG_REGISTER_DEST(MODE, TAG, DEST, [COMMANDS])
  227. # -----------------------------------------------------
  228. # MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'.
  229. # TAG is in the form DEST[:SOURCE...].
  230. # Thus parameter $3 is the first part of $2.
  231. #
  232. # With CONFIG_LINKS, reject DEST=., because it is makes it hard for ./config.status
  233. # to guess the links to establish (`./config.status .').
  234. #
  235. # Save the name of the first config header to AH_HEADER.
  236. #
  237. m4_define([_AC_CONFIG_REGISTER_DEST],
  238. [_AC_CONFIG_UNIQUE([$1], [$3])dnl
  239. m4_if([$1 $3], [LINKS .],
  240. [AC_FATAL([invalid destination of a config link: `.'])])dnl
  241. m4_if([$1], [HEADERS],
  242. [m4_define_default([AH_HEADER], [$3])])dnl
  243. dnl
  244. dnl Recognize TAG as an argument to config.status:
  245. dnl
  246. m4_append([_AC_LIST_TAGS],
  247. [ "$3") CONFIG_$1="$CONFIG_$1 $2" ;;
  248. ])dnl
  249. dnl
  250. dnl Register the associated commands, if any:
  251. dnl
  252. m4_ifval([$4],
  253. [m4_append([_AC_LIST_TAG_COMMANDS],
  254. [ "$3":]m4_bpatsubst([$1], [^\(.\).*$], [\1])[) $4 ;;
  255. ])])dnl
  256. ])# _AC_CONFIG_REGISTER_DEST
  257. ## --------------------- ##
  258. ## Configuration files. ##
  259. ## --------------------- ##
  260. # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
  261. # -------------------------------------------------
  262. # Specify output files, i.e., files that are configured with AC_SUBST.
  263. #
  264. AC_DEFUN([AC_CONFIG_FILES], [_AC_CONFIG_FOOS([FILES], $@)])
  265. # _AC_SED_CMD_LIMIT
  266. # -----------------
  267. # Evaluate to an m4 number equal to the maximum number of commands to put
  268. # in any single sed program, not counting ":" commands.
  269. #
  270. # Some seds have small command number limits, like on Digital OSF/1 and HP-UX.
  271. m4_define([_AC_SED_CMD_LIMIT],
  272. dnl One cannot portably go further than 99 commands because of HP-UX.
  273. [99])
  274. # _AC_OUTPUT_FILES_PREPARE
  275. # ------------------------
  276. # Create the sed scripts needed for CONFIG_FILES.
  277. # Support multiline substitutions and make sure that the substitutions are
  278. # not evaluated recursively.
  279. # The intention is to have readable config.status and configure, even
  280. # though this m4 code might be scaring.
  281. #
  282. # This code was written by Dan Manthey.
  283. #
  284. # This macro is expanded inside a here document. If the here document is
  285. # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
  286. #
  287. m4_define([_AC_OUTPUT_FILES_PREPARE],
  288. [#
  289. # Set up the sed scripts for CONFIG_FILES section.
  290. #
  291. dnl ... and define _AC_SED_CMDS, the pipeline which executes them.
  292. m4_define([_AC_SED_CMDS], [])dnl
  293. # No need to generate the scripts if there are no CONFIG_FILES.
  294. # This happens for instance when ./config.status config.h
  295. if test -n "$CONFIG_FILES"; then
  296. _ACEOF
  297. m4_pushdef([_AC_SED_FRAG_NUM], 0)dnl Fragment number.
  298. m4_pushdef([_AC_SED_CMD_NUM], 2)dnl Num of commands in current frag so far.
  299. m4_pushdef([_AC_SED_DELIM_NUM], 0)dnl Expected number of delimiters in file.
  300. m4_pushdef([_AC_SED_FRAG], [])dnl The constant part of the current fragment.
  301. dnl
  302. m4_ifdef([_AC_SUBST_FILES],
  303. [# Create sed commands to just substitute file output variables.
  304. m4_foreach_w([_AC_Var], m4_defn([_AC_SUBST_FILES]),
  305. [dnl End fragments at beginning of loop so that last fragment is not ended.
  306. m4_if(m4_eval(_AC_SED_CMD_NUM + 3 > _AC_SED_CMD_LIMIT), 1,
  307. [dnl Fragment is full and not the last one, so no need for the final un-escape.
  308. dnl Increment fragment number.
  309. m4_define([_AC_SED_FRAG_NUM], m4_incr(_AC_SED_FRAG_NUM))dnl
  310. dnl Record that this fragment will need to be used.
  311. m4_define([_AC_SED_CMDS],
  312. m4_defn([_AC_SED_CMDS])[| sed -f "$tmp/subs-]_AC_SED_FRAG_NUM[.sed" ])dnl
  313. [cat >>$CONFIG_STATUS <<_ACEOF
  314. cat >"\$tmp/subs-]_AC_SED_FRAG_NUM[.sed" <<\CEOF
  315. /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
  316. ]m4_defn([_AC_SED_FRAG])dnl
  317. [CEOF
  318. _ACEOF
  319. ]m4_define([_AC_SED_CMD_NUM], 2)m4_define([_AC_SED_FRAG])dnl
  320. ])dnl Last fragment ended.
  321. m4_define([_AC_SED_CMD_NUM], m4_eval(_AC_SED_CMD_NUM + 3))dnl
  322. m4_define([_AC_SED_FRAG],
  323. m4_defn([_AC_SED_FRAG])dnl
  324. [/^[ ]*@]_AC_Var[@[ ]*$/{
  325. r $]_AC_Var[
  326. d
  327. }
  328. ])dnl
  329. ])dnl
  330. # Remaining file output variables are in a fragment that also has non-file
  331. # output varibles.
  332. ])
  333. dnl
  334. m4_define([_AC_SED_FRAG], [
  335. ]m4_defn([_AC_SED_FRAG]))dnl
  336. m4_foreach_w([_AC_Var],
  337. m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS]) ])[@END@],
  338. [m4_if(_AC_SED_DELIM_NUM, 0,
  339. [m4_if(_AC_Var, [@END@],
  340. [dnl The whole of the last fragment would be the final deletion of `|#_!!_#|'.
  341. m4_define([_AC_SED_CMDS], m4_defn([_AC_SED_CMDS])[| sed 's/|#_!!_#|//g' ])],
  342. [
  343. ac_delim='%!_!# '
  344. for ac_last_try in false false false false false :; do
  345. cat >conf$$subs.sed <<_ACEOF
  346. ])])dnl
  347. m4_if(_AC_Var, [@END@],
  348. [m4_if(m4_eval(_AC_SED_CMD_NUM + 2 <= _AC_SED_CMD_LIMIT), 1,
  349. [m4_define([_AC_SED_FRAG], [ end]m4_defn([_AC_SED_FRAG]))])],
  350. [m4_define([_AC_SED_CMD_NUM], m4_incr(_AC_SED_CMD_NUM))dnl
  351. m4_define([_AC_SED_DELIM_NUM], m4_incr(_AC_SED_DELIM_NUM))dnl
  352. _AC_Var!$_AC_Var$ac_delim
  353. ])dnl
  354. m4_if(_AC_SED_CMD_LIMIT,
  355. m4_if(_AC_Var, [@END@], m4_if(_AC_SED_CMD_NUM, 2, 2, _AC_SED_CMD_LIMIT), _AC_SED_CMD_NUM),
  356. [_ACEOF
  357. dnl Do not use grep on conf$$subs.sed, since AIX grep has a line length limit.
  358. if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = _AC_SED_DELIM_NUM; then
  359. break
  360. elif $ac_last_try; then
  361. AC_MSG_ERROR([could not make $CONFIG_STATUS])
  362. else
  363. ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  364. fi
  365. done
  366. dnl Similarly, avoid grep here too.
  367. ac_eof=`sed -n '/^CEOF[[0-9]]*$/s/CEOF/0/p' conf$$subs.sed`
  368. if test -n "$ac_eof"; then
  369. ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
  370. ac_eof=`expr $ac_eof + 1`
  371. fi
  372. dnl Increment fragment number.
  373. m4_define([_AC_SED_FRAG_NUM], m4_incr(_AC_SED_FRAG_NUM))dnl
  374. dnl Record that this fragment will need to be used.
  375. m4_define([_AC_SED_CMDS],
  376. m4_defn([_AC_SED_CMDS])[| sed -f "$tmp/subs-]_AC_SED_FRAG_NUM[.sed" ])dnl
  377. [cat >>$CONFIG_STATUS <<_ACEOF
  378. cat >"\$tmp/subs-]_AC_SED_FRAG_NUM[.sed" <<\CEOF$ac_eof
  379. /@[a-zA-Z_][a-zA-Z_0-9]*@/!b]m4_defn([_AC_SED_FRAG])dnl
  380. [_ACEOF
  381. sed '
  382. s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
  383. s/^/s,@/; s/!/@,|#_!!_#|/
  384. :n
  385. t n
  386. s/'"$ac_delim"'$/,g/; t
  387. s/$/\\/; p
  388. N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
  389. ' >>$CONFIG_STATUS <conf$$subs.sed
  390. rm -f conf$$subs.sed
  391. cat >>$CONFIG_STATUS <<_ACEOF
  392. ]m4_if(_AC_Var, [@END@],
  393. [m4_if(m4_eval(_AC_SED_CMD_NUM + 2 > _AC_SED_CMD_LIMIT), 1,
  394. [m4_define([_AC_SED_CMDS], m4_defn([_AC_SED_CMDS])[| sed 's/|#_!!_#|//g' ])],
  395. [[:end
  396. s/|#_!!_#|//g
  397. ]])])dnl
  398. CEOF$ac_eof
  399. _ACEOF
  400. m4_define([_AC_SED_FRAG], [
  401. ])m4_define([_AC_SED_DELIM_NUM], 0)m4_define([_AC_SED_CMD_NUM], 2)dnl
  402. ])])dnl
  403. dnl
  404. m4_popdef([_AC_SED_FRAG_NUM])dnl
  405. m4_popdef([_AC_SED_CMD_NUM])dnl
  406. m4_popdef([_AC_SED_DELIM_NUM])dnl
  407. m4_popdef([_AC_SED_FRAG])dnl
  408. # VPATH may cause trouble with some makes, so we remove $(srcdir),
  409. # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
  410. # trailing colons and then remove the whole line if VPATH becomes empty
  411. # (actually we leave an empty line to preserve line numbers).
  412. if test "x$srcdir" = x.; then
  413. ac_vpsub=['/^[ ]*VPATH[ ]*=/{
  414. s/:*\$(srcdir):*/:/
  415. s/:*\${srcdir}:*/:/
  416. s/:*@srcdir@:*/:/
  417. s/^\([^=]*=[ ]*\):*/\1/
  418. s/:*$//
  419. s/^[^=]*=[ ]*$//
  420. }']
  421. fi
  422. cat >>$CONFIG_STATUS <<\_ACEOF
  423. fi # test -n "$CONFIG_FILES"
  424. ])# _AC_OUTPUT_FILES_PREPARE
  425. # _AC_OUTPUT_FILE
  426. # ---------------
  427. # Do the variable substitutions to create the Makefiles or whatever.
  428. #
  429. # This macro is expanded inside a here document. If the here document is
  430. # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
  431. #
  432. m4_define([_AC_OUTPUT_FILE],
  433. [
  434. #
  435. # CONFIG_FILE
  436. #
  437. AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
  438. [ case $INSTALL in
  439. [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
  440. *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  441. esac
  442. ])dnl
  443. AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
  444. [ ac_MKDIR_P=$MKDIR_P
  445. case $MKDIR_P in
  446. [[\\/$]]* | ?:[[\\/]]* ) ;;
  447. */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
  448. esac
  449. ])dnl
  450. _ACEOF
  451. m4_ifndef([AC_DATAROOTDIR_CHECKED],
  452. [cat >>$CONFIG_STATUS <<\_ACEOF
  453. # If the template does not know about datarootdir, expand it.
  454. # FIXME: This hack should be removed a few years after 2.60.
  455. ac_datarootdir_hack=; ac_datarootdir_seen=
  456. m4_define([_AC_datarootdir_vars],
  457. [datadir, docdir, infodir, localedir, mandir])
  458. case `sed -n '/datarootdir/ {
  459. p
  460. q
  461. }
  462. m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
  463. [/@_AC_Var@/p
  464. ])' $ac_file_inputs` in
  465. *datarootdir*) ac_datarootdir_seen=yes;;
  466. *@[]m4_join([@*|*@], _AC_datarootdir_vars)@*)
  467. AC_MSG_WARN([$ac_file_inputs seems to ignore the --datarootdir setting])
  468. _ACEOF
  469. cat >>$CONFIG_STATUS <<_ACEOF
  470. ac_datarootdir_hack='
  471. m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]),
  472. [s&@_AC_Var@&$_AC_Var&g
  473. ])dnl
  474. s&\\\${datarootdir}&$datarootdir&g' ;;
  475. esac
  476. _ACEOF
  477. ])dnl
  478. # Neutralize VPATH when `$srcdir' = `.'.
  479. # Shell code in configure.ac might set extrasub.
  480. # FIXME: do we really want to maintain this feature?
  481. cat >>$CONFIG_STATUS <<_ACEOF
  482. sed "$ac_vpsub
  483. $extrasub
  484. _ACEOF
  485. cat >>$CONFIG_STATUS <<\_ACEOF
  486. :t
  487. [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
  488. dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE.
  489. s&@configure_input@&$configure_input&;t t
  490. dnl During the transition period, this is a special case:
  491. s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir])
  492. m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir,
  493. builddir, abs_builddir,
  494. abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [[, MKDIR_P]]),
  495. [s&@_AC_Var@&$ac_[]_AC_Var&;t t[]AC_SUBST_TRACE(_AC_Var)
  496. ])dnl
  497. m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack
  498. ])dnl
  499. " $ac_file_inputs m4_defn([_AC_SED_CMDS])>$tmp/out
  500. m4_ifndef([AC_DATAROOTDIR_CHECKED],
  501. [test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  502. { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
  503. { ac_out=`sed -n '/^[[ ]]*datarootdir[[ ]]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
  504. AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir'
  505. which seems to be undefined. Please make sure it is defined.])
  506. ])dnl
  507. rm -f "$tmp/stdin"
  508. case $ac_file in
  509. -) cat "$tmp/out"; rm -f "$tmp/out";;
  510. *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
  511. esac
  512. dnl This would break Makefile dependencies:
  513. dnl if diff $ac_file "$tmp/out" >/dev/null 2>&1; then
  514. dnl echo "$ac_file is unchanged"
  515. dnl else
  516. dnl rm -f $ac_file; mv "$tmp/out" $ac_file
  517. dnl fi
  518. ])# _AC_OUTPUT_FILE
  519. ## ----------------------- ##
  520. ## Configuration headers. ##
  521. ## ----------------------- ##
  522. # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
  523. # ------------------------------------------------------
  524. # Specify that the HEADERS are to be created by instantiation of the
  525. # AC_DEFINEs.
  526. #
  527. AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)])
  528. # AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
  529. # --------------------------------------
  530. # FIXME: Make it obsolete?
  531. AC_DEFUN([AC_CONFIG_HEADER],
  532. [AC_CONFIG_HEADERS([$1])])
  533. # _AC_OUTPUT_HEADER
  534. # -----------------
  535. #
  536. # Output the code which instantiates the `config.h' files from their
  537. # `config.h.in'.
  538. #
  539. # This macro is expanded inside a here document. If the here document is
  540. # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
  541. #
  542. m4_define([_AC_OUTPUT_HEADER],
  543. [
  544. #
  545. # CONFIG_HEADER
  546. #
  547. _ACEOF
  548. # Transform confdefs.h into a sed script `conftest.defines', that
  549. # substitutes the proper values into config.h.in to produce config.h.
  550. rm -f conftest.defines conftest.tail
  551. # First, append a space to every undef/define line, to ease matching.
  552. echo 's/$/ /' >conftest.defines
  553. # Then, protect against being on the right side of a sed subst, or in
  554. # an unquoted here document, in config.status. If some macros were
  555. # called several times there might be several #defines for the same
  556. # symbol, which is useless. But do not sort them, since the last
  557. # AC_DEFINE must be honored.
  558. dnl
  559. dnl Quote, for `[ ]' and `define'.
  560. [ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
  561. # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
  562. # NAME is the cpp macro being defined, VALUE is the value it is being given.
  563. # PARAMS is the parameter list in the macro definition--in most cases, it's
  564. # just an empty string.
  565. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
  566. ac_dB='\\)[ (].*,\\1define\\2'
  567. ac_dC=' '
  568. ac_dD=' ,']
  569. dnl ac_dD used to contain `;t' at the end, but that was both slow and incorrect.
  570. dnl 1) Since the script must be broken into chunks containing 100 commands,
  571. dnl the extra command meant extra calls to sed.
  572. dnl 2) The code was incorrect: in the unusual case where a symbol has multiple
  573. dnl different AC_DEFINEs, the last one should be honored.
  574. dnl
  575. dnl ac_dB works because every line has a space appended. ac_dD reinserts
  576. dnl the space, because some symbol may have been AC_DEFINEd several times.
  577. dnl
  578. dnl The first use of ac_dA has a space prepended, so that the second
  579. dnl use does not match the initial 's' of $ac_dA.
  580. [
  581. uniq confdefs.h |
  582. sed -n '
  583. t rset
  584. :rset
  585. s/^[ ]*#[ ]*define[ ][ ]*//
  586. t ok
  587. d
  588. :ok
  589. s/[\\&,]/\\&/g
  590. s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
  591. s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
  592. ' >>conftest.defines
  593. ]
  594. # Remove the space that was appended to ease matching.
  595. # Then replace #undef with comments. This is necessary, for
  596. # example, in the case of _POSIX_SOURCE, which is predefined and required
  597. # on some systems where configure will not decide to define it.
  598. # (The regexp can be short, since the line contains either #define or #undef.)
  599. echo 's/ $//
  600. [s,^[ #]*u.*,/* & */,]' >>conftest.defines
  601. # Break up conftest.defines:
  602. dnl If we cared only about not exceeding line count limits, we would use this:
  603. dnl ac_max_sed_lines=m4_eval(_AC_SED_CMD_LIMIT - 3)
  604. dnl But in practice this can generate scripts that contain too many bytes;
  605. dnl and this can cause obscure 'sed' failures, e.g.,
  606. dnl http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00127.html
  607. dnl So instead, we use the following, which is about half the size we'd like:
  608. ac_max_sed_lines=50
  609. dnl In the future, let's use awk or sh instead of sed to do substitutions,
  610. dnl since we have so many problems with sed.
  611. # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
  612. # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
  613. # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
  614. # et cetera.
  615. ac_in='$ac_file_inputs'
  616. ac_out='"$tmp/out1"'
  617. ac_nxt='"$tmp/out2"'
  618. while :
  619. do
  620. # Write a here document:
  621. dnl Quote, for the `[ ]' and `define'.
  622. [ cat >>$CONFIG_STATUS <<_ACEOF
  623. # First, check the format of the line:
  624. cat >"\$tmp/defines.sed" <<\\CEOF
  625. /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
  626. /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
  627. b
  628. :def
  629. _ACEOF]
  630. sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
  631. echo 'CEOF
  632. sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
  633. ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
  634. sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
  635. grep . conftest.tail >/dev/null || break
  636. rm -f conftest.defines
  637. mv conftest.tail conftest.defines
  638. done
  639. rm -f conftest.defines conftest.tail
  640. dnl Now back to your regularly scheduled config.status.
  641. echo "ac_result=$ac_in" >>$CONFIG_STATUS
  642. cat >>$CONFIG_STATUS <<\_ACEOF
  643. if test x"$ac_file" != x-; then
  644. echo "/* $configure_input */" >"$tmp/config.h"
  645. cat "$ac_result" >>"$tmp/config.h"
  646. if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
  647. AC_MSG_NOTICE([$ac_file is unchanged])
  648. else
  649. rm -f $ac_file
  650. mv "$tmp/config.h" $ac_file
  651. fi
  652. else
  653. echo "/* $configure_input */"
  654. cat "$ac_result"
  655. fi
  656. rm -f "$tmp/out[12]"
  657. dnl If running for Automake, be ready to perform additional
  658. dnl commands to set up the timestamp files.
  659. m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK],
  660. [_AC_AM_CONFIG_HEADER_HOOK([$ac_file])
  661. ])dnl
  662. ])# _AC_OUTPUT_HEADER
  663. ## --------------------- ##
  664. ## Configuration links. ##
  665. ## --------------------- ##
  666. # AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS])
  667. # --------------------------------------------------------
  668. # Specify that config.status should establish a (symbolic if possible)
  669. # link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
  670. # Reject DEST=., because it is makes it hard for ./config.status
  671. # to guess the links to establish (`./config.status .').
  672. #
  673. AC_DEFUN([AC_CONFIG_LINKS], [_AC_CONFIG_FOOS([LINKS], $@)])
  674. # AC_LINK_FILES(SOURCE..., DEST...)
  675. # ---------------------------------
  676. # Link each of the existing files SOURCE... to the corresponding
  677. # link name in DEST...
  678. #
  679. # Unfortunately we can't provide a very good autoupdate service here,
  680. # since in `AC_LINK_FILES($from, $to)' it is possible that `$from'
  681. # and `$to' are actually lists. It would then be completely wrong to
  682. # replace it with `AC_CONFIG_LINKS($to:$from). It is possible in the
  683. # case of literal values though, but because I don't think there is any
  684. # interest in creating config links with literal values, no special
  685. # mechanism is implemented to handle them.
  686. #
  687. # _AC_LINK_FILES_CNT is used to be robust to multiple calls.
  688. AU_DEFUN([AC_LINK_FILES],
  689. [m4_if($#, 2, ,
  690. [m4_fatal([$0: incorrect number of arguments])])dnl
  691. m4_define_default([_AC_LINK_FILES_CNT], 0)dnl
  692. m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
  693. ac_sources="$1"
  694. ac_dests="$2"
  695. while test -n "$ac_sources"; do
  696. set $ac_dests; ac_dest=$[1]; shift; ac_dests=$[*]
  697. set $ac_sources; ac_source=$[1]; shift; ac_sources=$[*]
  698. [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
  699. done
  700. AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
  701. ],
  702. [It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
  703. to AC_CONFIG_LINKS. `autoupdate' provides a functional but inelegant
  704. update, you should probably tune the result yourself.])# AC_LINK_FILES
  705. # _AC_OUTPUT_LINK
  706. # ---------------
  707. # This macro is expanded inside a here document. If the here document is
  708. # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
  709. m4_define([_AC_OUTPUT_LINK],
  710. [
  711. #
  712. # CONFIG_LINK
  713. #
  714. AC_MSG_NOTICE([linking $srcdir/$ac_source to $ac_file])
  715. if test ! -r "$srcdir/$ac_source"; then
  716. AC_MSG_ERROR([$srcdir/$ac_source: file not found])
  717. fi
  718. rm -f "$ac_file"
  719. # Try a relative symlink, then a hard link, then a copy.
  720. case $srcdir in
  721. [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$srcdir/$ac_source ;;
  722. *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;;
  723. esac
  724. ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
  725. ln "$srcdir/$ac_source" "$ac_file" 2>/dev/null ||
  726. cp -p "$srcdir/$ac_source" "$ac_file" ||
  727. AC_MSG_ERROR([cannot link or copy $srcdir/$ac_source to $ac_file])
  728. ])# _AC_OUTPUT_LINK
  729. ## ------------------------ ##
  730. ## Configuration commands. ##
  731. ## ------------------------ ##
  732. # AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
  733. # ---------------------------------------------------
  734. #
  735. # Specify additional commands to be run by config.status. This
  736. # commands must be associated with a NAME, which should be thought
  737. # as the name of a file the COMMANDS create.
  738. #
  739. AC_DEFUN([AC_CONFIG_COMMANDS], [_AC_CONFIG_FOOS([COMMANDS], $@)])
  740. # AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
  741. # -----------------------------------------
  742. #
  743. # Add additional commands for AC_OUTPUT to put into config.status.
  744. #
  745. # This macro is an obsolete version of AC_CONFIG_COMMANDS. The only
  746. # difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is
  747. # to give a unique key. The scheme we have chosen is `default-1',
  748. # `default-2' etc. for each call.
  749. #
  750. # Unfortunately this scheme is fragile: bad things might happen
  751. # if you update an included file and configure.ac: you might have
  752. # clashes :( On the other hand, I'd like to avoid weird keys (e.g.,
  753. # depending upon __file__ or the pid).
  754. AU_DEFUN([AC_OUTPUT_COMMANDS],
  755. [m4_define_default([_AC_OUTPUT_COMMANDS_CNT], 0)dnl
  756. m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
  757. dnl Double quoted since that was the case in the original macro.
  758. AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
  759. ])
  760. # _AC_OUTPUT_COMMAND
  761. # ------------------
  762. # This macro is expanded inside a here document. If the here document is
  763. # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
  764. m4_define([_AC_OUTPUT_COMMAND],
  765. [ AC_MSG_NOTICE([executing $ac_file commands])
  766. ])
  767. ## -------------------------------------- ##
  768. ## Pre- and post-config.status commands. ##
  769. ## -------------------------------------- ##
  770. # AC_CONFIG_COMMANDS_PRE(CMDS)
  771. # ----------------------------
  772. # Commands to run right before config.status is created. Accumulates.
  773. AC_DEFUN([AC_CONFIG_COMMANDS_PRE],
  774. [m4_append([AC_OUTPUT_COMMANDS_PRE], [$1
  775. ])])
  776. # AC_OUTPUT_COMMANDS_PRE
  777. # ----------------------
  778. # A *variable* in which we append all the actions that must be
  779. # performed before *creating* config.status. For a start, clean
  780. # up all the LIBOBJ mess.
  781. m4_define([AC_OUTPUT_COMMANDS_PRE],
  782. [_AC_LIBOBJS_NORMALIZE
  783. ])
  784. # AC_CONFIG_COMMANDS_POST(CMDS)
  785. # -----------------------------
  786. # Commands to run after config.status was created. Accumulates.
  787. AC_DEFUN([AC_CONFIG_COMMANDS_POST],
  788. [m4_append([AC_OUTPUT_COMMANDS_POST], [$1
  789. ])])
  790. # Initialize.
  791. m4_define([AC_OUTPUT_COMMANDS_POST])
  792. ## ----------------------- ##
  793. ## Configuration subdirs. ##
  794. ## ----------------------- ##
  795. # AC_CONFIG_SUBDIRS(DIR ...)
  796. # --------------------------
  797. # We define two variables:
  798. # - _AC_LIST_SUBDIRS
  799. # A statically built list, should contain *all* the arguments of
  800. # AC_CONFIG_SUBDIRS. The final value is assigned to ac_subdirs_all in
  801. # the `default' section, and used for --help=recursive.
  802. # It is also used in _AC_CONFIG_UNIQUE.
  803. # It makes no sense for arguments which are sh variables.
  804. # - subdirs
  805. # Shell variable built at runtime, so some of these dirs might not be
  806. # included, if for instance the user refused a part of the tree.
  807. # This is used in _AC_OUTPUT_SUBDIRS.
  808. AC_DEFUN([AC_CONFIG_SUBDIRS],
  809. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  810. m4_foreach_w([_AC_Sub], [$1],
  811. [_AC_CONFIG_UNIQUE([SUBDIRS],
  812. m4_bpatsubst(m4_defn([_AC_Sub]), [:.*]))])dnl
  813. m4_append([_AC_LIST_SUBDIRS], [$1], [
  814. ])dnl
  815. AS_LITERAL_IF([$1], [],
  816. [AC_DIAGNOSE([syntax], [$0: you should use literals])])dnl
  817. AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])dnl
  818. ])
  819. # _AC_OUTPUT_SUBDIRS
  820. # ------------------
  821. # This is a subroutine of AC_OUTPUT, but it does not go into
  822. # config.status, rather, it is called after running config.status.
  823. m4_define([_AC_OUTPUT_SUBDIRS],
  824. [
  825. #
  826. # CONFIG_SUBDIRS section.
  827. #
  828. if test "$no_recursion" != yes; then
  829. # Remove --cache-file and --srcdir arguments so they do not pile up.
  830. ac_sub_configure_args=
  831. ac_prev=
  832. eval "set x $ac_configure_args"
  833. shift
  834. for ac_arg
  835. do
  836. if test -n "$ac_prev"; then
  837. ac_prev=
  838. continue
  839. fi
  840. case $ac_arg in
  841. -cache-file | --cache-file | --cache-fil | --cache-fi \
  842. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  843. ac_prev=cache_file ;;
  844. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  845. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
  846. | --c=*)
  847. ;;
  848. --config-cache | -C)
  849. ;;
  850. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  851. ac_prev=srcdir ;;
  852. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  853. ;;
  854. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  855. ac_prev=prefix ;;
  856. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  857. ;;
  858. *)
  859. case $ac_arg in
  860. *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  861. esac
  862. ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
  863. esac
  864. done
  865. # Always prepend --prefix to ensure using the same prefix
  866. # in subdir configurations.
  867. ac_arg="--prefix=$prefix"
  868. case $ac_arg in
  869. *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  870. esac
  871. ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
  872. # Pass --silent
  873. if test "$silent" = yes; then
  874. ac_sub_configure_args="--silent $ac_sub_configure_args"
  875. fi
  876. ac_popdir=`pwd`
  877. for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
  878. # Do not complain, so a configure script can configure whichever
  879. # parts of a large source tree are present.
  880. test -d "$srcdir/$ac_dir" || continue
  881. ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
  882. _AS_ECHO_LOG([$ac_msg])
  883. _AS_ECHO([$ac_msg])
  884. AS_MKDIR_P(["$ac_dir"])
  885. _AC_SRCDIRS(["$ac_dir"])
  886. cd "$ac_dir"
  887. # Check for guested configure; otherwise get Cygnus style configure.
  888. if test -f "$ac_srcdir/configure.gnu"; then
  889. ac_sub_configure=$ac_srcdir/configure.gnu
  890. elif test -f "$ac_srcdir/configure"; then
  891. ac_sub_configure=$ac_srcdir/configure
  892. elif test -f "$ac_srcdir/configure.in"; then
  893. # This should be Cygnus configure.
  894. ac_sub_configure=$ac_aux_dir/configure
  895. else
  896. AC_MSG_WARN([no configuration information is in $ac_dir])
  897. ac_sub_configure=
  898. fi
  899. # The recursion is here.
  900. if test -n "$ac_sub_configure"; then
  901. # Make the cache file name correct relative to the subdirectory.
  902. case $cache_file in
  903. [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
  904. *) # Relative name.
  905. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
  906. esac
  907. AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
  908. # The eval makes quoting arguments work.
  909. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
  910. --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
  911. AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
  912. fi
  913. cd "$ac_popdir"
  914. done
  915. fi
  916. ])# _AC_OUTPUT_SUBDIRS
  917. ## -------------------------- ##
  918. ## Outputting config.status. ##
  919. ## -------------------------- ##
  920. # AU::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
  921. # -----------------------------------------------------------
  922. #
  923. # If there are arguments given to AC_OUTPUT, dispatch them to the
  924. # proper modern macros.
  925. AU_DEFUN([AC_OUTPUT],
  926. [m4_ifvaln([$1],
  927. [AC_CONFIG_FILES([$1])])dnl
  928. m4_ifvaln([$2$3],
  929. [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
  930. [AC_OUTPUT]])
  931. # AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
  932. # -------------------------------------------------------
  933. # The big finish.
  934. # Produce config.status, config.h, and links; and configure subdirs.
  935. #
  936. m4_define([AC_OUTPUT],
  937. [dnl Dispatch the extra arguments to their native macros.
  938. m4_ifvaln([$1],
  939. [AC_CONFIG_FILES([$1])])dnl
  940. m4_ifvaln([$2$3],
  941. [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
  942. m4_ifval([$1$2$3],
  943. [AC_DIAGNOSE([obsolete],
  944. [$0 should be used without arguments.
  945. You should run autoupdate.])])dnl
  946. AC_CACHE_SAVE
  947. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  948. # Let make expand exec_prefix.
  949. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  950. m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
  951. dnl Commands to run before creating config.status.
  952. AC_OUTPUT_COMMANDS_PRE()dnl
  953. : ${CONFIG_STATUS=./config.status}
  954. ac_clean_files_save=$ac_clean_files
  955. ac_clean_files="$ac_clean_files $CONFIG_STATUS"
  956. _AC_OUTPUT_CONFIG_STATUS()dnl
  957. ac_clean_files=$ac_clean_files_save
  958. dnl Commands to run after config.status was created
  959. AC_OUTPUT_COMMANDS_POST()dnl
  960. # configure is writing to config.log, and then calls config.status.
  961. # config.status does its own redirection, appending to config.log.
  962. # Unfortunately, on DOS this fails, as config.log is still kept open
  963. # by configure, so config.status won't be able to write to it; its
  964. # output is simply discarded. So we exec the FD to /dev/null,
  965. # effectively closing config.log, so it can be properly (re)opened and
  966. # appended to by config.status. When coming back to configure, we
  967. # need to make the FD available again.
  968. if test "$no_create" != yes; then
  969. ac_cs_success=:
  970. ac_config_status_args=
  971. test "$silent" = yes &&
  972. ac_config_status_args="$ac_config_status_args --quiet"
  973. exec AS_MESSAGE_LOG_FD>/dev/null
  974. $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  975. exec AS_MESSAGE_LOG_FD>>config.log
  976. # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  977. # would make configure fail if this is the last instruction.
  978. $ac_cs_success || AS_EXIT([1])
  979. fi
  980. dnl config.status should not do recursion.
  981. AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
  982. ])# AC_OUTPUT
  983. # _AC_OUTPUT_CONFIG_STATUS
  984. # ------------------------
  985. # Produce config.status. Called by AC_OUTPUT.
  986. # Pay special attention not to have too long here docs: some old
  987. # shells die. Unfortunately the limit is not known precisely...
  988. m4_define([_AC_OUTPUT_CONFIG_STATUS],
  989. [AC_MSG_NOTICE([creating $CONFIG_STATUS])
  990. dnl AS_MESSAGE_LOG_FD is not available yet:
  991. m4_rename([AS_MESSAGE_LOG_FD], [_AC_save_AS_MESSAGE_LOG_FD])dnl
  992. cat >$CONFIG_STATUS <<_ACEOF
  993. #! $SHELL
  994. # Generated by $as_me.
  995. # Run this file to recreate the current configuration.
  996. # Compiler output produced by configure, useful for debugging
  997. # configure, is in config.log if it exists.
  998. debug=false
  999. ac_cs_recheck=false
  1000. ac_cs_silent=false
  1001. SHELL=\${CONFIG_SHELL-$SHELL}
  1002. _ACEOF
  1003. cat >>$CONFIG_STATUS <<\_ACEOF
  1004. AS_SHELL_SANITIZE
  1005. dnl Watch out, this is directly the initializations, do not use
  1006. dnl AS_PREPARE, otherwise you'd get it output in the initialization
  1007. dnl of configure, not config.status.
  1008. _AS_PREPARE
  1009. exec AS_MESSAGE_FD>&1
  1010. # Save the log message, to keep $[0] and so on meaningful, and to
  1011. # report actual input values of CONFIG_FILES etc. instead of their
  1012. # values after options handling.
  1013. ac_log="
  1014. This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
  1015. $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
  1016. generated by m4_PACKAGE_STRING. Invocation command line was
  1017. CONFIG_FILES = $CONFIG_FILES
  1018. CONFIG_HEADERS = $CONFIG_HEADERS
  1019. CONFIG_LINKS = $CONFIG_LINKS
  1020. CONFIG_COMMANDS = $CONFIG_COMMANDS
  1021. $ $[0] $[@]
  1022. on `(hostname || uname -n) 2>/dev/null | sed 1q`
  1023. "
  1024. _ACEOF
  1025. cat >>$CONFIG_STATUS <<_ACEOF
  1026. # Files that config.status was made for.
  1027. m4_ifdef([_AC_SEEN_CONFIG(FILES)],
  1028. [config_files="$ac_config_files"
  1029. ])dnl
  1030. m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
  1031. [config_headers="$ac_config_headers"
  1032. ])dnl
  1033. m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
  1034. [config_links="$ac_config_links"
  1035. ])dnl
  1036. m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
  1037. [config_commands="$ac_config_commands"
  1038. ])dnl
  1039. _ACEOF
  1040. cat >>$CONFIG_STATUS <<\_ACEOF
  1041. ac_cs_usage="\
  1042. \`$as_me' instantiates files from templates according to the
  1043. current configuration.
  1044. Usage: $[0] [[OPTIONS]] [[FILE]]...
  1045. -h, --help print this help, then exit
  1046. -V, --version print version number and configuration settings, then exit
  1047. -q, --quiet do not print progress messages
  1048. -d, --debug don't remove temporary files
  1049. --recheck update $as_me by reconfiguring in the same conditions
  1050. m4_ifdef([_AC_SEEN_CONFIG(FILES)],
  1051. [[ --file=FILE[:TEMPLATE]
  1052. instantiate the configuration file FILE
  1053. ]])dnl
  1054. m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
  1055. [[ --header=FILE[:TEMPLATE]
  1056. instantiate the configuration header FILE
  1057. ]])dnl
  1058. m4_ifdef([_AC_SEEN_CONFIG(FILES)],
  1059. [Configuration files:
  1060. $config_files
  1061. ])dnl
  1062. m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
  1063. [Configuration headers:
  1064. $config_headers
  1065. ])dnl
  1066. m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
  1067. [Configuration links:
  1068. $config_links
  1069. ])dnl
  1070. m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
  1071. [Configuration commands:
  1072. $config_commands
  1073. ])dnl
  1074. Report bugs to <bug-autoconf@gnu.org>."
  1075. _ACEOF
  1076. cat >>$CONFIG_STATUS <<_ACEOF
  1077. ac_cs_version="\\
  1078. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
  1079. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  1080. configured by $[0], generated by m4_PACKAGE_STRING,
  1081. with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\"
  1082. Copyright (C) 2006 Free Software Foundation, Inc.
  1083. This config.status script is free software; the Free Software Foundation
  1084. gives unlimited permission to copy, distribute and modify it."
  1085. ac_pwd='$ac_pwd'
  1086. srcdir='$srcdir'
  1087. AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
  1088. [INSTALL='$INSTALL'
  1089. ])dnl
  1090. AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P],
  1091. [MKDIR_P='$MKDIR_P'
  1092. ])dnl
  1093. _ACEOF
  1094. cat >>$CONFIG_STATUS <<\_ACEOF
  1095. # If no file are specified by the user, then we need to provide default
  1096. # value. By we need to know if files were specified by the user.
  1097. ac_need_defaults=:
  1098. while test $[#] != 0
  1099. do
  1100. case $[1] in
  1101. --*=*)
  1102. ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='`
  1103. ac_optarg=`expr "X$[1]" : 'X[[^=]]*=\(.*\)'`
  1104. ac_shift=:
  1105. ;;
  1106. *)
  1107. ac_option=$[1]
  1108. ac_optarg=$[2]
  1109. ac_shift=shift
  1110. ;;
  1111. esac
  1112. case $ac_option in
  1113. # Handling of the options.
  1114. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1115. ac_cs_recheck=: ;;
  1116. --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
  1117. echo "$ac_cs_version"; exit ;;
  1118. --debug | --debu | --deb | --de | --d | -d )
  1119. debug=: ;;
  1120. m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl
  1121. --file | --fil | --fi | --f )
  1122. $ac_shift
  1123. CONFIG_FILES="$CONFIG_FILES $ac_optarg"
  1124. ac_need_defaults=false;;
  1125. ])dnl
  1126. m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl
  1127. --header | --heade | --head | --hea )
  1128. $ac_shift
  1129. CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
  1130. ac_need_defaults=false;;
  1131. --he | --h)
  1132. # Conflict between --help and --header
  1133. AC_MSG_ERROR([ambiguous option: $[1]
  1134. Try `$[0] --help' for more information.]);;
  1135. ], [ --he | --h |])dnl
  1136. --help | --hel | -h )
  1137. echo "$ac_cs_usage"; exit ;;
  1138. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  1139. | -silent | --silent | --silen | --sile | --sil | --si | --s)
  1140. ac_cs_silent=: ;;
  1141. # This is an error.
  1142. -*) AC_MSG_ERROR([unrecognized option: $[1]
  1143. Try `$[0] --help' for more information.]) ;;
  1144. *) ac_config_targets="$ac_config_targets $[1]"
  1145. ac_need_defaults=false ;;
  1146. esac
  1147. shift
  1148. done
  1149. ac_configure_extra_args=
  1150. if $ac_cs_silent; then
  1151. exec AS_MESSAGE_FD>/dev/null
  1152. ac_configure_extra_args="$ac_configure_extra_args --silent"
  1153. fi
  1154. _ACEOF
  1155. cat >>$CONFIG_STATUS <<_ACEOF
  1156. dnl Check this before opening the log, to avoid a bug on MinGW,
  1157. dnl which prohibits the recursive instance from truncating an open log.
  1158. if \$ac_cs_recheck; then
  1159. echo "running CONFIG_SHELL=$SHELL $SHELL $[0] "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD
  1160. CONFIG_SHELL=$SHELL
  1161. export CONFIG_SHELL
  1162. exec $SHELL "$[0]"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  1163. fi
  1164. _ACEOF
  1165. cat >>$CONFIG_STATUS <<\_ACEOF
  1166. dnl Open the log:
  1167. m4_rename([_AC_save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl
  1168. exec AS_MESSAGE_LOG_FD>>config.log
  1169. {
  1170. echo
  1171. AS_BOX([Running $as_me.])
  1172. echo "$ac_log"
  1173. } >&AS_MESSAGE_LOG_FD
  1174. _ACEOF
  1175. cat >>$CONFIG_STATUS <<_ACEOF
  1176. m4_ifdef([_AC_OUTPUT_COMMANDS_INIT],
  1177. [#
  1178. # INIT-COMMANDS
  1179. #
  1180. _AC_OUTPUT_COMMANDS_INIT
  1181. ])dnl
  1182. _ACEOF
  1183. cat >>$CONFIG_STATUS <<\_ACEOF
  1184. # Handling of arguments.
  1185. for ac_config_target in $ac_config_targets
  1186. do
  1187. case $ac_config_target in
  1188. m4_ifdef([_AC_LIST_TAGS], [_AC_LIST_TAGS])
  1189. *) AC_MSG_ERROR([invalid argument: $ac_config_target]);;
  1190. esac
  1191. done
  1192. m4_ifdef([_AC_SEEN_CONFIG(ANY)], [_AC_OUTPUT_MAIN_LOOP])[]dnl
  1193. AS_EXIT(0)
  1194. _ACEOF
  1195. chmod +x $CONFIG_STATUS
  1196. ])# _AC_OUTPUT_CONFIG_STATUS
  1197. # _AC_OUTPUT_MAIN_LOOP
  1198. # --------------------
  1199. # The main loop in $CONFIG_STATUS.
  1200. #
  1201. # This macro is expanded inside a here document. If the here document is
  1202. # closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF".
  1203. #
  1204. AC_DEFUN([_AC_OUTPUT_MAIN_LOOP],
  1205. [
  1206. # If the user did not use the arguments to specify the items to instantiate,
  1207. # then the envvar interface is used. Set only those that are not.
  1208. # We use the long form for the default assignment because of an extremely
  1209. # bizarre bug on SunOS 4.1.3.
  1210. if $ac_need_defaults; then
  1211. m4_ifdef([_AC_SEEN_CONFIG(FILES)],
  1212. [ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
  1213. ])dnl
  1214. m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
  1215. [ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
  1216. ])dnl
  1217. m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
  1218. [ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
  1219. ])dnl
  1220. m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
  1221. [ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
  1222. ])dnl
  1223. fi
  1224. # Have a temporary directory for convenience. Make it in the build tree
  1225. # simply because there is no reason against having it here, and in addition,
  1226. # creating and moving files from /tmp can sometimes cause problems.
  1227. # Hook for its removal unless debugging.
  1228. # Note that there is a small window in which the directory will not be cleaned:
  1229. # after its creation but before its name has been assigned to `$tmp'.
  1230. $debug ||
  1231. {
  1232. tmp=
  1233. trap 'exit_status=$?
  1234. { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
  1235. ' 0
  1236. trap 'AS_EXIT([1])' 1 2 13 15
  1237. }
  1238. dnl The comment above AS_TMPDIR says at most 4 chars are allowed.
  1239. AS_TMPDIR([conf], [.])
  1240. m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl
  1241. for ac_tag in[]dnl
  1242. m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F $CONFIG_FILES])[]dnl
  1243. m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H $CONFIG_HEADERS])[]dnl
  1244. m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L $CONFIG_LINKS])[]dnl
  1245. m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS])
  1246. do
  1247. case $ac_tag in
  1248. :[[FHLC]]) ac_mode=$ac_tag; continue;;
  1249. esac
  1250. case $ac_mode$ac_tag in
  1251. :[[FHL]]*:*);;
  1252. :L* | :C*:*) AC_MSG_ERROR([Invalid tag $ac_tag.]);;
  1253. :[[FH]]-) ac_tag=-:-;;
  1254. :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;;
  1255. esac
  1256. ac_save_IFS=$IFS
  1257. IFS=:
  1258. set x $ac_tag
  1259. IFS=$ac_save_IFS
  1260. shift
  1261. ac_file=$[1]
  1262. shift
  1263. case $ac_mode in
  1264. :L) ac_source=$[1];;
  1265. :[[FH]])
  1266. ac_file_inputs=
  1267. for ac_f
  1268. do
  1269. case $ac_f in
  1270. -) ac_f="$tmp/stdin";;
  1271. *) # Look for the file first in the build tree, then in the source tree
  1272. # (if the path is not absolute). The absolute path cannot be DOS-style,
  1273. # because $ac_f cannot contain `:'.
  1274. test -f "$ac_f" ||
  1275. case $ac_f in
  1276. [[\\/$]]*) false;;
  1277. *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
  1278. esac ||
  1279. AC_MSG_ERROR([cannot find input file: $ac_f]);;
  1280. esac
  1281. ac_file_inputs="$ac_file_inputs $ac_f"
  1282. done
  1283. # Let's still pretend it is `configure' which instantiates (i.e., don't
  1284. # use $as_me), people would be surprised to read:
  1285. # /* config.h. Generated by config.status. */
  1286. configure_input="Generated from "`IFS=:
  1287. echo $[*] | sed ['s|^[^:]*/||;s|:[^:]*/|, |g']`" by configure."
  1288. if test x"$ac_file" != x-; then
  1289. configure_input="$ac_file. $configure_input"
  1290. AC_MSG_NOTICE([creating $ac_file])
  1291. fi
  1292. case $ac_tag in
  1293. *:-:* | *:-) cat >"$tmp/stdin";;
  1294. esac
  1295. ;;
  1296. esac
  1297. ac_dir=`AS_DIRNAME(["$ac_file"])`
  1298. AS_MKDIR_P(["$ac_dir"])
  1299. _AC_SRCDIRS(["$ac_dir"])
  1300. case $ac_mode in
  1301. m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F)_AC_OUTPUT_FILE ;;])
  1302. m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H)_AC_OUTPUT_HEADER ;;])
  1303. m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L)_AC_OUTPUT_LINK ;;])
  1304. m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C)_AC_OUTPUT_COMMAND ;;])
  1305. esac
  1306. dnl Some shells don't like empty case/esac
  1307. m4_ifdef([_AC_LIST_TAG_COMMANDS], [
  1308. case $ac_file$ac_mode in
  1309. _AC_LIST_TAG_COMMANDS
  1310. esac
  1311. ])dnl
  1312. done # for ac_tag
  1313. ])# _AC_OUTPUT_MAIN_LOOP
  1314. # AC_OUTPUT_MAKE_DEFS
  1315. # -------------------
  1316. # Set the DEFS variable to the -D options determined earlier.
  1317. # This is a subroutine of AC_OUTPUT.
  1318. # It is called inside configure, outside of config.status.
  1319. m4_define([AC_OUTPUT_MAKE_DEFS],
  1320. [[# Transform confdefs.h into DEFS.
  1321. # Protect against shell expansion while executing Makefile rules.
  1322. # Protect against Makefile macro expansion.
  1323. #
  1324. # If the first sed substitution is executed (which looks for macros that
  1325. # take arguments), then branch to the quote section. Otherwise,
  1326. # look for a macro that doesn't take arguments.
  1327. ac_script='
  1328. t clear
  1329. :clear
  1330. s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
  1331. t quote
  1332. s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
  1333. t quote
  1334. b any
  1335. :quote
  1336. s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
  1337. s/\[/\\&/g
  1338. s/\]/\\&/g
  1339. s/\$/$$/g
  1340. H
  1341. :any
  1342. ${
  1343. g
  1344. s/^\n//
  1345. s/\n/ /g
  1346. p
  1347. }
  1348. '
  1349. DEFS=`sed -n "$ac_script" confdefs.h`
  1350. ]])# AC_OUTPUT_MAKE_DEFS