aclocal.m4 45 KB

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