aclocal.m4 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292
  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. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  240. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  241. #
  242. # This file is free software; the Free Software Foundation
  243. # gives unlimited permission to copy and/or distribute it,
  244. # with or without modifications, as long as this notice is preserved.
  245. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  246. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  247. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  248. #
  249. # Of course, Automake must honor this variable whenever it calls a
  250. # tool from the auxiliary directory. The problem is that $srcdir (and
  251. # therefore $ac_aux_dir as well) can be either absolute or relative,
  252. # depending on how configure is run. This is pretty annoying, since
  253. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  254. # source directory, any form will work fine, but in subdirectories a
  255. # relative path needs to be adjusted first.
  256. #
  257. # $ac_aux_dir/missing
  258. # fails when called from a subdirectory if $ac_aux_dir is relative
  259. # $top_srcdir/$ac_aux_dir/missing
  260. # fails if $ac_aux_dir is absolute,
  261. # fails when called from a subdirectory in a VPATH build with
  262. # a relative $ac_aux_dir
  263. #
  264. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  265. # are both prefixed by $srcdir. In an in-source build this is usually
  266. # harmless because $srcdir is '.', but things will broke when you
  267. # start a VPATH build or use an absolute $srcdir.
  268. #
  269. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  270. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  271. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  272. # and then we would define $MISSING as
  273. # MISSING="\${SHELL} $am_aux_dir/missing"
  274. # This will work as long as MISSING is not called from configure, because
  275. # unfortunately $(top_srcdir) has no meaning in configure.
  276. # However there are other variables, like CC, which are often used in
  277. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  278. #
  279. # Another solution, used here, is to always expand $ac_aux_dir to an
  280. # absolute PATH. The drawback is that using absolute paths prevent a
  281. # configured tree to be moved without reconfiguration.
  282. AC_DEFUN([AM_AUX_DIR_EXPAND],
  283. [dnl Rely on autoconf to set up CDPATH properly.
  284. AC_PREREQ([2.50])dnl
  285. # expand $ac_aux_dir to an absolute path
  286. am_aux_dir=`cd $ac_aux_dir && pwd`
  287. ])
  288. # AM_CONDITIONAL -*- Autoconf -*-
  289. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  290. #
  291. # This file is free software; the Free Software Foundation
  292. # gives unlimited permission to copy and/or distribute it,
  293. # with or without modifications, as long as this notice is preserved.
  294. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  295. # -------------------------------------
  296. # Define a conditional.
  297. AC_DEFUN([AM_CONDITIONAL],
  298. [AC_PREREQ([2.52])dnl
  299. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  300. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  301. AC_SUBST([$1_TRUE])dnl
  302. AC_SUBST([$1_FALSE])dnl
  303. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  304. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  305. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  306. if $2; then
  307. $1_TRUE=
  308. $1_FALSE='#'
  309. else
  310. $1_TRUE='#'
  311. $1_FALSE=
  312. fi
  313. AC_CONFIG_COMMANDS_PRE(
  314. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  315. AC_MSG_ERROR([[conditional "$1" was never defined.
  316. Usually this means the macro was only invoked conditionally.]])
  317. fi])])
  318. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  319. #
  320. # This file is free software; the Free Software Foundation
  321. # gives unlimited permission to copy and/or distribute it,
  322. # with or without modifications, as long as this notice is preserved.
  323. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  324. # written in clear, in which case automake, when reading aclocal.m4,
  325. # will think it sees a *use*, and therefore will trigger all it's
  326. # C support machinery. Also note that it means that autoscan, seeing
  327. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  328. # _AM_DEPENDENCIES(NAME)
  329. # ----------------------
  330. # See how the compiler implements dependency checking.
  331. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  332. # We try a few techniques and use that to set a single cache variable.
  333. #
  334. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  335. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  336. # dependency, and given that the user is not expected to run this macro,
  337. # just rely on AC_PROG_CC.
  338. AC_DEFUN([_AM_DEPENDENCIES],
  339. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  340. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  341. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  342. AC_REQUIRE([AM_DEP_TRACK])dnl
  343. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  344. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  345. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  346. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  347. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  348. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  349. [depcc="$$1" am_compiler_list=])
  350. AC_CACHE_CHECK([dependency style of $depcc],
  351. [am_cv_$1_dependencies_compiler_type],
  352. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  353. # We make a subdir and do the tests there. Otherwise we can end up
  354. # making bogus files that we don't know about and never remove. For
  355. # instance it was reported that on HP-UX the gcc test will end up
  356. # making a dummy file named 'D' -- because '-MD' means "put the output
  357. # in D".
  358. rm -rf conftest.dir
  359. mkdir conftest.dir
  360. # Copy depcomp to subdir because otherwise we won't find it if we're
  361. # using a relative directory.
  362. cp "$am_depcomp" conftest.dir
  363. cd conftest.dir
  364. # We will build objects and dependencies in a subdirectory because
  365. # it helps to detect inapplicable dependency modes. For instance
  366. # both Tru64's cc and ICC support -MD to output dependencies as a
  367. # side effect of compilation, but ICC will put the dependencies in
  368. # the current directory while Tru64 will put them in the object
  369. # directory.
  370. mkdir sub
  371. am_cv_$1_dependencies_compiler_type=none
  372. if test "$am_compiler_list" = ""; then
  373. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  374. fi
  375. am__universal=false
  376. m4_case([$1], [CC],
  377. [case " $depcc " in #(
  378. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  379. esac],
  380. [CXX],
  381. [case " $depcc " in #(
  382. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  383. esac])
  384. for depmode in $am_compiler_list; do
  385. # Setup a source with many dependencies, because some compilers
  386. # like to wrap large dependency lists on column 80 (with \), and
  387. # we should not choose a depcomp mode which is confused by this.
  388. #
  389. # We need to recreate these files for each test, as the compiler may
  390. # overwrite some of them when testing with obscure command lines.
  391. # This happens at least with the AIX C compiler.
  392. : > sub/conftest.c
  393. for i in 1 2 3 4 5 6; do
  394. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  395. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  396. # Solaris 10 /bin/sh.
  397. echo '/* dummy */' > sub/conftst$i.h
  398. done
  399. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  400. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  401. # mode. It turns out that the SunPro C++ compiler does not properly
  402. # handle '-M -o', and we need to detect this. Also, some Intel
  403. # versions had trouble with output in subdirs.
  404. am__obj=sub/conftest.${OBJEXT-o}
  405. am__minus_obj="-o $am__obj"
  406. case $depmode in
  407. gcc)
  408. # This depmode causes a compiler race in universal mode.
  409. test "$am__universal" = false || continue
  410. ;;
  411. nosideeffect)
  412. # After this tag, mechanisms are not by side-effect, so they'll
  413. # only be used when explicitly requested.
  414. if test "x$enable_dependency_tracking" = xyes; then
  415. continue
  416. else
  417. break
  418. fi
  419. ;;
  420. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  421. # This compiler won't grok '-c -o', but also, the minuso test has
  422. # not run yet. These depmodes are late enough in the game, and
  423. # so weak that their functioning should not be impacted.
  424. am__obj=conftest.${OBJEXT-o}
  425. am__minus_obj=
  426. ;;
  427. none) break ;;
  428. esac
  429. if depmode=$depmode \
  430. source=sub/conftest.c object=$am__obj \
  431. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  432. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  433. >/dev/null 2>conftest.err &&
  434. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  435. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  436. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  437. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  438. # icc doesn't choke on unknown options, it will just issue warnings
  439. # or remarks (even with -Werror). So we grep stderr for any message
  440. # that says an option was ignored or not supported.
  441. # When given -MP, icc 7.0 and 7.1 complain thusly:
  442. # icc: Command line warning: ignoring option '-M'; no argument required
  443. # The diagnosis changed in icc 8.0:
  444. # icc: Command line remark: option '-MP' not supported
  445. if (grep 'ignoring option' conftest.err ||
  446. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  447. am_cv_$1_dependencies_compiler_type=$depmode
  448. break
  449. fi
  450. fi
  451. done
  452. cd ..
  453. rm -rf conftest.dir
  454. else
  455. am_cv_$1_dependencies_compiler_type=none
  456. fi
  457. ])
  458. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  459. AM_CONDITIONAL([am__fastdep$1], [
  460. test "x$enable_dependency_tracking" != xno \
  461. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  462. ])
  463. # AM_SET_DEPDIR
  464. # -------------
  465. # Choose a directory name for dependency files.
  466. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  467. AC_DEFUN([AM_SET_DEPDIR],
  468. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  469. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  470. ])
  471. # AM_DEP_TRACK
  472. # ------------
  473. AC_DEFUN([AM_DEP_TRACK],
  474. [AC_ARG_ENABLE([dependency-tracking], [dnl
  475. AS_HELP_STRING(
  476. [--enable-dependency-tracking],
  477. [do not reject slow dependency extractors])
  478. AS_HELP_STRING(
  479. [--disable-dependency-tracking],
  480. [speeds up one-time build])])
  481. if test "x$enable_dependency_tracking" != xno; then
  482. am_depcomp="$ac_aux_dir/depcomp"
  483. AMDEPBACKSLASH='\'
  484. am__nodep='_no'
  485. fi
  486. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  487. AC_SUBST([AMDEPBACKSLASH])dnl
  488. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  489. AC_SUBST([am__nodep])dnl
  490. _AM_SUBST_NOTMAKE([am__nodep])dnl
  491. ])
  492. # Generate code to set up dependency tracking. -*- Autoconf -*-
  493. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  494. #
  495. # This file is free software; the Free Software Foundation
  496. # gives unlimited permission to copy and/or distribute it,
  497. # with or without modifications, as long as this notice is preserved.
  498. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  499. # ------------------------------
  500. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  501. [{
  502. # Older Autoconf quotes --file arguments for eval, but not when files
  503. # are listed without --file. Let's play safe and only enable the eval
  504. # if we detect the quoting.
  505. case $CONFIG_FILES in
  506. *\'*) eval set x "$CONFIG_FILES" ;;
  507. *) set x $CONFIG_FILES ;;
  508. esac
  509. shift
  510. for mf
  511. do
  512. # Strip MF so we end up with the name of the file.
  513. mf=`echo "$mf" | sed -e 's/:.*$//'`
  514. # Check whether this is an Automake generated Makefile or not.
  515. # We used to match only the files named 'Makefile.in', but
  516. # some people rename them; so instead we look at the file content.
  517. # Grep'ing the first line is not enough: some people post-process
  518. # each Makefile.in and add a new line on top of each file to say so.
  519. # Grep'ing the whole file is not good either: AIX grep has a line
  520. # limit of 2048, but all sed's we know have understand at least 4000.
  521. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  522. dirpart=`AS_DIRNAME("$mf")`
  523. else
  524. continue
  525. fi
  526. # Extract the definition of DEPDIR, am__include, and am__quote
  527. # from the Makefile without running 'make'.
  528. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  529. test -z "$DEPDIR" && continue
  530. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  531. test -z "$am__include" && continue
  532. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  533. # Find all dependency output files, they are included files with
  534. # $(DEPDIR) in their names. We invoke sed twice because it is the
  535. # simplest approach to changing $(DEPDIR) to its actual value in the
  536. # expansion.
  537. for file in `sed -n "
  538. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  539. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  540. # Make sure the directory exists.
  541. test -f "$dirpart/$file" && continue
  542. fdir=`AS_DIRNAME(["$file"])`
  543. AS_MKDIR_P([$dirpart/$fdir])
  544. # echo "creating $dirpart/$file"
  545. echo '# dummy' > "$dirpart/$file"
  546. done
  547. done
  548. }
  549. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  550. # AM_OUTPUT_DEPENDENCY_COMMANDS
  551. # -----------------------------
  552. # This macro should only be invoked once -- use via AC_REQUIRE.
  553. #
  554. # This code is only required when automatic dependency tracking
  555. # is enabled. FIXME. This creates each '.P' file that we will
  556. # need in order to bootstrap the dependency handling code.
  557. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  558. [AC_CONFIG_COMMANDS([depfiles],
  559. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  560. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  561. ])
  562. # Do all the work for Automake. -*- Autoconf -*-
  563. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  564. #
  565. # This file is free software; the Free Software Foundation
  566. # gives unlimited permission to copy and/or distribute it,
  567. # with or without modifications, as long as this notice is preserved.
  568. # This macro actually does too much. Some checks are only needed if
  569. # your package does certain things. But this isn't really a big deal.
  570. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  571. # AM_INIT_AUTOMAKE([OPTIONS])
  572. # -----------------------------------------------
  573. # The call with PACKAGE and VERSION arguments is the old style
  574. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  575. # and VERSION should now be passed to AC_INIT and removed from
  576. # the call to AM_INIT_AUTOMAKE.
  577. # We support both call styles for the transition. After
  578. # the next Automake release, Autoconf can make the AC_INIT
  579. # arguments mandatory, and then we can depend on a new Autoconf
  580. # release and drop the old call support.
  581. AC_DEFUN([AM_INIT_AUTOMAKE],
  582. [AC_PREREQ([2.65])dnl
  583. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  584. dnl the ones we care about.
  585. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  586. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  587. AC_REQUIRE([AC_PROG_INSTALL])dnl
  588. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  589. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  590. # is not polluted with repeated "-I."
  591. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  592. # test to see if srcdir already configured
  593. if test -f $srcdir/config.status; then
  594. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  595. fi
  596. fi
  597. # test whether we have cygpath
  598. if test -z "$CYGPATH_W"; then
  599. if (cygpath --version) >/dev/null 2>/dev/null; then
  600. CYGPATH_W='cygpath -w'
  601. else
  602. CYGPATH_W=echo
  603. fi
  604. fi
  605. AC_SUBST([CYGPATH_W])
  606. # Define the identity of the package.
  607. dnl Distinguish between old-style and new-style calls.
  608. m4_ifval([$2],
  609. [AC_DIAGNOSE([obsolete],
  610. [$0: two- and three-arguments forms are deprecated.])
  611. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  612. AC_SUBST([PACKAGE], [$1])dnl
  613. AC_SUBST([VERSION], [$2])],
  614. [_AM_SET_OPTIONS([$1])dnl
  615. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  616. m4_if(
  617. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  618. [ok:ok],,
  619. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  620. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  621. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  622. _AM_IF_OPTION([no-define],,
  623. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  624. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  625. # Some tools Automake needs.
  626. AC_REQUIRE([AM_SANITY_CHECK])dnl
  627. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  628. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  629. AM_MISSING_PROG([AUTOCONF], [autoconf])
  630. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  631. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  632. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  633. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  634. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  635. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  636. # For better backward compatibility. To be removed once Automake 1.9.x
  637. # dies out for good. For more background, see:
  638. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  639. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  640. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  641. # We need awk for the "check" target. The system "awk" is bad on
  642. # some platforms.
  643. AC_REQUIRE([AC_PROG_AWK])dnl
  644. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  645. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  646. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  647. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  648. [_AM_PROG_TAR([v7])])])
  649. _AM_IF_OPTION([no-dependencies],,
  650. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  651. [_AM_DEPENDENCIES([CC])],
  652. [m4_define([AC_PROG_CC],
  653. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  654. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  655. [_AM_DEPENDENCIES([CXX])],
  656. [m4_define([AC_PROG_CXX],
  657. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  658. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  659. [_AM_DEPENDENCIES([OBJC])],
  660. [m4_define([AC_PROG_OBJC],
  661. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  662. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  663. [_AM_DEPENDENCIES([OBJCXX])],
  664. [m4_define([AC_PROG_OBJCXX],
  665. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  666. ])
  667. AC_REQUIRE([AM_SILENT_RULES])dnl
  668. dnl The testsuite driver may need to know about EXEEXT, so add the
  669. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  670. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  671. AC_CONFIG_COMMANDS_PRE(dnl
  672. [m4_provide_if([_AM_COMPILER_EXEEXT],
  673. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  674. ])
  675. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  676. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  677. dnl mangled by Autoconf and run in a shell conditional statement.
  678. m4_define([_AC_COMPILER_EXEEXT],
  679. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  680. # When config.status generates a header, we must update the stamp-h file.
  681. # This file resides in the same directory as the config header
  682. # that is generated. The stamp files are numbered to have different names.
  683. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  684. # loop where config.status creates the headers, so we can generate
  685. # our stamp files there.
  686. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  687. [# Compute $1's index in $config_headers.
  688. _am_arg=$1
  689. _am_stamp_count=1
  690. for _am_header in $config_headers :; do
  691. case $_am_header in
  692. $_am_arg | $_am_arg:* )
  693. break ;;
  694. * )
  695. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  696. esac
  697. done
  698. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  699. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  700. #
  701. # This file is free software; the Free Software Foundation
  702. # gives unlimited permission to copy and/or distribute it,
  703. # with or without modifications, as long as this notice is preserved.
  704. # AM_PROG_INSTALL_SH
  705. # ------------------
  706. # Define $install_sh.
  707. AC_DEFUN([AM_PROG_INSTALL_SH],
  708. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  709. if test x"${install_sh}" != xset; then
  710. case $am_aux_dir in
  711. *\ * | *\ *)
  712. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  713. *)
  714. install_sh="\${SHELL} $am_aux_dir/install-sh"
  715. esac
  716. fi
  717. AC_SUBST([install_sh])])
  718. # Copyright (C) 2003-2013 Free Software Foundation, Inc.
  719. #
  720. # This file is free software; the Free Software Foundation
  721. # gives unlimited permission to copy and/or distribute it,
  722. # with or without modifications, as long as this notice is preserved.
  723. # Check whether the underlying file-system supports filenames
  724. # with a leading dot. For instance MS-DOS doesn't.
  725. AC_DEFUN([AM_SET_LEADING_DOT],
  726. [rm -rf .tst 2>/dev/null
  727. mkdir .tst 2>/dev/null
  728. if test -d .tst; then
  729. am__leading_dot=.
  730. else
  731. am__leading_dot=_
  732. fi
  733. rmdir .tst 2>/dev/null
  734. AC_SUBST([am__leading_dot])])
  735. # Check to see how 'make' treats includes. -*- Autoconf -*-
  736. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  737. #
  738. # This file is free software; the Free Software Foundation
  739. # gives unlimited permission to copy and/or distribute it,
  740. # with or without modifications, as long as this notice is preserved.
  741. # AM_MAKE_INCLUDE()
  742. # -----------------
  743. # Check to see how make treats includes.
  744. AC_DEFUN([AM_MAKE_INCLUDE],
  745. [am_make=${MAKE-make}
  746. cat > confinc << 'END'
  747. am__doit:
  748. @echo this is the am__doit target
  749. .PHONY: am__doit
  750. END
  751. # If we don't find an include directive, just comment out the code.
  752. AC_MSG_CHECKING([for style of include used by $am_make])
  753. am__include="#"
  754. am__quote=
  755. _am_result=none
  756. # First try GNU make style include.
  757. echo "include confinc" > confmf
  758. # Ignore all kinds of additional output from 'make'.
  759. case `$am_make -s -f confmf 2> /dev/null` in #(
  760. *the\ am__doit\ target*)
  761. am__include=include
  762. am__quote=
  763. _am_result=GNU
  764. ;;
  765. esac
  766. # Now try BSD make style include.
  767. if test "$am__include" = "#"; then
  768. echo '.include "confinc"' > confmf
  769. case `$am_make -s -f confmf 2> /dev/null` in #(
  770. *the\ am__doit\ target*)
  771. am__include=.include
  772. am__quote="\""
  773. _am_result=BSD
  774. ;;
  775. esac
  776. fi
  777. AC_SUBST([am__include])
  778. AC_SUBST([am__quote])
  779. AC_MSG_RESULT([$_am_result])
  780. rm -f confinc confmf
  781. ])
  782. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  783. #
  784. # This file is free software; the Free Software Foundation
  785. # gives unlimited permission to copy and/or distribute it,
  786. # with or without modifications, as long as this notice is preserved.
  787. # AM_PROG_CC_C_O
  788. # --------------
  789. # Like AC_PROG_CC_C_O, but changed for automake.
  790. AC_DEFUN([AM_PROG_CC_C_O],
  791. [AC_REQUIRE([AC_PROG_CC_C_O])dnl
  792. AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  793. AC_REQUIRE_AUX_FILE([compile])dnl
  794. # FIXME: we rely on the cache variable name because
  795. # there is no other way.
  796. set dummy $CC
  797. am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
  798. eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
  799. if test "$am_t" != yes; then
  800. # Losing compiler, so override with the script.
  801. # FIXME: It is wrong to rewrite CC.
  802. # But if we don't then we get into trouble of one sort or another.
  803. # A longer-term fix would be to have automake use am__CC in this case,
  804. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  805. CC="$am_aux_dir/compile $CC"
  806. fi
  807. dnl Make sure AC_PROG_CC is never called again, or it will override our
  808. dnl setting of CC.
  809. m4_define([AC_PROG_CC],
  810. [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
  811. ])
  812. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  813. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  814. #
  815. # This file is free software; the Free Software Foundation
  816. # gives unlimited permission to copy and/or distribute it,
  817. # with or without modifications, as long as this notice is preserved.
  818. # AM_MISSING_PROG(NAME, PROGRAM)
  819. # ------------------------------
  820. AC_DEFUN([AM_MISSING_PROG],
  821. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  822. $1=${$1-"${am_missing_run}$2"}
  823. AC_SUBST($1)])
  824. # AM_MISSING_HAS_RUN
  825. # ------------------
  826. # Define MISSING if not defined so far and test if it is modern enough.
  827. # If it is, set am_missing_run to use it, otherwise, to nothing.
  828. AC_DEFUN([AM_MISSING_HAS_RUN],
  829. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  830. AC_REQUIRE_AUX_FILE([missing])dnl
  831. if test x"${MISSING+set}" != xset; then
  832. case $am_aux_dir in
  833. *\ * | *\ *)
  834. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  835. *)
  836. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  837. esac
  838. fi
  839. # Use eval to expand $SHELL
  840. if eval "$MISSING --is-lightweight"; then
  841. am_missing_run="$MISSING "
  842. else
  843. am_missing_run=
  844. AC_MSG_WARN(['missing' script is too old or missing])
  845. fi
  846. ])
  847. # Helper functions for option handling. -*- Autoconf -*-
  848. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  849. #
  850. # This file is free software; the Free Software Foundation
  851. # gives unlimited permission to copy and/or distribute it,
  852. # with or without modifications, as long as this notice is preserved.
  853. # _AM_MANGLE_OPTION(NAME)
  854. # -----------------------
  855. AC_DEFUN([_AM_MANGLE_OPTION],
  856. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  857. # _AM_SET_OPTION(NAME)
  858. # --------------------
  859. # Set option NAME. Presently that only means defining a flag for this option.
  860. AC_DEFUN([_AM_SET_OPTION],
  861. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  862. # _AM_SET_OPTIONS(OPTIONS)
  863. # ------------------------
  864. # OPTIONS is a space-separated list of Automake options.
  865. AC_DEFUN([_AM_SET_OPTIONS],
  866. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  867. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  868. # -------------------------------------------
  869. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  870. AC_DEFUN([_AM_IF_OPTION],
  871. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  872. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  873. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  874. #
  875. # This file is free software; the Free Software Foundation
  876. # gives unlimited permission to copy and/or distribute it,
  877. # with or without modifications, as long as this notice is preserved.
  878. # AM_SANITY_CHECK
  879. # ---------------
  880. AC_DEFUN([AM_SANITY_CHECK],
  881. [AC_MSG_CHECKING([whether build environment is sane])
  882. # Reject unsafe characters in $srcdir or the absolute working directory
  883. # name. Accept space and tab only in the latter.
  884. am_lf='
  885. '
  886. case `pwd` in
  887. *[[\\\"\#\$\&\'\`$am_lf]]*)
  888. AC_MSG_ERROR([unsafe absolute working directory name]);;
  889. esac
  890. case $srcdir in
  891. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  892. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  893. esac
  894. # Do 'set' in a subshell so we don't clobber the current shell's
  895. # arguments. Must try -L first in case configure is actually a
  896. # symlink; some systems play weird games with the mod time of symlinks
  897. # (eg FreeBSD returns the mod time of the symlink's containing
  898. # directory).
  899. if (
  900. am_has_slept=no
  901. for am_try in 1 2; do
  902. echo "timestamp, slept: $am_has_slept" > conftest.file
  903. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  904. if test "$[*]" = "X"; then
  905. # -L didn't work.
  906. set X `ls -t "$srcdir/configure" conftest.file`
  907. fi
  908. if test "$[*]" != "X $srcdir/configure conftest.file" \
  909. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  910. # If neither matched, then we have a broken ls. This can happen
  911. # if, for instance, CONFIG_SHELL is bash and it inherits a
  912. # broken ls alias from the environment. This has actually
  913. # happened. Such a system could not be considered "sane".
  914. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  915. alias in your environment])
  916. fi
  917. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  918. break
  919. fi
  920. # Just in case.
  921. sleep 1
  922. am_has_slept=yes
  923. done
  924. test "$[2]" = conftest.file
  925. )
  926. then
  927. # Ok.
  928. :
  929. else
  930. AC_MSG_ERROR([newly created file is older than distributed files!
  931. Check your system clock])
  932. fi
  933. AC_MSG_RESULT([yes])
  934. # If we didn't sleep, we still need to ensure time stamps of config.status and
  935. # generated files are strictly newer.
  936. am_sleep_pid=
  937. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  938. ( sleep 1 ) &
  939. am_sleep_pid=$!
  940. fi
  941. AC_CONFIG_COMMANDS_PRE(
  942. [AC_MSG_CHECKING([that generated files are newer than configure])
  943. if test -n "$am_sleep_pid"; then
  944. # Hide warnings about reused PIDs.
  945. wait $am_sleep_pid 2>/dev/null
  946. fi
  947. AC_MSG_RESULT([done])])
  948. rm -f conftest.file
  949. ])
  950. # Copyright (C) 2009-2013 Free Software Foundation, Inc.
  951. #
  952. # This file is free software; the Free Software Foundation
  953. # gives unlimited permission to copy and/or distribute it,
  954. # with or without modifications, as long as this notice is preserved.
  955. # AM_SILENT_RULES([DEFAULT])
  956. # --------------------------
  957. # Enable less verbose build rules; with the default set to DEFAULT
  958. # ("yes" being less verbose, "no" or empty being verbose).
  959. AC_DEFUN([AM_SILENT_RULES],
  960. [AC_ARG_ENABLE([silent-rules], [dnl
  961. AS_HELP_STRING(
  962. [--enable-silent-rules],
  963. [less verbose build output (undo: "make V=1")])
  964. AS_HELP_STRING(
  965. [--disable-silent-rules],
  966. [verbose build output (undo: "make V=0")])dnl
  967. ])
  968. case $enable_silent_rules in @%:@ (((
  969. yes) AM_DEFAULT_VERBOSITY=0;;
  970. no) AM_DEFAULT_VERBOSITY=1;;
  971. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  972. esac
  973. dnl
  974. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  975. dnl do not support nested variable expansions.
  976. dnl See automake bug#9928 and bug#10237.
  977. am_make=${MAKE-make}
  978. AC_CACHE_CHECK([whether $am_make supports nested variables],
  979. [am_cv_make_support_nested_variables],
  980. [if AS_ECHO([['TRUE=$(BAR$(V))
  981. BAR0=false
  982. BAR1=true
  983. V=1
  984. am__doit:
  985. @$(TRUE)
  986. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  987. am_cv_make_support_nested_variables=yes
  988. else
  989. am_cv_make_support_nested_variables=no
  990. fi])
  991. if test $am_cv_make_support_nested_variables = yes; then
  992. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  993. AM_V='$(V)'
  994. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  995. else
  996. AM_V=$AM_DEFAULT_VERBOSITY
  997. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  998. fi
  999. AC_SUBST([AM_V])dnl
  1000. AM_SUBST_NOTMAKE([AM_V])dnl
  1001. AC_SUBST([AM_DEFAULT_V])dnl
  1002. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  1003. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  1004. AM_BACKSLASH='\'
  1005. AC_SUBST([AM_BACKSLASH])dnl
  1006. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  1007. ])
  1008. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  1009. #
  1010. # This file is free software; the Free Software Foundation
  1011. # gives unlimited permission to copy and/or distribute it,
  1012. # with or without modifications, as long as this notice is preserved.
  1013. # AM_PROG_INSTALL_STRIP
  1014. # ---------------------
  1015. # One issue with vendor 'install' (even GNU) is that you can't
  1016. # specify the program used to strip binaries. This is especially
  1017. # annoying in cross-compiling environments, where the build's strip
  1018. # is unlikely to handle the host's binaries.
  1019. # Fortunately install-sh will honor a STRIPPROG variable, so we
  1020. # always use install-sh in "make install-strip", and initialize
  1021. # STRIPPROG with the value of the STRIP variable (set by the user).
  1022. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  1023. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1024. # Installed binaries are usually stripped using 'strip' when the user
  1025. # run "make install-strip". However 'strip' might not be the right
  1026. # tool to use in cross-compilation environments, therefore Automake
  1027. # will honor the 'STRIP' environment variable to overrule this program.
  1028. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  1029. if test "$cross_compiling" != no; then
  1030. AC_CHECK_TOOL([STRIP], [strip], :)
  1031. fi
  1032. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  1033. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1034. # Copyright (C) 2006-2013 Free Software Foundation, Inc.
  1035. #
  1036. # This file is free software; the Free Software Foundation
  1037. # gives unlimited permission to copy and/or distribute it,
  1038. # with or without modifications, as long as this notice is preserved.
  1039. # _AM_SUBST_NOTMAKE(VARIABLE)
  1040. # ---------------------------
  1041. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  1042. # This macro is traced by Automake.
  1043. AC_DEFUN([_AM_SUBST_NOTMAKE])
  1044. # AM_SUBST_NOTMAKE(VARIABLE)
  1045. # --------------------------
  1046. # Public sister of _AM_SUBST_NOTMAKE.
  1047. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  1048. # Check how to create a tarball. -*- Autoconf -*-
  1049. # Copyright (C) 2004-2013 Free Software Foundation, Inc.
  1050. #
  1051. # This file is free software; the Free Software Foundation
  1052. # gives unlimited permission to copy and/or distribute it,
  1053. # with or without modifications, as long as this notice is preserved.
  1054. # _AM_PROG_TAR(FORMAT)
  1055. # --------------------
  1056. # Check how to create a tarball in format FORMAT.
  1057. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  1058. #
  1059. # Substitute a variable $(am__tar) that is a command
  1060. # writing to stdout a FORMAT-tarball containing the directory
  1061. # $tardir.
  1062. # tardir=directory && $(am__tar) > result.tar
  1063. #
  1064. # Substitute a variable $(am__untar) that extract such
  1065. # a tarball read from stdin.
  1066. # $(am__untar) < result.tar
  1067. #
  1068. AC_DEFUN([_AM_PROG_TAR],
  1069. [# Always define AMTAR for backward compatibility. Yes, it's still used
  1070. # in the wild :-( We should find a proper way to deprecate it ...
  1071. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  1072. # We'll loop over all known methods to create a tar archive until one works.
  1073. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  1074. m4_if([$1], [v7],
  1075. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  1076. [m4_case([$1],
  1077. [ustar],
  1078. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  1079. # There is notably a 21 bits limit for the UID and the GID. In fact,
  1080. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  1081. # and bug#13588).
  1082. am_max_uid=2097151 # 2^21 - 1
  1083. am_max_gid=$am_max_uid
  1084. # The $UID and $GID variables are not portable, so we need to resort
  1085. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  1086. # below are definitely unexpected, so allow the users to see them
  1087. # (that is, avoid stderr redirection).
  1088. am_uid=`id -u || echo unknown`
  1089. am_gid=`id -g || echo unknown`
  1090. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  1091. if test $am_uid -le $am_max_uid; then
  1092. AC_MSG_RESULT([yes])
  1093. else
  1094. AC_MSG_RESULT([no])
  1095. _am_tools=none
  1096. fi
  1097. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  1098. if test $am_gid -le $am_max_gid; then
  1099. AC_MSG_RESULT([yes])
  1100. else
  1101. AC_MSG_RESULT([no])
  1102. _am_tools=none
  1103. fi],
  1104. [pax],
  1105. [],
  1106. [m4_fatal([Unknown tar format])])
  1107. AC_MSG_CHECKING([how to create a $1 tar archive])
  1108. # Go ahead even if we have the value already cached. We do so because we
  1109. # need to set the values for the 'am__tar' and 'am__untar' variables.
  1110. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  1111. for _am_tool in $_am_tools; do
  1112. case $_am_tool in
  1113. gnutar)
  1114. for _am_tar in tar gnutar gtar; do
  1115. AM_RUN_LOG([$_am_tar --version]) && break
  1116. done
  1117. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  1118. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  1119. am__untar="$_am_tar -xf -"
  1120. ;;
  1121. plaintar)
  1122. # Must skip GNU tar: if it does not support --format= it doesn't create
  1123. # ustar tarball either.
  1124. (tar --version) >/dev/null 2>&1 && continue
  1125. am__tar='tar chf - "$$tardir"'
  1126. am__tar_='tar chf - "$tardir"'
  1127. am__untar='tar xf -'
  1128. ;;
  1129. pax)
  1130. am__tar='pax -L -x $1 -w "$$tardir"'
  1131. am__tar_='pax -L -x $1 -w "$tardir"'
  1132. am__untar='pax -r'
  1133. ;;
  1134. cpio)
  1135. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  1136. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  1137. am__untar='cpio -i -H $1 -d'
  1138. ;;
  1139. none)
  1140. am__tar=false
  1141. am__tar_=false
  1142. am__untar=false
  1143. ;;
  1144. esac
  1145. # If the value was cached, stop now. We just wanted to have am__tar
  1146. # and am__untar set.
  1147. test -n "${am_cv_prog_tar_$1}" && break
  1148. # tar/untar a dummy directory, and stop if the command works.
  1149. rm -rf conftest.dir
  1150. mkdir conftest.dir
  1151. echo GrepMe > conftest.dir/file
  1152. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  1153. rm -rf conftest.dir
  1154. if test -s conftest.tar; then
  1155. AM_RUN_LOG([$am__untar <conftest.tar])
  1156. AM_RUN_LOG([cat conftest.dir/file])
  1157. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1158. fi
  1159. done
  1160. rm -rf conftest.dir
  1161. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1162. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1163. AC_SUBST([am__tar])
  1164. AC_SUBST([am__untar])
  1165. ]) # _AM_PROG_TAR
  1166. m4_include([m4/as-compiler-flag.m4])
  1167. m4_include([m4/libtool.m4])
  1168. m4_include([m4/ltoptions.m4])
  1169. m4_include([m4/ltsugar.m4])
  1170. m4_include([m4/ltversion.m4])
  1171. m4_include([m4/lt~obsolete.m4])