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 # AM_EXTRA_RECURSIVE_TARGETS -*- Autoconf -*-
755
756 # Copyright (C) 2012-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 # AM_EXTRA_RECURSIVE_TARGETS
763 # --------------------------
764 # Define the list of user recursive targets. This macro exists only to
765 # be traced by Automake, which will ensure that a proper definition of
766 # user-defined recursive targets (and associated rules) is propagated
767 # into all the generated Makefiles.
768 # TODO: We should really reject non-literal arguments here...
769 AC_DEFUN([AM_EXTRA_RECURSIVE_TARGETS], [])
770
771 # Do all the work for Automake. -*- Autoconf -*-
772
773 # Copyright (C) 1996-2025 Free Software Foundation, Inc.
774 #
775 # This file is free software; the Free Software Foundation
776 # gives unlimited permission to copy and/or distribute it,
777 # with or without modifications, as long as this notice is preserved.
778
779 # This macro actually does too much. Some checks are only needed if
780 # your package does certain things. But this isn't really a big deal.
781
782 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
783 m4_define([AC_PROG_CC],
784 m4_defn([AC_PROG_CC])
785 [_AM_PROG_CC_C_O
786 ])
787
788 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
789 # AM_INIT_AUTOMAKE([OPTIONS])
790 # -----------------------------------------------
791 # The call with PACKAGE and VERSION arguments is the old style
792 # call (pre autoconf-2.50), which is being phased out. PACKAGE
793 # and VERSION should now be passed to AC_INIT and removed from
794 # the call to AM_INIT_AUTOMAKE.
795 # We support both call styles for the transition. After
796 # the next Automake release, Autoconf can make the AC_INIT
797 # arguments mandatory, and then we can depend on a new Autoconf
798 # release and drop the old call support.
799 AC_DEFUN([AM_INIT_AUTOMAKE],
800 [AC_PREREQ([2.65])dnl
801 m4_ifdef([_$0_ALREADY_INIT],
802 [m4_fatal([$0 expanded multiple times
803 ]m4_defn([_$0_ALREADY_INIT]))],
804 [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
805 dnl Autoconf wants to disallow AM_ names. We explicitly allow
806 dnl the ones we care about.
807 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
808 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
809 AC_REQUIRE([AC_PROG_INSTALL])dnl
810 if test "`cd $srcdir && pwd`" != "`pwd`"; then
811 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
812 # is not polluted with repeated "-I."
813 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
814 # test to see if srcdir already configured
815 if test -f $srcdir/config.status; then
816 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
817 fi
818 fi
819
820 # test whether we have cygpath
821 if test -z "$CYGPATH_W"; then
822 if (cygpath --version) >/dev/null 2>/dev/null; then
823 CYGPATH_W='cygpath -w'
824 else
825 CYGPATH_W=echo
826 fi
827 fi
828 AC_SUBST([CYGPATH_W])
829
830 # Define the identity of the package.
831 dnl Distinguish between old-style and new-style calls.
832 m4_ifval([$2],
833 [AC_DIAGNOSE([obsolete],
834 [$0: two- and three-arguments forms are deprecated.])
835 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
836 AC_SUBST([PACKAGE], [$1])dnl
837 AC_SUBST([VERSION], [$2])],
838 [_AM_SET_OPTIONS([$1])dnl
839 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
840 m4_if(
841 m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
842 [ok:ok],,
843 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
844 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
845 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
846
847 _AM_IF_OPTION([no-define],,
848 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
849 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
850
851 # Some tools Automake needs.
852 AC_REQUIRE([AM_SANITY_CHECK])dnl
853 AC_REQUIRE([AC_ARG_PROGRAM])dnl
854 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
855 AM_MISSING_PROG([AUTOCONF], [autoconf])
856 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
857 AM_MISSING_PROG([AUTOHEADER], [autoheader])
858 AM_MISSING_PROG([MAKEINFO], [makeinfo])
859 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
860 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
861 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
862 # For better backward compatibility. To be removed once Automake 1.9.x
863 # dies out for good. For more background, see:
864 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
865 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
866 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
867 # We need awk for the "check" target (and possibly the TAP driver). The
868 # system "awk" is bad on some platforms.
869 AC_REQUIRE([AC_PROG_AWK])dnl
870 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
871 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
872 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
873 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
874 [_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])],
875 [_AM_PROG_TAR([ustar])])])])
876 _AM_IF_OPTION([no-dependencies],,
877 [AC_PROVIDE_IFELSE([AC_PROG_CC],
878 [_AM_DEPENDENCIES([CC])],
879 [m4_define([AC_PROG_CC],
880 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
881 AC_PROVIDE_IFELSE([AC_PROG_CXX],
882 [_AM_DEPENDENCIES([CXX])],
883 [m4_define([AC_PROG_CXX],
884 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
885 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
886 [_AM_DEPENDENCIES([OBJC])],
887 [m4_define([AC_PROG_OBJC],
888 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
889 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
890 [_AM_DEPENDENCIES([OBJCXX])],
891 [m4_define([AC_PROG_OBJCXX],
892 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
893 ])
894 # Variables for tags utilities; see am/tags.am
895 if test -z "$CTAGS"; then
896 CTAGS=ctags
897 fi
898 AC_SUBST([CTAGS])
899 if test -z "$ETAGS"; then
900 ETAGS=etags
901 fi
902 AC_SUBST([ETAGS])
903 if test -z "$CSCOPE"; then
904 CSCOPE=cscope
905 fi
906 AC_SUBST([CSCOPE])
907
908 AC_REQUIRE([_AM_SILENT_RULES])dnl
909 dnl The testsuite driver may need to know about EXEEXT, so add the
910 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
911 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
912 AC_CONFIG_COMMANDS_PRE(dnl
913 [m4_provide_if([_AM_COMPILER_EXEEXT],
914 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
915
916 AC_REQUIRE([_AM_PROG_RM_F])
917 AC_REQUIRE([_AM_PROG_XARGS_N])
918
919 dnl The trailing newline in this macro's definition is deliberate, for
920 dnl backward compatibility and to allow trailing 'dnl'-style comments
921 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
922 ])
923
924 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
925 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
926 dnl mangled by Autoconf and run in a shell conditional statement.
927 m4_define([_AC_COMPILER_EXEEXT],
928 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
929
930 # When config.status generates a header, we must update the stamp-h file.
931 # This file resides in the same directory as the config header
932 # that is generated. The stamp files are numbered to have different names.
933
934 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
935 # loop where config.status creates the headers, so we can generate
936 # our stamp files there.
937 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
938 [# Compute $1's index in $config_headers.
939 _am_arg=$1
940 _am_stamp_count=1
941 for _am_header in $config_headers :; do
942 case $_am_header in
943 $_am_arg | $_am_arg:* )
944 break ;;
945 * )
946 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
947 esac
948 done
949 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
950
951 # Copyright (C) 2001-2025 Free Software Foundation, Inc.
952 #
953 # This file is free software; the Free Software Foundation
954 # gives unlimited permission to copy and/or distribute it,
955 # with or without modifications, as long as this notice is preserved.
956
957 # AM_PROG_INSTALL_SH
958 # ------------------
959 # Define $install_sh.
960 AC_DEFUN([AM_PROG_INSTALL_SH],
961 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
962 if test x"${install_sh+set}" != xset; then
963 case $am_aux_dir in
964 *\ * | *\ *)
965 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
966 *)
967 install_sh="\${SHELL} $am_aux_dir/install-sh"
968 esac
969 fi
970 AC_SUBST([install_sh])])
971
972 # Copyright (C) 2003-2025 Free Software Foundation, Inc.
973 #
974 # This file is free software; the Free Software Foundation
975 # gives unlimited permission to copy and/or distribute it,
976 # with or without modifications, as long as this notice is preserved.
977
978 # Check whether the underlying file-system supports filenames
979 # with a leading dot. For instance MS-DOS doesn't.
980 AC_DEFUN([AM_SET_LEADING_DOT],
981 [rm -rf .tst 2>/dev/null
982 mkdir .tst 2>/dev/null
983 if test -d .tst; then
984 am__leading_dot=.
985 else
986 am__leading_dot=_
987 fi
988 rmdir .tst 2>/dev/null
989 AC_SUBST([am__leading_dot])])
990
991 # Check to see how 'make' treats includes. -*- Autoconf -*-
992
993 # Copyright (C) 2001-2025 Free Software Foundation, Inc.
994 #
995 # This file is free software; the Free Software Foundation
996 # gives unlimited permission to copy and/or distribute it,
997 # with or without modifications, as long as this notice is preserved.
998
999 # AM_MAKE_INCLUDE()
1000 # -----------------
1001 # Check whether make has an 'include' directive that can support all
1002 # the idioms we need for our automatic dependency tracking code.
1003 AC_DEFUN([AM_MAKE_INCLUDE],
1004 [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
1005 cat > confinc.mk << 'END'
1006 am__doit:
1007 @echo this is the am__doit target >confinc.out
1008 .PHONY: am__doit
1009 END
1010 am__include="#"
1011 am__quote=
1012 # BSD make does it like this.
1013 echo '.include "confinc.mk" # ignored' > confmf.BSD
1014 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
1015 echo 'include confinc.mk # ignored' > confmf.GNU
1016 _am_result=no
1017 for s in GNU BSD; do
1018 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
1019 AS_CASE([$?:`cat confinc.out 2>/dev/null`],
1020 ['0:this is the am__doit target'],
1021 [AS_CASE([$s],
1022 [BSD], [am__include='.include' am__quote='"'],
1023 [am__include='include' am__quote=''])])
1024 if test "$am__include" != "#"; then
1025 _am_result="yes ($s style)"
1026 break
1027 fi
1028 done
1029 rm -f confinc.* confmf.*
1030 AC_MSG_RESULT([${_am_result}])
1031 AC_SUBST([am__include])])
1032 AC_SUBST([am__quote])])
1033
1034 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1035
1036 # Copyright (C) 1997-2025 Free Software Foundation, Inc.
1037 #
1038 # This file is free software; the Free Software Foundation
1039 # gives unlimited permission to copy and/or distribute it,
1040 # with or without modifications, as long as this notice is preserved.
1041
1042 # AM_MISSING_PROG(NAME, PROGRAM)
1043 # ------------------------------
1044 AC_DEFUN([AM_MISSING_PROG],
1045 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1046 $1=${$1-"${am_missing_run}$2"}
1047 AC_SUBST($1)])
1048
1049 # AM_MISSING_HAS_RUN
1050 # ------------------
1051 # Define MISSING if not defined so far and test if it is modern enough.
1052 # If it is, set am_missing_run to use it, otherwise, to nothing.
1053 AC_DEFUN([AM_MISSING_HAS_RUN],
1054 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1055 AC_REQUIRE_AUX_FILE([missing])dnl
1056 if test x"${MISSING+set}" != xset; then
1057 MISSING="\${SHELL} '$am_aux_dir/missing'"
1058 fi
1059 # Use eval to expand $SHELL
1060 if eval "$MISSING --is-lightweight"; then
1061 am_missing_run="$MISSING "
1062 else
1063 am_missing_run=
1064 AC_MSG_WARN(['missing' script is too old or missing])
1065 fi
1066 ])
1067
1068 # Helper functions for option handling. -*- Autoconf -*-
1069
1070 # Copyright (C) 2001-2025 Free Software Foundation, Inc.
1071 #
1072 # This file is free software; the Free Software Foundation
1073 # gives unlimited permission to copy and/or distribute it,
1074 # with or without modifications, as long as this notice is preserved.
1075
1076 # _AM_MANGLE_OPTION(NAME)
1077 # -----------------------
1078 AC_DEFUN([_AM_MANGLE_OPTION],
1079 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1080
1081 # _AM_SET_OPTION(NAME)
1082 # --------------------
1083 # Set option NAME. Presently that only means defining a flag for this option.
1084 AC_DEFUN([_AM_SET_OPTION],
1085 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
1086
1087 # _AM_SET_OPTIONS(OPTIONS)
1088 # ------------------------
1089 # OPTIONS is a space-separated list of Automake options.
1090 AC_DEFUN([_AM_SET_OPTIONS],
1091 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1092
1093 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1094 # -------------------------------------------
1095 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1096 AC_DEFUN([_AM_IF_OPTION],
1097 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1098
1099 # Copyright (C) 1999-2025 Free Software Foundation, Inc.
1100 #
1101 # This file is free software; the Free Software Foundation
1102 # gives unlimited permission to copy and/or distribute it,
1103 # with or without modifications, as long as this notice is preserved.
1104
1105 # _AM_PROG_CC_C_O
1106 # ---------------
1107 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1108 # to automatically call this.
1109 AC_DEFUN([_AM_PROG_CC_C_O],
1110 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1111 AC_REQUIRE_AUX_FILE([compile])dnl
1112 AC_LANG_PUSH([C])dnl
1113 AC_CACHE_CHECK(
1114 [whether $CC understands -c and -o together],
1115 [am_cv_prog_cc_c_o],
1116 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1117 # Make sure it works both with $CC and with simple cc.
1118 # Following AC_PROG_CC_C_O, we do the test twice because some
1119 # compilers refuse to overwrite an existing .o file with -o,
1120 # though they will create one.
1121 am_cv_prog_cc_c_o=yes
1122 for am_i in 1 2; do
1123 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1124 && test -f conftest2.$ac_objext; then
1125 : OK
1126 else
1127 am_cv_prog_cc_c_o=no
1128 break
1129 fi
1130 done
1131 # aligned with autoconf, so not including core; see bug#72225.
1132 rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
1133 conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
1134 conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
1135 unset am_i])
1136 if test "$am_cv_prog_cc_c_o" != yes; then
1137 # Losing compiler, so override with the script.
1138 # FIXME: It is wrong to rewrite CC.
1139 # But if we don't then we get into trouble of one sort or another.
1140 # A longer-term fix would be to have automake use am__CC in this case,
1141 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1142 CC="$am_aux_dir/compile $CC"
1143 fi
1144 AC_LANG_POP([C])])
1145
1146 # For backward compatibility.
1147 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1148
1149 # Copyright (C) 2022-2025 Free Software Foundation, Inc.
1150 #
1151 # This file is free software; the Free Software Foundation
1152 # gives unlimited permission to copy and/or distribute it,
1153 # with or without modifications, as long as this notice is preserved.
1154
1155 # _AM_PROG_RM_F
1156 # ---------------
1157 # Check whether 'rm -f' without any arguments works.
1158 # https://bugs.gnu.org/10828
1159 AC_DEFUN([_AM_PROG_RM_F],
1160 [am__rm_f_notfound=
1161 AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
1162 AC_SUBST(am__rm_f_notfound)
1163 ])
1164
1165 # Copyright (C) 2001-2025 Free Software Foundation, Inc.
1166 #
1167 # This file is free software; the Free Software Foundation
1168 # gives unlimited permission to copy and/or distribute it,
1169 # with or without modifications, as long as this notice is preserved.
1170
1171 # AM_RUN_LOG(COMMAND)
1172 # -------------------
1173 # Run COMMAND, save the exit status in ac_status, and log it.
1174 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1175 AC_DEFUN([AM_RUN_LOG],
1176 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1177 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1178 ac_status=$?
1179 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1180 (exit $ac_status); }])
1181
1182 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1183
1184 # Copyright (C) 1996-2025 Free Software Foundation, Inc.
1185 #
1186 # This file is free software; the Free Software Foundation
1187 # gives unlimited permission to copy and/or distribute it,
1188 # with or without modifications, as long as this notice is preserved.
1189
1190 # _AM_SLEEP_FRACTIONAL_SECONDS
1191 # ----------------------------
1192 AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
1193 AC_CACHE_CHECK([whether sleep supports fractional seconds],
1194 am_cv_sleep_fractional_seconds, [dnl
1195 AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
1196 [am_cv_sleep_fractional_seconds=no])
1197 ])])
1198
1199 # _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
1200 # -----------------------------------
1201 # Determine the filesystem's resolution for file modification
1202 # timestamps. The coarsest we know of is FAT, with a resolution
1203 # of only two seconds, even with the most recent "exFAT" extensions.
1204 # The finest (e.g. ext4 with large inodes, XFS, ZFS) is one
1205 # nanosecond, matching clock_gettime. However, it is probably not
1206 # possible to delay execution of a shell script for less than one
1207 # millisecond, due to process creation overhead and scheduling
1208 # granularity, so we don't check for anything finer than that. (See below.)
1209 AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
1210 AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
1211 AC_CACHE_CHECK([filesystem timestamp resolution],
1212 am_cv_filesystem_timestamp_resolution, [dnl
1213 # Default to the worst case.
1214 am_cv_filesystem_timestamp_resolution=2
1215
1216 # Only try to go finer than 1 sec if sleep can do it.
1217 # Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
1218 # - 1 sec is not much of a win compared to 2 sec, and
1219 # - it takes 2 seconds to perform the test whether 1 sec works.
1220 #
1221 # Instead, just use the default 2s on platforms that have 1s resolution,
1222 # accept the extra 1s delay when using $sleep in the Automake tests, in
1223 # exchange for not incurring the 2s delay for running the test for all
1224 # packages.
1225 #
1226 am_try_resolutions=
1227 if test "$am_cv_sleep_fractional_seconds" = yes; then
1228 # Even a millisecond often causes a bunch of false positives,
1229 # so just try a hundredth of a second. The time saved between .001 and
1230 # .01 is not terribly consequential.
1231 am_try_resolutions="0.01 0.1 $am_try_resolutions"
1232 fi
1233
1234 # In order to catch current-generation FAT out, we must *modify* files
1235 # that already exist; the *creation* timestamp is finer. Use names
1236 # that make ls -t sort them differently when they have equal
1237 # timestamps than when they have distinct timestamps, keeping
1238 # in mind that ls -t prints the *newest* file first.
1239 rm -f conftest.ts?
1240 : > conftest.ts1
1241 : > conftest.ts2
1242 : > conftest.ts3
1243
1244 # Make sure ls -t actually works. Do 'set' in a subshell so we don't
1245 # clobber the current shell's arguments. (Outer-level square brackets
1246 # are removed by m4; they're present so that m4 does not expand
1247 # <dollar><star>; be careful, easy to get confused.)
1248 if (
1249 set X `[ls -t conftest.ts[12]]` &&
1250 {
1251 test "$[]*" != "X conftest.ts1 conftest.ts2" ||
1252 test "$[]*" != "X conftest.ts2 conftest.ts1";
1253 }
1254 ); then :; else
1255 # If neither matched, then we have a broken ls. This can happen
1256 # if, for instance, CONFIG_SHELL is bash and it inherits a
1257 # broken ls alias from the environment. This has actually
1258 # happened. Such a system could not be considered "sane".
1259 _AS_ECHO_UNQUOTED(
1260 ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""],
1261 [AS_MESSAGE_LOG_FD])
1262 AC_MSG_FAILURE([ls -t produces unexpected output.
1263 Make sure there is not a broken ls alias in your environment.])
1264 fi
1265
1266 for am_try_res in $am_try_resolutions; do
1267 # Any one fine-grained sleep might happen to cross the boundary
1268 # between two values of a coarser actual resolution, but if we do
1269 # two fine-grained sleeps in a row, at least one of them will fall
1270 # entirely within a coarse interval.
1271 echo alpha > conftest.ts1
1272 sleep $am_try_res
1273 echo beta > conftest.ts2
1274 sleep $am_try_res
1275 echo gamma > conftest.ts3
1276
1277 # We assume that 'ls -t' will make use of high-resolution
1278 # timestamps if the operating system supports them at all.
1279 if (set X `ls -t conftest.ts?` &&
1280 test "$[]2" = conftest.ts3 &&
1281 test "$[]3" = conftest.ts2 &&
1282 test "$[]4" = conftest.ts1); then
1283 #
1284 # Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
1285 # because we don't need to test make.
1286 make_ok=true
1287 if test $am_try_res != 1; then
1288 # But if we've succeeded so far with a subsecond resolution, we
1289 # have one more thing to check: make. It can happen that
1290 # everything else supports the subsecond mtimes, but make doesn't;
1291 # notably on macOS, which ships make 3.81 from 2006 (the last one
1292 # released under GPLv2). https://bugs.gnu.org/68808
1293 #
1294 # We test $MAKE if it is defined in the environment, else "make".
1295 # It might get overridden later, but our hope is that in practice
1296 # it does not matter: it is the system "make" which is (by far)
1297 # the most likely to be broken, whereas if the user overrides it,
1298 # probably they did so with a better, or at least not worse, make.
1299 # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
1300 #
1301 # Create a Makefile (real tab character here):
1302 rm -f conftest.mk
1303 echo 'conftest.ts1: conftest.ts2' >conftest.mk
1304 echo ' touch conftest.ts2' >>conftest.mk
1305 #
1306 # Now, running
1307 # touch conftest.ts1; touch conftest.ts2; make
1308 # should touch ts1 because ts2 is newer. This could happen by luck,
1309 # but most often, it will fail if make's support is insufficient. So
1310 # test for several consecutive successes.
1311 #
1312 # (We reuse conftest.ts[12] because we still want to modify existing
1313 # files, not create new ones, per above.)
1314 n=0
1315 make=${MAKE-make}
1316 until test $n -eq 3; do
1317 echo one > conftest.ts1
1318 sleep $am_try_res
1319 echo two > conftest.ts2 # ts2 should now be newer than ts1
1320 if $make -f conftest.mk | grep 'up to date' >/dev/null; then
1321 make_ok=false
1322 break # out of $n loop
1323 fi
1324 n=`expr $n + 1`
1325 done
1326 fi
1327 #
1328 if $make_ok; then
1329 # Everything we know to check worked out, so call this resolution good.
1330 am_cv_filesystem_timestamp_resolution=$am_try_res
1331 break # out of $am_try_res loop
1332 fi
1333 # Otherwise, we'll go on to check the next resolution.
1334 fi
1335 done
1336 rm -f conftest.ts?
1337 # (end _am_filesystem_timestamp_resolution)
1338 ])])
1339
1340 # AM_SANITY_CHECK
1341 # ---------------
1342 AC_DEFUN([AM_SANITY_CHECK],
1343 [AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION])
1344 # This check should not be cached, as it may vary across builds of
1345 # different projects.
1346 AC_MSG_CHECKING([whether build environment is sane])
1347 # Reject unsafe characters in $srcdir or the absolute working directory
1348 # name. Accept space and tab only in the latter.
1349 am_lf='
1350 '
1351 case `pwd` in
1352 *[[\\\"\#\$\&\'\`$am_lf]]*)
1353 AC_MSG_RESULT([no])
1354 AC_MSG_ERROR([unsafe absolute working directory name]);;
1355 esac
1356 case $srcdir in
1357 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1358 AC_MSG_RESULT([no])
1359 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1360 esac
1361
1362 # Do 'set' in a subshell so we don't clobber the current shell's
1363 # arguments. Must try -L first in case configure is actually a
1364 # symlink; some systems play weird games with the mod time of symlinks
1365 # (eg FreeBSD returns the mod time of the symlink's containing
1366 # directory).
1367 am_build_env_is_sane=no
1368 am_has_slept=no
1369 rm -f conftest.file
1370 for am_try in 1 2; do
1371 echo "timestamp, slept: $am_has_slept" > conftest.file
1372 if (
1373 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1374 if test "$[]*" = "X"; then
1375 # -L didn't work.
1376 set X `ls -t "$srcdir/configure" conftest.file`
1377 fi
1378 test "$[]2" = conftest.file
1379 ); then
1380 am_build_env_is_sane=yes
1381 break
1382 fi
1383 # Just in case.
1384 sleep "$am_cv_filesystem_timestamp_resolution"
1385 am_has_slept=yes
1386 done
1387
1388 AC_MSG_RESULT([$am_build_env_is_sane])
1389 if test "$am_build_env_is_sane" = no; then
1390 AC_MSG_ERROR([newly created file is older than distributed files!
1391 Check your system clock])
1392 fi
1393
1394 # If we didn't sleep, we still need to ensure time stamps of config.status and
1395 # generated files are strictly newer.
1396 am_sleep_pid=
1397 AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
1398 ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
1399 am_sleep_pid=$!
1400 ])
1401 AC_CONFIG_COMMANDS_PRE(
1402 [AC_MSG_CHECKING([that generated files are newer than configure])
1403 if test -n "$am_sleep_pid"; then
1404 # Hide warnings about reused PIDs.
1405 wait $am_sleep_pid 2>/dev/null
1406 fi
1407 AC_MSG_RESULT([done])])
1408 rm -f conftest.file
1409 ])
1410
1411 # Copyright (C) 2009-2025 Free Software Foundation, Inc.
1412 #
1413 # This file is free software; the Free Software Foundation
1414 # gives unlimited permission to copy and/or distribute it,
1415 # with or without modifications, as long as this notice is preserved.
1416
1417 # _AM_SILENT_RULES
1418 # ----------------
1419 # Enable less verbose build rules support.
1420 AC_DEFUN([_AM_SILENT_RULES],
1421 [AM_DEFAULT_VERBOSITY=1
1422 AC_ARG_ENABLE([silent-rules], [dnl
1423 AS_HELP_STRING(
1424 [--enable-silent-rules],
1425 [less verbose build output (undo: "make V=1")])
1426 AS_HELP_STRING(
1427 [--disable-silent-rules],
1428 [verbose build output (undo: "make V=0")])dnl
1429 ])
1430 dnl
1431 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1432 dnl do not support nested variable expansions.
1433 dnl See automake bug#9928 and bug#10237.
1434 am_make=${MAKE-make}
1435 AC_CACHE_CHECK([whether $am_make supports nested variables],
1436 [am_cv_make_support_nested_variables],
1437 [if AS_ECHO([['TRUE=$(BAR$(V))
1438 BAR0=false
1439 BAR1=true
1440 V=1
1441 am__doit:
1442 @$(TRUE)
1443 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1444 am_cv_make_support_nested_variables=yes
1445 else
1446 am_cv_make_support_nested_variables=no
1447 fi])
1448 AC_SUBST([AM_V])dnl
1449 AM_SUBST_NOTMAKE([AM_V])dnl
1450 AC_SUBST([AM_DEFAULT_V])dnl
1451 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1452 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1453 AM_BACKSLASH='\'
1454 AC_SUBST([AM_BACKSLASH])dnl
1455 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1456 dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
1457 dnl to AM_SILENT_RULES to change the default value.
1458 AC_CONFIG_COMMANDS_PRE([dnl
1459 case $enable_silent_rules in @%:@ (((
1460 yes) AM_DEFAULT_VERBOSITY=0;;
1461 no) AM_DEFAULT_VERBOSITY=1;;
1462 esac
1463 if test $am_cv_make_support_nested_variables = yes; then
1464 dnl Using '$V' instead of '$(V)' breaks IRIX make.
1465 AM_V='$(V)'
1466 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1467 else
1468 AM_V=$AM_DEFAULT_VERBOSITY
1469 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1470 fi
1471 ])dnl
1472 ])
1473
1474 # AM_SILENT_RULES([DEFAULT])
1475 # --------------------------
1476 # Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
1477 # empty being verbose).
1478 AC_DEFUN([AM_SILENT_RULES],
1479 [AC_REQUIRE([_AM_SILENT_RULES])
1480 AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])m4_newline
1481 dnl We intentionally force a newline after the assignment, since a) nothing
1482 dnl good can come of more text following, and b) that was the behavior
1483 dnl before 1.17. See https://bugs.gnu.org/72267.
1484 ])
1485
1486 # Copyright (C) 2001-2025 Free Software Foundation, Inc.
1487 #
1488 # This file is free software; the Free Software Foundation
1489 # gives unlimited permission to copy and/or distribute it,
1490 # with or without modifications, as long as this notice is preserved.
1491
1492 # AM_PROG_INSTALL_STRIP
1493 # ---------------------
1494 # One issue with vendor 'install' (even GNU) is that you can't
1495 # specify the program used to strip binaries. This is especially
1496 # annoying in cross-compiling environments, where the build's strip
1497 # is unlikely to handle the host's binaries.
1498 # Fortunately install-sh will honor a STRIPPROG variable, so we
1499 # always use install-sh in "make install-strip", and initialize
1500 # STRIPPROG with the value of the STRIP variable (set by the user).
1501 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1502 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1503 # Installed binaries are usually stripped using 'strip' when the user
1504 # run "make install-strip". However 'strip' might not be the right
1505 # tool to use in cross-compilation environments, therefore Automake
1506 # will honor the 'STRIP' environment variable to overrule this program.
1507 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1508 if test "$cross_compiling" != no; then
1509 AC_CHECK_TOOL([STRIP], [strip], :)
1510 fi
1511 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1512 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1513
1514 # Copyright (C) 2006-2025 Free Software Foundation, Inc.
1515 #
1516 # This file is free software; the Free Software Foundation
1517 # gives unlimited permission to copy and/or distribute it,
1518 # with or without modifications, as long as this notice is preserved.
1519
1520 # _AM_SUBST_NOTMAKE(VARIABLE)
1521 # ---------------------------
1522 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1523 # This macro is traced by Automake.
1524 AC_DEFUN([_AM_SUBST_NOTMAKE])
1525
1526 # AM_SUBST_NOTMAKE(VARIABLE)
1527 # --------------------------
1528 # Public sister of _AM_SUBST_NOTMAKE.
1529 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1530
1531 # Check how to create a tarball. -*- Autoconf -*-
1532
1533 # Copyright (C) 2004-2025 Free Software Foundation, Inc.
1534 #
1535 # This file is free software; the Free Software Foundation
1536 # gives unlimited permission to copy and/or distribute it,
1537 # with or without modifications, as long as this notice is preserved.
1538
1539 # _AM_PROG_TAR(FORMAT)
1540 # --------------------
1541 # Check how to create a tarball in format FORMAT.
1542 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1543 #
1544 # Substitute a variable $(am__tar) that is a command
1545 # writing to stdout a FORMAT-tarball containing the directory
1546 # $tardir.
1547 # tardir=directory && $(am__tar) > result.tar
1548 #
1549 # Substitute a variable $(am__untar) that extract such
1550 # a tarball read from stdin.
1551 # $(am__untar) < result.tar
1552 #
1553 AC_DEFUN([_AM_PROG_TAR],
1554 [# Always define AMTAR for backward compatibility. Yes, it's still used
1555 # in the wild :-( We should find a proper way to deprecate it ...
1556 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1557
1558 # We'll loop over all known methods to create a tar archive until one works.
1559 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1560
1561 m4_if([$1], [v7],
1562 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1563
1564 [m4_case([$1],
1565 [ustar],
1566 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1567 # There is notably a 21 bits limit for the UID and the GID. In fact,
1568 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1569 # and bug#13588).
1570 am_max_uid=2097151 # 2^21 - 1
1571 am_max_gid=$am_max_uid
1572 # The $UID and $GID variables are not portable, so we need to resort
1573 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1574 # below are definitely unexpected, so allow the users to see them
1575 # (that is, avoid stderr redirection).
1576 am_uid=`id -u || echo unknown`
1577 am_gid=`id -g || echo unknown`
1578 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1579 if test x$am_uid = xunknown; then
1580 AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
1581 elif test $am_uid -le $am_max_uid; then
1582 AC_MSG_RESULT([yes])
1583 else
1584 AC_MSG_RESULT([no])
1585 _am_tools=none
1586 fi
1587 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1588 if test x$gm_gid = xunknown; then
1589 AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
1590 elif test $am_gid -le $am_max_gid; then
1591 AC_MSG_RESULT([yes])
1592 else
1593 AC_MSG_RESULT([no])
1594 _am_tools=none
1595 fi],
1596
1597 [pax],
1598 [],
1599
1600 [m4_fatal([Unknown tar format])])
1601
1602 AC_MSG_CHECKING([how to create a $1 tar archive])
1603
1604 # Go ahead even if we have the value already cached. We do so because we
1605 # need to set the values for the 'am__tar' and 'am__untar' variables.
1606 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1607
1608 for _am_tool in $_am_tools; do
1609 case $_am_tool in
1610 gnutar)
1611 for _am_tar in tar gnutar gtar; do
1612 AM_RUN_LOG([$_am_tar --version]) && break
1613 done
1614 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1615 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1616 am__untar="$_am_tar -xf -"
1617 ;;
1618 plaintar)
1619 # Must skip GNU tar: if it does not support --format= it doesn't create
1620 # ustar tarball either.
1621 (tar --version) >/dev/null 2>&1 && continue
1622 am__tar='tar chf - "$$tardir"'
1623 am__tar_='tar chf - "$tardir"'
1624 am__untar='tar xf -'
1625 ;;
1626 pax)
1627 am__tar='pax -L -x $1 -w "$$tardir"'
1628 am__tar_='pax -L -x $1 -w "$tardir"'
1629 am__untar='pax -r'
1630 ;;
1631 cpio)
1632 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1633 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1634 am__untar='cpio -i -H $1 -d'
1635 ;;
1636 none)
1637 am__tar=false
1638 am__tar_=false
1639 am__untar=false
1640 ;;
1641 esac
1642
1643 # If the value was cached, stop now. We just wanted to have am__tar
1644 # and am__untar set.
1645 test -n "${am_cv_prog_tar_$1}" && break
1646
1647 # tar/untar a dummy directory, and stop if the command works.
1648 rm -rf conftest.dir
1649 mkdir conftest.dir
1650 echo GrepMe > conftest.dir/file
1651 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1652 rm -rf conftest.dir
1653 if test -s conftest.tar; then
1654 AM_RUN_LOG([$am__untar <conftest.tar])
1655 AM_RUN_LOG([cat conftest.dir/file])
1656 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1657 fi
1658 done
1659 rm -rf conftest.dir
1660
1661 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1662 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1663
1664 AC_SUBST([am__tar])
1665 AC_SUBST([am__untar])
1666 ]) # _AM_PROG_TAR
1667
1668 # Copyright (C) 2022-2025 Free Software Foundation, Inc.
1669 #
1670 # This file is free software; the Free Software Foundation
1671 # gives unlimited permission to copy and/or distribute it,
1672 # with or without modifications, as long as this notice is preserved.
1673
1674 # _AM_PROG_XARGS_N
1675 # ----------------
1676 # Check whether 'xargs -n' works. It should work everywhere, so the fallback
1677 # is not optimized at all as we never expect to use it.
1678 AC_DEFUN([_AM_PROG_XARGS_N],
1679 [AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl
1680 AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
1681 3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])])
1682 AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl
1683 am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }'
1684 ])dnl
1685 AC_SUBST(am__xargs_n)
1686 ])
1687
1688 m4_include([m4/common.m4])
1689 m4_include([m4/gettext.m4])
1690 m4_include([m4/host-cpu-c-abi.m4])
1691 m4_include([m4/iconv.m4])
1692 m4_include([m4/intlmacosx.m4])
1693 m4_include([m4/lib-ld.m4])
1694 m4_include([m4/lib-link.m4])
1695 m4_include([m4/lib-prefix.m4])
1696 m4_include([m4/libbfio.m4])
1697 m4_include([m4/libcdata.m4])
1698 m4_include([m4/libcerror.m4])
1699 m4_include([m4/libcfile.m4])
1700 m4_include([m4/libclocale.m4])
1701 m4_include([m4/libcnotify.m4])
1702 m4_include([m4/libcpath.m4])
1703 m4_include([m4/libcsplit.m4])
1704 m4_include([m4/libcthreads.m4])
1705 m4_include([m4/libfcache.m4])
1706 m4_include([m4/libfdata.m4])
1707 m4_include([m4/libfguid.m4])
1708 m4_include([m4/libfuse.m4])
1709 m4_include([m4/libtool.m4])
1710 m4_include([m4/libuna.m4])
1711 m4_include([m4/ltoptions.m4])
1712 m4_include([m4/ltsugar.m4])
1713 m4_include([m4/ltversion.m4])
1714 m4_include([m4/lt~obsolete.m4])
1715 m4_include([m4/nls.m4])
1716 m4_include([m4/po.m4])
1717 m4_include([m4/progtest.m4])
1718 m4_include([m4/pthread.m4])
1719 m4_include([m4/python.m4])
1720 m4_include([m4/tests.m4])
1721 m4_include([m4/types.m4])
1722 m4_include([acinclude.m4])