aclocal.m4 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  1. # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
  2. # Copyright (C) 1996-2013 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. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  19. # serial 1 (pkg-config-0.24)
  20. #
  21. # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  22. #
  23. # This program is free software; you can redistribute it and/or modify
  24. # it under the terms of the GNU General Public License as published by
  25. # the Free Software Foundation; either version 2 of the License, or
  26. # (at your option) any later version.
  27. #
  28. # This program is distributed in the hope that it will be useful, but
  29. # WITHOUT ANY WARRANTY; without even the implied warranty of
  30. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  31. # General Public License for more details.
  32. #
  33. # You should have received a copy of the GNU General Public License
  34. # along with this program; if not, write to the Free Software
  35. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  36. #
  37. # As a special exception to the GNU General Public License, if you
  38. # distribute this file as part of a program that contains a
  39. # configuration script generated by Autoconf, you may include it under
  40. # the same distribution terms that you use for the rest of that program.
  41. # PKG_PROG_PKG_CONFIG([MIN-VERSION])
  42. # ----------------------------------
  43. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  44. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  45. m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  46. m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  47. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  48. AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  49. AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  50. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  51. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  52. fi
  53. if test -n "$PKG_CONFIG"; then
  54. _pkg_min_version=m4_default([$1], [0.9.0])
  55. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  56. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  57. AC_MSG_RESULT([yes])
  58. else
  59. AC_MSG_RESULT([no])
  60. PKG_CONFIG=""
  61. fi
  62. fi[]dnl
  63. ])# PKG_PROG_PKG_CONFIG
  64. # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  65. #
  66. # Check to see whether a particular set of modules exists. Similar
  67. # to PKG_CHECK_MODULES(), but does not set variables or print errors.
  68. #
  69. # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  70. # only at the first occurence in configure.ac, so if the first place
  71. # it's called might be skipped (such as if it is within an "if", you
  72. # have to call PKG_CHECK_EXISTS manually
  73. # --------------------------------------------------------------
  74. AC_DEFUN([PKG_CHECK_EXISTS],
  75. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  76. if test -n "$PKG_CONFIG" && \
  77. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  78. m4_default([$2], [:])
  79. m4_ifvaln([$3], [else
  80. $3])dnl
  81. fi])
  82. # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  83. # ---------------------------------------------
  84. m4_define([_PKG_CONFIG],
  85. [if test -n "$$1"; then
  86. pkg_cv_[]$1="$$1"
  87. elif test -n "$PKG_CONFIG"; then
  88. PKG_CHECK_EXISTS([$3],
  89. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  90. test "x$?" != "x0" && pkg_failed=yes ],
  91. [pkg_failed=yes])
  92. else
  93. pkg_failed=untried
  94. fi[]dnl
  95. ])# _PKG_CONFIG
  96. # _PKG_SHORT_ERRORS_SUPPORTED
  97. # -----------------------------
  98. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  99. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  100. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  101. _pkg_short_errors_supported=yes
  102. else
  103. _pkg_short_errors_supported=no
  104. fi[]dnl
  105. ])# _PKG_SHORT_ERRORS_SUPPORTED
  106. # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  107. # [ACTION-IF-NOT-FOUND])
  108. #
  109. #
  110. # Note that if there is a possibility the first call to
  111. # PKG_CHECK_MODULES might not happen, you should be sure to include an
  112. # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  113. #
  114. #
  115. # --------------------------------------------------------------
  116. AC_DEFUN([PKG_CHECK_MODULES],
  117. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  118. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  119. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  120. pkg_failed=no
  121. AC_MSG_CHECKING([for $1])
  122. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  123. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  124. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  125. and $1[]_LIBS to avoid the need to call pkg-config.
  126. See the pkg-config man page for more details.])
  127. if test $pkg_failed = yes; then
  128. AC_MSG_RESULT([no])
  129. _PKG_SHORT_ERRORS_SUPPORTED
  130. if test $_pkg_short_errors_supported = yes; then
  131. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  132. else
  133. $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  134. fi
  135. # Put the nasty error message in config.log where it belongs
  136. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  137. m4_default([$4], [AC_MSG_ERROR(
  138. [Package requirements ($2) were not met:
  139. $$1_PKG_ERRORS
  140. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  141. installed software in a non-standard prefix.
  142. _PKG_TEXT])[]dnl
  143. ])
  144. elif test $pkg_failed = untried; then
  145. AC_MSG_RESULT([no])
  146. m4_default([$4], [AC_MSG_FAILURE(
  147. [The pkg-config script could not be found or is too old. Make sure it
  148. is in your PATH or set the PKG_CONFIG environment variable to the full
  149. path to pkg-config.
  150. _PKG_TEXT
  151. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  152. ])
  153. else
  154. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  155. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  156. AC_MSG_RESULT([yes])
  157. $3
  158. fi[]dnl
  159. ])# PKG_CHECK_MODULES
  160. # PKG_INSTALLDIR(DIRECTORY)
  161. # -------------------------
  162. # Substitutes the variable pkgconfigdir as the location where a module
  163. # should install pkg-config .pc files. By default the directory is
  164. # $libdir/pkgconfig, but the default can be changed by passing
  165. # DIRECTORY. The user can override through the --with-pkgconfigdir
  166. # parameter.
  167. AC_DEFUN([PKG_INSTALLDIR],
  168. [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  169. m4_pushdef([pkg_description],
  170. [pkg-config installation directory @<:@]pkg_default[@:>@])
  171. AC_ARG_WITH([pkgconfigdir],
  172. [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  173. [with_pkgconfigdir=]pkg_default)
  174. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  175. m4_popdef([pkg_default])
  176. m4_popdef([pkg_description])
  177. ]) dnl PKG_INSTALLDIR
  178. # PKG_NOARCH_INSTALLDIR(DIRECTORY)
  179. # -------------------------
  180. # Substitutes the variable noarch_pkgconfigdir as the location where a
  181. # module should install arch-independent pkg-config .pc files. By
  182. # default the directory is $datadir/pkgconfig, but the default can be
  183. # changed by passing DIRECTORY. The user can override through the
  184. # --with-noarch-pkgconfigdir parameter.
  185. AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  186. [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  187. m4_pushdef([pkg_description],
  188. [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  189. AC_ARG_WITH([noarch-pkgconfigdir],
  190. [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  191. [with_noarch_pkgconfigdir=]pkg_default)
  192. AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  193. m4_popdef([pkg_default])
  194. m4_popdef([pkg_description])
  195. ]) dnl PKG_NOARCH_INSTALLDIR
  196. # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  197. # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  198. # -------------------------------------------
  199. # Retrieves the value of the pkg-config variable for the given module.
  200. AC_DEFUN([PKG_CHECK_VAR],
  201. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  202. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  203. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  204. AS_VAR_COPY([$1], [pkg_cv_][$1])
  205. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  206. ])# PKG_CHECK_VAR
  207. # Copyright (C) 2002-2013 Free Software Foundation, Inc.
  208. #
  209. # This file is free software; the Free Software Foundation
  210. # gives unlimited permission to copy and/or distribute it,
  211. # with or without modifications, as long as this notice is preserved.
  212. # AM_AUTOMAKE_VERSION(VERSION)
  213. # ----------------------------
  214. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  215. # generated from the m4 files accompanying Automake X.Y.
  216. # (This private macro should not be called outside this file.)
  217. AC_DEFUN([AM_AUTOMAKE_VERSION],
  218. [am__api_version='1.13'
  219. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  220. dnl require some minimum version. Point them to the right macro.
  221. m4_if([$1], [1.13.4], [],
  222. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  223. ])
  224. # _AM_AUTOCONF_VERSION(VERSION)
  225. # -----------------------------
  226. # aclocal traces this macro to find the Autoconf version.
  227. # This is a private macro too. Using m4_define simplifies
  228. # the logic in aclocal, which can simply ignore this definition.
  229. m4_define([_AM_AUTOCONF_VERSION], [])
  230. # AM_SET_CURRENT_AUTOMAKE_VERSION
  231. # -------------------------------
  232. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  233. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  234. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  235. [AM_AUTOMAKE_VERSION([1.13.4])dnl
  236. m4_ifndef([AC_AUTOCONF_VERSION],
  237. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  238. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  239. # Copyright (C) 2011-2013 Free Software Foundation, Inc.
  240. #
  241. # This file is free software; the Free Software Foundation
  242. # gives unlimited permission to copy and/or distribute it,
  243. # with or without modifications, as long as this notice is preserved.
  244. # AM_PROG_AR([ACT-IF-FAIL])
  245. # -------------------------
  246. # Try to determine the archiver interface, and trigger the ar-lib wrapper
  247. # if it is needed. If the detection of archiver interface fails, run
  248. # ACT-IF-FAIL (default is to abort configure with a proper error message).
  249. AC_DEFUN([AM_PROG_AR],
  250. [AC_BEFORE([$0], [LT_INIT])dnl
  251. AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
  252. AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  253. AC_REQUIRE_AUX_FILE([ar-lib])dnl
  254. AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
  255. : ${AR=ar}
  256. AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
  257. [am_cv_ar_interface=ar
  258. AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
  259. [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
  260. AC_TRY_EVAL([am_ar_try])
  261. if test "$ac_status" -eq 0; then
  262. am_cv_ar_interface=ar
  263. else
  264. am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
  265. AC_TRY_EVAL([am_ar_try])
  266. if test "$ac_status" -eq 0; then
  267. am_cv_ar_interface=lib
  268. else
  269. am_cv_ar_interface=unknown
  270. fi
  271. fi
  272. rm -f conftest.lib libconftest.a
  273. ])
  274. ])
  275. case $am_cv_ar_interface in
  276. ar)
  277. ;;
  278. lib)
  279. # Microsoft lib, so override with the ar-lib wrapper script.
  280. # FIXME: It is wrong to rewrite AR.
  281. # But if we don't then we get into trouble of one sort or another.
  282. # A longer-term fix would be to have automake use am__AR in this case,
  283. # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
  284. # similar.
  285. AR="$am_aux_dir/ar-lib $AR"
  286. ;;
  287. unknown)
  288. m4_default([$1],
  289. [AC_MSG_ERROR([could not determine $AR interface])])
  290. ;;
  291. esac
  292. AC_SUBST([AR])dnl
  293. ])
  294. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  295. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  296. #
  297. # This file is free software; the Free Software Foundation
  298. # gives unlimited permission to copy and/or distribute it,
  299. # with or without modifications, as long as this notice is preserved.
  300. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  301. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  302. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  303. #
  304. # Of course, Automake must honor this variable whenever it calls a
  305. # tool from the auxiliary directory. The problem is that $srcdir (and
  306. # therefore $ac_aux_dir as well) can be either absolute or relative,
  307. # depending on how configure is run. This is pretty annoying, since
  308. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  309. # source directory, any form will work fine, but in subdirectories a
  310. # relative path needs to be adjusted first.
  311. #
  312. # $ac_aux_dir/missing
  313. # fails when called from a subdirectory if $ac_aux_dir is relative
  314. # $top_srcdir/$ac_aux_dir/missing
  315. # fails if $ac_aux_dir is absolute,
  316. # fails when called from a subdirectory in a VPATH build with
  317. # a relative $ac_aux_dir
  318. #
  319. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  320. # are both prefixed by $srcdir. In an in-source build this is usually
  321. # harmless because $srcdir is '.', but things will broke when you
  322. # start a VPATH build or use an absolute $srcdir.
  323. #
  324. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  325. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  326. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  327. # and then we would define $MISSING as
  328. # MISSING="\${SHELL} $am_aux_dir/missing"
  329. # This will work as long as MISSING is not called from configure, because
  330. # unfortunately $(top_srcdir) has no meaning in configure.
  331. # However there are other variables, like CC, which are often used in
  332. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  333. #
  334. # Another solution, used here, is to always expand $ac_aux_dir to an
  335. # absolute PATH. The drawback is that using absolute paths prevent a
  336. # configured tree to be moved without reconfiguration.
  337. AC_DEFUN([AM_AUX_DIR_EXPAND],
  338. [dnl Rely on autoconf to set up CDPATH properly.
  339. AC_PREREQ([2.50])dnl
  340. # expand $ac_aux_dir to an absolute path
  341. am_aux_dir=`cd $ac_aux_dir && pwd`
  342. ])
  343. # AM_CONDITIONAL -*- Autoconf -*-
  344. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  345. #
  346. # This file is free software; the Free Software Foundation
  347. # gives unlimited permission to copy and/or distribute it,
  348. # with or without modifications, as long as this notice is preserved.
  349. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  350. # -------------------------------------
  351. # Define a conditional.
  352. AC_DEFUN([AM_CONDITIONAL],
  353. [AC_PREREQ([2.52])dnl
  354. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  355. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  356. AC_SUBST([$1_TRUE])dnl
  357. AC_SUBST([$1_FALSE])dnl
  358. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  359. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  360. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  361. if $2; then
  362. $1_TRUE=
  363. $1_FALSE='#'
  364. else
  365. $1_TRUE='#'
  366. $1_FALSE=
  367. fi
  368. AC_CONFIG_COMMANDS_PRE(
  369. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  370. AC_MSG_ERROR([[conditional "$1" was never defined.
  371. Usually this means the macro was only invoked conditionally.]])
  372. fi])])
  373. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  374. #
  375. # This file is free software; the Free Software Foundation
  376. # gives unlimited permission to copy and/or distribute it,
  377. # with or without modifications, as long as this notice is preserved.
  378. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  379. # written in clear, in which case automake, when reading aclocal.m4,
  380. # will think it sees a *use*, and therefore will trigger all it's
  381. # C support machinery. Also note that it means that autoscan, seeing
  382. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  383. # _AM_DEPENDENCIES(NAME)
  384. # ----------------------
  385. # See how the compiler implements dependency checking.
  386. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  387. # We try a few techniques and use that to set a single cache variable.
  388. #
  389. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  390. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  391. # dependency, and given that the user is not expected to run this macro,
  392. # just rely on AC_PROG_CC.
  393. AC_DEFUN([_AM_DEPENDENCIES],
  394. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  395. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  396. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  397. AC_REQUIRE([AM_DEP_TRACK])dnl
  398. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  399. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  400. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  401. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  402. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  403. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  404. [depcc="$$1" am_compiler_list=])
  405. AC_CACHE_CHECK([dependency style of $depcc],
  406. [am_cv_$1_dependencies_compiler_type],
  407. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  408. # We make a subdir and do the tests there. Otherwise we can end up
  409. # making bogus files that we don't know about and never remove. For
  410. # instance it was reported that on HP-UX the gcc test will end up
  411. # making a dummy file named 'D' -- because '-MD' means "put the output
  412. # in D".
  413. rm -rf conftest.dir
  414. mkdir conftest.dir
  415. # Copy depcomp to subdir because otherwise we won't find it if we're
  416. # using a relative directory.
  417. cp "$am_depcomp" conftest.dir
  418. cd conftest.dir
  419. # We will build objects and dependencies in a subdirectory because
  420. # it helps to detect inapplicable dependency modes. For instance
  421. # both Tru64's cc and ICC support -MD to output dependencies as a
  422. # side effect of compilation, but ICC will put the dependencies in
  423. # the current directory while Tru64 will put them in the object
  424. # directory.
  425. mkdir sub
  426. am_cv_$1_dependencies_compiler_type=none
  427. if test "$am_compiler_list" = ""; then
  428. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  429. fi
  430. am__universal=false
  431. m4_case([$1], [CC],
  432. [case " $depcc " in #(
  433. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  434. esac],
  435. [CXX],
  436. [case " $depcc " in #(
  437. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  438. esac])
  439. for depmode in $am_compiler_list; do
  440. # Setup a source with many dependencies, because some compilers
  441. # like to wrap large dependency lists on column 80 (with \), and
  442. # we should not choose a depcomp mode which is confused by this.
  443. #
  444. # We need to recreate these files for each test, as the compiler may
  445. # overwrite some of them when testing with obscure command lines.
  446. # This happens at least with the AIX C compiler.
  447. : > sub/conftest.c
  448. for i in 1 2 3 4 5 6; do
  449. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  450. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  451. # Solaris 10 /bin/sh.
  452. echo '/* dummy */' > sub/conftst$i.h
  453. done
  454. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  455. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  456. # mode. It turns out that the SunPro C++ compiler does not properly
  457. # handle '-M -o', and we need to detect this. Also, some Intel
  458. # versions had trouble with output in subdirs.
  459. am__obj=sub/conftest.${OBJEXT-o}
  460. am__minus_obj="-o $am__obj"
  461. case $depmode in
  462. gcc)
  463. # This depmode causes a compiler race in universal mode.
  464. test "$am__universal" = false || continue
  465. ;;
  466. nosideeffect)
  467. # After this tag, mechanisms are not by side-effect, so they'll
  468. # only be used when explicitly requested.
  469. if test "x$enable_dependency_tracking" = xyes; then
  470. continue
  471. else
  472. break
  473. fi
  474. ;;
  475. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  476. # This compiler won't grok '-c -o', but also, the minuso test has
  477. # not run yet. These depmodes are late enough in the game, and
  478. # so weak that their functioning should not be impacted.
  479. am__obj=conftest.${OBJEXT-o}
  480. am__minus_obj=
  481. ;;
  482. none) break ;;
  483. esac
  484. if depmode=$depmode \
  485. source=sub/conftest.c object=$am__obj \
  486. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  487. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  488. >/dev/null 2>conftest.err &&
  489. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  490. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  491. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  492. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  493. # icc doesn't choke on unknown options, it will just issue warnings
  494. # or remarks (even with -Werror). So we grep stderr for any message
  495. # that says an option was ignored or not supported.
  496. # When given -MP, icc 7.0 and 7.1 complain thusly:
  497. # icc: Command line warning: ignoring option '-M'; no argument required
  498. # The diagnosis changed in icc 8.0:
  499. # icc: Command line remark: option '-MP' not supported
  500. if (grep 'ignoring option' conftest.err ||
  501. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  502. am_cv_$1_dependencies_compiler_type=$depmode
  503. break
  504. fi
  505. fi
  506. done
  507. cd ..
  508. rm -rf conftest.dir
  509. else
  510. am_cv_$1_dependencies_compiler_type=none
  511. fi
  512. ])
  513. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  514. AM_CONDITIONAL([am__fastdep$1], [
  515. test "x$enable_dependency_tracking" != xno \
  516. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  517. ])
  518. # AM_SET_DEPDIR
  519. # -------------
  520. # Choose a directory name for dependency files.
  521. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  522. AC_DEFUN([AM_SET_DEPDIR],
  523. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  524. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  525. ])
  526. # AM_DEP_TRACK
  527. # ------------
  528. AC_DEFUN([AM_DEP_TRACK],
  529. [AC_ARG_ENABLE([dependency-tracking], [dnl
  530. AS_HELP_STRING(
  531. [--enable-dependency-tracking],
  532. [do not reject slow dependency extractors])
  533. AS_HELP_STRING(
  534. [--disable-dependency-tracking],
  535. [speeds up one-time build])])
  536. if test "x$enable_dependency_tracking" != xno; then
  537. am_depcomp="$ac_aux_dir/depcomp"
  538. AMDEPBACKSLASH='\'
  539. am__nodep='_no'
  540. fi
  541. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  542. AC_SUBST([AMDEPBACKSLASH])dnl
  543. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  544. AC_SUBST([am__nodep])dnl
  545. _AM_SUBST_NOTMAKE([am__nodep])dnl
  546. ])
  547. # Generate code to set up dependency tracking. -*- Autoconf -*-
  548. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  549. #
  550. # This file is free software; the Free Software Foundation
  551. # gives unlimited permission to copy and/or distribute it,
  552. # with or without modifications, as long as this notice is preserved.
  553. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  554. # ------------------------------
  555. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  556. [{
  557. # Older Autoconf quotes --file arguments for eval, but not when files
  558. # are listed without --file. Let's play safe and only enable the eval
  559. # if we detect the quoting.
  560. case $CONFIG_FILES in
  561. *\'*) eval set x "$CONFIG_FILES" ;;
  562. *) set x $CONFIG_FILES ;;
  563. esac
  564. shift
  565. for mf
  566. do
  567. # Strip MF so we end up with the name of the file.
  568. mf=`echo "$mf" | sed -e 's/:.*$//'`
  569. # Check whether this is an Automake generated Makefile or not.
  570. # We used to match only the files named 'Makefile.in', but
  571. # some people rename them; so instead we look at the file content.
  572. # Grep'ing the first line is not enough: some people post-process
  573. # each Makefile.in and add a new line on top of each file to say so.
  574. # Grep'ing the whole file is not good either: AIX grep has a line
  575. # limit of 2048, but all sed's we know have understand at least 4000.
  576. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  577. dirpart=`AS_DIRNAME("$mf")`
  578. else
  579. continue
  580. fi
  581. # Extract the definition of DEPDIR, am__include, and am__quote
  582. # from the Makefile without running 'make'.
  583. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  584. test -z "$DEPDIR" && continue
  585. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  586. test -z "$am__include" && continue
  587. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  588. # Find all dependency output files, they are included files with
  589. # $(DEPDIR) in their names. We invoke sed twice because it is the
  590. # simplest approach to changing $(DEPDIR) to its actual value in the
  591. # expansion.
  592. for file in `sed -n "
  593. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  594. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  595. # Make sure the directory exists.
  596. test -f "$dirpart/$file" && continue
  597. fdir=`AS_DIRNAME(["$file"])`
  598. AS_MKDIR_P([$dirpart/$fdir])
  599. # echo "creating $dirpart/$file"
  600. echo '# dummy' > "$dirpart/$file"
  601. done
  602. done
  603. }
  604. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  605. # AM_OUTPUT_DEPENDENCY_COMMANDS
  606. # -----------------------------
  607. # This macro should only be invoked once -- use via AC_REQUIRE.
  608. #
  609. # This code is only required when automatic dependency tracking
  610. # is enabled. FIXME. This creates each '.P' file that we will
  611. # need in order to bootstrap the dependency handling code.
  612. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  613. [AC_CONFIG_COMMANDS([depfiles],
  614. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  615. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  616. ])
  617. # Do all the work for Automake. -*- Autoconf -*-
  618. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  619. #
  620. # This file is free software; the Free Software Foundation
  621. # gives unlimited permission to copy and/or distribute it,
  622. # with or without modifications, as long as this notice is preserved.
  623. # This macro actually does too much. Some checks are only needed if
  624. # your package does certain things. But this isn't really a big deal.
  625. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  626. # AM_INIT_AUTOMAKE([OPTIONS])
  627. # -----------------------------------------------
  628. # The call with PACKAGE and VERSION arguments is the old style
  629. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  630. # and VERSION should now be passed to AC_INIT and removed from
  631. # the call to AM_INIT_AUTOMAKE.
  632. # We support both call styles for the transition. After
  633. # the next Automake release, Autoconf can make the AC_INIT
  634. # arguments mandatory, and then we can depend on a new Autoconf
  635. # release and drop the old call support.
  636. AC_DEFUN([AM_INIT_AUTOMAKE],
  637. [AC_PREREQ([2.65])dnl
  638. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  639. dnl the ones we care about.
  640. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  641. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  642. AC_REQUIRE([AC_PROG_INSTALL])dnl
  643. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  644. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  645. # is not polluted with repeated "-I."
  646. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  647. # test to see if srcdir already configured
  648. if test -f $srcdir/config.status; then
  649. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  650. fi
  651. fi
  652. # test whether we have cygpath
  653. if test -z "$CYGPATH_W"; then
  654. if (cygpath --version) >/dev/null 2>/dev/null; then
  655. CYGPATH_W='cygpath -w'
  656. else
  657. CYGPATH_W=echo
  658. fi
  659. fi
  660. AC_SUBST([CYGPATH_W])
  661. # Define the identity of the package.
  662. dnl Distinguish between old-style and new-style calls.
  663. m4_ifval([$2],
  664. [AC_DIAGNOSE([obsolete],
  665. [$0: two- and three-arguments forms are deprecated.])
  666. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  667. AC_SUBST([PACKAGE], [$1])dnl
  668. AC_SUBST([VERSION], [$2])],
  669. [_AM_SET_OPTIONS([$1])dnl
  670. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  671. m4_if(
  672. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  673. [ok:ok],,
  674. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  675. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  676. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  677. _AM_IF_OPTION([no-define],,
  678. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  679. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  680. # Some tools Automake needs.
  681. AC_REQUIRE([AM_SANITY_CHECK])dnl
  682. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  683. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  684. AM_MISSING_PROG([AUTOCONF], [autoconf])
  685. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  686. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  687. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  688. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  689. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  690. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  691. # For better backward compatibility. To be removed once Automake 1.9.x
  692. # dies out for good. For more background, see:
  693. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  694. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  695. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  696. # We need awk for the "check" target. The system "awk" is bad on
  697. # some platforms.
  698. AC_REQUIRE([AC_PROG_AWK])dnl
  699. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  700. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  701. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  702. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  703. [_AM_PROG_TAR([v7])])])
  704. _AM_IF_OPTION([no-dependencies],,
  705. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  706. [_AM_DEPENDENCIES([CC])],
  707. [m4_define([AC_PROG_CC],
  708. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  709. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  710. [_AM_DEPENDENCIES([CXX])],
  711. [m4_define([AC_PROG_CXX],
  712. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  713. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  714. [_AM_DEPENDENCIES([OBJC])],
  715. [m4_define([AC_PROG_OBJC],
  716. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  717. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  718. [_AM_DEPENDENCIES([OBJCXX])],
  719. [m4_define([AC_PROG_OBJCXX],
  720. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  721. ])
  722. AC_REQUIRE([AM_SILENT_RULES])dnl
  723. dnl The testsuite driver may need to know about EXEEXT, so add the
  724. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  725. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  726. AC_CONFIG_COMMANDS_PRE(dnl
  727. [m4_provide_if([_AM_COMPILER_EXEEXT],
  728. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  729. ])
  730. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  731. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  732. dnl mangled by Autoconf and run in a shell conditional statement.
  733. m4_define([_AC_COMPILER_EXEEXT],
  734. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  735. # When config.status generates a header, we must update the stamp-h file.
  736. # This file resides in the same directory as the config header
  737. # that is generated. The stamp files are numbered to have different names.
  738. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  739. # loop where config.status creates the headers, so we can generate
  740. # our stamp files there.
  741. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  742. [# Compute $1's index in $config_headers.
  743. _am_arg=$1
  744. _am_stamp_count=1
  745. for _am_header in $config_headers :; do
  746. case $_am_header in
  747. $_am_arg | $_am_arg:* )
  748. break ;;
  749. * )
  750. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  751. esac
  752. done
  753. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  754. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  755. #
  756. # This file is free software; the Free Software Foundation
  757. # gives unlimited permission to copy and/or distribute it,
  758. # with or without modifications, as long as this notice is preserved.
  759. # AM_PROG_INSTALL_SH
  760. # ------------------
  761. # Define $install_sh.
  762. AC_DEFUN([AM_PROG_INSTALL_SH],
  763. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  764. if test x"${install_sh}" != xset; then
  765. case $am_aux_dir in
  766. *\ * | *\ *)
  767. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  768. *)
  769. install_sh="\${SHELL} $am_aux_dir/install-sh"
  770. esac
  771. fi
  772. AC_SUBST([install_sh])])
  773. # Copyright (C) 2003-2013 Free Software Foundation, Inc.
  774. #
  775. # This file is free software; the Free Software Foundation
  776. # gives unlimited permission to copy and/or distribute it,
  777. # with or without modifications, as long as this notice is preserved.
  778. # Check whether the underlying file-system supports filenames
  779. # with a leading dot. For instance MS-DOS doesn't.
  780. AC_DEFUN([AM_SET_LEADING_DOT],
  781. [rm -rf .tst 2>/dev/null
  782. mkdir .tst 2>/dev/null
  783. if test -d .tst; then
  784. am__leading_dot=.
  785. else
  786. am__leading_dot=_
  787. fi
  788. rmdir .tst 2>/dev/null
  789. AC_SUBST([am__leading_dot])])
  790. # Check to see how 'make' treats includes. -*- Autoconf -*-
  791. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  792. #
  793. # This file is free software; the Free Software Foundation
  794. # gives unlimited permission to copy and/or distribute it,
  795. # with or without modifications, as long as this notice is preserved.
  796. # AM_MAKE_INCLUDE()
  797. # -----------------
  798. # Check to see how make treats includes.
  799. AC_DEFUN([AM_MAKE_INCLUDE],
  800. [am_make=${MAKE-make}
  801. cat > confinc << 'END'
  802. am__doit:
  803. @echo this is the am__doit target
  804. .PHONY: am__doit
  805. END
  806. # If we don't find an include directive, just comment out the code.
  807. AC_MSG_CHECKING([for style of include used by $am_make])
  808. am__include="#"
  809. am__quote=
  810. _am_result=none
  811. # First try GNU make style include.
  812. echo "include confinc" > confmf
  813. # Ignore all kinds of additional output from 'make'.
  814. case `$am_make -s -f confmf 2> /dev/null` in #(
  815. *the\ am__doit\ target*)
  816. am__include=include
  817. am__quote=
  818. _am_result=GNU
  819. ;;
  820. esac
  821. # Now try BSD make style include.
  822. if test "$am__include" = "#"; then
  823. echo '.include "confinc"' > confmf
  824. case `$am_make -s -f confmf 2> /dev/null` in #(
  825. *the\ am__doit\ target*)
  826. am__include=.include
  827. am__quote="\""
  828. _am_result=BSD
  829. ;;
  830. esac
  831. fi
  832. AC_SUBST([am__include])
  833. AC_SUBST([am__quote])
  834. AC_MSG_RESULT([$_am_result])
  835. rm -f confinc confmf
  836. ])
  837. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  838. #
  839. # This file is free software; the Free Software Foundation
  840. # gives unlimited permission to copy and/or distribute it,
  841. # with or without modifications, as long as this notice is preserved.
  842. # AM_PROG_CC_C_O
  843. # --------------
  844. # Like AC_PROG_CC_C_O, but changed for automake.
  845. AC_DEFUN([AM_PROG_CC_C_O],
  846. [AC_REQUIRE([AC_PROG_CC_C_O])dnl
  847. AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  848. AC_REQUIRE_AUX_FILE([compile])dnl
  849. # FIXME: we rely on the cache variable name because
  850. # there is no other way.
  851. set dummy $CC
  852. am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
  853. eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
  854. if test "$am_t" != yes; then
  855. # Losing compiler, so override with the script.
  856. # FIXME: It is wrong to rewrite CC.
  857. # But if we don't then we get into trouble of one sort or another.
  858. # A longer-term fix would be to have automake use am__CC in this case,
  859. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  860. CC="$am_aux_dir/compile $CC"
  861. fi
  862. dnl Make sure AC_PROG_CC is never called again, or it will override our
  863. dnl setting of CC.
  864. m4_define([AC_PROG_CC],
  865. [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
  866. ])
  867. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  868. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  869. #
  870. # This file is free software; the Free Software Foundation
  871. # gives unlimited permission to copy and/or distribute it,
  872. # with or without modifications, as long as this notice is preserved.
  873. # AM_MISSING_PROG(NAME, PROGRAM)
  874. # ------------------------------
  875. AC_DEFUN([AM_MISSING_PROG],
  876. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  877. $1=${$1-"${am_missing_run}$2"}
  878. AC_SUBST($1)])
  879. # AM_MISSING_HAS_RUN
  880. # ------------------
  881. # Define MISSING if not defined so far and test if it is modern enough.
  882. # If it is, set am_missing_run to use it, otherwise, to nothing.
  883. AC_DEFUN([AM_MISSING_HAS_RUN],
  884. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  885. AC_REQUIRE_AUX_FILE([missing])dnl
  886. if test x"${MISSING+set}" != xset; then
  887. case $am_aux_dir in
  888. *\ * | *\ *)
  889. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  890. *)
  891. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  892. esac
  893. fi
  894. # Use eval to expand $SHELL
  895. if eval "$MISSING --is-lightweight"; then
  896. am_missing_run="$MISSING "
  897. else
  898. am_missing_run=
  899. AC_MSG_WARN(['missing' script is too old or missing])
  900. fi
  901. ])
  902. # Helper functions for option handling. -*- Autoconf -*-
  903. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  904. #
  905. # This file is free software; the Free Software Foundation
  906. # gives unlimited permission to copy and/or distribute it,
  907. # with or without modifications, as long as this notice is preserved.
  908. # _AM_MANGLE_OPTION(NAME)
  909. # -----------------------
  910. AC_DEFUN([_AM_MANGLE_OPTION],
  911. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  912. # _AM_SET_OPTION(NAME)
  913. # --------------------
  914. # Set option NAME. Presently that only means defining a flag for this option.
  915. AC_DEFUN([_AM_SET_OPTION],
  916. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  917. # _AM_SET_OPTIONS(OPTIONS)
  918. # ------------------------
  919. # OPTIONS is a space-separated list of Automake options.
  920. AC_DEFUN([_AM_SET_OPTIONS],
  921. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  922. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  923. # -------------------------------------------
  924. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  925. AC_DEFUN([_AM_IF_OPTION],
  926. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  927. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  928. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  929. #
  930. # This file is free software; the Free Software Foundation
  931. # gives unlimited permission to copy and/or distribute it,
  932. # with or without modifications, as long as this notice is preserved.
  933. # AM_SANITY_CHECK
  934. # ---------------
  935. AC_DEFUN([AM_SANITY_CHECK],
  936. [AC_MSG_CHECKING([whether build environment is sane])
  937. # Reject unsafe characters in $srcdir or the absolute working directory
  938. # name. Accept space and tab only in the latter.
  939. am_lf='
  940. '
  941. case `pwd` in
  942. *[[\\\"\#\$\&\'\`$am_lf]]*)
  943. AC_MSG_ERROR([unsafe absolute working directory name]);;
  944. esac
  945. case $srcdir in
  946. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  947. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  948. esac
  949. # Do 'set' in a subshell so we don't clobber the current shell's
  950. # arguments. Must try -L first in case configure is actually a
  951. # symlink; some systems play weird games with the mod time of symlinks
  952. # (eg FreeBSD returns the mod time of the symlink's containing
  953. # directory).
  954. if (
  955. am_has_slept=no
  956. for am_try in 1 2; do
  957. echo "timestamp, slept: $am_has_slept" > conftest.file
  958. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  959. if test "$[*]" = "X"; then
  960. # -L didn't work.
  961. set X `ls -t "$srcdir/configure" conftest.file`
  962. fi
  963. if test "$[*]" != "X $srcdir/configure conftest.file" \
  964. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  965. # If neither matched, then we have a broken ls. This can happen
  966. # if, for instance, CONFIG_SHELL is bash and it inherits a
  967. # broken ls alias from the environment. This has actually
  968. # happened. Such a system could not be considered "sane".
  969. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  970. alias in your environment])
  971. fi
  972. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  973. break
  974. fi
  975. # Just in case.
  976. sleep 1
  977. am_has_slept=yes
  978. done
  979. test "$[2]" = conftest.file
  980. )
  981. then
  982. # Ok.
  983. :
  984. else
  985. AC_MSG_ERROR([newly created file is older than distributed files!
  986. Check your system clock])
  987. fi
  988. AC_MSG_RESULT([yes])
  989. # If we didn't sleep, we still need to ensure time stamps of config.status and
  990. # generated files are strictly newer.
  991. am_sleep_pid=
  992. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  993. ( sleep 1 ) &
  994. am_sleep_pid=$!
  995. fi
  996. AC_CONFIG_COMMANDS_PRE(
  997. [AC_MSG_CHECKING([that generated files are newer than configure])
  998. if test -n "$am_sleep_pid"; then
  999. # Hide warnings about reused PIDs.
  1000. wait $am_sleep_pid 2>/dev/null
  1001. fi
  1002. AC_MSG_RESULT([done])])
  1003. rm -f conftest.file
  1004. ])
  1005. # Copyright (C) 2009-2013 Free Software Foundation, Inc.
  1006. #
  1007. # This file is free software; the Free Software Foundation
  1008. # gives unlimited permission to copy and/or distribute it,
  1009. # with or without modifications, as long as this notice is preserved.
  1010. # AM_SILENT_RULES([DEFAULT])
  1011. # --------------------------
  1012. # Enable less verbose build rules; with the default set to DEFAULT
  1013. # ("yes" being less verbose, "no" or empty being verbose).
  1014. AC_DEFUN([AM_SILENT_RULES],
  1015. [AC_ARG_ENABLE([silent-rules], [dnl
  1016. AS_HELP_STRING(
  1017. [--enable-silent-rules],
  1018. [less verbose build output (undo: "make V=1")])
  1019. AS_HELP_STRING(
  1020. [--disable-silent-rules],
  1021. [verbose build output (undo: "make V=0")])dnl
  1022. ])
  1023. case $enable_silent_rules in @%:@ (((
  1024. yes) AM_DEFAULT_VERBOSITY=0;;
  1025. no) AM_DEFAULT_VERBOSITY=1;;
  1026. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  1027. esac
  1028. dnl
  1029. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  1030. dnl do not support nested variable expansions.
  1031. dnl See automake bug#9928 and bug#10237.
  1032. am_make=${MAKE-make}
  1033. AC_CACHE_CHECK([whether $am_make supports nested variables],
  1034. [am_cv_make_support_nested_variables],
  1035. [if AS_ECHO([['TRUE=$(BAR$(V))
  1036. BAR0=false
  1037. BAR1=true
  1038. V=1
  1039. am__doit:
  1040. @$(TRUE)
  1041. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  1042. am_cv_make_support_nested_variables=yes
  1043. else
  1044. am_cv_make_support_nested_variables=no
  1045. fi])
  1046. if test $am_cv_make_support_nested_variables = yes; then
  1047. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  1048. AM_V='$(V)'
  1049. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  1050. else
  1051. AM_V=$AM_DEFAULT_VERBOSITY
  1052. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  1053. fi
  1054. AC_SUBST([AM_V])dnl
  1055. AM_SUBST_NOTMAKE([AM_V])dnl
  1056. AC_SUBST([AM_DEFAULT_V])dnl
  1057. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  1058. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  1059. AM_BACKSLASH='\'
  1060. AC_SUBST([AM_BACKSLASH])dnl
  1061. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  1062. ])
  1063. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  1064. #
  1065. # This file is free software; the Free Software Foundation
  1066. # gives unlimited permission to copy and/or distribute it,
  1067. # with or without modifications, as long as this notice is preserved.
  1068. # AM_PROG_INSTALL_STRIP
  1069. # ---------------------
  1070. # One issue with vendor 'install' (even GNU) is that you can't
  1071. # specify the program used to strip binaries. This is especially
  1072. # annoying in cross-compiling environments, where the build's strip
  1073. # is unlikely to handle the host's binaries.
  1074. # Fortunately install-sh will honor a STRIPPROG variable, so we
  1075. # always use install-sh in "make install-strip", and initialize
  1076. # STRIPPROG with the value of the STRIP variable (set by the user).
  1077. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  1078. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1079. # Installed binaries are usually stripped using 'strip' when the user
  1080. # run "make install-strip". However 'strip' might not be the right
  1081. # tool to use in cross-compilation environments, therefore Automake
  1082. # will honor the 'STRIP' environment variable to overrule this program.
  1083. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  1084. if test "$cross_compiling" != no; then
  1085. AC_CHECK_TOOL([STRIP], [strip], :)
  1086. fi
  1087. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  1088. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1089. # Copyright (C) 2006-2013 Free Software Foundation, Inc.
  1090. #
  1091. # This file is free software; the Free Software Foundation
  1092. # gives unlimited permission to copy and/or distribute it,
  1093. # with or without modifications, as long as this notice is preserved.
  1094. # _AM_SUBST_NOTMAKE(VARIABLE)
  1095. # ---------------------------
  1096. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  1097. # This macro is traced by Automake.
  1098. AC_DEFUN([_AM_SUBST_NOTMAKE])
  1099. # AM_SUBST_NOTMAKE(VARIABLE)
  1100. # --------------------------
  1101. # Public sister of _AM_SUBST_NOTMAKE.
  1102. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  1103. # Check how to create a tarball. -*- Autoconf -*-
  1104. # Copyright (C) 2004-2013 Free Software Foundation, Inc.
  1105. #
  1106. # This file is free software; the Free Software Foundation
  1107. # gives unlimited permission to copy and/or distribute it,
  1108. # with or without modifications, as long as this notice is preserved.
  1109. # _AM_PROG_TAR(FORMAT)
  1110. # --------------------
  1111. # Check how to create a tarball in format FORMAT.
  1112. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  1113. #
  1114. # Substitute a variable $(am__tar) that is a command
  1115. # writing to stdout a FORMAT-tarball containing the directory
  1116. # $tardir.
  1117. # tardir=directory && $(am__tar) > result.tar
  1118. #
  1119. # Substitute a variable $(am__untar) that extract such
  1120. # a tarball read from stdin.
  1121. # $(am__untar) < result.tar
  1122. #
  1123. AC_DEFUN([_AM_PROG_TAR],
  1124. [# Always define AMTAR for backward compatibility. Yes, it's still used
  1125. # in the wild :-( We should find a proper way to deprecate it ...
  1126. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  1127. # We'll loop over all known methods to create a tar archive until one works.
  1128. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  1129. m4_if([$1], [v7],
  1130. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  1131. [m4_case([$1],
  1132. [ustar],
  1133. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  1134. # There is notably a 21 bits limit for the UID and the GID. In fact,
  1135. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  1136. # and bug#13588).
  1137. am_max_uid=2097151 # 2^21 - 1
  1138. am_max_gid=$am_max_uid
  1139. # The $UID and $GID variables are not portable, so we need to resort
  1140. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  1141. # below are definitely unexpected, so allow the users to see them
  1142. # (that is, avoid stderr redirection).
  1143. am_uid=`id -u || echo unknown`
  1144. am_gid=`id -g || echo unknown`
  1145. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  1146. if test $am_uid -le $am_max_uid; then
  1147. AC_MSG_RESULT([yes])
  1148. else
  1149. AC_MSG_RESULT([no])
  1150. _am_tools=none
  1151. fi
  1152. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  1153. if test $am_gid -le $am_max_gid; then
  1154. AC_MSG_RESULT([yes])
  1155. else
  1156. AC_MSG_RESULT([no])
  1157. _am_tools=none
  1158. fi],
  1159. [pax],
  1160. [],
  1161. [m4_fatal([Unknown tar format])])
  1162. AC_MSG_CHECKING([how to create a $1 tar archive])
  1163. # Go ahead even if we have the value already cached. We do so because we
  1164. # need to set the values for the 'am__tar' and 'am__untar' variables.
  1165. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  1166. for _am_tool in $_am_tools; do
  1167. case $_am_tool in
  1168. gnutar)
  1169. for _am_tar in tar gnutar gtar; do
  1170. AM_RUN_LOG([$_am_tar --version]) && break
  1171. done
  1172. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  1173. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  1174. am__untar="$_am_tar -xf -"
  1175. ;;
  1176. plaintar)
  1177. # Must skip GNU tar: if it does not support --format= it doesn't create
  1178. # ustar tarball either.
  1179. (tar --version) >/dev/null 2>&1 && continue
  1180. am__tar='tar chf - "$$tardir"'
  1181. am__tar_='tar chf - "$tardir"'
  1182. am__untar='tar xf -'
  1183. ;;
  1184. pax)
  1185. am__tar='pax -L -x $1 -w "$$tardir"'
  1186. am__tar_='pax -L -x $1 -w "$tardir"'
  1187. am__untar='pax -r'
  1188. ;;
  1189. cpio)
  1190. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  1191. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  1192. am__untar='cpio -i -H $1 -d'
  1193. ;;
  1194. none)
  1195. am__tar=false
  1196. am__tar_=false
  1197. am__untar=false
  1198. ;;
  1199. esac
  1200. # If the value was cached, stop now. We just wanted to have am__tar
  1201. # and am__untar set.
  1202. test -n "${am_cv_prog_tar_$1}" && break
  1203. # tar/untar a dummy directory, and stop if the command works.
  1204. rm -rf conftest.dir
  1205. mkdir conftest.dir
  1206. echo GrepMe > conftest.dir/file
  1207. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  1208. rm -rf conftest.dir
  1209. if test -s conftest.tar; then
  1210. AM_RUN_LOG([$am__untar <conftest.tar])
  1211. AM_RUN_LOG([cat conftest.dir/file])
  1212. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1213. fi
  1214. done
  1215. rm -rf conftest.dir
  1216. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1217. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1218. AC_SUBST([am__tar])
  1219. AC_SUBST([am__untar])
  1220. ]) # _AM_PROG_TAR
  1221. m4_include([m4/libtool.m4])
  1222. m4_include([m4/ltoptions.m4])
  1223. m4_include([m4/ltsugar.m4])
  1224. m4_include([m4/ltversion.m4])
  1225. m4_include([m4/lt~obsolete.m4])