Debian Codegraph @

texk/web2c/aclocal.m4

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