aclocal.m4 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368
  1. # generated automatically by aclocal 1.17 -*- Autoconf -*-
  2. # Copyright (C) 1996-2024 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.72],,
  14. [m4_warning([this file was generated for autoconf 2.72.
  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. # Copyright (C) 2002-2024 Free Software Foundation, Inc.
  19. #
  20. # This file is free software; the Free Software Foundation
  21. # gives unlimited permission to copy and/or distribute it,
  22. # with or without modifications, as long as this notice is preserved.
  23. # AM_AUTOMAKE_VERSION(VERSION)
  24. # ----------------------------
  25. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  26. # generated from the m4 files accompanying Automake X.Y.
  27. # (This private macro should not be called outside this file.)
  28. AC_DEFUN([AM_AUTOMAKE_VERSION],
  29. [am__api_version='1.17'
  30. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  31. dnl require some minimum version. Point them to the right macro.
  32. m4_if([$1], [1.17], [],
  33. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  34. ])
  35. # _AM_AUTOCONF_VERSION(VERSION)
  36. # -----------------------------
  37. # aclocal traces this macro to find the Autoconf version.
  38. # This is a private macro too. Using m4_define simplifies
  39. # the logic in aclocal, which can simply ignore this definition.
  40. m4_define([_AM_AUTOCONF_VERSION], [])
  41. # AM_SET_CURRENT_AUTOMAKE_VERSION
  42. # -------------------------------
  43. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  44. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  45. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  46. [AM_AUTOMAKE_VERSION([1.17])dnl
  47. m4_ifndef([AC_AUTOCONF_VERSION],
  48. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  49. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  50. # Figure out how to run the assembler. -*- Autoconf -*-
  51. # Copyright (C) 2001-2024 Free Software Foundation, Inc.
  52. #
  53. # This file is free software; the Free Software Foundation
  54. # gives unlimited permission to copy and/or distribute it,
  55. # with or without modifications, as long as this notice is preserved.
  56. # AM_PROG_AS
  57. # ----------
  58. AC_DEFUN([AM_PROG_AS],
  59. [# By default we simply use the C compiler to build assembly code.
  60. AC_REQUIRE([AC_PROG_CC])
  61. test "${CCAS+set}" = set || CCAS=$CC
  62. test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
  63. AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
  64. AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
  65. _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
  66. ])
  67. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  68. # Copyright (C) 2001-2024 Free Software Foundation, Inc.
  69. #
  70. # This file is free software; the Free Software Foundation
  71. # gives unlimited permission to copy and/or distribute it,
  72. # with or without modifications, as long as this notice is preserved.
  73. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  74. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  75. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  76. #
  77. # Of course, Automake must honor this variable whenever it calls a
  78. # tool from the auxiliary directory. The problem is that $srcdir (and
  79. # therefore $ac_aux_dir as well) can be either absolute or relative,
  80. # depending on how configure is run. This is pretty annoying, since
  81. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  82. # source directory, any form will work fine, but in subdirectories a
  83. # relative path needs to be adjusted first.
  84. #
  85. # $ac_aux_dir/missing
  86. # fails when called from a subdirectory if $ac_aux_dir is relative
  87. # $top_srcdir/$ac_aux_dir/missing
  88. # fails if $ac_aux_dir is absolute,
  89. # fails when called from a subdirectory in a VPATH build with
  90. # a relative $ac_aux_dir
  91. #
  92. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  93. # are both prefixed by $srcdir. In an in-source build this is usually
  94. # harmless because $srcdir is '.', but things will broke when you
  95. # start a VPATH build or use an absolute $srcdir.
  96. #
  97. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  98. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  99. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  100. # and then we would define $MISSING as
  101. # MISSING="\${SHELL} $am_aux_dir/missing"
  102. # This will work as long as MISSING is not called from configure, because
  103. # unfortunately $(top_srcdir) has no meaning in configure.
  104. # However there are other variables, like CC, which are often used in
  105. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  106. #
  107. # Another solution, used here, is to always expand $ac_aux_dir to an
  108. # absolute PATH. The drawback is that using absolute paths prevent a
  109. # configured tree to be moved without reconfiguration.
  110. AC_DEFUN([AM_AUX_DIR_EXPAND],
  111. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  112. # Expand $ac_aux_dir to an absolute path.
  113. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  114. ])
  115. # AM_CONDITIONAL -*- Autoconf -*-
  116. # Copyright (C) 1997-2024 Free Software Foundation, Inc.
  117. #
  118. # This file is free software; the Free Software Foundation
  119. # gives unlimited permission to copy and/or distribute it,
  120. # with or without modifications, as long as this notice is preserved.
  121. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  122. # -------------------------------------
  123. # Define a conditional.
  124. AC_DEFUN([AM_CONDITIONAL],
  125. [AC_PREREQ([2.52])dnl
  126. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  127. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  128. AC_SUBST([$1_TRUE])dnl
  129. AC_SUBST([$1_FALSE])dnl
  130. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  131. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  132. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  133. if $2; then
  134. $1_TRUE=
  135. $1_FALSE='#'
  136. else
  137. $1_TRUE='#'
  138. $1_FALSE=
  139. fi
  140. AC_CONFIG_COMMANDS_PRE(
  141. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  142. AC_MSG_ERROR([[conditional "$1" was never defined.
  143. Usually this means the macro was only invoked conditionally.]])
  144. fi])])
  145. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
  146. #
  147. # This file is free software; the Free Software Foundation
  148. # gives unlimited permission to copy and/or distribute it,
  149. # with or without modifications, as long as this notice is preserved.
  150. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  151. # written in clear, in which case automake, when reading aclocal.m4,
  152. # will think it sees a *use*, and therefore will trigger all it's
  153. # C support machinery. Also note that it means that autoscan, seeing
  154. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  155. # _AM_DEPENDENCIES(NAME)
  156. # ----------------------
  157. # See how the compiler implements dependency checking.
  158. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  159. # We try a few techniques and use that to set a single cache variable.
  160. #
  161. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  162. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  163. # dependency, and given that the user is not expected to run this macro,
  164. # just rely on AC_PROG_CC.
  165. AC_DEFUN([_AM_DEPENDENCIES],
  166. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  167. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  168. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  169. AC_REQUIRE([AM_DEP_TRACK])dnl
  170. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  171. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  172. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  173. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  174. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  175. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  176. [depcc="$$1" am_compiler_list=])
  177. AC_CACHE_CHECK([dependency style of $depcc],
  178. [am_cv_$1_dependencies_compiler_type],
  179. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  180. # We make a subdir and do the tests there. Otherwise we can end up
  181. # making bogus files that we don't know about and never remove. For
  182. # instance it was reported that on HP-UX the gcc test will end up
  183. # making a dummy file named 'D' -- because '-MD' means "put the output
  184. # in D".
  185. rm -rf conftest.dir
  186. mkdir conftest.dir
  187. # Copy depcomp to subdir because otherwise we won't find it if we're
  188. # using a relative directory.
  189. cp "$am_depcomp" conftest.dir
  190. cd conftest.dir
  191. # We will build objects and dependencies in a subdirectory because
  192. # it helps to detect inapplicable dependency modes. For instance
  193. # both Tru64's cc and ICC support -MD to output dependencies as a
  194. # side effect of compilation, but ICC will put the dependencies in
  195. # the current directory while Tru64 will put them in the object
  196. # directory.
  197. mkdir sub
  198. am_cv_$1_dependencies_compiler_type=none
  199. if test "$am_compiler_list" = ""; then
  200. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  201. fi
  202. am__universal=false
  203. m4_case([$1], [CC],
  204. [case " $depcc " in #(
  205. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  206. esac],
  207. [CXX],
  208. [case " $depcc " in #(
  209. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  210. esac])
  211. for depmode in $am_compiler_list; do
  212. # Setup a source with many dependencies, because some compilers
  213. # like to wrap large dependency lists on column 80 (with \), and
  214. # we should not choose a depcomp mode which is confused by this.
  215. #
  216. # We need to recreate these files for each test, as the compiler may
  217. # overwrite some of them when testing with obscure command lines.
  218. # This happens at least with the AIX C compiler.
  219. : > sub/conftest.c
  220. for i in 1 2 3 4 5 6; do
  221. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  222. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  223. # Solaris 10 /bin/sh.
  224. echo '/* dummy */' > sub/conftst$i.h
  225. done
  226. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  227. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  228. # mode. It turns out that the SunPro C++ compiler does not properly
  229. # handle '-M -o', and we need to detect this. Also, some Intel
  230. # versions had trouble with output in subdirs.
  231. am__obj=sub/conftest.${OBJEXT-o}
  232. am__minus_obj="-o $am__obj"
  233. case $depmode in
  234. gcc)
  235. # This depmode causes a compiler race in universal mode.
  236. test "$am__universal" = false || continue
  237. ;;
  238. nosideeffect)
  239. # After this tag, mechanisms are not by side-effect, so they'll
  240. # only be used when explicitly requested.
  241. if test "x$enable_dependency_tracking" = xyes; then
  242. continue
  243. else
  244. break
  245. fi
  246. ;;
  247. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  248. # This compiler won't grok '-c -o', but also, the minuso test has
  249. # not run yet. These depmodes are late enough in the game, and
  250. # so weak that their functioning should not be impacted.
  251. am__obj=conftest.${OBJEXT-o}
  252. am__minus_obj=
  253. ;;
  254. none) break ;;
  255. esac
  256. if depmode=$depmode \
  257. source=sub/conftest.c object=$am__obj \
  258. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  259. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  260. >/dev/null 2>conftest.err &&
  261. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  262. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  263. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  264. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  265. # icc doesn't choke on unknown options, it will just issue warnings
  266. # or remarks (even with -Werror). So we grep stderr for any message
  267. # that says an option was ignored or not supported.
  268. # When given -MP, icc 7.0 and 7.1 complain thus:
  269. # icc: Command line warning: ignoring option '-M'; no argument required
  270. # The diagnosis changed in icc 8.0:
  271. # icc: Command line remark: option '-MP' not supported
  272. if (grep 'ignoring option' conftest.err ||
  273. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  274. am_cv_$1_dependencies_compiler_type=$depmode
  275. break
  276. fi
  277. fi
  278. done
  279. cd ..
  280. rm -rf conftest.dir
  281. else
  282. am_cv_$1_dependencies_compiler_type=none
  283. fi
  284. ])
  285. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  286. AM_CONDITIONAL([am__fastdep$1], [
  287. test "x$enable_dependency_tracking" != xno \
  288. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  289. ])
  290. # AM_SET_DEPDIR
  291. # -------------
  292. # Choose a directory name for dependency files.
  293. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  294. AC_DEFUN([AM_SET_DEPDIR],
  295. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  296. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  297. ])
  298. # AM_DEP_TRACK
  299. # ------------
  300. AC_DEFUN([AM_DEP_TRACK],
  301. [AC_ARG_ENABLE([dependency-tracking], [dnl
  302. AS_HELP_STRING(
  303. [--enable-dependency-tracking],
  304. [do not reject slow dependency extractors])
  305. AS_HELP_STRING(
  306. [--disable-dependency-tracking],
  307. [speeds up one-time build])])
  308. if test "x$enable_dependency_tracking" != xno; then
  309. am_depcomp="$ac_aux_dir/depcomp"
  310. AMDEPBACKSLASH='\'
  311. am__nodep='_no'
  312. fi
  313. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  314. AC_SUBST([AMDEPBACKSLASH])dnl
  315. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  316. AC_SUBST([am__nodep])dnl
  317. _AM_SUBST_NOTMAKE([am__nodep])dnl
  318. ])
  319. # Generate code to set up dependency tracking. -*- Autoconf -*-
  320. # Copyright (C) 1999-2024 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_OUTPUT_DEPENDENCY_COMMANDS
  326. # ------------------------------
  327. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  328. [{
  329. # Older Autoconf quotes --file arguments for eval, but not when files
  330. # are listed without --file. Let's play safe and only enable the eval
  331. # if we detect the quoting.
  332. # TODO: see whether this extra hack can be removed once we start
  333. # requiring Autoconf 2.70 or later.
  334. AS_CASE([$CONFIG_FILES],
  335. [*\'*], [eval set x "$CONFIG_FILES"],
  336. [*], [set x $CONFIG_FILES])
  337. shift
  338. # Used to flag and report bootstrapping failures.
  339. am_rc=0
  340. for am_mf
  341. do
  342. # Strip MF so we end up with the name of the file.
  343. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
  344. # Check whether this is an Automake generated Makefile which includes
  345. # dependency-tracking related rules and includes.
  346. # Grep'ing the whole file directly is not great: AIX grep has a line
  347. # limit of 2048, but all sed's we know have understand at least 4000.
  348. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
  349. || continue
  350. am_dirpart=`AS_DIRNAME(["$am_mf"])`
  351. am_filepart=`AS_BASENAME(["$am_mf"])`
  352. AM_RUN_LOG([cd "$am_dirpart" \
  353. && sed -e '/# am--include-marker/d' "$am_filepart" \
  354. | $MAKE -f - am--depfiles]) || am_rc=$?
  355. done
  356. if test $am_rc -ne 0; then
  357. AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
  358. for automatic dependency tracking. If GNU make was not used, consider
  359. re-running the configure script with MAKE="gmake" (or whatever is
  360. necessary). You can also try re-running configure with the
  361. '--disable-dependency-tracking' option to at least be able to build
  362. the package (albeit without support for automatic dependency tracking).])
  363. fi
  364. AS_UNSET([am_dirpart])
  365. AS_UNSET([am_filepart])
  366. AS_UNSET([am_mf])
  367. AS_UNSET([am_rc])
  368. rm -f conftest-deps.mk
  369. }
  370. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  371. # AM_OUTPUT_DEPENDENCY_COMMANDS
  372. # -----------------------------
  373. # This macro should only be invoked once -- use via AC_REQUIRE.
  374. #
  375. # This code is only required when automatic dependency tracking is enabled.
  376. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in
  377. # order to bootstrap the dependency handling code.
  378. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  379. [AC_CONFIG_COMMANDS([depfiles],
  380. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  381. [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
  382. # Do all the work for Automake. -*- Autoconf -*-
  383. # Copyright (C) 1996-2024 Free Software Foundation, Inc.
  384. #
  385. # This file is free software; the Free Software Foundation
  386. # gives unlimited permission to copy and/or distribute it,
  387. # with or without modifications, as long as this notice is preserved.
  388. # This macro actually does too much. Some checks are only needed if
  389. # your package does certain things. But this isn't really a big deal.
  390. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  391. m4_define([AC_PROG_CC],
  392. m4_defn([AC_PROG_CC])
  393. [_AM_PROG_CC_C_O
  394. ])
  395. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  396. # AM_INIT_AUTOMAKE([OPTIONS])
  397. # -----------------------------------------------
  398. # The call with PACKAGE and VERSION arguments is the old style
  399. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  400. # and VERSION should now be passed to AC_INIT and removed from
  401. # the call to AM_INIT_AUTOMAKE.
  402. # We support both call styles for the transition. After
  403. # the next Automake release, Autoconf can make the AC_INIT
  404. # arguments mandatory, and then we can depend on a new Autoconf
  405. # release and drop the old call support.
  406. AC_DEFUN([AM_INIT_AUTOMAKE],
  407. [AC_PREREQ([2.65])dnl
  408. m4_ifdef([_$0_ALREADY_INIT],
  409. [m4_fatal([$0 expanded multiple times
  410. ]m4_defn([_$0_ALREADY_INIT]))],
  411. [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
  412. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  413. dnl the ones we care about.
  414. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  415. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  416. AC_REQUIRE([AC_PROG_INSTALL])dnl
  417. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  418. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  419. # is not polluted with repeated "-I."
  420. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  421. # test to see if srcdir already configured
  422. if test -f $srcdir/config.status; then
  423. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  424. fi
  425. fi
  426. # test whether we have cygpath
  427. if test -z "$CYGPATH_W"; then
  428. if (cygpath --version) >/dev/null 2>/dev/null; then
  429. CYGPATH_W='cygpath -w'
  430. else
  431. CYGPATH_W=echo
  432. fi
  433. fi
  434. AC_SUBST([CYGPATH_W])
  435. # Define the identity of the package.
  436. dnl Distinguish between old-style and new-style calls.
  437. m4_ifval([$2],
  438. [AC_DIAGNOSE([obsolete],
  439. [$0: two- and three-arguments forms are deprecated.])
  440. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  441. AC_SUBST([PACKAGE], [$1])dnl
  442. AC_SUBST([VERSION], [$2])],
  443. [_AM_SET_OPTIONS([$1])dnl
  444. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  445. m4_if(
  446. m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
  447. [ok:ok],,
  448. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  449. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  450. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  451. _AM_IF_OPTION([no-define],,
  452. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  453. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  454. # Some tools Automake needs.
  455. AC_REQUIRE([AM_SANITY_CHECK])dnl
  456. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  457. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  458. AM_MISSING_PROG([AUTOCONF], [autoconf])
  459. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  460. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  461. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  462. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  463. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  464. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  465. # For better backward compatibility. To be removed once Automake 1.9.x
  466. # dies out for good. For more background, see:
  467. # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  468. # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  469. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  470. # We need awk for the "check" target (and possibly the TAP driver). The
  471. # system "awk" is bad on some platforms.
  472. AC_REQUIRE([AC_PROG_AWK])dnl
  473. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  474. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  475. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  476. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  477. [_AM_PROG_TAR([v7])])])
  478. _AM_IF_OPTION([no-dependencies],,
  479. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  480. [_AM_DEPENDENCIES([CC])],
  481. [m4_define([AC_PROG_CC],
  482. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  483. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  484. [_AM_DEPENDENCIES([CXX])],
  485. [m4_define([AC_PROG_CXX],
  486. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  487. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  488. [_AM_DEPENDENCIES([OBJC])],
  489. [m4_define([AC_PROG_OBJC],
  490. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  491. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  492. [_AM_DEPENDENCIES([OBJCXX])],
  493. [m4_define([AC_PROG_OBJCXX],
  494. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  495. ])
  496. # Variables for tags utilities; see am/tags.am
  497. if test -z "$CTAGS"; then
  498. CTAGS=ctags
  499. fi
  500. AC_SUBST([CTAGS])
  501. if test -z "$ETAGS"; then
  502. ETAGS=etags
  503. fi
  504. AC_SUBST([ETAGS])
  505. if test -z "$CSCOPE"; then
  506. CSCOPE=cscope
  507. fi
  508. AC_SUBST([CSCOPE])
  509. AC_REQUIRE([_AM_SILENT_RULES])dnl
  510. dnl The testsuite driver may need to know about EXEEXT, so add the
  511. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  512. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  513. AC_CONFIG_COMMANDS_PRE(dnl
  514. [m4_provide_if([_AM_COMPILER_EXEEXT],
  515. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  516. AC_REQUIRE([_AM_PROG_RM_F])
  517. AC_REQUIRE([_AM_PROG_XARGS_N])
  518. dnl The trailing newline in this macro's definition is deliberate, for
  519. dnl backward compatibility and to allow trailing 'dnl'-style comments
  520. dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
  521. ])
  522. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  523. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  524. dnl mangled by Autoconf and run in a shell conditional statement.
  525. m4_define([_AC_COMPILER_EXEEXT],
  526. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  527. # When config.status generates a header, we must update the stamp-h file.
  528. # This file resides in the same directory as the config header
  529. # that is generated. The stamp files are numbered to have different names.
  530. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  531. # loop where config.status creates the headers, so we can generate
  532. # our stamp files there.
  533. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  534. [# Compute $1's index in $config_headers.
  535. _am_arg=$1
  536. _am_stamp_count=1
  537. for _am_header in $config_headers :; do
  538. case $_am_header in
  539. $_am_arg | $_am_arg:* )
  540. break ;;
  541. * )
  542. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  543. esac
  544. done
  545. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  546. # Copyright (C) 2001-2024 Free Software Foundation, Inc.
  547. #
  548. # This file is free software; the Free Software Foundation
  549. # gives unlimited permission to copy and/or distribute it,
  550. # with or without modifications, as long as this notice is preserved.
  551. # AM_PROG_INSTALL_SH
  552. # ------------------
  553. # Define $install_sh.
  554. AC_DEFUN([AM_PROG_INSTALL_SH],
  555. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  556. if test x"${install_sh+set}" != xset; then
  557. case $am_aux_dir in
  558. *\ * | *\ *)
  559. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  560. *)
  561. install_sh="\${SHELL} $am_aux_dir/install-sh"
  562. esac
  563. fi
  564. AC_SUBST([install_sh])])
  565. # Copyright (C) 2003-2024 Free Software Foundation, Inc.
  566. #
  567. # This file is free software; the Free Software Foundation
  568. # gives unlimited permission to copy and/or distribute it,
  569. # with or without modifications, as long as this notice is preserved.
  570. # Check whether the underlying file-system supports filenames
  571. # with a leading dot. For instance MS-DOS doesn't.
  572. AC_DEFUN([AM_SET_LEADING_DOT],
  573. [rm -rf .tst 2>/dev/null
  574. mkdir .tst 2>/dev/null
  575. if test -d .tst; then
  576. am__leading_dot=.
  577. else
  578. am__leading_dot=_
  579. fi
  580. rmdir .tst 2>/dev/null
  581. AC_SUBST([am__leading_dot])])
  582. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  583. # From Jim Meyering
  584. # Copyright (C) 1996-2024 Free Software Foundation, Inc.
  585. #
  586. # This file is free software; the Free Software Foundation
  587. # gives unlimited permission to copy and/or distribute it,
  588. # with or without modifications, as long as this notice is preserved.
  589. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  590. # ----------------------------------
  591. # Control maintainer-specific portions of Makefiles.
  592. # Default is to disable them, unless 'enable' is passed literally.
  593. # For symmetry, 'disable' may be passed as well. Anyway, the user
  594. # can override the default with the --enable/--disable switch.
  595. AC_DEFUN([AM_MAINTAINER_MODE],
  596. [m4_case(m4_default([$1], [disable]),
  597. [enable], [m4_define([am_maintainer_other], [disable])],
  598. [disable], [m4_define([am_maintainer_other], [enable])],
  599. [m4_define([am_maintainer_other], [enable])
  600. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  601. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  602. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  603. AC_ARG_ENABLE([maintainer-mode],
  604. [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  605. am_maintainer_other[ make rules and dependencies not useful
  606. (and sometimes confusing) to the casual installer])],
  607. [USE_MAINTAINER_MODE=$enableval],
  608. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  609. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  610. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  611. MAINT=$MAINTAINER_MODE_TRUE
  612. AC_SUBST([MAINT])dnl
  613. ]
  614. )
  615. # Check to see how 'make' treats includes. -*- Autoconf -*-
  616. # Copyright (C) 2001-2024 Free Software Foundation, Inc.
  617. #
  618. # This file is free software; the Free Software Foundation
  619. # gives unlimited permission to copy and/or distribute it,
  620. # with or without modifications, as long as this notice is preserved.
  621. # AM_MAKE_INCLUDE()
  622. # -----------------
  623. # Check whether make has an 'include' directive that can support all
  624. # the idioms we need for our automatic dependency tracking code.
  625. AC_DEFUN([AM_MAKE_INCLUDE],
  626. [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
  627. cat > confinc.mk << 'END'
  628. am__doit:
  629. @echo this is the am__doit target >confinc.out
  630. .PHONY: am__doit
  631. END
  632. am__include="#"
  633. am__quote=
  634. # BSD make does it like this.
  635. echo '.include "confinc.mk" # ignored' > confmf.BSD
  636. # Other make implementations (GNU, Solaris 10, AIX) do it like this.
  637. echo 'include confinc.mk # ignored' > confmf.GNU
  638. _am_result=no
  639. for s in GNU BSD; do
  640. AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
  641. AS_CASE([$?:`cat confinc.out 2>/dev/null`],
  642. ['0:this is the am__doit target'],
  643. [AS_CASE([$s],
  644. [BSD], [am__include='.include' am__quote='"'],
  645. [am__include='include' am__quote=''])])
  646. if test "$am__include" != "#"; then
  647. _am_result="yes ($s style)"
  648. break
  649. fi
  650. done
  651. rm -f confinc.* confmf.*
  652. AC_MSG_RESULT([${_am_result}])
  653. AC_SUBST([am__include])])
  654. AC_SUBST([am__quote])])
  655. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  656. # Copyright (C) 1997-2024 Free Software Foundation, Inc.
  657. #
  658. # This file is free software; the Free Software Foundation
  659. # gives unlimited permission to copy and/or distribute it,
  660. # with or without modifications, as long as this notice is preserved.
  661. # AM_MISSING_PROG(NAME, PROGRAM)
  662. # ------------------------------
  663. AC_DEFUN([AM_MISSING_PROG],
  664. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  665. $1=${$1-"${am_missing_run}$2"}
  666. AC_SUBST($1)])
  667. # AM_MISSING_HAS_RUN
  668. # ------------------
  669. # Define MISSING if not defined so far and test if it is modern enough.
  670. # If it is, set am_missing_run to use it, otherwise, to nothing.
  671. AC_DEFUN([AM_MISSING_HAS_RUN],
  672. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  673. AC_REQUIRE_AUX_FILE([missing])dnl
  674. if test x"${MISSING+set}" != xset; then
  675. MISSING="\${SHELL} '$am_aux_dir/missing'"
  676. fi
  677. # Use eval to expand $SHELL
  678. if eval "$MISSING --is-lightweight"; then
  679. am_missing_run="$MISSING "
  680. else
  681. am_missing_run=
  682. AC_MSG_WARN(['missing' script is too old or missing])
  683. fi
  684. ])
  685. # Helper functions for option handling. -*- Autoconf -*-
  686. # Copyright (C) 2001-2024 Free Software Foundation, Inc.
  687. #
  688. # This file is free software; the Free Software Foundation
  689. # gives unlimited permission to copy and/or distribute it,
  690. # with or without modifications, as long as this notice is preserved.
  691. # _AM_MANGLE_OPTION(NAME)
  692. # -----------------------
  693. AC_DEFUN([_AM_MANGLE_OPTION],
  694. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  695. # _AM_SET_OPTION(NAME)
  696. # --------------------
  697. # Set option NAME. Presently that only means defining a flag for this option.
  698. AC_DEFUN([_AM_SET_OPTION],
  699. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  700. # _AM_SET_OPTIONS(OPTIONS)
  701. # ------------------------
  702. # OPTIONS is a space-separated list of Automake options.
  703. AC_DEFUN([_AM_SET_OPTIONS],
  704. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  705. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  706. # -------------------------------------------
  707. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  708. AC_DEFUN([_AM_IF_OPTION],
  709. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  710. # Copyright (C) 1999-2024 Free Software Foundation, Inc.
  711. #
  712. # This file is free software; the Free Software Foundation
  713. # gives unlimited permission to copy and/or distribute it,
  714. # with or without modifications, as long as this notice is preserved.
  715. # _AM_PROG_CC_C_O
  716. # ---------------
  717. # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
  718. # to automatically call this.
  719. AC_DEFUN([_AM_PROG_CC_C_O],
  720. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  721. AC_REQUIRE_AUX_FILE([compile])dnl
  722. AC_LANG_PUSH([C])dnl
  723. AC_CACHE_CHECK(
  724. [whether $CC understands -c and -o together],
  725. [am_cv_prog_cc_c_o],
  726. [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  727. # Make sure it works both with $CC and with simple cc.
  728. # Following AC_PROG_CC_C_O, we do the test twice because some
  729. # compilers refuse to overwrite an existing .o file with -o,
  730. # though they will create one.
  731. am_cv_prog_cc_c_o=yes
  732. for am_i in 1 2; do
  733. if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  734. && test -f conftest2.$ac_objext; then
  735. : OK
  736. else
  737. am_cv_prog_cc_c_o=no
  738. break
  739. fi
  740. done
  741. rm -f core conftest*
  742. unset am_i])
  743. if test "$am_cv_prog_cc_c_o" != yes; then
  744. # Losing compiler, so override with the script.
  745. # FIXME: It is wrong to rewrite CC.
  746. # But if we don't then we get into trouble of one sort or another.
  747. # A longer-term fix would be to have automake use am__CC in this case,
  748. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  749. CC="$am_aux_dir/compile $CC"
  750. fi
  751. AC_LANG_POP([C])])
  752. # For backward compatibility.
  753. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  754. # Copyright (C) 2022-2024 Free Software Foundation, Inc.
  755. #
  756. # This file is free software; the Free Software Foundation
  757. # gives unlimited permission to copy and/or distribute it,
  758. # with or without modifications, as long as this notice is preserved.
  759. # _AM_PROG_RM_F
  760. # ---------------
  761. # Check whether 'rm -f' without any arguments works.
  762. # https://bugs.gnu.org/10828
  763. AC_DEFUN([_AM_PROG_RM_F],
  764. [am__rm_f_notfound=
  765. AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
  766. AC_SUBST(am__rm_f_notfound)
  767. ])
  768. # Copyright (C) 2001-2024 Free Software Foundation, Inc.
  769. #
  770. # This file is free software; the Free Software Foundation
  771. # gives unlimited permission to copy and/or distribute it,
  772. # with or without modifications, as long as this notice is preserved.
  773. # AM_RUN_LOG(COMMAND)
  774. # -------------------
  775. # Run COMMAND, save the exit status in ac_status, and log it.
  776. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  777. AC_DEFUN([AM_RUN_LOG],
  778. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  779. ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  780. ac_status=$?
  781. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  782. (exit $ac_status); }])
  783. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  784. # Copyright (C) 1996-2024 Free Software Foundation, Inc.
  785. #
  786. # This file is free software; the Free Software Foundation
  787. # gives unlimited permission to copy and/or distribute it,
  788. # with or without modifications, as long as this notice is preserved.
  789. # _AM_SLEEP_FRACTIONAL_SECONDS
  790. # ----------------------------
  791. AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
  792. AC_CACHE_CHECK([whether sleep supports fractional seconds],
  793. am_cv_sleep_fractional_seconds, [dnl
  794. AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
  795. [am_cv_sleep_fractional_seconds=no])
  796. ])])
  797. # _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
  798. # -----------------------------------
  799. # Determine the filesystem's resolution for file modification
  800. # timestamps. The coarsest we know of is FAT, with a resolution
  801. # of only two seconds, even with the most recent "exFAT" extensions.
  802. # The finest (e.g. ext4 with large inodes, XFS, ZFS) is one
  803. # nanosecond, matching clock_gettime. However, it is probably not
  804. # possible to delay execution of a shell script for less than one
  805. # millisecond, due to process creation overhead and scheduling
  806. # granularity, so we don't check for anything finer than that. (See below.)
  807. AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
  808. AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
  809. AC_CACHE_CHECK([filesystem timestamp resolution],
  810. am_cv_filesystem_timestamp_resolution, [dnl
  811. # Default to the worst case.
  812. am_cv_filesystem_timestamp_resolution=2
  813. # Only try to go finer than 1 sec if sleep can do it.
  814. # Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
  815. # - 1 sec is not much of a win compared to 2 sec, and
  816. # - it takes 2 seconds to perform the test whether 1 sec works.
  817. #
  818. # Instead, just use the default 2s on platforms that have 1s resolution,
  819. # accept the extra 1s delay when using $sleep in the Automake tests, in
  820. # exchange for not incurring the 2s delay for running the test for all
  821. # packages.
  822. #
  823. am_try_resolutions=
  824. if test "$am_cv_sleep_fractional_seconds" = yes; then
  825. # Even a millisecond often causes a bunch of false positives,
  826. # so just try a hundredth of a second. The time saved between .001 and
  827. # .01 is not terribly consequential.
  828. am_try_resolutions="0.01 0.1 $am_try_resolutions"
  829. fi
  830. # In order to catch current-generation FAT out, we must *modify* files
  831. # that already exist; the *creation* timestamp is finer. Use names
  832. # that make ls -t sort them differently when they have equal
  833. # timestamps than when they have distinct timestamps, keeping
  834. # in mind that ls -t prints the *newest* file first.
  835. rm -f conftest.ts?
  836. : > conftest.ts1
  837. : > conftest.ts2
  838. : > conftest.ts3
  839. # Make sure ls -t actually works. Do 'set' in a subshell so we don't
  840. # clobber the current shell's arguments. (Outer-level square brackets
  841. # are removed by m4; they're present so that m4 does not expand
  842. # <dollar><star>; be careful, easy to get confused.)
  843. if (
  844. set X `[ls -t conftest.ts[12]]` &&
  845. {
  846. test "$[]*" != "X conftest.ts1 conftest.ts2" ||
  847. test "$[]*" != "X conftest.ts2 conftest.ts1";
  848. }
  849. ); then :; else
  850. # If neither matched, then we have a broken ls. This can happen
  851. # if, for instance, CONFIG_SHELL is bash and it inherits a
  852. # broken ls alias from the environment. This has actually
  853. # happened. Such a system could not be considered "sane".
  854. _AS_ECHO_UNQUOTED(
  855. ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""],
  856. [AS_MESSAGE_LOG_FD])
  857. AC_MSG_FAILURE([ls -t produces unexpected output.
  858. Make sure there is not a broken ls alias in your environment.])
  859. fi
  860. for am_try_res in $am_try_resolutions; do
  861. # Any one fine-grained sleep might happen to cross the boundary
  862. # between two values of a coarser actual resolution, but if we do
  863. # two fine-grained sleeps in a row, at least one of them will fall
  864. # entirely within a coarse interval.
  865. echo alpha > conftest.ts1
  866. sleep $am_try_res
  867. echo beta > conftest.ts2
  868. sleep $am_try_res
  869. echo gamma > conftest.ts3
  870. # We assume that 'ls -t' will make use of high-resolution
  871. # timestamps if the operating system supports them at all.
  872. if (set X `ls -t conftest.ts?` &&
  873. test "$[]2" = conftest.ts3 &&
  874. test "$[]3" = conftest.ts2 &&
  875. test "$[]4" = conftest.ts1); then
  876. #
  877. # Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
  878. # because we don't need to test make.
  879. make_ok=true
  880. if test $am_try_res != 1; then
  881. # But if we've succeeded so far with a subsecond resolution, we
  882. # have one more thing to check: make. It can happen that
  883. # everything else supports the subsecond mtimes, but make doesn't;
  884. # notably on macOS, which ships make 3.81 from 2006 (the last one
  885. # released under GPLv2). https://bugs.gnu.org/68808
  886. #
  887. # We test $MAKE if it is defined in the environment, else "make".
  888. # It might get overridden later, but our hope is that in practice
  889. # it does not matter: it is the system "make" which is (by far)
  890. # the most likely to be broken, whereas if the user overrides it,
  891. # probably they did so with a better, or at least not worse, make.
  892. # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
  893. #
  894. # Create a Makefile (real tab character here):
  895. rm -f conftest.mk
  896. echo 'conftest.ts1: conftest.ts2' >conftest.mk
  897. echo ' touch conftest.ts2' >>conftest.mk
  898. #
  899. # Now, running
  900. # touch conftest.ts1; touch conftest.ts2; make
  901. # should touch ts1 because ts2 is newer. This could happen by luck,
  902. # but most often, it will fail if make's support is insufficient. So
  903. # test for several consecutive successes.
  904. #
  905. # (We reuse conftest.ts[12] because we still want to modify existing
  906. # files, not create new ones, per above.)
  907. n=0
  908. make=${MAKE-make}
  909. until test $n -eq 3; do
  910. echo one > conftest.ts1
  911. sleep $am_try_res
  912. echo two > conftest.ts2 # ts2 should now be newer than ts1
  913. if $make -f conftest.mk | grep 'up to date' >/dev/null; then
  914. make_ok=false
  915. break # out of $n loop
  916. fi
  917. n=`expr $n + 1`
  918. done
  919. fi
  920. #
  921. if $make_ok; then
  922. # Everything we know to check worked out, so call this resolution good.
  923. am_cv_filesystem_timestamp_resolution=$am_try_res
  924. break # out of $am_try_res loop
  925. fi
  926. # Otherwise, we'll go on to check the next resolution.
  927. fi
  928. done
  929. rm -f conftest.ts?
  930. # (end _am_filesystem_timestamp_resolution)
  931. ])])
  932. # AM_SANITY_CHECK
  933. # ---------------
  934. AC_DEFUN([AM_SANITY_CHECK],
  935. [AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION])
  936. # This check should not be cached, as it may vary across builds of
  937. # different projects.
  938. AC_MSG_CHECKING([whether build environment is sane])
  939. # Reject unsafe characters in $srcdir or the absolute working directory
  940. # name. Accept space and tab only in the latter.
  941. am_lf='
  942. '
  943. case `pwd` in
  944. *[[\\\"\#\$\&\'\`$am_lf]]*)
  945. AC_MSG_ERROR([unsafe absolute working directory name]);;
  946. esac
  947. case $srcdir in
  948. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  949. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  950. esac
  951. # Do 'set' in a subshell so we don't clobber the current shell's
  952. # arguments. Must try -L first in case configure is actually a
  953. # symlink; some systems play weird games with the mod time of symlinks
  954. # (eg FreeBSD returns the mod time of the symlink's containing
  955. # directory).
  956. am_build_env_is_sane=no
  957. am_has_slept=no
  958. rm -f conftest.file
  959. for am_try in 1 2; do
  960. echo "timestamp, slept: $am_has_slept" > conftest.file
  961. if (
  962. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  963. if test "$[]*" = "X"; then
  964. # -L didn't work.
  965. set X `ls -t "$srcdir/configure" conftest.file`
  966. fi
  967. test "$[]2" = conftest.file
  968. ); then
  969. am_build_env_is_sane=yes
  970. break
  971. fi
  972. # Just in case.
  973. sleep "$am_cv_filesystem_timestamp_resolution"
  974. am_has_slept=yes
  975. done
  976. AC_MSG_RESULT([$am_build_env_is_sane])
  977. if test "$am_build_env_is_sane" = no; then
  978. AC_MSG_ERROR([newly created file is older than distributed files!
  979. Check your system clock])
  980. fi
  981. # If we didn't sleep, we still need to ensure time stamps of config.status and
  982. # generated files are strictly newer.
  983. am_sleep_pid=
  984. AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
  985. ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
  986. am_sleep_pid=$!
  987. ])
  988. AC_CONFIG_COMMANDS_PRE(
  989. [AC_MSG_CHECKING([that generated files are newer than configure])
  990. if test -n "$am_sleep_pid"; then
  991. # Hide warnings about reused PIDs.
  992. wait $am_sleep_pid 2>/dev/null
  993. fi
  994. AC_MSG_RESULT([done])])
  995. rm -f conftest.file
  996. ])
  997. # Copyright (C) 2009-2024 Free Software Foundation, Inc.
  998. #
  999. # This file is free software; the Free Software Foundation
  1000. # gives unlimited permission to copy and/or distribute it,
  1001. # with or without modifications, as long as this notice is preserved.
  1002. # _AM_SILENT_RULES
  1003. # ----------------
  1004. # Enable less verbose build rules support.
  1005. AC_DEFUN([_AM_SILENT_RULES],
  1006. [AM_DEFAULT_VERBOSITY=1
  1007. AC_ARG_ENABLE([silent-rules], [dnl
  1008. AS_HELP_STRING(
  1009. [--enable-silent-rules],
  1010. [less verbose build output (undo: "make V=1")])
  1011. AS_HELP_STRING(
  1012. [--disable-silent-rules],
  1013. [verbose build output (undo: "make V=0")])dnl
  1014. ])
  1015. dnl
  1016. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  1017. dnl do not support nested variable expansions.
  1018. dnl See automake bug#9928 and bug#10237.
  1019. am_make=${MAKE-make}
  1020. AC_CACHE_CHECK([whether $am_make supports nested variables],
  1021. [am_cv_make_support_nested_variables],
  1022. [if AS_ECHO([['TRUE=$(BAR$(V))
  1023. BAR0=false
  1024. BAR1=true
  1025. V=1
  1026. am__doit:
  1027. @$(TRUE)
  1028. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  1029. am_cv_make_support_nested_variables=yes
  1030. else
  1031. am_cv_make_support_nested_variables=no
  1032. fi])
  1033. AC_SUBST([AM_V])dnl
  1034. AM_SUBST_NOTMAKE([AM_V])dnl
  1035. AC_SUBST([AM_DEFAULT_V])dnl
  1036. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  1037. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  1038. AM_BACKSLASH='\'
  1039. AC_SUBST([AM_BACKSLASH])dnl
  1040. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  1041. dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
  1042. dnl to AM_SILENT_RULES to change the default value.
  1043. AC_CONFIG_COMMANDS_PRE([dnl
  1044. case $enable_silent_rules in @%:@ (((
  1045. yes) AM_DEFAULT_VERBOSITY=0;;
  1046. no) AM_DEFAULT_VERBOSITY=1;;
  1047. esac
  1048. if test $am_cv_make_support_nested_variables = yes; then
  1049. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  1050. AM_V='$(V)'
  1051. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  1052. else
  1053. AM_V=$AM_DEFAULT_VERBOSITY
  1054. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  1055. fi
  1056. ])dnl
  1057. ])
  1058. # AM_SILENT_RULES([DEFAULT])
  1059. # --------------------------
  1060. # Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
  1061. # empty being verbose).
  1062. AC_DEFUN([AM_SILENT_RULES],
  1063. [AC_REQUIRE([_AM_SILENT_RULES])
  1064. AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])
  1065. # Copyright (C) 2001-2024 Free Software Foundation, Inc.
  1066. #
  1067. # This file is free software; the Free Software Foundation
  1068. # gives unlimited permission to copy and/or distribute it,
  1069. # with or without modifications, as long as this notice is preserved.
  1070. # AM_PROG_INSTALL_STRIP
  1071. # ---------------------
  1072. # One issue with vendor 'install' (even GNU) is that you can't
  1073. # specify the program used to strip binaries. This is especially
  1074. # annoying in cross-compiling environments, where the build's strip
  1075. # is unlikely to handle the host's binaries.
  1076. # Fortunately install-sh will honor a STRIPPROG variable, so we
  1077. # always use install-sh in "make install-strip", and initialize
  1078. # STRIPPROG with the value of the STRIP variable (set by the user).
  1079. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  1080. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1081. # Installed binaries are usually stripped using 'strip' when the user
  1082. # run "make install-strip". However 'strip' might not be the right
  1083. # tool to use in cross-compilation environments, therefore Automake
  1084. # will honor the 'STRIP' environment variable to overrule this program.
  1085. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  1086. if test "$cross_compiling" != no; then
  1087. AC_CHECK_TOOL([STRIP], [strip], :)
  1088. fi
  1089. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  1090. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1091. # Copyright (C) 2006-2024 Free Software Foundation, Inc.
  1092. #
  1093. # This file is free software; the Free Software Foundation
  1094. # gives unlimited permission to copy and/or distribute it,
  1095. # with or without modifications, as long as this notice is preserved.
  1096. # _AM_SUBST_NOTMAKE(VARIABLE)
  1097. # ---------------------------
  1098. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  1099. # This macro is traced by Automake.
  1100. AC_DEFUN([_AM_SUBST_NOTMAKE])
  1101. # AM_SUBST_NOTMAKE(VARIABLE)
  1102. # --------------------------
  1103. # Public sister of _AM_SUBST_NOTMAKE.
  1104. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  1105. # Check how to create a tarball. -*- Autoconf -*-
  1106. # Copyright (C) 2004-2024 Free Software Foundation, Inc.
  1107. #
  1108. # This file is free software; the Free Software Foundation
  1109. # gives unlimited permission to copy and/or distribute it,
  1110. # with or without modifications, as long as this notice is preserved.
  1111. # _AM_PROG_TAR(FORMAT)
  1112. # --------------------
  1113. # Check how to create a tarball in format FORMAT.
  1114. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  1115. #
  1116. # Substitute a variable $(am__tar) that is a command
  1117. # writing to stdout a FORMAT-tarball containing the directory
  1118. # $tardir.
  1119. # tardir=directory && $(am__tar) > result.tar
  1120. #
  1121. # Substitute a variable $(am__untar) that extract such
  1122. # a tarball read from stdin.
  1123. # $(am__untar) < result.tar
  1124. #
  1125. AC_DEFUN([_AM_PROG_TAR],
  1126. [# Always define AMTAR for backward compatibility. Yes, it's still used
  1127. # in the wild :-( We should find a proper way to deprecate it ...
  1128. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  1129. # We'll loop over all known methods to create a tar archive until one works.
  1130. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  1131. m4_if([$1], [v7],
  1132. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  1133. [m4_case([$1],
  1134. [ustar],
  1135. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  1136. # There is notably a 21 bits limit for the UID and the GID. In fact,
  1137. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  1138. # and bug#13588).
  1139. am_max_uid=2097151 # 2^21 - 1
  1140. am_max_gid=$am_max_uid
  1141. # The $UID and $GID variables are not portable, so we need to resort
  1142. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  1143. # below are definitely unexpected, so allow the users to see them
  1144. # (that is, avoid stderr redirection).
  1145. am_uid=`id -u || echo unknown`
  1146. am_gid=`id -g || echo unknown`
  1147. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  1148. if test x$am_uid = xunknown; then
  1149. AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
  1150. elif test $am_uid -le $am_max_uid; then
  1151. AC_MSG_RESULT([yes])
  1152. else
  1153. AC_MSG_RESULT([no])
  1154. _am_tools=none
  1155. fi
  1156. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  1157. if test x$gm_gid = xunknown; then
  1158. AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
  1159. elif test $am_gid -le $am_max_gid; then
  1160. AC_MSG_RESULT([yes])
  1161. else
  1162. AC_MSG_RESULT([no])
  1163. _am_tools=none
  1164. fi],
  1165. [pax],
  1166. [],
  1167. [m4_fatal([Unknown tar format])])
  1168. AC_MSG_CHECKING([how to create a $1 tar archive])
  1169. # Go ahead even if we have the value already cached. We do so because we
  1170. # need to set the values for the 'am__tar' and 'am__untar' variables.
  1171. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  1172. for _am_tool in $_am_tools; do
  1173. case $_am_tool in
  1174. gnutar)
  1175. for _am_tar in tar gnutar gtar; do
  1176. AM_RUN_LOG([$_am_tar --version]) && break
  1177. done
  1178. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  1179. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  1180. am__untar="$_am_tar -xf -"
  1181. ;;
  1182. plaintar)
  1183. # Must skip GNU tar: if it does not support --format= it doesn't create
  1184. # ustar tarball either.
  1185. (tar --version) >/dev/null 2>&1 && continue
  1186. am__tar='tar chf - "$$tardir"'
  1187. am__tar_='tar chf - "$tardir"'
  1188. am__untar='tar xf -'
  1189. ;;
  1190. pax)
  1191. am__tar='pax -L -x $1 -w "$$tardir"'
  1192. am__tar_='pax -L -x $1 -w "$tardir"'
  1193. am__untar='pax -r'
  1194. ;;
  1195. cpio)
  1196. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  1197. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  1198. am__untar='cpio -i -H $1 -d'
  1199. ;;
  1200. none)
  1201. am__tar=false
  1202. am__tar_=false
  1203. am__untar=false
  1204. ;;
  1205. esac
  1206. # If the value was cached, stop now. We just wanted to have am__tar
  1207. # and am__untar set.
  1208. test -n "${am_cv_prog_tar_$1}" && break
  1209. # tar/untar a dummy directory, and stop if the command works.
  1210. rm -rf conftest.dir
  1211. mkdir conftest.dir
  1212. echo GrepMe > conftest.dir/file
  1213. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  1214. rm -rf conftest.dir
  1215. if test -s conftest.tar; then
  1216. AM_RUN_LOG([$am__untar <conftest.tar])
  1217. AM_RUN_LOG([cat conftest.dir/file])
  1218. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1219. fi
  1220. done
  1221. rm -rf conftest.dir
  1222. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1223. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1224. AC_SUBST([am__tar])
  1225. AC_SUBST([am__untar])
  1226. ]) # _AM_PROG_TAR
  1227. # Copyright (C) 2022-2024 Free Software Foundation, Inc.
  1228. #
  1229. # This file is free software; the Free Software Foundation
  1230. # gives unlimited permission to copy and/or distribute it,
  1231. # with or without modifications, as long as this notice is preserved.
  1232. # _AM_PROG_XARGS_N
  1233. # ----------------
  1234. # Check whether 'xargs -n' works. It should work everywhere, so the fallback
  1235. # is not optimized at all as we never expect to use it.
  1236. AC_DEFUN([_AM_PROG_XARGS_N],
  1237. [AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl
  1238. AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
  1239. 3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])])
  1240. AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl
  1241. am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }'
  1242. ])dnl
  1243. AC_SUBST(am__xargs_n)
  1244. ])
  1245. m4_include([scripts/autoconf/libtool.m4])
  1246. m4_include([scripts/autoconf/ltoptions.m4])
  1247. m4_include([scripts/autoconf/ltsugar.m4])
  1248. m4_include([scripts/autoconf/ltversion.m4])
  1249. m4_include([scripts/autoconf/lt~obsolete.m4])