You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1486 lines
53 KiB

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