aclocal.m4 revision 6fc018e4
16fc018e4Smrg# generated automatically by aclocal 1.13.4 -*- Autoconf -*- 2c9710b42Smrg 36fc018e4Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 42c393a42Smrg 52c393a42Smrg# This file is free software; the Free Software Foundation 62c393a42Smrg# gives unlimited permission to copy and/or distribute it, 72c393a42Smrg# with or without modifications, as long as this notice is preserved. 82c393a42Smrg 92c393a42Smrg# This program is distributed in the hope that it will be useful, 102c393a42Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 112c393a42Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 122c393a42Smrg# PARTICULAR PURPOSE. 132c393a42Smrg 146fc018e4Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15a6844aabSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16a6844aabSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17c9710b42Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18c9710b42Smrg[m4_warning([this file was generated for autoconf 2.69. 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. 21c9710b42SmrgTo 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_]+$]) 51c9710b42Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 52c9710b42Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 53ca08ab68SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 54ca08ab68SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 55ca08ab68SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 56ca08ab68Smrg 572c393a42Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 582c393a42Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 592c393a42Smrgfi 602c393a42Smrgif test -n "$PKG_CONFIG"; then 612c393a42Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 622c393a42Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 632c393a42Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 642c393a42Smrg AC_MSG_RESULT([yes]) 652c393a42Smrg else 662c393a42Smrg AC_MSG_RESULT([no]) 672c393a42Smrg PKG_CONFIG="" 682c393a42Smrg fi 692c393a42Smrgfi[]dnl 702c393a42Smrg])# PKG_PROG_PKG_CONFIG 712c393a42Smrg 722c393a42Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 732c393a42Smrg# 742c393a42Smrg# Check to see whether a particular set of modules exists. Similar 752c393a42Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 762c393a42Smrg# 77ca08ab68Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 78ca08ab68Smrg# only at the first occurence in configure.ac, so if the first place 79ca08ab68Smrg# it's called might be skipped (such as if it is within an "if", you 80ca08ab68Smrg# have to call PKG_CHECK_EXISTS manually 812c393a42Smrg# -------------------------------------------------------------- 822c393a42SmrgAC_DEFUN([PKG_CHECK_EXISTS], 832c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 842c393a42Smrgif test -n "$PKG_CONFIG" && \ 852c393a42Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 86ca08ab68Smrg m4_default([$2], [:]) 872c393a42Smrgm4_ifvaln([$3], [else 882c393a42Smrg $3])dnl 892c393a42Smrgfi]) 902c393a42Smrg 912c393a42Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 922c393a42Smrg# --------------------------------------------- 932c393a42Smrgm4_define([_PKG_CONFIG], 94a6844aabSmrg[if test -n "$$1"; then 95a6844aabSmrg pkg_cv_[]$1="$$1" 96a6844aabSmrg elif test -n "$PKG_CONFIG"; then 97a6844aabSmrg PKG_CHECK_EXISTS([$3], 98c9710b42Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 99c9710b42Smrg test "x$?" != "x0" && pkg_failed=yes ], 100a6844aabSmrg [pkg_failed=yes]) 101a6844aabSmrg else 102a6844aabSmrg pkg_failed=untried 1032c393a42Smrgfi[]dnl 1042c393a42Smrg])# _PKG_CONFIG 1052c393a42Smrg 1062c393a42Smrg# _PKG_SHORT_ERRORS_SUPPORTED 1072c393a42Smrg# ----------------------------- 1082c393a42SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 1092c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1102c393a42Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 1112c393a42Smrg _pkg_short_errors_supported=yes 1122c393a42Smrgelse 1132c393a42Smrg _pkg_short_errors_supported=no 1142c393a42Smrgfi[]dnl 1152c393a42Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 1162c393a42Smrg 1172c393a42Smrg 1182c393a42Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 1192c393a42Smrg# [ACTION-IF-NOT-FOUND]) 1202c393a42Smrg# 1212c393a42Smrg# 1222c393a42Smrg# Note that if there is a possibility the first call to 1232c393a42Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 1242c393a42Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 1252c393a42Smrg# 1262c393a42Smrg# 1272c393a42Smrg# -------------------------------------------------------------- 1282c393a42SmrgAC_DEFUN([PKG_CHECK_MODULES], 1292c393a42Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 1302c393a42SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 1312c393a42SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1322c393a42Smrg 1332c393a42Smrgpkg_failed=no 1342c393a42SmrgAC_MSG_CHECKING([for $1]) 1352c393a42Smrg 1362c393a42Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 1372c393a42Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1382c393a42Smrg 1392c393a42Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 1402c393a42Smrgand $1[]_LIBS to avoid the need to call pkg-config. 1412c393a42SmrgSee the pkg-config man page for more details.]) 1422c393a42Smrg 1432c393a42Smrgif test $pkg_failed = yes; then 144ca08ab68Smrg AC_MSG_RESULT([no]) 1452c393a42Smrg _PKG_SHORT_ERRORS_SUPPORTED 1462c393a42Smrg if test $_pkg_short_errors_supported = yes; then 147c9710b42Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 1482c393a42Smrg else 149c9710b42Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 1502c393a42Smrg fi 1512c393a42Smrg # Put the nasty error message in config.log where it belongs 1522c393a42Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1532c393a42Smrg 154ca08ab68Smrg m4_default([$4], [AC_MSG_ERROR( 1552c393a42Smrg[Package requirements ($2) were not met: 1562c393a42Smrg 1572c393a42Smrg$$1_PKG_ERRORS 1582c393a42Smrg 1592c393a42SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 1602c393a42Smrginstalled software in a non-standard prefix. 1612c393a42Smrg 162c9710b42Smrg_PKG_TEXT])[]dnl 163ca08ab68Smrg ]) 1642c393a42Smrgelif test $pkg_failed = untried; then 165ca08ab68Smrg AC_MSG_RESULT([no]) 166ca08ab68Smrg m4_default([$4], [AC_MSG_FAILURE( 1672c393a42Smrg[The pkg-config script could not be found or is too old. Make sure it 1682c393a42Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 1692c393a42Smrgpath to pkg-config. 1702c393a42Smrg 1712c393a42Smrg_PKG_TEXT 1722c393a42Smrg 173c9710b42SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 174ca08ab68Smrg ]) 1752c393a42Smrgelse 1762c393a42Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 1772c393a42Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 1782c393a42Smrg AC_MSG_RESULT([yes]) 179ca08ab68Smrg $3 1802c393a42Smrgfi[]dnl 1812c393a42Smrg])# PKG_CHECK_MODULES 1822c393a42Smrg 183c9710b42Smrg 184c9710b42Smrg# PKG_INSTALLDIR(DIRECTORY) 185c9710b42Smrg# ------------------------- 186c9710b42Smrg# Substitutes the variable pkgconfigdir as the location where a module 187c9710b42Smrg# should install pkg-config .pc files. By default the directory is 188c9710b42Smrg# $libdir/pkgconfig, but the default can be changed by passing 189c9710b42Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 190c9710b42Smrg# parameter. 191c9710b42SmrgAC_DEFUN([PKG_INSTALLDIR], 192c9710b42Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 193c9710b42Smrgm4_pushdef([pkg_description], 194c9710b42Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 195c9710b42SmrgAC_ARG_WITH([pkgconfigdir], 196c9710b42Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 197c9710b42Smrg [with_pkgconfigdir=]pkg_default) 198c9710b42SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 199c9710b42Smrgm4_popdef([pkg_default]) 200c9710b42Smrgm4_popdef([pkg_description]) 201c9710b42Smrg]) dnl PKG_INSTALLDIR 202c9710b42Smrg 203c9710b42Smrg 204c9710b42Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 205c9710b42Smrg# ------------------------- 206c9710b42Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 207c9710b42Smrg# module should install arch-independent pkg-config .pc files. By 208c9710b42Smrg# default the directory is $datadir/pkgconfig, but the default can be 209c9710b42Smrg# changed by passing DIRECTORY. The user can override through the 210c9710b42Smrg# --with-noarch-pkgconfigdir parameter. 211c9710b42SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 212c9710b42Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 213c9710b42Smrgm4_pushdef([pkg_description], 214c9710b42Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 215c9710b42SmrgAC_ARG_WITH([noarch-pkgconfigdir], 216c9710b42Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 217c9710b42Smrg [with_noarch_pkgconfigdir=]pkg_default) 218c9710b42SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 219c9710b42Smrgm4_popdef([pkg_default]) 220c9710b42Smrgm4_popdef([pkg_description]) 221c9710b42Smrg]) dnl PKG_NOARCH_INSTALLDIR 222c9710b42Smrg 2236fc018e4Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 2242c393a42Smrg# 2252c393a42Smrg# This file is free software; the Free Software Foundation 2262c393a42Smrg# gives unlimited permission to copy and/or distribute it, 2272c393a42Smrg# with or without modifications, as long as this notice is preserved. 2282c393a42Smrg 2292c393a42Smrg# AM_AUTOMAKE_VERSION(VERSION) 2302c393a42Smrg# ---------------------------- 2312c393a42Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 2322c393a42Smrg# generated from the m4 files accompanying Automake X.Y. 233a6844aabSmrg# (This private macro should not be called outside this file.) 234a6844aabSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 2356fc018e4Smrg[am__api_version='1.13' 236a6844aabSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 237a6844aabSmrgdnl require some minimum version. Point them to the right macro. 2386fc018e4Smrgm4_if([$1], [1.13.4], [], 239a6844aabSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 240a6844aabSmrg]) 241a6844aabSmrg 242a6844aabSmrg# _AM_AUTOCONF_VERSION(VERSION) 243a6844aabSmrg# ----------------------------- 244a6844aabSmrg# aclocal traces this macro to find the Autoconf version. 245a6844aabSmrg# This is a private macro too. Using m4_define simplifies 246a6844aabSmrg# the logic in aclocal, which can simply ignore this definition. 247a6844aabSmrgm4_define([_AM_AUTOCONF_VERSION], []) 2482c393a42Smrg 2492c393a42Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 2502c393a42Smrg# ------------------------------- 251a6844aabSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 252a6844aabSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 2532c393a42SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 2546fc018e4Smrg[AM_AUTOMAKE_VERSION([1.13.4])dnl 255a6844aabSmrgm4_ifndef([AC_AUTOCONF_VERSION], 256a6844aabSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 257a6844aabSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 2582c393a42Smrg 2592c393a42Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 2602c393a42Smrg 2616fc018e4Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 2622c393a42Smrg# 2632c393a42Smrg# This file is free software; the Free Software Foundation 2642c393a42Smrg# gives unlimited permission to copy and/or distribute it, 2652c393a42Smrg# with or without modifications, as long as this notice is preserved. 2662c393a42Smrg 2672c393a42Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 268c9710b42Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 269c9710b42Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 2702c393a42Smrg# 2712c393a42Smrg# Of course, Automake must honor this variable whenever it calls a 2722c393a42Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 2732c393a42Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 2742c393a42Smrg# depending on how configure is run. This is pretty annoying, since 2752c393a42Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 2762c393a42Smrg# source directory, any form will work fine, but in subdirectories a 2772c393a42Smrg# relative path needs to be adjusted first. 2782c393a42Smrg# 2792c393a42Smrg# $ac_aux_dir/missing 2802c393a42Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 2812c393a42Smrg# $top_srcdir/$ac_aux_dir/missing 2822c393a42Smrg# fails if $ac_aux_dir is absolute, 2832c393a42Smrg# fails when called from a subdirectory in a VPATH build with 2842c393a42Smrg# a relative $ac_aux_dir 2852c393a42Smrg# 2862c393a42Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 2872c393a42Smrg# are both prefixed by $srcdir. In an in-source build this is usually 288c9710b42Smrg# harmless because $srcdir is '.', but things will broke when you 2892c393a42Smrg# start a VPATH build or use an absolute $srcdir. 2902c393a42Smrg# 2912c393a42Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 2922c393a42Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 2932c393a42Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 2942c393a42Smrg# and then we would define $MISSING as 2952c393a42Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 2962c393a42Smrg# This will work as long as MISSING is not called from configure, because 2972c393a42Smrg# unfortunately $(top_srcdir) has no meaning in configure. 2982c393a42Smrg# However there are other variables, like CC, which are often used in 2992c393a42Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 3002c393a42Smrg# 3012c393a42Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 3022c393a42Smrg# absolute PATH. The drawback is that using absolute paths prevent a 3032c393a42Smrg# configured tree to be moved without reconfiguration. 3042c393a42Smrg 3052c393a42SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 3062c393a42Smrg[dnl Rely on autoconf to set up CDPATH properly. 3072c393a42SmrgAC_PREREQ([2.50])dnl 3082c393a42Smrg# expand $ac_aux_dir to an absolute path 3092c393a42Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 3102c393a42Smrg]) 3112c393a42Smrg 3122c393a42Smrg# AM_CONDITIONAL -*- Autoconf -*- 3132c393a42Smrg 3146fc018e4Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 3152c393a42Smrg# 3162c393a42Smrg# This file is free software; the Free Software Foundation 3172c393a42Smrg# gives unlimited permission to copy and/or distribute it, 3182c393a42Smrg# with or without modifications, as long as this notice is preserved. 3192c393a42Smrg 3202c393a42Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 3212c393a42Smrg# ------------------------------------- 3222c393a42Smrg# Define a conditional. 3232c393a42SmrgAC_DEFUN([AM_CONDITIONAL], 324c9710b42Smrg[AC_PREREQ([2.52])dnl 325c9710b42Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 326c9710b42Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 327a6844aabSmrgAC_SUBST([$1_TRUE])dnl 328a6844aabSmrgAC_SUBST([$1_FALSE])dnl 329a6844aabSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 330a6844aabSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 331a6844aabSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 3322c393a42Smrgif $2; then 3332c393a42Smrg $1_TRUE= 3342c393a42Smrg $1_FALSE='#' 3352c393a42Smrgelse 3362c393a42Smrg $1_TRUE='#' 3372c393a42Smrg $1_FALSE= 3382c393a42Smrgfi 3392c393a42SmrgAC_CONFIG_COMMANDS_PRE( 3402c393a42Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 3412c393a42Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 3422c393a42SmrgUsually this means the macro was only invoked conditionally.]]) 3432c393a42Smrgfi])]) 3442c393a42Smrg 3456fc018e4Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 3462c393a42Smrg# 3472c393a42Smrg# This file is free software; the Free Software Foundation 3482c393a42Smrg# gives unlimited permission to copy and/or distribute it, 3492c393a42Smrg# with or without modifications, as long as this notice is preserved. 3502c393a42Smrg 3512c393a42Smrg 352c9710b42Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 3532c393a42Smrg# written in clear, in which case automake, when reading aclocal.m4, 3542c393a42Smrg# will think it sees a *use*, and therefore will trigger all it's 3552c393a42Smrg# C support machinery. Also note that it means that autoscan, seeing 3562c393a42Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 3572c393a42Smrg 3582c393a42Smrg 3592c393a42Smrg# _AM_DEPENDENCIES(NAME) 3602c393a42Smrg# ---------------------- 3612c393a42Smrg# See how the compiler implements dependency checking. 362c9710b42Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 3632c393a42Smrg# We try a few techniques and use that to set a single cache variable. 3642c393a42Smrg# 3652c393a42Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 3662c393a42Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 3672c393a42Smrg# dependency, and given that the user is not expected to run this macro, 3682c393a42Smrg# just rely on AC_PROG_CC. 3692c393a42SmrgAC_DEFUN([_AM_DEPENDENCIES], 3702c393a42Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 3712c393a42SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 3722c393a42SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 3732c393a42SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 3742c393a42Smrg 375c9710b42Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 376c9710b42Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 377c9710b42Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 378c9710b42Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 379c9710b42Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 380c9710b42Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 381c9710b42Smrg [depcc="$$1" am_compiler_list=]) 3822c393a42Smrg 3832c393a42SmrgAC_CACHE_CHECK([dependency style of $depcc], 3842c393a42Smrg [am_cv_$1_dependencies_compiler_type], 3852c393a42Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 3862c393a42Smrg # We make a subdir and do the tests there. Otherwise we can end up 3872c393a42Smrg # making bogus files that we don't know about and never remove. For 3882c393a42Smrg # instance it was reported that on HP-UX the gcc test will end up 389c9710b42Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 390c9710b42Smrg # in D". 391ca08ab68Smrg rm -rf conftest.dir 3922c393a42Smrg mkdir conftest.dir 3932c393a42Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 3942c393a42Smrg # using a relative directory. 3952c393a42Smrg cp "$am_depcomp" conftest.dir 3962c393a42Smrg cd conftest.dir 3972c393a42Smrg # We will build objects and dependencies in a subdirectory because 3982c393a42Smrg # it helps to detect inapplicable dependency modes. For instance 3992c393a42Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 4002c393a42Smrg # side effect of compilation, but ICC will put the dependencies in 4012c393a42Smrg # the current directory while Tru64 will put them in the object 4022c393a42Smrg # directory. 4032c393a42Smrg mkdir sub 4042c393a42Smrg 4052c393a42Smrg am_cv_$1_dependencies_compiler_type=none 4062c393a42Smrg if test "$am_compiler_list" = ""; then 4072c393a42Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 4082c393a42Smrg fi 409a6844aabSmrg am__universal=false 410a6844aabSmrg m4_case([$1], [CC], 411a6844aabSmrg [case " $depcc " in #( 412a6844aabSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 413a6844aabSmrg esac], 414a6844aabSmrg [CXX], 415a6844aabSmrg [case " $depcc " in #( 416a6844aabSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 417a6844aabSmrg esac]) 418a6844aabSmrg 4192c393a42Smrg for depmode in $am_compiler_list; do 4202c393a42Smrg # Setup a source with many dependencies, because some compilers 4212c393a42Smrg # like to wrap large dependency lists on column 80 (with \), and 4222c393a42Smrg # we should not choose a depcomp mode which is confused by this. 4232c393a42Smrg # 4242c393a42Smrg # We need to recreate these files for each test, as the compiler may 4252c393a42Smrg # overwrite some of them when testing with obscure command lines. 4262c393a42Smrg # This happens at least with the AIX C compiler. 4272c393a42Smrg : > sub/conftest.c 4282c393a42Smrg for i in 1 2 3 4 5 6; do 4292c393a42Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 430c9710b42Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 431c9710b42Smrg # Solaris 10 /bin/sh. 432c9710b42Smrg echo '/* dummy */' > sub/conftst$i.h 4332c393a42Smrg done 4342c393a42Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 4352c393a42Smrg 436c9710b42Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 437a6844aabSmrg # mode. It turns out that the SunPro C++ compiler does not properly 438c9710b42Smrg # handle '-M -o', and we need to detect this. Also, some Intel 439c9710b42Smrg # versions had trouble with output in subdirs. 440a6844aabSmrg am__obj=sub/conftest.${OBJEXT-o} 441a6844aabSmrg am__minus_obj="-o $am__obj" 4422c393a42Smrg case $depmode in 443a6844aabSmrg gcc) 444a6844aabSmrg # This depmode causes a compiler race in universal mode. 445a6844aabSmrg test "$am__universal" = false || continue 446a6844aabSmrg ;; 4472c393a42Smrg nosideeffect) 448c9710b42Smrg # After this tag, mechanisms are not by side-effect, so they'll 449c9710b42Smrg # only be used when explicitly requested. 4502c393a42Smrg if test "x$enable_dependency_tracking" = xyes; then 4512c393a42Smrg continue 4522c393a42Smrg else 4532c393a42Smrg break 4542c393a42Smrg fi 4552c393a42Smrg ;; 456ca08ab68Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 457c9710b42Smrg # This compiler won't grok '-c -o', but also, the minuso test has 458a6844aabSmrg # not run yet. These depmodes are late enough in the game, and 459a6844aabSmrg # so weak that their functioning should not be impacted. 460a6844aabSmrg am__obj=conftest.${OBJEXT-o} 461a6844aabSmrg am__minus_obj= 462a6844aabSmrg ;; 4632c393a42Smrg none) break ;; 4642c393a42Smrg esac 4652c393a42Smrg if depmode=$depmode \ 466a6844aabSmrg source=sub/conftest.c object=$am__obj \ 4672c393a42Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 468a6844aabSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 4692c393a42Smrg >/dev/null 2>conftest.err && 470a6844aabSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 4712c393a42Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 472a6844aabSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 4732c393a42Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 4742c393a42Smrg # icc doesn't choke on unknown options, it will just issue warnings 4752c393a42Smrg # or remarks (even with -Werror). So we grep stderr for any message 4762c393a42Smrg # that says an option was ignored or not supported. 4772c393a42Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 4782c393a42Smrg # icc: Command line warning: ignoring option '-M'; no argument required 4792c393a42Smrg # The diagnosis changed in icc 8.0: 4802c393a42Smrg # icc: Command line remark: option '-MP' not supported 4812c393a42Smrg if (grep 'ignoring option' conftest.err || 4822c393a42Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 4832c393a42Smrg am_cv_$1_dependencies_compiler_type=$depmode 4842c393a42Smrg break 4852c393a42Smrg fi 4862c393a42Smrg fi 4872c393a42Smrg done 4882c393a42Smrg 4892c393a42Smrg cd .. 4902c393a42Smrg rm -rf conftest.dir 4912c393a42Smrgelse 4922c393a42Smrg am_cv_$1_dependencies_compiler_type=none 4932c393a42Smrgfi 4942c393a42Smrg]) 4952c393a42SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 4962c393a42SmrgAM_CONDITIONAL([am__fastdep$1], [ 4972c393a42Smrg test "x$enable_dependency_tracking" != xno \ 4982c393a42Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 4992c393a42Smrg]) 5002c393a42Smrg 5012c393a42Smrg 5022c393a42Smrg# AM_SET_DEPDIR 5032c393a42Smrg# ------------- 5042c393a42Smrg# Choose a directory name for dependency files. 505c9710b42Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 5062c393a42SmrgAC_DEFUN([AM_SET_DEPDIR], 5072c393a42Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 5082c393a42SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 5092c393a42Smrg]) 5102c393a42Smrg 5112c393a42Smrg 5122c393a42Smrg# AM_DEP_TRACK 5132c393a42Smrg# ------------ 5142c393a42SmrgAC_DEFUN([AM_DEP_TRACK], 515c9710b42Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 516c9710b42SmrgAS_HELP_STRING( 517c9710b42Smrg [--enable-dependency-tracking], 518c9710b42Smrg [do not reject slow dependency extractors]) 519c9710b42SmrgAS_HELP_STRING( 520c9710b42Smrg [--disable-dependency-tracking], 521c9710b42Smrg [speeds up one-time build])]) 5222c393a42Smrgif test "x$enable_dependency_tracking" != xno; then 5232c393a42Smrg am_depcomp="$ac_aux_dir/depcomp" 5242c393a42Smrg AMDEPBACKSLASH='\' 525ca08ab68Smrg am__nodep='_no' 5262c393a42Smrgfi 5272c393a42SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 528a6844aabSmrgAC_SUBST([AMDEPBACKSLASH])dnl 529a6844aabSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 530ca08ab68SmrgAC_SUBST([am__nodep])dnl 531ca08ab68Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 5322c393a42Smrg]) 5332c393a42Smrg 5342c393a42Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 5352c393a42Smrg 5366fc018e4Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 5372c393a42Smrg# 5382c393a42Smrg# This file is free software; the Free Software Foundation 5392c393a42Smrg# gives unlimited permission to copy and/or distribute it, 5402c393a42Smrg# with or without modifications, as long as this notice is preserved. 5412c393a42Smrg 5422c393a42Smrg 5432c393a42Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 5442c393a42Smrg# ------------------------------ 5452c393a42SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 546a6844aabSmrg[{ 5476fc018e4Smrg # Older Autoconf quotes --file arguments for eval, but not when files 548a6844aabSmrg # are listed without --file. Let's play safe and only enable the eval 549a6844aabSmrg # if we detect the quoting. 550a6844aabSmrg case $CONFIG_FILES in 551a6844aabSmrg *\'*) eval set x "$CONFIG_FILES" ;; 552a6844aabSmrg *) set x $CONFIG_FILES ;; 553a6844aabSmrg esac 554a6844aabSmrg shift 555a6844aabSmrg for mf 556a6844aabSmrg do 557a6844aabSmrg # Strip MF so we end up with the name of the file. 558a6844aabSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 559a6844aabSmrg # Check whether this is an Automake generated Makefile or not. 560c9710b42Smrg # We used to match only the files named 'Makefile.in', but 561a6844aabSmrg # some people rename them; so instead we look at the file content. 562a6844aabSmrg # Grep'ing the first line is not enough: some people post-process 563a6844aabSmrg # each Makefile.in and add a new line on top of each file to say so. 564a6844aabSmrg # Grep'ing the whole file is not good either: AIX grep has a line 565a6844aabSmrg # limit of 2048, but all sed's we know have understand at least 4000. 566a6844aabSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 567a6844aabSmrg dirpart=`AS_DIRNAME("$mf")` 568a6844aabSmrg else 569a6844aabSmrg continue 570a6844aabSmrg fi 571a6844aabSmrg # Extract the definition of DEPDIR, am__include, and am__quote 572c9710b42Smrg # from the Makefile without running 'make'. 573a6844aabSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 574a6844aabSmrg test -z "$DEPDIR" && continue 575a6844aabSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 5766fc018e4Smrg test -z "$am__include" && continue 577a6844aabSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 578a6844aabSmrg # Find all dependency output files, they are included files with 579a6844aabSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 580a6844aabSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 581a6844aabSmrg # expansion. 582a6844aabSmrg for file in `sed -n " 583a6844aabSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 584c9710b42Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 585a6844aabSmrg # Make sure the directory exists. 586a6844aabSmrg test -f "$dirpart/$file" && continue 587a6844aabSmrg fdir=`AS_DIRNAME(["$file"])` 588a6844aabSmrg AS_MKDIR_P([$dirpart/$fdir]) 589a6844aabSmrg # echo "creating $dirpart/$file" 590a6844aabSmrg echo '# dummy' > "$dirpart/$file" 591a6844aabSmrg done 5922c393a42Smrg done 593a6844aabSmrg} 5942c393a42Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 5952c393a42Smrg 5962c393a42Smrg 5972c393a42Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 5982c393a42Smrg# ----------------------------- 5992c393a42Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 6002c393a42Smrg# 6012c393a42Smrg# This code is only required when automatic dependency tracking 602c9710b42Smrg# is enabled. FIXME. This creates each '.P' file that we will 6032c393a42Smrg# need in order to bootstrap the dependency handling code. 6042c393a42SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 6052c393a42Smrg[AC_CONFIG_COMMANDS([depfiles], 6062c393a42Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 6072c393a42Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 6082c393a42Smrg]) 6092c393a42Smrg 6102c393a42Smrg# Do all the work for Automake. -*- Autoconf -*- 6112c393a42Smrg 6126fc018e4Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 6132c393a42Smrg# 6142c393a42Smrg# This file is free software; the Free Software Foundation 6152c393a42Smrg# gives unlimited permission to copy and/or distribute it, 6162c393a42Smrg# with or without modifications, as long as this notice is preserved. 6172c393a42Smrg 6182c393a42Smrg# This macro actually does too much. Some checks are only needed if 6192c393a42Smrg# your package does certain things. But this isn't really a big deal. 6202c393a42Smrg 6212c393a42Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 6222c393a42Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 6232c393a42Smrg# ----------------------------------------------- 6242c393a42Smrg# The call with PACKAGE and VERSION arguments is the old style 6252c393a42Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 6262c393a42Smrg# and VERSION should now be passed to AC_INIT and removed from 6272c393a42Smrg# the call to AM_INIT_AUTOMAKE. 6282c393a42Smrg# We support both call styles for the transition. After 6292c393a42Smrg# the next Automake release, Autoconf can make the AC_INIT 6302c393a42Smrg# arguments mandatory, and then we can depend on a new Autoconf 6312c393a42Smrg# release and drop the old call support. 6322c393a42SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 6336fc018e4Smrg[AC_PREREQ([2.65])dnl 6342c393a42Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 6352c393a42Smrgdnl the ones we care about. 6362c393a42Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 6372c393a42SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 6382c393a42SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 639a6844aabSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 640a6844aabSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 641a6844aabSmrg # is not polluted with repeated "-I." 642a6844aabSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 643a6844aabSmrg # test to see if srcdir already configured 644a6844aabSmrg if test -f $srcdir/config.status; then 645a6844aabSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 646a6844aabSmrg fi 6472c393a42Smrgfi 6482c393a42Smrg 6492c393a42Smrg# test whether we have cygpath 6502c393a42Smrgif test -z "$CYGPATH_W"; then 6512c393a42Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 6522c393a42Smrg CYGPATH_W='cygpath -w' 6532c393a42Smrg else 6542c393a42Smrg CYGPATH_W=echo 6552c393a42Smrg fi 6562c393a42Smrgfi 6572c393a42SmrgAC_SUBST([CYGPATH_W]) 6582c393a42Smrg 6592c393a42Smrg# Define the identity of the package. 6602c393a42Smrgdnl Distinguish between old-style and new-style calls. 6612c393a42Smrgm4_ifval([$2], 662c9710b42Smrg[AC_DIAGNOSE([obsolete], 6636fc018e4Smrg [$0: two- and three-arguments forms are deprecated.]) 664c9710b42Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 6652c393a42Smrg AC_SUBST([PACKAGE], [$1])dnl 6662c393a42Smrg AC_SUBST([VERSION], [$2])], 6672c393a42Smrg[_AM_SET_OPTIONS([$1])dnl 668a6844aabSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 669c9710b42Smrgm4_if( 670c9710b42Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 671c9710b42Smrg [ok:ok],, 672a6844aabSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 6732c393a42Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 6742c393a42Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 6752c393a42Smrg 6762c393a42Smrg_AM_IF_OPTION([no-define],, 677c9710b42Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 678c9710b42Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 6792c393a42Smrg 6802c393a42Smrg# Some tools Automake needs. 6812c393a42SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 6822c393a42SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 683c9710b42SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 684c9710b42SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 685c9710b42SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 686c9710b42SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 687c9710b42SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 688a6844aabSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 689a6844aabSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 690c9710b42SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 691c9710b42Smrg# For better backward compatibility. To be removed once Automake 1.9.x 692c9710b42Smrg# dies out for good. For more background, see: 693c9710b42Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 694c9710b42Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 695c9710b42SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 6962c393a42Smrg# We need awk for the "check" target. The system "awk" is bad on 6972c393a42Smrg# some platforms. 6982c393a42SmrgAC_REQUIRE([AC_PROG_AWK])dnl 6992c393a42SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 7002c393a42SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 7012c393a42Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 702a6844aabSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 703a6844aabSmrg [_AM_PROG_TAR([v7])])]) 7042c393a42Smrg_AM_IF_OPTION([no-dependencies],, 7052c393a42Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 706c9710b42Smrg [_AM_DEPENDENCIES([CC])], 707c9710b42Smrg [m4_define([AC_PROG_CC], 708c9710b42Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 7092c393a42SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 710c9710b42Smrg [_AM_DEPENDENCIES([CXX])], 711c9710b42Smrg [m4_define([AC_PROG_CXX], 712c9710b42Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 713a6844aabSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 714c9710b42Smrg [_AM_DEPENDENCIES([OBJC])], 715c9710b42Smrg [m4_define([AC_PROG_OBJC], 716c9710b42Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 7176fc018e4SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 718c9710b42Smrg [_AM_DEPENDENCIES([OBJCXX])], 719c9710b42Smrg [m4_define([AC_PROG_OBJCXX], 7206fc018e4Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 7212c393a42Smrg]) 7226fc018e4SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 7236fc018e4Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 7246fc018e4Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 7256fc018e4Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 726a6844aabSmrgAC_CONFIG_COMMANDS_PRE(dnl 727a6844aabSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 728a6844aabSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 7292c393a42Smrg]) 7302c393a42Smrg 731c9710b42Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 732a6844aabSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 733a6844aabSmrgdnl mangled by Autoconf and run in a shell conditional statement. 734a6844aabSmrgm4_define([_AC_COMPILER_EXEEXT], 735a6844aabSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 736a6844aabSmrg 7372c393a42Smrg 7382c393a42Smrg# When config.status generates a header, we must update the stamp-h file. 7392c393a42Smrg# This file resides in the same directory as the config header 7402c393a42Smrg# that is generated. The stamp files are numbered to have different names. 7412c393a42Smrg 7422c393a42Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 7432c393a42Smrg# loop where config.status creates the headers, so we can generate 7442c393a42Smrg# our stamp files there. 7452c393a42SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 7462c393a42Smrg[# Compute $1's index in $config_headers. 747a6844aabSmrg_am_arg=$1 7482c393a42Smrg_am_stamp_count=1 7492c393a42Smrgfor _am_header in $config_headers :; do 7502c393a42Smrg case $_am_header in 751a6844aabSmrg $_am_arg | $_am_arg:* ) 7522c393a42Smrg break ;; 7532c393a42Smrg * ) 7542c393a42Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 7552c393a42Smrg esac 7562c393a42Smrgdone 757a6844aabSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 7582c393a42Smrg 7596fc018e4Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 7602c393a42Smrg# 7612c393a42Smrg# This file is free software; the Free Software Foundation 7622c393a42Smrg# gives unlimited permission to copy and/or distribute it, 7632c393a42Smrg# with or without modifications, as long as this notice is preserved. 7642c393a42Smrg 7652c393a42Smrg# AM_PROG_INSTALL_SH 7662c393a42Smrg# ------------------ 7672c393a42Smrg# Define $install_sh. 7682c393a42SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 7692c393a42Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 770a6844aabSmrgif test x"${install_sh}" != xset; then 771a6844aabSmrg case $am_aux_dir in 772a6844aabSmrg *\ * | *\ *) 773a6844aabSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 774a6844aabSmrg *) 775a6844aabSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 776a6844aabSmrg esac 777a6844aabSmrgfi 778c9710b42SmrgAC_SUBST([install_sh])]) 7792c393a42Smrg 7806fc018e4Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 7812c393a42Smrg# 7822c393a42Smrg# This file is free software; the Free Software Foundation 7832c393a42Smrg# gives unlimited permission to copy and/or distribute it, 7842c393a42Smrg# with or without modifications, as long as this notice is preserved. 7852c393a42Smrg 7862c393a42Smrg# Check whether the underlying file-system supports filenames 7872c393a42Smrg# with a leading dot. For instance MS-DOS doesn't. 7882c393a42SmrgAC_DEFUN([AM_SET_LEADING_DOT], 7892c393a42Smrg[rm -rf .tst 2>/dev/null 7902c393a42Smrgmkdir .tst 2>/dev/null 7912c393a42Smrgif test -d .tst; then 7922c393a42Smrg am__leading_dot=. 7932c393a42Smrgelse 7942c393a42Smrg am__leading_dot=_ 7952c393a42Smrgfi 7962c393a42Smrgrmdir .tst 2>/dev/null 7972c393a42SmrgAC_SUBST([am__leading_dot])]) 7982c393a42Smrg 7992c393a42Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 8002c393a42Smrg 8016fc018e4Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 8022c393a42Smrg# 8032c393a42Smrg# This file is free software; the Free Software Foundation 8042c393a42Smrg# gives unlimited permission to copy and/or distribute it, 8052c393a42Smrg# with or without modifications, as long as this notice is preserved. 8062c393a42Smrg 8072c393a42Smrg# AM_MAKE_INCLUDE() 8082c393a42Smrg# ----------------- 8092c393a42Smrg# Check to see how make treats includes. 8102c393a42SmrgAC_DEFUN([AM_MAKE_INCLUDE], 8112c393a42Smrg[am_make=${MAKE-make} 8122c393a42Smrgcat > confinc << 'END' 8132c393a42Smrgam__doit: 814a6844aabSmrg @echo this is the am__doit target 8152c393a42Smrg.PHONY: am__doit 8162c393a42SmrgEND 8172c393a42Smrg# If we don't find an include directive, just comment out the code. 8182c393a42SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 8192c393a42Smrgam__include="#" 8202c393a42Smrgam__quote= 8212c393a42Smrg_am_result=none 8222c393a42Smrg# First try GNU make style include. 8232c393a42Smrgecho "include confinc" > confmf 824c9710b42Smrg# Ignore all kinds of additional output from 'make'. 825a6844aabSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 826a6844aabSmrg*the\ am__doit\ target*) 827a6844aabSmrg am__include=include 828a6844aabSmrg am__quote= 829a6844aabSmrg _am_result=GNU 830a6844aabSmrg ;; 831a6844aabSmrgesac 8322c393a42Smrg# Now try BSD make style include. 8332c393a42Smrgif test "$am__include" = "#"; then 8342c393a42Smrg echo '.include "confinc"' > confmf 835a6844aabSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 836a6844aabSmrg *the\ am__doit\ target*) 837a6844aabSmrg am__include=.include 838a6844aabSmrg am__quote="\"" 839a6844aabSmrg _am_result=BSD 840a6844aabSmrg ;; 841a6844aabSmrg esac 8422c393a42Smrgfi 8432c393a42SmrgAC_SUBST([am__include]) 8442c393a42SmrgAC_SUBST([am__quote]) 8452c393a42SmrgAC_MSG_RESULT([$_am_result]) 8462c393a42Smrgrm -f confinc confmf 8472c393a42Smrg]) 8482c393a42Smrg 8492c393a42Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 8502c393a42Smrg 8516fc018e4Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 8522c393a42Smrg# 8532c393a42Smrg# This file is free software; the Free Software Foundation 8542c393a42Smrg# gives unlimited permission to copy and/or distribute it, 8552c393a42Smrg# with or without modifications, as long as this notice is preserved. 8562c393a42Smrg 8572c393a42Smrg# AM_MISSING_PROG(NAME, PROGRAM) 8582c393a42Smrg# ------------------------------ 8592c393a42SmrgAC_DEFUN([AM_MISSING_PROG], 8602c393a42Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8612c393a42Smrg$1=${$1-"${am_missing_run}$2"} 8622c393a42SmrgAC_SUBST($1)]) 8632c393a42Smrg 8642c393a42Smrg# AM_MISSING_HAS_RUN 8652c393a42Smrg# ------------------ 8666fc018e4Smrg# Define MISSING if not defined so far and test if it is modern enough. 8676fc018e4Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 8682c393a42SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8692c393a42Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 870a6844aabSmrgAC_REQUIRE_AUX_FILE([missing])dnl 871a6844aabSmrgif test x"${MISSING+set}" != xset; then 872a6844aabSmrg case $am_aux_dir in 873a6844aabSmrg *\ * | *\ *) 874a6844aabSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 875a6844aabSmrg *) 876a6844aabSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 877a6844aabSmrg esac 878a6844aabSmrgfi 8792c393a42Smrg# Use eval to expand $SHELL 8806fc018e4Smrgif eval "$MISSING --is-lightweight"; then 8816fc018e4Smrg am_missing_run="$MISSING " 8822c393a42Smrgelse 8832c393a42Smrg am_missing_run= 884c9710b42Smrg AC_MSG_WARN(['missing' script is too old or missing]) 8852c393a42Smrgfi 8862c393a42Smrg]) 8872c393a42Smrg 8882c393a42Smrg# Helper functions for option handling. -*- Autoconf -*- 8892c393a42Smrg 8906fc018e4Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 8912c393a42Smrg# 8922c393a42Smrg# This file is free software; the Free Software Foundation 8932c393a42Smrg# gives unlimited permission to copy and/or distribute it, 8942c393a42Smrg# with or without modifications, as long as this notice is preserved. 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], 905c9710b42Smrg[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 9216fc018e4Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 9222c393a42Smrg# 9232c393a42Smrg# This file is free software; the Free Software Foundation 9242c393a42Smrg# gives unlimited permission to copy and/or distribute it, 9252c393a42Smrg# with or without modifications, as long as this notice is preserved. 9262c393a42Smrg 9272c393a42Smrg# AM_SANITY_CHECK 9282c393a42Smrg# --------------- 9292c393a42SmrgAC_DEFUN([AM_SANITY_CHECK], 9302c393a42Smrg[AC_MSG_CHECKING([whether build environment is sane]) 931a6844aabSmrg# Reject unsafe characters in $srcdir or the absolute working directory 932a6844aabSmrg# name. Accept space and tab only in the latter. 933a6844aabSmrgam_lf=' 934a6844aabSmrg' 935a6844aabSmrgcase `pwd` in 936a6844aabSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 937a6844aabSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 938a6844aabSmrgesac 939a6844aabSmrgcase $srcdir in 940a6844aabSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 941c9710b42Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 942a6844aabSmrgesac 943a6844aabSmrg 944c9710b42Smrg# Do 'set' in a subshell so we don't clobber the current shell's 9452c393a42Smrg# arguments. Must try -L first in case configure is actually a 9462c393a42Smrg# symlink; some systems play weird games with the mod time of symlinks 9472c393a42Smrg# (eg FreeBSD returns the mod time of the symlink's containing 9482c393a42Smrg# directory). 9492c393a42Smrgif ( 950c9710b42Smrg am_has_slept=no 951c9710b42Smrg for am_try in 1 2; do 952c9710b42Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 953c9710b42Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 954c9710b42Smrg if test "$[*]" = "X"; then 955c9710b42Smrg # -L didn't work. 956c9710b42Smrg set X `ls -t "$srcdir/configure" conftest.file` 957c9710b42Smrg fi 958c9710b42Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 959c9710b42Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 960c9710b42Smrg 961c9710b42Smrg # If neither matched, then we have a broken ls. This can happen 962c9710b42Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 963c9710b42Smrg # broken ls alias from the environment. This has actually 964c9710b42Smrg # happened. Such a system could not be considered "sane". 965c9710b42Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 966c9710b42Smrg alias in your environment]) 967c9710b42Smrg fi 968c9710b42Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 969c9710b42Smrg break 970c9710b42Smrg fi 971c9710b42Smrg # Just in case. 972c9710b42Smrg sleep 1 973c9710b42Smrg am_has_slept=yes 974c9710b42Smrg done 9752c393a42Smrg test "$[2]" = conftest.file 9762c393a42Smrg ) 9772c393a42Smrgthen 9782c393a42Smrg # Ok. 9792c393a42Smrg : 9802c393a42Smrgelse 9812c393a42Smrg AC_MSG_ERROR([newly created file is older than distributed files! 9822c393a42SmrgCheck your system clock]) 9832c393a42Smrgfi 984c9710b42SmrgAC_MSG_RESULT([yes]) 985c9710b42Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 986c9710b42Smrg# generated files are strictly newer. 987c9710b42Smrgam_sleep_pid= 988c9710b42Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 989c9710b42Smrg ( sleep 1 ) & 990c9710b42Smrg am_sleep_pid=$! 991c9710b42Smrgfi 992c9710b42SmrgAC_CONFIG_COMMANDS_PRE( 993c9710b42Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 994c9710b42Smrg if test -n "$am_sleep_pid"; then 995c9710b42Smrg # Hide warnings about reused PIDs. 996c9710b42Smrg wait $am_sleep_pid 2>/dev/null 997c9710b42Smrg fi 998c9710b42Smrg AC_MSG_RESULT([done])]) 999c9710b42Smrgrm -f conftest.file 1000c9710b42Smrg]) 10012c393a42Smrg 10026fc018e4Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 1003a6844aabSmrg# 1004a6844aabSmrg# This file is free software; the Free Software Foundation 1005a6844aabSmrg# gives unlimited permission to copy and/or distribute it, 1006a6844aabSmrg# with or without modifications, as long as this notice is preserved. 1007a6844aabSmrg 1008a6844aabSmrg# AM_SILENT_RULES([DEFAULT]) 1009a6844aabSmrg# -------------------------- 1010a6844aabSmrg# Enable less verbose build rules; with the default set to DEFAULT 1011c9710b42Smrg# ("yes" being less verbose, "no" or empty being verbose). 1012a6844aabSmrgAC_DEFUN([AM_SILENT_RULES], 1013c9710b42Smrg[AC_ARG_ENABLE([silent-rules], [dnl 1014c9710b42SmrgAS_HELP_STRING( 1015c9710b42Smrg [--enable-silent-rules], 1016c9710b42Smrg [less verbose build output (undo: "make V=1")]) 1017c9710b42SmrgAS_HELP_STRING( 1018c9710b42Smrg [--disable-silent-rules], 1019c9710b42Smrg [verbose build output (undo: "make V=0")])dnl 1020c9710b42Smrg]) 1021c9710b42Smrgcase $enable_silent_rules in @%:@ ((( 1022c9710b42Smrg yes) AM_DEFAULT_VERBOSITY=0;; 1023c9710b42Smrg no) AM_DEFAULT_VERBOSITY=1;; 1024c9710b42Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1025a6844aabSmrgesac 1026ca08ab68Smrgdnl 1027c9710b42Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1028ca08ab68Smrgdnl do not support nested variable expansions. 1029ca08ab68Smrgdnl See automake bug#9928 and bug#10237. 1030ca08ab68Smrgam_make=${MAKE-make} 1031ca08ab68SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1032ca08ab68Smrg [am_cv_make_support_nested_variables], 1033ca08ab68Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1034ca08ab68SmrgBAR0=false 1035ca08ab68SmrgBAR1=true 1036ca08ab68SmrgV=1 1037ca08ab68Smrgam__doit: 1038ca08ab68Smrg @$(TRUE) 1039ca08ab68Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1040ca08ab68Smrg am_cv_make_support_nested_variables=yes 1041ca08ab68Smrgelse 1042ca08ab68Smrg am_cv_make_support_nested_variables=no 1043ca08ab68Smrgfi]) 1044ca08ab68Smrgif test $am_cv_make_support_nested_variables = yes; then 1045c9710b42Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 1046ca08ab68Smrg AM_V='$(V)' 1047ca08ab68Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1048ca08ab68Smrgelse 1049ca08ab68Smrg AM_V=$AM_DEFAULT_VERBOSITY 1050ca08ab68Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1051ca08ab68Smrgfi 1052ca08ab68SmrgAC_SUBST([AM_V])dnl 1053ca08ab68SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1054ca08ab68SmrgAC_SUBST([AM_DEFAULT_V])dnl 1055ca08ab68SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1056a6844aabSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1057a6844aabSmrgAM_BACKSLASH='\' 1058a6844aabSmrgAC_SUBST([AM_BACKSLASH])dnl 1059a6844aabSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1060a6844aabSmrg]) 1061a6844aabSmrg 10626fc018e4Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 10632c393a42Smrg# 10642c393a42Smrg# This file is free software; the Free Software Foundation 10652c393a42Smrg# gives unlimited permission to copy and/or distribute it, 10662c393a42Smrg# with or without modifications, as long as this notice is preserved. 10672c393a42Smrg 10682c393a42Smrg# AM_PROG_INSTALL_STRIP 10692c393a42Smrg# --------------------- 1070c9710b42Smrg# One issue with vendor 'install' (even GNU) is that you can't 10712c393a42Smrg# specify the program used to strip binaries. This is especially 10722c393a42Smrg# annoying in cross-compiling environments, where the build's strip 10732c393a42Smrg# is unlikely to handle the host's binaries. 10742c393a42Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1075c9710b42Smrg# always use install-sh in "make install-strip", and initialize 10762c393a42Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 10772c393a42SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 10782c393a42Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1079c9710b42Smrg# Installed binaries are usually stripped using 'strip' when the user 1080c9710b42Smrg# run "make install-strip". However 'strip' might not be the right 10812c393a42Smrg# tool to use in cross-compilation environments, therefore Automake 1082c9710b42Smrg# will honor the 'STRIP' environment variable to overrule this program. 1083c9710b42Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 10842c393a42Smrgif test "$cross_compiling" != no; then 10852c393a42Smrg AC_CHECK_TOOL([STRIP], [strip], :) 10862c393a42Smrgfi 1087a6844aabSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10882c393a42SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10892c393a42Smrg 10906fc018e4Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1091a6844aabSmrg# 1092a6844aabSmrg# This file is free software; the Free Software Foundation 1093a6844aabSmrg# gives unlimited permission to copy and/or distribute it, 1094a6844aabSmrg# with or without modifications, as long as this notice is preserved. 1095a6844aabSmrg 1096a6844aabSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1097a6844aabSmrg# --------------------------- 1098a6844aabSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1099a6844aabSmrg# This macro is traced by Automake. 1100a6844aabSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1101a6844aabSmrg 1102a6844aabSmrg# AM_SUBST_NOTMAKE(VARIABLE) 1103ca08ab68Smrg# -------------------------- 1104a6844aabSmrg# Public sister of _AM_SUBST_NOTMAKE. 1105a6844aabSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1106a6844aabSmrg 11072c393a42Smrg# Check how to create a tarball. -*- Autoconf -*- 11082c393a42Smrg 11096fc018e4Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 11102c393a42Smrg# 11112c393a42Smrg# This file is free software; the Free Software Foundation 11122c393a42Smrg# gives unlimited permission to copy and/or distribute it, 11132c393a42Smrg# with or without modifications, as long as this notice is preserved. 11142c393a42Smrg 11152c393a42Smrg# _AM_PROG_TAR(FORMAT) 11162c393a42Smrg# -------------------- 11172c393a42Smrg# Check how to create a tarball in format FORMAT. 1118c9710b42Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 11192c393a42Smrg# 11202c393a42Smrg# Substitute a variable $(am__tar) that is a command 11212c393a42Smrg# writing to stdout a FORMAT-tarball containing the directory 11222c393a42Smrg# $tardir. 11232c393a42Smrg# tardir=directory && $(am__tar) > result.tar 11242c393a42Smrg# 11252c393a42Smrg# Substitute a variable $(am__untar) that extract such 11262c393a42Smrg# a tarball read from stdin. 11272c393a42Smrg# $(am__untar) < result.tar 11286fc018e4Smrg# 11292c393a42SmrgAC_DEFUN([_AM_PROG_TAR], 1130ca08ab68Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1131ca08ab68Smrg# in the wild :-( We should find a proper way to deprecate it ... 1132ca08ab68SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11336fc018e4Smrg 11346fc018e4Smrg# We'll loop over all known methods to create a tar archive until one works. 11352c393a42Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11362c393a42Smrg 11376fc018e4Smrgm4_if([$1], [v7], 11386fc018e4Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11396fc018e4Smrg 11406fc018e4Smrg [m4_case([$1], 11416fc018e4Smrg [ustar], 11426fc018e4Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 11436fc018e4Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 11446fc018e4Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 11456fc018e4Smrg # and bug#13588). 11466fc018e4Smrg am_max_uid=2097151 # 2^21 - 1 11476fc018e4Smrg am_max_gid=$am_max_uid 11486fc018e4Smrg # The $UID and $GID variables are not portable, so we need to resort 11496fc018e4Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 11506fc018e4Smrg # below are definitely unexpected, so allow the users to see them 11516fc018e4Smrg # (that is, avoid stderr redirection). 11526fc018e4Smrg am_uid=`id -u || echo unknown` 11536fc018e4Smrg am_gid=`id -g || echo unknown` 11546fc018e4Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 11556fc018e4Smrg if test $am_uid -le $am_max_uid; then 11566fc018e4Smrg AC_MSG_RESULT([yes]) 11576fc018e4Smrg else 11586fc018e4Smrg AC_MSG_RESULT([no]) 11596fc018e4Smrg _am_tools=none 11606fc018e4Smrg fi 11616fc018e4Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 11626fc018e4Smrg if test $am_gid -le $am_max_gid; then 11636fc018e4Smrg AC_MSG_RESULT([yes]) 11646fc018e4Smrg else 11656fc018e4Smrg AC_MSG_RESULT([no]) 11666fc018e4Smrg _am_tools=none 11676fc018e4Smrg fi], 11686fc018e4Smrg 11696fc018e4Smrg [pax], 11706fc018e4Smrg [], 11716fc018e4Smrg 11726fc018e4Smrg [m4_fatal([Unknown tar format])]) 11736fc018e4Smrg 11746fc018e4Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 11756fc018e4Smrg 11766fc018e4Smrg # Go ahead even if we have the value already cached. We do so because we 11776fc018e4Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 11786fc018e4Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 11796fc018e4Smrg 11806fc018e4Smrg for _am_tool in $_am_tools; do 11816fc018e4Smrg case $_am_tool in 11826fc018e4Smrg gnutar) 11836fc018e4Smrg for _am_tar in tar gnutar gtar; do 11846fc018e4Smrg AM_RUN_LOG([$_am_tar --version]) && break 11856fc018e4Smrg done 11866fc018e4Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11876fc018e4Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11886fc018e4Smrg am__untar="$_am_tar -xf -" 11896fc018e4Smrg ;; 11906fc018e4Smrg plaintar) 11916fc018e4Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 11926fc018e4Smrg # ustar tarball either. 11936fc018e4Smrg (tar --version) >/dev/null 2>&1 && continue 11946fc018e4Smrg am__tar='tar chf - "$$tardir"' 11956fc018e4Smrg am__tar_='tar chf - "$tardir"' 11966fc018e4Smrg am__untar='tar xf -' 11976fc018e4Smrg ;; 11986fc018e4Smrg pax) 11996fc018e4Smrg am__tar='pax -L -x $1 -w "$$tardir"' 12006fc018e4Smrg am__tar_='pax -L -x $1 -w "$tardir"' 12016fc018e4Smrg am__untar='pax -r' 12026fc018e4Smrg ;; 12036fc018e4Smrg cpio) 12046fc018e4Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12056fc018e4Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12066fc018e4Smrg am__untar='cpio -i -H $1 -d' 12076fc018e4Smrg ;; 12086fc018e4Smrg none) 12096fc018e4Smrg am__tar=false 12106fc018e4Smrg am__tar_=false 12116fc018e4Smrg am__untar=false 12126fc018e4Smrg ;; 12136fc018e4Smrg esac 12142c393a42Smrg 12156fc018e4Smrg # If the value was cached, stop now. We just wanted to have am__tar 12166fc018e4Smrg # and am__untar set. 12176fc018e4Smrg test -n "${am_cv_prog_tar_$1}" && break 12186fc018e4Smrg 12196fc018e4Smrg # tar/untar a dummy directory, and stop if the command works. 12206fc018e4Smrg rm -rf conftest.dir 12216fc018e4Smrg mkdir conftest.dir 12226fc018e4Smrg echo GrepMe > conftest.dir/file 12236fc018e4Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12246fc018e4Smrg rm -rf conftest.dir 12256fc018e4Smrg if test -s conftest.tar; then 12266fc018e4Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 12276fc018e4Smrg AM_RUN_LOG([cat conftest.dir/file]) 12286fc018e4Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12296fc018e4Smrg fi 12306fc018e4Smrg done 12312c393a42Smrg rm -rf conftest.dir 12322c393a42Smrg 12336fc018e4Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12346fc018e4Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12356fc018e4Smrg 12362c393a42SmrgAC_SUBST([am__tar]) 12372c393a42SmrgAC_SUBST([am__untar]) 12382c393a42Smrg]) # _AM_PROG_TAR 12392c393a42Smrg 1240c9710b42Smrgm4_include([m4/ax_cc_for_build.m4]) 1241c9710b42Smrgm4_include([m4/ax_create_stdint_h.m4]) 1242c9710b42Smrgm4_include([m4/ax_pthread.m4]) 1243ca08ab68Smrgm4_include([m4/libtool.m4]) 1244ca08ab68Smrgm4_include([m4/ltoptions.m4]) 1245ca08ab68Smrgm4_include([m4/ltsugar.m4]) 1246ca08ab68Smrgm4_include([m4/ltversion.m4]) 1247ca08ab68Smrgm4_include([m4/lt~obsolete.m4]) 1248