aclocal.m4 revision ca08ab68
1ca08ab68Smrg# generated automatically by aclocal 1.11.6 -*- Autoconf -*- 22c393a42Smrg 32c393a42Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4ca08ab68Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5ca08ab68Smrg# Inc. 62c393a42Smrg# This file is free software; the Free Software Foundation 72c393a42Smrg# gives unlimited permission to copy and/or distribute it, 82c393a42Smrg# with or without modifications, as long as this notice is preserved. 92c393a42Smrg 102c393a42Smrg# This program is distributed in the hope that it will be useful, 112c393a42Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 122c393a42Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 132c393a42Smrg# PARTICULAR PURPOSE. 142c393a42Smrg 15a6844aabSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16a6844aabSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17ca08ab68Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18ca08ab68Smrg[m4_warning([this file was generated for autoconf 2.68. 19a6844aabSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20a6844aabSmrgIf you have problems, you may need to regenerate the build system entirely. 21a6844aabSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 22a6844aabSmrg 232c393a42Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 24ca08ab68Smrg# serial 1 (pkg-config-0.24) 252c393a42Smrg# 262c393a42Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 272c393a42Smrg# 282c393a42Smrg# This program is free software; you can redistribute it and/or modify 292c393a42Smrg# it under the terms of the GNU General Public License as published by 302c393a42Smrg# the Free Software Foundation; either version 2 of the License, or 312c393a42Smrg# (at your option) any later version. 322c393a42Smrg# 332c393a42Smrg# This program is distributed in the hope that it will be useful, but 342c393a42Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 352c393a42Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 362c393a42Smrg# General Public License for more details. 372c393a42Smrg# 382c393a42Smrg# You should have received a copy of the GNU General Public License 392c393a42Smrg# along with this program; if not, write to the Free Software 402c393a42Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 412c393a42Smrg# 422c393a42Smrg# As a special exception to the GNU General Public License, if you 432c393a42Smrg# distribute this file as part of a program that contains a 442c393a42Smrg# configuration script generated by Autoconf, you may include it under 452c393a42Smrg# the same distribution terms that you use for the rest of that program. 462c393a42Smrg 472c393a42Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 482c393a42Smrg# ---------------------------------- 492c393a42SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 502c393a42Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 512c393a42Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 52ca08ab68SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 53ca08ab68SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 54ca08ab68SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 55ca08ab68Smrg 562c393a42Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 572c393a42Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 582c393a42Smrgfi 592c393a42Smrgif test -n "$PKG_CONFIG"; then 602c393a42Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 612c393a42Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 622c393a42Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 632c393a42Smrg AC_MSG_RESULT([yes]) 642c393a42Smrg else 652c393a42Smrg AC_MSG_RESULT([no]) 662c393a42Smrg PKG_CONFIG="" 672c393a42Smrg fi 682c393a42Smrgfi[]dnl 692c393a42Smrg])# PKG_PROG_PKG_CONFIG 702c393a42Smrg 712c393a42Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 722c393a42Smrg# 732c393a42Smrg# Check to see whether a particular set of modules exists. Similar 742c393a42Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 752c393a42Smrg# 76ca08ab68Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 77ca08ab68Smrg# only at the first occurence in configure.ac, so if the first place 78ca08ab68Smrg# it's called might be skipped (such as if it is within an "if", you 79ca08ab68Smrg# have to call PKG_CHECK_EXISTS manually 802c393a42Smrg# -------------------------------------------------------------- 812c393a42SmrgAC_DEFUN([PKG_CHECK_EXISTS], 822c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 832c393a42Smrgif test -n "$PKG_CONFIG" && \ 842c393a42Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 85ca08ab68Smrg m4_default([$2], [:]) 862c393a42Smrgm4_ifvaln([$3], [else 872c393a42Smrg $3])dnl 882c393a42Smrgfi]) 892c393a42Smrg 902c393a42Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 912c393a42Smrg# --------------------------------------------- 922c393a42Smrgm4_define([_PKG_CONFIG], 93a6844aabSmrg[if test -n "$$1"; then 94a6844aabSmrg pkg_cv_[]$1="$$1" 95a6844aabSmrg elif test -n "$PKG_CONFIG"; then 96a6844aabSmrg PKG_CHECK_EXISTS([$3], 97a6844aabSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 98a6844aabSmrg [pkg_failed=yes]) 99a6844aabSmrg else 100a6844aabSmrg pkg_failed=untried 1012c393a42Smrgfi[]dnl 1022c393a42Smrg])# _PKG_CONFIG 1032c393a42Smrg 1042c393a42Smrg# _PKG_SHORT_ERRORS_SUPPORTED 1052c393a42Smrg# ----------------------------- 1062c393a42SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1072c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1082c393a42Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1092c393a42Smrg _pkg_short_errors_supported=yes 1102c393a42Smrgelse 1112c393a42Smrg _pkg_short_errors_supported=no 1122c393a42Smrgfi[]dnl 1132c393a42Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 1142c393a42Smrg 1152c393a42Smrg 1162c393a42Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1172c393a42Smrg# [ACTION-IF-NOT-FOUND]) 1182c393a42Smrg# 1192c393a42Smrg# 1202c393a42Smrg# Note that if there is a possibility the first call to 1212c393a42Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 1222c393a42Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1232c393a42Smrg# 1242c393a42Smrg# 1252c393a42Smrg# -------------------------------------------------------------- 1262c393a42SmrgAC_DEFUN([PKG_CHECK_MODULES], 1272c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1282c393a42SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1292c393a42SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1302c393a42Smrg 1312c393a42Smrgpkg_failed=no 1322c393a42SmrgAC_MSG_CHECKING([for $1]) 1332c393a42Smrg 1342c393a42Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1352c393a42Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1362c393a42Smrg 1372c393a42Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1382c393a42Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1392c393a42SmrgSee the pkg-config man page for more details.]) 1402c393a42Smrg 1412c393a42Smrgif test $pkg_failed = yes; then 142ca08ab68Smrg AC_MSG_RESULT([no]) 1432c393a42Smrg _PKG_SHORT_ERRORS_SUPPORTED 1442c393a42Smrg if test $_pkg_short_errors_supported = yes; then 145a6844aabSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 1462c393a42Smrg else 147a6844aabSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 1482c393a42Smrg fi 1492c393a42Smrg # Put the nasty error message in config.log where it belongs 1502c393a42Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1512c393a42Smrg 152ca08ab68Smrg m4_default([$4], [AC_MSG_ERROR( 1532c393a42Smrg[Package requirements ($2) were not met: 1542c393a42Smrg 1552c393a42Smrg$$1_PKG_ERRORS 1562c393a42Smrg 1572c393a42SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1582c393a42Smrginstalled software in a non-standard prefix. 1592c393a42Smrg 160ca08ab68Smrg_PKG_TEXT]) 161ca08ab68Smrg ]) 1622c393a42Smrgelif test $pkg_failed = untried; then 163ca08ab68Smrg AC_MSG_RESULT([no]) 164ca08ab68Smrg m4_default([$4], [AC_MSG_FAILURE( 1652c393a42Smrg[The pkg-config script could not be found or is too old. Make sure it 1662c393a42Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1672c393a42Smrgpath to pkg-config. 1682c393a42Smrg 1692c393a42Smrg_PKG_TEXT 1702c393a42Smrg 171ca08ab68SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 172ca08ab68Smrg ]) 1732c393a42Smrgelse 1742c393a42Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1752c393a42Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1762c393a42Smrg AC_MSG_RESULT([yes]) 177ca08ab68Smrg $3 1782c393a42Smrgfi[]dnl 1792c393a42Smrg])# PKG_CHECK_MODULES 1802c393a42Smrg 181ca08ab68Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 182ca08ab68Smrg# Foundation, Inc. 1832c393a42Smrg# 1842c393a42Smrg# This file is free software; the Free Software Foundation 1852c393a42Smrg# gives unlimited permission to copy and/or distribute it, 1862c393a42Smrg# with or without modifications, as long as this notice is preserved. 1872c393a42Smrg 188ca08ab68Smrg# serial 1 189ca08ab68Smrg 1902c393a42Smrg# AM_AUTOMAKE_VERSION(VERSION) 1912c393a42Smrg# ---------------------------- 1922c393a42Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1932c393a42Smrg# generated from the m4 files accompanying Automake X.Y. 194a6844aabSmrg# (This private macro should not be called outside this file.) 195a6844aabSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 196a6844aabSmrg[am__api_version='1.11' 197a6844aabSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 198a6844aabSmrgdnl require some minimum version. Point them to the right macro. 199ca08ab68Smrgm4_if([$1], [1.11.6], [], 200a6844aabSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 201a6844aabSmrg]) 202a6844aabSmrg 203a6844aabSmrg# _AM_AUTOCONF_VERSION(VERSION) 204a6844aabSmrg# ----------------------------- 205a6844aabSmrg# aclocal traces this macro to find the Autoconf version. 206a6844aabSmrg# This is a private macro too. Using m4_define simplifies 207a6844aabSmrg# the logic in aclocal, which can simply ignore this definition. 208a6844aabSmrgm4_define([_AM_AUTOCONF_VERSION], []) 2092c393a42Smrg 2102c393a42Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 2112c393a42Smrg# ------------------------------- 212a6844aabSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 213a6844aabSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 2142c393a42SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 215ca08ab68Smrg[AM_AUTOMAKE_VERSION([1.11.6])dnl 216a6844aabSmrgm4_ifndef([AC_AUTOCONF_VERSION], 217a6844aabSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 218a6844aabSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 2192c393a42Smrg 2202c393a42Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 2212c393a42Smrg 222ca08ab68Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 2232c393a42Smrg# 2242c393a42Smrg# This file is free software; the Free Software Foundation 2252c393a42Smrg# gives unlimited permission to copy and/or distribute it, 2262c393a42Smrg# with or without modifications, as long as this notice is preserved. 2272c393a42Smrg 228ca08ab68Smrg# serial 1 229ca08ab68Smrg 2302c393a42Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 2312c393a42Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 2322c393a42Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 2332c393a42Smrg# 2342c393a42Smrg# Of course, Automake must honor this variable whenever it calls a 2352c393a42Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 2362c393a42Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 2372c393a42Smrg# depending on how configure is run. This is pretty annoying, since 2382c393a42Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 2392c393a42Smrg# source directory, any form will work fine, but in subdirectories a 2402c393a42Smrg# relative path needs to be adjusted first. 2412c393a42Smrg# 2422c393a42Smrg# $ac_aux_dir/missing 2432c393a42Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 2442c393a42Smrg# $top_srcdir/$ac_aux_dir/missing 2452c393a42Smrg# fails if $ac_aux_dir is absolute, 2462c393a42Smrg# fails when called from a subdirectory in a VPATH build with 2472c393a42Smrg# a relative $ac_aux_dir 2482c393a42Smrg# 2492c393a42Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 2502c393a42Smrg# are both prefixed by $srcdir. In an in-source build this is usually 2512c393a42Smrg# harmless because $srcdir is `.', but things will broke when you 2522c393a42Smrg# start a VPATH build or use an absolute $srcdir. 2532c393a42Smrg# 2542c393a42Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 2552c393a42Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 2562c393a42Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 2572c393a42Smrg# and then we would define $MISSING as 2582c393a42Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 2592c393a42Smrg# This will work as long as MISSING is not called from configure, because 2602c393a42Smrg# unfortunately $(top_srcdir) has no meaning in configure. 2612c393a42Smrg# However there are other variables, like CC, which are often used in 2622c393a42Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 2632c393a42Smrg# 2642c393a42Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 2652c393a42Smrg# absolute PATH. The drawback is that using absolute paths prevent a 2662c393a42Smrg# configured tree to be moved without reconfiguration. 2672c393a42Smrg 2682c393a42SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 2692c393a42Smrg[dnl Rely on autoconf to set up CDPATH properly. 2702c393a42SmrgAC_PREREQ([2.50])dnl 2712c393a42Smrg# expand $ac_aux_dir to an absolute path 2722c393a42Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 2732c393a42Smrg]) 2742c393a42Smrg 2752c393a42Smrg# AM_CONDITIONAL -*- Autoconf -*- 2762c393a42Smrg 277a6844aabSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 2782c393a42Smrg# Free Software Foundation, Inc. 2792c393a42Smrg# 2802c393a42Smrg# This file is free software; the Free Software Foundation 2812c393a42Smrg# gives unlimited permission to copy and/or distribute it, 2822c393a42Smrg# with or without modifications, as long as this notice is preserved. 2832c393a42Smrg 284a6844aabSmrg# serial 9 2852c393a42Smrg 2862c393a42Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 2872c393a42Smrg# ------------------------------------- 2882c393a42Smrg# Define a conditional. 2892c393a42SmrgAC_DEFUN([AM_CONDITIONAL], 2902c393a42Smrg[AC_PREREQ(2.52)dnl 2912c393a42Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 2922c393a42Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 293a6844aabSmrgAC_SUBST([$1_TRUE])dnl 294a6844aabSmrgAC_SUBST([$1_FALSE])dnl 295a6844aabSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 296a6844aabSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 297a6844aabSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 2982c393a42Smrgif $2; then 2992c393a42Smrg $1_TRUE= 3002c393a42Smrg $1_FALSE='#' 3012c393a42Smrgelse 3022c393a42Smrg $1_TRUE='#' 3032c393a42Smrg $1_FALSE= 3042c393a42Smrgfi 3052c393a42SmrgAC_CONFIG_COMMANDS_PRE( 3062c393a42Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 3072c393a42Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 3082c393a42SmrgUsually this means the macro was only invoked conditionally.]]) 3092c393a42Smrgfi])]) 3102c393a42Smrg 311ca08ab68Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 312ca08ab68Smrg# 2010, 2011 Free Software Foundation, Inc. 3132c393a42Smrg# 3142c393a42Smrg# This file is free software; the Free Software Foundation 3152c393a42Smrg# gives unlimited permission to copy and/or distribute it, 3162c393a42Smrg# with or without modifications, as long as this notice is preserved. 3172c393a42Smrg 318ca08ab68Smrg# serial 12 3192c393a42Smrg 3202c393a42Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 3212c393a42Smrg# written in clear, in which case automake, when reading aclocal.m4, 3222c393a42Smrg# will think it sees a *use*, and therefore will trigger all it's 3232c393a42Smrg# C support machinery. Also note that it means that autoscan, seeing 3242c393a42Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 3252c393a42Smrg 3262c393a42Smrg 3272c393a42Smrg# _AM_DEPENDENCIES(NAME) 3282c393a42Smrg# ---------------------- 3292c393a42Smrg# See how the compiler implements dependency checking. 3302c393a42Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 3312c393a42Smrg# We try a few techniques and use that to set a single cache variable. 3322c393a42Smrg# 3332c393a42Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 3342c393a42Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 3352c393a42Smrg# dependency, and given that the user is not expected to run this macro, 3362c393a42Smrg# just rely on AC_PROG_CC. 3372c393a42SmrgAC_DEFUN([_AM_DEPENDENCIES], 3382c393a42Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 3392c393a42SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 3402c393a42SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 3412c393a42SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 3422c393a42Smrg 3432c393a42Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 3442c393a42Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 3452c393a42Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 346a6844aabSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 3472c393a42Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 3482c393a42Smrg [depcc="$$1" am_compiler_list=]) 3492c393a42Smrg 3502c393a42SmrgAC_CACHE_CHECK([dependency style of $depcc], 3512c393a42Smrg [am_cv_$1_dependencies_compiler_type], 3522c393a42Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 3532c393a42Smrg # We make a subdir and do the tests there. Otherwise we can end up 3542c393a42Smrg # making bogus files that we don't know about and never remove. For 3552c393a42Smrg # instance it was reported that on HP-UX the gcc test will end up 3562c393a42Smrg # making a dummy file named `D' -- because `-MD' means `put the output 3572c393a42Smrg # in D'. 358ca08ab68Smrg rm -rf conftest.dir 3592c393a42Smrg mkdir conftest.dir 3602c393a42Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 3612c393a42Smrg # using a relative directory. 3622c393a42Smrg cp "$am_depcomp" conftest.dir 3632c393a42Smrg cd conftest.dir 3642c393a42Smrg # We will build objects and dependencies in a subdirectory because 3652c393a42Smrg # it helps to detect inapplicable dependency modes. For instance 3662c393a42Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 3672c393a42Smrg # side effect of compilation, but ICC will put the dependencies in 3682c393a42Smrg # the current directory while Tru64 will put them in the object 3692c393a42Smrg # directory. 3702c393a42Smrg mkdir sub 3712c393a42Smrg 3722c393a42Smrg am_cv_$1_dependencies_compiler_type=none 3732c393a42Smrg if test "$am_compiler_list" = ""; then 3742c393a42Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 3752c393a42Smrg fi 376a6844aabSmrg am__universal=false 377a6844aabSmrg m4_case([$1], [CC], 378a6844aabSmrg [case " $depcc " in #( 379a6844aabSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 380a6844aabSmrg esac], 381a6844aabSmrg [CXX], 382a6844aabSmrg [case " $depcc " in #( 383a6844aabSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 384a6844aabSmrg esac]) 385a6844aabSmrg 3862c393a42Smrg for depmode in $am_compiler_list; do 3872c393a42Smrg # Setup a source with many dependencies, because some compilers 3882c393a42Smrg # like to wrap large dependency lists on column 80 (with \), and 3892c393a42Smrg # we should not choose a depcomp mode which is confused by this. 3902c393a42Smrg # 3912c393a42Smrg # We need to recreate these files for each test, as the compiler may 3922c393a42Smrg # overwrite some of them when testing with obscure command lines. 3932c393a42Smrg # This happens at least with the AIX C compiler. 3942c393a42Smrg : > sub/conftest.c 3952c393a42Smrg for i in 1 2 3 4 5 6; do 3962c393a42Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 3972c393a42Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 3982c393a42Smrg # Solaris 8's {/usr,}/bin/sh. 3992c393a42Smrg touch sub/conftst$i.h 4002c393a42Smrg done 4012c393a42Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 4022c393a42Smrg 403a6844aabSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 404a6844aabSmrg # mode. It turns out that the SunPro C++ compiler does not properly 405a6844aabSmrg # handle `-M -o', and we need to detect this. Also, some Intel 406a6844aabSmrg # versions had trouble with output in subdirs 407a6844aabSmrg am__obj=sub/conftest.${OBJEXT-o} 408a6844aabSmrg am__minus_obj="-o $am__obj" 4092c393a42Smrg case $depmode in 410a6844aabSmrg gcc) 411a6844aabSmrg # This depmode causes a compiler race in universal mode. 412a6844aabSmrg test "$am__universal" = false || continue 413a6844aabSmrg ;; 4142c393a42Smrg nosideeffect) 4152c393a42Smrg # after this tag, mechanisms are not by side-effect, so they'll 4162c393a42Smrg # only be used when explicitly requested 4172c393a42Smrg if test "x$enable_dependency_tracking" = xyes; then 4182c393a42Smrg continue 4192c393a42Smrg else 4202c393a42Smrg break 4212c393a42Smrg fi 4222c393a42Smrg ;; 423ca08ab68Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 424a6844aabSmrg # This compiler won't grok `-c -o', but also, the minuso test has 425a6844aabSmrg # not run yet. These depmodes are late enough in the game, and 426a6844aabSmrg # so weak that their functioning should not be impacted. 427a6844aabSmrg am__obj=conftest.${OBJEXT-o} 428a6844aabSmrg am__minus_obj= 429a6844aabSmrg ;; 4302c393a42Smrg none) break ;; 4312c393a42Smrg esac 4322c393a42Smrg if depmode=$depmode \ 433a6844aabSmrg source=sub/conftest.c object=$am__obj \ 4342c393a42Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 435a6844aabSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 4362c393a42Smrg >/dev/null 2>conftest.err && 437a6844aabSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 4382c393a42Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 439a6844aabSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 4402c393a42Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 4412c393a42Smrg # icc doesn't choke on unknown options, it will just issue warnings 4422c393a42Smrg # or remarks (even with -Werror). So we grep stderr for any message 4432c393a42Smrg # that says an option was ignored or not supported. 4442c393a42Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 4452c393a42Smrg # icc: Command line warning: ignoring option '-M'; no argument required 4462c393a42Smrg # The diagnosis changed in icc 8.0: 4472c393a42Smrg # icc: Command line remark: option '-MP' not supported 4482c393a42Smrg if (grep 'ignoring option' conftest.err || 4492c393a42Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 4502c393a42Smrg am_cv_$1_dependencies_compiler_type=$depmode 4512c393a42Smrg break 4522c393a42Smrg fi 4532c393a42Smrg fi 4542c393a42Smrg done 4552c393a42Smrg 4562c393a42Smrg cd .. 4572c393a42Smrg rm -rf conftest.dir 4582c393a42Smrgelse 4592c393a42Smrg am_cv_$1_dependencies_compiler_type=none 4602c393a42Smrgfi 4612c393a42Smrg]) 4622c393a42SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 4632c393a42SmrgAM_CONDITIONAL([am__fastdep$1], [ 4642c393a42Smrg test "x$enable_dependency_tracking" != xno \ 4652c393a42Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 4662c393a42Smrg]) 4672c393a42Smrg 4682c393a42Smrg 4692c393a42Smrg# AM_SET_DEPDIR 4702c393a42Smrg# ------------- 4712c393a42Smrg# Choose a directory name for dependency files. 4722c393a42Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 4732c393a42SmrgAC_DEFUN([AM_SET_DEPDIR], 4742c393a42Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 4752c393a42SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 4762c393a42Smrg]) 4772c393a42Smrg 4782c393a42Smrg 4792c393a42Smrg# AM_DEP_TRACK 4802c393a42Smrg# ------------ 4812c393a42SmrgAC_DEFUN([AM_DEP_TRACK], 4822c393a42Smrg[AC_ARG_ENABLE(dependency-tracking, 4832c393a42Smrg[ --disable-dependency-tracking speeds up one-time build 4842c393a42Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 4852c393a42Smrgif test "x$enable_dependency_tracking" != xno; then 4862c393a42Smrg am_depcomp="$ac_aux_dir/depcomp" 4872c393a42Smrg AMDEPBACKSLASH='\' 488ca08ab68Smrg am__nodep='_no' 4892c393a42Smrgfi 4902c393a42SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 491a6844aabSmrgAC_SUBST([AMDEPBACKSLASH])dnl 492a6844aabSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 493ca08ab68SmrgAC_SUBST([am__nodep])dnl 494ca08ab68Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 4952c393a42Smrg]) 4962c393a42Smrg 4972c393a42Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 4982c393a42Smrg 499a6844aabSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 5002c393a42Smrg# Free Software Foundation, Inc. 5012c393a42Smrg# 5022c393a42Smrg# This file is free software; the Free Software Foundation 5032c393a42Smrg# gives unlimited permission to copy and/or distribute it, 5042c393a42Smrg# with or without modifications, as long as this notice is preserved. 5052c393a42Smrg 506a6844aabSmrg#serial 5 5072c393a42Smrg 5082c393a42Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 5092c393a42Smrg# ------------------------------ 5102c393a42SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 511a6844aabSmrg[{ 512a6844aabSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 513a6844aabSmrg # are listed without --file. Let's play safe and only enable the eval 514a6844aabSmrg # if we detect the quoting. 515a6844aabSmrg case $CONFIG_FILES in 516a6844aabSmrg *\'*) eval set x "$CONFIG_FILES" ;; 517a6844aabSmrg *) set x $CONFIG_FILES ;; 518a6844aabSmrg esac 519a6844aabSmrg shift 520a6844aabSmrg for mf 521a6844aabSmrg do 522a6844aabSmrg # Strip MF so we end up with the name of the file. 523a6844aabSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 524a6844aabSmrg # Check whether this is an Automake generated Makefile or not. 525a6844aabSmrg # We used to match only the files named `Makefile.in', but 526a6844aabSmrg # some people rename them; so instead we look at the file content. 527a6844aabSmrg # Grep'ing the first line is not enough: some people post-process 528a6844aabSmrg # each Makefile.in and add a new line on top of each file to say so. 529a6844aabSmrg # Grep'ing the whole file is not good either: AIX grep has a line 530a6844aabSmrg # limit of 2048, but all sed's we know have understand at least 4000. 531a6844aabSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 532a6844aabSmrg dirpart=`AS_DIRNAME("$mf")` 533a6844aabSmrg else 534a6844aabSmrg continue 535a6844aabSmrg fi 536a6844aabSmrg # Extract the definition of DEPDIR, am__include, and am__quote 537a6844aabSmrg # from the Makefile without running `make'. 538a6844aabSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 539a6844aabSmrg test -z "$DEPDIR" && continue 540a6844aabSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 541a6844aabSmrg test -z "am__include" && continue 542a6844aabSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 543a6844aabSmrg # When using ansi2knr, U may be empty or an underscore; expand it 544a6844aabSmrg U=`sed -n 's/^U = //p' < "$mf"` 545a6844aabSmrg # Find all dependency output files, they are included files with 546a6844aabSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 547a6844aabSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 548a6844aabSmrg # expansion. 549a6844aabSmrg for file in `sed -n " 550a6844aabSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 551a6844aabSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 552a6844aabSmrg # Make sure the directory exists. 553a6844aabSmrg test -f "$dirpart/$file" && continue 554a6844aabSmrg fdir=`AS_DIRNAME(["$file"])` 555a6844aabSmrg AS_MKDIR_P([$dirpart/$fdir]) 556a6844aabSmrg # echo "creating $dirpart/$file" 557a6844aabSmrg echo '# dummy' > "$dirpart/$file" 558a6844aabSmrg done 5592c393a42Smrg done 560a6844aabSmrg} 5612c393a42Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 5622c393a42Smrg 5632c393a42Smrg 5642c393a42Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 5652c393a42Smrg# ----------------------------- 5662c393a42Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 5672c393a42Smrg# 5682c393a42Smrg# This code is only required when automatic dependency tracking 5692c393a42Smrg# is enabled. FIXME. This creates each `.P' file that we will 5702c393a42Smrg# need in order to bootstrap the dependency handling code. 5712c393a42SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 5722c393a42Smrg[AC_CONFIG_COMMANDS([depfiles], 5732c393a42Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 5742c393a42Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 5752c393a42Smrg]) 5762c393a42Smrg 5772c393a42Smrg# Do all the work for Automake. -*- Autoconf -*- 5782c393a42Smrg 579a6844aabSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 580a6844aabSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 5812c393a42Smrg# 5822c393a42Smrg# This file is free software; the Free Software Foundation 5832c393a42Smrg# gives unlimited permission to copy and/or distribute it, 5842c393a42Smrg# with or without modifications, as long as this notice is preserved. 5852c393a42Smrg 586a6844aabSmrg# serial 16 5872c393a42Smrg 5882c393a42Smrg# This macro actually does too much. Some checks are only needed if 5892c393a42Smrg# your package does certain things. But this isn't really a big deal. 5902c393a42Smrg 5912c393a42Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 5922c393a42Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 5932c393a42Smrg# ----------------------------------------------- 5942c393a42Smrg# The call with PACKAGE and VERSION arguments is the old style 5952c393a42Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 5962c393a42Smrg# and VERSION should now be passed to AC_INIT and removed from 5972c393a42Smrg# the call to AM_INIT_AUTOMAKE. 5982c393a42Smrg# We support both call styles for the transition. After 5992c393a42Smrg# the next Automake release, Autoconf can make the AC_INIT 6002c393a42Smrg# arguments mandatory, and then we can depend on a new Autoconf 6012c393a42Smrg# release and drop the old call support. 6022c393a42SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 603a6844aabSmrg[AC_PREREQ([2.62])dnl 6042c393a42Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 6052c393a42Smrgdnl the ones we care about. 6062c393a42Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 6072c393a42SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 6082c393a42SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 609a6844aabSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 610a6844aabSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 611a6844aabSmrg # is not polluted with repeated "-I." 612a6844aabSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 613a6844aabSmrg # test to see if srcdir already configured 614a6844aabSmrg if test -f $srcdir/config.status; then 615a6844aabSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 616a6844aabSmrg fi 6172c393a42Smrgfi 6182c393a42Smrg 6192c393a42Smrg# test whether we have cygpath 6202c393a42Smrgif test -z "$CYGPATH_W"; then 6212c393a42Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 6222c393a42Smrg CYGPATH_W='cygpath -w' 6232c393a42Smrg else 6242c393a42Smrg CYGPATH_W=echo 6252c393a42Smrg fi 6262c393a42Smrgfi 6272c393a42SmrgAC_SUBST([CYGPATH_W]) 6282c393a42Smrg 6292c393a42Smrg# Define the identity of the package. 6302c393a42Smrgdnl Distinguish between old-style and new-style calls. 6312c393a42Smrgm4_ifval([$2], 6322c393a42Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 6332c393a42Smrg AC_SUBST([PACKAGE], [$1])dnl 6342c393a42Smrg AC_SUBST([VERSION], [$2])], 6352c393a42Smrg[_AM_SET_OPTIONS([$1])dnl 636a6844aabSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 637a6844aabSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 638a6844aabSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 6392c393a42Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 6402c393a42Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 6412c393a42Smrg 6422c393a42Smrg_AM_IF_OPTION([no-define],, 6432c393a42Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 6442c393a42Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 6452c393a42Smrg 6462c393a42Smrg# Some tools Automake needs. 6472c393a42SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 6482c393a42SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 6492c393a42SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 6502c393a42SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 6512c393a42SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 6522c393a42SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 6532c393a42SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 654a6844aabSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 655a6844aabSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 6562c393a42SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 6572c393a42Smrg# We need awk for the "check" target. The system "awk" is bad on 6582c393a42Smrg# some platforms. 6592c393a42SmrgAC_REQUIRE([AC_PROG_AWK])dnl 6602c393a42SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 6612c393a42SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 6622c393a42Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 663a6844aabSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 664a6844aabSmrg [_AM_PROG_TAR([v7])])]) 6652c393a42Smrg_AM_IF_OPTION([no-dependencies],, 6662c393a42Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 667a6844aabSmrg [_AM_DEPENDENCIES(CC)], 668a6844aabSmrg [define([AC_PROG_CC], 669a6844aabSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 6702c393a42SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 671a6844aabSmrg [_AM_DEPENDENCIES(CXX)], 672a6844aabSmrg [define([AC_PROG_CXX], 673a6844aabSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 674a6844aabSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 675a6844aabSmrg [_AM_DEPENDENCIES(OBJC)], 676a6844aabSmrg [define([AC_PROG_OBJC], 677a6844aabSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 6782c393a42Smrg]) 679a6844aabSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 680a6844aabSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 681a6844aabSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 682a6844aabSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 683a6844aabSmrgAC_CONFIG_COMMANDS_PRE(dnl 684a6844aabSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 685a6844aabSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 6862c393a42Smrg]) 6872c393a42Smrg 688a6844aabSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 689a6844aabSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 690a6844aabSmrgdnl mangled by Autoconf and run in a shell conditional statement. 691a6844aabSmrgm4_define([_AC_COMPILER_EXEEXT], 692a6844aabSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 693a6844aabSmrg 6942c393a42Smrg 6952c393a42Smrg# When config.status generates a header, we must update the stamp-h file. 6962c393a42Smrg# This file resides in the same directory as the config header 6972c393a42Smrg# that is generated. The stamp files are numbered to have different names. 6982c393a42Smrg 6992c393a42Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7002c393a42Smrg# loop where config.status creates the headers, so we can generate 7012c393a42Smrg# our stamp files there. 7022c393a42SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7032c393a42Smrg[# Compute $1's index in $config_headers. 704a6844aabSmrg_am_arg=$1 7052c393a42Smrg_am_stamp_count=1 7062c393a42Smrgfor _am_header in $config_headers :; do 7072c393a42Smrg case $_am_header in 708a6844aabSmrg $_am_arg | $_am_arg:* ) 7092c393a42Smrg break ;; 7102c393a42Smrg * ) 7112c393a42Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7122c393a42Smrg esac 7132c393a42Smrgdone 714a6844aabSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 7152c393a42Smrg 716ca08ab68Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 717ca08ab68Smrg# Inc. 7182c393a42Smrg# 7192c393a42Smrg# This file is free software; the Free Software Foundation 7202c393a42Smrg# gives unlimited permission to copy and/or distribute it, 7212c393a42Smrg# with or without modifications, as long as this notice is preserved. 7222c393a42Smrg 723ca08ab68Smrg# serial 1 724ca08ab68Smrg 7252c393a42Smrg# AM_PROG_INSTALL_SH 7262c393a42Smrg# ------------------ 7272c393a42Smrg# Define $install_sh. 7282c393a42SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 7292c393a42Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 730a6844aabSmrgif test x"${install_sh}" != xset; then 731a6844aabSmrg case $am_aux_dir in 732a6844aabSmrg *\ * | *\ *) 733a6844aabSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 734a6844aabSmrg *) 735a6844aabSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 736a6844aabSmrg esac 737a6844aabSmrgfi 7382c393a42SmrgAC_SUBST(install_sh)]) 7392c393a42Smrg 7402c393a42Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 7412c393a42Smrg# 7422c393a42Smrg# This file is free software; the Free Software Foundation 7432c393a42Smrg# gives unlimited permission to copy and/or distribute it, 7442c393a42Smrg# with or without modifications, as long as this notice is preserved. 7452c393a42Smrg 7462c393a42Smrg# serial 2 7472c393a42Smrg 7482c393a42Smrg# Check whether the underlying file-system supports filenames 7492c393a42Smrg# with a leading dot. For instance MS-DOS doesn't. 7502c393a42SmrgAC_DEFUN([AM_SET_LEADING_DOT], 7512c393a42Smrg[rm -rf .tst 2>/dev/null 7522c393a42Smrgmkdir .tst 2>/dev/null 7532c393a42Smrgif test -d .tst; then 7542c393a42Smrg am__leading_dot=. 7552c393a42Smrgelse 7562c393a42Smrg am__leading_dot=_ 7572c393a42Smrgfi 7582c393a42Smrgrmdir .tst 2>/dev/null 7592c393a42SmrgAC_SUBST([am__leading_dot])]) 7602c393a42Smrg 7612c393a42Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 7622c393a42Smrg 763a6844aabSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 7642c393a42Smrg# 7652c393a42Smrg# This file is free software; the Free Software Foundation 7662c393a42Smrg# gives unlimited permission to copy and/or distribute it, 7672c393a42Smrg# with or without modifications, as long as this notice is preserved. 7682c393a42Smrg 769a6844aabSmrg# serial 4 7702c393a42Smrg 7712c393a42Smrg# AM_MAKE_INCLUDE() 7722c393a42Smrg# ----------------- 7732c393a42Smrg# Check to see how make treats includes. 7742c393a42SmrgAC_DEFUN([AM_MAKE_INCLUDE], 7752c393a42Smrg[am_make=${MAKE-make} 7762c393a42Smrgcat > confinc << 'END' 7772c393a42Smrgam__doit: 778a6844aabSmrg @echo this is the am__doit target 7792c393a42Smrg.PHONY: am__doit 7802c393a42SmrgEND 7812c393a42Smrg# If we don't find an include directive, just comment out the code. 7822c393a42SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 7832c393a42Smrgam__include="#" 7842c393a42Smrgam__quote= 7852c393a42Smrg_am_result=none 7862c393a42Smrg# First try GNU make style include. 7872c393a42Smrgecho "include confinc" > confmf 788a6844aabSmrg# Ignore all kinds of additional output from `make'. 789a6844aabSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 790a6844aabSmrg*the\ am__doit\ target*) 791a6844aabSmrg am__include=include 792a6844aabSmrg am__quote= 793a6844aabSmrg _am_result=GNU 794a6844aabSmrg ;; 795a6844aabSmrgesac 7962c393a42Smrg# Now try BSD make style include. 7972c393a42Smrgif test "$am__include" = "#"; then 7982c393a42Smrg echo '.include "confinc"' > confmf 799a6844aabSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 800a6844aabSmrg *the\ am__doit\ target*) 801a6844aabSmrg am__include=.include 802a6844aabSmrg am__quote="\"" 803a6844aabSmrg _am_result=BSD 804a6844aabSmrg ;; 805a6844aabSmrg esac 8062c393a42Smrgfi 8072c393a42SmrgAC_SUBST([am__include]) 8082c393a42SmrgAC_SUBST([am__quote]) 8092c393a42SmrgAC_MSG_RESULT([$_am_result]) 8102c393a42Smrgrm -f confinc confmf 8112c393a42Smrg]) 8122c393a42Smrg 8132c393a42Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 8142c393a42Smrg 815a6844aabSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 8162c393a42Smrg# Free Software Foundation, Inc. 8172c393a42Smrg# 8182c393a42Smrg# This file is free software; the Free Software Foundation 8192c393a42Smrg# gives unlimited permission to copy and/or distribute it, 8202c393a42Smrg# with or without modifications, as long as this notice is preserved. 8212c393a42Smrg 822a6844aabSmrg# serial 6 8232c393a42Smrg 8242c393a42Smrg# AM_MISSING_PROG(NAME, PROGRAM) 8252c393a42Smrg# ------------------------------ 8262c393a42SmrgAC_DEFUN([AM_MISSING_PROG], 8272c393a42Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8282c393a42Smrg$1=${$1-"${am_missing_run}$2"} 8292c393a42SmrgAC_SUBST($1)]) 8302c393a42Smrg 8312c393a42Smrg 8322c393a42Smrg# AM_MISSING_HAS_RUN 8332c393a42Smrg# ------------------ 8342c393a42Smrg# Define MISSING if not defined so far and test if it supports --run. 8352c393a42Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8362c393a42SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8372c393a42Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 838a6844aabSmrgAC_REQUIRE_AUX_FILE([missing])dnl 839a6844aabSmrgif test x"${MISSING+set}" != xset; then 840a6844aabSmrg case $am_aux_dir in 841a6844aabSmrg *\ * | *\ *) 842a6844aabSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 843a6844aabSmrg *) 844a6844aabSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 845a6844aabSmrg esac 846a6844aabSmrgfi 8472c393a42Smrg# Use eval to expand $SHELL 8482c393a42Smrgif eval "$MISSING --run true"; then 8492c393a42Smrg am_missing_run="$MISSING --run " 8502c393a42Smrgelse 8512c393a42Smrg am_missing_run= 8522c393a42Smrg AC_MSG_WARN([`missing' script is too old or missing]) 8532c393a42Smrgfi 8542c393a42Smrg]) 8552c393a42Smrg 856ca08ab68Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 857ca08ab68Smrg# Inc. 8582c393a42Smrg# 8592c393a42Smrg# This file is free software; the Free Software Foundation 8602c393a42Smrg# gives unlimited permission to copy and/or distribute it, 8612c393a42Smrg# with or without modifications, as long as this notice is preserved. 8622c393a42Smrg 863ca08ab68Smrg# serial 1 864ca08ab68Smrg 8652c393a42Smrg# AM_PROG_MKDIR_P 8662c393a42Smrg# --------------- 867a6844aabSmrg# Check for `mkdir -p'. 8682c393a42SmrgAC_DEFUN([AM_PROG_MKDIR_P], 869a6844aabSmrg[AC_PREREQ([2.60])dnl 870a6844aabSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 871a6844aabSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 872a6844aabSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 873a6844aabSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 874a6844aabSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 875a6844aabSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 876a6844aabSmrgdnl adjustment using top_builddir (which is defined more often than 877a6844aabSmrgdnl MKDIR_P). 878a6844aabSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 879a6844aabSmrgcase $mkdir_p in 880a6844aabSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 881a6844aabSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 882a6844aabSmrgesac 883a6844aabSmrg]) 8842c393a42Smrg 8852c393a42Smrg# Helper functions for option handling. -*- Autoconf -*- 8862c393a42Smrg 887ca08ab68Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 888ca08ab68Smrg# Foundation, Inc. 8892c393a42Smrg# 8902c393a42Smrg# This file is free software; the Free Software Foundation 8912c393a42Smrg# gives unlimited permission to copy and/or distribute it, 8922c393a42Smrg# with or without modifications, as long as this notice is preserved. 8932c393a42Smrg 894ca08ab68Smrg# serial 5 8952c393a42Smrg 8962c393a42Smrg# _AM_MANGLE_OPTION(NAME) 8972c393a42Smrg# ----------------------- 8982c393a42SmrgAC_DEFUN([_AM_MANGLE_OPTION], 8992c393a42Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9002c393a42Smrg 9012c393a42Smrg# _AM_SET_OPTION(NAME) 902ca08ab68Smrg# -------------------- 9032c393a42Smrg# Set option NAME. Presently that only means defining a flag for this option. 9042c393a42SmrgAC_DEFUN([_AM_SET_OPTION], 9052c393a42Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 9062c393a42Smrg 9072c393a42Smrg# _AM_SET_OPTIONS(OPTIONS) 908ca08ab68Smrg# ------------------------ 9092c393a42Smrg# OPTIONS is a space-separated list of Automake options. 9102c393a42SmrgAC_DEFUN([_AM_SET_OPTIONS], 911a6844aabSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9122c393a42Smrg 9132c393a42Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9142c393a42Smrg# ------------------------------------------- 9152c393a42Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9162c393a42SmrgAC_DEFUN([_AM_IF_OPTION], 9172c393a42Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9182c393a42Smrg 9192c393a42Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 9202c393a42Smrg 921a6844aabSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 9222c393a42Smrg# Free Software Foundation, Inc. 9232c393a42Smrg# 9242c393a42Smrg# This file is free software; the Free Software Foundation 9252c393a42Smrg# gives unlimited permission to copy and/or distribute it, 9262c393a42Smrg# with or without modifications, as long as this notice is preserved. 9272c393a42Smrg 928a6844aabSmrg# serial 5 9292c393a42Smrg 9302c393a42Smrg# AM_SANITY_CHECK 9312c393a42Smrg# --------------- 9322c393a42SmrgAC_DEFUN([AM_SANITY_CHECK], 9332c393a42Smrg[AC_MSG_CHECKING([whether build environment is sane]) 9342c393a42Smrg# Just in case 9352c393a42Smrgsleep 1 9362c393a42Smrgecho timestamp > conftest.file 937a6844aabSmrg# Reject unsafe characters in $srcdir or the absolute working directory 938a6844aabSmrg# name. Accept space and tab only in the latter. 939a6844aabSmrgam_lf=' 940a6844aabSmrg' 941a6844aabSmrgcase `pwd` in 942a6844aabSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 943a6844aabSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 944a6844aabSmrgesac 945a6844aabSmrgcase $srcdir in 946a6844aabSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 947a6844aabSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 948a6844aabSmrgesac 949a6844aabSmrg 9502c393a42Smrg# Do `set' in a subshell so we don't clobber the current shell's 9512c393a42Smrg# arguments. Must try -L first in case configure is actually a 9522c393a42Smrg# symlink; some systems play weird games with the mod time of symlinks 9532c393a42Smrg# (eg FreeBSD returns the mod time of the symlink's containing 9542c393a42Smrg# directory). 9552c393a42Smrgif ( 956a6844aabSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 9572c393a42Smrg if test "$[*]" = "X"; then 9582c393a42Smrg # -L didn't work. 959a6844aabSmrg set X `ls -t "$srcdir/configure" conftest.file` 9602c393a42Smrg fi 9612c393a42Smrg rm -f conftest.file 9622c393a42Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9632c393a42Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9642c393a42Smrg 9652c393a42Smrg # If neither matched, then we have a broken ls. This can happen 9662c393a42Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9672c393a42Smrg # broken ls alias from the environment. This has actually 9682c393a42Smrg # happened. Such a system could not be considered "sane". 9692c393a42Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9702c393a42Smrgalias in your environment]) 9712c393a42Smrg fi 9722c393a42Smrg 9732c393a42Smrg test "$[2]" = conftest.file 9742c393a42Smrg ) 9752c393a42Smrgthen 9762c393a42Smrg # Ok. 9772c393a42Smrg : 9782c393a42Smrgelse 9792c393a42Smrg AC_MSG_ERROR([newly created file is older than distributed files! 9802c393a42SmrgCheck your system clock]) 9812c393a42Smrgfi 9822c393a42SmrgAC_MSG_RESULT(yes)]) 9832c393a42Smrg 984ca08ab68Smrg# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 985a6844aabSmrg# 986a6844aabSmrg# This file is free software; the Free Software Foundation 987a6844aabSmrg# gives unlimited permission to copy and/or distribute it, 988a6844aabSmrg# with or without modifications, as long as this notice is preserved. 989a6844aabSmrg 990ca08ab68Smrg# serial 2 991a6844aabSmrg 992a6844aabSmrg# AM_SILENT_RULES([DEFAULT]) 993a6844aabSmrg# -------------------------- 994a6844aabSmrg# Enable less verbose build rules; with the default set to DEFAULT 995a6844aabSmrg# (`yes' being less verbose, `no' or empty being verbose). 996a6844aabSmrgAC_DEFUN([AM_SILENT_RULES], 997a6844aabSmrg[AC_ARG_ENABLE([silent-rules], 998a6844aabSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 999a6844aabSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 1000a6844aabSmrgcase $enable_silent_rules in 1001a6844aabSmrgyes) AM_DEFAULT_VERBOSITY=0;; 1002a6844aabSmrgno) AM_DEFAULT_VERBOSITY=1;; 1003a6844aabSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1004a6844aabSmrgesac 1005ca08ab68Smrgdnl 1006ca08ab68Smrgdnl A few `make' implementations (e.g., NonStop OS and NextStep) 1007ca08ab68Smrgdnl do not support nested variable expansions. 1008ca08ab68Smrgdnl See automake bug#9928 and bug#10237. 1009ca08ab68Smrgam_make=${MAKE-make} 1010ca08ab68SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1011ca08ab68Smrg [am_cv_make_support_nested_variables], 1012ca08ab68Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1013ca08ab68SmrgBAR0=false 1014ca08ab68SmrgBAR1=true 1015ca08ab68SmrgV=1 1016ca08ab68Smrgam__doit: 1017ca08ab68Smrg @$(TRUE) 1018ca08ab68Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1019ca08ab68Smrg am_cv_make_support_nested_variables=yes 1020ca08ab68Smrgelse 1021ca08ab68Smrg am_cv_make_support_nested_variables=no 1022ca08ab68Smrgfi]) 1023ca08ab68Smrgif test $am_cv_make_support_nested_variables = yes; then 1024ca08ab68Smrg dnl Using `$V' instead of `$(V)' breaks IRIX make. 1025ca08ab68Smrg AM_V='$(V)' 1026ca08ab68Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1027ca08ab68Smrgelse 1028ca08ab68Smrg AM_V=$AM_DEFAULT_VERBOSITY 1029ca08ab68Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1030ca08ab68Smrgfi 1031ca08ab68SmrgAC_SUBST([AM_V])dnl 1032ca08ab68SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1033ca08ab68SmrgAC_SUBST([AM_DEFAULT_V])dnl 1034ca08ab68SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1035a6844aabSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1036a6844aabSmrgAM_BACKSLASH='\' 1037a6844aabSmrgAC_SUBST([AM_BACKSLASH])dnl 1038a6844aabSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1039a6844aabSmrg]) 1040a6844aabSmrg 1041ca08ab68Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 10422c393a42Smrg# 10432c393a42Smrg# This file is free software; the Free Software Foundation 10442c393a42Smrg# gives unlimited permission to copy and/or distribute it, 10452c393a42Smrg# with or without modifications, as long as this notice is preserved. 10462c393a42Smrg 1047ca08ab68Smrg# serial 1 1048ca08ab68Smrg 10492c393a42Smrg# AM_PROG_INSTALL_STRIP 10502c393a42Smrg# --------------------- 10512c393a42Smrg# One issue with vendor `install' (even GNU) is that you can't 10522c393a42Smrg# specify the program used to strip binaries. This is especially 10532c393a42Smrg# annoying in cross-compiling environments, where the build's strip 10542c393a42Smrg# is unlikely to handle the host's binaries. 10552c393a42Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 10562c393a42Smrg# always use install-sh in `make install-strip', and initialize 10572c393a42Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 10582c393a42SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 10592c393a42Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 10602c393a42Smrg# Installed binaries are usually stripped using `strip' when the user 10612c393a42Smrg# run `make install-strip'. However `strip' might not be the right 10622c393a42Smrg# tool to use in cross-compilation environments, therefore Automake 10632c393a42Smrg# will honor the `STRIP' environment variable to overrule this program. 10642c393a42Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 10652c393a42Smrgif test "$cross_compiling" != no; then 10662c393a42Smrg AC_CHECK_TOOL([STRIP], [strip], :) 10672c393a42Smrgfi 1068a6844aabSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10692c393a42SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10702c393a42Smrg 1071ca08ab68Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 1072a6844aabSmrg# 1073a6844aabSmrg# This file is free software; the Free Software Foundation 1074a6844aabSmrg# gives unlimited permission to copy and/or distribute it, 1075a6844aabSmrg# with or without modifications, as long as this notice is preserved. 1076a6844aabSmrg 1077ca08ab68Smrg# serial 3 1078a6844aabSmrg 1079a6844aabSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1080a6844aabSmrg# --------------------------- 1081a6844aabSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1082a6844aabSmrg# This macro is traced by Automake. 1083a6844aabSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1084a6844aabSmrg 1085a6844aabSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1086ca08ab68Smrg# -------------------------- 1087a6844aabSmrg# Public sister of _AM_SUBST_NOTMAKE. 1088a6844aabSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1089a6844aabSmrg 10902c393a42Smrg# Check how to create a tarball. -*- Autoconf -*- 10912c393a42Smrg 1092ca08ab68Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 10932c393a42Smrg# 10942c393a42Smrg# This file is free software; the Free Software Foundation 10952c393a42Smrg# gives unlimited permission to copy and/or distribute it, 10962c393a42Smrg# with or without modifications, as long as this notice is preserved. 10972c393a42Smrg 10982c393a42Smrg# serial 2 10992c393a42Smrg 11002c393a42Smrg# _AM_PROG_TAR(FORMAT) 11012c393a42Smrg# -------------------- 11022c393a42Smrg# Check how to create a tarball in format FORMAT. 11032c393a42Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 11042c393a42Smrg# 11052c393a42Smrg# Substitute a variable $(am__tar) that is a command 11062c393a42Smrg# writing to stdout a FORMAT-tarball containing the directory 11072c393a42Smrg# $tardir. 11082c393a42Smrg# tardir=directory && $(am__tar) > result.tar 11092c393a42Smrg# 11102c393a42Smrg# Substitute a variable $(am__untar) that extract such 11112c393a42Smrg# a tarball read from stdin. 11122c393a42Smrg# $(am__untar) < result.tar 11132c393a42SmrgAC_DEFUN([_AM_PROG_TAR], 1114ca08ab68Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1115ca08ab68Smrg# in the wild :-( We should find a proper way to deprecate it ... 1116ca08ab68SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11172c393a42Smrgm4_if([$1], [v7], 1118ca08ab68Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11192c393a42Smrg [m4_case([$1], [ustar],, [pax],, 11202c393a42Smrg [m4_fatal([Unknown tar format])]) 11212c393a42SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 11222c393a42Smrg# Loop over all known methods to create a tar archive until one works. 11232c393a42Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11242c393a42Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 11252c393a42Smrg# Do not fold the above two line into one, because Tru64 sh and 11262c393a42Smrg# Solaris sh will not grok spaces in the rhs of `-'. 11272c393a42Smrgfor _am_tool in $_am_tools 11282c393a42Smrgdo 11292c393a42Smrg case $_am_tool in 11302c393a42Smrg gnutar) 11312c393a42Smrg for _am_tar in tar gnutar gtar; 11322c393a42Smrg do 11332c393a42Smrg AM_RUN_LOG([$_am_tar --version]) && break 11342c393a42Smrg done 11352c393a42Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11362c393a42Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11372c393a42Smrg am__untar="$_am_tar -xf -" 11382c393a42Smrg ;; 11392c393a42Smrg plaintar) 11402c393a42Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 11412c393a42Smrg # ustar tarball either. 11422c393a42Smrg (tar --version) >/dev/null 2>&1 && continue 11432c393a42Smrg am__tar='tar chf - "$$tardir"' 11442c393a42Smrg am__tar_='tar chf - "$tardir"' 11452c393a42Smrg am__untar='tar xf -' 11462c393a42Smrg ;; 11472c393a42Smrg pax) 11482c393a42Smrg am__tar='pax -L -x $1 -w "$$tardir"' 11492c393a42Smrg am__tar_='pax -L -x $1 -w "$tardir"' 11502c393a42Smrg am__untar='pax -r' 11512c393a42Smrg ;; 11522c393a42Smrg cpio) 11532c393a42Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11542c393a42Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11552c393a42Smrg am__untar='cpio -i -H $1 -d' 11562c393a42Smrg ;; 11572c393a42Smrg none) 11582c393a42Smrg am__tar=false 11592c393a42Smrg am__tar_=false 11602c393a42Smrg am__untar=false 11612c393a42Smrg ;; 11622c393a42Smrg esac 11632c393a42Smrg 11642c393a42Smrg # If the value was cached, stop now. We just wanted to have am__tar 11652c393a42Smrg # and am__untar set. 11662c393a42Smrg test -n "${am_cv_prog_tar_$1}" && break 11672c393a42Smrg 11682c393a42Smrg # tar/untar a dummy directory, and stop if the command works 11692c393a42Smrg rm -rf conftest.dir 11702c393a42Smrg mkdir conftest.dir 11712c393a42Smrg echo GrepMe > conftest.dir/file 11722c393a42Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11732c393a42Smrg rm -rf conftest.dir 11742c393a42Smrg if test -s conftest.tar; then 11752c393a42Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 11762c393a42Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11772c393a42Smrg fi 11782c393a42Smrgdone 11792c393a42Smrgrm -rf conftest.dir 11802c393a42Smrg 11812c393a42SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11822c393a42SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11832c393a42SmrgAC_SUBST([am__tar]) 11842c393a42SmrgAC_SUBST([am__untar]) 11852c393a42Smrg]) # _AM_PROG_TAR 11862c393a42Smrg 1187ca08ab68Smrgm4_include([m4/libtool.m4]) 1188ca08ab68Smrgm4_include([m4/ltoptions.m4]) 1189ca08ab68Smrgm4_include([m4/ltsugar.m4]) 1190ca08ab68Smrgm4_include([m4/ltversion.m4]) 1191ca08ab68Smrgm4_include([m4/lt~obsolete.m4]) 1192