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