Program to generate an xml file based on a provided text file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

aclocal.m4 62KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692
  1. # generated automatically by aclocal 1.15 -*- Autoconf -*-
  2. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  14. [m4_warning([this file was generated for autoconf 2.69.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  18. # ===========================================================================
  19. # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
  20. # ===========================================================================
  21. #
  22. # SYNOPSIS
  23. #
  24. # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
  25. #
  26. # DESCRIPTION
  27. #
  28. # Check whether the given FLAG works with the current language's compiler
  29. # or gives an error. (Warnings, however, are ignored)
  30. #
  31. # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
  32. # success/failure.
  33. #
  34. # If EXTRA-FLAGS is defined, it is added to the current language's default
  35. # flags (e.g. CFLAGS) when the check is done. The check is thus made with
  36. # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
  37. # force the compiler to issue an error when a bad flag is given.
  38. #
  39. # INPUT gives an alternative input source to AC_COMPILE_IFELSE.
  40. #
  41. # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
  42. # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
  43. #
  44. # LICENSE
  45. #
  46. # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
  47. # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
  48. #
  49. # This program is free software: you can redistribute it and/or modify it
  50. # under the terms of the GNU General Public License as published by the
  51. # Free Software Foundation, either version 3 of the License, or (at your
  52. # option) any later version.
  53. #
  54. # This program is distributed in the hope that it will be useful, but
  55. # WITHOUT ANY WARRANTY; without even the implied warranty of
  56. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  57. # Public License for more details.
  58. #
  59. # You should have received a copy of the GNU General Public License along
  60. # with this program. If not, see <http://www.gnu.org/licenses/>.
  61. #
  62. # As a special exception, the respective Autoconf Macro's copyright owner
  63. # gives unlimited permission to copy, distribute and modify the configure
  64. # scripts that are the output of Autoconf when processing the Macro. You
  65. # need not follow the terms of the GNU General Public License when using
  66. # or distributing such scripts, even though portions of the text of the
  67. # Macro appear in them. The GNU General Public License (GPL) does govern
  68. # all other use of the material that constitutes the Autoconf Macro.
  69. #
  70. # This special exception to the GPL applies to versions of the Autoconf
  71. # Macro released by the Autoconf Archive. When you make and distribute a
  72. # modified version of the Autoconf Macro, you may extend this special
  73. # exception to the GPL to apply to your modified version as well.
  74. #serial 4
  75. AC_DEFUN([AX_CHECK_COMPILE_FLAG],
  76. [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
  77. AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
  78. AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
  79. ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
  80. _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
  81. AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
  82. [AS_VAR_SET(CACHEVAR,[yes])],
  83. [AS_VAR_SET(CACHEVAR,[no])])
  84. _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
  85. AS_VAR_IF(CACHEVAR,yes,
  86. [m4_default([$2], :)],
  87. [m4_default([$3], :)])
  88. AS_VAR_POPDEF([CACHEVAR])dnl
  89. ])dnl AX_CHECK_COMPILE_FLAGS
  90. # Configure paths for LIBXML2
  91. # Mike Hommey 2004-06-19
  92. # use CPPFLAGS instead of CFLAGS
  93. # Toshio Kuratomi 2001-04-21
  94. # Adapted from:
  95. # Configure paths for GLIB
  96. # Owen Taylor 97-11-3
  97. dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
  98. dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
  99. dnl
  100. AC_DEFUN([AM_PATH_XML2],[
  101. AC_ARG_WITH(xml-prefix,
  102. [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
  103. xml_config_prefix="$withval", xml_config_prefix="")
  104. AC_ARG_WITH(xml-exec-prefix,
  105. [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
  106. xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
  107. AC_ARG_ENABLE(xmltest,
  108. [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
  109. enable_xmltest=yes)
  110. if test x$xml_config_exec_prefix != x ; then
  111. xml_config_args="$xml_config_args"
  112. if test x${XML2_CONFIG+set} != xset ; then
  113. XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
  114. fi
  115. fi
  116. if test x$xml_config_prefix != x ; then
  117. xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
  118. if test x${XML2_CONFIG+set} != xset ; then
  119. XML2_CONFIG=$xml_config_prefix/bin/xml2-config
  120. fi
  121. fi
  122. AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
  123. min_xml_version=ifelse([$1], ,2.0.0,[$1])
  124. AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
  125. no_xml=""
  126. if test "$XML2_CONFIG" = "no" ; then
  127. no_xml=yes
  128. else
  129. XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
  130. XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
  131. xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
  132. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  133. xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
  134. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  135. xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
  136. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  137. if test "x$enable_xmltest" = "xyes" ; then
  138. ac_save_CPPFLAGS="$CPPFLAGS"
  139. ac_save_LIBS="$LIBS"
  140. CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
  141. LIBS="$XML_LIBS $LIBS"
  142. dnl
  143. dnl Now check if the installed libxml is sufficiently new.
  144. dnl (Also sanity checks the results of xml2-config to some extent)
  145. dnl
  146. rm -f conf.xmltest
  147. AC_TRY_RUN([
  148. #include <stdlib.h>
  149. #include <stdio.h>
  150. #include <string.h>
  151. #include <libxml/xmlversion.h>
  152. int
  153. main()
  154. {
  155. int xml_major_version, xml_minor_version, xml_micro_version;
  156. int major, minor, micro;
  157. char *tmp_version;
  158. system("touch conf.xmltest");
  159. /* Capture xml2-config output via autoconf/configure variables */
  160. /* HP/UX 9 (%@#!) writes to sscanf strings */
  161. tmp_version = (char *)strdup("$min_xml_version");
  162. if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
  163. printf("%s, bad version string from xml2-config\n", "$min_xml_version");
  164. exit(1);
  165. }
  166. free(tmp_version);
  167. /* Capture the version information from the header files */
  168. tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
  169. if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
  170. printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
  171. exit(1);
  172. }
  173. free(tmp_version);
  174. /* Compare xml2-config output to the libxml headers */
  175. if ((xml_major_version != $xml_config_major_version) ||
  176. (xml_minor_version != $xml_config_minor_version) ||
  177. (xml_micro_version != $xml_config_micro_version))
  178. {
  179. printf("*** libxml header files (version %d.%d.%d) do not match\n",
  180. xml_major_version, xml_minor_version, xml_micro_version);
  181. printf("*** xml2-config (version %d.%d.%d)\n",
  182. $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
  183. return 1;
  184. }
  185. /* Compare the headers to the library to make sure we match */
  186. /* Less than ideal -- doesn't provide us with return value feedback,
  187. * only exits if there's a serious mismatch between header and library.
  188. */
  189. LIBXML_TEST_VERSION;
  190. /* Test that the library is greater than our minimum version */
  191. if ((xml_major_version > major) ||
  192. ((xml_major_version == major) && (xml_minor_version > minor)) ||
  193. ((xml_major_version == major) && (xml_minor_version == minor) &&
  194. (xml_micro_version >= micro)))
  195. {
  196. return 0;
  197. }
  198. else
  199. {
  200. printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
  201. xml_major_version, xml_minor_version, xml_micro_version);
  202. printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
  203. major, minor, micro);
  204. printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
  205. printf("***\n");
  206. printf("*** If you have already installed a sufficiently new version, this error\n");
  207. printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
  208. printf("*** being found. The easiest way to fix this is to remove the old version\n");
  209. printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
  210. printf("*** correct copy of xml2-config. (In this case, you will have to\n");
  211. printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  212. printf("*** so that the correct libraries are found at run-time))\n");
  213. }
  214. return 1;
  215. }
  216. ],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
  217. CPPFLAGS="$ac_save_CPPFLAGS"
  218. LIBS="$ac_save_LIBS"
  219. fi
  220. fi
  221. if test "x$no_xml" = x ; then
  222. AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
  223. ifelse([$2], , :, [$2])
  224. else
  225. AC_MSG_RESULT(no)
  226. if test "$XML2_CONFIG" = "no" ; then
  227. echo "*** The xml2-config script installed by LIBXML could not be found"
  228. echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
  229. echo "*** your path, or set the XML2_CONFIG environment variable to the"
  230. echo "*** full path to xml2-config."
  231. else
  232. if test -f conf.xmltest ; then
  233. :
  234. else
  235. echo "*** Could not run libxml test program, checking why..."
  236. CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
  237. LIBS="$LIBS $XML_LIBS"
  238. AC_TRY_LINK([
  239. #include <libxml/xmlversion.h>
  240. #include <stdio.h>
  241. ], [ LIBXML_TEST_VERSION; return 0;],
  242. [ echo "*** The test program compiled, but did not run. This usually means"
  243. echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
  244. echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
  245. echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  246. echo "*** to the installed location Also, make sure you have run ldconfig if that"
  247. echo "*** is required on your system"
  248. echo "***"
  249. echo "*** If you have an old version installed, it is best to remove it, although"
  250. echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
  251. [ echo "*** The test program failed to compile or link. See the file config.log for the"
  252. echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
  253. echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
  254. echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
  255. CPPFLAGS="$ac_save_CPPFLAGS"
  256. LIBS="$ac_save_LIBS"
  257. fi
  258. fi
  259. XML_CPPFLAGS=""
  260. XML_LIBS=""
  261. ifelse([$3], , :, [$3])
  262. fi
  263. AC_SUBST(XML_CPPFLAGS)
  264. AC_SUBST(XML_LIBS)
  265. rm -f conf.xmltest
  266. ])
  267. dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  268. dnl serial 11 (pkg-config-0.29.1)
  269. dnl
  270. dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  271. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
  272. dnl
  273. dnl This program is free software; you can redistribute it and/or modify
  274. dnl it under the terms of the GNU General Public License as published by
  275. dnl the Free Software Foundation; either version 2 of the License, or
  276. dnl (at your option) any later version.
  277. dnl
  278. dnl This program is distributed in the hope that it will be useful, but
  279. dnl WITHOUT ANY WARRANTY; without even the implied warranty of
  280. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  281. dnl General Public License for more details.
  282. dnl
  283. dnl You should have received a copy of the GNU General Public License
  284. dnl along with this program; if not, write to the Free Software
  285. dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  286. dnl 02111-1307, USA.
  287. dnl
  288. dnl As a special exception to the GNU General Public License, if you
  289. dnl distribute this file as part of a program that contains a
  290. dnl configuration script generated by Autoconf, you may include it under
  291. dnl the same distribution terms that you use for the rest of that
  292. dnl program.
  293. dnl PKG_PREREQ(MIN-VERSION)
  294. dnl -----------------------
  295. dnl Since: 0.29
  296. dnl
  297. dnl Verify that the version of the pkg-config macros are at least
  298. dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
  299. dnl installed version of pkg-config, this checks the developer's version
  300. dnl of pkg.m4 when generating configure.
  301. dnl
  302. dnl To ensure that this macro is defined, also add:
  303. dnl m4_ifndef([PKG_PREREQ],
  304. dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
  305. dnl
  306. dnl See the "Since" comment for each macro you use to see what version
  307. dnl of the macros you require.
  308. m4_defun([PKG_PREREQ],
  309. [m4_define([PKG_MACROS_VERSION], [0.29.1])
  310. m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
  311. [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
  312. ])dnl PKG_PREREQ
  313. dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
  314. dnl ----------------------------------
  315. dnl Since: 0.16
  316. dnl
  317. dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
  318. dnl first found in the path. Checks that the version of pkg-config found
  319. dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
  320. dnl used since that's the first version where most current features of
  321. dnl pkg-config existed.
  322. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  323. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  324. m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  325. m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  326. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  327. AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  328. AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  329. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  330. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  331. fi
  332. if test -n "$PKG_CONFIG"; then
  333. _pkg_min_version=m4_default([$1], [0.9.0])
  334. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  335. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  336. AC_MSG_RESULT([yes])
  337. else
  338. AC_MSG_RESULT([no])
  339. PKG_CONFIG=""
  340. fi
  341. fi[]dnl
  342. ])dnl PKG_PROG_PKG_CONFIG
  343. dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  344. dnl -------------------------------------------------------------------
  345. dnl Since: 0.18
  346. dnl
  347. dnl Check to see whether a particular set of modules exists. Similar to
  348. dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
  349. dnl
  350. dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  351. dnl only at the first occurence in configure.ac, so if the first place
  352. dnl it's called might be skipped (such as if it is within an "if", you
  353. dnl have to call PKG_CHECK_EXISTS manually
  354. AC_DEFUN([PKG_CHECK_EXISTS],
  355. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  356. if test -n "$PKG_CONFIG" && \
  357. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  358. m4_default([$2], [:])
  359. m4_ifvaln([$3], [else
  360. $3])dnl
  361. fi])
  362. dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  363. dnl ---------------------------------------------
  364. dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
  365. dnl pkg_failed based on the result.
  366. m4_define([_PKG_CONFIG],
  367. [if test -n "$$1"; then
  368. pkg_cv_[]$1="$$1"
  369. elif test -n "$PKG_CONFIG"; then
  370. PKG_CHECK_EXISTS([$3],
  371. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  372. test "x$?" != "x0" && pkg_failed=yes ],
  373. [pkg_failed=yes])
  374. else
  375. pkg_failed=untried
  376. fi[]dnl
  377. ])dnl _PKG_CONFIG
  378. dnl _PKG_SHORT_ERRORS_SUPPORTED
  379. dnl ---------------------------
  380. dnl Internal check to see if pkg-config supports short errors.
  381. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  382. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  383. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  384. _pkg_short_errors_supported=yes
  385. else
  386. _pkg_short_errors_supported=no
  387. fi[]dnl
  388. ])dnl _PKG_SHORT_ERRORS_SUPPORTED
  389. dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  390. dnl [ACTION-IF-NOT-FOUND])
  391. dnl --------------------------------------------------------------
  392. dnl Since: 0.4.0
  393. dnl
  394. dnl Note that if there is a possibility the first call to
  395. dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
  396. dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  397. AC_DEFUN([PKG_CHECK_MODULES],
  398. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  399. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  400. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  401. pkg_failed=no
  402. AC_MSG_CHECKING([for $1])
  403. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  404. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  405. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  406. and $1[]_LIBS to avoid the need to call pkg-config.
  407. See the pkg-config man page for more details.])
  408. if test $pkg_failed = yes; then
  409. AC_MSG_RESULT([no])
  410. _PKG_SHORT_ERRORS_SUPPORTED
  411. if test $_pkg_short_errors_supported = yes; then
  412. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  413. else
  414. $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  415. fi
  416. # Put the nasty error message in config.log where it belongs
  417. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  418. m4_default([$4], [AC_MSG_ERROR(
  419. [Package requirements ($2) were not met:
  420. $$1_PKG_ERRORS
  421. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  422. installed software in a non-standard prefix.
  423. _PKG_TEXT])[]dnl
  424. ])
  425. elif test $pkg_failed = untried; then
  426. AC_MSG_RESULT([no])
  427. m4_default([$4], [AC_MSG_FAILURE(
  428. [The pkg-config script could not be found or is too old. Make sure it
  429. is in your PATH or set the PKG_CONFIG environment variable to the full
  430. path to pkg-config.
  431. _PKG_TEXT
  432. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  433. ])
  434. else
  435. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  436. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  437. AC_MSG_RESULT([yes])
  438. $3
  439. fi[]dnl
  440. ])dnl PKG_CHECK_MODULES
  441. dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  442. dnl [ACTION-IF-NOT-FOUND])
  443. dnl ---------------------------------------------------------------------
  444. dnl Since: 0.29
  445. dnl
  446. dnl Checks for existence of MODULES and gathers its build flags with
  447. dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
  448. dnl and VARIABLE-PREFIX_LIBS from --libs.
  449. dnl
  450. dnl Note that if there is a possibility the first call to
  451. dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
  452. dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
  453. dnl configure.ac.
  454. AC_DEFUN([PKG_CHECK_MODULES_STATIC],
  455. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  456. _save_PKG_CONFIG=$PKG_CONFIG
  457. PKG_CONFIG="$PKG_CONFIG --static"
  458. PKG_CHECK_MODULES($@)
  459. PKG_CONFIG=$_save_PKG_CONFIG[]dnl
  460. ])dnl PKG_CHECK_MODULES_STATIC
  461. dnl PKG_INSTALLDIR([DIRECTORY])
  462. dnl -------------------------
  463. dnl Since: 0.27
  464. dnl
  465. dnl Substitutes the variable pkgconfigdir as the location where a module
  466. dnl should install pkg-config .pc files. By default the directory is
  467. dnl $libdir/pkgconfig, but the default can be changed by passing
  468. dnl DIRECTORY. The user can override through the --with-pkgconfigdir
  469. dnl parameter.
  470. AC_DEFUN([PKG_INSTALLDIR],
  471. [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  472. m4_pushdef([pkg_description],
  473. [pkg-config installation directory @<:@]pkg_default[@:>@])
  474. AC_ARG_WITH([pkgconfigdir],
  475. [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  476. [with_pkgconfigdir=]pkg_default)
  477. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  478. m4_popdef([pkg_default])
  479. m4_popdef([pkg_description])
  480. ])dnl PKG_INSTALLDIR
  481. dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
  482. dnl --------------------------------
  483. dnl Since: 0.27
  484. dnl
  485. dnl Substitutes the variable noarch_pkgconfigdir as the location where a
  486. dnl module should install arch-independent pkg-config .pc files. By
  487. dnl default the directory is $datadir/pkgconfig, but the default can be
  488. dnl changed by passing DIRECTORY. The user can override through the
  489. dnl --with-noarch-pkgconfigdir parameter.
  490. AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  491. [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  492. m4_pushdef([pkg_description],
  493. [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  494. AC_ARG_WITH([noarch-pkgconfigdir],
  495. [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  496. [with_noarch_pkgconfigdir=]pkg_default)
  497. AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  498. m4_popdef([pkg_default])
  499. m4_popdef([pkg_description])
  500. ])dnl PKG_NOARCH_INSTALLDIR
  501. dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  502. dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  503. dnl -------------------------------------------
  504. dnl Since: 0.28
  505. dnl
  506. dnl Retrieves the value of the pkg-config variable for the given module.
  507. AC_DEFUN([PKG_CHECK_VAR],
  508. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  509. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  510. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  511. AS_VAR_COPY([$1], [pkg_cv_][$1])
  512. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  513. ])dnl PKG_CHECK_VAR
  514. # Copyright (C) 2002-2014 Free Software Foundation, Inc.
  515. #
  516. # This file is free software; the Free Software Foundation
  517. # gives unlimited permission to copy and/or distribute it,
  518. # with or without modifications, as long as this notice is preserved.
  519. # AM_AUTOMAKE_VERSION(VERSION)
  520. # ----------------------------
  521. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  522. # generated from the m4 files accompanying Automake X.Y.
  523. # (This private macro should not be called outside this file.)
  524. AC_DEFUN([AM_AUTOMAKE_VERSION],
  525. [am__api_version='1.15'
  526. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  527. dnl require some minimum version. Point them to the right macro.
  528. m4_if([$1], [1.15], [],
  529. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  530. ])
  531. # _AM_AUTOCONF_VERSION(VERSION)
  532. # -----------------------------
  533. # aclocal traces this macro to find the Autoconf version.
  534. # This is a private macro too. Using m4_define simplifies
  535. # the logic in aclocal, which can simply ignore this definition.
  536. m4_define([_AM_AUTOCONF_VERSION], [])
  537. # AM_SET_CURRENT_AUTOMAKE_VERSION
  538. # -------------------------------
  539. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  540. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  541. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  542. [AM_AUTOMAKE_VERSION([1.15])dnl
  543. m4_ifndef([AC_AUTOCONF_VERSION],
  544. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  545. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  546. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  547. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  548. #
  549. # This file is free software; the Free Software Foundation
  550. # gives unlimited permission to copy and/or distribute it,
  551. # with or without modifications, as long as this notice is preserved.
  552. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  553. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  554. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  555. #
  556. # Of course, Automake must honor this variable whenever it calls a
  557. # tool from the auxiliary directory. The problem is that $srcdir (and
  558. # therefore $ac_aux_dir as well) can be either absolute or relative,
  559. # depending on how configure is run. This is pretty annoying, since
  560. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  561. # source directory, any form will work fine, but in subdirectories a
  562. # relative path needs to be adjusted first.
  563. #
  564. # $ac_aux_dir/missing
  565. # fails when called from a subdirectory if $ac_aux_dir is relative
  566. # $top_srcdir/$ac_aux_dir/missing
  567. # fails if $ac_aux_dir is absolute,
  568. # fails when called from a subdirectory in a VPATH build with
  569. # a relative $ac_aux_dir
  570. #
  571. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  572. # are both prefixed by $srcdir. In an in-source build this is usually
  573. # harmless because $srcdir is '.', but things will broke when you
  574. # start a VPATH build or use an absolute $srcdir.
  575. #
  576. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  577. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  578. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  579. # and then we would define $MISSING as
  580. # MISSING="\${SHELL} $am_aux_dir/missing"
  581. # This will work as long as MISSING is not called from configure, because
  582. # unfortunately $(top_srcdir) has no meaning in configure.
  583. # However there are other variables, like CC, which are often used in
  584. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  585. #
  586. # Another solution, used here, is to always expand $ac_aux_dir to an
  587. # absolute PATH. The drawback is that using absolute paths prevent a
  588. # configured tree to be moved without reconfiguration.
  589. AC_DEFUN([AM_AUX_DIR_EXPAND],
  590. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  591. # Expand $ac_aux_dir to an absolute path.
  592. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  593. ])
  594. # AM_CONDITIONAL -*- Autoconf -*-
  595. # Copyright (C) 1997-2014 Free Software Foundation, Inc.
  596. #
  597. # This file is free software; the Free Software Foundation
  598. # gives unlimited permission to copy and/or distribute it,
  599. # with or without modifications, as long as this notice is preserved.
  600. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  601. # -------------------------------------
  602. # Define a conditional.
  603. AC_DEFUN([AM_CONDITIONAL],
  604. [AC_PREREQ([2.52])dnl
  605. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  606. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  607. AC_SUBST([$1_TRUE])dnl
  608. AC_SUBST([$1_FALSE])dnl
  609. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  610. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  611. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  612. if $2; then
  613. $1_TRUE=
  614. $1_FALSE='#'
  615. else
  616. $1_TRUE='#'
  617. $1_FALSE=
  618. fi
  619. AC_CONFIG_COMMANDS_PRE(
  620. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  621. AC_MSG_ERROR([[conditional "$1" was never defined.
  622. Usually this means the macro was only invoked conditionally.]])
  623. fi])])
  624. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
  625. #
  626. # This file is free software; the Free Software Foundation
  627. # gives unlimited permission to copy and/or distribute it,
  628. # with or without modifications, as long as this notice is preserved.
  629. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  630. # written in clear, in which case automake, when reading aclocal.m4,
  631. # will think it sees a *use*, and therefore will trigger all it's
  632. # C support machinery. Also note that it means that autoscan, seeing
  633. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  634. # _AM_DEPENDENCIES(NAME)
  635. # ----------------------
  636. # See how the compiler implements dependency checking.
  637. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  638. # We try a few techniques and use that to set a single cache variable.
  639. #
  640. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  641. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  642. # dependency, and given that the user is not expected to run this macro,
  643. # just rely on AC_PROG_CC.
  644. AC_DEFUN([_AM_DEPENDENCIES],
  645. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  646. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  647. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  648. AC_REQUIRE([AM_DEP_TRACK])dnl
  649. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  650. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  651. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  652. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  653. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  654. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  655. [depcc="$$1" am_compiler_list=])
  656. AC_CACHE_CHECK([dependency style of $depcc],
  657. [am_cv_$1_dependencies_compiler_type],
  658. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  659. # We make a subdir and do the tests there. Otherwise we can end up
  660. # making bogus files that we don't know about and never remove. For
  661. # instance it was reported that on HP-UX the gcc test will end up
  662. # making a dummy file named 'D' -- because '-MD' means "put the output
  663. # in D".
  664. rm -rf conftest.dir
  665. mkdir conftest.dir
  666. # Copy depcomp to subdir because otherwise we won't find it if we're
  667. # using a relative directory.
  668. cp "$am_depcomp" conftest.dir
  669. cd conftest.dir
  670. # We will build objects and dependencies in a subdirectory because
  671. # it helps to detect inapplicable dependency modes. For instance
  672. # both Tru64's cc and ICC support -MD to output dependencies as a
  673. # side effect of compilation, but ICC will put the dependencies in
  674. # the current directory while Tru64 will put them in the object
  675. # directory.
  676. mkdir sub
  677. am_cv_$1_dependencies_compiler_type=none
  678. if test "$am_compiler_list" = ""; then
  679. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  680. fi
  681. am__universal=false
  682. m4_case([$1], [CC],
  683. [case " $depcc " in #(
  684. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  685. esac],
  686. [CXX],
  687. [case " $depcc " in #(
  688. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  689. esac])
  690. for depmode in $am_compiler_list; do
  691. # Setup a source with many dependencies, because some compilers
  692. # like to wrap large dependency lists on column 80 (with \), and
  693. # we should not choose a depcomp mode which is confused by this.
  694. #
  695. # We need to recreate these files for each test, as the compiler may
  696. # overwrite some of them when testing with obscure command lines.
  697. # This happens at least with the AIX C compiler.
  698. : > sub/conftest.c
  699. for i in 1 2 3 4 5 6; do
  700. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  701. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  702. # Solaris 10 /bin/sh.
  703. echo '/* dummy */' > sub/conftst$i.h
  704. done
  705. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  706. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  707. # mode. It turns out that the SunPro C++ compiler does not properly
  708. # handle '-M -o', and we need to detect this. Also, some Intel
  709. # versions had trouble with output in subdirs.
  710. am__obj=sub/conftest.${OBJEXT-o}
  711. am__minus_obj="-o $am__obj"
  712. case $depmode in
  713. gcc)
  714. # This depmode causes a compiler race in universal mode.
  715. test "$am__universal" = false || continue
  716. ;;
  717. nosideeffect)
  718. # After this tag, mechanisms are not by side-effect, so they'll
  719. # only be used when explicitly requested.
  720. if test "x$enable_dependency_tracking" = xyes; then
  721. continue
  722. else
  723. break
  724. fi
  725. ;;
  726. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  727. # This compiler won't grok '-c -o', but also, the minuso test has
  728. # not run yet. These depmodes are late enough in the game, and
  729. # so weak that their functioning should not be impacted.
  730. am__obj=conftest.${OBJEXT-o}
  731. am__minus_obj=
  732. ;;
  733. none) break ;;
  734. esac
  735. if depmode=$depmode \
  736. source=sub/conftest.c object=$am__obj \
  737. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  738. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  739. >/dev/null 2>conftest.err &&
  740. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  741. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  742. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  743. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  744. # icc doesn't choke on unknown options, it will just issue warnings
  745. # or remarks (even with -Werror). So we grep stderr for any message
  746. # that says an option was ignored or not supported.
  747. # When given -MP, icc 7.0 and 7.1 complain thusly:
  748. # icc: Command line warning: ignoring option '-M'; no argument required
  749. # The diagnosis changed in icc 8.0:
  750. # icc: Command line remark: option '-MP' not supported
  751. if (grep 'ignoring option' conftest.err ||
  752. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  753. am_cv_$1_dependencies_compiler_type=$depmode
  754. break
  755. fi
  756. fi
  757. done
  758. cd ..
  759. rm -rf conftest.dir
  760. else
  761. am_cv_$1_dependencies_compiler_type=none
  762. fi
  763. ])
  764. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  765. AM_CONDITIONAL([am__fastdep$1], [
  766. test "x$enable_dependency_tracking" != xno \
  767. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  768. ])
  769. # AM_SET_DEPDIR
  770. # -------------
  771. # Choose a directory name for dependency files.
  772. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  773. AC_DEFUN([AM_SET_DEPDIR],
  774. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  775. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  776. ])
  777. # AM_DEP_TRACK
  778. # ------------
  779. AC_DEFUN([AM_DEP_TRACK],
  780. [AC_ARG_ENABLE([dependency-tracking], [dnl
  781. AS_HELP_STRING(
  782. [--enable-dependency-tracking],
  783. [do not reject slow dependency extractors])
  784. AS_HELP_STRING(
  785. [--disable-dependency-tracking],
  786. [speeds up one-time build])])
  787. if test "x$enable_dependency_tracking" != xno; then
  788. am_depcomp="$ac_aux_dir/depcomp"
  789. AMDEPBACKSLASH='\'
  790. am__nodep='_no'
  791. fi
  792. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  793. AC_SUBST([AMDEPBACKSLASH])dnl
  794. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  795. AC_SUBST([am__nodep])dnl
  796. _AM_SUBST_NOTMAKE([am__nodep])dnl
  797. ])
  798. # Generate code to set up dependency tracking. -*- Autoconf -*-
  799. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
  800. #
  801. # This file is free software; the Free Software Foundation
  802. # gives unlimited permission to copy and/or distribute it,
  803. # with or without modifications, as long as this notice is preserved.
  804. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  805. # ------------------------------
  806. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  807. [{
  808. # Older Autoconf quotes --file arguments for eval, but not when files
  809. # are listed without --file. Let's play safe and only enable the eval
  810. # if we detect the quoting.
  811. case $CONFIG_FILES in
  812. *\'*) eval set x "$CONFIG_FILES" ;;
  813. *) set x $CONFIG_FILES ;;
  814. esac
  815. shift
  816. for mf
  817. do
  818. # Strip MF so we end up with the name of the file.
  819. mf=`echo "$mf" | sed -e 's/:.*$//'`
  820. # Check whether this is an Automake generated Makefile or not.
  821. # We used to match only the files named 'Makefile.in', but
  822. # some people rename them; so instead we look at the file content.
  823. # Grep'ing the first line is not enough: some people post-process
  824. # each Makefile.in and add a new line on top of each file to say so.
  825. # Grep'ing the whole file is not good either: AIX grep has a line
  826. # limit of 2048, but all sed's we know have understand at least 4000.
  827. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  828. dirpart=`AS_DIRNAME("$mf")`
  829. else
  830. continue
  831. fi
  832. # Extract the definition of DEPDIR, am__include, and am__quote
  833. # from the Makefile without running 'make'.
  834. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  835. test -z "$DEPDIR" && continue
  836. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  837. test -z "$am__include" && continue
  838. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  839. # Find all dependency output files, they are included files with
  840. # $(DEPDIR) in their names. We invoke sed twice because it is the
  841. # simplest approach to changing $(DEPDIR) to its actual value in the
  842. # expansion.
  843. for file in `sed -n "
  844. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  845. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  846. # Make sure the directory exists.
  847. test -f "$dirpart/$file" && continue
  848. fdir=`AS_DIRNAME(["$file"])`
  849. AS_MKDIR_P([$dirpart/$fdir])
  850. # echo "creating $dirpart/$file"
  851. echo '# dummy' > "$dirpart/$file"
  852. done
  853. done
  854. }
  855. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  856. # AM_OUTPUT_DEPENDENCY_COMMANDS
  857. # -----------------------------
  858. # This macro should only be invoked once -- use via AC_REQUIRE.
  859. #
  860. # This code is only required when automatic dependency tracking
  861. # is enabled. FIXME. This creates each '.P' file that we will
  862. # need in order to bootstrap the dependency handling code.
  863. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  864. [AC_CONFIG_COMMANDS([depfiles],
  865. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  866. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  867. ])
  868. # Do all the work for Automake. -*- Autoconf -*-
  869. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  870. #
  871. # This file is free software; the Free Software Foundation
  872. # gives unlimited permission to copy and/or distribute it,
  873. # with or without modifications, as long as this notice is preserved.
  874. # This macro actually does too much. Some checks are only needed if
  875. # your package does certain things. But this isn't really a big deal.
  876. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  877. m4_define([AC_PROG_CC],
  878. m4_defn([AC_PROG_CC])
  879. [_AM_PROG_CC_C_O
  880. ])
  881. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  882. # AM_INIT_AUTOMAKE([OPTIONS])
  883. # -----------------------------------------------
  884. # The call with PACKAGE and VERSION arguments is the old style
  885. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  886. # and VERSION should now be passed to AC_INIT and removed from
  887. # the call to AM_INIT_AUTOMAKE.
  888. # We support both call styles for the transition. After
  889. # the next Automake release, Autoconf can make the AC_INIT
  890. # arguments mandatory, and then we can depend on a new Autoconf
  891. # release and drop the old call support.
  892. AC_DEFUN([AM_INIT_AUTOMAKE],
  893. [AC_PREREQ([2.65])dnl
  894. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  895. dnl the ones we care about.
  896. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  897. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  898. AC_REQUIRE([AC_PROG_INSTALL])dnl
  899. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  900. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  901. # is not polluted with repeated "-I."
  902. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  903. # test to see if srcdir already configured
  904. if test -f $srcdir/config.status; then
  905. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  906. fi
  907. fi
  908. # test whether we have cygpath
  909. if test -z "$CYGPATH_W"; then
  910. if (cygpath --version) >/dev/null 2>/dev/null; then
  911. CYGPATH_W='cygpath -w'
  912. else
  913. CYGPATH_W=echo
  914. fi
  915. fi
  916. AC_SUBST([CYGPATH_W])
  917. # Define the identity of the package.
  918. dnl Distinguish between old-style and new-style calls.
  919. m4_ifval([$2],
  920. [AC_DIAGNOSE([obsolete],
  921. [$0: two- and three-arguments forms are deprecated.])
  922. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  923. AC_SUBST([PACKAGE], [$1])dnl
  924. AC_SUBST([VERSION], [$2])],
  925. [_AM_SET_OPTIONS([$1])dnl
  926. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  927. m4_if(
  928. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  929. [ok:ok],,
  930. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  931. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  932. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  933. _AM_IF_OPTION([no-define],,
  934. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  935. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  936. # Some tools Automake needs.
  937. AC_REQUIRE([AM_SANITY_CHECK])dnl
  938. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  939. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  940. AM_MISSING_PROG([AUTOCONF], [autoconf])
  941. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  942. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  943. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  944. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  945. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  946. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  947. # For better backward compatibility. To be removed once Automake 1.9.x
  948. # dies out for good. For more background, see:
  949. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  950. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  951. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  952. # We need awk for the "check" target (and possibly the TAP driver). The
  953. # system "awk" is bad on some platforms.
  954. AC_REQUIRE([AC_PROG_AWK])dnl
  955. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  956. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  957. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  958. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  959. [_AM_PROG_TAR([v7])])])
  960. _AM_IF_OPTION([no-dependencies],,
  961. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  962. [_AM_DEPENDENCIES([CC])],
  963. [m4_define([AC_PROG_CC],
  964. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  965. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  966. [_AM_DEPENDENCIES([CXX])],
  967. [m4_define([AC_PROG_CXX],
  968. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  969. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  970. [_AM_DEPENDENCIES([OBJC])],
  971. [m4_define([AC_PROG_OBJC],
  972. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  973. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  974. [_AM_DEPENDENCIES([OBJCXX])],
  975. [m4_define([AC_PROG_OBJCXX],
  976. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  977. ])
  978. AC_REQUIRE([AM_SILENT_RULES])dnl
  979. dnl The testsuite driver may need to know about EXEEXT, so add the
  980. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  981. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  982. AC_CONFIG_COMMANDS_PRE(dnl
  983. [m4_provide_if([_AM_COMPILER_EXEEXT],
  984. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  985. # POSIX will say in a future version that running "rm -f" with no argument
  986. # is OK; and we want to be able to make that assumption in our Makefile
  987. # recipes. So use an aggressive probe to check that the usage we want is
  988. # actually supported "in the wild" to an acceptable degree.
  989. # See automake bug#10828.
  990. # To make any issue more visible, cause the running configure to be aborted
  991. # by default if the 'rm' program in use doesn't match our expectations; the
  992. # user can still override this though.
  993. if rm -f && rm -fr && rm -rf; then : OK; else
  994. cat >&2 <<'END'
  995. Oops!
  996. Your 'rm' program seems unable to run without file operands specified
  997. on the command line, even when the '-f' option is present. This is contrary
  998. to the behaviour of most rm programs out there, and not conforming with
  999. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  1000. Please tell bug-automake@gnu.org about your system, including the value
  1001. of your $PATH and any error possibly output before this message. This
  1002. can help us improve future automake versions.
  1003. END
  1004. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  1005. echo 'Configuration will proceed anyway, since you have set the' >&2
  1006. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  1007. echo >&2
  1008. else
  1009. cat >&2 <<'END'
  1010. Aborting the configuration process, to ensure you take notice of the issue.
  1011. You can download and install GNU coreutils to get an 'rm' implementation
  1012. that behaves properly: <http://www.gnu.org/software/coreutils/>.
  1013. If you want to complete the configuration process using your problematic
  1014. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  1015. to "yes", and re-run configure.
  1016. END
  1017. AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  1018. fi
  1019. fi
  1020. dnl The trailing newline in this macro's definition is deliberate, for
  1021. dnl backward compatibility and to allow trailing 'dnl'-style comments
  1022. dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
  1023. ])
  1024. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  1025. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  1026. dnl mangled by Autoconf and run in a shell conditional statement.
  1027. m4_define([_AC_COMPILER_EXEEXT],
  1028. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  1029. # When config.status generates a header, we must update the stamp-h file.
  1030. # This file resides in the same directory as the config header
  1031. # that is generated. The stamp files are numbered to have different names.
  1032. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  1033. # loop where config.status creates the headers, so we can generate
  1034. # our stamp files there.
  1035. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  1036. [# Compute $1's index in $config_headers.
  1037. _am_arg=$1
  1038. _am_stamp_count=1
  1039. for _am_header in $config_headers :; do
  1040. case $_am_header in
  1041. $_am_arg | $_am_arg:* )
  1042. break ;;
  1043. * )
  1044. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  1045. esac
  1046. done
  1047. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  1048. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1049. #
  1050. # This file is free software; the Free Software Foundation
  1051. # gives unlimited permission to copy and/or distribute it,
  1052. # with or without modifications, as long as this notice is preserved.
  1053. # AM_PROG_INSTALL_SH
  1054. # ------------------
  1055. # Define $install_sh.
  1056. AC_DEFUN([AM_PROG_INSTALL_SH],
  1057. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1058. if test x"${install_sh+set}" != xset; then
  1059. case $am_aux_dir in
  1060. *\ * | *\ *)
  1061. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  1062. *)
  1063. install_sh="\${SHELL} $am_aux_dir/install-sh"
  1064. esac
  1065. fi
  1066. AC_SUBST([install_sh])])
  1067. # Copyright (C) 2003-2014 Free Software Foundation, Inc.
  1068. #
  1069. # This file is free software; the Free Software Foundation
  1070. # gives unlimited permission to copy and/or distribute it,
  1071. # with or without modifications, as long as this notice is preserved.
  1072. # Check whether the underlying file-system supports filenames
  1073. # with a leading dot. For instance MS-DOS doesn't.
  1074. AC_DEFUN([AM_SET_LEADING_DOT],
  1075. [rm -rf .tst 2>/dev/null
  1076. mkdir .tst 2>/dev/null
  1077. if test -d .tst; then
  1078. am__leading_dot=.
  1079. else
  1080. am__leading_dot=_
  1081. fi
  1082. rmdir .tst 2>/dev/null
  1083. AC_SUBST([am__leading_dot])])
  1084. # Check to see how 'make' treats includes. -*- Autoconf -*-
  1085. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1086. #
  1087. # This file is free software; the Free Software Foundation
  1088. # gives unlimited permission to copy and/or distribute it,
  1089. # with or without modifications, as long as this notice is preserved.
  1090. # AM_MAKE_INCLUDE()
  1091. # -----------------
  1092. # Check to see how make treats includes.
  1093. AC_DEFUN([AM_MAKE_INCLUDE],
  1094. [am_make=${MAKE-make}
  1095. cat > confinc << 'END'
  1096. am__doit:
  1097. @echo this is the am__doit target
  1098. .PHONY: am__doit
  1099. END
  1100. # If we don't find an include directive, just comment out the code.
  1101. AC_MSG_CHECKING([for style of include used by $am_make])
  1102. am__include="#"
  1103. am__quote=
  1104. _am_result=none
  1105. # First try GNU make style include.
  1106. echo "include confinc" > confmf
  1107. # Ignore all kinds of additional output from 'make'.
  1108. case `$am_make -s -f confmf 2> /dev/null` in #(
  1109. *the\ am__doit\ target*)
  1110. am__include=include
  1111. am__quote=
  1112. _am_result=GNU
  1113. ;;
  1114. esac
  1115. # Now try BSD make style include.
  1116. if test "$am__include" = "#"; then
  1117. echo '.include "confinc"' > confmf
  1118. case `$am_make -s -f confmf 2> /dev/null` in #(
  1119. *the\ am__doit\ target*)
  1120. am__include=.include
  1121. am__quote="\""
  1122. _am_result=BSD
  1123. ;;
  1124. esac
  1125. fi
  1126. AC_SUBST([am__include])
  1127. AC_SUBST([am__quote])
  1128. AC_MSG_RESULT([$_am_result])
  1129. rm -f confinc confmf
  1130. ])
  1131. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  1132. # Copyright (C) 1997-2014 Free Software Foundation, Inc.
  1133. #
  1134. # This file is free software; the Free Software Foundation
  1135. # gives unlimited permission to copy and/or distribute it,
  1136. # with or without modifications, as long as this notice is preserved.
  1137. # AM_MISSING_PROG(NAME, PROGRAM)
  1138. # ------------------------------
  1139. AC_DEFUN([AM_MISSING_PROG],
  1140. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  1141. $1=${$1-"${am_missing_run}$2"}
  1142. AC_SUBST($1)])
  1143. # AM_MISSING_HAS_RUN
  1144. # ------------------
  1145. # Define MISSING if not defined so far and test if it is modern enough.
  1146. # If it is, set am_missing_run to use it, otherwise, to nothing.
  1147. AC_DEFUN([AM_MISSING_HAS_RUN],
  1148. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1149. AC_REQUIRE_AUX_FILE([missing])dnl
  1150. if test x"${MISSING+set}" != xset; then
  1151. case $am_aux_dir in
  1152. *\ * | *\ *)
  1153. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  1154. *)
  1155. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  1156. esac
  1157. fi
  1158. # Use eval to expand $SHELL
  1159. if eval "$MISSING --is-lightweight"; then
  1160. am_missing_run="$MISSING "
  1161. else
  1162. am_missing_run=
  1163. AC_MSG_WARN(['missing' script is too old or missing])
  1164. fi
  1165. ])
  1166. # Helper functions for option handling. -*- Autoconf -*-
  1167. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1168. #
  1169. # This file is free software; the Free Software Foundation
  1170. # gives unlimited permission to copy and/or distribute it,
  1171. # with or without modifications, as long as this notice is preserved.
  1172. # _AM_MANGLE_OPTION(NAME)
  1173. # -----------------------
  1174. AC_DEFUN([_AM_MANGLE_OPTION],
  1175. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  1176. # _AM_SET_OPTION(NAME)
  1177. # --------------------
  1178. # Set option NAME. Presently that only means defining a flag for this option.
  1179. AC_DEFUN([_AM_SET_OPTION],
  1180. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  1181. # _AM_SET_OPTIONS(OPTIONS)
  1182. # ------------------------
  1183. # OPTIONS is a space-separated list of Automake options.
  1184. AC_DEFUN([_AM_SET_OPTIONS],
  1185. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  1186. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  1187. # -------------------------------------------
  1188. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  1189. AC_DEFUN([_AM_IF_OPTION],
  1190. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  1191. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
  1192. #
  1193. # This file is free software; the Free Software Foundation
  1194. # gives unlimited permission to copy and/or distribute it,
  1195. # with or without modifications, as long as this notice is preserved.
  1196. # _AM_PROG_CC_C_O
  1197. # ---------------
  1198. # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
  1199. # to automatically call this.
  1200. AC_DEFUN([_AM_PROG_CC_C_O],
  1201. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1202. AC_REQUIRE_AUX_FILE([compile])dnl
  1203. AC_LANG_PUSH([C])dnl
  1204. AC_CACHE_CHECK(
  1205. [whether $CC understands -c and -o together],
  1206. [am_cv_prog_cc_c_o],
  1207. [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  1208. # Make sure it works both with $CC and with simple cc.
  1209. # Following AC_PROG_CC_C_O, we do the test twice because some
  1210. # compilers refuse to overwrite an existing .o file with -o,
  1211. # though they will create one.
  1212. am_cv_prog_cc_c_o=yes
  1213. for am_i in 1 2; do
  1214. if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  1215. && test -f conftest2.$ac_objext; then
  1216. : OK
  1217. else
  1218. am_cv_prog_cc_c_o=no
  1219. break
  1220. fi
  1221. done
  1222. rm -f core conftest*
  1223. unset am_i])
  1224. if test "$am_cv_prog_cc_c_o" != yes; then
  1225. # Losing compiler, so override with the script.
  1226. # FIXME: It is wrong to rewrite CC.
  1227. # But if we don't then we get into trouble of one sort or another.
  1228. # A longer-term fix would be to have automake use am__CC in this case,
  1229. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  1230. CC="$am_aux_dir/compile $CC"
  1231. fi
  1232. AC_LANG_POP([C])])
  1233. # For backward compatibility.
  1234. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  1235. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1236. #
  1237. # This file is free software; the Free Software Foundation
  1238. # gives unlimited permission to copy and/or distribute it,
  1239. # with or without modifications, as long as this notice is preserved.
  1240. # AM_RUN_LOG(COMMAND)
  1241. # -------------------
  1242. # Run COMMAND, save the exit status in ac_status, and log it.
  1243. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  1244. AC_DEFUN([AM_RUN_LOG],
  1245. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  1246. ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  1247. ac_status=$?
  1248. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1249. (exit $ac_status); }])
  1250. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  1251. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  1252. #
  1253. # This file is free software; the Free Software Foundation
  1254. # gives unlimited permission to copy and/or distribute it,
  1255. # with or without modifications, as long as this notice is preserved.
  1256. # AM_SANITY_CHECK
  1257. # ---------------
  1258. AC_DEFUN([AM_SANITY_CHECK],
  1259. [AC_MSG_CHECKING([whether build environment is sane])
  1260. # Reject unsafe characters in $srcdir or the absolute working directory
  1261. # name. Accept space and tab only in the latter.
  1262. am_lf='
  1263. '
  1264. case `pwd` in
  1265. *[[\\\"\#\$\&\'\`$am_lf]]*)
  1266. AC_MSG_ERROR([unsafe absolute working directory name]);;
  1267. esac
  1268. case $srcdir in
  1269. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  1270. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  1271. esac
  1272. # Do 'set' in a subshell so we don't clobber the current shell's
  1273. # arguments. Must try -L first in case configure is actually a
  1274. # symlink; some systems play weird games with the mod time of symlinks
  1275. # (eg FreeBSD returns the mod time of the symlink's containing
  1276. # directory).
  1277. if (
  1278. am_has_slept=no
  1279. for am_try in 1 2; do
  1280. echo "timestamp, slept: $am_has_slept" > conftest.file
  1281. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  1282. if test "$[*]" = "X"; then
  1283. # -L didn't work.
  1284. set X `ls -t "$srcdir/configure" conftest.file`
  1285. fi
  1286. if test "$[*]" != "X $srcdir/configure conftest.file" \
  1287. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  1288. # If neither matched, then we have a broken ls. This can happen
  1289. # if, for instance, CONFIG_SHELL is bash and it inherits a
  1290. # broken ls alias from the environment. This has actually
  1291. # happened. Such a system could not be considered "sane".
  1292. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  1293. alias in your environment])
  1294. fi
  1295. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  1296. break
  1297. fi
  1298. # Just in case.
  1299. sleep 1
  1300. am_has_slept=yes
  1301. done
  1302. test "$[2]" = conftest.file
  1303. )
  1304. then
  1305. # Ok.
  1306. :
  1307. else
  1308. AC_MSG_ERROR([newly created file is older than distributed files!
  1309. Check your system clock])
  1310. fi
  1311. AC_MSG_RESULT([yes])
  1312. # If we didn't sleep, we still need to ensure time stamps of config.status and
  1313. # generated files are strictly newer.
  1314. am_sleep_pid=
  1315. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  1316. ( sleep 1 ) &
  1317. am_sleep_pid=$!
  1318. fi
  1319. AC_CONFIG_COMMANDS_PRE(
  1320. [AC_MSG_CHECKING([that generated files are newer than configure])
  1321. if test -n "$am_sleep_pid"; then
  1322. # Hide warnings about reused PIDs.
  1323. wait $am_sleep_pid 2>/dev/null
  1324. fi
  1325. AC_MSG_RESULT([done])])
  1326. rm -f conftest.file
  1327. ])
  1328. # Copyright (C) 2009-2014 Free Software Foundation, Inc.
  1329. #
  1330. # This file is free software; the Free Software Foundation
  1331. # gives unlimited permission to copy and/or distribute it,
  1332. # with or without modifications, as long as this notice is preserved.
  1333. # AM_SILENT_RULES([DEFAULT])
  1334. # --------------------------
  1335. # Enable less verbose build rules; with the default set to DEFAULT
  1336. # ("yes" being less verbose, "no" or empty being verbose).
  1337. AC_DEFUN([AM_SILENT_RULES],
  1338. [AC_ARG_ENABLE([silent-rules], [dnl
  1339. AS_HELP_STRING(
  1340. [--enable-silent-rules],
  1341. [less verbose build output (undo: "make V=1")])
  1342. AS_HELP_STRING(
  1343. [--disable-silent-rules],
  1344. [verbose build output (undo: "make V=0")])dnl
  1345. ])
  1346. case $enable_silent_rules in @%:@ (((
  1347. yes) AM_DEFAULT_VERBOSITY=0;;
  1348. no) AM_DEFAULT_VERBOSITY=1;;
  1349. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  1350. esac
  1351. dnl
  1352. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  1353. dnl do not support nested variable expansions.
  1354. dnl See automake bug#9928 and bug#10237.
  1355. am_make=${MAKE-make}
  1356. AC_CACHE_CHECK([whether $am_make supports nested variables],
  1357. [am_cv_make_support_nested_variables],
  1358. [if AS_ECHO([['TRUE=$(BAR$(V))
  1359. BAR0=false
  1360. BAR1=true
  1361. V=1
  1362. am__doit:
  1363. @$(TRUE)
  1364. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  1365. am_cv_make_support_nested_variables=yes
  1366. else
  1367. am_cv_make_support_nested_variables=no
  1368. fi])
  1369. if test $am_cv_make_support_nested_variables = yes; then
  1370. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  1371. AM_V='$(V)'
  1372. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  1373. else
  1374. AM_V=$AM_DEFAULT_VERBOSITY
  1375. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  1376. fi
  1377. AC_SUBST([AM_V])dnl
  1378. AM_SUBST_NOTMAKE([AM_V])dnl
  1379. AC_SUBST([AM_DEFAULT_V])dnl
  1380. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  1381. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  1382. AM_BACKSLASH='\'
  1383. AC_SUBST([AM_BACKSLASH])dnl
  1384. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  1385. ])
  1386. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1387. #
  1388. # This file is free software; the Free Software Foundation
  1389. # gives unlimited permission to copy and/or distribute it,
  1390. # with or without modifications, as long as this notice is preserved.
  1391. # AM_PROG_INSTALL_STRIP
  1392. # ---------------------
  1393. # One issue with vendor 'install' (even GNU) is that you can't
  1394. # specify the program used to strip binaries. This is especially
  1395. # annoying in cross-compiling environments, where the build's strip
  1396. # is unlikely to handle the host's binaries.
  1397. # Fortunately install-sh will honor a STRIPPROG variable, so we
  1398. # always use install-sh in "make install-strip", and initialize
  1399. # STRIPPROG with the value of the STRIP variable (set by the user).
  1400. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  1401. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1402. # Installed binaries are usually stripped using 'strip' when the user
  1403. # run "make install-strip". However 'strip' might not be the right
  1404. # tool to use in cross-compilation environments, therefore Automake
  1405. # will honor the 'STRIP' environment variable to overrule this program.
  1406. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  1407. if test "$cross_compiling" != no; then
  1408. AC_CHECK_TOOL([STRIP], [strip], :)
  1409. fi
  1410. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  1411. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1412. # Copyright (C) 2006-2014 Free Software Foundation, Inc.
  1413. #
  1414. # This file is free software; the Free Software Foundation
  1415. # gives unlimited permission to copy and/or distribute it,
  1416. # with or without modifications, as long as this notice is preserved.
  1417. # _AM_SUBST_NOTMAKE(VARIABLE)
  1418. # ---------------------------
  1419. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  1420. # This macro is traced by Automake.
  1421. AC_DEFUN([_AM_SUBST_NOTMAKE])
  1422. # AM_SUBST_NOTMAKE(VARIABLE)
  1423. # --------------------------
  1424. # Public sister of _AM_SUBST_NOTMAKE.
  1425. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  1426. # Check how to create a tarball. -*- Autoconf -*-
  1427. # Copyright (C) 2004-2014 Free Software Foundation, Inc.
  1428. #
  1429. # This file is free software; the Free Software Foundation
  1430. # gives unlimited permission to copy and/or distribute it,
  1431. # with or without modifications, as long as this notice is preserved.
  1432. # _AM_PROG_TAR(FORMAT)
  1433. # --------------------
  1434. # Check how to create a tarball in format FORMAT.
  1435. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  1436. #
  1437. # Substitute a variable $(am__tar) that is a command
  1438. # writing to stdout a FORMAT-tarball containing the directory
  1439. # $tardir.
  1440. # tardir=directory && $(am__tar) > result.tar
  1441. #
  1442. # Substitute a variable $(am__untar) that extract such
  1443. # a tarball read from stdin.
  1444. # $(am__untar) < result.tar
  1445. #
  1446. AC_DEFUN([_AM_PROG_TAR],
  1447. [# Always define AMTAR for backward compatibility. Yes, it's still used
  1448. # in the wild :-( We should find a proper way to deprecate it ...
  1449. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  1450. # We'll loop over all known methods to create a tar archive until one works.
  1451. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  1452. m4_if([$1], [v7],
  1453. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  1454. [m4_case([$1],
  1455. [ustar],
  1456. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  1457. # There is notably a 21 bits limit for the UID and the GID. In fact,
  1458. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  1459. # and bug#13588).
  1460. am_max_uid=2097151 # 2^21 - 1
  1461. am_max_gid=$am_max_uid
  1462. # The $UID and $GID variables are not portable, so we need to resort
  1463. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  1464. # below are definitely unexpected, so allow the users to see them
  1465. # (that is, avoid stderr redirection).
  1466. am_uid=`id -u || echo unknown`
  1467. am_gid=`id -g || echo unknown`
  1468. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  1469. if test $am_uid -le $am_max_uid; then
  1470. AC_MSG_RESULT([yes])
  1471. else
  1472. AC_MSG_RESULT([no])
  1473. _am_tools=none
  1474. fi
  1475. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  1476. if test $am_gid -le $am_max_gid; then
  1477. AC_MSG_RESULT([yes])
  1478. else
  1479. AC_MSG_RESULT([no])
  1480. _am_tools=none
  1481. fi],
  1482. [pax],
  1483. [],
  1484. [m4_fatal([Unknown tar format])])
  1485. AC_MSG_CHECKING([how to create a $1 tar archive])
  1486. # Go ahead even if we have the value already cached. We do so because we
  1487. # need to set the values for the 'am__tar' and 'am__untar' variables.
  1488. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  1489. for _am_tool in $_am_tools; do
  1490. case $_am_tool in
  1491. gnutar)
  1492. for _am_tar in tar gnutar gtar; do
  1493. AM_RUN_LOG([$_am_tar --version]) && break
  1494. done
  1495. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  1496. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  1497. am__untar="$_am_tar -xf -"
  1498. ;;
  1499. plaintar)
  1500. # Must skip GNU tar: if it does not support --format= it doesn't create
  1501. # ustar tarball either.
  1502. (tar --version) >/dev/null 2>&1 && continue
  1503. am__tar='tar chf - "$$tardir"'
  1504. am__tar_='tar chf - "$tardir"'
  1505. am__untar='tar xf -'
  1506. ;;
  1507. pax)
  1508. am__tar='pax -L -x $1 -w "$$tardir"'
  1509. am__tar_='pax -L -x $1 -w "$tardir"'
  1510. am__untar='pax -r'
  1511. ;;
  1512. cpio)
  1513. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  1514. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  1515. am__untar='cpio -i -H $1 -d'
  1516. ;;
  1517. none)
  1518. am__tar=false
  1519. am__tar_=false
  1520. am__untar=false
  1521. ;;
  1522. esac
  1523. # If the value was cached, stop now. We just wanted to have am__tar
  1524. # and am__untar set.
  1525. test -n "${am_cv_prog_tar_$1}" && break
  1526. # tar/untar a dummy directory, and stop if the command works.
  1527. rm -rf conftest.dir
  1528. mkdir conftest.dir
  1529. echo GrepMe > conftest.dir/file
  1530. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  1531. rm -rf conftest.dir
  1532. if test -s conftest.tar; then
  1533. AM_RUN_LOG([$am__untar <conftest.tar])
  1534. AM_RUN_LOG([cat conftest.dir/file])
  1535. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1536. fi
  1537. done
  1538. rm -rf conftest.dir
  1539. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1540. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1541. AC_SUBST([am__tar])
  1542. AC_SUBST([am__untar])
  1543. ]) # _AM_PROG_TAR