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