aclocal.m4 53 KB

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