aclocal.m4 56 KB

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