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 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.71],, 18[m4_warning([this file was generated for autoconf 2.71. 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# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24# 25# This file is free software; the Free Software Foundation 26# gives unlimited permission to copy and/or distribute it, 27# with or without modifications, as long as this notice is preserved. 28 29# AM_AUTOMAKE_VERSION(VERSION) 30# ---------------------------- 31# Automake X.Y traces this macro to ensure aclocal.m4 has been 32# generated from the m4 files accompanying Automake X.Y. 33# (This private macro should not be called outside this file.) 34AC_DEFUN([AM_AUTOMAKE_VERSION], 35[am__api_version='1.16' 36dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 37dnl require some minimum version. Point them to the right macro. 38m4_if([$1], [1.16.5], [], 39 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40]) 41 42# _AM_AUTOCONF_VERSION(VERSION) 43# ----------------------------- 44# aclocal traces this macro to find the Autoconf version. 45# This is a private macro too. Using m4_define simplifies 46# the logic in aclocal, which can simply ignore this definition. 47m4_define([_AM_AUTOCONF_VERSION], []) 48 49# AM_SET_CURRENT_AUTOMAKE_VERSION 50# ------------------------------- 51# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 52# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 53AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54[AM_AUTOMAKE_VERSION([1.16.5])dnl 55m4_ifndef([AC_AUTOCONF_VERSION], 56 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 57_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58 59# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60 61# Copyright (C) 2001-2021 Free Software Foundation, Inc. 62# 63# This file is free software; the Free Software Foundation 64# gives unlimited permission to copy and/or distribute it, 65# with or without modifications, as long as this notice is preserved. 66 67# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70# 71# Of course, Automake must honor this variable whenever it calls a 72# tool from the auxiliary directory. The problem is that $srcdir (and 73# therefore $ac_aux_dir as well) can be either absolute or relative, 74# depending on how configure is run. This is pretty annoying, since 75# it makes $ac_aux_dir quite unusable in subdirectories: in the top 76# source directory, any form will work fine, but in subdirectories a 77# relative path needs to be adjusted first. 78# 79# $ac_aux_dir/missing 80# fails when called from a subdirectory if $ac_aux_dir is relative 81# $top_srcdir/$ac_aux_dir/missing 82# fails if $ac_aux_dir is absolute, 83# fails when called from a subdirectory in a VPATH build with 84# a relative $ac_aux_dir 85# 86# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 87# are both prefixed by $srcdir. In an in-source build this is usually 88# harmless because $srcdir is '.', but things will broke when you 89# start a VPATH build or use an absolute $srcdir. 90# 91# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 92# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 93# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 94# and then we would define $MISSING as 95# MISSING="\${SHELL} $am_aux_dir/missing" 96# This will work as long as MISSING is not called from configure, because 97# unfortunately $(top_srcdir) has no meaning in configure. 98# However there are other variables, like CC, which are often used in 99# configure, and could therefore not use this "fixed" $ac_aux_dir. 100# 101# Another solution, used here, is to always expand $ac_aux_dir to an 102# absolute PATH. The drawback is that using absolute paths prevent a 103# configured tree to be moved without reconfiguration. 104 105AC_DEFUN([AM_AUX_DIR_EXPAND], 106[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 107# Expand $ac_aux_dir to an absolute path. 108am_aux_dir=`cd "$ac_aux_dir" && pwd` 109]) 110 111# AM_CONDITIONAL -*- Autoconf -*- 112 113# Copyright (C) 1997-2021 Free Software Foundation, Inc. 114# 115# This file is free software; the Free Software Foundation 116# gives unlimited permission to copy and/or distribute it, 117# with or without modifications, as long as this notice is preserved. 118 119# AM_CONDITIONAL(NAME, SHELL-CONDITION) 120# ------------------------------------- 121# Define a conditional. 122AC_DEFUN([AM_CONDITIONAL], 123[AC_PREREQ([2.52])dnl 124 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 125 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 126AC_SUBST([$1_TRUE])dnl 127AC_SUBST([$1_FALSE])dnl 128_AM_SUBST_NOTMAKE([$1_TRUE])dnl 129_AM_SUBST_NOTMAKE([$1_FALSE])dnl 130m4_define([_AM_COND_VALUE_$1], [$2])dnl 131if $2; then 132 $1_TRUE= 133 $1_FALSE='#' 134else 135 $1_TRUE='#' 136 $1_FALSE= 137fi 138AC_CONFIG_COMMANDS_PRE( 139[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 140 AC_MSG_ERROR([[conditional "$1" was never defined. 141Usually this means the macro was only invoked conditionally.]]) 142fi])]) 143 144# Do all the work for Automake. -*- Autoconf -*- 145 146# Copyright (C) 1996-2021 Free Software Foundation, Inc. 147# 148# This file is free software; the Free Software Foundation 149# gives unlimited permission to copy and/or distribute it, 150# with or without modifications, as long as this notice is preserved. 151 152# This macro actually does too much. Some checks are only needed if 153# your package does certain things. But this isn't really a big deal. 154 155dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 156m4_define([AC_PROG_CC], 157m4_defn([AC_PROG_CC]) 158[_AM_PROG_CC_C_O 159]) 160 161# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 162# AM_INIT_AUTOMAKE([OPTIONS]) 163# ----------------------------------------------- 164# The call with PACKAGE and VERSION arguments is the old style 165# call (pre autoconf-2.50), which is being phased out. PACKAGE 166# and VERSION should now be passed to AC_INIT and removed from 167# the call to AM_INIT_AUTOMAKE. 168# We support both call styles for the transition. After 169# the next Automake release, Autoconf can make the AC_INIT 170# arguments mandatory, and then we can depend on a new Autoconf 171# release and drop the old call support. 172AC_DEFUN([AM_INIT_AUTOMAKE], 173[AC_PREREQ([2.65])dnl 174m4_ifdef([_$0_ALREADY_INIT], 175 [m4_fatal([$0 expanded multiple times 176]m4_defn([_$0_ALREADY_INIT]))], 177 [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 178dnl Autoconf wants to disallow AM_ names. We explicitly allow 179dnl the ones we care about. 180m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 181AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 182AC_REQUIRE([AC_PROG_INSTALL])dnl 183if test "`cd $srcdir && pwd`" != "`pwd`"; then 184 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 185 # is not polluted with repeated "-I." 186 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 187 # test to see if srcdir already configured 188 if test -f $srcdir/config.status; then 189 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 190 fi 191fi 192 193# test whether we have cygpath 194if test -z "$CYGPATH_W"; then 195 if (cygpath --version) >/dev/null 2>/dev/null; then 196 CYGPATH_W='cygpath -w' 197 else 198 CYGPATH_W=echo 199 fi 200fi 201AC_SUBST([CYGPATH_W]) 202 203# Define the identity of the package. 204dnl Distinguish between old-style and new-style calls. 205m4_ifval([$2], 206[AC_DIAGNOSE([obsolete], 207 [$0: two- and three-arguments forms are deprecated.]) 208m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 209 AC_SUBST([PACKAGE], [$1])dnl 210 AC_SUBST([VERSION], [$2])], 211[_AM_SET_OPTIONS([$1])dnl 212dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 213m4_if( 214 m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 215 [ok:ok],, 216 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 217 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 218 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 219 220_AM_IF_OPTION([no-define],, 221[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 222 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 223 224# Some tools Automake needs. 225AC_REQUIRE([AM_SANITY_CHECK])dnl 226AC_REQUIRE([AC_ARG_PROGRAM])dnl 227AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 228AM_MISSING_PROG([AUTOCONF], [autoconf]) 229AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 230AM_MISSING_PROG([AUTOHEADER], [autoheader]) 231AM_MISSING_PROG([MAKEINFO], [makeinfo]) 232AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 233AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 234AC_REQUIRE([AC_PROG_MKDIR_P])dnl 235# For better backward compatibility. To be removed once Automake 1.9.x 236# dies out for good. For more background, see: 237# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 238# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 239AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 240# We need awk for the "check" target (and possibly the TAP driver). The 241# system "awk" is bad on some platforms. 242AC_REQUIRE([AC_PROG_AWK])dnl 243AC_REQUIRE([AC_PROG_MAKE_SET])dnl 244AC_REQUIRE([AM_SET_LEADING_DOT])dnl 245_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 246 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 247 [_AM_PROG_TAR([v7])])]) 248_AM_IF_OPTION([no-dependencies],, 249[AC_PROVIDE_IFELSE([AC_PROG_CC], 250 [_AM_DEPENDENCIES([CC])], 251 [m4_define([AC_PROG_CC], 252 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 253AC_PROVIDE_IFELSE([AC_PROG_CXX], 254 [_AM_DEPENDENCIES([CXX])], 255 [m4_define([AC_PROG_CXX], 256 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 257AC_PROVIDE_IFELSE([AC_PROG_OBJC], 258 [_AM_DEPENDENCIES([OBJC])], 259 [m4_define([AC_PROG_OBJC], 260 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 261AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 262 [_AM_DEPENDENCIES([OBJCXX])], 263 [m4_define([AC_PROG_OBJCXX], 264 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 265]) 266# Variables for tags utilities; see am/tags.am 267if test -z "$CTAGS"; then 268 CTAGS=ctags 269fi 270AC_SUBST([CTAGS]) 271if test -z "$ETAGS"; then 272 ETAGS=etags 273fi 274AC_SUBST([ETAGS]) 275if test -z "$CSCOPE"; then 276 CSCOPE=cscope 277fi 278AC_SUBST([CSCOPE]) 279 280AC_REQUIRE([AM_SILENT_RULES])dnl 281dnl The testsuite driver may need to know about EXEEXT, so add the 282dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 283dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 284AC_CONFIG_COMMANDS_PRE(dnl 285[m4_provide_if([_AM_COMPILER_EXEEXT], 286 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 287 288# POSIX will say in a future version that running "rm -f" with no argument 289# is OK; and we want to be able to make that assumption in our Makefile 290# recipes. So use an aggressive probe to check that the usage we want is 291# actually supported "in the wild" to an acceptable degree. 292# See automake bug#10828. 293# To make any issue more visible, cause the running configure to be aborted 294# by default if the 'rm' program in use doesn't match our expectations; the 295# user can still override this though. 296if rm -f && rm -fr && rm -rf; then : OK; else 297 cat >&2 <<'END' 298Oops! 299 300Your 'rm' program seems unable to run without file operands specified 301on the command line, even when the '-f' option is present. This is contrary 302to the behaviour of most rm programs out there, and not conforming with 303the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 304 305Please tell bug-automake@gnu.org about your system, including the value 306of your $PATH and any error possibly output before this message. This 307can help us improve future automake versions. 308 309END 310 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 311 echo 'Configuration will proceed anyway, since you have set the' >&2 312 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 313 echo >&2 314 else 315 cat >&2 <<'END' 316Aborting the configuration process, to ensure you take notice of the issue. 317 318You can download and install GNU coreutils to get an 'rm' implementation 319that behaves properly: <https://www.gnu.org/software/coreutils/>. 320 321If you want to complete the configuration process using your problematic 322'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 323to "yes", and re-run configure. 324 325END 326 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 327 fi 328fi 329dnl The trailing newline in this macro's definition is deliberate, for 330dnl backward compatibility and to allow trailing 'dnl'-style comments 331dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 332]) 333 334dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 335dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 336dnl mangled by Autoconf and run in a shell conditional statement. 337m4_define([_AC_COMPILER_EXEEXT], 338m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 339 340# When config.status generates a header, we must update the stamp-h file. 341# This file resides in the same directory as the config header 342# that is generated. The stamp files are numbered to have different names. 343 344# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 345# loop where config.status creates the headers, so we can generate 346# our stamp files there. 347AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 348[# Compute $1's index in $config_headers. 349_am_arg=$1 350_am_stamp_count=1 351for _am_header in $config_headers :; do 352 case $_am_header in 353 $_am_arg | $_am_arg:* ) 354 break ;; 355 * ) 356 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 357 esac 358done 359echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 360 361# Copyright (C) 2001-2021 Free Software Foundation, Inc. 362# 363# This file is free software; the Free Software Foundation 364# gives unlimited permission to copy and/or distribute it, 365# with or without modifications, as long as this notice is preserved. 366 367# AM_PROG_INSTALL_SH 368# ------------------ 369# Define $install_sh. 370AC_DEFUN([AM_PROG_INSTALL_SH], 371[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 372if test x"${install_sh+set}" != xset; then 373 case $am_aux_dir in 374 *\ * | *\ *) 375 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 376 *) 377 install_sh="\${SHELL} $am_aux_dir/install-sh" 378 esac 379fi 380AC_SUBST([install_sh])]) 381 382# Copyright (C) 2003-2021 Free Software Foundation, Inc. 383# 384# This file is free software; the Free Software Foundation 385# gives unlimited permission to copy and/or distribute it, 386# with or without modifications, as long as this notice is preserved. 387 388# Check whether the underlying file-system supports filenames 389# with a leading dot. For instance MS-DOS doesn't. 390AC_DEFUN([AM_SET_LEADING_DOT], 391[rm -rf .tst 2>/dev/null 392mkdir .tst 2>/dev/null 393if test -d .tst; then 394 am__leading_dot=. 395else 396 am__leading_dot=_ 397fi 398rmdir .tst 2>/dev/null 399AC_SUBST([am__leading_dot])]) 400 401# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 402 403# Copyright (C) 1997-2021 Free Software Foundation, Inc. 404# 405# This file is free software; the Free Software Foundation 406# gives unlimited permission to copy and/or distribute it, 407# with or without modifications, as long as this notice is preserved. 408 409# AM_MISSING_PROG(NAME, PROGRAM) 410# ------------------------------ 411AC_DEFUN([AM_MISSING_PROG], 412[AC_REQUIRE([AM_MISSING_HAS_RUN]) 413$1=${$1-"${am_missing_run}$2"} 414AC_SUBST($1)]) 415 416# AM_MISSING_HAS_RUN 417# ------------------ 418# Define MISSING if not defined so far and test if it is modern enough. 419# If it is, set am_missing_run to use it, otherwise, to nothing. 420AC_DEFUN([AM_MISSING_HAS_RUN], 421[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 422AC_REQUIRE_AUX_FILE([missing])dnl 423if test x"${MISSING+set}" != xset; then 424 MISSING="\${SHELL} '$am_aux_dir/missing'" 425fi 426# Use eval to expand $SHELL 427if eval "$MISSING --is-lightweight"; then 428 am_missing_run="$MISSING " 429else 430 am_missing_run= 431 AC_MSG_WARN(['missing' script is too old or missing]) 432fi 433]) 434 435# Helper functions for option handling. -*- Autoconf -*- 436 437# Copyright (C) 2001-2021 Free Software Foundation, Inc. 438# 439# This file is free software; the Free Software Foundation 440# gives unlimited permission to copy and/or distribute it, 441# with or without modifications, as long as this notice is preserved. 442 443# _AM_MANGLE_OPTION(NAME) 444# ----------------------- 445AC_DEFUN([_AM_MANGLE_OPTION], 446[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 447 448# _AM_SET_OPTION(NAME) 449# -------------------- 450# Set option NAME. Presently that only means defining a flag for this option. 451AC_DEFUN([_AM_SET_OPTION], 452[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 453 454# _AM_SET_OPTIONS(OPTIONS) 455# ------------------------ 456# OPTIONS is a space-separated list of Automake options. 457AC_DEFUN([_AM_SET_OPTIONS], 458[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 459 460# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 461# ------------------------------------------- 462# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 463AC_DEFUN([_AM_IF_OPTION], 464[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 465 466# Copyright (C) 1999-2021 Free Software Foundation, Inc. 467# 468# This file is free software; the Free Software Foundation 469# gives unlimited permission to copy and/or distribute it, 470# with or without modifications, as long as this notice is preserved. 471 472 473# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 474# --------------------------------------------------------------------------- 475# Adds support for distributing Python modules and packages. To 476# install modules, copy them to $(pythondir), using the python_PYTHON 477# automake variable. To install a package with the same name as the 478# automake package, install to $(pkgpythondir), or use the 479# pkgpython_PYTHON automake variable. 480# 481# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as 482# locations to install python extension modules (shared libraries). 483# Another macro is required to find the appropriate flags to compile 484# extension modules. 485# 486# If your package is configured with a different prefix to python, 487# users will have to add the install directory to the PYTHONPATH 488# environment variable, or create a .pth file (see the python 489# documentation for details). 490# 491# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will 492# cause an error if the version of python installed on the system 493# doesn't meet the requirement. MINIMUM-VERSION should consist of 494# numbers and dots only. 495AC_DEFUN([AM_PATH_PYTHON], 496 [ 497 dnl Find a Python interpreter. Python versions prior to 2.0 are not 498 dnl supported. (2.0 was released on October 16, 2000). 499 m4_define_default([_AM_PYTHON_INTERPRETER_LIST], 500[python python2 python3 dnl 501 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl 502 python3.2 python3.1 python3.0 dnl 503 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl 504 python2.0]) 505 506 AC_ARG_VAR([PYTHON], [the Python interpreter]) 507 508 m4_if([$1],[],[ 509 dnl No version check is needed. 510 # Find any Python interpreter. 511 if test -z "$PYTHON"; then 512 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) 513 fi 514 am_display_PYTHON=python 515 ], [ 516 dnl A version check is needed. 517 if test -n "$PYTHON"; then 518 # If the user set $PYTHON, use it and don't search something else. 519 AC_MSG_CHECKING([whether $PYTHON version is >= $1]) 520 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], 521 [AC_MSG_RESULT([yes])], 522 [AC_MSG_RESULT([no]) 523 AC_MSG_ERROR([Python interpreter is too old])]) 524 am_display_PYTHON=$PYTHON 525 else 526 # Otherwise, try each interpreter until we find one that satisfies 527 # VERSION. 528 AC_CACHE_CHECK([for a Python interpreter with version >= $1], 529 [am_cv_pathless_PYTHON],[ 530 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do 531 test "$am_cv_pathless_PYTHON" = none && break 532 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) 533 done]) 534 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. 535 if test "$am_cv_pathless_PYTHON" = none; then 536 PYTHON=: 537 else 538 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) 539 fi 540 am_display_PYTHON=$am_cv_pathless_PYTHON 541 fi 542 ]) 543 544 if test "$PYTHON" = :; then 545 dnl Run any user-specified action, or abort. 546 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) 547 else 548 549 dnl Query Python for its version number. Although site.py simply uses 550 dnl sys.version[:3], printing that failed with Python 3.10, since the 551 dnl trailing zero was eliminated. So now we output just the major 552 dnl and minor version numbers, as numbers. Apparently the tertiary 553 dnl version is not of interest. 554 dnl 555 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], 556 [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`]) 557 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) 558 559 dnl At times, e.g., when building shared libraries, you may want 560 dnl to know which OS platform Python thinks this is. 561 dnl 562 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], 563 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) 564 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) 565 566 dnl emacs-page 567 dnl If --with-python-sys-prefix is given, use the values of sys.prefix 568 dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX 569 dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and 570 dnl ${exec_prefix} variables. 571 dnl 572 dnl The two are made distinct variables so they can be overridden if 573 dnl need be, although general consensus is that you shouldn't need 574 dnl this separation. 575 dnl 576 dnl Also allow directly setting the prefixes via configure options, 577 dnl overriding any default. 578 dnl 579 if test "x$prefix" = xNONE; then 580 am__usable_prefix=$ac_default_prefix 581 else 582 am__usable_prefix=$prefix 583 fi 584 585 # Allow user to request using sys.* values from Python, 586 # instead of the GNU $prefix values. 587 AC_ARG_WITH([python-sys-prefix], 588 [AS_HELP_STRING([--with-python-sys-prefix], 589 [use Python's sys.prefix and sys.exec_prefix values])], 590 [am_use_python_sys=:], 591 [am_use_python_sys=false]) 592 593 # Allow user to override whatever the default Python prefix is. 594 AC_ARG_WITH([python_prefix], 595 [AS_HELP_STRING([--with-python_prefix], 596 [override the default PYTHON_PREFIX])], 597 [am_python_prefix_subst=$withval 598 am_cv_python_prefix=$withval 599 AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix]) 600 AC_MSG_RESULT([$am_cv_python_prefix])], 601 [ 602 if $am_use_python_sys; then 603 # using python sys.prefix value, not GNU 604 AC_CACHE_CHECK([for python default $am_display_PYTHON prefix], 605 [am_cv_python_prefix], 606 [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`]) 607 608 dnl If sys.prefix is a subdir of $prefix, replace the literal value of 609 dnl $prefix with a variable reference so it can be overridden. 610 case $am_cv_python_prefix in 611 $am__usable_prefix*) 612 am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'` 613 am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"` 614 ;; 615 *) 616 am_python_prefix_subst=$am_cv_python_prefix 617 ;; 618 esac 619 else # using GNU prefix value, not python sys.prefix 620 am_python_prefix_subst='${prefix}' 621 am_python_prefix=$am_python_prefix_subst 622 AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix]) 623 AC_MSG_RESULT([$am_python_prefix]) 624 fi]) 625 # Substituting python_prefix_subst value. 626 AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst]) 627 628 # emacs-page Now do it all over again for Python exec_prefix, but with yet 629 # another conditional: fall back to regular prefix if that was specified. 630 AC_ARG_WITH([python_exec_prefix], 631 [AS_HELP_STRING([--with-python_exec_prefix], 632 [override the default PYTHON_EXEC_PREFIX])], 633 [am_python_exec_prefix_subst=$withval 634 am_cv_python_exec_prefix=$withval 635 AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix]) 636 AC_MSG_RESULT([$am_cv_python_exec_prefix])], 637 [ 638 # no explicit --with-python_exec_prefix, but if 639 # --with-python_prefix was given, use its value for python_exec_prefix too. 640 AS_IF([test -n "$with_python_prefix"], 641 [am_python_exec_prefix_subst=$with_python_prefix 642 am_cv_python_exec_prefix=$with_python_prefix 643 AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix]) 644 AC_MSG_RESULT([$am_cv_python_exec_prefix])], 645 [ 646 # Set am__usable_exec_prefix whether using GNU or Python values, 647 # since we use that variable for pyexecdir. 648 if test "x$exec_prefix" = xNONE; then 649 am__usable_exec_prefix=$am__usable_prefix 650 else 651 am__usable_exec_prefix=$exec_prefix 652 fi 653 # 654 if $am_use_python_sys; then # using python sys.exec_prefix, not GNU 655 AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix], 656 [am_cv_python_exec_prefix], 657 [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`]) 658 dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the 659 dnl literal value of $exec_prefix with a variable reference so it can 660 dnl be overridden. 661 case $am_cv_python_exec_prefix in 662 $am__usable_exec_prefix*) 663 am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'` 664 am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"` 665 ;; 666 *) 667 am_python_exec_prefix_subst=$am_cv_python_exec_prefix 668 ;; 669 esac 670 else # using GNU $exec_prefix, not python sys.exec_prefix 671 am_python_exec_prefix_subst='${exec_prefix}' 672 am_python_exec_prefix=$am_python_exec_prefix_subst 673 AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix]) 674 AC_MSG_RESULT([$am_python_exec_prefix]) 675 fi])]) 676 # Substituting python_exec_prefix_subst. 677 AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst]) 678 679 # Factor out some code duplication into this shell variable. 680 am_python_setup_sysconfig="\ 681import sys 682# Prefer sysconfig over distutils.sysconfig, for better compatibility 683# with python 3.x. See automake bug#10227. 684try: 685 import sysconfig 686except ImportError: 687 can_use_sysconfig = 0 688else: 689 can_use_sysconfig = 1 690# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: 691# <https://github.com/pypa/virtualenv/issues/118> 692try: 693 from platform import python_implementation 694 if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': 695 can_use_sysconfig = 0 696except ImportError: 697 pass" 698 699 dnl emacs-page Set up 4 directories: 700 701 dnl 1. pythondir: where to install python scripts. This is the 702 dnl site-packages directory, not the python standard library 703 dnl directory like in previous automake betas. This behavior 704 dnl is more consistent with lispdir.m4 for example. 705 dnl Query distutils for this directory. 706 dnl 707 AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)], 708 [am_cv_python_pythondir], 709 [if test "x$am_cv_python_prefix" = x; then 710 am_py_prefix=$am__usable_prefix 711 else 712 am_py_prefix=$am_cv_python_prefix 713 fi 714 am_cv_python_pythondir=`$PYTHON -c " 715$am_python_setup_sysconfig 716if can_use_sysconfig: 717 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) 718else: 719 from distutils import sysconfig 720 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') 721sys.stdout.write(sitedir)"` 722 # 723 case $am_cv_python_pythondir in 724 $am_py_prefix*) 725 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` 726 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` 727 ;; 728 *) 729 case $am_py_prefix in 730 /usr|/System*) ;; 731 *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages" 732 ;; 733 esac 734 ;; 735 esac 736 ]) 737 AC_SUBST([pythondir], [$am_cv_python_pythondir]) 738 739 dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was 740 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is 741 dnl more consistent with the rest of automake. 742 dnl 743 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) 744 745 dnl 3. pyexecdir: directory for installing python extension modules 746 dnl (shared libraries). 747 dnl Query distutils for this directory. 748 dnl 749 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)], 750 [am_cv_python_pyexecdir], 751 [if test "x$am_cv_python_exec_prefix" = x; then 752 am_py_exec_prefix=$am__usable_exec_prefix 753 else 754 am_py_exec_prefix=$am_cv_python_exec_prefix 755 fi 756 am_cv_python_pyexecdir=`$PYTHON -c " 757$am_python_setup_sysconfig 758if can_use_sysconfig: 759 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'}) 760else: 761 from distutils import sysconfig 762 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') 763sys.stdout.write(sitedir)"` 764 # 765 case $am_cv_python_pyexecdir in 766 $am_py_exec_prefix*) 767 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` 768 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` 769 ;; 770 *) 771 case $am_py_exec_prefix in 772 /usr|/System*) ;; 773 *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages" 774 ;; 775 esac 776 ;; 777 esac 778 ]) 779 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) 780 781 dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE) 782 dnl 783 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) 784 785 dnl Run any user-specified action. 786 $2 787 fi 788]) 789 790 791# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) 792# --------------------------------------------------------------------------- 793# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. 794# Run ACTION-IF-FALSE otherwise. 795# This test uses sys.hexversion instead of the string equivalent (first 796# word of sys.version), in order to cope with versions such as 2.2c1. 797# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). 798AC_DEFUN([AM_PYTHON_CHECK_VERSION], 799 [prog="import sys 800# split strings by '.' and convert to numeric. Append some zeros 801# because we need at least 4 digits for the hex conversion. 802# map returns an iterator in Python 3.0 and a list in 2.x 803minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] 804minverhex = 0 805# xrange is not present in Python 3.0 and range returns an iterator 806for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] 807sys.exit(sys.hexversion < minverhex)" 808 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) 809 810# Copyright (C) 2001-2021 Free Software Foundation, Inc. 811# 812# This file is free software; the Free Software Foundation 813# gives unlimited permission to copy and/or distribute it, 814# with or without modifications, as long as this notice is preserved. 815 816# AM_RUN_LOG(COMMAND) 817# ------------------- 818# Run COMMAND, save the exit status in ac_status, and log it. 819# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 820AC_DEFUN([AM_RUN_LOG], 821[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 822 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 823 ac_status=$? 824 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 825 (exit $ac_status); }]) 826 827# Check to make sure that the build environment is sane. -*- Autoconf -*- 828 829# Copyright (C) 1996-2021 Free Software Foundation, Inc. 830# 831# This file is free software; the Free Software Foundation 832# gives unlimited permission to copy and/or distribute it, 833# with or without modifications, as long as this notice is preserved. 834 835# AM_SANITY_CHECK 836# --------------- 837AC_DEFUN([AM_SANITY_CHECK], 838[AC_MSG_CHECKING([whether build environment is sane]) 839# Reject unsafe characters in $srcdir or the absolute working directory 840# name. Accept space and tab only in the latter. 841am_lf=' 842' 843case `pwd` in 844 *[[\\\"\#\$\&\'\`$am_lf]]*) 845 AC_MSG_ERROR([unsafe absolute working directory name]);; 846esac 847case $srcdir in 848 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 849 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 850esac 851 852# Do 'set' in a subshell so we don't clobber the current shell's 853# arguments. Must try -L first in case configure is actually a 854# symlink; some systems play weird games with the mod time of symlinks 855# (eg FreeBSD returns the mod time of the symlink's containing 856# directory). 857if ( 858 am_has_slept=no 859 for am_try in 1 2; do 860 echo "timestamp, slept: $am_has_slept" > conftest.file 861 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 862 if test "$[*]" = "X"; then 863 # -L didn't work. 864 set X `ls -t "$srcdir/configure" conftest.file` 865 fi 866 if test "$[*]" != "X $srcdir/configure conftest.file" \ 867 && test "$[*]" != "X conftest.file $srcdir/configure"; then 868 869 # If neither matched, then we have a broken ls. This can happen 870 # if, for instance, CONFIG_SHELL is bash and it inherits a 871 # broken ls alias from the environment. This has actually 872 # happened. Such a system could not be considered "sane". 873 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 874 alias in your environment]) 875 fi 876 if test "$[2]" = conftest.file || test $am_try -eq 2; then 877 break 878 fi 879 # Just in case. 880 sleep 1 881 am_has_slept=yes 882 done 883 test "$[2]" = conftest.file 884 ) 885then 886 # Ok. 887 : 888else 889 AC_MSG_ERROR([newly created file is older than distributed files! 890Check your system clock]) 891fi 892AC_MSG_RESULT([yes]) 893# If we didn't sleep, we still need to ensure time stamps of config.status and 894# generated files are strictly newer. 895am_sleep_pid= 896if grep 'slept: no' conftest.file >/dev/null 2>&1; then 897 ( sleep 1 ) & 898 am_sleep_pid=$! 899fi 900AC_CONFIG_COMMANDS_PRE( 901 [AC_MSG_CHECKING([that generated files are newer than configure]) 902 if test -n "$am_sleep_pid"; then 903 # Hide warnings about reused PIDs. 904 wait $am_sleep_pid 2>/dev/null 905 fi 906 AC_MSG_RESULT([done])]) 907rm -f conftest.file 908]) 909 910# Copyright (C) 2009-2021 Free Software Foundation, Inc. 911# 912# This file is free software; the Free Software Foundation 913# gives unlimited permission to copy and/or distribute it, 914# with or without modifications, as long as this notice is preserved. 915 916# AM_SILENT_RULES([DEFAULT]) 917# -------------------------- 918# Enable less verbose build rules; with the default set to DEFAULT 919# ("yes" being less verbose, "no" or empty being verbose). 920AC_DEFUN([AM_SILENT_RULES], 921[AC_ARG_ENABLE([silent-rules], [dnl 922AS_HELP_STRING( 923 [--enable-silent-rules], 924 [less verbose build output (undo: "make V=1")]) 925AS_HELP_STRING( 926 [--disable-silent-rules], 927 [verbose build output (undo: "make V=0")])dnl 928]) 929case $enable_silent_rules in @%:@ ((( 930 yes) AM_DEFAULT_VERBOSITY=0;; 931 no) AM_DEFAULT_VERBOSITY=1;; 932 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 933esac 934dnl 935dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 936dnl do not support nested variable expansions. 937dnl See automake bug#9928 and bug#10237. 938am_make=${MAKE-make} 939AC_CACHE_CHECK([whether $am_make supports nested variables], 940 [am_cv_make_support_nested_variables], 941 [if AS_ECHO([['TRUE=$(BAR$(V)) 942BAR0=false 943BAR1=true 944V=1 945am__doit: 946 @$(TRUE) 947.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 948 am_cv_make_support_nested_variables=yes 949else 950 am_cv_make_support_nested_variables=no 951fi]) 952if test $am_cv_make_support_nested_variables = yes; then 953 dnl Using '$V' instead of '$(V)' breaks IRIX make. 954 AM_V='$(V)' 955 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 956else 957 AM_V=$AM_DEFAULT_VERBOSITY 958 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 959fi 960AC_SUBST([AM_V])dnl 961AM_SUBST_NOTMAKE([AM_V])dnl 962AC_SUBST([AM_DEFAULT_V])dnl 963AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 964AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 965AM_BACKSLASH='\' 966AC_SUBST([AM_BACKSLASH])dnl 967_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 968]) 969 970# Copyright (C) 2001-2021 Free Software Foundation, Inc. 971# 972# This file is free software; the Free Software Foundation 973# gives unlimited permission to copy and/or distribute it, 974# with or without modifications, as long as this notice is preserved. 975 976# AM_PROG_INSTALL_STRIP 977# --------------------- 978# One issue with vendor 'install' (even GNU) is that you can't 979# specify the program used to strip binaries. This is especially 980# annoying in cross-compiling environments, where the build's strip 981# is unlikely to handle the host's binaries. 982# Fortunately install-sh will honor a STRIPPROG variable, so we 983# always use install-sh in "make install-strip", and initialize 984# STRIPPROG with the value of the STRIP variable (set by the user). 985AC_DEFUN([AM_PROG_INSTALL_STRIP], 986[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 987# Installed binaries are usually stripped using 'strip' when the user 988# run "make install-strip". However 'strip' might not be the right 989# tool to use in cross-compilation environments, therefore Automake 990# will honor the 'STRIP' environment variable to overrule this program. 991dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 992if test "$cross_compiling" != no; then 993 AC_CHECK_TOOL([STRIP], [strip], :) 994fi 995INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 996AC_SUBST([INSTALL_STRIP_PROGRAM])]) 997 998# Copyright (C) 2006-2021 Free Software Foundation, Inc. 999# 1000# This file is free software; the Free Software Foundation 1001# gives unlimited permission to copy and/or distribute it, 1002# with or without modifications, as long as this notice is preserved. 1003 1004# _AM_SUBST_NOTMAKE(VARIABLE) 1005# --------------------------- 1006# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1007# This macro is traced by Automake. 1008AC_DEFUN([_AM_SUBST_NOTMAKE]) 1009 1010# AM_SUBST_NOTMAKE(VARIABLE) 1011# -------------------------- 1012# Public sister of _AM_SUBST_NOTMAKE. 1013AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1014 1015# Check how to create a tarball. -*- Autoconf -*- 1016 1017# Copyright (C) 2004-2021 Free Software Foundation, Inc. 1018# 1019# This file is free software; the Free Software Foundation 1020# gives unlimited permission to copy and/or distribute it, 1021# with or without modifications, as long as this notice is preserved. 1022 1023# _AM_PROG_TAR(FORMAT) 1024# -------------------- 1025# Check how to create a tarball in format FORMAT. 1026# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1027# 1028# Substitute a variable $(am__tar) that is a command 1029# writing to stdout a FORMAT-tarball containing the directory 1030# $tardir. 1031# tardir=directory && $(am__tar) > result.tar 1032# 1033# Substitute a variable $(am__untar) that extract such 1034# a tarball read from stdin. 1035# $(am__untar) < result.tar 1036# 1037AC_DEFUN([_AM_PROG_TAR], 1038[# Always define AMTAR for backward compatibility. Yes, it's still used 1039# in the wild :-( We should find a proper way to deprecate it ... 1040AC_SUBST([AMTAR], ['$${TAR-tar}']) 1041 1042# We'll loop over all known methods to create a tar archive until one works. 1043_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1044 1045m4_if([$1], [v7], 1046 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1047 1048 [m4_case([$1], 1049 [ustar], 1050 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1051 # There is notably a 21 bits limit for the UID and the GID. In fact, 1052 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1053 # and bug#13588). 1054 am_max_uid=2097151 # 2^21 - 1 1055 am_max_gid=$am_max_uid 1056 # The $UID and $GID variables are not portable, so we need to resort 1057 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1058 # below are definitely unexpected, so allow the users to see them 1059 # (that is, avoid stderr redirection). 1060 am_uid=`id -u || echo unknown` 1061 am_gid=`id -g || echo unknown` 1062 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1063 if test $am_uid -le $am_max_uid; then 1064 AC_MSG_RESULT([yes]) 1065 else 1066 AC_MSG_RESULT([no]) 1067 _am_tools=none 1068 fi 1069 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1070 if test $am_gid -le $am_max_gid; then 1071 AC_MSG_RESULT([yes]) 1072 else 1073 AC_MSG_RESULT([no]) 1074 _am_tools=none 1075 fi], 1076 1077 [pax], 1078 [], 1079 1080 [m4_fatal([Unknown tar format])]) 1081 1082 AC_MSG_CHECKING([how to create a $1 tar archive]) 1083 1084 # Go ahead even if we have the value already cached. We do so because we 1085 # need to set the values for the 'am__tar' and 'am__untar' variables. 1086 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1087 1088 for _am_tool in $_am_tools; do 1089 case $_am_tool in 1090 gnutar) 1091 for _am_tar in tar gnutar gtar; do 1092 AM_RUN_LOG([$_am_tar --version]) && break 1093 done 1094 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1095 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1096 am__untar="$_am_tar -xf -" 1097 ;; 1098 plaintar) 1099 # Must skip GNU tar: if it does not support --format= it doesn't create 1100 # ustar tarball either. 1101 (tar --version) >/dev/null 2>&1 && continue 1102 am__tar='tar chf - "$$tardir"' 1103 am__tar_='tar chf - "$tardir"' 1104 am__untar='tar xf -' 1105 ;; 1106 pax) 1107 am__tar='pax -L -x $1 -w "$$tardir"' 1108 am__tar_='pax -L -x $1 -w "$tardir"' 1109 am__untar='pax -r' 1110 ;; 1111 cpio) 1112 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1113 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1114 am__untar='cpio -i -H $1 -d' 1115 ;; 1116 none) 1117 am__tar=false 1118 am__tar_=false 1119 am__untar=false 1120 ;; 1121 esac 1122 1123 # If the value was cached, stop now. We just wanted to have am__tar 1124 # and am__untar set. 1125 test -n "${am_cv_prog_tar_$1}" && break 1126 1127 # tar/untar a dummy directory, and stop if the command works. 1128 rm -rf conftest.dir 1129 mkdir conftest.dir 1130 echo GrepMe > conftest.dir/file 1131 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1132 rm -rf conftest.dir 1133 if test -s conftest.tar; then 1134 AM_RUN_LOG([$am__untar <conftest.tar]) 1135 AM_RUN_LOG([cat conftest.dir/file]) 1136 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1137 fi 1138 done 1139 rm -rf conftest.dir 1140 1141 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1142 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1143 1144AC_SUBST([am__tar]) 1145AC_SUBST([am__untar]) 1146]) # _AM_PROG_TAR 1147 1148