general.m4 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075
  1. # This file is part of Autoconf. -*- Autoconf -*-
  2. # Parameterized macros.
  3. m4_define([_AC_COPYRIGHT_YEARS], [
  4. Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  5. ])
  6. # This file is part of Autoconf. This program is free
  7. # software; you can redistribute it and/or modify it under the
  8. # terms of the GNU General Public License as published by the
  9. # Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # Under Section 7 of GPL version 3, you are granted additional
  18. # permissions described in the Autoconf Configure Script Exception,
  19. # version 3.0, as published by the Free Software Foundation.
  20. #
  21. # You should have received a copy of the GNU General Public License
  22. # and a copy of the Autoconf Configure Script Exception along with
  23. # this program; see the files COPYINGv3 and COPYING.EXCEPTION
  24. # respectively. If not, see <http://www.gnu.org/licenses/>.
  25. # Written by David MacKenzie, with help from
  26. # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
  27. # Roland McGrath, Noah Friedman, david d zuhn, and many others.
  28. ## ---------------- ##
  29. ## The diversions. ##
  30. ## ---------------- ##
  31. # We heavily use m4's diversions both for the initializations and for
  32. # required macros (see AC_REQUIRE), because in both cases we have to
  33. # issue high in `configure' something which is discovered late.
  34. #
  35. # KILL is only used to suppress output.
  36. #
  37. # The layers of `configure'. We let m4 undivert them by itself, when
  38. # it reaches the end of `configure.ac'.
  39. #
  40. # - BINSH
  41. # #! /bin/sh
  42. # - HEADER-REVISION
  43. # Sent by AC_REVISION
  44. # - HEADER-COMMENT
  45. # Purpose of the script.
  46. # - HEADER-COPYRIGHT
  47. # Copyright notice(s)
  48. # - M4SH-INIT
  49. # Initialization of bottom layers.
  50. #
  51. # - DEFAULTS
  52. # early initializations (defaults)
  53. # - PARSE_ARGS
  54. # initialization code, option handling loop.
  55. #
  56. # - HELP_BEGIN
  57. # Handling `configure --help'.
  58. # - HELP_CANON
  59. # Help msg for AC_CANONICAL_*
  60. # - HELP_ENABLE
  61. # Help msg from AC_ARG_ENABLE.
  62. # - HELP_WITH
  63. # Help msg from AC_ARG_WITH.
  64. # - HELP_VAR
  65. # Help msg from AC_ARG_VAR.
  66. # - HELP_VAR_END
  67. # A small paragraph on the use of the variables.
  68. # - HELP_END
  69. # Tail of the handling of --help.
  70. #
  71. # - VERSION_BEGIN
  72. # Head of the handling of --version.
  73. # - VERSION_FSF
  74. # FSF copyright notice for --version.
  75. # - VERSION_USER
  76. # User copyright notice for --version.
  77. # - VERSION_END
  78. # Tail of the handling of --version.
  79. #
  80. # - SHELL_FN
  81. # Shell functions.
  82. #
  83. # - INIT_PREPARE
  84. # Tail of initialization code.
  85. #
  86. # - BODY
  87. # the tests and output code
  88. #
  89. # _m4_divert(DIVERSION-NAME)
  90. # --------------------------
  91. # Convert a diversion name into its number. Otherwise, return
  92. # DIVERSION-NAME which is supposed to be an actual diversion number.
  93. # Of course it would be nicer to use m4_case here, instead of zillions
  94. # of little macros, but it then takes twice longer to run `autoconf'!
  95. #
  96. # From M4sugar:
  97. # -1. KILL
  98. # 10000. GROW
  99. #
  100. # From M4sh:
  101. # 0. BINSH
  102. # 1. HEADER-REVISION
  103. # 2. HEADER-COMMENT
  104. # 3. HEADER-COPYRIGHT
  105. # 4. M4SH-INIT
  106. # 1000. BODY
  107. m4_define([_m4_divert(DEFAULTS)], 10)
  108. m4_define([_m4_divert(PARSE_ARGS)], 20)
  109. m4_define([_m4_divert(HELP_BEGIN)], 100)
  110. m4_define([_m4_divert(HELP_CANON)], 101)
  111. m4_define([_m4_divert(HELP_ENABLE)], 102)
  112. m4_define([_m4_divert(HELP_WITH)], 103)
  113. m4_define([_m4_divert(HELP_VAR)], 104)
  114. m4_define([_m4_divert(HELP_VAR_END)], 105)
  115. m4_define([_m4_divert(HELP_END)], 106)
  116. m4_define([_m4_divert(VERSION_BEGIN)], 200)
  117. m4_define([_m4_divert(VERSION_FSF)], 201)
  118. m4_define([_m4_divert(VERSION_USER)], 202)
  119. m4_define([_m4_divert(VERSION_END)], 203)
  120. m4_define([_m4_divert(SHELL_FN)], 250)
  121. m4_define([_m4_divert(INIT_PREPARE)], 300)
  122. # AC_DIVERT_PUSH(DIVERSION-NAME)
  123. # AC_DIVERT_POP
  124. # ------------------------------
  125. m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
  126. m4_copy([m4_divert_pop], [AC_DIVERT_POP])
  127. ## ------------------------------------ ##
  128. ## Defining/requiring Autoconf macros. ##
  129. ## ------------------------------------ ##
  130. # AC_DEFUN(NAME, EXPANSION)
  131. # AC_DEFUN_ONCE(NAME, EXPANSION)
  132. # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
  133. # AC_REQUIRE(STRING)
  134. # AC_PROVIDE(MACRO-NAME)
  135. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  136. # -----------------------------------------------------------
  137. m4_copy([m4_defun], [AC_DEFUN])
  138. m4_copy([m4_defun_once], [AC_DEFUN_ONCE])
  139. m4_copy([m4_before], [AC_BEFORE])
  140. m4_copy([m4_require], [AC_REQUIRE])
  141. m4_copy([m4_provide], [AC_PROVIDE])
  142. m4_copy([m4_provide_if], [AC_PROVIDE_IFELSE])
  143. # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
  144. # ------------------------------------------
  145. m4_define([AC_OBSOLETE],
  146. [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
  147. ## ----------------------------- ##
  148. ## Implementing shell functions. ##
  149. ## ----------------------------- ##
  150. # AC_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY, [DIVERSION = SHELL_FN]
  151. # ------------------------------------------------------------------------
  152. # Same as AS_REQUIRE_SHELL_FN except that the default diversion comes
  153. # later in the script (speeding up configure --help and --version).
  154. AC_DEFUN([AC_REQUIRE_SHELL_FN],
  155. [AS_REQUIRE_SHELL_FN([$1], [$2], [$3], m4_default_quoted([$4], [SHELL_FN]))])
  156. ## ----------------------------- ##
  157. ## Implementing Autoconf loops. ##
  158. ## ----------------------------- ##
  159. # AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION)
  160. # ------------------------------------------
  161. AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]])
  162. AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl
  163. AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete.
  164. You should run autoupdate.])])
  165. ## ----------------------------------- ##
  166. ## Helping macros to display strings. ##
  167. ## ----------------------------------- ##
  168. # AU::AC_HELP_STRING(LHS, RHS, [COLUMN])
  169. # --------------------------------------
  170. AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING])
  171. ## ---------------------------------------------- ##
  172. ## Information on the package being Autoconf'ed. ##
  173. ## ---------------------------------------------- ##
  174. # It is suggested that the macros in this section appear before
  175. # AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
  176. # and from the implementation point of view, AC_INIT *must* be expanded
  177. # beforehand: it puts data in diversions which must appear before the
  178. # data provided by the macros of this section.
  179. # The solution is to require AC_INIT in each of these macros. AC_INIT
  180. # has the needed magic so that it can't be expanded twice.
  181. # _AC_INIT_LITERAL(STRING)
  182. # ------------------------
  183. # Reject STRING if it contains newline, or if it cannot be used as-is
  184. # in single-quoted strings, double-quoted strings, and quoted and
  185. # unquoted here-docs.
  186. m4_define([_AC_INIT_LITERAL],
  187. [m4_if(m4_index(m4_translit([[$1]], [
  188. ""], ['']), ['])AS_LITERAL_HEREDOC_IF([$1], [-]), [-1-], [],
  189. [m4_warn([syntax], [AC_INIT: not a literal: $1])])])
  190. # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME], [URL])
  191. # ---------------------------------------------------------------------
  192. m4_define([_AC_INIT_PACKAGE],
  193. [_AC_INIT_LITERAL([$1])
  194. _AC_INIT_LITERAL([$2])
  195. _AC_INIT_LITERAL([$3])
  196. m4_ifndef([AC_PACKAGE_NAME],
  197. [m4_define([AC_PACKAGE_NAME], [$1])])
  198. m4_ifndef([AC_PACKAGE_TARNAME],
  199. [m4_define([AC_PACKAGE_TARNAME],
  200. m4_default([$4],
  201. [m4_bpatsubst(m4_tolower(m4_bpatsubst([[$1]],
  202. [GNU ])),
  203. [[^_abcdefghijklmnopqrstuvwxyz0123456789]],
  204. [-])]))])
  205. m4_ifndef([AC_PACKAGE_VERSION],
  206. [m4_define([AC_PACKAGE_VERSION], [$2])])
  207. m4_ifndef([AC_PACKAGE_STRING],
  208. [m4_define([AC_PACKAGE_STRING], [$1 $2])])
  209. m4_ifndef([AC_PACKAGE_BUGREPORT],
  210. [m4_define([AC_PACKAGE_BUGREPORT], [$3])])
  211. m4_ifndef([AC_PACKAGE_URL],
  212. [m4_define([AC_PACKAGE_URL],
  213. m4_if([$5], [], [m4_if(m4_index([$1], [GNU ]), [0],
  214. [[http://www.gnu.org/software/]m4_defn([AC_PACKAGE_TARNAME])[/]])],
  215. [[$5]]))])
  216. ])
  217. # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER],
  218. # [FILTER = m4_newline])
  219. # ------------------------------------------------------
  220. # Emit TEXT, a copyright notice, in the top of `configure' and in
  221. # --version output. Macros in TEXT are evaluated once. Process
  222. # the --version output through FILTER (m4_newline, m4_do, and
  223. # m4_copyright_condense are common filters).
  224. m4_define([AC_COPYRIGHT],
  225. [AS_COPYRIGHT([$1])[]]dnl
  226. [m4_divert_text(m4_default_quoted([$2], [VERSION_USER]),
  227. [m4_default([$3], [m4_newline])([$1])])])# AC_COPYRIGHT
  228. # AC_REVISION(REVISION-INFO)
  229. # --------------------------
  230. # The second quote in the translit is just to cope with font-lock-mode
  231. # which sees the opening of a string.
  232. m4_define([AC_REVISION],
  233. [m4_divert_text([HEADER-REVISION],
  234. [@%:@ From __file__ m4_translit([$1], [$""]).])dnl
  235. ])
  236. ## ---------------------------------------- ##
  237. ## Requirements over the Autoconf version. ##
  238. ## ---------------------------------------- ##
  239. # AU::AC_PREREQ(VERSION)
  240. # ----------------------
  241. # Update this `AC_PREREQ' statement to require the current version of
  242. # Autoconf. But fail if ever this autoupdate is too old.
  243. #
  244. # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before
  245. # calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be
  246. # quite complex for autoupdate to import the value of
  247. # `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but
  248. # this would replace all its occurrences with the current version of
  249. # Autoconf, which is certainly not what the user intended.
  250. AU_DEFUN([AC_PREREQ],
  251. [m4_version_prereq([$1])[]dnl
  252. [AC_PREREQ(]]m4_dquote(m4_dquote(m4_defn([m4_PACKAGE_VERSION])))[[)]])
  253. # AC_PREREQ(VERSION)
  254. # ------------------
  255. # Complain and exit if the Autoconf version is less than VERSION.
  256. m4_undefine([AC_PREREQ])
  257. m4_copy([m4_version_prereq], [AC_PREREQ])
  258. # AC_AUTOCONF_VERSION
  259. # -------------------
  260. # The current version of Autoconf parsing this file.
  261. m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])
  262. ## ---------------- ##
  263. ## Initialization. ##
  264. ## ---------------- ##
  265. # All the following macros are used by AC_INIT. Ideally, they should
  266. # be presented in the order in which they are output. Please, help us
  267. # sorting it, or at least, don't augment the entropy.
  268. # _AC_INIT_NOTICE
  269. # ---------------
  270. # Provide useful headers; override the HEADER-COMMENT created by M4sh.
  271. m4_define([_AC_INIT_NOTICE],
  272. [m4_cleardivert([HEADER-COMMENT])]dnl
  273. [m4_divert_text([HEADER-COMMENT],
  274. [@%:@ Guess values for system-dependent variables and create Makefiles.
  275. @%:@ Generated by m4_PACKAGE_STRING[]dnl
  276. m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
  277. m4_ifset([AC_PACKAGE_BUGREPORT],
  278. [m4_divert_text([HEADER-COMMENT],
  279. [@%:@
  280. @%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
  281. ])
  282. # _AC_INIT_COPYRIGHT
  283. # ------------------
  284. # We dump to VERSION_FSF to make sure we are inserted before the
  285. # user copyrights, and after the setup of the --version handling.
  286. m4_define([_AC_INIT_COPYRIGHT],
  287. [AC_COPYRIGHT(m4_defn([_AC_COPYRIGHT_YEARS]), [VERSION_FSF], [
  288. m4_copyright_condense])dnl
  289. AC_COPYRIGHT(
  290. [This configure script is free software; the Free Software Foundation
  291. gives unlimited permission to copy, distribute and modify it.],
  292. [VERSION_FSF], [m4_echo])])
  293. # File Descriptors
  294. # ----------------
  295. # Set up the file descriptors used by `configure'.
  296. # File descriptor usage:
  297. # 0 standard input (/dev/null)
  298. # 1 file creation
  299. # 2 errors and warnings
  300. # AS_MESSAGE_LOG_FD compiler messages saved in config.log
  301. # AS_MESSAGE_FD checking for... messages and results
  302. # AS_ORIGINAL_STDIN_FD original standard input (still open)
  303. #
  304. # stdin is /dev/null because checks that run programs may
  305. # inadvertently run interactive ones, which would stop configuration
  306. # until someone typed an EOF.
  307. m4_define([AS_MESSAGE_FD], 6)
  308. m4_define([AS_ORIGINAL_STDIN_FD], 7)
  309. # That's how they used to be named.
  310. AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
  311. AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
  312. # _AC_INIT_DEFAULTS
  313. # -----------------
  314. # Values which defaults can be set from `configure.ac'.
  315. # `/bin/machine' is used in `glibcbug'. The others are used in config.*
  316. m4_define([_AC_INIT_DEFAULTS],
  317. [m4_divert_push([DEFAULTS])dnl
  318. test -n "$DJDIR" || exec AS_ORIGINAL_STDIN_FD<&0 </dev/null
  319. exec AS_MESSAGE_FD>&1
  320. # Name of the host.
  321. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
  322. # so uname gets run too.
  323. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
  324. #
  325. # Initializations.
  326. #
  327. ac_default_prefix=/usr/local
  328. ac_clean_files=
  329. ac_config_libobj_dir=.
  330. LIB@&t@OBJS=
  331. cross_compiling=no
  332. subdirs=
  333. MFLAGS=
  334. MAKEFLAGS=
  335. AC_SUBST([SHELL])dnl
  336. AC_SUBST([PATH_SEPARATOR])dnl
  337. # Identity of this package.
  338. AC_SUBST([PACKAGE_NAME],
  339. [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
  340. AC_SUBST([PACKAGE_TARNAME],
  341. [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
  342. AC_SUBST([PACKAGE_VERSION],
  343. [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
  344. AC_SUBST([PACKAGE_STRING],
  345. [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
  346. AC_SUBST([PACKAGE_BUGREPORT],
  347. [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
  348. AC_SUBST([PACKAGE_URL],
  349. [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])dnl
  350. m4_divert_pop([DEFAULTS])dnl
  351. m4_wrap_lifo([m4_divert_text([DEFAULTS],
  352. [ac_subst_vars='m4_set_dump([_AC_SUBST_VARS], m4_newline)'
  353. ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'
  354. ac_user_opts='
  355. enable_option_checking
  356. m4_ifdef([_AC_USER_OPTS], [m4_defn([_AC_USER_OPTS])
  357. ])'
  358. m4_ifdef([_AC_PRECIOUS_VARS],
  359. [_AC_ARG_VAR_STORE[]dnl
  360. _AC_ARG_VAR_VALIDATE[]dnl
  361. ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])'])
  362. m4_ifdef([_AC_LIST_SUBDIRS],
  363. [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl
  364. ])])dnl
  365. ])# _AC_INIT_DEFAULTS
  366. # AC_PREFIX_DEFAULT(PREFIX)
  367. # -------------------------
  368. AC_DEFUN([AC_PREFIX_DEFAULT],
  369. [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
  370. # AC_PREFIX_PROGRAM(PROGRAM)
  371. # --------------------------
  372. # Guess the value for the `prefix' variable by looking for
  373. # the argument program along PATH and taking its parent.
  374. # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
  375. # set `prefix' to /usr/local/gnu.
  376. # This comes too late to find a site file based on the prefix,
  377. # and it might use a cached value for the path.
  378. # No big loss, I think, since most configures don't use this macro anyway.
  379. AC_DEFUN([AC_PREFIX_PROGRAM],
  380. [if test "x$prefix" = xNONE; then
  381. dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
  382. _AS_ECHO_N([checking for prefix by ])
  383. AC_PATH_PROG(ac_prefix_program, [$1])
  384. if test -n "$ac_prefix_program"; then
  385. prefix=`AS_DIRNAME(["$ac_prefix_program"])`
  386. prefix=`AS_DIRNAME(["$prefix"])`
  387. fi
  388. fi
  389. ])# AC_PREFIX_PROGRAM
  390. # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
  391. # ---------------------------------------------
  392. # UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package,
  393. # relative to the directory that configure is in, which we can look
  394. # for to find out if srcdir is correct.
  395. AC_DEFUN([AC_CONFIG_SRCDIR],
  396. [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
  397. # _AC_INIT_DIRCHECK
  398. # -----------------
  399. # Set ac_pwd, and sanity-check it and the source and installation directories.
  400. #
  401. # (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.)
  402. #
  403. AC_DEFUN([_AC_INIT_DIRCHECK],
  404. [m4_divert_push([PARSE_ARGS])dnl
  405. ac_pwd=`pwd` && test -n "$ac_pwd" &&
  406. ac_ls_di=`ls -di .` &&
  407. ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  408. AC_MSG_ERROR([working directory cannot be determined])
  409. test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  410. AC_MSG_ERROR([pwd does not report name of working directory])
  411. m4_divert_pop([PARSE_ARGS])dnl
  412. ])# _AC_INIT_DIRCHECK
  413. # _AC_INIT_SRCDIR
  414. # ---------------
  415. # Compute `srcdir' based on `$ac_unique_file'.
  416. #
  417. # (We have to AC_DEFUN it, since we use AC_REQUIRE.)
  418. #
  419. AC_DEFUN([_AC_INIT_SRCDIR],
  420. [AC_REQUIRE([_AC_INIT_DIRCHECK])dnl
  421. m4_divert_push([PARSE_ARGS])dnl
  422. # Find the source files, if location was not specified.
  423. if test -z "$srcdir"; then
  424. ac_srcdir_defaulted=yes
  425. # Try the directory containing this script, then the parent directory.
  426. ac_confdir=`AS_DIRNAME(["$as_myself"])`
  427. srcdir=$ac_confdir
  428. if test ! -r "$srcdir/$ac_unique_file"; then
  429. srcdir=..
  430. fi
  431. else
  432. ac_srcdir_defaulted=no
  433. fi
  434. if test ! -r "$srcdir/$ac_unique_file"; then
  435. test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  436. AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir])
  437. fi
  438. ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
  439. ac_abs_confdir=`(
  440. cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg])
  441. pwd)`
  442. # When building in place, set srcdir=.
  443. if test "$ac_abs_confdir" = "$ac_pwd"; then
  444. srcdir=.
  445. fi
  446. # Remove unnecessary trailing slashes from srcdir.
  447. # Double slashes in file names in object file debugging info
  448. # mess up M-x gdb in Emacs.
  449. case $srcdir in
  450. */) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;;
  451. esac
  452. m4_divert_pop([PARSE_ARGS])dnl
  453. ])# _AC_INIT_SRCDIR
  454. # _AC_INIT_PARSE_ARGS
  455. # -------------------
  456. m4_define([_AC_INIT_PARSE_ARGS],
  457. [m4_divert_push([PARSE_ARGS])dnl
  458. # Initialize some variables set by options.
  459. ac_init_help=
  460. ac_init_version=false
  461. ac_unrecognized_opts=
  462. ac_unrecognized_sep=
  463. # The variables have the same names as the options, with
  464. # dashes changed to underlines.
  465. cache_file=/dev/null
  466. AC_SUBST(exec_prefix, NONE)dnl
  467. no_create=
  468. no_recursion=
  469. AC_SUBST(prefix, NONE)dnl
  470. program_prefix=NONE
  471. program_suffix=NONE
  472. AC_SUBST(program_transform_name, [s,x,x,])dnl
  473. silent=
  474. site=
  475. srcdir=
  476. verbose=
  477. x_includes=NONE
  478. x_libraries=NONE
  479. # Installation directory options.
  480. # These are left unexpanded so users can "make install exec_prefix=/foo"
  481. # and all the variables that are supposed to be based on exec_prefix
  482. # by default will actually change.
  483. # Use braces instead of parens because sh, perl, etc. also accept them.
  484. # (The list follows the same order as the GNU Coding Standards.)
  485. AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
  486. AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
  487. AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
  488. AC_SUBST([datarootdir], ['${prefix}/share'])dnl
  489. AC_SUBST([datadir], ['${datarootdir}'])dnl
  490. AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
  491. AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
  492. AC_SUBST([localstatedir], ['${prefix}/var'])dnl
  493. AC_SUBST([includedir], ['${prefix}/include'])dnl
  494. AC_SUBST([oldincludedir], ['/usr/include'])dnl
  495. AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
  496. ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
  497. ['${datarootdir}/doc/${PACKAGE}'])])dnl
  498. AC_SUBST([infodir], ['${datarootdir}/info'])dnl
  499. AC_SUBST([htmldir], ['${docdir}'])dnl
  500. AC_SUBST([dvidir], ['${docdir}'])dnl
  501. AC_SUBST([pdfdir], ['${docdir}'])dnl
  502. AC_SUBST([psdir], ['${docdir}'])dnl
  503. AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
  504. AC_SUBST([localedir], ['${datarootdir}/locale'])dnl
  505. AC_SUBST([mandir], ['${datarootdir}/man'])dnl
  506. ac_prev=
  507. ac_dashdash=
  508. for ac_option
  509. do
  510. # If the previous option needs an argument, assign it.
  511. if test -n "$ac_prev"; then
  512. eval $ac_prev=\$ac_option
  513. ac_prev=
  514. continue
  515. fi
  516. case $ac_option in
  517. *=?*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;;
  518. *=) ac_optarg= ;;
  519. *) ac_optarg=yes ;;
  520. esac
  521. # Accept the important Cygnus configure options, so we can diagnose typos.
  522. case $ac_dashdash$ac_option in
  523. --)
  524. ac_dashdash=yes ;;
  525. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  526. ac_prev=bindir ;;
  527. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  528. bindir=$ac_optarg ;;
  529. -build | --build | --buil | --bui | --bu)
  530. ac_prev=build_alias ;;
  531. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  532. build_alias=$ac_optarg ;;
  533. -cache-file | --cache-file | --cache-fil | --cache-fi \
  534. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  535. ac_prev=cache_file ;;
  536. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  537. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  538. cache_file=$ac_optarg ;;
  539. --config-cache | -C)
  540. cache_file=config.cache ;;
  541. -datadir | --datadir | --datadi | --datad)
  542. ac_prev=datadir ;;
  543. -datadir=* | --datadir=* | --datadi=* | --datad=*)
  544. datadir=$ac_optarg ;;
  545. -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  546. | --dataroo | --dataro | --datar)
  547. ac_prev=datarootdir ;;
  548. -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  549. | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
  550. datarootdir=$ac_optarg ;;
  551. _AC_INIT_PARSE_ENABLE([disable])
  552. -docdir | --docdir | --docdi | --doc | --do)
  553. ac_prev=docdir ;;
  554. -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
  555. docdir=$ac_optarg ;;
  556. -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  557. ac_prev=dvidir ;;
  558. -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
  559. dvidir=$ac_optarg ;;
  560. _AC_INIT_PARSE_ENABLE([enable])
  561. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  562. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  563. | --exec | --exe | --ex)
  564. ac_prev=exec_prefix ;;
  565. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  566. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  567. | --exec=* | --exe=* | --ex=*)
  568. exec_prefix=$ac_optarg ;;
  569. -gas | --gas | --ga | --g)
  570. # Obsolete; use --with-gas.
  571. with_gas=yes ;;
  572. -help | --help | --hel | --he | -h)
  573. ac_init_help=long ;;
  574. -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
  575. ac_init_help=recursive ;;
  576. -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
  577. ac_init_help=short ;;
  578. -host | --host | --hos | --ho)
  579. ac_prev=host_alias ;;
  580. -host=* | --host=* | --hos=* | --ho=*)
  581. host_alias=$ac_optarg ;;
  582. -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
  583. ac_prev=htmldir ;;
  584. -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  585. | --ht=*)
  586. htmldir=$ac_optarg ;;
  587. -includedir | --includedir | --includedi | --included | --include \
  588. | --includ | --inclu | --incl | --inc)
  589. ac_prev=includedir ;;
  590. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  591. | --includ=* | --inclu=* | --incl=* | --inc=*)
  592. includedir=$ac_optarg ;;
  593. -infodir | --infodir | --infodi | --infod | --info | --inf)
  594. ac_prev=infodir ;;
  595. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  596. infodir=$ac_optarg ;;
  597. -libdir | --libdir | --libdi | --libd)
  598. ac_prev=libdir ;;
  599. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  600. libdir=$ac_optarg ;;
  601. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  602. | --libexe | --libex | --libe)
  603. ac_prev=libexecdir ;;
  604. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  605. | --libexe=* | --libex=* | --libe=*)
  606. libexecdir=$ac_optarg ;;
  607. -localedir | --localedir | --localedi | --localed | --locale)
  608. ac_prev=localedir ;;
  609. -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
  610. localedir=$ac_optarg ;;
  611. -localstatedir | --localstatedir | --localstatedi | --localstated \
  612. | --localstate | --localstat | --localsta | --localst | --locals)
  613. ac_prev=localstatedir ;;
  614. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  615. | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
  616. localstatedir=$ac_optarg ;;
  617. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  618. ac_prev=mandir ;;
  619. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  620. mandir=$ac_optarg ;;
  621. -nfp | --nfp | --nf)
  622. # Obsolete; use --without-fp.
  623. with_fp=no ;;
  624. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  625. | --no-cr | --no-c | -n)
  626. no_create=yes ;;
  627. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  628. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  629. no_recursion=yes ;;
  630. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  631. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  632. | --oldin | --oldi | --old | --ol | --o)
  633. ac_prev=oldincludedir ;;
  634. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  635. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  636. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  637. oldincludedir=$ac_optarg ;;
  638. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  639. ac_prev=prefix ;;
  640. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  641. prefix=$ac_optarg ;;
  642. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  643. | --program-pre | --program-pr | --program-p)
  644. ac_prev=program_prefix ;;
  645. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  646. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  647. program_prefix=$ac_optarg ;;
  648. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  649. | --program-suf | --program-su | --program-s)
  650. ac_prev=program_suffix ;;
  651. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  652. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  653. program_suffix=$ac_optarg ;;
  654. -program-transform-name | --program-transform-name \
  655. | --program-transform-nam | --program-transform-na \
  656. | --program-transform-n | --program-transform- \
  657. | --program-transform | --program-transfor \
  658. | --program-transfo | --program-transf \
  659. | --program-trans | --program-tran \
  660. | --progr-tra | --program-tr | --program-t)
  661. ac_prev=program_transform_name ;;
  662. -program-transform-name=* | --program-transform-name=* \
  663. | --program-transform-nam=* | --program-transform-na=* \
  664. | --program-transform-n=* | --program-transform-=* \
  665. | --program-transform=* | --program-transfor=* \
  666. | --program-transfo=* | --program-transf=* \
  667. | --program-trans=* | --program-tran=* \
  668. | --progr-tra=* | --program-tr=* | --program-t=*)
  669. program_transform_name=$ac_optarg ;;
  670. -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
  671. ac_prev=pdfdir ;;
  672. -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
  673. pdfdir=$ac_optarg ;;
  674. -psdir | --psdir | --psdi | --psd | --ps)
  675. ac_prev=psdir ;;
  676. -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
  677. psdir=$ac_optarg ;;
  678. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  679. | -silent | --silent | --silen | --sile | --sil)
  680. silent=yes ;;
  681. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  682. ac_prev=sbindir ;;
  683. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  684. | --sbi=* | --sb=*)
  685. sbindir=$ac_optarg ;;
  686. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  687. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  688. | --sharedst | --shareds | --shared | --share | --shar \
  689. | --sha | --sh)
  690. ac_prev=sharedstatedir ;;
  691. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  692. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  693. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  694. | --sha=* | --sh=*)
  695. sharedstatedir=$ac_optarg ;;
  696. -site | --site | --sit)
  697. ac_prev=site ;;
  698. -site=* | --site=* | --sit=*)
  699. site=$ac_optarg ;;
  700. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  701. ac_prev=srcdir ;;
  702. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  703. srcdir=$ac_optarg ;;
  704. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  705. | --syscon | --sysco | --sysc | --sys | --sy)
  706. ac_prev=sysconfdir ;;
  707. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  708. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  709. sysconfdir=$ac_optarg ;;
  710. -target | --target | --targe | --targ | --tar | --ta | --t)
  711. ac_prev=target_alias ;;
  712. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  713. target_alias=$ac_optarg ;;
  714. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  715. verbose=yes ;;
  716. -version | --version | --versio | --versi | --vers | -V)
  717. ac_init_version=: ;;
  718. _AC_INIT_PARSE_ENABLE([with])
  719. _AC_INIT_PARSE_ENABLE([without])
  720. --x)
  721. # Obsolete; use --with-x.
  722. with_x=yes ;;
  723. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  724. | --x-incl | --x-inc | --x-in | --x-i)
  725. ac_prev=x_includes ;;
  726. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  727. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  728. x_includes=$ac_optarg ;;
  729. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  730. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  731. ac_prev=x_libraries ;;
  732. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  733. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  734. x_libraries=$ac_optarg ;;
  735. -*) AC_MSG_ERROR([unrecognized option: `$ac_option'
  736. Try `$[0] --help' for more information])
  737. ;;
  738. *=*)
  739. ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
  740. # Reject names that are not valid shell variable names.
  741. case $ac_envvar in #(
  742. '' | [[0-9]]* | *[[!_$as_cr_alnum]]* )
  743. AC_MSG_ERROR([invalid variable name: `$ac_envvar']) ;;
  744. esac
  745. eval $ac_envvar=\$ac_optarg
  746. export $ac_envvar ;;
  747. *)
  748. # FIXME: should be removed in autoconf 3.0.
  749. AC_MSG_WARN([you should use --build, --host, --target])
  750. expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
  751. AC_MSG_WARN([invalid host type: $ac_option])
  752. : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
  753. ;;
  754. esac
  755. done
  756. if test -n "$ac_prev"; then
  757. ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  758. AC_MSG_ERROR([missing argument to $ac_option])
  759. fi
  760. if test -n "$ac_unrecognized_opts"; then
  761. case $enable_option_checking in
  762. no) ;;
  763. fatal) AC_MSG_ERROR([unrecognized options: $ac_unrecognized_opts]) ;;
  764. *) AC_MSG_WARN( [unrecognized options: $ac_unrecognized_opts]) ;;
  765. esac
  766. fi
  767. # Check all directory arguments for consistency.
  768. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
  769. datadir sysconfdir sharedstatedir localstatedir includedir \
  770. oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
  771. libdir localedir mandir
  772. do
  773. eval ac_val=\$$ac_var
  774. # Remove trailing slashes.
  775. case $ac_val in
  776. */ )
  777. ac_val=`expr "X$ac_val" : 'X\(.*[[^/]]\)' \| "X$ac_val" : 'X\(.*\)'`
  778. eval $ac_var=\$ac_val;;
  779. esac
  780. # Be sure to have absolute directory names.
  781. case $ac_val in
  782. [[\\/$]]* | ?:[[\\/]]* ) continue;;
  783. NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  784. esac
  785. AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val])
  786. done
  787. # There might be people who depend on the old broken behavior: `$host'
  788. # used to hold the argument of --host etc.
  789. # FIXME: To remove some day.
  790. build=$build_alias
  791. host=$host_alias
  792. target=$target_alias
  793. # FIXME: To remove some day.
  794. if test "x$host_alias" != x; then
  795. if test "x$build_alias" = x; then
  796. cross_compiling=maybe
  797. elif test "x$build_alias" != "x$host_alias"; then
  798. cross_compiling=yes
  799. fi
  800. fi
  801. ac_tool_prefix=
  802. test -n "$host_alias" && ac_tool_prefix=$host_alias-
  803. test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
  804. m4_divert_pop([PARSE_ARGS])dnl
  805. ])# _AC_INIT_PARSE_ARGS
  806. # _AC_INIT_PARSE_ENABLE(OPTION-NAME)
  807. # ----------------------------------
  808. # A trivial front-end for _AC_INIT_PARSE_ENABLE2.
  809. #
  810. m4_define([_AC_INIT_PARSE_ENABLE],
  811. [m4_bmatch([$1], [^with],
  812. [_AC_INIT_PARSE_ENABLE2([$1], [with])],
  813. [_AC_INIT_PARSE_ENABLE2([$1], [enable])])])
  814. # _AC_INIT_PARSE_ENABLE2(OPTION-NAME, POSITIVE-NAME)
  815. # --------------------------------------------------
  816. # Handle an `--enable' or a `--with' option.
  817. #
  818. # OPTION-NAME is `enable', `disable', `with', or `without'.
  819. # POSITIVE-NAME is the corresponding positive variant, i.e. `enable' or `with'.
  820. #
  821. # Positive variant of the option is recognized by the condition
  822. # OPTION-NAME == POSITIVE-NAME .
  823. #
  824. m4_define([_AC_INIT_PARSE_ENABLE2],
  825. [-$1-* | --$1-*)
  826. ac_useropt=`expr "x$ac_option" : 'x-*$1-\(m4_if([$1], [$2], [[[^=]]], [.])*\)'`
  827. # Reject names that are not valid shell variable names.
  828. expr "x$ac_useropt" : "[.*[^-+._$as_cr_alnum]]" >/dev/null &&
  829. AC_MSG_ERROR(
  830. [invalid ]m4_if([$2], [with], [package], [feature])[ name: $ac_useropt])
  831. ac_useropt_orig=$ac_useropt
  832. ac_useropt=`AS_ECHO(["$ac_useropt"]) | sed 's/[[-+.]]/_/g'`
  833. case $ac_user_opts in
  834. *"
  835. "$2_$ac_useropt"
  836. "*) ;;
  837. *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--$1-$ac_useropt_orig"
  838. ac_unrecognized_sep=', ';;
  839. esac
  840. eval $2_$ac_useropt=m4_if([$1], [$2], [\$ac_optarg], [no]) ;;dnl
  841. ])
  842. # _AC_INIT_HELP
  843. # -------------
  844. # Handle the `configure --help' message.
  845. m4_define([_AC_INIT_HELP],
  846. [m4_divert_push([HELP_BEGIN])dnl
  847. #
  848. # Report the --help message.
  849. #
  850. if test "$ac_init_help" = "long"; then
  851. # Omit some internal or obsolete options to make the list less imposing.
  852. # This message is too long to be a string in the A/UX 3.1 sh.
  853. cat <<_ACEOF
  854. \`configure' configures m4_ifset([AC_PACKAGE_STRING],
  855. [AC_PACKAGE_STRING],
  856. [this package]) to adapt to many kinds of systems.
  857. Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
  858. [To assign environment variables (e.g., CC, CFLAGS...), specify them as
  859. VAR=VALUE. See below for descriptions of some of the useful variables.
  860. Defaults for the options are specified in brackets.
  861. Configuration:
  862. -h, --help display this help and exit
  863. --help=short display options specific to this package
  864. --help=recursive display the short help of all the included packages
  865. -V, --version display version information and exit
  866. -q, --quiet, --silent do not print \`checking ...' messages
  867. --cache-file=FILE cache test results in FILE [disabled]
  868. -C, --config-cache alias for \`--cache-file=config.cache'
  869. -n, --no-create do not create output files
  870. --srcdir=DIR find the sources in DIR [configure dir or \`..']
  871. Installation directories:
  872. ]AS_HELP_STRING([--prefix=PREFIX],
  873. [install architecture-independent files in PREFIX [$ac_default_prefix]])
  874. AS_HELP_STRING([--exec-prefix=EPREFIX],
  875. [install architecture-dependent files in EPREFIX [PREFIX]])[
  876. By default, \`make install' will install all the files in
  877. \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
  878. an installation prefix other than \`$ac_default_prefix' using \`--prefix',
  879. for instance \`--prefix=\$HOME'.
  880. For better control, use the options below.
  881. Fine tuning of the installation directories:
  882. --bindir=DIR user executables [EPREFIX/bin]
  883. --sbindir=DIR system admin executables [EPREFIX/sbin]
  884. --libexecdir=DIR program executables [EPREFIX/libexec]
  885. --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  886. --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  887. --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  888. --libdir=DIR object code libraries [EPREFIX/lib]
  889. --includedir=DIR C header files [PREFIX/include]
  890. --oldincludedir=DIR C header files for non-gcc [/usr/include]
  891. --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
  892. --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
  893. --infodir=DIR info documentation [DATAROOTDIR/info]
  894. --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
  895. --mandir=DIR man documentation [DATAROOTDIR/man]
  896. ]AS_HELP_STRING([--docdir=DIR],
  897. [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME],
  898. [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[
  899. --htmldir=DIR html documentation [DOCDIR]
  900. --dvidir=DIR dvi documentation [DOCDIR]
  901. --pdfdir=DIR pdf documentation [DOCDIR]
  902. --psdir=DIR ps documentation [DOCDIR]
  903. _ACEOF
  904. cat <<\_ACEOF]
  905. m4_divert_pop([HELP_BEGIN])dnl
  906. dnl The order of the diversions here is
  907. dnl - HELP_BEGIN
  908. dnl which may be extended by extra generic options such as with X or
  909. dnl AC_ARG_PROGRAM. Displayed only in long --help.
  910. dnl
  911. dnl - HELP_CANON
  912. dnl Support for cross compilation (--build, --host and --target).
  913. dnl Display only in long --help.
  914. dnl
  915. dnl - HELP_ENABLE
  916. dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
  917. dnl then implements the header of the non generic options.
  918. dnl
  919. dnl - HELP_WITH
  920. dnl
  921. dnl - HELP_VAR
  922. dnl
  923. dnl - HELP_VAR_END
  924. dnl
  925. dnl - HELP_END
  926. dnl initialized below, in which we dump the trailer (handling of the
  927. dnl recursion for instance).
  928. m4_divert_push([HELP_ENABLE])dnl
  929. _ACEOF
  930. fi
  931. if test -n "$ac_init_help"; then
  932. m4_ifset([AC_PACKAGE_STRING],
  933. [ case $ac_init_help in
  934. short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
  935. esac])
  936. cat <<\_ACEOF
  937. m4_divert_pop([HELP_ENABLE])dnl
  938. m4_divert_push([HELP_END])dnl
  939. Report bugs to m4_ifset([AC_PACKAGE_BUGREPORT], [<AC_PACKAGE_BUGREPORT>],
  940. [the package provider]).dnl
  941. m4_ifdef([AC_PACKAGE_NAME], [m4_ifset([AC_PACKAGE_URL], [
  942. AC_PACKAGE_NAME home page: <AC_PACKAGE_URL>.])dnl
  943. m4_if(m4_index(m4_defn([AC_PACKAGE_NAME]), [GNU ]), [0], [
  944. General help using GNU software: <http://www.gnu.org/gethelp/>.])])
  945. _ACEOF
  946. ac_status=$?
  947. fi
  948. if test "$ac_init_help" = "recursive"; then
  949. # If there are subdirs, report their specific --help.
  950. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
  951. test -d "$ac_dir" ||
  952. { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
  953. continue
  954. _AC_SRCDIRS(["$ac_dir"])
  955. cd "$ac_dir" || { ac_status=$?; continue; }
  956. # Check for guested configure.
  957. if test -f "$ac_srcdir/configure.gnu"; then
  958. echo &&
  959. $SHELL "$ac_srcdir/configure.gnu" --help=recursive
  960. elif test -f "$ac_srcdir/configure"; then
  961. echo &&
  962. $SHELL "$ac_srcdir/configure" --help=recursive
  963. else
  964. AC_MSG_WARN([no configuration information is in $ac_dir])
  965. fi || ac_status=$?
  966. cd "$ac_pwd" || { ac_status=$?; break; }
  967. done
  968. fi
  969. test -n "$ac_init_help" && exit $ac_status
  970. m4_divert_pop([HELP_END])dnl
  971. ])# _AC_INIT_HELP
  972. # _AC_INIT_VERSION
  973. # ----------------
  974. # Handle the `configure --version' message.
  975. m4_define([_AC_INIT_VERSION],
  976. [m4_divert_text([VERSION_BEGIN],
  977. [if $ac_init_version; then
  978. cat <<\_ACEOF
  979. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
  980. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  981. generated by m4_PACKAGE_STRING])
  982. m4_divert_text([VERSION_END],
  983. [_ACEOF
  984. exit
  985. fi])dnl
  986. ])# _AC_INIT_VERSION
  987. # _AC_INIT_CONFIG_LOG
  988. # -------------------
  989. # Initialize the config.log file descriptor and write header to it.
  990. m4_define([_AC_INIT_CONFIG_LOG],
  991. [m4_divert_text([INIT_PREPARE],
  992. [m4_define([AS_MESSAGE_LOG_FD], 5)dnl
  993. cat >config.log <<_ACEOF
  994. This file contains any messages produced by compilers while
  995. running configure, to aid debugging if configure makes a mistake.
  996. It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl
  997. $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was
  998. generated by m4_PACKAGE_STRING. Invocation command line was
  999. $ $[0] $[@]
  1000. _ACEOF
  1001. exec AS_MESSAGE_LOG_FD>>config.log
  1002. AS_UNAME >&AS_MESSAGE_LOG_FD
  1003. cat >&AS_MESSAGE_LOG_FD <<_ACEOF
  1004. m4_text_box([Core tests.])
  1005. _ACEOF
  1006. ])])# _AC_INIT_CONFIG_LOG
  1007. # _AC_INIT_PREPARE
  1008. # ----------------
  1009. # Called by AC_INIT to build the preamble of the `configure' scripts.
  1010. # 1. Trap and clean up various tmp files.
  1011. # 2. Set up the fd and output files
  1012. # 3. Remember the options given to `configure' for `config.status --recheck'.
  1013. # 4. Initiates confdefs.h
  1014. # 5. Loads site and cache files
  1015. m4_define([_AC_INIT_PREPARE],
  1016. [m4_divert_push([INIT_PREPARE])dnl
  1017. # Keep a trace of the command line.
  1018. # Strip out --no-create and --no-recursion so they do not pile up.
  1019. # Strip out --silent because we don't want to record it for future runs.
  1020. # Also quote any args containing shell meta-characters.
  1021. # Make two passes to allow for proper duplicate-argument suppression.
  1022. ac_configure_args=
  1023. ac_configure_args0=
  1024. ac_configure_args1=
  1025. ac_must_keep_next=false
  1026. for ac_pass in 1 2
  1027. do
  1028. for ac_arg
  1029. do
  1030. case $ac_arg in
  1031. -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
  1032. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  1033. | -silent | --silent | --silen | --sile | --sil)
  1034. continue ;;
  1035. *\'*)
  1036. ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
  1037. esac
  1038. case $ac_pass in
  1039. 1) AS_VAR_APPEND([ac_configure_args0], [" '$ac_arg'"]) ;;
  1040. 2)
  1041. AS_VAR_APPEND([ac_configure_args1], [" '$ac_arg'"])
  1042. dnl If trying to remove duplicates, be sure to (i) keep the *last*
  1043. dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only),
  1044. dnl and (ii) not to strip long options (--prefix foo --prefix bar might
  1045. dnl give --prefix foo bar).
  1046. if test $ac_must_keep_next = true; then
  1047. ac_must_keep_next=false # Got value, back to normal.
  1048. else
  1049. case $ac_arg in
  1050. dnl Use broad patterns, as arguments that would have already made configure
  1051. dnl exit don't matter.
  1052. *=* | --config-cache | -C | -disable-* | --disable-* \
  1053. | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
  1054. | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
  1055. | -with-* | --with-* | -without-* | --without-* | --x)
  1056. case "$ac_configure_args0 " in
  1057. "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
  1058. esac
  1059. ;;
  1060. -* ) ac_must_keep_next=true ;;
  1061. esac
  1062. fi
  1063. AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"])
  1064. ;;
  1065. esac
  1066. done
  1067. done
  1068. AS_UNSET(ac_configure_args0)
  1069. AS_UNSET(ac_configure_args1)
  1070. # When interrupted or exit'd, cleanup temporary files, and complete
  1071. # config.log. We remove comments because anyway the quotes in there
  1072. # would cause problems or look ugly.
  1073. # WARNING: Use '\'' to represent an apostrophe within the trap.
  1074. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
  1075. trap 'exit_status=$?
  1076. # Save into config.log some information that might help in debugging.
  1077. {
  1078. echo
  1079. AS_BOX([Cache variables.])
  1080. echo
  1081. m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]),
  1082. [^ *\(#.*\)?
  1083. ], [],
  1084. ['], ['\\''])
  1085. echo
  1086. AS_BOX([Output variables.])
  1087. echo
  1088. for ac_var in $ac_subst_vars
  1089. do
  1090. eval ac_val=\$$ac_var
  1091. case $ac_val in
  1092. *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
  1093. esac
  1094. AS_ECHO(["$ac_var='\''$ac_val'\''"])
  1095. done | sort
  1096. echo
  1097. if test -n "$ac_subst_files"; then
  1098. AS_BOX([File substitutions.])
  1099. echo
  1100. for ac_var in $ac_subst_files
  1101. do
  1102. eval ac_val=\$$ac_var
  1103. case $ac_val in
  1104. *\'\''*) ac_val=`AS_ECHO(["$ac_val"]) | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
  1105. esac
  1106. AS_ECHO(["$ac_var='\''$ac_val'\''"])
  1107. done | sort
  1108. echo
  1109. fi
  1110. if test -s confdefs.h; then
  1111. AS_BOX([confdefs.h.])
  1112. echo
  1113. cat confdefs.h
  1114. echo
  1115. fi
  1116. test "$ac_signal" != 0 &&
  1117. AS_ECHO(["$as_me: caught signal $ac_signal"])
  1118. AS_ECHO(["$as_me: exit $exit_status"])
  1119. } >&AS_MESSAGE_LOG_FD
  1120. rm -f core *.core core.conftest.* &&
  1121. rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files &&
  1122. exit $exit_status
  1123. ' 0
  1124. for ac_signal in 1 2 13 15; do
  1125. trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
  1126. done
  1127. ac_signal=0
  1128. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  1129. rm -f -r conftest* confdefs.h
  1130. dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file
  1131. dnl containing less than 14 bytes (including the newline).
  1132. AS_ECHO(["/* confdefs.h */"]) > confdefs.h
  1133. # Predefined preprocessor variables.
  1134. AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"],
  1135. [Define to the full name of this package.])dnl
  1136. AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"],
  1137. [Define to the one symbol short name of this package.])dnl
  1138. AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"],
  1139. [Define to the version of this package.])dnl
  1140. AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"],
  1141. [Define to the full name and version of this package.])dnl
  1142. AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
  1143. [Define to the address where bug reports for this package
  1144. should be sent.])dnl
  1145. AC_DEFINE_UNQUOTED([PACKAGE_URL], ["$PACKAGE_URL"],
  1146. [Define to the home page for this package.])
  1147. # Let the site file select an alternate cache file if it wants to.
  1148. AC_SITE_LOAD
  1149. AC_CACHE_LOAD
  1150. m4_divert_pop([INIT_PREPARE])dnl
  1151. ])# _AC_INIT_PREPARE
  1152. # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
  1153. # ----------------------------------------
  1154. # This macro is used only for Autoupdate.
  1155. AU_DEFUN([AC_INIT],
  1156. [m4_ifval([$2], [[AC_INIT($@)]],
  1157. [m4_ifval([$1],
  1158. [[AC_INIT]
  1159. AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
  1160. ])
  1161. # AC_INIT([PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
  1162. # ----------------------------------------------------------
  1163. # Include the user macro files, prepare the diversions, and output the
  1164. # preamble of the `configure' script.
  1165. #
  1166. # If BUG-REPORT is omitted, do without (unless the user previously
  1167. # defined the m4 macro AC_PACKAGE_BUGREPORT). If TARNAME is omitted,
  1168. # use PACKAGE to seed it. If URL is omitted, use
  1169. # `http://www.gnu.org/software/TARNAME/' if PACKAGE begins with `GNU',
  1170. # otherwise, do without.
  1171. #
  1172. # Note that the order is important: first initialize, then set the
  1173. # AC_CONFIG_SRCDIR.
  1174. m4_define([AC_INIT],
  1175. [# Forbidden tokens and exceptions.
  1176. m4_pattern_forbid([^_?A[CHUM]_])
  1177. m4_pattern_forbid([_AC_])
  1178. m4_pattern_forbid([^LIBOBJS$],
  1179. [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
  1180. # Actually reserved by M4sh.
  1181. m4_pattern_allow([^AS_FLAGS$])
  1182. # So that the autoconf-generated scripts will always re-execute
  1183. # themselves with $CONFIG_SHELL, if that's set in the environment.
  1184. m4_define([_AS_FORCE_REEXEC_WITH_CONFIG_SHELL], [yes])
  1185. AS_INIT[]dnl
  1186. AS_PREPARE[]dnl
  1187. m4_divert_push([KILL])
  1188. m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
  1189. _AC_INIT_DEFAULTS
  1190. _AC_INIT_PARSE_ARGS
  1191. _AC_INIT_DIRCHECK
  1192. _AC_INIT_SRCDIR
  1193. _AC_INIT_HELP
  1194. _AC_INIT_VERSION
  1195. _AC_INIT_CONFIG_LOG
  1196. _AC_INIT_PREPARE
  1197. _AC_INIT_NOTICE
  1198. _AC_INIT_COPYRIGHT
  1199. m4_divert_text([SHELL_FN], [
  1200. m4_text_box([Autoconf initialization.])])
  1201. m4_divert_pop
  1202. m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
  1203. dnl
  1204. dnl Substitute for predefined variables.
  1205. AC_SUBST([DEFS])dnl
  1206. AC_SUBST([ECHO_C])dnl
  1207. AC_SUBST([ECHO_N])dnl
  1208. AC_SUBST([ECHO_T])dnl
  1209. AC_SUBST([LIBS])dnl
  1210. _AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl
  1211. _AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl
  1212. _AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl
  1213. dnl
  1214. AC_LANG_PUSH(C)
  1215. ])
  1216. ## ------------------------------------------------------------- ##
  1217. ## Selecting optional features, working with optional software. ##
  1218. ## ------------------------------------------------------------- ##
  1219. # AC_PRESERVE_HELP_ORDER
  1220. # ----------------------
  1221. # Emit help strings in the order given, rather than grouping all --enable-FOO
  1222. # and all --with-BAR.
  1223. AC_DEFUN([AC_PRESERVE_HELP_ORDER],
  1224. [m4_divert_once([HELP_ENABLE], [[
  1225. Optional Features and Packages:
  1226. --disable-option-checking ignore unrecognized --enable/--with options
  1227. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  1228. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  1229. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  1230. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
  1231. m4_define([_m4_divert(HELP_ENABLE)], _m4_divert(HELP_WITH))
  1232. ])# AC_PRESERVE_HELP_ORDER
  1233. # _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  1234. # -------------------------------------------------------------------
  1235. # Common code for AC_ARG_ENABLE and AC_ARG_WITH.
  1236. # OPTION is either "enable" or "with".
  1237. #
  1238. m4_define([_AC_ENABLE_IF],
  1239. [@%:@ Check whether --$1-$2 was given.
  1240. _AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-+.], [___]), [$3], [$4])
  1241. ])
  1242. m4_define([_AC_ENABLE_IF_ACTION],
  1243. [m4_append_uniq([_AC_USER_OPTS], [$1_$2], [
  1244. ])dnl
  1245. AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl
  1246. ])
  1247. # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  1248. # ------------------------------------------------------------------------
  1249. AC_DEFUN([AC_ARG_ENABLE],
  1250. [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
  1251. [],
  1252. [m4_divert_once([HELP_ENABLE], [[
  1253. Optional Features:
  1254. --disable-option-checking ignore unrecognized --enable/--with options
  1255. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  1256. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])])dnl
  1257. m4_divert_once([HELP_ENABLE], [$2])dnl
  1258. _AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl
  1259. ])# AC_ARG_ENABLE
  1260. AU_DEFUN([AC_ENABLE],
  1261. [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
  1262. # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
  1263. # --------------------------------------------------------------------
  1264. AC_DEFUN([AC_ARG_WITH],
  1265. [AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER],
  1266. [],
  1267. [m4_divert_once([HELP_WITH], [[
  1268. Optional Packages:
  1269. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  1270. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])])
  1271. m4_divert_once([HELP_WITH], [$2])dnl
  1272. _AC_ENABLE_IF([with], [$1], [$3], [$4])dnl
  1273. ])# AC_ARG_WITH
  1274. AU_DEFUN([AC_WITH],
  1275. [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
  1276. # AC_DISABLE_OPTION_CHECKING
  1277. # --------------------------
  1278. AC_DEFUN([AC_DISABLE_OPTION_CHECKING],
  1279. [m4_divert_once([DEFAULTS], [enable_option_checking=no])
  1280. ])# AC_DISABLE_OPTION_CHECKING
  1281. ## ----------------------------------------- ##
  1282. ## Remembering variables for reconfiguring. ##
  1283. ## ----------------------------------------- ##
  1284. # AC_ARG_VAR(VARNAME, DOCUMENTATION)
  1285. # ----------------------------------
  1286. # Register VARNAME as a precious variable, and document it in
  1287. # `configure --help' (but only once).
  1288. AC_DEFUN([AC_ARG_VAR],
  1289. [m4_divert_once([HELP_VAR], [[
  1290. Some influential environment variables:]])dnl
  1291. m4_divert_once([HELP_VAR_END], [[
  1292. Use these variables to override the choices made by `configure' or to help
  1293. it to find libraries and programs with nonstandard names/locations.]])dnl
  1294. m4_expand_once([m4_divert_text([HELP_VAR],
  1295. [AS_HELP_STRING([$1], [$2], [ ])])],
  1296. [$0($1)])dnl
  1297. AC_SUBST([$1])dnl
  1298. _AC_ARG_VAR_PRECIOUS([$1])dnl
  1299. ])# AC_ARG_VAR
  1300. # _AC_ARG_VAR_PRECIOUS(VARNAME)
  1301. # -----------------------------
  1302. # Declare VARNAME is precious.
  1303. m4_define([_AC_ARG_VAR_PRECIOUS],
  1304. [m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [
  1305. ])dnl
  1306. ])
  1307. # _AC_ARG_VAR_STORE
  1308. # -----------------
  1309. # We try to diagnose when precious variables have changed. To do this,
  1310. # make two early snapshots (after the option processing to take
  1311. # explicit variables into account) of those variables: one (ac_env_)
  1312. # which represents the current run, and a second (ac_cv_env_) which,
  1313. # at the first run, will be saved in the cache. As an exception to
  1314. # the cache mechanism, its loading will override these variables (non
  1315. # `ac_cv_env_' cache value are only set when unset).
  1316. #
  1317. # In subsequent runs, after having loaded the cache, compare
  1318. # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.
  1319. m4_define([_AC_ARG_VAR_STORE],
  1320. [m4_divert_text([PARSE_ARGS],
  1321. [for ac_var in $ac_precious_vars; do
  1322. eval ac_env_${ac_var}_set=\${${ac_var}+set}
  1323. eval ac_env_${ac_var}_value=\$${ac_var}
  1324. eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  1325. eval ac_cv_env_${ac_var}_value=\$${ac_var}
  1326. done])dnl
  1327. ])
  1328. # _AC_ARG_VAR_VALIDATE
  1329. # --------------------
  1330. # The precious variables are saved twice at the beginning of
  1331. # configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and
  1332. # `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set'
  1333. # and `ac_cv_env_PRECIOUS_value' on the other hand.
  1334. #
  1335. # Now the cache has just been loaded, so `ac_cv_env_' represents the
  1336. # content of the cached values, while `ac_env_' represents that of the
  1337. # current values.
  1338. #
  1339. # So we check that `ac_env_' and `ac_cv_env_' are consistent. If
  1340. # they aren't, die.
  1341. m4_define([_AC_ARG_VAR_VALIDATE],
  1342. [m4_divert_text([INIT_PREPARE],
  1343. [# Check that the precious variables saved in the cache have kept the same
  1344. # value.
  1345. ac_cache_corrupted=false
  1346. for ac_var in $ac_precious_vars; do
  1347. eval ac_old_set=\$ac_cv_env_${ac_var}_set
  1348. eval ac_new_set=\$ac_env_${ac_var}_set
  1349. eval ac_old_val=\$ac_cv_env_${ac_var}_value
  1350. eval ac_new_val=\$ac_env_${ac_var}_value
  1351. case $ac_old_set,$ac_new_set in
  1352. set,)
  1353. AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2)
  1354. ac_cache_corrupted=: ;;
  1355. ,set)
  1356. AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2)
  1357. ac_cache_corrupted=: ;;
  1358. ,);;
  1359. *)
  1360. if test "x$ac_old_val" != "x$ac_new_val"; then
  1361. # differences in whitespace do not lead to failure.
  1362. ac_old_val_w=`echo x $ac_old_val`
  1363. ac_new_val_w=`echo x $ac_new_val`
  1364. if test "$ac_old_val_w" != "$ac_new_val_w"; then
  1365. AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2)
  1366. ac_cache_corrupted=:
  1367. else
  1368. AS_MESSAGE([warning: ignoring whitespace changes in `$ac_var' since the previous run:], 2)
  1369. eval $ac_var=\$ac_old_val
  1370. fi
  1371. AS_MESSAGE([ former value: `$ac_old_val'], 2)
  1372. AS_MESSAGE([ current value: `$ac_new_val'], 2)
  1373. fi;;
  1374. esac
  1375. # Pass precious variables to config.status.
  1376. if test "$ac_new_set" = set; then
  1377. case $ac_new_val in
  1378. *\'*) ac_arg=$ac_var=`AS_ECHO(["$ac_new_val"]) | sed "s/'/'\\\\\\\\''/g"` ;;
  1379. *) ac_arg=$ac_var=$ac_new_val ;;
  1380. esac
  1381. case " $ac_configure_args " in
  1382. *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
  1383. *) AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;;
  1384. esac
  1385. fi
  1386. done
  1387. if $ac_cache_corrupted; then
  1388. AS_MESSAGE([error: in `$ac_pwd':], 2)
  1389. AS_MESSAGE([error: changes in the environment can compromise the build], 2)
  1390. AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])
  1391. fi])dnl
  1392. ])# _AC_ARG_VAR_VALIDATE
  1393. ## ---------------------------- ##
  1394. ## Transforming program names. ##
  1395. ## ---------------------------- ##
  1396. # AC_ARG_PROGRAM
  1397. # --------------
  1398. # This macro is expanded only once, to avoid that `foo' ends up being
  1399. # installed as `ggfoo'.
  1400. AC_DEFUN_ONCE([AC_ARG_PROGRAM],
  1401. [dnl Document the options.
  1402. m4_divert_push([HELP_BEGIN])dnl
  1403. Program names:
  1404. --program-prefix=PREFIX prepend PREFIX to installed program names
  1405. --program-suffix=SUFFIX append SUFFIX to installed program names
  1406. --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  1407. m4_divert_pop([HELP_BEGIN])dnl
  1408. test "$program_prefix" != NONE &&
  1409. program_transform_name="s&^&$program_prefix&;$program_transform_name"
  1410. # Use a double $ so make ignores it.
  1411. test "$program_suffix" != NONE &&
  1412. program_transform_name="s&\$&$program_suffix&;$program_transform_name"
  1413. # Double any \ or $.
  1414. # By default was `s,x,x', remove it if useless.
  1415. [ac_script='s/[\\$]/&&/g;s/;s,x,x,$//']
  1416. program_transform_name=`AS_ECHO(["$program_transform_name"]) | sed "$ac_script"`
  1417. ])# AC_ARG_PROGRAM
  1418. ## ------------------------- ##
  1419. ## Finding auxiliary files. ##
  1420. ## ------------------------- ##
  1421. # AC_CONFIG_AUX_DIR(DIR)
  1422. # ----------------------
  1423. # Find install-sh, config.sub, config.guess, and Cygnus configure
  1424. # in directory DIR. These are auxiliary files used in configuration.
  1425. # DIR can be either absolute or relative to $srcdir.
  1426. AC_DEFUN([AC_CONFIG_AUX_DIR],
  1427. [AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)])
  1428. # AC_CONFIG_AUX_DIR_DEFAULT
  1429. # -------------------------
  1430. # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
  1431. # There's no need to call this macro explicitly; just AC_REQUIRE it.
  1432. AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
  1433. [AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")])
  1434. # AC_CONFIG_AUX_DIRS(DIR ...)
  1435. # ---------------------------
  1436. # Internal subroutine.
  1437. # Search for the configuration auxiliary files in directory list $1.
  1438. # We look only for install-sh, so users of AC_PROG_INSTALL
  1439. # do not automatically need to distribute the other auxiliary files.
  1440. AC_DEFUN([AC_CONFIG_AUX_DIRS],
  1441. [ac_aux_dir=
  1442. for ac_dir in $1; do
  1443. if test -f "$ac_dir/install-sh"; then
  1444. ac_aux_dir=$ac_dir
  1445. ac_install_sh="$ac_aux_dir/install-sh -c"
  1446. break
  1447. elif test -f "$ac_dir/install.sh"; then
  1448. ac_aux_dir=$ac_dir
  1449. ac_install_sh="$ac_aux_dir/install.sh -c"
  1450. break
  1451. elif test -f "$ac_dir/shtool"; then
  1452. ac_aux_dir=$ac_dir
  1453. ac_install_sh="$ac_aux_dir/shtool install -c"
  1454. break
  1455. fi
  1456. done
  1457. if test -z "$ac_aux_dir"; then
  1458. AC_MSG_ERROR([cannot find install-sh, install.sh, or shtool in $1])
  1459. fi
  1460. # These three variables are undocumented and unsupported,
  1461. # and are intended to be withdrawn in a future Autoconf release.
  1462. # They can cause serious problems if a builder's source tree is in a directory
  1463. # whose full name contains unusual characters.
  1464. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
  1465. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
  1466. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
  1467. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  1468. ])# AC_CONFIG_AUX_DIRS
  1469. ## ------------------------ ##
  1470. ## Finding aclocal macros. ##
  1471. ## ------------------------ ##
  1472. # AC_CONFIG_MACRO_DIR(DIR)
  1473. # ------------------------
  1474. # Declare directory containing additional macros for aclocal.
  1475. AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
  1476. ## --------------------- ##
  1477. ## Requiring aux files. ##
  1478. ## --------------------- ##
  1479. # AC_REQUIRE_AUX_FILE(FILE)
  1480. # -------------------------
  1481. # This macro does nothing, it's a hook to be read with `autoconf --trace'.
  1482. # It announces FILE is required in the auxdir.
  1483. m4_define([AC_REQUIRE_AUX_FILE],
  1484. [AS_LITERAL_WORD_IF([$1], [],
  1485. [m4_fatal([$0: requires a literal argument])])])
  1486. ## ----------------------------------- ##
  1487. ## Getting the canonical system type. ##
  1488. ## ----------------------------------- ##
  1489. # The inputs are:
  1490. # configure --host=HOST --target=TARGET --build=BUILD
  1491. #
  1492. # The rules are:
  1493. # 1. Build defaults to the current platform, as determined by config.guess.
  1494. # 2. Host defaults to build.
  1495. # 3. Target defaults to host.
  1496. # _AC_CANONICAL_SPLIT(THING)
  1497. # --------------------------
  1498. # Generate the variables THING, THING_{alias cpu vendor os}.
  1499. m4_define([_AC_CANONICAL_SPLIT],
  1500. [case $ac_cv_$1 in
  1501. *-*-*) ;;
  1502. *) AC_MSG_ERROR([invalid value of canonical $1]);;
  1503. esac
  1504. AC_SUBST([$1], [$ac_cv_$1])dnl
  1505. ac_save_IFS=$IFS; IFS='-'
  1506. set x $ac_cv_$1
  1507. shift
  1508. AC_SUBST([$1_cpu], [$[1]])dnl
  1509. AC_SUBST([$1_vendor], [$[2]])dnl
  1510. shift; shift
  1511. [# Remember, the first character of IFS is used to create $]*,
  1512. # except with old shells:
  1513. $1_os=$[*]
  1514. IFS=$ac_save_IFS
  1515. case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac
  1516. AC_SUBST([$1_os])dnl
  1517. ])# _AC_CANONICAL_SPLIT
  1518. # AC_CANONICAL_BUILD
  1519. # ------------------
  1520. AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
  1521. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  1522. AC_REQUIRE_AUX_FILE([config.sub])dnl
  1523. AC_REQUIRE_AUX_FILE([config.guess])dnl
  1524. m4_divert_once([HELP_CANON],
  1525. [[
  1526. System types:
  1527. --build=BUILD configure for building on BUILD [guessed]]])dnl
  1528. # Make sure we can run config.sub.
  1529. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
  1530. AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub])
  1531. AC_CACHE_CHECK([build system type], [ac_cv_build],
  1532. [ac_build_alias=$build_alias
  1533. test "x$ac_build_alias" = x &&
  1534. ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
  1535. test "x$ac_build_alias" = x &&
  1536. AC_MSG_ERROR([cannot guess build type; you must specify one])
  1537. ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
  1538. AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed])
  1539. ])
  1540. _AC_CANONICAL_SPLIT(build)
  1541. ])# AC_CANONICAL_BUILD
  1542. # AC_CANONICAL_HOST
  1543. # -----------------
  1544. AC_DEFUN_ONCE([AC_CANONICAL_HOST],
  1545. [AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  1546. m4_divert_once([HELP_CANON],
  1547. [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl
  1548. AC_CACHE_CHECK([host system type], [ac_cv_host],
  1549. [if test "x$host_alias" = x; then
  1550. ac_cv_host=$ac_cv_build
  1551. else
  1552. ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
  1553. AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed])
  1554. fi
  1555. ])
  1556. _AC_CANONICAL_SPLIT([host])
  1557. ])# AC_CANONICAL_HOST
  1558. # AC_CANONICAL_TARGET
  1559. # -------------------
  1560. AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
  1561. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1562. AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
  1563. m4_divert_once([HELP_CANON],
  1564. [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
  1565. AC_CACHE_CHECK([target system type], [ac_cv_target],
  1566. [if test "x$target_alias" = x; then
  1567. ac_cv_target=$ac_cv_host
  1568. else
  1569. ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
  1570. AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed])
  1571. fi
  1572. ])
  1573. _AC_CANONICAL_SPLIT([target])
  1574. # The aliases save the names the user supplied, while $host etc.
  1575. # will get canonicalized.
  1576. test -n "$target_alias" &&
  1577. test "$target_alias" != "$host_alias" &&
  1578. test "$program_prefix$program_suffix$program_transform_name" = \
  1579. NONENONEs,x,x, &&
  1580. program_prefix=${target_alias}-[]dnl
  1581. ])# AC_CANONICAL_TARGET
  1582. AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
  1583. # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
  1584. # ------------------------------------------
  1585. # If the cache file is inconsistent with the current host,
  1586. # target and build system types, execute CMD or print a default
  1587. # error message. Now handled via _AC_ARG_VAR_PRECIOUS.
  1588. AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
  1589. ## ---------------------- ##
  1590. ## Caching test results. ##
  1591. ## ---------------------- ##
  1592. # AC_SITE_LOAD
  1593. # ------------
  1594. # Look for site- or system-specific initialization scripts.
  1595. m4_define([AC_SITE_LOAD],
  1596. [# Prefer an explicitly selected file to automatically selected ones.
  1597. ac_site_file1=NONE
  1598. if test -n "$CONFIG_SITE"; then
  1599. # We do not want a PATH search for config.site.
  1600. case $CONFIG_SITE in @%:@((
  1601. -*) ac_site_file1=./$CONFIG_SITE;;
  1602. */*) ac_site_file1=$CONFIG_SITE;;
  1603. *) ac_site_file1=./$CONFIG_SITE;;
  1604. esac
  1605. fi
  1606. for ac_site_file in $ac_site_file1
  1607. do
  1608. test "x$ac_site_file" = xNONE && continue
  1609. if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
  1610. AC_MSG_NOTICE([loading site script $ac_site_file])
  1611. sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
  1612. . "$ac_site_file" \
  1613. || AC_MSG_FAILURE([failed to load site script $ac_site_file])
  1614. fi
  1615. done
  1616. ])
  1617. # AC_CACHE_LOAD
  1618. # -------------
  1619. m4_define([AC_CACHE_LOAD],
  1620. [if test -r "$cache_file"; then
  1621. # Some versions of bash will fail to source /dev/null (special files
  1622. # actually), so we avoid doing that. DJGPP emulates it as a regular file.
  1623. if test /dev/null != "$cache_file" && test -f "$cache_file"; then
  1624. AC_MSG_NOTICE([loading cache $cache_file])
  1625. case $cache_file in
  1626. [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";;
  1627. *) . "./$cache_file";;
  1628. esac
  1629. fi
  1630. else
  1631. AC_MSG_NOTICE([creating cache $cache_file])
  1632. >$cache_file
  1633. fi
  1634. ])# AC_CACHE_LOAD
  1635. # _AC_CACHE_DUMP
  1636. # --------------
  1637. # Dump the cache to stdout. It can be in a pipe (this is a requirement).
  1638. m4_define([_AC_CACHE_DUMP],
  1639. [# The following way of writing the cache mishandles newlines in values,
  1640. # but we know of no workaround that is simple, portable, and efficient.
  1641. # So, we kill variables containing newlines.
  1642. # Ultrix sh set writes to stderr and can't be redirected directly,
  1643. # and sets the high bit in the cache file unless we assign to the vars.
  1644. (
  1645. for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do
  1646. eval ac_val=\$$ac_var
  1647. case $ac_val in #(
  1648. *${as_nl}*)
  1649. case $ac_var in #(
  1650. *_cv_*) AC_MSG_WARN([cache variable $ac_var contains a newline]) ;;
  1651. esac
  1652. case $ac_var in #(
  1653. _ | IFS | as_nl) ;; #(
  1654. BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
  1655. *) AS_UNSET([$ac_var]) ;;
  1656. esac ;;
  1657. esac
  1658. done
  1659. (set) 2>&1 |
  1660. case $as_nl`(ac_space=' '; set) 2>&1` in #(
  1661. *${as_nl}ac_space=\ *)
  1662. # `set' does not quote correctly, so add quotes: double-quote
  1663. # substitution turns \\\\ into \\, and sed turns \\ into \.
  1664. sed -n \
  1665. ["s/'/'\\\\''/g;
  1666. s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
  1667. ;; #(
  1668. *)
  1669. # `set' quotes correctly as required by POSIX, so do not add quotes.
  1670. sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"]
  1671. ;;
  1672. esac |
  1673. sort
  1674. )dnl
  1675. ])# _AC_CACHE_DUMP
  1676. # AC_CACHE_SAVE
  1677. # -------------
  1678. # Save the cache.
  1679. # Allow a site initialization script to override cache values.
  1680. m4_define([AC_CACHE_SAVE],
  1681. [cat >confcache <<\_ACEOF
  1682. # This file is a shell script that caches the results of configure
  1683. # tests run on this system so they can be shared between configure
  1684. # scripts and configure runs, see configure's option --config-cache.
  1685. # It is not useful on other systems. If it contains results you don't
  1686. # want to keep, you may remove or edit it.
  1687. #
  1688. # config.status only pays attention to the cache file if you give it
  1689. # the --recheck option to rerun configure.
  1690. #
  1691. # `ac_cv_env_foo' variables (set or unset) will be overridden when
  1692. # loading this file, other *unset* `ac_cv_foo' will be assigned the
  1693. # following values.
  1694. _ACEOF
  1695. _AC_CACHE_DUMP() |
  1696. sed ['
  1697. /^ac_cv_env_/b end
  1698. t clear
  1699. :clear
  1700. s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
  1701. t end
  1702. s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
  1703. :end'] >>confcache
  1704. if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  1705. if test -w "$cache_file"; then
  1706. if test "x$cache_file" != "x/dev/null"; then
  1707. AC_MSG_NOTICE([updating cache $cache_file])
  1708. if test ! -f "$cache_file" || test -h "$cache_file"; then
  1709. cat confcache >"$cache_file"
  1710. else
  1711. dnl Try to update the cache file atomically even on different mount points;
  1712. dnl at the same time, avoid filename limitation issues in the common case.
  1713. case $cache_file in #(
  1714. */* | ?:*)
  1715. mv -f confcache "$cache_file"$$ &&
  1716. mv -f "$cache_file"$$ "$cache_file" ;; #(
  1717. *)
  1718. mv -f confcache "$cache_file" ;;
  1719. esac
  1720. fi
  1721. fi
  1722. else
  1723. AC_MSG_NOTICE([not updating unwritable cache $cache_file])
  1724. fi
  1725. fi
  1726. rm -f confcache[]dnl
  1727. ])# AC_CACHE_SAVE
  1728. # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
  1729. # ------------------------------------------
  1730. # The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
  1731. # Should be dnl'ed. Try to catch common mistakes.
  1732. m4_defun([AC_CACHE_VAL],
  1733. [AS_LITERAL_WORD_IF([$1], [m4_if(m4_index(m4_quote($1), [_cv_]), [-1],
  1734. [AC_DIAGNOSE([syntax],
  1735. [$0($1, ...): suspicious cache-id, must contain _cv_ to be cached])])])dnl
  1736. m4_if(m4_index([$2], [AC_DEFINE]), [-1], [],
  1737. [AC_DIAGNOSE([syntax],
  1738. [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
  1739. [where no actions should be taken])])dnl
  1740. m4_if(m4_index([$2], [AC_SUBST]), [-1], [],
  1741. [AC_DIAGNOSE([syntax],
  1742. [$0($1, ...): suspicious presence of an AC_SUBST in the second argument, ]dnl
  1743. [where no actions should be taken])])dnl
  1744. AS_VAR_SET_IF([$1],
  1745. [_AS_ECHO_N([(cached) ])],
  1746. [$2])
  1747. ])
  1748. # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
  1749. # -------------------------------------------
  1750. # Do not call this macro with a dnl right behind.
  1751. m4_defun([AC_CACHE_CHECK],
  1752. [AC_MSG_CHECKING([$1])
  1753. AC_CACHE_VAL([$2], [$3])dnl
  1754. AS_LITERAL_WORD_IF([$2],
  1755. [AC_MSG_RESULT([$$2])],
  1756. [AS_VAR_COPY([ac_res], [$2])
  1757. AC_MSG_RESULT([$ac_res])])dnl
  1758. ])
  1759. # _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION,
  1760. # [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS])
  1761. # --------------------------------------------------------------
  1762. AC_DEFUN([_AC_CACHE_CHECK_INT],
  1763. [AC_CACHE_CHECK([$1], [$2],
  1764. [AC_COMPUTE_INT([$2], [$3], [$4], [$5])])
  1765. ])# _AC_CACHE_CHECK_INT
  1766. ## ---------------------- ##
  1767. ## Defining CPP symbols. ##
  1768. ## ---------------------- ##
  1769. # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)
  1770. # -------------------------------------------
  1771. # Used by --trace to collect the list of AC_DEFINEd macros.
  1772. m4_define([AC_DEFINE_TRACE_LITERAL],
  1773. [m4_pattern_allow([^$1$])dnl
  1774. AS_IDENTIFIER_IF([$1], [],
  1775. [m4_warn([syntax], [AC_DEFINE: not an identifier: $1])])dnl
  1776. ])# AC_DEFINE_TRACE_LITERAL
  1777. # AC_DEFINE_TRACE(CPP-SYMBOL)
  1778. # ---------------------------
  1779. # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
  1780. # out non literal symbols. CPP-SYMBOL must not include any parameters.
  1781. m4_define([AC_DEFINE_TRACE],
  1782. [AS_LITERAL_WORD_IF([$1], [AC_DEFINE_TRACE_LITERAL(_m4_expand([$1]))])])
  1783. # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])
  1784. # -------------------------------------------
  1785. # Set VARIABLE to VALUE, verbatim, or 1. Remember the value
  1786. # and if VARIABLE is affected the same VALUE, do nothing, else
  1787. # die. The third argument is used by autoheader.
  1788. m4_define([AC_DEFINE], [_AC_DEFINE_Q([_$0], $@)])
  1789. # _AC_DEFINE(STRING)
  1790. # ------------------
  1791. # Append the pre-expanded STRING and a newline to confdefs.h, as if by
  1792. # a quoted here-doc.
  1793. m4_define([_AC_DEFINE],
  1794. [AS_ECHO(["AS_ESCAPE([[$1]])"]) >>confdefs.h])
  1795. # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
  1796. # ----------------------------------------------------
  1797. # Similar, but perform shell substitutions $ ` \ once on VALUE, as
  1798. # in an unquoted here-doc.
  1799. m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([_$0], $@)])
  1800. # _AC_DEFINE_UNQUOTED(STRING)
  1801. # ---------------------------
  1802. # Append the pre-expanded STRING and a newline to confdefs.h, as if
  1803. # with an unquoted here-doc, but avoiding a fork in the common case of
  1804. # no backslash, no command substitution, no complex variable
  1805. # substitution, and no quadrigraphs.
  1806. m4_define([_AC_DEFINE_UNQUOTED],
  1807. [m4_if(m4_bregexp([$1], [\\\|`\|\$(\|\${\|@]), [-1],
  1808. [AS_ECHO(["AS_ESCAPE([$1], [""])"]) >>confdefs.h],
  1809. [cat >>confdefs.h <<_ACEOF
  1810. [$1]
  1811. _ACEOF])])
  1812. # _AC_DEFINE_Q(MACRO, VARIABLE, [VALUE], [DESCRIPTION])
  1813. # -----------------------------------------------------
  1814. # Internal function that performs common elements of AC_DEFINE{,_UNQUOTED}.
  1815. # MACRO must take one argument, which is the fully expanded string to
  1816. # append to confdefs.h as if by a possibly-quoted here-doc.
  1817. #
  1818. # m4_index is roughly 5 to 8 times faster than m4_bpatsubst, so we use
  1819. # m4_format rather than regex to grab prefix up to first (). AC_name
  1820. # is defined with over-quotation, so that we can avoid m4_defn; this
  1821. # is only safe because the name should not contain $.
  1822. #
  1823. # Guarantee a match in m4_index, so as to avoid a bug with precision
  1824. # -1 in m4_format in older m4.
  1825. m4_define([_AC_DEFINE_Q],
  1826. [m4_pushdef([AC_name], m4_format([[[%.*s]]], m4_index([$2(], [(]), [$2]))]dnl
  1827. [AC_DEFINE_TRACE(AC_name)]dnl
  1828. [m4_cond([m4_index([$3], [
  1829. ])], [-1], [],
  1830. [m4_bregexp([[$3]], [[^\\]
  1831. ], [-])], [], [],
  1832. [m4_warn([syntax], [AC_DEFINE]m4_if([$1], [_AC_DEFINE], [],
  1833. [[_UNQUOTED]])[: `$3' is not a valid preprocessor define value])])]dnl
  1834. [m4_ifval([$4], [AH_TEMPLATE(AC_name, [$4])
  1835. ])_m4_popdef([AC_name])]dnl
  1836. [$1(m4_expand([[@%:@define] $2 ]m4_if([$#], 2, 1,
  1837. [$3], [], [/**/], [[$3]])))
  1838. ])
  1839. ## -------------------------- ##
  1840. ## Setting output variables. ##
  1841. ## -------------------------- ##
  1842. # AC_SUBST_TRACE(VARIABLE)
  1843. # ------------------------
  1844. # This macro is used with --trace to collect the list of substituted variables.
  1845. m4_define([AC_SUBST_TRACE])
  1846. # AC_SUBST(VARIABLE, [VALUE])
  1847. # ---------------------------
  1848. # Create an output variable from a shell VARIABLE. If VALUE is given
  1849. # assign it to VARIABLE. Use `""' if you want to set VARIABLE to an
  1850. # empty value, not an empty second argument.
  1851. #
  1852. m4_define([AC_SUBST],
  1853. [AS_IDENTIFIER_IF([$1], [],
  1854. [m4_fatal([$0: `$1' is not a valid shell variable name])])]dnl
  1855. [AC_SUBST_TRACE([$1])]dnl
  1856. [m4_pattern_allow([^$1$])]dnl
  1857. [m4_ifvaln([$2], [$1=$2])[]]dnl
  1858. [m4_set_add([_AC_SUBST_VARS], [$1])])# AC_SUBST
  1859. # AC_SUBST_FILE(VARIABLE)
  1860. # -----------------------
  1861. # Read the comments of the preceding macro.
  1862. m4_define([AC_SUBST_FILE],
  1863. [m4_pattern_allow([^$1$])dnl
  1864. m4_append_uniq([_AC_SUBST_FILES], [$1], [
  1865. ])])
  1866. ## --------------------------------------- ##
  1867. ## Printing messages at autoconf runtime. ##
  1868. ## --------------------------------------- ##
  1869. # In fact, I think we should promote the use of m4_warn and m4_fatal
  1870. # directly. This will also avoid to some people to get it wrong
  1871. # between AC_FATAL and AC_MSG_ERROR.
  1872. # AC_DIAGNOSE(CATEGORY, MESSAGE)
  1873. # AC_FATAL(MESSAGE, [EXIT-STATUS])
  1874. # --------------------------------
  1875. m4_define([AC_DIAGNOSE], [m4_warn($@)])
  1876. m4_define([AC_FATAL], [m4_fatal($@)])
  1877. # AC_WARNING(MESSAGE)
  1878. # -------------------
  1879. # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
  1880. # specified.
  1881. m4_define([AC_WARNING],
  1882. [AC_DIAGNOSE([syntax], [$1])])
  1883. ## ---------------------------------------- ##
  1884. ## Printing messages at configure runtime. ##
  1885. ## ---------------------------------------- ##
  1886. # AC_MSG_CHECKING(FEATURE)
  1887. # ------------------------
  1888. m4_define([AC_MSG_CHECKING],
  1889. [{ _AS_ECHO_LOG([checking $1])
  1890. _AS_ECHO_N([checking $1... ]); }dnl
  1891. ])
  1892. # AC_MSG_RESULT(RESULT)
  1893. # ---------------------
  1894. m4_define([AC_MSG_RESULT],
  1895. [{ _AS_ECHO_LOG([result: $1])
  1896. _AS_ECHO([$1]); }dnl
  1897. ])
  1898. # AC_MSG_WARN(PROBLEM)
  1899. # AC_MSG_NOTICE(STRING)
  1900. # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
  1901. # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])
  1902. # ----------------------------------------
  1903. m4_copy([AS_WARN], [AC_MSG_WARN])
  1904. m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
  1905. m4_copy([AS_ERROR], [AC_MSG_ERROR])
  1906. m4_define([AC_MSG_FAILURE],
  1907. [{ AS_MESSAGE([error: in `$ac_pwd':], 2)
  1908. AC_MSG_ERROR([$1
  1909. See `config.log' for more details], [$2]); }])
  1910. # _AC_MSG_LOG_CONFTEST
  1911. # --------------------
  1912. m4_define([_AC_MSG_LOG_CONFTEST],
  1913. [AS_ECHO(["$as_me: failed program was:"]) >&AS_MESSAGE_LOG_FD
  1914. sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD
  1915. ])
  1916. # AU::AC_CHECKING(FEATURE)
  1917. # ------------------------
  1918. AU_DEFUN([AC_CHECKING],
  1919. [AS_MESSAGE([checking $1...])])
  1920. # AU::AC_MSG_RESULT_UNQUOTED(RESULT)
  1921. # ----------------------------------
  1922. # No escaping, so it performed also backtick substitution.
  1923. AU_DEFUN([AC_MSG_RESULT_UNQUOTED],
  1924. [_AS_ECHO_UNQUOTED([$as_me:${as_lineno-$LINENO}: result: $1], AS_MESSAGE_LOG_FD)
  1925. _AS_ECHO_UNQUOTED([$1])[]dnl
  1926. ])
  1927. # AU::AC_VERBOSE(STRING)
  1928. # ----------------------
  1929. AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
  1930. ## ---------------------------- ##
  1931. ## Compiler-running mechanics. ##
  1932. ## ---------------------------- ##
  1933. # _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
  1934. # ----------------------------------
  1935. # Eval COMMAND, save the exit status in ac_status, and log it. The return
  1936. # code is 0 if COMMAND succeeded, so that it can be used directly in AS_IF
  1937. # constructs.
  1938. AC_DEFUN([_AC_RUN_LOG],
  1939. [{ { $2; } >&AS_MESSAGE_LOG_FD
  1940. ($1) 2>&AS_MESSAGE_LOG_FD
  1941. ac_status=$?
  1942. _AS_ECHO_LOG([\$? = $ac_status])
  1943. test $ac_status = 0; }])
  1944. # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
  1945. # -----------------------------------------
  1946. # Run COMMAND, save its stderr into conftest.err, save the exit status
  1947. # in ac_status, and log it. Don't forget to clean up conftest.err after
  1948. # use.
  1949. # Note that when tracing, most shells will leave the traces in stderr
  1950. # starting with "+": that's what this macro tries to address.
  1951. # The return code is 0 if COMMAND succeeded, so that it can be used directly
  1952. # in AS_IF constructs.
  1953. AC_DEFUN([_AC_RUN_LOG_STDERR],
  1954. [{ { $2; } >&AS_MESSAGE_LOG_FD
  1955. ($1) 2>conftest.err
  1956. ac_status=$?
  1957. if test -s conftest.err; then
  1958. grep -v '^ *+' conftest.err >conftest.er1
  1959. cat conftest.er1 >&AS_MESSAGE_LOG_FD
  1960. mv -f conftest.er1 conftest.err
  1961. fi
  1962. _AS_ECHO_LOG([\$? = $ac_status])
  1963. test $ac_status = 0; }])
  1964. # _AC_RUN_LOG_LIMIT(COMMAND, LOG-COMMANDS, [LINES])
  1965. # -------------------------------------------------
  1966. # Like _AC_RUN_LOG, but only log LINES lines from stderr,
  1967. # defaulting to 10 lines.
  1968. AC_DEFUN([_AC_RUN_LOG_LIMIT],
  1969. [{ { $2; } >&AS_MESSAGE_LOG_FD
  1970. ($1) 2>conftest.err
  1971. ac_status=$?
  1972. if test -s conftest.err; then
  1973. sed 'm4_default([$3], [10])a\
  1974. ... rest of stderr output deleted ...
  1975. m4_default([$3], [10])q' conftest.err >conftest.er1
  1976. cat conftest.er1 >&AS_MESSAGE_LOG_FD
  1977. fi
  1978. rm -f conftest.er1 conftest.err
  1979. _AS_ECHO_LOG([\$? = $ac_status])
  1980. test $ac_status = 0; }])
  1981. # _AC_DO_ECHO(COMMAND)
  1982. # --------------------
  1983. # Echo COMMAND. This is designed to be used just before evaluating COMMAND.
  1984. AC_DEFUN([_AC_DO_ECHO],
  1985. [m4_if([$1], [$ac_try], [], [ac_try="$1"
  1986. ])]dnl
  1987. dnl If the string contains '\"', '`', or '\\', then just echo it rather
  1988. dnl than expanding it. This is a hack, but it is safer, while also
  1989. dnl typically expanding simple substrings like '$CC', which is what we want.
  1990. dnl
  1991. dnl Much of this macro body is quoted, to work around misuses like
  1992. dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))',
  1993. dnl which underquotes the 3rd arg and would misbehave if we didn't quote here.
  1994. dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse
  1995. dnl underquoting misuses, such as
  1996. dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'.
  1997. dnl We normally wouldn't bother with this kind of workaround for invalid code
  1998. dnl but this change was put in just before Autoconf 2.60 and we wanted to
  1999. dnl minimize the integration hassle.
  2000. [[case "(($ac_try" in
  2001. *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  2002. *) ac_try_echo=$ac_try;;
  2003. esac
  2004. eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""]
  2005. AS_ECHO(["$ac_try_echo"])])
  2006. # _AC_DO(COMMAND)
  2007. # ---------------
  2008. # Eval COMMAND, save the exit status in ac_status, and log it.
  2009. # For internal use only.
  2010. AC_DEFUN([_AC_DO],
  2011. [_AC_RUN_LOG([eval "$1"],
  2012. [_AC_DO_ECHO([$1])])])
  2013. # _AC_DO_STDERR(COMMAND)
  2014. # ----------------------
  2015. # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
  2016. AC_DEFUN([_AC_DO_STDERR],
  2017. [_AC_RUN_LOG_STDERR([eval "$1"],
  2018. [_AC_DO_ECHO([$1])])])
  2019. # _AC_DO_VAR(VARIABLE)
  2020. # --------------------
  2021. # Evaluate "$VARIABLE", which should be a valid shell command.
  2022. # The purpose of this macro is to write "configure:123: command line"
  2023. # into config.log for every test run.
  2024. AC_DEFUN([_AC_DO_VAR],
  2025. [_AC_DO([$$1])])
  2026. # _AC_DO_TOKENS(COMMAND)
  2027. # ----------------------
  2028. # Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of
  2029. # tokens of the shell command language.
  2030. AC_DEFUN([_AC_DO_TOKENS],
  2031. [{ ac_try='$1'
  2032. _AC_DO([$ac_try]); }])
  2033. # _AC_DO_LIMIT(COMMAND, [LINES])
  2034. # ------------------------------
  2035. # Like _AC_DO, but limit the amount of stderr lines logged to LINES.
  2036. # For internal use only.
  2037. AC_DEFUN([_AC_DO_LIMIT],
  2038. [_AC_RUN_LOG_LIMIT([eval "$1"],
  2039. [_AC_DO_ECHO([$1])], [$2])])
  2040. # _AC_EVAL(COMMAND)
  2041. # -----------------
  2042. # Eval COMMAND, save the exit status in ac_status, and log it.
  2043. # Unlike _AC_DO, this macro mishandles quoted arguments in some cases.
  2044. # It is present only for backward compatibility with previous Autoconf versions.
  2045. AC_DEFUN([_AC_EVAL],
  2046. [_AC_RUN_LOG([eval $1],
  2047. [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])])
  2048. # _AC_EVAL_STDERR(COMMAND)
  2049. # ------------------------
  2050. # Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND.
  2051. # Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases.
  2052. # It is present only for backward compatibility with previous Autoconf versions.
  2053. AC_DEFUN([_AC_EVAL_STDERR],
  2054. [_AC_RUN_LOG_STDERR([eval $1],
  2055. [eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$1\""])])
  2056. # AC_TRY_EVAL(VARIABLE)
  2057. # ---------------------
  2058. # Evaluate $VARIABLE, which should be a valid shell command.
  2059. # The purpose of this macro is to write "configure:123: command line"
  2060. # into config.log for every test run.
  2061. #
  2062. # The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
  2063. # undocumented, and should not be used.
  2064. # They may be removed or their API changed in a future release.
  2065. # Autoconf itself no longer uses these two macros; they are present
  2066. # only for backward compatibility with previous versions of Autoconf.
  2067. # Not every shell command will work due to problems with eval
  2068. # and quoting, and the rules for exactly what does work are tricky.
  2069. # Worse, due to double-expansion during evaluation, arbitrary unintended
  2070. # shell commands could be executed in some situations.
  2071. AC_DEFUN([AC_TRY_EVAL],
  2072. [_AC_EVAL([$$1])])
  2073. # AC_TRY_COMMAND(COMMAND)
  2074. # -----------------------
  2075. # Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of
  2076. # tokens of the shell command language.
  2077. # This macro should not be used; see the comments under AC_TRY_EVAL for why.
  2078. AC_DEFUN([AC_TRY_COMMAND],
  2079. [{ ac_try='$1'
  2080. _AC_EVAL([$ac_try]); }])
  2081. # AC_RUN_LOG(COMMAND)
  2082. # -------------------
  2083. AC_DEFUN([AC_RUN_LOG],
  2084. [_AC_RUN_LOG([$1],
  2085. [AS_ECHO(["$as_me:${as_lineno-$LINENO}: AS_ESCAPE([$1])"])])])
  2086. ## ------------------------ ##
  2087. ## Examining declarations. ##
  2088. ## ------------------------ ##
  2089. # _AC_PREPROC_IFELSE_BODY
  2090. # -----------------------
  2091. # Shell function body for _AC_PREPROC_IFELSE.
  2092. m4_define([_AC_PREPROC_IFELSE_BODY],
  2093. [ AS_LINENO_PUSH([$[]1])
  2094. AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) > conftest.i && {
  2095. test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
  2096. test ! -s conftest.err
  2097. }],
  2098. [ac_retval=0],
  2099. [_AC_MSG_LOG_CONFTEST
  2100. ac_retval=1])
  2101. AS_LINENO_POP
  2102. AS_SET_STATUS([$ac_retval])
  2103. ])# _AC_PREPROC_IFELSE_BODY
  2104. # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2105. # ----------------------------------------------------------------
  2106. # Try to preprocess PROGRAM.
  2107. #
  2108. # This macro can be used during the selection of a preprocessor.
  2109. # eval is necessary to expand ac_cpp.
  2110. AC_DEFUN([_AC_PREPROC_IFELSE],
  2111. [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_cpp],
  2112. [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_cpp], [LINENO],
  2113. [Try to preprocess conftest.$ac_ext, and return whether this succeeded.])],
  2114. [$0_BODY])]dnl
  2115. [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
  2116. [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3])
  2117. rm -f conftest.err conftest.i[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
  2118. ])# _AC_PREPROC_IFELSE
  2119. # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2120. # ---------------------------------------------------------------
  2121. # Try to preprocess PROGRAM. Requires that the preprocessor for the
  2122. # current language was checked for, hence do not use this macro in macros
  2123. # looking for a preprocessor.
  2124. AC_DEFUN([AC_PREPROC_IFELSE],
  2125. [AC_LANG_PREPROC_REQUIRE()dnl
  2126. _AC_PREPROC_IFELSE($@)])
  2127. # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2128. # ---------------------------------------------------------
  2129. # AC_TRY_CPP is used to check whether particular header files exist.
  2130. # (But it actually tests whether INCLUDES produces no CPP errors.)
  2131. #
  2132. # INCLUDES are not defaulted and are double quoted.
  2133. AU_DEFUN([AC_TRY_CPP],
  2134. [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
  2135. # AC_EGREP_CPP(PATTERN, PROGRAM,
  2136. # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  2137. # ------------------------------------------------------
  2138. # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
  2139. # come early, it is not included in AC_BEFORE checks.
  2140. AC_DEFUN([AC_EGREP_CPP],
  2141. [AC_LANG_PREPROC_REQUIRE()dnl
  2142. AC_REQUIRE([AC_PROG_EGREP])dnl
  2143. AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
  2144. AS_IF([dnl eval is necessary to expand ac_cpp.
  2145. dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
  2146. (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
  2147. dnl Quote $1 to prevent m4 from eating character classes
  2148. $EGREP "[$1]" >/dev/null 2>&1],
  2149. [$3],
  2150. [$4])
  2151. rm -f conftest*
  2152. ])# AC_EGREP_CPP
  2153. # AC_EGREP_HEADER(PATTERN, HEADER-FILE,
  2154. # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  2155. # ---------------------------------------------------------
  2156. AC_DEFUN([AC_EGREP_HEADER],
  2157. [AC_EGREP_CPP([$1],
  2158. [#include <$2>
  2159. ], [$3], [$4])])
  2160. ## ------------------ ##
  2161. ## Examining syntax. ##
  2162. ## ------------------ ##
  2163. # _AC_COMPILE_IFELSE_BODY
  2164. # -----------------------
  2165. # Shell function body for _AC_COMPILE_IFELSE.
  2166. m4_define([_AC_COMPILE_IFELSE_BODY],
  2167. [ AS_LINENO_PUSH([$[]1])
  2168. rm -f conftest.$ac_objext
  2169. AS_IF([_AC_DO_STDERR($ac_compile) && {
  2170. test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
  2171. test ! -s conftest.err
  2172. } && test -s conftest.$ac_objext],
  2173. [ac_retval=0],
  2174. [_AC_MSG_LOG_CONFTEST
  2175. ac_retval=1])
  2176. AS_LINENO_POP
  2177. AS_SET_STATUS([$ac_retval])
  2178. ])# _AC_COMPILE_IFELSE_BODY
  2179. # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2180. # ----------------------------------------------------------------
  2181. # Try to compile PROGRAM.
  2182. # This macro can be used during the selection of a compiler.
  2183. AC_DEFUN([_AC_COMPILE_IFELSE],
  2184. [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_compile],
  2185. [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_compile], [LINENO],
  2186. [Try to compile conftest.$ac_ext, and return whether this succeeded.])],
  2187. [$0_BODY])]dnl
  2188. [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
  2189. [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3])
  2190. rm -f core conftest.err conftest.$ac_objext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
  2191. ])# _AC_COMPILE_IFELSE
  2192. # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2193. # ---------------------------------------------------------------
  2194. # Try to compile PROGRAM. Requires that the compiler for the current
  2195. # language was checked for, hence do not use this macro in macros looking
  2196. # for a compiler.
  2197. AC_DEFUN([AC_COMPILE_IFELSE],
  2198. [AC_LANG_COMPILER_REQUIRE()dnl
  2199. _AC_COMPILE_IFELSE($@)])
  2200. # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
  2201. # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2202. # ---------------------------------------------------
  2203. AU_DEFUN([AC_TRY_COMPILE],
  2204. [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
  2205. ## --------------------- ##
  2206. ## Examining libraries. ##
  2207. ## --------------------- ##
  2208. # _AC_LINK_IFELSE_BODY
  2209. # --------------------
  2210. # Shell function body for _AC_LINK_IFELSE.
  2211. m4_define([_AC_LINK_IFELSE_BODY],
  2212. [ AS_LINENO_PUSH([$[]1])
  2213. rm -f conftest.$ac_objext conftest$ac_exeext
  2214. AS_IF([_AC_DO_STDERR($ac_link) && {
  2215. test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
  2216. test ! -s conftest.err
  2217. } && test -s conftest$ac_exeext && {
  2218. test "$cross_compiling" = yes ||
  2219. AS_TEST_X([conftest$ac_exeext])
  2220. }],
  2221. [ac_retval=0],
  2222. [_AC_MSG_LOG_CONFTEST
  2223. ac_retval=1])
  2224. # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  2225. # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  2226. # interfere with the next link command; also delete a directory that is
  2227. # left behind by Apple's compiler. We do this before executing the actions.
  2228. rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2229. AS_LINENO_POP
  2230. AS_SET_STATUS([$ac_retval])
  2231. ])# _AC_LINK_IFELSE_BODY
  2232. # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2233. # -------------------------------------------------------------
  2234. # Try to link PROGRAM.
  2235. # This macro can be used during the selection of a compiler.
  2236. #
  2237. # Test that resulting file is executable; see the problem reported by mwoehlke
  2238. # in <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
  2239. # But skip the test when cross-compiling, to prevent problems like the one
  2240. # reported by Chris Johns in
  2241. # <http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html>.
  2242. #
  2243. AC_DEFUN([_AC_LINK_IFELSE],
  2244. [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_link],
  2245. [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_link], [LINENO],
  2246. [Try to link conftest.$ac_ext, and return whether this succeeded.])],
  2247. [$0_BODY])]dnl
  2248. [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
  2249. [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_link "$LINENO"], [$2], [$3])
  2250. rm -f core conftest.err conftest.$ac_objext \
  2251. conftest$ac_exeext[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
  2252. ])# _AC_LINK_IFELSE
  2253. # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2254. # ------------------------------------------------------------
  2255. # Try to link PROGRAM. Requires that the compiler for the current
  2256. # language was checked for, hence do not use this macro in macros looking
  2257. # for a compiler.
  2258. AC_DEFUN([AC_LINK_IFELSE],
  2259. [AC_LANG_COMPILER_REQUIRE()dnl
  2260. _AC_LINK_IFELSE($@)])
  2261. # AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
  2262. # [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2263. # ------------------------------------------------
  2264. # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
  2265. AU_DEFUN([AC_TRY_LINK],
  2266. [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
  2267. # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
  2268. # ACTION-IF-TRUE, [ACTION-IF-FALSE])
  2269. # ---------------------------------------------------
  2270. AU_DEFUN([AC_COMPILE_CHECK],
  2271. [m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl
  2272. AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])])
  2273. ## ------------------------------- ##
  2274. ## Checking for runtime features. ##
  2275. ## ------------------------------- ##
  2276. # _AC_RUN_IFELSE_BODY
  2277. # -------------------
  2278. # Shell function body for _AC_RUN_IFELSE.
  2279. m4_define([_AC_RUN_IFELSE_BODY],
  2280. [ AS_LINENO_PUSH([$[]1])
  2281. AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)],
  2282. [ac_retval=0],
  2283. [AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
  2284. _AC_MSG_LOG_CONFTEST
  2285. ac_retval=$ac_status])
  2286. rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  2287. AS_LINENO_POP
  2288. AS_SET_STATUS([$ac_retval])
  2289. ])# _AC_RUN_IFELSE_BODY
  2290. # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
  2291. # ------------------------------------------------------------
  2292. # Compile, link, and run.
  2293. # This macro can be used during the selection of a compiler.
  2294. # We also remove conftest.o as if the compilation fails, some compilers
  2295. # don't remove it. We remove gmon.out and bb.out, which may be
  2296. # created during the run if the program is built with profiling support.
  2297. AC_DEFUN([_AC_RUN_IFELSE],
  2298. [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_try_run],
  2299. [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_try_run], [LINENO],
  2300. [Try to link conftest.$ac_ext, and return whether this succeeded.
  2301. Assumes that executables *can* be run.])],
  2302. [$0_BODY])]dnl
  2303. [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
  2304. [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_run "$LINENO"], [$2], [$3])
  2305. rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  2306. conftest.$ac_objext conftest.beam[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
  2307. ])# _AC_RUN_IFELSE
  2308. # AC_RUN_IFELSE(PROGRAM,
  2309. # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
  2310. # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
  2311. # ----------------------------------------------------------
  2312. # Compile, link, and run. Requires that the compiler for the current
  2313. # language was checked for, hence do not use this macro in macros looking
  2314. # for a compiler.
  2315. AC_DEFUN([AC_RUN_IFELSE],
  2316. [AC_LANG_COMPILER_REQUIRE()dnl
  2317. m4_ifval([$4], [],
  2318. [AC_DIAGNOSE([cross],
  2319. [$0 called without default to allow cross compiling])])dnl
  2320. AS_IF([test "$cross_compiling" = yes],
  2321. [m4_default([$4],
  2322. [AC_MSG_FAILURE([cannot run test program while cross compiling])])],
  2323. [_AC_RUN_IFELSE($@)])
  2324. ])
  2325. # AC_TRY_RUN(PROGRAM,
  2326. # [ACTION-IF-TRUE], [ACTION-IF-FALSE],
  2327. # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
  2328. # -------------------------------------------------------
  2329. AU_DEFUN([AC_TRY_RUN],
  2330. [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
  2331. ## ------------------------------------- ##
  2332. ## Checking for the existence of files. ##
  2333. ## ------------------------------------- ##
  2334. # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  2335. # -------------------------------------------------------------
  2336. #
  2337. # Check for the existence of FILE.
  2338. AC_DEFUN([AC_CHECK_FILE],
  2339. [AC_DIAGNOSE([cross],
  2340. [cannot check for file existence when cross compiling])dnl
  2341. AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
  2342. AC_CACHE_CHECK([for $1], [ac_File],
  2343. [test "$cross_compiling" = yes &&
  2344. AC_MSG_ERROR([cannot check for file existence when cross compiling])
  2345. if test -r "$1"; then
  2346. AS_VAR_SET([ac_File], [yes])
  2347. else
  2348. AS_VAR_SET([ac_File], [no])
  2349. fi])
  2350. AS_VAR_IF([ac_File], [yes], [$2], [$3])
  2351. AS_VAR_POPDEF([ac_File])dnl
  2352. ])# AC_CHECK_FILE
  2353. # _AC_CHECK_FILES(FILE)
  2354. # ---------------------
  2355. # Helper to AC_CHECK_FILES, which generates two of the three arguments
  2356. # to AC_CHECK_FILE based on FILE.
  2357. m4_define([_AC_CHECK_FILES],
  2358. [[$1], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1],
  2359. [Define to 1 if you have the file `$1'.])]])
  2360. # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  2361. # -----------------------------------------------------------------
  2362. # For each word in the whitespace-separated FILE list, perform either
  2363. # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND. For files that exist, also
  2364. # provide the preprocessor variable HAVE_FILE.
  2365. AC_DEFUN([AC_CHECK_FILES],
  2366. [m4_map_args_w([$1], [AC_CHECK_FILE(_$0(], [)[$2], [$3])])])
  2367. ## ------------------------------- ##
  2368. ## Checking for declared symbols. ##
  2369. ## ------------------------------- ##
  2370. # _AC_CHECK_DECL_BODY
  2371. # -------------------
  2372. # Shell function body for AC_CHECK_DECL.
  2373. m4_define([_AC_CHECK_DECL_BODY],
  2374. [ AS_LINENO_PUSH([$[]1])
  2375. [as_decl_name=`echo $][2|sed 's/ *(.*//'`]
  2376. [as_decl_use=`echo $][2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`]
  2377. AC_CACHE_CHECK([whether $as_decl_name is declared], [$[]3],
  2378. [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]4],
  2379. [@%:@ifndef $[]as_decl_name
  2380. @%:@ifdef __cplusplus
  2381. (void) $[]as_decl_use;
  2382. @%:@else
  2383. (void) $[]as_decl_name;
  2384. @%:@endif
  2385. @%:@endif
  2386. ])],
  2387. [AS_VAR_SET([$[]3], [yes])],
  2388. [AS_VAR_SET([$[]3], [no])])])
  2389. AS_LINENO_POP
  2390. ])# _AC_CHECK_DECL_BODY
  2391. # AC_CHECK_DECL(SYMBOL,
  2392. # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
  2393. # [INCLUDES = DEFAULT-INCLUDES])
  2394. # -------------------------------------------------------
  2395. # Check whether SYMBOL (a function, variable, or constant) is declared.
  2396. AC_DEFUN([AC_CHECK_DECL],
  2397. [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_decl],
  2398. [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_decl],
  2399. [LINENO SYMBOL VAR INCLUDES],
  2400. [Tests whether SYMBOL is declared in INCLUDES, setting cache variable
  2401. VAR accordingly.])],
  2402. [_$0_BODY])]dnl
  2403. [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])]dnl
  2404. [ac_fn_[]_AC_LANG_ABBREV[]_check_decl ]dnl
  2405. ["$LINENO" "$1" "ac_Symbol" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
  2406. AS_VAR_IF([ac_Symbol], [yes], [$2], [$3])
  2407. AS_VAR_POPDEF([ac_Symbol])dnl
  2408. ])# AC_CHECK_DECL
  2409. # _AC_CHECK_DECLS(SYMBOL, ACTION-IF_FOUND, ACTION-IF-NOT-FOUND,
  2410. # INCLUDES)
  2411. # -------------------------------------------------------------
  2412. # Helper to AC_CHECK_DECLS, which generates the check for a single
  2413. # SYMBOL with INCLUDES, performs the AC_DEFINE, then expands
  2414. # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.
  2415. m4_define([_AC_CHECK_DECLS],
  2416. [AC_CHECK_DECL([$1], [ac_have_decl=1], [ac_have_decl=0], [$4])]dnl
  2417. [AC_DEFINE_UNQUOTED(AS_TR_CPP(m4_bpatsubst(HAVE_DECL_[$1],[ *(.*])),
  2418. [$ac_have_decl],
  2419. [Define to 1 if you have the declaration of `$1',
  2420. and to 0 if you don't.])]dnl
  2421. [m4_ifvaln([$2$3], [AS_IF([test $ac_have_decl = 1], [$2], [$3])])])
  2422. # AC_CHECK_DECLS(SYMBOLS,
  2423. # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
  2424. # [INCLUDES = DEFAULT-INCLUDES])
  2425. # --------------------------------------------------------
  2426. # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
  2427. # documentation for a detailed explanation of this difference with
  2428. # other AC_CHECK_*S macros. SYMBOLS is an m4 list.
  2429. AC_DEFUN([AC_CHECK_DECLS],
  2430. [m4_map_args_sep([_$0(], [, [$2], [$3], [$4])], [], $1)])
  2431. # _AC_CHECK_DECL_ONCE(SYMBOL)
  2432. # ---------------------------
  2433. # Check for a single SYMBOL once.
  2434. m4_define([_AC_CHECK_DECL_ONCE],
  2435. [AC_DEFUN([_AC_Check_Decl_$1], [_AC_CHECK_DECLS([$1])])]dnl
  2436. [AC_REQUIRE([_AC_Check_Decl_$1])])
  2437. # AC_CHECK_DECLS_ONCE(SYMBOLS)
  2438. # ----------------------------
  2439. # Like AC_CHECK_DECLS(SYMBOLS), but do it at most once.
  2440. AC_DEFUN([AC_CHECK_DECLS_ONCE],
  2441. [m4_map_args_sep([_AC_CHECK_DECL_ONCE(], [)], [], $1)])
  2442. ## ---------------------------------- ##
  2443. ## Replacement of library functions. ##
  2444. ## ---------------------------------- ##
  2445. # AC_CONFIG_LIBOBJ_DIR(DIRNAME)
  2446. # -----------------------------
  2447. # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME.
  2448. AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR],
  2449. [m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])])
  2450. # AC_LIBSOURCE(FILE-NAME)
  2451. # -----------------------
  2452. # Announce we might need the file `FILE-NAME'.
  2453. m4_define([AC_LIBSOURCE], [])
  2454. # AC_LIBSOURCES([FILE-NAME1, ...])
  2455. # --------------------------------
  2456. # Announce we might need these files.
  2457. AC_DEFUN([AC_LIBSOURCES],
  2458. [m4_map_args([AC_LIBSOURCE], $1)])
  2459. # _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR)
  2460. # --------------------------------------------
  2461. # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
  2462. m4_define([_AC_LIBOBJ],
  2463. [case " $LIB@&t@OBJS " in
  2464. *" $1.$ac_objext "* ) ;;
  2465. *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
  2466. esac
  2467. ])
  2468. # AC_LIBOBJ(FILE-NAME-NOEXT)
  2469. # --------------------------
  2470. # We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
  2471. AC_DEFUN([AC_LIBOBJ],
  2472. [_AC_LIBOBJ([$1])]dnl
  2473. [AS_LITERAL_WORD_IF([$1], [AC_LIBSOURCE([$1.c])],
  2474. [AC_DIAGNOSE([syntax], [$0($1): you should use literals])])])
  2475. # _AC_LIBOBJS_NORMALIZE
  2476. # ---------------------
  2477. # Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext,
  2478. # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three.
  2479. # Used with AC_CONFIG_COMMANDS_PRE.
  2480. AC_DEFUN([_AC_LIBOBJS_NORMALIZE],
  2481. [ac_libobjs=
  2482. ac_ltlibobjs=
  2483. m4_ifndef([AM_C_PROTOTYPES], [U=
  2484. ])dnl
  2485. for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
  2486. # 1. Remove the extension, and $U if already installed.
  2487. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  2488. ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"`
  2489. # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
  2490. # will be set to the directory where LIBOBJS objects are built.
  2491. AS_VAR_APPEND([ac_libobjs], [" \${LIBOBJDIR}$ac_i\$U.$ac_objext"])
  2492. AS_VAR_APPEND([ac_ltlibobjs], [" \${LIBOBJDIR}$ac_i"'$U.lo'])
  2493. done
  2494. AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
  2495. AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
  2496. ])
  2497. ## ----------------------------------- ##
  2498. ## Checking compiler characteristics. ##
  2499. ## ----------------------------------- ##
  2500. # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS],
  2501. # [IF-FAILURE])
  2502. # ---------------------------------------------------------------------
  2503. # Compute the integer EXPRESSION and store the result in the VARIABLE.
  2504. # Works OK if cross compiling, but assumes twos-complement arithmetic.
  2505. m4_define([_AC_COMPUTE_INT_COMPILE],
  2506. [# Depending upon the size, compute the lo and hi bounds.
  2507. _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
  2508. [ac_lo=0 ac_mid=0
  2509. while :; do
  2510. _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
  2511. [ac_hi=$ac_mid; break],
  2512. [AS_VAR_ARITH([ac_lo], [$ac_mid + 1])
  2513. if test $ac_lo -le $ac_mid; then
  2514. ac_lo= ac_hi=
  2515. break
  2516. fi
  2517. AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid + 1])])
  2518. done],
  2519. [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])],
  2520. [ac_hi=-1 ac_mid=-1
  2521. while :; do
  2522. _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
  2523. [ac_lo=$ac_mid; break],
  2524. [AS_VAR_ARITH([ac_hi], ['(' $ac_mid ')' - 1])
  2525. if test $ac_mid -le $ac_hi; then
  2526. ac_lo= ac_hi=
  2527. break
  2528. fi
  2529. AS_VAR_ARITH([ac_mid], [2 '*' $ac_mid])])
  2530. done],
  2531. [ac_lo= ac_hi=])])
  2532. # Binary search between lo and hi bounds.
  2533. while test "x$ac_lo" != "x$ac_hi"; do
  2534. AS_VAR_ARITH([ac_mid], ['(' $ac_hi - $ac_lo ')' / 2 + $ac_lo])
  2535. _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
  2536. [ac_hi=$ac_mid],
  2537. [AS_VAR_ARITH([ac_lo], ['(' $ac_mid ')' + 1])])
  2538. done
  2539. case $ac_lo in @%:@((
  2540. ?*) AS_VAR_SET([$2], [$ac_lo]); $4 ;;
  2541. '') $5 ;;
  2542. esac[]dnl
  2543. ])# _AC_COMPUTE_INT_COMPILE
  2544. # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-SUCCESS],
  2545. # [IF-FAILURE])
  2546. # -----------------------------------------------------------------
  2547. # Store the evaluation of the integer EXPRESSION in VARIABLE.
  2548. #
  2549. # AC_LANG_INT_SAVE intentionally does not end the file in a newline, so
  2550. # we must add one to make it a text file before passing it to read.
  2551. m4_define([_AC_COMPUTE_INT_RUN],
  2552. [_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
  2553. [echo >>conftest.val; read $2 <conftest.val; $4], [$5])
  2554. rm -f conftest.val
  2555. ])# _AC_COMPUTE_INT_RUN
  2556. # _AC_COMPUTE_INT_BODY
  2557. # --------------------
  2558. # Shell function body for AC_COMPUTE_INT.
  2559. m4_define([_AC_COMPUTE_INT_BODY],
  2560. [ AS_LINENO_PUSH([$[]1])
  2561. if test "$cross_compiling" = yes; then
  2562. _AC_COMPUTE_INT_COMPILE([$[]2], [$[]3], [$[]4],
  2563. [ac_retval=0], [ac_retval=1])
  2564. else
  2565. _AC_COMPUTE_INT_RUN([$[]2], [$[]3], [$[]4],
  2566. [ac_retval=0], [ac_retval=1])
  2567. fi
  2568. AS_LINENO_POP
  2569. AS_SET_STATUS([$ac_retval])
  2570. ])# _AC_COMPUTE_INT_BODY
  2571. # AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS])
  2572. # ----------------------------------------------------------
  2573. # Store into the shell variable VARIABLE the value of the integer C expression
  2574. # EXPRESSION. The value should fit in an initializer in a C variable of type
  2575. # `signed long'. If no PROLOGUE are specified, the default includes are used.
  2576. # IF-FAILS is evaluated if the value cannot be found (which includes the
  2577. # case of cross-compilation, if EXPRESSION is not computable at compile-time.
  2578. AC_DEFUN([AC_COMPUTE_INT],
  2579. [AC_LANG_COMPILER_REQUIRE()]dnl
  2580. [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_compute_int],
  2581. [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_compute_int],
  2582. [LINENO EXPR VAR INCLUDES],
  2583. [Tries to find the compile-time value of EXPR in a program that includes
  2584. INCLUDES, setting VAR accordingly. Returns whether the value could
  2585. be computed])],
  2586. [_$0_BODY])]dnl
  2587. [AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_compute_int "$LINENO" "$2" "$1" ]dnl
  2588. ["AS_ESCAPE([$3], [""])"],
  2589. [], [$4])
  2590. ])# AC_COMPUTE_INT
  2591. # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS])
  2592. # -----------------------------------------------------------
  2593. # FIXME: this private interface was used by several packages.
  2594. # Give them time to transition to AC_COMPUTE_INT and then delete this one.
  2595. AC_DEFUN([_AC_COMPUTE_INT],
  2596. [AC_COMPUTE_INT([$2], [$1], [$3], [$4])
  2597. AC_DIAGNOSE([obsolete],
  2598. [The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a
  2599. future version or Autoconf. Hence, it is suggested that you use
  2600. instead the public AC_COMPUTE_INT macro. Note that the arguments are
  2601. slightly different between the two.])dnl
  2602. ])# _AC_COMPUTE_INT