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