Debian Codegraph @

aclocal.m4

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