1# generated automatically by aclocal 1.16.1 -*- Autoconf -*- 2 3# Copyright (C) 1996-2018 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.69],, 18[m4_warning([this file was generated for autoconf 2.69. 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# =========================================================================== 24# https://www.gnu.org/software/autoconf-archive/ax_check_zlib.html 25# =========================================================================== 26# 27# SYNOPSIS 28# 29# AX_CHECK_ZLIB([action-if-found], [action-if-not-found]) 30# 31# DESCRIPTION 32# 33# This macro searches for an installed zlib library. If nothing was 34# specified when calling configure, it searches first in /usr/local and 35# then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified, 36# it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If 37# --without-zlib is specified, the library is not searched at all. 38# 39# If either the header file (zlib.h) or the library (libz) is not found, 40# shell commands 'action-if-not-found' is run. If 'action-if-not-found' is 41# not specified, the configuration exits on error, asking for a valid zlib 42# installation directory or --without-zlib. 43# 44# If both header file and library are found, shell commands 45# 'action-if-found' is run. If 'action-if-found' is not specified, the 46# default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends 47# '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls 48# AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition 49# for this symbol in a config.h file. Sample usage in a C/C++ source is as 50# follows: 51# 52# #ifdef HAVE_LIBZ 53# #include <zlib.h> 54# #endif /* HAVE_LIBZ */ 55# 56# LICENSE 57# 58# Copyright (c) 2008 Loic Dachary <loic@senga.org> 59# Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org> 60# 61# This program is free software; you can redistribute it and/or modify it 62# under the terms of the GNU General Public License as published by the 63# Free Software Foundation; either version 2 of the License, or (at your 64# option) any later version. 65# 66# This program is distributed in the hope that it will be useful, but 67# WITHOUT ANY WARRANTY; without even the implied warranty of 68# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 69# Public License for more details. 70# 71# You should have received a copy of the GNU General Public License along 72# with this program. If not, see <https://www.gnu.org/licenses/>. 73# 74# As a special exception, the respective Autoconf Macro's copyright owner 75# gives unlimited permission to copy, distribute and modify the configure 76# scripts that are the output of Autoconf when processing the Macro. You 77# need not follow the terms of the GNU General Public License when using 78# or distributing such scripts, even though portions of the text of the 79# Macro appear in them. The GNU General Public License (GPL) does govern 80# all other use of the material that constitutes the Autoconf Macro. 81# 82# This special exception to the GPL applies to versions of the Autoconf 83# Macro released by the Autoconf Archive. When you make and distribute a 84# modified version of the Autoconf Macro, you may extend this special 85# exception to the GPL to apply to your modified version as well. 86 87#serial 15 88 89AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB]) 90AC_DEFUN([AX_CHECK_ZLIB], 91# 92# Handle user hints 93# 94[AC_MSG_CHECKING(if zlib is wanted) 95zlib_places="/usr/local /usr /opt/local /sw" 96AC_ARG_WITH([zlib], 97[ --with-zlib=DIR root directory path of zlib installation @<:@defaults to 98 /usr/local or /usr if not found in /usr/local@:>@ 99 --without-zlib to disable zlib usage completely], 100[if test "$withval" != no ; then 101 AC_MSG_RESULT(yes) 102 if test -d "$withval" 103 then 104 zlib_places="$withval $zlib_places" 105 else 106 AC_MSG_WARN([Sorry, $withval does not exist, checking usual places]) 107 fi 108else 109 zlib_places= 110 AC_MSG_RESULT(no) 111fi], 112[AC_MSG_RESULT(yes)]) 113 114# 115# Locate zlib, if wanted 116# 117if test -n "${zlib_places}" 118then 119 # check the user supplied or any other more or less 'standard' place: 120 # Most UNIX systems : /usr/local and /usr 121 # MacPorts / Fink on OSX : /opt/local respectively /sw 122 for ZLIB_HOME in ${zlib_places} ; do 123 if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi 124 ZLIB_HOME="" 125 done 126 127 ZLIB_OLD_LDFLAGS=$LDFLAGS 128 ZLIB_OLD_CPPFLAGS=$CPPFLAGS 129 if test -n "${ZLIB_HOME}"; then 130 LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" 131 CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" 132 fi 133 AC_LANG_SAVE 134 AC_LANG_C 135 AC_CHECK_LIB([z], [inflateEnd], [zlib_cv_libz=yes], [zlib_cv_libz=no]) 136 AC_CHECK_HEADER([zlib.h], [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no]) 137 AC_LANG_RESTORE 138 if test "$zlib_cv_libz" = "yes" && test "$zlib_cv_zlib_h" = "yes" 139 then 140 # 141 # If both library and header were found, action-if-found 142 # 143 m4_ifblank([$1],[ 144 CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" 145 LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" 146 LIBS="-lz $LIBS" 147 AC_DEFINE([HAVE_LIBZ], [1], 148 [Define to 1 if you have `z' library (-lz)]) 149 ],[ 150 # Restore variables 151 LDFLAGS="$ZLIB_OLD_LDFLAGS" 152 CPPFLAGS="$ZLIB_OLD_CPPFLAGS" 153 $1 154 ]) 155 else 156 # 157 # If either header or library was not found, action-if-not-found 158 # 159 m4_default([$2],[ 160 AC_MSG_ERROR([either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib]) 161 ]) 162 fi 163fi 164]) 165 166# =========================================================================== 167# https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html 168# =========================================================================== 169# 170# SYNOPSIS 171# 172# AX_COMPILER_VENDOR 173# 174# DESCRIPTION 175# 176# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun, 177# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft, 178# watcom, etc. The vendor is returned in the cache variable 179# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++. 180# 181# LICENSE 182# 183# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> 184# Copyright (c) 2008 Matteo Frigo 185# 186# This program is free software: you can redistribute it and/or modify it 187# under the terms of the GNU General Public License as published by the 188# Free Software Foundation, either version 3 of the License, or (at your 189# option) any later version. 190# 191# This program is distributed in the hope that it will be useful, but 192# WITHOUT ANY WARRANTY; without even the implied warranty of 193# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 194# Public License for more details. 195# 196# You should have received a copy of the GNU General Public License along 197# with this program. If not, see <https://www.gnu.org/licenses/>. 198# 199# As a special exception, the respective Autoconf Macro's copyright owner 200# gives unlimited permission to copy, distribute and modify the configure 201# scripts that are the output of Autoconf when processing the Macro. You 202# need not follow the terms of the GNU General Public License when using 203# or distributing such scripts, even though portions of the text of the 204# Macro appear in them. The GNU General Public License (GPL) does govern 205# all other use of the material that constitutes the Autoconf Macro. 206# 207# This special exception to the GPL applies to versions of the Autoconf 208# Macro released by the Autoconf Archive. When you make and distribute a 209# modified version of the Autoconf Macro, you may extend this special 210# exception to the GPL to apply to your modified version as well. 211 212#serial 17 213 214AC_DEFUN([AX_COMPILER_VENDOR], 215[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, 216 dnl Please add if possible support to ax_compiler_version.m4 217 [# note: don't check for gcc first since some other compilers define __GNUC__ 218 vendors="intel: __ICC,__ECC,__INTEL_COMPILER 219 ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__ 220 pathscale: __PATHCC__,__PATHSCALE__ 221 clang: __clang__ 222 cray: _CRAYC 223 fujitsu: __FUJITSU 224 sdcc: SDCC, __SDCC 225 gnu: __GNUC__ 226 sun: __SUNPRO_C,__SUNPRO_CC 227 hp: __HP_cc,__HP_aCC 228 dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER 229 borland: __BORLANDC__,__CODEGEARC__,__TURBOC__ 230 comeau: __COMO__ 231 kai: __KCC 232 lcc: __LCC__ 233 sgi: __sgi,sgi 234 microsoft: _MSC_VER 235 metrowerks: __MWERKS__ 236 watcom: __WATCOMC__ 237 portland: __PGI 238 tcc: __TINYC__ 239 unknown: UNKNOWN" 240 for ventest in $vendors; do 241 case $ventest in 242 *:) vendor=$ventest; continue ;; 243 *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;; 244 esac 245 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ 246 #if !($vencpp) 247 thisisanerror; 248 #endif 249 ])], [break]) 250 done 251 ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1` 252 ]) 253]) 254 255# =========================================================================== 256# https://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html 257# =========================================================================== 258# 259# SYNOPSIS 260# 261# AX_JNI_INCLUDE_DIR 262# 263# DESCRIPTION 264# 265# AX_JNI_INCLUDE_DIR finds include directories needed for compiling 266# programs using the JNI interface. 267# 268# JNI include directories are usually in the Java distribution. This is 269# deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in 270# that order. When this macro completes, a list of directories is left in 271# the variable JNI_INCLUDE_DIRS. 272# 273# Example usage follows: 274# 275# AX_JNI_INCLUDE_DIR 276# 277# for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS 278# do 279# CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR" 280# done 281# 282# If you want to force a specific compiler: 283# 284# - at the configure.in level, set JAVAC=yourcompiler before calling 285# AX_JNI_INCLUDE_DIR 286# 287# - at the configure level, setenv JAVAC 288# 289# Note: This macro can work with the autoconf M4 macros for Java programs. 290# This particular macro is not part of the original set of macros. 291# 292# LICENSE 293# 294# Copyright (c) 2008 Don Anderson <dda@sleepycat.com> 295# 296# Copying and distribution of this file, with or without modification, are 297# permitted in any medium without royalty provided the copyright notice 298# and this notice are preserved. This file is offered as-is, without any 299# warranty. 300 301#serial 14 302 303AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR]) 304AC_DEFUN([AX_JNI_INCLUDE_DIR],[ 305 306JNI_INCLUDE_DIRS="" 307 308if test "x$JAVA_HOME" != x; then 309 _JTOPDIR="$JAVA_HOME" 310else 311 if test "x$JAVAC" = x; then 312 JAVAC=javac 313 fi 314 AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no]) 315 if test "x$_ACJNI_JAVAC" = xno; then 316 AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME]) 317 fi 318 _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC") 319 _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'` 320fi 321 322case "$host_os" in 323 darwin*) # Apple Java headers are inside the Xcode bundle. 324 macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p') 325 if @<:@ "$macos_version" -gt "7" @:>@; then 326 _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework" 327 _JINC="$_JTOPDIR/Headers" 328 else 329 _JTOPDIR="/System/Library/Frameworks/JavaVM.framework" 330 _JINC="$_JTOPDIR/Headers" 331 fi 332 ;; 333 *) _JINC="$_JTOPDIR/include";; 334esac 335_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR]) 336_AS_ECHO_LOG([_JINC=$_JINC]) 337 338# On Mac OS X 10.6.4, jni.h is a symlink: 339# /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h 340# -> ../../CurrentJDK/Headers/jni.h. 341AC_CACHE_CHECK(jni headers, ac_cv_jni_header_path, 342[ 343 if test -f "$_JINC/jni.h"; then 344 ac_cv_jni_header_path="$_JINC" 345 JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $ac_cv_jni_header_path" 346 else 347 _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` 348 if test -f "$_JTOPDIR/include/jni.h"; then 349 ac_cv_jni_header_path="$_JTOPDIR/include" 350 JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $ac_cv_jni_header_path" 351 else 352 ac_cv_jni_header_path=none 353 fi 354 fi 355]) 356 357# get the likely subdirectories for system specific java includes 358case "$host_os" in 359bsdi*) _JNI_INC_SUBDIRS="bsdos";; 360freebsd*) _JNI_INC_SUBDIRS="freebsd";; 361darwin*) _JNI_INC_SUBDIRS="darwin";; 362linux*) _JNI_INC_SUBDIRS="linux genunix";; 363osf*) _JNI_INC_SUBDIRS="alpha";; 364solaris*) _JNI_INC_SUBDIRS="solaris";; 365mingw*) _JNI_INC_SUBDIRS="win32";; 366cygwin*) _JNI_INC_SUBDIRS="win32";; 367*) _JNI_INC_SUBDIRS="genunix";; 368esac 369 370if test "x$ac_cv_jni_header_path" != "xnone"; then 371 # add any subdirectories that are present 372 for JINCSUBDIR in $_JNI_INC_SUBDIRS 373 do 374 if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then 375 JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR" 376 fi 377 done 378fi 379]) 380 381# _ACJNI_FOLLOW_SYMLINKS <path> 382# Follows symbolic links on <path>, 383# finally setting variable _ACJNI_FOLLOWED 384# ---------------------------------------- 385AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[ 386# find the include directory relative to the javac executable 387_cur="$1" 388while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do 389 AC_MSG_CHECKING([symlink for $_cur]) 390 _slink=`ls -ld "$_cur" | sed 's/.* -> //'` 391 case "$_slink" in 392 /*) _cur="$_slink";; 393 # 'X' avoids triggering unwanted echo options. 394 *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";; 395 esac 396 AC_MSG_RESULT([$_cur]) 397done 398_ACJNI_FOLLOWED="$_cur" 399])# _ACJNI 400 401# =========================================================================== 402# https://www.gnu.org/software/autoconf-archive/ax_pkg_swig.html 403# =========================================================================== 404# 405# SYNOPSIS 406# 407# AX_PKG_SWIG([major.minor.micro], [action-if-found], [action-if-not-found]) 408# 409# DESCRIPTION 410# 411# This macro searches for a SWIG installation on your system. If found, 412# then SWIG is AC_SUBST'd; if not found, then $SWIG is empty. If SWIG is 413# found, then SWIG_LIB is set to the SWIG library path, and AC_SUBST'd. 414# 415# You can use the optional first argument to check if the version of the 416# available SWIG is greater than or equal to the value of the argument. It 417# should have the format: N[.N[.N]] (N is a number between 0 and 999. Only 418# the first N is mandatory.) If the version argument is given (e.g. 419# 1.3.17), AX_PKG_SWIG checks that the swig package is this version number 420# or higher. 421# 422# As usual, action-if-found is executed if SWIG is found, otherwise 423# action-if-not-found is executed. 424# 425# In configure.in, use as: 426# 427# AX_PKG_SWIG(1.3.17, [], [ AC_MSG_ERROR([SWIG is required to build..]) ]) 428# AX_SWIG_ENABLE_CXX 429# AX_SWIG_MULTI_MODULE_SUPPORT 430# AX_SWIG_PYTHON 431# 432# LICENSE 433# 434# Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de> 435# Copyright (c) 2008 Alan W. Irwin 436# Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net> 437# Copyright (c) 2008 Andrew Collier 438# Copyright (c) 2011 Murray Cumming <murrayc@openismus.com> 439# 440# This program is free software; you can redistribute it and/or modify it 441# under the terms of the GNU General Public License as published by the 442# Free Software Foundation; either version 2 of the License, or (at your 443# option) any later version. 444# 445# This program is distributed in the hope that it will be useful, but 446# WITHOUT ANY WARRANTY; without even the implied warranty of 447# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 448# Public License for more details. 449# 450# You should have received a copy of the GNU General Public License along 451# with this program. If not, see <https://www.gnu.org/licenses/>. 452# 453# As a special exception, the respective Autoconf Macro's copyright owner 454# gives unlimited permission to copy, distribute and modify the configure 455# scripts that are the output of Autoconf when processing the Macro. You 456# need not follow the terms of the GNU General Public License when using 457# or distributing such scripts, even though portions of the text of the 458# Macro appear in them. The GNU General Public License (GPL) does govern 459# all other use of the material that constitutes the Autoconf Macro. 460# 461# This special exception to the GPL applies to versions of the Autoconf 462# Macro released by the Autoconf Archive. When you make and distribute a 463# modified version of the Autoconf Macro, you may extend this special 464# exception to the GPL to apply to your modified version as well. 465 466#serial 13 467 468AC_DEFUN([AX_PKG_SWIG],[ 469 # Find path to the "swig" executable. 470 AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0]) 471 if test -z "$SWIG" ; then 472 m4_ifval([$3],[$3],[:]) 473 elif test -n "$1" ; then 474 AC_MSG_CHECKING([SWIG version]) 475 [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] 476 AC_MSG_RESULT([$swig_version]) 477 if test -n "$swig_version" ; then 478 # Calculate the required version number components 479 [required=$1] 480 [required_major=`echo $required | sed 's/[^0-9].*//'`] 481 if test -z "$required_major" ; then 482 [required_major=0] 483 fi 484 [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] 485 [required_minor=`echo $required | sed 's/[^0-9].*//'`] 486 if test -z "$required_minor" ; then 487 [required_minor=0] 488 fi 489 [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] 490 [required_patch=`echo $required | sed 's/[^0-9].*//'`] 491 if test -z "$required_patch" ; then 492 [required_patch=0] 493 fi 494 # Calculate the available version number components 495 [available=$swig_version] 496 [available_major=`echo $available | sed 's/[^0-9].*//'`] 497 if test -z "$available_major" ; then 498 [available_major=0] 499 fi 500 [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] 501 [available_minor=`echo $available | sed 's/[^0-9].*//'`] 502 if test -z "$available_minor" ; then 503 [available_minor=0] 504 fi 505 [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] 506 [available_patch=`echo $available | sed 's/[^0-9].*//'`] 507 if test -z "$available_patch" ; then 508 [available_patch=0] 509 fi 510 # Convert the version tuple into a single number for easier comparison. 511 # Using base 100 should be safe since SWIG internally uses BCD values 512 # to encode its version number. 513 required_swig_vernum=`expr $required_major \* 10000 \ 514 \+ $required_minor \* 100 \+ $required_patch` 515 available_swig_vernum=`expr $available_major \* 10000 \ 516 \+ $available_minor \* 100 \+ $available_patch` 517 518 if test $available_swig_vernum -lt $required_swig_vernum; then 519 AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version.]) 520 SWIG='' 521 m4_ifval([$3],[$3],[]) 522 else 523 AC_MSG_CHECKING([for SWIG library]) 524 SWIG_LIB=`$SWIG -swiglib` 525 AC_MSG_RESULT([$SWIG_LIB]) 526 m4_ifval([$2],[$2],[]) 527 fi 528 else 529 AC_MSG_WARN([cannot determine SWIG version]) 530 SWIG='' 531 m4_ifval([$3],[$3],[]) 532 fi 533 fi 534 AC_SUBST([SWIG_LIB]) 535]) 536 537# =========================================================================== 538# https://www.gnu.org/software/autoconf-archive/ax_python_devel.html 539# =========================================================================== 540# 541# SYNOPSIS 542# 543# AX_PYTHON_DEVEL([version]) 544# 545# DESCRIPTION 546# 547# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it 548# in your configure.ac. 549# 550# This macro checks for Python and tries to get the include path to 551# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output 552# variables. It also exports $(PYTHON_EXTRA_LIBS) and 553# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code. 554# 555# You can search for some particular version of Python by passing a 556# parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please 557# note that you *have* to pass also an operator along with the version to 558# match, and pay special attention to the single quotes surrounding the 559# version number. Don't use "PYTHON_VERSION" for this: that environment 560# variable is declared as precious and thus reserved for the end-user. 561# 562# This macro should work for all versions of Python >= 2.1.0. As an end 563# user, you can disable the check for the python version by setting the 564# PYTHON_NOVERSIONCHECK environment variable to something else than the 565# empty string. 566# 567# If you need to use this macro for an older Python version, please 568# contact the authors. We're always open for feedback. 569# 570# LICENSE 571# 572# Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de> 573# Copyright (c) 2009 Alan W. Irwin 574# Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net> 575# Copyright (c) 2009 Andrew Collier 576# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org> 577# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org> 578# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu> 579# 580# This program is free software: you can redistribute it and/or modify it 581# under the terms of the GNU General Public License as published by the 582# Free Software Foundation, either version 3 of the License, or (at your 583# option) any later version. 584# 585# This program is distributed in the hope that it will be useful, but 586# WITHOUT ANY WARRANTY; without even the implied warranty of 587# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 588# Public License for more details. 589# 590# You should have received a copy of the GNU General Public License along 591# with this program. If not, see <https://www.gnu.org/licenses/>. 592# 593# As a special exception, the respective Autoconf Macro's copyright owner 594# gives unlimited permission to copy, distribute and modify the configure 595# scripts that are the output of Autoconf when processing the Macro. You 596# need not follow the terms of the GNU General Public License when using 597# or distributing such scripts, even though portions of the text of the 598# Macro appear in them. The GNU General Public License (GPL) does govern 599# all other use of the material that constitutes the Autoconf Macro. 600# 601# This special exception to the GPL applies to versions of the Autoconf 602# Macro released by the Autoconf Archive. When you make and distribute a 603# modified version of the Autoconf Macro, you may extend this special 604# exception to the GPL to apply to your modified version as well. 605 606#serial 21 607 608AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) 609AC_DEFUN([AX_PYTHON_DEVEL],[ 610 # 611 # Allow the use of a (user set) custom python version 612 # 613 AC_ARG_VAR([PYTHON_VERSION],[The installed Python 614 version to use, for example '2.3'. This string 615 will be appended to the Python interpreter 616 canonical name.]) 617 618 AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) 619 if test -z "$PYTHON"; then 620 AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path]) 621 PYTHON_VERSION="" 622 fi 623 624 # 625 # Check for a version of Python >= 2.1.0 626 # 627 AC_MSG_CHECKING([for a version of Python >= '2.1.0']) 628 ac_supports_python_ver=`$PYTHON -c "import sys; \ 629 ver = sys.version.split ()[[0]]; \ 630 print (ver >= '2.1.0')"` 631 if test "$ac_supports_python_ver" != "True"; then 632 if test -z "$PYTHON_NOVERSIONCHECK"; then 633 AC_MSG_RESULT([no]) 634 AC_MSG_FAILURE([ 635This version of the AC@&t@_PYTHON_DEVEL macro 636doesn't work properly with versions of Python before 6372.1.0. You may need to re-run configure, setting the 638variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG, 639PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. 640Moreover, to disable this check, set PYTHON_NOVERSIONCHECK 641to something else than an empty string. 642]) 643 else 644 AC_MSG_RESULT([skip at user request]) 645 fi 646 else 647 AC_MSG_RESULT([yes]) 648 fi 649 650 # 651 # if the macro parameter ``version'' is set, honour it 652 # 653 if test -n "$1"; then 654 AC_MSG_CHECKING([for a version of Python $1]) 655 ac_supports_python_ver=`$PYTHON -c "import sys; \ 656 ver = sys.version.split ()[[0]]; \ 657 print (ver $1)"` 658 if test "$ac_supports_python_ver" = "True"; then 659 AC_MSG_RESULT([yes]) 660 else 661 AC_MSG_RESULT([no]) 662 AC_MSG_ERROR([this package requires Python $1. 663If you have it installed, but it isn't the default Python 664interpreter in your system path, please pass the PYTHON_VERSION 665variable to configure. See ``configure --help'' for reference. 666]) 667 PYTHON_VERSION="" 668 fi 669 fi 670 671 # 672 # Check if you have distutils, else fail 673 # 674 AC_MSG_CHECKING([for the distutils Python package]) 675 ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` 676 if test $? -eq 0; then 677 AC_MSG_RESULT([yes]) 678 else 679 AC_MSG_RESULT([no]) 680 AC_MSG_ERROR([cannot import Python module "distutils". 681Please check your Python installation. The error was: 682$ac_distutils_result]) 683 PYTHON_VERSION="" 684 fi 685 686 # 687 # Check for Python include path 688 # 689 AC_MSG_CHECKING([for Python include path]) 690 if test -z "$PYTHON_CPPFLAGS"; then 691 python_path=`$PYTHON -c "import distutils.sysconfig; \ 692 print (distutils.sysconfig.get_python_inc ());"` 693 plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ 694 print (distutils.sysconfig.get_python_inc (plat_specific=1));"` 695 if test -n "${python_path}"; then 696 if test "${plat_python_path}" != "${python_path}"; then 697 python_path="-I$python_path -I$plat_python_path" 698 else 699 python_path="-I$python_path" 700 fi 701 fi 702 PYTHON_CPPFLAGS=$python_path 703 fi 704 AC_MSG_RESULT([$PYTHON_CPPFLAGS]) 705 AC_SUBST([PYTHON_CPPFLAGS]) 706 707 # 708 # Check for Python library path 709 # 710 AC_MSG_CHECKING([for Python library path]) 711 if test -z "$PYTHON_LIBS"; then 712 # (makes two attempts to ensure we've got a version number 713 # from the interpreter) 714 ac_python_version=`cat<<EOD | $PYTHON - 715 716# join all versioning strings, on some systems 717# major/minor numbers could be in different list elements 718from distutils.sysconfig import * 719e = get_config_var('VERSION') 720if e is not None: 721 print(e) 722EOD` 723 724 if test -z "$ac_python_version"; then 725 if test -n "$PYTHON_VERSION"; then 726 ac_python_version=$PYTHON_VERSION 727 else 728 ac_python_version=`$PYTHON -c "import sys; \ 729 print (sys.version[[:3]])"` 730 fi 731 fi 732 733 # Make the versioning information available to the compiler 734 AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"], 735 [If available, contains the Python version number currently in use.]) 736 737 # First, the library directory: 738 ac_python_libdir=`cat<<EOD | $PYTHON - 739 740# There should be only one 741import distutils.sysconfig 742e = distutils.sysconfig.get_config_var('LIBDIR') 743if e is not None: 744 print (e) 745EOD` 746 747 # Now, for the library: 748 ac_python_library=`cat<<EOD | $PYTHON - 749 750import distutils.sysconfig 751c = distutils.sysconfig.get_config_vars() 752if 'LDVERSION' in c: 753 print ('python'+c[['LDVERSION']]) 754else: 755 print ('python'+c[['VERSION']]) 756EOD` 757 758 # This small piece shamelessly adapted from PostgreSQL python macro; 759 # credits goes to momjian, I think. I'd like to put the right name 760 # in the credits, if someone can point me in the right direction... ? 761 # 762 if test -n "$ac_python_libdir" -a -n "$ac_python_library" 763 then 764 # use the official shared library 765 ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"` 766 PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library" 767 else 768 # old way: use libpython from python_configdir 769 ac_python_libdir=`$PYTHON -c \ 770 "from distutils.sysconfig import get_python_lib as f; \ 771 import os; \ 772 print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"` 773 PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version" 774 fi 775 776 if test -z "PYTHON_LIBS"; then 777 AC_MSG_ERROR([ 778 Cannot determine location of your Python DSO. Please check it was installed with 779 dynamic libraries enabled, or try setting PYTHON_LIBS by hand. 780 ]) 781 fi 782 fi 783 AC_MSG_RESULT([$PYTHON_LIBS]) 784 AC_SUBST([PYTHON_LIBS]) 785 786 # 787 # Check for site packages 788 # 789 AC_MSG_CHECKING([for Python site-packages path]) 790 if test -z "$PYTHON_SITE_PKG"; then 791 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ 792 print (distutils.sysconfig.get_python_lib(0,0));"` 793 fi 794 AC_MSG_RESULT([$PYTHON_SITE_PKG]) 795 AC_SUBST([PYTHON_SITE_PKG]) 796 797 # 798 # libraries which must be linked in when embedding 799 # 800 AC_MSG_CHECKING(python extra libraries) 801 if test -z "$PYTHON_EXTRA_LIBS"; then 802 PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ 803 conf = distutils.sysconfig.get_config_var; \ 804 print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` 805 fi 806 AC_MSG_RESULT([$PYTHON_EXTRA_LIBS]) 807 AC_SUBST(PYTHON_EXTRA_LIBS) 808 809 # 810 # linking flags needed when embedding 811 # 812 AC_MSG_CHECKING(python extra linking flags) 813 if test -z "$PYTHON_EXTRA_LDFLAGS"; then 814 PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ 815 conf = distutils.sysconfig.get_config_var; \ 816 print (conf('LINKFORSHARED'))"` 817 fi 818 AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS]) 819 AC_SUBST(PYTHON_EXTRA_LDFLAGS) 820 821 # 822 # final check to see if everything compiles alright 823 # 824 AC_MSG_CHECKING([consistency of all components of python development environment]) 825 # save current global flags 826 ac_save_LIBS="$LIBS" 827 ac_save_LDFLAGS="$LDFLAGS" 828 ac_save_CPPFLAGS="$CPPFLAGS" 829 LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS" 830 LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS" 831 CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" 832 AC_LANG_PUSH([C]) 833 AC_LINK_IFELSE([ 834 AC_LANG_PROGRAM([[#include <Python.h>]], 835 [[Py_Initialize();]]) 836 ],[pythonexists=yes],[pythonexists=no]) 837 AC_LANG_POP([C]) 838 # turn back to default flags 839 CPPFLAGS="$ac_save_CPPFLAGS" 840 LIBS="$ac_save_LIBS" 841 LDFLAGS="$ac_save_LDFLAGS" 842 843 AC_MSG_RESULT([$pythonexists]) 844 845 if test ! "x$pythonexists" = "xyes"; then 846 AC_MSG_FAILURE([ 847 Could not link test program to Python. Maybe the main Python library has been 848 installed in some non-standard library path. If so, pass it to configure, 849 via the LIBS environment variable. 850 Example: ./configure LIBS="-L/usr/non-standard-path/python/lib" 851 ============================================================================ 852 ERROR! 853 You probably have to install the development version of the Python package 854 for your distribution. The exact name of this package varies among them. 855 ============================================================================ 856 ]) 857 PYTHON_VERSION="" 858 fi 859 860 # 861 # all done! 862 # 863]) 864 865# =========================================================================== 866# https://www.gnu.org/software/autoconf-archive/ax_swig_enable_cxx.html 867# =========================================================================== 868# 869# SYNOPSIS 870# 871# AX_SWIG_ENABLE_CXX 872# 873# DESCRIPTION 874# 875# Enable SWIG C++ support. This affects all invocations of $(SWIG). 876# 877# LICENSE 878# 879# Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de> 880# Copyright (c) 2008 Alan W. Irwin 881# Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net> 882# Copyright (c) 2008 Andrew Collier 883# 884# This program is free software; you can redistribute it and/or modify it 885# under the terms of the GNU General Public License as published by the 886# Free Software Foundation; either version 2 of the License, or (at your 887# option) any later version. 888# 889# This program is distributed in the hope that it will be useful, but 890# WITHOUT ANY WARRANTY; without even the implied warranty of 891# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 892# Public License for more details. 893# 894# You should have received a copy of the GNU General Public License along 895# with this program. If not, see <https://www.gnu.org/licenses/>. 896# 897# As a special exception, the respective Autoconf Macro's copyright owner 898# gives unlimited permission to copy, distribute and modify the configure 899# scripts that are the output of Autoconf when processing the Macro. You 900# need not follow the terms of the GNU General Public License when using 901# or distributing such scripts, even though portions of the text of the 902# Macro appear in them. The GNU General Public License (GPL) does govern 903# all other use of the material that constitutes the Autoconf Macro. 904# 905# This special exception to the GPL applies to versions of the Autoconf 906# Macro released by the Autoconf Archive. When you make and distribute a 907# modified version of the Autoconf Macro, you may extend this special 908# exception to the GPL to apply to your modified version as well. 909 910#serial 10 911 912AU_ALIAS([SWIG_ENABLE_CXX], [AX_SWIG_ENABLE_CXX]) 913AC_DEFUN([AX_SWIG_ENABLE_CXX],[ 914 AC_REQUIRE([AX_PKG_SWIG]) 915 AC_REQUIRE([AC_PROG_CXX]) 916 SWIG="$SWIG -c++" 917]) 918 919# =========================================================================== 920# https://www.gnu.org/software/autoconf-archive/ax_tls.html 921# =========================================================================== 922# 923# SYNOPSIS 924# 925# AX_TLS([action-if-found], [action-if-not-found]) 926# 927# DESCRIPTION 928# 929# Provides a test for the compiler support of thread local storage (TLS) 930# extensions. Defines TLS if it is found. Currently knows about C++11, 931# GCC/ICC, and MSVC. I think SunPro uses the same as GCC, and Borland 932# apparently supports either. 933# 934# LICENSE 935# 936# Copyright (c) 2008 Alan Woodland <ajw05@aber.ac.uk> 937# Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com> 938# 939# This program is free software: you can redistribute it and/or modify it 940# under the terms of the GNU General Public License as published by the 941# Free Software Foundation, either version 3 of the License, or (at your 942# option) any later version. 943# 944# This program is distributed in the hope that it will be useful, but 945# WITHOUT ANY WARRANTY; without even the implied warranty of 946# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 947# Public License for more details. 948# 949# You should have received a copy of the GNU General Public License along 950# with this program. If not, see <https://www.gnu.org/licenses/>. 951# 952# As a special exception, the respective Autoconf Macro's copyright owner 953# gives unlimited permission to copy, distribute and modify the configure 954# scripts that are the output of Autoconf when processing the Macro. You 955# need not follow the terms of the GNU General Public License when using 956# or distributing such scripts, even though portions of the text of the 957# Macro appear in them. The GNU General Public License (GPL) does govern 958# all other use of the material that constitutes the Autoconf Macro. 959# 960# This special exception to the GPL applies to versions of the Autoconf 961# Macro released by the Autoconf Archive. When you make and distribute a 962# modified version of the Autoconf Macro, you may extend this special 963# exception to the GPL to apply to your modified version as well. 964 965#serial 14 966 967AC_DEFUN([AX_TLS], [ 968 AC_MSG_CHECKING([for thread local storage (TLS) class]) 969 AC_CACHE_VAL([ac_cv_tls], 970 [for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do 971 AS_CASE([$ax_tls_keyword], 972 [none], [ac_cv_tls=none ; break], 973 [AC_TRY_COMPILE( 974 [#include <stdlib.h> 975 static void 976 foo(void) { 977 static ] $ax_tls_keyword [ int bar; 978 exit(1); 979 }], 980 [], 981 [ac_cv_tls=$ax_tls_keyword ; break], 982 ac_cv_tls=none 983 )]) 984 done 985 ]) 986 AC_MSG_RESULT([$ac_cv_tls]) 987 988 AS_IF([test "$ac_cv_tls" != "none"], 989 [AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class define it to that here]) 990 m4_ifnblank([$1],[$1])], 991 [m4_ifnblank([$2],[$2])]) 992]) 993 994dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 995dnl serial 11 (pkg-config-0.29) 996dnl 997dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 998dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 999dnl 1000dnl This program is free software; you can redistribute it and/or modify 1001dnl it under the terms of the GNU General Public License as published by 1002dnl the Free Software Foundation; either version 2 of the License, or 1003dnl (at your option) any later version. 1004dnl 1005dnl This program is distributed in the hope that it will be useful, but 1006dnl WITHOUT ANY WARRANTY; without even the implied warranty of 1007dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1008dnl General Public License for more details. 1009dnl 1010dnl You should have received a copy of the GNU General Public License 1011dnl along with this program; if not, write to the Free Software 1012dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 1013dnl 02111-1307, USA. 1014dnl 1015dnl As a special exception to the GNU General Public License, if you 1016dnl distribute this file as part of a program that contains a 1017dnl configuration script generated by Autoconf, you may include it under 1018dnl the same distribution terms that you use for the rest of that 1019dnl program. 1020 1021dnl PKG_PREREQ(MIN-VERSION) 1022dnl ----------------------- 1023dnl Since: 0.29 1024dnl 1025dnl Verify that the version of the pkg-config macros are at least 1026dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 1027dnl installed version of pkg-config, this checks the developer's version 1028dnl of pkg.m4 when generating configure. 1029dnl 1030dnl To ensure that this macro is defined, also add: 1031dnl m4_ifndef([PKG_PREREQ], 1032dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 1033dnl 1034dnl See the "Since" comment for each macro you use to see what version 1035dnl of the macros you require. 1036m4_defun([PKG_PREREQ], 1037[m4_define([PKG_MACROS_VERSION], [0.29]) 1038m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 1039 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 1040])dnl PKG_PREREQ 1041 1042dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 1043dnl ---------------------------------- 1044dnl Since: 0.16 1045dnl 1046dnl Search for the pkg-config tool and set the PKG_CONFIG variable to 1047dnl first found in the path. Checks that the version of pkg-config found 1048dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 1049dnl used since that's the first version where most current features of 1050dnl pkg-config existed. 1051AC_DEFUN([PKG_PROG_PKG_CONFIG], 1052[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 1053m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 1054m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 1055AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 1056AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 1057AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1058 1059if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 1060 AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 1061fi 1062if test -n "$PKG_CONFIG"; then 1063 _pkg_min_version=m4_default([$1], [0.9.0]) 1064 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 1065 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 1066 AC_MSG_RESULT([yes]) 1067 else 1068 AC_MSG_RESULT([no]) 1069 PKG_CONFIG="" 1070 fi 1071fi[]dnl 1072])dnl PKG_PROG_PKG_CONFIG 1073 1074dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1075dnl ------------------------------------------------------------------- 1076dnl Since: 0.18 1077dnl 1078dnl Check to see whether a particular set of modules exists. Similar to 1079dnl PKG_CHECK_MODULES(), but does not set variables or print errors. 1080dnl 1081dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1082dnl only at the first occurence in configure.ac, so if the first place 1083dnl it's called might be skipped (such as if it is within an "if", you 1084dnl have to call PKG_CHECK_EXISTS manually 1085AC_DEFUN([PKG_CHECK_EXISTS], 1086[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1087if test -n "$PKG_CONFIG" && \ 1088 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 1089 m4_default([$2], [:]) 1090m4_ifvaln([$3], [else 1091 $3])dnl 1092fi]) 1093 1094dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 1095dnl --------------------------------------------- 1096dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 1097dnl pkg_failed based on the result. 1098m4_define([_PKG_CONFIG], 1099[if test -n "$$1"; then 1100 pkg_cv_[]$1="$$1" 1101 elif test -n "$PKG_CONFIG"; then 1102 PKG_CHECK_EXISTS([$3], 1103 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 1104 test "x$?" != "x0" && pkg_failed=yes ], 1105 [pkg_failed=yes]) 1106 else 1107 pkg_failed=untried 1108fi[]dnl 1109])dnl _PKG_CONFIG 1110 1111dnl _PKG_SHORT_ERRORS_SUPPORTED 1112dnl --------------------------- 1113dnl Internal check to see if pkg-config supports short errors. 1114AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1115[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1116if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1117 _pkg_short_errors_supported=yes 1118else 1119 _pkg_short_errors_supported=no 1120fi[]dnl 1121])dnl _PKG_SHORT_ERRORS_SUPPORTED 1122 1123 1124dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1125dnl [ACTION-IF-NOT-FOUND]) 1126dnl -------------------------------------------------------------- 1127dnl Since: 0.4.0 1128dnl 1129dnl Note that if there is a possibility the first call to 1130dnl PKG_CHECK_MODULES might not happen, you should be sure to include an 1131dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1132AC_DEFUN([PKG_CHECK_MODULES], 1133[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1134AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1135AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1136 1137pkg_failed=no 1138AC_MSG_CHECKING([for $1]) 1139 1140_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1141_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1142 1143m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1144and $1[]_LIBS to avoid the need to call pkg-config. 1145See the pkg-config man page for more details.]) 1146 1147if test $pkg_failed = yes; then 1148 AC_MSG_RESULT([no]) 1149 _PKG_SHORT_ERRORS_SUPPORTED 1150 if test $_pkg_short_errors_supported = yes; then 1151 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1152 else 1153 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1154 fi 1155 # Put the nasty error message in config.log where it belongs 1156 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1157 1158 m4_default([$4], [AC_MSG_ERROR( 1159[Package requirements ($2) were not met: 1160 1161$$1_PKG_ERRORS 1162 1163Consider adjusting the PKG_CONFIG_PATH environment variable if you 1164installed software in a non-standard prefix. 1165 1166_PKG_TEXT])[]dnl 1167 ]) 1168elif test $pkg_failed = untried; then 1169 AC_MSG_RESULT([no]) 1170 m4_default([$4], [AC_MSG_FAILURE( 1171[The pkg-config script could not be found or is too old. Make sure it 1172is in your PATH or set the PKG_CONFIG environment variable to the full 1173path to pkg-config. 1174 1175_PKG_TEXT 1176 1177To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 1178 ]) 1179else 1180 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1181 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1182 AC_MSG_RESULT([yes]) 1183 $3 1184fi[]dnl 1185])dnl PKG_CHECK_MODULES 1186 1187 1188dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1189dnl [ACTION-IF-NOT-FOUND]) 1190dnl --------------------------------------------------------------------- 1191dnl Since: 0.29 1192dnl 1193dnl Checks for existence of MODULES and gathers its build flags with 1194dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 1195dnl and VARIABLE-PREFIX_LIBS from --libs. 1196dnl 1197dnl Note that if there is a possibility the first call to 1198dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 1199dnl include an explicit call to PKG_PROG_PKG_CONFIG in your 1200dnl configure.ac. 1201AC_DEFUN([PKG_CHECK_MODULES_STATIC], 1202[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1203_save_PKG_CONFIG=$PKG_CONFIG 1204PKG_CONFIG="$PKG_CONFIG --static" 1205PKG_CHECK_MODULES($@) 1206PKG_CONFIG=$_save_PKG_CONFIG[]dnl 1207])dnl PKG_CHECK_MODULES_STATIC 1208 1209 1210dnl PKG_INSTALLDIR([DIRECTORY]) 1211dnl ------------------------- 1212dnl Since: 0.27 1213dnl 1214dnl Substitutes the variable pkgconfigdir as the location where a module 1215dnl should install pkg-config .pc files. By default the directory is 1216dnl $libdir/pkgconfig, but the default can be changed by passing 1217dnl DIRECTORY. The user can override through the --with-pkgconfigdir 1218dnl parameter. 1219AC_DEFUN([PKG_INSTALLDIR], 1220[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 1221m4_pushdef([pkg_description], 1222 [pkg-config installation directory @<:@]pkg_default[@:>@]) 1223AC_ARG_WITH([pkgconfigdir], 1224 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 1225 [with_pkgconfigdir=]pkg_default) 1226AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 1227m4_popdef([pkg_default]) 1228m4_popdef([pkg_description]) 1229])dnl PKG_INSTALLDIR 1230 1231 1232dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 1233dnl -------------------------------- 1234dnl Since: 0.27 1235dnl 1236dnl Substitutes the variable noarch_pkgconfigdir as the location where a 1237dnl module should install arch-independent pkg-config .pc files. By 1238dnl default the directory is $datadir/pkgconfig, but the default can be 1239dnl changed by passing DIRECTORY. The user can override through the 1240dnl --with-noarch-pkgconfigdir parameter. 1241AC_DEFUN([PKG_NOARCH_INSTALLDIR], 1242[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 1243m4_pushdef([pkg_description], 1244 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 1245AC_ARG_WITH([noarch-pkgconfigdir], 1246 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 1247 [with_noarch_pkgconfigdir=]pkg_default) 1248AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 1249m4_popdef([pkg_default]) 1250m4_popdef([pkg_description]) 1251])dnl PKG_NOARCH_INSTALLDIR 1252 1253 1254dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 1255dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 1256dnl ------------------------------------------- 1257dnl Since: 0.28 1258dnl 1259dnl Retrieves the value of the pkg-config variable for the given module. 1260AC_DEFUN([PKG_CHECK_VAR], 1261[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1262AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1263 1264_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 1265AS_VAR_COPY([$1], [pkg_cv_][$1]) 1266 1267AS_VAR_IF([$1], [""], [$5], [$4])dnl 1268])dnl PKG_CHECK_VAR 1269 1270# Copyright (C) 2002-2018 Free Software Foundation, Inc. 1271# 1272# This file is free software; the Free Software Foundation 1273# gives unlimited permission to copy and/or distribute it, 1274# with or without modifications, as long as this notice is preserved. 1275 1276# AM_AUTOMAKE_VERSION(VERSION) 1277# ---------------------------- 1278# Automake X.Y traces this macro to ensure aclocal.m4 has been 1279# generated from the m4 files accompanying Automake X.Y. 1280# (This private macro should not be called outside this file.) 1281AC_DEFUN([AM_AUTOMAKE_VERSION], 1282[am__api_version='1.16' 1283dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1284dnl require some minimum version. Point them to the right macro. 1285m4_if([$1], [1.16.1], [], 1286 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1287]) 1288 1289# _AM_AUTOCONF_VERSION(VERSION) 1290# ----------------------------- 1291# aclocal traces this macro to find the Autoconf version. 1292# This is a private macro too. Using m4_define simplifies 1293# the logic in aclocal, which can simply ignore this definition. 1294m4_define([_AM_AUTOCONF_VERSION], []) 1295 1296# AM_SET_CURRENT_AUTOMAKE_VERSION 1297# ------------------------------- 1298# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1299# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1300AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1301[AM_AUTOMAKE_VERSION([1.16.1])dnl 1302m4_ifndef([AC_AUTOCONF_VERSION], 1303 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1304_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1305 1306# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1307 1308# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1309# 1310# This file is free software; the Free Software Foundation 1311# gives unlimited permission to copy and/or distribute it, 1312# with or without modifications, as long as this notice is preserved. 1313 1314# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1315# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 1316# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1317# 1318# Of course, Automake must honor this variable whenever it calls a 1319# tool from the auxiliary directory. The problem is that $srcdir (and 1320# therefore $ac_aux_dir as well) can be either absolute or relative, 1321# depending on how configure is run. This is pretty annoying, since 1322# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1323# source directory, any form will work fine, but in subdirectories a 1324# relative path needs to be adjusted first. 1325# 1326# $ac_aux_dir/missing 1327# fails when called from a subdirectory if $ac_aux_dir is relative 1328# $top_srcdir/$ac_aux_dir/missing 1329# fails if $ac_aux_dir is absolute, 1330# fails when called from a subdirectory in a VPATH build with 1331# a relative $ac_aux_dir 1332# 1333# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1334# are both prefixed by $srcdir. In an in-source build this is usually 1335# harmless because $srcdir is '.', but things will broke when you 1336# start a VPATH build or use an absolute $srcdir. 1337# 1338# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1339# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1340# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1341# and then we would define $MISSING as 1342# MISSING="\${SHELL} $am_aux_dir/missing" 1343# This will work as long as MISSING is not called from configure, because 1344# unfortunately $(top_srcdir) has no meaning in configure. 1345# However there are other variables, like CC, which are often used in 1346# configure, and could therefore not use this "fixed" $ac_aux_dir. 1347# 1348# Another solution, used here, is to always expand $ac_aux_dir to an 1349# absolute PATH. The drawback is that using absolute paths prevent a 1350# configured tree to be moved without reconfiguration. 1351 1352AC_DEFUN([AM_AUX_DIR_EXPAND], 1353[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1354# Expand $ac_aux_dir to an absolute path. 1355am_aux_dir=`cd "$ac_aux_dir" && pwd` 1356]) 1357 1358# AM_COND_IF -*- Autoconf -*- 1359 1360# Copyright (C) 2008-2018 Free Software Foundation, Inc. 1361# 1362# This file is free software; the Free Software Foundation 1363# gives unlimited permission to copy and/or distribute it, 1364# with or without modifications, as long as this notice is preserved. 1365 1366# _AM_COND_IF 1367# _AM_COND_ELSE 1368# _AM_COND_ENDIF 1369# -------------- 1370# These macros are only used for tracing. 1371m4_define([_AM_COND_IF]) 1372m4_define([_AM_COND_ELSE]) 1373m4_define([_AM_COND_ENDIF]) 1374 1375# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) 1376# --------------------------------------- 1377# If the shell condition COND is true, execute IF-TRUE, otherwise execute 1378# IF-FALSE. Allow automake to learn about conditional instantiating macros 1379# (the AC_CONFIG_FOOS). 1380AC_DEFUN([AM_COND_IF], 1381[m4_ifndef([_AM_COND_VALUE_$1], 1382 [m4_fatal([$0: no such condition "$1"])])dnl 1383_AM_COND_IF([$1])dnl 1384if test -z "$$1_TRUE"; then : 1385 m4_n([$2])[]dnl 1386m4_ifval([$3], 1387[_AM_COND_ELSE([$1])dnl 1388else 1389 $3 1390])dnl 1391_AM_COND_ENDIF([$1])dnl 1392fi[]dnl 1393]) 1394 1395# AM_CONDITIONAL -*- Autoconf -*- 1396 1397# Copyright (C) 1997-2018 Free Software Foundation, Inc. 1398# 1399# This file is free software; the Free Software Foundation 1400# gives unlimited permission to copy and/or distribute it, 1401# with or without modifications, as long as this notice is preserved. 1402 1403# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1404# ------------------------------------- 1405# Define a conditional. 1406AC_DEFUN([AM_CONDITIONAL], 1407[AC_PREREQ([2.52])dnl 1408 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1409 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1410AC_SUBST([$1_TRUE])dnl 1411AC_SUBST([$1_FALSE])dnl 1412_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1413_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1414m4_define([_AM_COND_VALUE_$1], [$2])dnl 1415if $2; then 1416 $1_TRUE= 1417 $1_FALSE='#' 1418else 1419 $1_TRUE='#' 1420 $1_FALSE= 1421fi 1422AC_CONFIG_COMMANDS_PRE( 1423[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1424 AC_MSG_ERROR([[conditional "$1" was never defined. 1425Usually this means the macro was only invoked conditionally.]]) 1426fi])]) 1427 1428# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1429# 1430# This file is free software; the Free Software Foundation 1431# gives unlimited permission to copy and/or distribute it, 1432# with or without modifications, as long as this notice is preserved. 1433 1434 1435# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1436# written in clear, in which case automake, when reading aclocal.m4, 1437# will think it sees a *use*, and therefore will trigger all it's 1438# C support machinery. Also note that it means that autoscan, seeing 1439# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1440 1441 1442# _AM_DEPENDENCIES(NAME) 1443# ---------------------- 1444# See how the compiler implements dependency checking. 1445# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1446# We try a few techniques and use that to set a single cache variable. 1447# 1448# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1449# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1450# dependency, and given that the user is not expected to run this macro, 1451# just rely on AC_PROG_CC. 1452AC_DEFUN([_AM_DEPENDENCIES], 1453[AC_REQUIRE([AM_SET_DEPDIR])dnl 1454AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1455AC_REQUIRE([AM_MAKE_INCLUDE])dnl 1456AC_REQUIRE([AM_DEP_TRACK])dnl 1457 1458m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1459 [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1460 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1461 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1462 [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1463 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1464 [depcc="$$1" am_compiler_list=]) 1465 1466AC_CACHE_CHECK([dependency style of $depcc], 1467 [am_cv_$1_dependencies_compiler_type], 1468[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1469 # We make a subdir and do the tests there. Otherwise we can end up 1470 # making bogus files that we don't know about and never remove. For 1471 # instance it was reported that on HP-UX the gcc test will end up 1472 # making a dummy file named 'D' -- because '-MD' means "put the output 1473 # in D". 1474 rm -rf conftest.dir 1475 mkdir conftest.dir 1476 # Copy depcomp to subdir because otherwise we won't find it if we're 1477 # using a relative directory. 1478 cp "$am_depcomp" conftest.dir 1479 cd conftest.dir 1480 # We will build objects and dependencies in a subdirectory because 1481 # it helps to detect inapplicable dependency modes. For instance 1482 # both Tru64's cc and ICC support -MD to output dependencies as a 1483 # side effect of compilation, but ICC will put the dependencies in 1484 # the current directory while Tru64 will put them in the object 1485 # directory. 1486 mkdir sub 1487 1488 am_cv_$1_dependencies_compiler_type=none 1489 if test "$am_compiler_list" = ""; then 1490 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1491 fi 1492 am__universal=false 1493 m4_case([$1], [CC], 1494 [case " $depcc " in #( 1495 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1496 esac], 1497 [CXX], 1498 [case " $depcc " in #( 1499 *\ -arch\ *\ -arch\ *) am__universal=true ;; 1500 esac]) 1501 1502 for depmode in $am_compiler_list; do 1503 # Setup a source with many dependencies, because some compilers 1504 # like to wrap large dependency lists on column 80 (with \), and 1505 # we should not choose a depcomp mode which is confused by this. 1506 # 1507 # We need to recreate these files for each test, as the compiler may 1508 # overwrite some of them when testing with obscure command lines. 1509 # This happens at least with the AIX C compiler. 1510 : > sub/conftest.c 1511 for i in 1 2 3 4 5 6; do 1512 echo '#include "conftst'$i'.h"' >> sub/conftest.c 1513 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1514 # Solaris 10 /bin/sh. 1515 echo '/* dummy */' > sub/conftst$i.h 1516 done 1517 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1518 1519 # We check with '-c' and '-o' for the sake of the "dashmstdout" 1520 # mode. It turns out that the SunPro C++ compiler does not properly 1521 # handle '-M -o', and we need to detect this. Also, some Intel 1522 # versions had trouble with output in subdirs. 1523 am__obj=sub/conftest.${OBJEXT-o} 1524 am__minus_obj="-o $am__obj" 1525 case $depmode in 1526 gcc) 1527 # This depmode causes a compiler race in universal mode. 1528 test "$am__universal" = false || continue 1529 ;; 1530 nosideeffect) 1531 # After this tag, mechanisms are not by side-effect, so they'll 1532 # only be used when explicitly requested. 1533 if test "x$enable_dependency_tracking" = xyes; then 1534 continue 1535 else 1536 break 1537 fi 1538 ;; 1539 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1540 # This compiler won't grok '-c -o', but also, the minuso test has 1541 # not run yet. These depmodes are late enough in the game, and 1542 # so weak that their functioning should not be impacted. 1543 am__obj=conftest.${OBJEXT-o} 1544 am__minus_obj= 1545 ;; 1546 none) break ;; 1547 esac 1548 if depmode=$depmode \ 1549 source=sub/conftest.c object=$am__obj \ 1550 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1551 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1552 >/dev/null 2>conftest.err && 1553 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1554 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1555 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1556 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1557 # icc doesn't choke on unknown options, it will just issue warnings 1558 # or remarks (even with -Werror). So we grep stderr for any message 1559 # that says an option was ignored or not supported. 1560 # When given -MP, icc 7.0 and 7.1 complain thusly: 1561 # icc: Command line warning: ignoring option '-M'; no argument required 1562 # The diagnosis changed in icc 8.0: 1563 # icc: Command line remark: option '-MP' not supported 1564 if (grep 'ignoring option' conftest.err || 1565 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1566 am_cv_$1_dependencies_compiler_type=$depmode 1567 break 1568 fi 1569 fi 1570 done 1571 1572 cd .. 1573 rm -rf conftest.dir 1574else 1575 am_cv_$1_dependencies_compiler_type=none 1576fi 1577]) 1578AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1579AM_CONDITIONAL([am__fastdep$1], [ 1580 test "x$enable_dependency_tracking" != xno \ 1581 && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1582]) 1583 1584 1585# AM_SET_DEPDIR 1586# ------------- 1587# Choose a directory name for dependency files. 1588# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1589AC_DEFUN([AM_SET_DEPDIR], 1590[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1591AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1592]) 1593 1594 1595# AM_DEP_TRACK 1596# ------------ 1597AC_DEFUN([AM_DEP_TRACK], 1598[AC_ARG_ENABLE([dependency-tracking], [dnl 1599AS_HELP_STRING( 1600 [--enable-dependency-tracking], 1601 [do not reject slow dependency extractors]) 1602AS_HELP_STRING( 1603 [--disable-dependency-tracking], 1604 [speeds up one-time build])]) 1605if test "x$enable_dependency_tracking" != xno; then 1606 am_depcomp="$ac_aux_dir/depcomp" 1607 AMDEPBACKSLASH='\' 1608 am__nodep='_no' 1609fi 1610AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1611AC_SUBST([AMDEPBACKSLASH])dnl 1612_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1613AC_SUBST([am__nodep])dnl 1614_AM_SUBST_NOTMAKE([am__nodep])dnl 1615]) 1616 1617# Generate code to set up dependency tracking. -*- Autoconf -*- 1618 1619# Copyright (C) 1999-2018 Free Software Foundation, Inc. 1620# 1621# This file is free software; the Free Software Foundation 1622# gives unlimited permission to copy and/or distribute it, 1623# with or without modifications, as long as this notice is preserved. 1624 1625# _AM_OUTPUT_DEPENDENCY_COMMANDS 1626# ------------------------------ 1627AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1628[{ 1629 # Older Autoconf quotes --file arguments for eval, but not when files 1630 # are listed without --file. Let's play safe and only enable the eval 1631 # if we detect the quoting. 1632 # TODO: see whether this extra hack can be removed once we start 1633 # requiring Autoconf 2.70 or later. 1634 AS_CASE([$CONFIG_FILES], 1635 [*\'*], [eval set x "$CONFIG_FILES"], 1636 [*], [set x $CONFIG_FILES]) 1637 shift 1638 # Used to flag and report bootstrapping failures. 1639 am_rc=0 1640 for am_mf 1641 do 1642 # Strip MF so we end up with the name of the file. 1643 am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 1644 # Check whether this is an Automake generated Makefile which includes 1645 # dependency-tracking related rules and includes. 1646 # Grep'ing the whole file directly is not great: AIX grep has a line 1647 # limit of 2048, but all sed's we know have understand at least 4000. 1648 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 1649 || continue 1650 am_dirpart=`AS_DIRNAME(["$am_mf"])` 1651 am_filepart=`AS_BASENAME(["$am_mf"])` 1652 AM_RUN_LOG([cd "$am_dirpart" \ 1653 && sed -e '/# am--include-marker/d' "$am_filepart" \ 1654 | $MAKE -f - am--depfiles]) || am_rc=$? 1655 done 1656 if test $am_rc -ne 0; then 1657 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 1658 for automatic dependency tracking. Try re-running configure with the 1659 '--disable-dependency-tracking' option to at least be able to build 1660 the package (albeit without support for automatic dependency tracking).]) 1661 fi 1662 AS_UNSET([am_dirpart]) 1663 AS_UNSET([am_filepart]) 1664 AS_UNSET([am_mf]) 1665 AS_UNSET([am_rc]) 1666 rm -f conftest-deps.mk 1667} 1668])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1669 1670 1671# AM_OUTPUT_DEPENDENCY_COMMANDS 1672# ----------------------------- 1673# This macro should only be invoked once -- use via AC_REQUIRE. 1674# 1675# This code is only required when automatic dependency tracking is enabled. 1676# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 1677# order to bootstrap the dependency handling code. 1678AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1679[AC_CONFIG_COMMANDS([depfiles], 1680 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1681 [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 1682 1683# Do all the work for Automake. -*- Autoconf -*- 1684 1685# Copyright (C) 1996-2018 Free Software Foundation, Inc. 1686# 1687# This file is free software; the Free Software Foundation 1688# gives unlimited permission to copy and/or distribute it, 1689# with or without modifications, as long as this notice is preserved. 1690 1691# This macro actually does too much. Some checks are only needed if 1692# your package does certain things. But this isn't really a big deal. 1693 1694dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1695m4_define([AC_PROG_CC], 1696m4_defn([AC_PROG_CC]) 1697[_AM_PROG_CC_C_O 1698]) 1699 1700# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1701# AM_INIT_AUTOMAKE([OPTIONS]) 1702# ----------------------------------------------- 1703# The call with PACKAGE and VERSION arguments is the old style 1704# call (pre autoconf-2.50), which is being phased out. PACKAGE 1705# and VERSION should now be passed to AC_INIT and removed from 1706# the call to AM_INIT_AUTOMAKE. 1707# We support both call styles for the transition. After 1708# the next Automake release, Autoconf can make the AC_INIT 1709# arguments mandatory, and then we can depend on a new Autoconf 1710# release and drop the old call support. 1711AC_DEFUN([AM_INIT_AUTOMAKE], 1712[AC_PREREQ([2.65])dnl 1713dnl Autoconf wants to disallow AM_ names. We explicitly allow 1714dnl the ones we care about. 1715m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1716AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1717AC_REQUIRE([AC_PROG_INSTALL])dnl 1718if test "`cd $srcdir && pwd`" != "`pwd`"; then 1719 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1720 # is not polluted with repeated "-I." 1721 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1722 # test to see if srcdir already configured 1723 if test -f $srcdir/config.status; then 1724 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1725 fi 1726fi 1727 1728# test whether we have cygpath 1729if test -z "$CYGPATH_W"; then 1730 if (cygpath --version) >/dev/null 2>/dev/null; then 1731 CYGPATH_W='cygpath -w' 1732 else 1733 CYGPATH_W=echo 1734 fi 1735fi 1736AC_SUBST([CYGPATH_W]) 1737 1738# Define the identity of the package. 1739dnl Distinguish between old-style and new-style calls. 1740m4_ifval([$2], 1741[AC_DIAGNOSE([obsolete], 1742 [$0: two- and three-arguments forms are deprecated.]) 1743m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1744 AC_SUBST([PACKAGE], [$1])dnl 1745 AC_SUBST([VERSION], [$2])], 1746[_AM_SET_OPTIONS([$1])dnl 1747dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1748m4_if( 1749 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1750 [ok:ok],, 1751 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1752 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1753 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1754 1755_AM_IF_OPTION([no-define],, 1756[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1757 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1758 1759# Some tools Automake needs. 1760AC_REQUIRE([AM_SANITY_CHECK])dnl 1761AC_REQUIRE([AC_ARG_PROGRAM])dnl 1762AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1763AM_MISSING_PROG([AUTOCONF], [autoconf]) 1764AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1765AM_MISSING_PROG([AUTOHEADER], [autoheader]) 1766AM_MISSING_PROG([MAKEINFO], [makeinfo]) 1767AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1768AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1769AC_REQUIRE([AC_PROG_MKDIR_P])dnl 1770# For better backward compatibility. To be removed once Automake 1.9.x 1771# dies out for good. For more background, see: 1772# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1773# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1774AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1775# We need awk for the "check" target (and possibly the TAP driver). The 1776# system "awk" is bad on some platforms. 1777AC_REQUIRE([AC_PROG_AWK])dnl 1778AC_REQUIRE([AC_PROG_MAKE_SET])dnl 1779AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1780_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1781 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1782 [_AM_PROG_TAR([v7])])]) 1783_AM_IF_OPTION([no-dependencies],, 1784[AC_PROVIDE_IFELSE([AC_PROG_CC], 1785 [_AM_DEPENDENCIES([CC])], 1786 [m4_define([AC_PROG_CC], 1787 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1788AC_PROVIDE_IFELSE([AC_PROG_CXX], 1789 [_AM_DEPENDENCIES([CXX])], 1790 [m4_define([AC_PROG_CXX], 1791 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1792AC_PROVIDE_IFELSE([AC_PROG_OBJC], 1793 [_AM_DEPENDENCIES([OBJC])], 1794 [m4_define([AC_PROG_OBJC], 1795 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1796AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1797 [_AM_DEPENDENCIES([OBJCXX])], 1798 [m4_define([AC_PROG_OBJCXX], 1799 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1800]) 1801AC_REQUIRE([AM_SILENT_RULES])dnl 1802dnl The testsuite driver may need to know about EXEEXT, so add the 1803dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1804dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 1805AC_CONFIG_COMMANDS_PRE(dnl 1806[m4_provide_if([_AM_COMPILER_EXEEXT], 1807 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1808 1809# POSIX will say in a future version that running "rm -f" with no argument 1810# is OK; and we want to be able to make that assumption in our Makefile 1811# recipes. So use an aggressive probe to check that the usage we want is 1812# actually supported "in the wild" to an acceptable degree. 1813# See automake bug#10828. 1814# To make any issue more visible, cause the running configure to be aborted 1815# by default if the 'rm' program in use doesn't match our expectations; the 1816# user can still override this though. 1817if rm -f && rm -fr && rm -rf; then : OK; else 1818 cat >&2 <<'END' 1819Oops! 1820 1821Your 'rm' program seems unable to run without file operands specified 1822on the command line, even when the '-f' option is present. This is contrary 1823to the behaviour of most rm programs out there, and not conforming with 1824the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 1825 1826Please tell bug-automake@gnu.org about your system, including the value 1827of your $PATH and any error possibly output before this message. This 1828can help us improve future automake versions. 1829 1830END 1831 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1832 echo 'Configuration will proceed anyway, since you have set the' >&2 1833 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1834 echo >&2 1835 else 1836 cat >&2 <<'END' 1837Aborting the configuration process, to ensure you take notice of the issue. 1838 1839You can download and install GNU coreutils to get an 'rm' implementation 1840that behaves properly: <https://www.gnu.org/software/coreutils/>. 1841 1842If you want to complete the configuration process using your problematic 1843'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1844to "yes", and re-run configure. 1845 1846END 1847 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1848 fi 1849fi 1850dnl The trailing newline in this macro's definition is deliberate, for 1851dnl backward compatibility and to allow trailing 'dnl'-style comments 1852dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1853]) 1854 1855dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1856dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1857dnl mangled by Autoconf and run in a shell conditional statement. 1858m4_define([_AC_COMPILER_EXEEXT], 1859m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1860 1861# When config.status generates a header, we must update the stamp-h file. 1862# This file resides in the same directory as the config header 1863# that is generated. The stamp files are numbered to have different names. 1864 1865# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1866# loop where config.status creates the headers, so we can generate 1867# our stamp files there. 1868AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1869[# Compute $1's index in $config_headers. 1870_am_arg=$1 1871_am_stamp_count=1 1872for _am_header in $config_headers :; do 1873 case $_am_header in 1874 $_am_arg | $_am_arg:* ) 1875 break ;; 1876 * ) 1877 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1878 esac 1879done 1880echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1881 1882# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1883# 1884# This file is free software; the Free Software Foundation 1885# gives unlimited permission to copy and/or distribute it, 1886# with or without modifications, as long as this notice is preserved. 1887 1888# AM_PROG_INSTALL_SH 1889# ------------------ 1890# Define $install_sh. 1891AC_DEFUN([AM_PROG_INSTALL_SH], 1892[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1893if test x"${install_sh+set}" != xset; then 1894 case $am_aux_dir in 1895 *\ * | *\ *) 1896 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1897 *) 1898 install_sh="\${SHELL} $am_aux_dir/install-sh" 1899 esac 1900fi 1901AC_SUBST([install_sh])]) 1902 1903# Copyright (C) 2003-2018 Free Software Foundation, Inc. 1904# 1905# This file is free software; the Free Software Foundation 1906# gives unlimited permission to copy and/or distribute it, 1907# with or without modifications, as long as this notice is preserved. 1908 1909# Check whether the underlying file-system supports filenames 1910# with a leading dot. For instance MS-DOS doesn't. 1911AC_DEFUN([AM_SET_LEADING_DOT], 1912[rm -rf .tst 2>/dev/null 1913mkdir .tst 2>/dev/null 1914if test -d .tst; then 1915 am__leading_dot=. 1916else 1917 am__leading_dot=_ 1918fi 1919rmdir .tst 2>/dev/null 1920AC_SUBST([am__leading_dot])]) 1921 1922# Copyright (C) 1998-2018 Free Software Foundation, Inc. 1923# 1924# This file is free software; the Free Software Foundation 1925# gives unlimited permission to copy and/or distribute it, 1926# with or without modifications, as long as this notice is preserved. 1927 1928# AM_PROG_LEX 1929# ----------- 1930# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a 1931# "missing" invocation, for better error output. 1932AC_DEFUN([AM_PROG_LEX], 1933[AC_PREREQ([2.50])dnl 1934AC_REQUIRE([AM_MISSING_HAS_RUN])dnl 1935AC_REQUIRE([AC_PROG_LEX])dnl 1936if test "$LEX" = :; then 1937 LEX=${am_missing_run}flex 1938fi]) 1939 1940# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1941# From Jim Meyering 1942 1943# Copyright (C) 1996-2018 Free Software Foundation, Inc. 1944# 1945# This file is free software; the Free Software Foundation 1946# gives unlimited permission to copy and/or distribute it, 1947# with or without modifications, as long as this notice is preserved. 1948 1949# AM_MAINTAINER_MODE([DEFAULT-MODE]) 1950# ---------------------------------- 1951# Control maintainer-specific portions of Makefiles. 1952# Default is to disable them, unless 'enable' is passed literally. 1953# For symmetry, 'disable' may be passed as well. Anyway, the user 1954# can override the default with the --enable/--disable switch. 1955AC_DEFUN([AM_MAINTAINER_MODE], 1956[m4_case(m4_default([$1], [disable]), 1957 [enable], [m4_define([am_maintainer_other], [disable])], 1958 [disable], [m4_define([am_maintainer_other], [enable])], 1959 [m4_define([am_maintainer_other], [enable]) 1960 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 1961AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1962 dnl maintainer-mode's default is 'disable' unless 'enable' is passed 1963 AC_ARG_ENABLE([maintainer-mode], 1964 [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 1965 am_maintainer_other[ make rules and dependencies not useful 1966 (and sometimes confusing) to the casual installer])], 1967 [USE_MAINTAINER_MODE=$enableval], 1968 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 1969 AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1970 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 1971 MAINT=$MAINTAINER_MODE_TRUE 1972 AC_SUBST([MAINT])dnl 1973] 1974) 1975 1976# Check to see how 'make' treats includes. -*- Autoconf -*- 1977 1978# Copyright (C) 2001-2018 Free Software Foundation, Inc. 1979# 1980# This file is free software; the Free Software Foundation 1981# gives unlimited permission to copy and/or distribute it, 1982# with or without modifications, as long as this notice is preserved. 1983 1984# AM_MAKE_INCLUDE() 1985# ----------------- 1986# Check whether make has an 'include' directive that can support all 1987# the idioms we need for our automatic dependency tracking code. 1988AC_DEFUN([AM_MAKE_INCLUDE], 1989[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 1990cat > confinc.mk << 'END' 1991am__doit: 1992 @echo this is the am__doit target >confinc.out 1993.PHONY: am__doit 1994END 1995am__include="#" 1996am__quote= 1997# BSD make does it like this. 1998echo '.include "confinc.mk" # ignored' > confmf.BSD 1999# Other make implementations (GNU, Solaris 10, AIX) do it like this. 2000echo 'include confinc.mk # ignored' > confmf.GNU 2001_am_result=no 2002for s in GNU BSD; do 2003 AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 2004 AS_CASE([$?:`cat confinc.out 2>/dev/null`], 2005 ['0:this is the am__doit target'], 2006 [AS_CASE([$s], 2007 [BSD], [am__include='.include' am__quote='"'], 2008 [am__include='include' am__quote=''])]) 2009 if test "$am__include" != "#"; then 2010 _am_result="yes ($s style)" 2011 break 2012 fi 2013done 2014rm -f confinc.* confmf.* 2015AC_MSG_RESULT([${_am_result}]) 2016AC_SUBST([am__include])]) 2017AC_SUBST([am__quote])]) 2018 2019# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 2020 2021# Copyright (C) 1997-2018 Free Software Foundation, Inc. 2022# 2023# This file is free software; the Free Software Foundation 2024# gives unlimited permission to copy and/or distribute it, 2025# with or without modifications, as long as this notice is preserved. 2026 2027# AM_MISSING_PROG(NAME, PROGRAM) 2028# ------------------------------ 2029AC_DEFUN([AM_MISSING_PROG], 2030[AC_REQUIRE([AM_MISSING_HAS_RUN]) 2031$1=${$1-"${am_missing_run}$2"} 2032AC_SUBST($1)]) 2033 2034# AM_MISSING_HAS_RUN 2035# ------------------ 2036# Define MISSING if not defined so far and test if it is modern enough. 2037# If it is, set am_missing_run to use it, otherwise, to nothing. 2038AC_DEFUN([AM_MISSING_HAS_RUN], 2039[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2040AC_REQUIRE_AUX_FILE([missing])dnl 2041if test x"${MISSING+set}" != xset; then 2042 case $am_aux_dir in 2043 *\ * | *\ *) 2044 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 2045 *) 2046 MISSING="\${SHELL} $am_aux_dir/missing" ;; 2047 esac 2048fi 2049# Use eval to expand $SHELL 2050if eval "$MISSING --is-lightweight"; then 2051 am_missing_run="$MISSING " 2052else 2053 am_missing_run= 2054 AC_MSG_WARN(['missing' script is too old or missing]) 2055fi 2056]) 2057 2058# Helper functions for option handling. -*- Autoconf -*- 2059 2060# Copyright (C) 2001-2018 Free Software Foundation, Inc. 2061# 2062# This file is free software; the Free Software Foundation 2063# gives unlimited permission to copy and/or distribute it, 2064# with or without modifications, as long as this notice is preserved. 2065 2066# _AM_MANGLE_OPTION(NAME) 2067# ----------------------- 2068AC_DEFUN([_AM_MANGLE_OPTION], 2069[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 2070 2071# _AM_SET_OPTION(NAME) 2072# -------------------- 2073# Set option NAME. Presently that only means defining a flag for this option. 2074AC_DEFUN([_AM_SET_OPTION], 2075[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 2076 2077# _AM_SET_OPTIONS(OPTIONS) 2078# ------------------------ 2079# OPTIONS is a space-separated list of Automake options. 2080AC_DEFUN([_AM_SET_OPTIONS], 2081[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 2082 2083# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 2084# ------------------------------------------- 2085# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 2086AC_DEFUN([_AM_IF_OPTION], 2087[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 2088 2089# Copyright (C) 1999-2018 Free Software Foundation, Inc. 2090# 2091# This file is free software; the Free Software Foundation 2092# gives unlimited permission to copy and/or distribute it, 2093# with or without modifications, as long as this notice is preserved. 2094 2095# _AM_PROG_CC_C_O 2096# --------------- 2097# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 2098# to automatically call this. 2099AC_DEFUN([_AM_PROG_CC_C_O], 2100[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 2101AC_REQUIRE_AUX_FILE([compile])dnl 2102AC_LANG_PUSH([C])dnl 2103AC_CACHE_CHECK( 2104 [whether $CC understands -c and -o together], 2105 [am_cv_prog_cc_c_o], 2106 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 2107 # Make sure it works both with $CC and with simple cc. 2108 # Following AC_PROG_CC_C_O, we do the test twice because some 2109 # compilers refuse to overwrite an existing .o file with -o, 2110 # though they will create one. 2111 am_cv_prog_cc_c_o=yes 2112 for am_i in 1 2; do 2113 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 2114 && test -f conftest2.$ac_objext; then 2115 : OK 2116 else 2117 am_cv_prog_cc_c_o=no 2118 break 2119 fi 2120 done 2121 rm -f core conftest* 2122 unset am_i]) 2123if test "$am_cv_prog_cc_c_o" != yes; then 2124 # Losing compiler, so override with the script. 2125 # FIXME: It is wrong to rewrite CC. 2126 # But if we don't then we get into trouble of one sort or another. 2127 # A longer-term fix would be to have automake use am__CC in this case, 2128 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 2129 CC="$am_aux_dir/compile $CC" 2130fi 2131AC_LANG_POP([C])]) 2132 2133# For backward compatibility. 2134AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 2135 2136# Copyright (C) 1999-2018 Free Software Foundation, Inc. 2137# 2138# This file is free software; the Free Software Foundation 2139# gives unlimited permission to copy and/or distribute it, 2140# with or without modifications, as long as this notice is preserved. 2141 2142 2143# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2144# --------------------------------------------------------------------------- 2145# Adds support for distributing Python modules and packages. To 2146# install modules, copy them to $(pythondir), using the python_PYTHON 2147# automake variable. To install a package with the same name as the 2148# automake package, install to $(pkgpythondir), or use the 2149# pkgpython_PYTHON automake variable. 2150# 2151# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as 2152# locations to install python extension modules (shared libraries). 2153# Another macro is required to find the appropriate flags to compile 2154# extension modules. 2155# 2156# If your package is configured with a different prefix to python, 2157# users will have to add the install directory to the PYTHONPATH 2158# environment variable, or create a .pth file (see the python 2159# documentation for details). 2160# 2161# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will 2162# cause an error if the version of python installed on the system 2163# doesn't meet the requirement. MINIMUM-VERSION should consist of 2164# numbers and dots only. 2165AC_DEFUN([AM_PATH_PYTHON], 2166 [ 2167 dnl Find a Python interpreter. Python versions prior to 2.0 are not 2168 dnl supported. (2.0 was released on October 16, 2000). 2169 m4_define_default([_AM_PYTHON_INTERPRETER_LIST], 2170[python python2 python3 dnl 2171 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl 2172 python3.2 python3.1 python3.0 dnl 2173 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl 2174 python2.0]) 2175 2176 AC_ARG_VAR([PYTHON], [the Python interpreter]) 2177 2178 m4_if([$1],[],[ 2179 dnl No version check is needed. 2180 # Find any Python interpreter. 2181 if test -z "$PYTHON"; then 2182 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) 2183 fi 2184 am_display_PYTHON=python 2185 ], [ 2186 dnl A version check is needed. 2187 if test -n "$PYTHON"; then 2188 # If the user set $PYTHON, use it and don't search something else. 2189 AC_MSG_CHECKING([whether $PYTHON version is >= $1]) 2190 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], 2191 [AC_MSG_RESULT([yes])], 2192 [AC_MSG_RESULT([no]) 2193 AC_MSG_ERROR([Python interpreter is too old])]) 2194 am_display_PYTHON=$PYTHON 2195 else 2196 # Otherwise, try each interpreter until we find one that satisfies 2197 # VERSION. 2198 AC_CACHE_CHECK([for a Python interpreter with version >= $1], 2199 [am_cv_pathless_PYTHON],[ 2200 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do 2201 test "$am_cv_pathless_PYTHON" = none && break 2202 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) 2203 done]) 2204 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. 2205 if test "$am_cv_pathless_PYTHON" = none; then 2206 PYTHON=: 2207 else 2208 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) 2209 fi 2210 am_display_PYTHON=$am_cv_pathless_PYTHON 2211 fi 2212 ]) 2213 2214 if test "$PYTHON" = :; then 2215 dnl Run any user-specified action, or abort. 2216 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) 2217 else 2218 2219 dnl Query Python for its version number. Getting [:3] seems to be 2220 dnl the best way to do this; it's what "site.py" does in the standard 2221 dnl library. 2222 2223 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], 2224 [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) 2225 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) 2226 2227 dnl Use the values of $prefix and $exec_prefix for the corresponding 2228 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made 2229 dnl distinct variables so they can be overridden if need be. However, 2230 dnl general consensus is that you shouldn't need this ability. 2231 2232 AC_SUBST([PYTHON_PREFIX], ['${prefix}']) 2233 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) 2234 2235 dnl At times (like when building shared libraries) you may want 2236 dnl to know which OS platform Python thinks this is. 2237 2238 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], 2239 [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) 2240 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) 2241 2242 # Just factor out some code duplication. 2243 am_python_setup_sysconfig="\ 2244import sys 2245# Prefer sysconfig over distutils.sysconfig, for better compatibility 2246# with python 3.x. See automake bug#10227. 2247try: 2248 import sysconfig 2249except ImportError: 2250 can_use_sysconfig = 0 2251else: 2252 can_use_sysconfig = 1 2253# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: 2254# <https://github.com/pypa/virtualenv/issues/118> 2255try: 2256 from platform import python_implementation 2257 if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': 2258 can_use_sysconfig = 0 2259except ImportError: 2260 pass" 2261 2262 dnl Set up 4 directories: 2263 2264 dnl pythondir -- where to install python scripts. This is the 2265 dnl site-packages directory, not the python standard library 2266 dnl directory like in previous automake betas. This behavior 2267 dnl is more consistent with lispdir.m4 for example. 2268 dnl Query distutils for this directory. 2269 AC_CACHE_CHECK([for $am_display_PYTHON script directory], 2270 [am_cv_python_pythondir], 2271 [if test "x$prefix" = xNONE 2272 then 2273 am_py_prefix=$ac_default_prefix 2274 else 2275 am_py_prefix=$prefix 2276 fi 2277 am_cv_python_pythondir=`$PYTHON -c " 2278$am_python_setup_sysconfig 2279if can_use_sysconfig: 2280 sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) 2281else: 2282 from distutils import sysconfig 2283 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') 2284sys.stdout.write(sitedir)"` 2285 case $am_cv_python_pythondir in 2286 $am_py_prefix*) 2287 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` 2288 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` 2289 ;; 2290 *) 2291 case $am_py_prefix in 2292 /usr|/System*) ;; 2293 *) 2294 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages 2295 ;; 2296 esac 2297 ;; 2298 esac 2299 ]) 2300 AC_SUBST([pythondir], [$am_cv_python_pythondir]) 2301 2302 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was 2303 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is 2304 dnl more consistent with the rest of automake. 2305 2306 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) 2307 2308 dnl pyexecdir -- directory for installing python extension modules 2309 dnl (shared libraries) 2310 dnl Query distutils for this directory. 2311 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], 2312 [am_cv_python_pyexecdir], 2313 [if test "x$exec_prefix" = xNONE 2314 then 2315 am_py_exec_prefix=$am_py_prefix 2316 else 2317 am_py_exec_prefix=$exec_prefix 2318 fi 2319 am_cv_python_pyexecdir=`$PYTHON -c " 2320$am_python_setup_sysconfig 2321if can_use_sysconfig: 2322 sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) 2323else: 2324 from distutils import sysconfig 2325 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') 2326sys.stdout.write(sitedir)"` 2327 case $am_cv_python_pyexecdir in 2328 $am_py_exec_prefix*) 2329 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` 2330 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` 2331 ;; 2332 *) 2333 case $am_py_exec_prefix in 2334 /usr|/System*) ;; 2335 *) 2336 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages 2337 ;; 2338 esac 2339 ;; 2340 esac 2341 ]) 2342 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) 2343 2344 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) 2345 2346 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) 2347 2348 dnl Run any user-specified action. 2349 $2 2350 fi 2351 2352]) 2353 2354 2355# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) 2356# --------------------------------------------------------------------------- 2357# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. 2358# Run ACTION-IF-FALSE otherwise. 2359# This test uses sys.hexversion instead of the string equivalent (first 2360# word of sys.version), in order to cope with versions such as 2.2c1. 2361# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). 2362AC_DEFUN([AM_PYTHON_CHECK_VERSION], 2363 [prog="import sys 2364# split strings by '.' and convert to numeric. Append some zeros 2365# because we need at least 4 digits for the hex conversion. 2366# map returns an iterator in Python 3.0 and a list in 2.x 2367minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] 2368minverhex = 0 2369# xrange is not present in Python 3.0 and range returns an iterator 2370for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] 2371sys.exit(sys.hexversion < minverhex)" 2372 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) 2373 2374# Copyright (C) 2001-2018 Free Software Foundation, Inc. 2375# 2376# This file is free software; the Free Software Foundation 2377# gives unlimited permission to copy and/or distribute it, 2378# with or without modifications, as long as this notice is preserved. 2379 2380# AM_RUN_LOG(COMMAND) 2381# ------------------- 2382# Run COMMAND, save the exit status in ac_status, and log it. 2383# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 2384AC_DEFUN([AM_RUN_LOG], 2385[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 2386 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 2387 ac_status=$? 2388 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2389 (exit $ac_status); }]) 2390 2391# Check to make sure that the build environment is sane. -*- Autoconf -*- 2392 2393# Copyright (C) 1996-2018 Free Software Foundation, Inc. 2394# 2395# This file is free software; the Free Software Foundation 2396# gives unlimited permission to copy and/or distribute it, 2397# with or without modifications, as long as this notice is preserved. 2398 2399# AM_SANITY_CHECK 2400# --------------- 2401AC_DEFUN([AM_SANITY_CHECK], 2402[AC_MSG_CHECKING([whether build environment is sane]) 2403# Reject unsafe characters in $srcdir or the absolute working directory 2404# name. Accept space and tab only in the latter. 2405am_lf=' 2406' 2407case `pwd` in 2408 *[[\\\"\#\$\&\'\`$am_lf]]*) 2409 AC_MSG_ERROR([unsafe absolute working directory name]);; 2410esac 2411case $srcdir in 2412 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 2413 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 2414esac 2415 2416# Do 'set' in a subshell so we don't clobber the current shell's 2417# arguments. Must try -L first in case configure is actually a 2418# symlink; some systems play weird games with the mod time of symlinks 2419# (eg FreeBSD returns the mod time of the symlink's containing 2420# directory). 2421if ( 2422 am_has_slept=no 2423 for am_try in 1 2; do 2424 echo "timestamp, slept: $am_has_slept" > conftest.file 2425 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 2426 if test "$[*]" = "X"; then 2427 # -L didn't work. 2428 set X `ls -t "$srcdir/configure" conftest.file` 2429 fi 2430 if test "$[*]" != "X $srcdir/configure conftest.file" \ 2431 && test "$[*]" != "X conftest.file $srcdir/configure"; then 2432 2433 # If neither matched, then we have a broken ls. This can happen 2434 # if, for instance, CONFIG_SHELL is bash and it inherits a 2435 # broken ls alias from the environment. This has actually 2436 # happened. Such a system could not be considered "sane". 2437 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 2438 alias in your environment]) 2439 fi 2440 if test "$[2]" = conftest.file || test $am_try -eq 2; then 2441 break 2442 fi 2443 # Just in case. 2444 sleep 1 2445 am_has_slept=yes 2446 done 2447 test "$[2]" = conftest.file 2448 ) 2449then 2450 # Ok. 2451 : 2452else 2453 AC_MSG_ERROR([newly created file is older than distributed files! 2454Check your system clock]) 2455fi 2456AC_MSG_RESULT([yes]) 2457# If we didn't sleep, we still need to ensure time stamps of config.status and 2458# generated files are strictly newer. 2459am_sleep_pid= 2460if grep 'slept: no' conftest.file >/dev/null 2>&1; then 2461 ( sleep 1 ) & 2462 am_sleep_pid=$! 2463fi 2464AC_CONFIG_COMMANDS_PRE( 2465 [AC_MSG_CHECKING([that generated files are newer than configure]) 2466 if test -n "$am_sleep_pid"; then 2467 # Hide warnings about reused PIDs. 2468 wait $am_sleep_pid 2>/dev/null 2469 fi 2470 AC_MSG_RESULT([done])]) 2471rm -f conftest.file 2472]) 2473 2474# Copyright (C) 2009-2018 Free Software Foundation, Inc. 2475# 2476# This file is free software; the Free Software Foundation 2477# gives unlimited permission to copy and/or distribute it, 2478# with or without modifications, as long as this notice is preserved. 2479 2480# AM_SILENT_RULES([DEFAULT]) 2481# -------------------------- 2482# Enable less verbose build rules; with the default set to DEFAULT 2483# ("yes" being less verbose, "no" or empty being verbose). 2484AC_DEFUN([AM_SILENT_RULES], 2485[AC_ARG_ENABLE([silent-rules], [dnl 2486AS_HELP_STRING( 2487 [--enable-silent-rules], 2488 [less verbose build output (undo: "make V=1")]) 2489AS_HELP_STRING( 2490 [--disable-silent-rules], 2491 [verbose build output (undo: "make V=0")])dnl 2492]) 2493case $enable_silent_rules in @%:@ ((( 2494 yes) AM_DEFAULT_VERBOSITY=0;; 2495 no) AM_DEFAULT_VERBOSITY=1;; 2496 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 2497esac 2498dnl 2499dnl A few 'make' implementations (e.g., NonStop OS and NextStep) 2500dnl do not support nested variable expansions. 2501dnl See automake bug#9928 and bug#10237. 2502am_make=${MAKE-make} 2503AC_CACHE_CHECK([whether $am_make supports nested variables], 2504 [am_cv_make_support_nested_variables], 2505 [if AS_ECHO([['TRUE=$(BAR$(V)) 2506BAR0=false 2507BAR1=true 2508V=1 2509am__doit: 2510 @$(TRUE) 2511.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 2512 am_cv_make_support_nested_variables=yes 2513else 2514 am_cv_make_support_nested_variables=no 2515fi]) 2516if test $am_cv_make_support_nested_variables = yes; then 2517 dnl Using '$V' instead of '$(V)' breaks IRIX make. 2518 AM_V='$(V)' 2519 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 2520else 2521 AM_V=$AM_DEFAULT_VERBOSITY 2522 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 2523fi 2524AC_SUBST([AM_V])dnl 2525AM_SUBST_NOTMAKE([AM_V])dnl 2526AC_SUBST([AM_DEFAULT_V])dnl 2527AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 2528AC_SUBST([AM_DEFAULT_VERBOSITY])dnl 2529AM_BACKSLASH='\' 2530AC_SUBST([AM_BACKSLASH])dnl 2531_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 2532]) 2533 2534# Copyright (C) 2001-2018 Free Software Foundation, Inc. 2535# 2536# This file is free software; the Free Software Foundation 2537# gives unlimited permission to copy and/or distribute it, 2538# with or without modifications, as long as this notice is preserved. 2539 2540# AM_PROG_INSTALL_STRIP 2541# --------------------- 2542# One issue with vendor 'install' (even GNU) is that you can't 2543# specify the program used to strip binaries. This is especially 2544# annoying in cross-compiling environments, where the build's strip 2545# is unlikely to handle the host's binaries. 2546# Fortunately install-sh will honor a STRIPPROG variable, so we 2547# always use install-sh in "make install-strip", and initialize 2548# STRIPPROG with the value of the STRIP variable (set by the user). 2549AC_DEFUN([AM_PROG_INSTALL_STRIP], 2550[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 2551# Installed binaries are usually stripped using 'strip' when the user 2552# run "make install-strip". However 'strip' might not be the right 2553# tool to use in cross-compilation environments, therefore Automake 2554# will honor the 'STRIP' environment variable to overrule this program. 2555dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 2556if test "$cross_compiling" != no; then 2557 AC_CHECK_TOOL([STRIP], [strip], :) 2558fi 2559INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 2560AC_SUBST([INSTALL_STRIP_PROGRAM])]) 2561 2562# Copyright (C) 2006-2018 Free Software Foundation, Inc. 2563# 2564# This file is free software; the Free Software Foundation 2565# gives unlimited permission to copy and/or distribute it, 2566# with or without modifications, as long as this notice is preserved. 2567 2568# _AM_SUBST_NOTMAKE(VARIABLE) 2569# --------------------------- 2570# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 2571# This macro is traced by Automake. 2572AC_DEFUN([_AM_SUBST_NOTMAKE]) 2573 2574# AM_SUBST_NOTMAKE(VARIABLE) 2575# -------------------------- 2576# Public sister of _AM_SUBST_NOTMAKE. 2577AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 2578 2579# Check how to create a tarball. -*- Autoconf -*- 2580 2581# Copyright (C) 2004-2018 Free Software Foundation, Inc. 2582# 2583# This file is free software; the Free Software Foundation 2584# gives unlimited permission to copy and/or distribute it, 2585# with or without modifications, as long as this notice is preserved. 2586 2587# _AM_PROG_TAR(FORMAT) 2588# -------------------- 2589# Check how to create a tarball in format FORMAT. 2590# FORMAT should be one of 'v7', 'ustar', or 'pax'. 2591# 2592# Substitute a variable $(am__tar) that is a command 2593# writing to stdout a FORMAT-tarball containing the directory 2594# $tardir. 2595# tardir=directory && $(am__tar) > result.tar 2596# 2597# Substitute a variable $(am__untar) that extract such 2598# a tarball read from stdin. 2599# $(am__untar) < result.tar 2600# 2601AC_DEFUN([_AM_PROG_TAR], 2602[# Always define AMTAR for backward compatibility. Yes, it's still used 2603# in the wild :-( We should find a proper way to deprecate it ... 2604AC_SUBST([AMTAR], ['$${TAR-tar}']) 2605 2606# We'll loop over all known methods to create a tar archive until one works. 2607_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 2608 2609m4_if([$1], [v7], 2610 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 2611 2612 [m4_case([$1], 2613 [ustar], 2614 [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 2615 # There is notably a 21 bits limit for the UID and the GID. In fact, 2616 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 2617 # and bug#13588). 2618 am_max_uid=2097151 # 2^21 - 1 2619 am_max_gid=$am_max_uid 2620 # The $UID and $GID variables are not portable, so we need to resort 2621 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 2622 # below are definitely unexpected, so allow the users to see them 2623 # (that is, avoid stderr redirection). 2624 am_uid=`id -u || echo unknown` 2625 am_gid=`id -g || echo unknown` 2626 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 2627 if test $am_uid -le $am_max_uid; then 2628 AC_MSG_RESULT([yes]) 2629 else 2630 AC_MSG_RESULT([no]) 2631 _am_tools=none 2632 fi 2633 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 2634 if test $am_gid -le $am_max_gid; then 2635 AC_MSG_RESULT([yes]) 2636 else 2637 AC_MSG_RESULT([no]) 2638 _am_tools=none 2639 fi], 2640 2641 [pax], 2642 [], 2643 2644 [m4_fatal([Unknown tar format])]) 2645 2646 AC_MSG_CHECKING([how to create a $1 tar archive]) 2647 2648 # Go ahead even if we have the value already cached. We do so because we 2649 # need to set the values for the 'am__tar' and 'am__untar' variables. 2650 _am_tools=${am_cv_prog_tar_$1-$_am_tools} 2651 2652 for _am_tool in $_am_tools; do 2653 case $_am_tool in 2654 gnutar) 2655 for _am_tar in tar gnutar gtar; do 2656 AM_RUN_LOG([$_am_tar --version]) && break 2657 done 2658 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 2659 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 2660 am__untar="$_am_tar -xf -" 2661 ;; 2662 plaintar) 2663 # Must skip GNU tar: if it does not support --format= it doesn't create 2664 # ustar tarball either. 2665 (tar --version) >/dev/null 2>&1 && continue 2666 am__tar='tar chf - "$$tardir"' 2667 am__tar_='tar chf - "$tardir"' 2668 am__untar='tar xf -' 2669 ;; 2670 pax) 2671 am__tar='pax -L -x $1 -w "$$tardir"' 2672 am__tar_='pax -L -x $1 -w "$tardir"' 2673 am__untar='pax -r' 2674 ;; 2675 cpio) 2676 am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 2677 am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 2678 am__untar='cpio -i -H $1 -d' 2679 ;; 2680 none) 2681 am__tar=false 2682 am__tar_=false 2683 am__untar=false 2684 ;; 2685 esac 2686 2687 # If the value was cached, stop now. We just wanted to have am__tar 2688 # and am__untar set. 2689 test -n "${am_cv_prog_tar_$1}" && break 2690 2691 # tar/untar a dummy directory, and stop if the command works. 2692 rm -rf conftest.dir 2693 mkdir conftest.dir 2694 echo GrepMe > conftest.dir/file 2695 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 2696 rm -rf conftest.dir 2697 if test -s conftest.tar; then 2698 AM_RUN_LOG([$am__untar <conftest.tar]) 2699 AM_RUN_LOG([cat conftest.dir/file]) 2700 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 2701 fi 2702 done 2703 rm -rf conftest.dir 2704 2705 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 2706 AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 2707 2708AC_SUBST([am__tar]) 2709AC_SUBST([am__untar]) 2710]) # _AM_PROG_TAR 2711 2712m4_include([m4/libtool.m4]) 2713m4_include([m4/ltoptions.m4]) 2714m4_include([m4/ltsugar.m4]) 2715m4_include([m4/ltversion.m4]) 2716m4_include([m4/lt~obsolete.m4]) 2717