aclocal.m4 49 KB

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