Debian Codegraph @

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