aclocal.m4 revision d4401354
1d4401354Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2d4401354Smrg 3d4401354Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4d4401354Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 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 14d4401354Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15d4401354Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16d4401354Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, 17d4401354Smrg[m4_warning([this file was generated for autoconf 2.65. 18d4401354SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19d4401354SmrgIf you have problems, you may need to regenerate the build system entirely. 20d4401354SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21d4401354Smrg 22d4401354Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23d4401354Smrg# 24d4401354Smrg# This file is free software; the Free Software Foundation 25d4401354Smrg# gives unlimited permission to copy and/or distribute it, 26d4401354Smrg# with or without modifications, as long as this notice is preserved. 27d4401354Smrg 28d4401354Smrg# AM_AUTOMAKE_VERSION(VERSION) 29d4401354Smrg# ---------------------------- 30d4401354Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 31d4401354Smrg# generated from the m4 files accompanying Automake X.Y. 32d4401354Smrg# (This private macro should not be called outside this file.) 33d4401354SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 34d4401354Smrg[am__api_version='1.11' 35d4401354Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 36d4401354Smrgdnl require some minimum version. Point them to the right macro. 37d4401354Smrgm4_if([$1], [1.11], [], 38d4401354Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 39d4401354Smrg]) 40d4401354Smrg 41d4401354Smrg# _AM_AUTOCONF_VERSION(VERSION) 42d4401354Smrg# ----------------------------- 43d4401354Smrg# aclocal traces this macro to find the Autoconf version. 44d4401354Smrg# This is a private macro too. Using m4_define simplifies 45d4401354Smrg# the logic in aclocal, which can simply ignore this definition. 46d4401354Smrgm4_define([_AM_AUTOCONF_VERSION], []) 47d4401354Smrg 48d4401354Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 49d4401354Smrg# ------------------------------- 50d4401354Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 51d4401354Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 52d4401354SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53d4401354Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 54d4401354Smrgm4_ifndef([AC_AUTOCONF_VERSION], 55d4401354Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 56d4401354Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 57d4401354Smrg 58d4401354Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 59d4401354Smrg 60d4401354Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61d4401354Smrg# 62d4401354Smrg# This file is free software; the Free Software Foundation 63d4401354Smrg# gives unlimited permission to copy and/or distribute it, 64d4401354Smrg# with or without modifications, as long as this notice is preserved. 65d4401354Smrg 66d4401354Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 67d4401354Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 68d4401354Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69d4401354Smrg# 70d4401354Smrg# Of course, Automake must honor this variable whenever it calls a 71d4401354Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 72d4401354Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 73d4401354Smrg# depending on how configure is run. This is pretty annoying, since 74d4401354Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 75d4401354Smrg# source directory, any form will work fine, but in subdirectories a 76d4401354Smrg# relative path needs to be adjusted first. 77d4401354Smrg# 78d4401354Smrg# $ac_aux_dir/missing 79d4401354Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 80d4401354Smrg# $top_srcdir/$ac_aux_dir/missing 81d4401354Smrg# fails if $ac_aux_dir is absolute, 82d4401354Smrg# fails when called from a subdirectory in a VPATH build with 83d4401354Smrg# a relative $ac_aux_dir 84d4401354Smrg# 85d4401354Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 86d4401354Smrg# are both prefixed by $srcdir. In an in-source build this is usually 87d4401354Smrg# harmless because $srcdir is `.', but things will broke when you 88d4401354Smrg# start a VPATH build or use an absolute $srcdir. 89d4401354Smrg# 90d4401354Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 91d4401354Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 92d4401354Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 93d4401354Smrg# and then we would define $MISSING as 94d4401354Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 95d4401354Smrg# This will work as long as MISSING is not called from configure, because 96d4401354Smrg# unfortunately $(top_srcdir) has no meaning in configure. 97d4401354Smrg# However there are other variables, like CC, which are often used in 98d4401354Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99d4401354Smrg# 100d4401354Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 101d4401354Smrg# absolute PATH. The drawback is that using absolute paths prevent a 102d4401354Smrg# configured tree to be moved without reconfiguration. 103d4401354Smrg 104d4401354SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 105d4401354Smrg[dnl Rely on autoconf to set up CDPATH properly. 106d4401354SmrgAC_PREREQ([2.50])dnl 107d4401354Smrg# expand $ac_aux_dir to an absolute path 108d4401354Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 109d4401354Smrg]) 110d4401354Smrg 111d4401354Smrg# AM_CONDITIONAL -*- Autoconf -*- 112d4401354Smrg 113d4401354Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 114d4401354Smrg# Free Software Foundation, Inc. 115d4401354Smrg# 116d4401354Smrg# This file is free software; the Free Software Foundation 117d4401354Smrg# gives unlimited permission to copy and/or distribute it, 118d4401354Smrg# with or without modifications, as long as this notice is preserved. 119d4401354Smrg 120d4401354Smrg# serial 9 121d4401354Smrg 122d4401354Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 123d4401354Smrg# ------------------------------------- 124d4401354Smrg# Define a conditional. 125d4401354SmrgAC_DEFUN([AM_CONDITIONAL], 126d4401354Smrg[AC_PREREQ(2.52)dnl 127d4401354Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 128d4401354Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 129d4401354SmrgAC_SUBST([$1_TRUE])dnl 130d4401354SmrgAC_SUBST([$1_FALSE])dnl 131d4401354Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 132d4401354Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 133d4401354Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 134d4401354Smrgif $2; then 135d4401354Smrg $1_TRUE= 136d4401354Smrg $1_FALSE='#' 137d4401354Smrgelse 138d4401354Smrg $1_TRUE='#' 139d4401354Smrg $1_FALSE= 140d4401354Smrgfi 141d4401354SmrgAC_CONFIG_COMMANDS_PRE( 142d4401354Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 143d4401354Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 144d4401354SmrgUsually this means the macro was only invoked conditionally.]]) 145d4401354Smrgfi])]) 146d4401354Smrg 147d4401354Smrg# Do all the work for Automake. -*- Autoconf -*- 148d4401354Smrg 149d4401354Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 150d4401354Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 151d4401354Smrg# 152d4401354Smrg# This file is free software; the Free Software Foundation 153d4401354Smrg# gives unlimited permission to copy and/or distribute it, 154d4401354Smrg# with or without modifications, as long as this notice is preserved. 155d4401354Smrg 156d4401354Smrg# serial 16 157d4401354Smrg 158d4401354Smrg# This macro actually does too much. Some checks are only needed if 159d4401354Smrg# your package does certain things. But this isn't really a big deal. 160d4401354Smrg 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], 173d4401354Smrg[AC_PREREQ([2.62])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], 202d4401354Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 203d4401354Smrg AC_SUBST([PACKAGE], [$1])dnl 204d4401354Smrg AC_SUBST([VERSION], [$2])], 205d4401354Smrg[_AM_SET_OPTIONS([$1])dnl 206d4401354Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 207d4401354Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 208d4401354Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 209d4401354Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 210d4401354Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 211d4401354Smrg 212d4401354Smrg_AM_IF_OPTION([no-define],, 213d4401354Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 214d4401354Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 215d4401354Smrg 216d4401354Smrg# Some tools Automake needs. 217d4401354SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 218d4401354SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 219d4401354SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 220d4401354SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 221d4401354SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 222d4401354SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 223d4401354SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 224d4401354SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 225d4401354SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 226d4401354SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 227d4401354Smrg# We need awk for the "check" target. The system "awk" is bad on 228d4401354Smrg# some platforms. 229d4401354SmrgAC_REQUIRE([AC_PROG_AWK])dnl 230d4401354SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 231d4401354SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 232d4401354Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 233d4401354Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 234d4401354Smrg [_AM_PROG_TAR([v7])])]) 235d4401354Smrg_AM_IF_OPTION([no-dependencies],, 236d4401354Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 237d4401354Smrg [_AM_DEPENDENCIES(CC)], 238d4401354Smrg [define([AC_PROG_CC], 239d4401354Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 240d4401354SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 241d4401354Smrg [_AM_DEPENDENCIES(CXX)], 242d4401354Smrg [define([AC_PROG_CXX], 243d4401354Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 244d4401354SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 245d4401354Smrg [_AM_DEPENDENCIES(OBJC)], 246d4401354Smrg [define([AC_PROG_OBJC], 247d4401354Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 248d4401354Smrg]) 249d4401354Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 250d4401354Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 251d4401354Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 252d4401354Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 253d4401354SmrgAC_CONFIG_COMMANDS_PRE(dnl 254d4401354Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 255d4401354Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 256d4401354Smrg]) 257d4401354Smrg 258d4401354Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 259d4401354Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 260d4401354Smrgdnl mangled by Autoconf and run in a shell conditional statement. 261d4401354Smrgm4_define([_AC_COMPILER_EXEEXT], 262d4401354Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 263d4401354Smrg 264d4401354Smrg 265d4401354Smrg# When config.status generates a header, we must update the stamp-h file. 266d4401354Smrg# This file resides in the same directory as the config header 267d4401354Smrg# that is generated. The stamp files are numbered to have different names. 268d4401354Smrg 269d4401354Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 270d4401354Smrg# loop where config.status creates the headers, so we can generate 271d4401354Smrg# our stamp files there. 272d4401354SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 273d4401354Smrg[# Compute $1's index in $config_headers. 274d4401354Smrg_am_arg=$1 275d4401354Smrg_am_stamp_count=1 276d4401354Smrgfor _am_header in $config_headers :; do 277d4401354Smrg case $_am_header in 278d4401354Smrg $_am_arg | $_am_arg:* ) 279d4401354Smrg break ;; 280d4401354Smrg * ) 281d4401354Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 282d4401354Smrg esac 283d4401354Smrgdone 284d4401354Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 285d4401354Smrg 286d4401354Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 287d4401354Smrg# 288d4401354Smrg# This file is free software; the Free Software Foundation 289d4401354Smrg# gives unlimited permission to copy and/or distribute it, 290d4401354Smrg# with or without modifications, as long as this notice is preserved. 291d4401354Smrg 292d4401354Smrg# AM_PROG_INSTALL_SH 293d4401354Smrg# ------------------ 294d4401354Smrg# Define $install_sh. 295d4401354SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 296d4401354Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 297d4401354Smrgif test x"${install_sh}" != xset; then 298d4401354Smrg case $am_aux_dir in 299d4401354Smrg *\ * | *\ *) 300d4401354Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 301d4401354Smrg *) 302d4401354Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 303d4401354Smrg esac 304d4401354Smrgfi 305d4401354SmrgAC_SUBST(install_sh)]) 306d4401354Smrg 307d4401354Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 308d4401354Smrg# 309d4401354Smrg# This file is free software; the Free Software Foundation 310d4401354Smrg# gives unlimited permission to copy and/or distribute it, 311d4401354Smrg# with or without modifications, as long as this notice is preserved. 312d4401354Smrg 313d4401354Smrg# serial 2 314d4401354Smrg 315d4401354Smrg# Check whether the underlying file-system supports filenames 316d4401354Smrg# with a leading dot. For instance MS-DOS doesn't. 317d4401354SmrgAC_DEFUN([AM_SET_LEADING_DOT], 318d4401354Smrg[rm -rf .tst 2>/dev/null 319d4401354Smrgmkdir .tst 2>/dev/null 320d4401354Smrgif test -d .tst; then 321d4401354Smrg am__leading_dot=. 322d4401354Smrgelse 323d4401354Smrg am__leading_dot=_ 324d4401354Smrgfi 325d4401354Smrgrmdir .tst 2>/dev/null 326d4401354SmrgAC_SUBST([am__leading_dot])]) 327d4401354Smrg 328d4401354Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 329d4401354Smrg 330d4401354Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 331d4401354Smrg# Free Software Foundation, Inc. 332d4401354Smrg# 333d4401354Smrg# This file is free software; the Free Software Foundation 334d4401354Smrg# gives unlimited permission to copy and/or distribute it, 335d4401354Smrg# with or without modifications, as long as this notice is preserved. 336d4401354Smrg 337d4401354Smrg# serial 6 338d4401354Smrg 339d4401354Smrg# AM_MISSING_PROG(NAME, PROGRAM) 340d4401354Smrg# ------------------------------ 341d4401354SmrgAC_DEFUN([AM_MISSING_PROG], 342d4401354Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 343d4401354Smrg$1=${$1-"${am_missing_run}$2"} 344d4401354SmrgAC_SUBST($1)]) 345d4401354Smrg 346d4401354Smrg 347d4401354Smrg# AM_MISSING_HAS_RUN 348d4401354Smrg# ------------------ 349d4401354Smrg# Define MISSING if not defined so far and test if it supports --run. 350d4401354Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 351d4401354SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 352d4401354Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 353d4401354SmrgAC_REQUIRE_AUX_FILE([missing])dnl 354d4401354Smrgif test x"${MISSING+set}" != xset; then 355d4401354Smrg case $am_aux_dir in 356d4401354Smrg *\ * | *\ *) 357d4401354Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 358d4401354Smrg *) 359d4401354Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 360d4401354Smrg esac 361d4401354Smrgfi 362d4401354Smrg# Use eval to expand $SHELL 363d4401354Smrgif eval "$MISSING --run true"; then 364d4401354Smrg am_missing_run="$MISSING --run " 365d4401354Smrgelse 366d4401354Smrg am_missing_run= 367d4401354Smrg AC_MSG_WARN([`missing' script is too old or missing]) 368d4401354Smrgfi 369d4401354Smrg]) 370d4401354Smrg 371d4401354Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 372d4401354Smrg# 373d4401354Smrg# This file is free software; the Free Software Foundation 374d4401354Smrg# gives unlimited permission to copy and/or distribute it, 375d4401354Smrg# with or without modifications, as long as this notice is preserved. 376d4401354Smrg 377d4401354Smrg# AM_PROG_MKDIR_P 378d4401354Smrg# --------------- 379d4401354Smrg# Check for `mkdir -p'. 380d4401354SmrgAC_DEFUN([AM_PROG_MKDIR_P], 381d4401354Smrg[AC_PREREQ([2.60])dnl 382d4401354SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 383d4401354Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 384d4401354Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 385d4401354Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 386d4401354Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 387d4401354Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 388d4401354Smrgdnl adjustment using top_builddir (which is defined more often than 389d4401354Smrgdnl MKDIR_P). 390d4401354SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 391d4401354Smrgcase $mkdir_p in 392d4401354Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 393d4401354Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 394d4401354Smrgesac 395d4401354Smrg]) 396d4401354Smrg 397d4401354Smrg# Helper functions for option handling. -*- Autoconf -*- 398d4401354Smrg 399d4401354Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 400d4401354Smrg# 401d4401354Smrg# This file is free software; the Free Software Foundation 402d4401354Smrg# gives unlimited permission to copy and/or distribute it, 403d4401354Smrg# with or without modifications, as long as this notice is preserved. 404d4401354Smrg 405d4401354Smrg# serial 4 406d4401354Smrg 407d4401354Smrg# _AM_MANGLE_OPTION(NAME) 408d4401354Smrg# ----------------------- 409d4401354SmrgAC_DEFUN([_AM_MANGLE_OPTION], 410d4401354Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 411d4401354Smrg 412d4401354Smrg# _AM_SET_OPTION(NAME) 413d4401354Smrg# ------------------------------ 414d4401354Smrg# Set option NAME. Presently that only means defining a flag for this option. 415d4401354SmrgAC_DEFUN([_AM_SET_OPTION], 416d4401354Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 417d4401354Smrg 418d4401354Smrg# _AM_SET_OPTIONS(OPTIONS) 419d4401354Smrg# ---------------------------------- 420d4401354Smrg# OPTIONS is a space-separated list of Automake options. 421d4401354SmrgAC_DEFUN([_AM_SET_OPTIONS], 422d4401354Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 423d4401354Smrg 424d4401354Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 425d4401354Smrg# ------------------------------------------- 426d4401354Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 427d4401354SmrgAC_DEFUN([_AM_IF_OPTION], 428d4401354Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 429d4401354Smrg 430d4401354Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 431d4401354Smrg# Free Software Foundation, Inc. 432d4401354Smrg# 433d4401354Smrg# This file is free software; the Free Software Foundation 434d4401354Smrg# gives unlimited permission to copy and/or distribute it, 435d4401354Smrg# with or without modifications, as long as this notice is preserved. 436d4401354Smrg 437d4401354Smrg# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 438d4401354Smrg# --------------------------------------------------------------------------- 439d4401354Smrg# Adds support for distributing Python modules and packages. To 440d4401354Smrg# install modules, copy them to $(pythondir), using the python_PYTHON 441d4401354Smrg# automake variable. To install a package with the same name as the 442d4401354Smrg# automake package, install to $(pkgpythondir), or use the 443d4401354Smrg# pkgpython_PYTHON automake variable. 444d4401354Smrg# 445d4401354Smrg# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as 446d4401354Smrg# locations to install python extension modules (shared libraries). 447d4401354Smrg# Another macro is required to find the appropriate flags to compile 448d4401354Smrg# extension modules. 449d4401354Smrg# 450d4401354Smrg# If your package is configured with a different prefix to python, 451d4401354Smrg# users will have to add the install directory to the PYTHONPATH 452d4401354Smrg# environment variable, or create a .pth file (see the python 453d4401354Smrg# documentation for details). 454d4401354Smrg# 455d4401354Smrg# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will 456d4401354Smrg# cause an error if the version of python installed on the system 457d4401354Smrg# doesn't meet the requirement. MINIMUM-VERSION should consist of 458d4401354Smrg# numbers and dots only. 459d4401354SmrgAC_DEFUN([AM_PATH_PYTHON], 460d4401354Smrg [ 461d4401354Smrg dnl Find a Python interpreter. Python versions prior to 2.0 are not 462d4401354Smrg dnl supported. (2.0 was released on October 16, 2000). 463d4401354Smrg m4_define_default([_AM_PYTHON_INTERPRETER_LIST], 464d4401354Smrg [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl 465d4401354Smrgpython2.1 python2.0]) 466d4401354Smrg 467d4401354Smrg m4_if([$1],[],[ 468d4401354Smrg dnl No version check is needed. 469d4401354Smrg # Find any Python interpreter. 470d4401354Smrg if test -z "$PYTHON"; then 471d4401354Smrg AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) 472d4401354Smrg fi 473d4401354Smrg am_display_PYTHON=python 474d4401354Smrg ], [ 475d4401354Smrg dnl A version check is needed. 476d4401354Smrg if test -n "$PYTHON"; then 477d4401354Smrg # If the user set $PYTHON, use it and don't search something else. 478d4401354Smrg AC_MSG_CHECKING([whether $PYTHON version >= $1]) 479d4401354Smrg AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], 480d4401354Smrg [AC_MSG_RESULT(yes)], 481d4401354Smrg [AC_MSG_ERROR(too old)]) 482d4401354Smrg am_display_PYTHON=$PYTHON 483d4401354Smrg else 484d4401354Smrg # Otherwise, try each interpreter until we find one that satisfies 485d4401354Smrg # VERSION. 486d4401354Smrg AC_CACHE_CHECK([for a Python interpreter with version >= $1], 487d4401354Smrg [am_cv_pathless_PYTHON],[ 488d4401354Smrg for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do 489d4401354Smrg test "$am_cv_pathless_PYTHON" = none && break 490d4401354Smrg AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) 491d4401354Smrg done]) 492d4401354Smrg # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. 493d4401354Smrg if test "$am_cv_pathless_PYTHON" = none; then 494d4401354Smrg PYTHON=: 495d4401354Smrg else 496d4401354Smrg AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) 497d4401354Smrg fi 498d4401354Smrg am_display_PYTHON=$am_cv_pathless_PYTHON 499d4401354Smrg fi 500d4401354Smrg ]) 501d4401354Smrg 502d4401354Smrg if test "$PYTHON" = :; then 503d4401354Smrg dnl Run any user-specified action, or abort. 504d4401354Smrg m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) 505d4401354Smrg else 506d4401354Smrg 507d4401354Smrg dnl Query Python for its version number. Getting [:3] seems to be 508d4401354Smrg dnl the best way to do this; it's what "site.py" does in the standard 509d4401354Smrg dnl library. 510d4401354Smrg 511d4401354Smrg AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], 512d4401354Smrg [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) 513d4401354Smrg AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) 514d4401354Smrg 515d4401354Smrg dnl Use the values of $prefix and $exec_prefix for the corresponding 516d4401354Smrg dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made 517d4401354Smrg dnl distinct variables so they can be overridden if need be. However, 518d4401354Smrg dnl general consensus is that you shouldn't need this ability. 519d4401354Smrg 520d4401354Smrg AC_SUBST([PYTHON_PREFIX], ['${prefix}']) 521d4401354Smrg AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) 522d4401354Smrg 523d4401354Smrg dnl At times (like when building shared libraries) you may want 524d4401354Smrg dnl to know which OS platform Python thinks this is. 525d4401354Smrg 526d4401354Smrg AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], 527d4401354Smrg [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) 528d4401354Smrg AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) 529d4401354Smrg 530d4401354Smrg 531d4401354Smrg dnl Set up 4 directories: 532d4401354Smrg 533d4401354Smrg dnl pythondir -- where to install python scripts. This is the 534d4401354Smrg dnl site-packages directory, not the python standard library 535d4401354Smrg dnl directory like in previous automake betas. This behavior 536d4401354Smrg dnl is more consistent with lispdir.m4 for example. 537d4401354Smrg dnl Query distutils for this directory. distutils does not exist in 538d4401354Smrg dnl Python 1.5, so we fall back to the hardcoded directory if it 539d4401354Smrg dnl doesn't work. 540d4401354Smrg AC_CACHE_CHECK([for $am_display_PYTHON script directory], 541d4401354Smrg [am_cv_python_pythondir], 542d4401354Smrg [if test "x$prefix" = xNONE 543d4401354Smrg then 544d4401354Smrg am_py_prefix=$ac_default_prefix 545d4401354Smrg else 546d4401354Smrg am_py_prefix=$prefix 547d4401354Smrg fi 548d4401354Smrg am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || 549d4401354Smrg echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` 550d4401354Smrg case $am_cv_python_pythondir in 551d4401354Smrg $am_py_prefix*) 552d4401354Smrg am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` 553d4401354Smrg am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` 554d4401354Smrg ;; 555d4401354Smrg esac 556d4401354Smrg ]) 557d4401354Smrg AC_SUBST([pythondir], [$am_cv_python_pythondir]) 558d4401354Smrg 559d4401354Smrg dnl pkgpythondir -- $PACKAGE directory under pythondir. Was 560d4401354Smrg dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is 561d4401354Smrg dnl more consistent with the rest of automake. 562d4401354Smrg 563d4401354Smrg AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) 564d4401354Smrg 565d4401354Smrg dnl pyexecdir -- directory for installing python extension modules 566d4401354Smrg dnl (shared libraries) 567d4401354Smrg dnl Query distutils for this directory. distutils does not exist in 568d4401354Smrg dnl Python 1.5, so we fall back to the hardcoded directory if it 569d4401354Smrg dnl doesn't work. 570d4401354Smrg AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], 571d4401354Smrg [am_cv_python_pyexecdir], 572d4401354Smrg [if test "x$exec_prefix" = xNONE 573d4401354Smrg then 574d4401354Smrg am_py_exec_prefix=$am_py_prefix 575d4401354Smrg else 576d4401354Smrg am_py_exec_prefix=$exec_prefix 577d4401354Smrg fi 578d4401354Smrg am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || 579d4401354Smrg echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` 580d4401354Smrg case $am_cv_python_pyexecdir in 581d4401354Smrg $am_py_exec_prefix*) 582d4401354Smrg am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` 583d4401354Smrg am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` 584d4401354Smrg ;; 585d4401354Smrg esac 586d4401354Smrg ]) 587d4401354Smrg AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) 588d4401354Smrg 589d4401354Smrg dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) 590d4401354Smrg 591d4401354Smrg AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) 592d4401354Smrg 593d4401354Smrg dnl Run any user-specified action. 594d4401354Smrg $2 595d4401354Smrg fi 596d4401354Smrg 597d4401354Smrg]) 598d4401354Smrg 599d4401354Smrg 600d4401354Smrg# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) 601d4401354Smrg# --------------------------------------------------------------------------- 602d4401354Smrg# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. 603d4401354Smrg# Run ACTION-IF-FALSE otherwise. 604d4401354Smrg# This test uses sys.hexversion instead of the string equivalent (first 605d4401354Smrg# word of sys.version), in order to cope with versions such as 2.2c1. 606d4401354Smrg# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). 607d4401354SmrgAC_DEFUN([AM_PYTHON_CHECK_VERSION], 608d4401354Smrg [prog="import sys 609d4401354Smrg# split strings by '.' and convert to numeric. Append some zeros 610d4401354Smrg# because we need at least 4 digits for the hex conversion. 611d4401354Smrg# map returns an iterator in Python 3.0 and a list in 2.x 612d4401354Smrgminver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] 613d4401354Smrgminverhex = 0 614d4401354Smrg# xrange is not present in Python 3.0 and range returns an iterator 615d4401354Smrgfor i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] 616d4401354Smrgsys.exit(sys.hexversion < minverhex)" 617d4401354Smrg AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) 618d4401354Smrg 619d4401354Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 620d4401354Smrg# 621d4401354Smrg# This file is free software; the Free Software Foundation 622d4401354Smrg# gives unlimited permission to copy and/or distribute it, 623d4401354Smrg# with or without modifications, as long as this notice is preserved. 624d4401354Smrg 625d4401354Smrg# AM_RUN_LOG(COMMAND) 626d4401354Smrg# ------------------- 627d4401354Smrg# Run COMMAND, save the exit status in ac_status, and log it. 628d4401354Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 629d4401354SmrgAC_DEFUN([AM_RUN_LOG], 630d4401354Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 631d4401354Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 632d4401354Smrg ac_status=$? 633d4401354Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 634d4401354Smrg (exit $ac_status); }]) 635d4401354Smrg 636d4401354Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 637d4401354Smrg 638d4401354Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 639d4401354Smrg# Free Software Foundation, Inc. 640d4401354Smrg# 641d4401354Smrg# This file is free software; the Free Software Foundation 642d4401354Smrg# gives unlimited permission to copy and/or distribute it, 643d4401354Smrg# with or without modifications, as long as this notice is preserved. 644d4401354Smrg 645d4401354Smrg# serial 5 646d4401354Smrg 647d4401354Smrg# AM_SANITY_CHECK 648d4401354Smrg# --------------- 649d4401354SmrgAC_DEFUN([AM_SANITY_CHECK], 650d4401354Smrg[AC_MSG_CHECKING([whether build environment is sane]) 651d4401354Smrg# Just in case 652d4401354Smrgsleep 1 653d4401354Smrgecho timestamp > conftest.file 654d4401354Smrg# Reject unsafe characters in $srcdir or the absolute working directory 655d4401354Smrg# name. Accept space and tab only in the latter. 656d4401354Smrgam_lf=' 657d4401354Smrg' 658d4401354Smrgcase `pwd` in 659d4401354Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 660d4401354Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 661d4401354Smrgesac 662d4401354Smrgcase $srcdir in 663d4401354Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 664d4401354Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 665d4401354Smrgesac 666d4401354Smrg 667d4401354Smrg# Do `set' in a subshell so we don't clobber the current shell's 668d4401354Smrg# arguments. Must try -L first in case configure is actually a 669d4401354Smrg# symlink; some systems play weird games with the mod time of symlinks 670d4401354Smrg# (eg FreeBSD returns the mod time of the symlink's containing 671d4401354Smrg# directory). 672d4401354Smrgif ( 673d4401354Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 674d4401354Smrg if test "$[*]" = "X"; then 675d4401354Smrg # -L didn't work. 676d4401354Smrg set X `ls -t "$srcdir/configure" conftest.file` 677d4401354Smrg fi 678d4401354Smrg rm -f conftest.file 679d4401354Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 680d4401354Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 681d4401354Smrg 682d4401354Smrg # If neither matched, then we have a broken ls. This can happen 683d4401354Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 684d4401354Smrg # broken ls alias from the environment. This has actually 685d4401354Smrg # happened. Such a system could not be considered "sane". 686d4401354Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 687d4401354Smrgalias in your environment]) 688d4401354Smrg fi 689d4401354Smrg 690d4401354Smrg test "$[2]" = conftest.file 691d4401354Smrg ) 692d4401354Smrgthen 693d4401354Smrg # Ok. 694d4401354Smrg : 695d4401354Smrgelse 696d4401354Smrg AC_MSG_ERROR([newly created file is older than distributed files! 697d4401354SmrgCheck your system clock]) 698d4401354Smrgfi 699d4401354SmrgAC_MSG_RESULT(yes)]) 700d4401354Smrg 701d4401354Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 702d4401354Smrg# 703d4401354Smrg# This file is free software; the Free Software Foundation 704d4401354Smrg# gives unlimited permission to copy and/or distribute it, 705d4401354Smrg# with or without modifications, as long as this notice is preserved. 706d4401354Smrg 707d4401354Smrg# AM_PROG_INSTALL_STRIP 708d4401354Smrg# --------------------- 709d4401354Smrg# One issue with vendor `install' (even GNU) is that you can't 710d4401354Smrg# specify the program used to strip binaries. This is especially 711d4401354Smrg# annoying in cross-compiling environments, where the build's strip 712d4401354Smrg# is unlikely to handle the host's binaries. 713d4401354Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 714d4401354Smrg# always use install-sh in `make install-strip', and initialize 715d4401354Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 716d4401354SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 717d4401354Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 718d4401354Smrg# Installed binaries are usually stripped using `strip' when the user 719d4401354Smrg# run `make install-strip'. However `strip' might not be the right 720d4401354Smrg# tool to use in cross-compilation environments, therefore Automake 721d4401354Smrg# will honor the `STRIP' environment variable to overrule this program. 722d4401354Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 723d4401354Smrgif test "$cross_compiling" != no; then 724d4401354Smrg AC_CHECK_TOOL([STRIP], [strip], :) 725d4401354Smrgfi 726d4401354SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 727d4401354SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 728d4401354Smrg 729d4401354Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 730d4401354Smrg# 731d4401354Smrg# This file is free software; the Free Software Foundation 732d4401354Smrg# gives unlimited permission to copy and/or distribute it, 733d4401354Smrg# with or without modifications, as long as this notice is preserved. 734d4401354Smrg 735d4401354Smrg# serial 2 736d4401354Smrg 737d4401354Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 738d4401354Smrg# --------------------------- 739d4401354Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 740d4401354Smrg# This macro is traced by Automake. 741d4401354SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 742d4401354Smrg 743d4401354Smrg# AM_SUBST_NOTMAKE(VARIABLE) 744d4401354Smrg# --------------------------- 745d4401354Smrg# Public sister of _AM_SUBST_NOTMAKE. 746d4401354SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 747d4401354Smrg 748d4401354Smrg# Check how to create a tarball. -*- Autoconf -*- 749d4401354Smrg 750d4401354Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 751d4401354Smrg# 752d4401354Smrg# This file is free software; the Free Software Foundation 753d4401354Smrg# gives unlimited permission to copy and/or distribute it, 754d4401354Smrg# with or without modifications, as long as this notice is preserved. 755d4401354Smrg 756d4401354Smrg# serial 2 757d4401354Smrg 758d4401354Smrg# _AM_PROG_TAR(FORMAT) 759d4401354Smrg# -------------------- 760d4401354Smrg# Check how to create a tarball in format FORMAT. 761d4401354Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 762d4401354Smrg# 763d4401354Smrg# Substitute a variable $(am__tar) that is a command 764d4401354Smrg# writing to stdout a FORMAT-tarball containing the directory 765d4401354Smrg# $tardir. 766d4401354Smrg# tardir=directory && $(am__tar) > result.tar 767d4401354Smrg# 768d4401354Smrg# Substitute a variable $(am__untar) that extract such 769d4401354Smrg# a tarball read from stdin. 770d4401354Smrg# $(am__untar) < result.tar 771d4401354SmrgAC_DEFUN([_AM_PROG_TAR], 772d4401354Smrg[# Always define AMTAR for backward compatibility. 773d4401354SmrgAM_MISSING_PROG([AMTAR], [tar]) 774d4401354Smrgm4_if([$1], [v7], 775d4401354Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 776d4401354Smrg [m4_case([$1], [ustar],, [pax],, 777d4401354Smrg [m4_fatal([Unknown tar format])]) 778d4401354SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 779d4401354Smrg# Loop over all known methods to create a tar archive until one works. 780d4401354Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 781d4401354Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 782d4401354Smrg# Do not fold the above two line into one, because Tru64 sh and 783d4401354Smrg# Solaris sh will not grok spaces in the rhs of `-'. 784d4401354Smrgfor _am_tool in $_am_tools 785d4401354Smrgdo 786d4401354Smrg case $_am_tool in 787d4401354Smrg gnutar) 788d4401354Smrg for _am_tar in tar gnutar gtar; 789d4401354Smrg do 790d4401354Smrg AM_RUN_LOG([$_am_tar --version]) && break 791d4401354Smrg done 792d4401354Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 793d4401354Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 794d4401354Smrg am__untar="$_am_tar -xf -" 795d4401354Smrg ;; 796d4401354Smrg plaintar) 797d4401354Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 798d4401354Smrg # ustar tarball either. 799d4401354Smrg (tar --version) >/dev/null 2>&1 && continue 800d4401354Smrg am__tar='tar chf - "$$tardir"' 801d4401354Smrg am__tar_='tar chf - "$tardir"' 802d4401354Smrg am__untar='tar xf -' 803d4401354Smrg ;; 804d4401354Smrg pax) 805d4401354Smrg am__tar='pax -L -x $1 -w "$$tardir"' 806d4401354Smrg am__tar_='pax -L -x $1 -w "$tardir"' 807d4401354Smrg am__untar='pax -r' 808d4401354Smrg ;; 809d4401354Smrg cpio) 810d4401354Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 811d4401354Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 812d4401354Smrg am__untar='cpio -i -H $1 -d' 813d4401354Smrg ;; 814d4401354Smrg none) 815d4401354Smrg am__tar=false 816d4401354Smrg am__tar_=false 817d4401354Smrg am__untar=false 818d4401354Smrg ;; 819d4401354Smrg esac 820d4401354Smrg 821d4401354Smrg # If the value was cached, stop now. We just wanted to have am__tar 822d4401354Smrg # and am__untar set. 823d4401354Smrg test -n "${am_cv_prog_tar_$1}" && break 824d4401354Smrg 825d4401354Smrg # tar/untar a dummy directory, and stop if the command works 826d4401354Smrg rm -rf conftest.dir 827d4401354Smrg mkdir conftest.dir 828d4401354Smrg echo GrepMe > conftest.dir/file 829d4401354Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 830d4401354Smrg rm -rf conftest.dir 831d4401354Smrg if test -s conftest.tar; then 832d4401354Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 833d4401354Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 834d4401354Smrg fi 835d4401354Smrgdone 836d4401354Smrgrm -rf conftest.dir 837d4401354Smrg 838d4401354SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 839d4401354SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 840d4401354SmrgAC_SUBST([am__tar]) 841d4401354SmrgAC_SUBST([am__untar]) 842d4401354Smrg]) # _AM_PROG_TAR 843d4401354Smrg 844