aclocal.m4 revision 92bb16f8
192bb16f8Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*- 292bb16f8Smrg 392bb16f8Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 492bb16f8Smrg# 2005 Free Software Foundation, Inc. 592bb16f8Smrg# This file is free software; the Free Software Foundation 692bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 792bb16f8Smrg# with or without modifications, as long as this notice is preserved. 892bb16f8Smrg 992bb16f8Smrg# This program is distributed in the hope that it will be useful, 1092bb16f8Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1192bb16f8Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1292bb16f8Smrg# PARTICULAR PURPOSE. 1392bb16f8Smrg 1492bb16f8Smrgdnl Copyright 2005 Red Hat, Inc 1592bb16f8Smrgdnl 1692bb16f8Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1792bb16f8Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1892bb16f8Smrgdnl the above copyright notice appear in all copies and that both that 1992bb16f8Smrgdnl copyright notice and this permission notice appear in supporting 2092bb16f8Smrgdnl documentation. 2192bb16f8Smrgdnl 2292bb16f8Smrgdnl The above copyright notice and this permission notice shall be included 2392bb16f8Smrgdnl in all copies or substantial portions of the Software. 2492bb16f8Smrgdnl 2592bb16f8Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2692bb16f8Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2792bb16f8Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2892bb16f8Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2992bb16f8Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 3092bb16f8Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 3192bb16f8Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 3292bb16f8Smrgdnl 3392bb16f8Smrgdnl Except as contained in this notice, the name of the copyright holders shall 3492bb16f8Smrgdnl not be used in advertising or otherwise to promote the sale, use or 3592bb16f8Smrgdnl other dealings in this Software without prior written authorization 3692bb16f8Smrgdnl from the copyright holders. 3792bb16f8Smrgdnl 3892bb16f8Smrg 3992bb16f8Smrg# XORG_RELEASE_VERSION 4092bb16f8Smrg# -------------------- 4192bb16f8Smrg# Adds --with/without-release-string and changes the PACKAGE and 4292bb16f8Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 4392bb16f8Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 4492bb16f8Smrg 4592bb16f8SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 4692bb16f8Smrg AC_ARG_WITH(release-version, 4792bb16f8Smrg AC_HELP_STRING([--with-release-version=STRING], 4892bb16f8Smrg [Use release version string in package name]), 4992bb16f8Smrg [RELEASE_VERSION="$withval"], 5092bb16f8Smrg [RELEASE_VERSION=""]) 5192bb16f8Smrg if test "x$RELEASE_VERSION" != "x"; then 5292bb16f8Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 5392bb16f8Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 5492bb16f8Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 5592bb16f8Smrg fi 5692bb16f8Smrg]) 5792bb16f8Smrg 5892bb16f8Smrg# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. 5992bb16f8Smrg# 6092bb16f8Smrg# This file is free software; the Free Software Foundation 6192bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 6292bb16f8Smrg# with or without modifications, as long as this notice is preserved. 6392bb16f8Smrg 6492bb16f8Smrg# AM_AUTOMAKE_VERSION(VERSION) 6592bb16f8Smrg# ---------------------------- 6692bb16f8Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 6792bb16f8Smrg# generated from the m4 files accompanying Automake X.Y. 6892bb16f8SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 6992bb16f8Smrg 7092bb16f8Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 7192bb16f8Smrg# ------------------------------- 7292bb16f8Smrg# Call AM_AUTOMAKE_VERSION so it can be traced. 7392bb16f8Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 7492bb16f8SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 7592bb16f8Smrg [AM_AUTOMAKE_VERSION([1.9.6])]) 7692bb16f8Smrg 7792bb16f8Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 7892bb16f8Smrg 7992bb16f8Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8092bb16f8Smrg# 8192bb16f8Smrg# This file is free software; the Free Software Foundation 8292bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 8392bb16f8Smrg# with or without modifications, as long as this notice is preserved. 8492bb16f8Smrg 8592bb16f8Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8692bb16f8Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8792bb16f8Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8892bb16f8Smrg# 8992bb16f8Smrg# Of course, Automake must honor this variable whenever it calls a 9092bb16f8Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 9192bb16f8Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 9292bb16f8Smrg# depending on how configure is run. This is pretty annoying, since 9392bb16f8Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 9492bb16f8Smrg# source directory, any form will work fine, but in subdirectories a 9592bb16f8Smrg# relative path needs to be adjusted first. 9692bb16f8Smrg# 9792bb16f8Smrg# $ac_aux_dir/missing 9892bb16f8Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 9992bb16f8Smrg# $top_srcdir/$ac_aux_dir/missing 10092bb16f8Smrg# fails if $ac_aux_dir is absolute, 10192bb16f8Smrg# fails when called from a subdirectory in a VPATH build with 10292bb16f8Smrg# a relative $ac_aux_dir 10392bb16f8Smrg# 10492bb16f8Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10592bb16f8Smrg# are both prefixed by $srcdir. In an in-source build this is usually 10692bb16f8Smrg# harmless because $srcdir is `.', but things will broke when you 10792bb16f8Smrg# start a VPATH build or use an absolute $srcdir. 10892bb16f8Smrg# 10992bb16f8Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11092bb16f8Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11192bb16f8Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11292bb16f8Smrg# and then we would define $MISSING as 11392bb16f8Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 11492bb16f8Smrg# This will work as long as MISSING is not called from configure, because 11592bb16f8Smrg# unfortunately $(top_srcdir) has no meaning in configure. 11692bb16f8Smrg# However there are other variables, like CC, which are often used in 11792bb16f8Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 11892bb16f8Smrg# 11992bb16f8Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 12092bb16f8Smrg# absolute PATH. The drawback is that using absolute paths prevent a 12192bb16f8Smrg# configured tree to be moved without reconfiguration. 12292bb16f8Smrg 12392bb16f8SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 12492bb16f8Smrg[dnl Rely on autoconf to set up CDPATH properly. 12592bb16f8SmrgAC_PREREQ([2.50])dnl 12692bb16f8Smrg# expand $ac_aux_dir to an absolute path 12792bb16f8Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 12892bb16f8Smrg]) 12992bb16f8Smrg 13092bb16f8Smrg# AM_CONDITIONAL -*- Autoconf -*- 13192bb16f8Smrg 13292bb16f8Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 13392bb16f8Smrg# Free Software Foundation, Inc. 13492bb16f8Smrg# 13592bb16f8Smrg# This file is free software; the Free Software Foundation 13692bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 13792bb16f8Smrg# with or without modifications, as long as this notice is preserved. 13892bb16f8Smrg 13992bb16f8Smrg# serial 7 14092bb16f8Smrg 14192bb16f8Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 14292bb16f8Smrg# ------------------------------------- 14392bb16f8Smrg# Define a conditional. 14492bb16f8SmrgAC_DEFUN([AM_CONDITIONAL], 14592bb16f8Smrg[AC_PREREQ(2.52)dnl 14692bb16f8Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 14792bb16f8Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 14892bb16f8SmrgAC_SUBST([$1_TRUE]) 14992bb16f8SmrgAC_SUBST([$1_FALSE]) 15092bb16f8Smrgif $2; then 15192bb16f8Smrg $1_TRUE= 15292bb16f8Smrg $1_FALSE='#' 15392bb16f8Smrgelse 15492bb16f8Smrg $1_TRUE='#' 15592bb16f8Smrg $1_FALSE= 15692bb16f8Smrgfi 15792bb16f8SmrgAC_CONFIG_COMMANDS_PRE( 15892bb16f8Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 15992bb16f8Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 16092bb16f8SmrgUsually this means the macro was only invoked conditionally.]]) 16192bb16f8Smrgfi])]) 16292bb16f8Smrg 16392bb16f8Smrg# Do all the work for Automake. -*- Autoconf -*- 16492bb16f8Smrg 16592bb16f8Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 16692bb16f8Smrg# Free Software Foundation, Inc. 16792bb16f8Smrg# 16892bb16f8Smrg# This file is free software; the Free Software Foundation 16992bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 17092bb16f8Smrg# with or without modifications, as long as this notice is preserved. 17192bb16f8Smrg 17292bb16f8Smrg# serial 12 17392bb16f8Smrg 17492bb16f8Smrg# This macro actually does too much. Some checks are only needed if 17592bb16f8Smrg# your package does certain things. But this isn't really a big deal. 17692bb16f8Smrg 17792bb16f8Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 17892bb16f8Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 17992bb16f8Smrg# ----------------------------------------------- 18092bb16f8Smrg# The call with PACKAGE and VERSION arguments is the old style 18192bb16f8Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 18292bb16f8Smrg# and VERSION should now be passed to AC_INIT and removed from 18392bb16f8Smrg# the call to AM_INIT_AUTOMAKE. 18492bb16f8Smrg# We support both call styles for the transition. After 18592bb16f8Smrg# the next Automake release, Autoconf can make the AC_INIT 18692bb16f8Smrg# arguments mandatory, and then we can depend on a new Autoconf 18792bb16f8Smrg# release and drop the old call support. 18892bb16f8SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 18992bb16f8Smrg[AC_PREREQ([2.58])dnl 19092bb16f8Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 19192bb16f8Smrgdnl the ones we care about. 19292bb16f8Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 19392bb16f8SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 19492bb16f8SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 19592bb16f8Smrg# test to see if srcdir already configured 19692bb16f8Smrgif test "`cd $srcdir && pwd`" != "`pwd`" && 19792bb16f8Smrg test -f $srcdir/config.status; then 19892bb16f8Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 19992bb16f8Smrgfi 20092bb16f8Smrg 20192bb16f8Smrg# test whether we have cygpath 20292bb16f8Smrgif test -z "$CYGPATH_W"; then 20392bb16f8Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 20492bb16f8Smrg CYGPATH_W='cygpath -w' 20592bb16f8Smrg else 20692bb16f8Smrg CYGPATH_W=echo 20792bb16f8Smrg fi 20892bb16f8Smrgfi 20992bb16f8SmrgAC_SUBST([CYGPATH_W]) 21092bb16f8Smrg 21192bb16f8Smrg# Define the identity of the package. 21292bb16f8Smrgdnl Distinguish between old-style and new-style calls. 21392bb16f8Smrgm4_ifval([$2], 21492bb16f8Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 21592bb16f8Smrg AC_SUBST([PACKAGE], [$1])dnl 21692bb16f8Smrg AC_SUBST([VERSION], [$2])], 21792bb16f8Smrg[_AM_SET_OPTIONS([$1])dnl 21892bb16f8Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 21992bb16f8Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 22092bb16f8Smrg 22192bb16f8Smrg_AM_IF_OPTION([no-define],, 22292bb16f8Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 22392bb16f8Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 22492bb16f8Smrg 22592bb16f8Smrg# Some tools Automake needs. 22692bb16f8SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 22792bb16f8SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 22892bb16f8SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 22992bb16f8SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 23092bb16f8SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 23192bb16f8SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 23292bb16f8SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 23392bb16f8SmrgAM_PROG_INSTALL_SH 23492bb16f8SmrgAM_PROG_INSTALL_STRIP 23592bb16f8SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 23692bb16f8Smrg# We need awk for the "check" target. The system "awk" is bad on 23792bb16f8Smrg# some platforms. 23892bb16f8SmrgAC_REQUIRE([AC_PROG_AWK])dnl 23992bb16f8SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 24092bb16f8SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 24192bb16f8Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 24292bb16f8Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 24392bb16f8Smrg [_AM_PROG_TAR([v7])])]) 24492bb16f8Smrg_AM_IF_OPTION([no-dependencies],, 24592bb16f8Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 24692bb16f8Smrg [_AM_DEPENDENCIES(CC)], 24792bb16f8Smrg [define([AC_PROG_CC], 24892bb16f8Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 24992bb16f8SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 25092bb16f8Smrg [_AM_DEPENDENCIES(CXX)], 25192bb16f8Smrg [define([AC_PROG_CXX], 25292bb16f8Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 25392bb16f8Smrg]) 25492bb16f8SmrgAC_REQUIRE([AM_PRETTY_CMDS]) 25592bb16f8Smrg]) 25692bb16f8Smrg 25792bb16f8Smrg 25892bb16f8Smrg# When config.status generates a header, we must update the stamp-h file. 25992bb16f8Smrg# This file resides in the same directory as the config header 26092bb16f8Smrg# that is generated. The stamp files are numbered to have different names. 26192bb16f8Smrg 26292bb16f8Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 26392bb16f8Smrg# loop where config.status creates the headers, so we can generate 26492bb16f8Smrg# our stamp files there. 26592bb16f8SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 26692bb16f8Smrg[# Compute $1's index in $config_headers. 26792bb16f8Smrg_am_stamp_count=1 26892bb16f8Smrgfor _am_header in $config_headers :; do 26992bb16f8Smrg case $_am_header in 27092bb16f8Smrg $1 | $1:* ) 27192bb16f8Smrg break ;; 27292bb16f8Smrg * ) 27392bb16f8Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 27492bb16f8Smrg esac 27592bb16f8Smrgdone 27692bb16f8Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 27792bb16f8Smrg 27892bb16f8Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 27992bb16f8Smrg# 28092bb16f8Smrg# This file is free software; the Free Software Foundation 28192bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 28292bb16f8Smrg# with or without modifications, as long as this notice is preserved. 28392bb16f8Smrg 28492bb16f8Smrg# AM_PROG_INSTALL_SH 28592bb16f8Smrg# ------------------ 28692bb16f8Smrg# Define $install_sh. 28792bb16f8SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 28892bb16f8Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 28992bb16f8Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"} 29092bb16f8SmrgAC_SUBST(install_sh)]) 29192bb16f8Smrg 29292bb16f8Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 29392bb16f8Smrg# 29492bb16f8Smrg# This file is free software; the Free Software Foundation 29592bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 29692bb16f8Smrg# with or without modifications, as long as this notice is preserved. 29792bb16f8Smrg 29892bb16f8Smrg# serial 2 29992bb16f8Smrg 30092bb16f8Smrg# Check whether the underlying file-system supports filenames 30192bb16f8Smrg# with a leading dot. For instance MS-DOS doesn't. 30292bb16f8SmrgAC_DEFUN([AM_SET_LEADING_DOT], 30392bb16f8Smrg[rm -rf .tst 2>/dev/null 30492bb16f8Smrgmkdir .tst 2>/dev/null 30592bb16f8Smrgif test -d .tst; then 30692bb16f8Smrg am__leading_dot=. 30792bb16f8Smrgelse 30892bb16f8Smrg am__leading_dot=_ 30992bb16f8Smrgfi 31092bb16f8Smrgrmdir .tst 2>/dev/null 31192bb16f8SmrgAC_SUBST([am__leading_dot])]) 31292bb16f8Smrg 31392bb16f8Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 31492bb16f8Smrg 31592bb16f8Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 31692bb16f8Smrg# Free Software Foundation, Inc. 31792bb16f8Smrg# 31892bb16f8Smrg# This file is free software; the Free Software Foundation 31992bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 32092bb16f8Smrg# with or without modifications, as long as this notice is preserved. 32192bb16f8Smrg 32292bb16f8Smrg# serial 4 32392bb16f8Smrg 32492bb16f8Smrg# AM_MISSING_PROG(NAME, PROGRAM) 32592bb16f8Smrg# ------------------------------ 32692bb16f8SmrgAC_DEFUN([AM_MISSING_PROG], 32792bb16f8Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 32892bb16f8Smrg$1=${$1-"${am_missing_run}$2"} 32992bb16f8SmrgAC_SUBST($1)]) 33092bb16f8Smrg 33192bb16f8Smrg 33292bb16f8Smrg# AM_MISSING_HAS_RUN 33392bb16f8Smrg# ------------------ 33492bb16f8Smrg# Define MISSING if not defined so far and test if it supports --run. 33592bb16f8Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 33692bb16f8SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 33792bb16f8Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 33892bb16f8Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 33992bb16f8Smrg# Use eval to expand $SHELL 34092bb16f8Smrgif eval "$MISSING --run true"; then 34192bb16f8Smrg am_missing_run="$MISSING --run " 34292bb16f8Smrgelse 34392bb16f8Smrg am_missing_run= 34492bb16f8Smrg AC_MSG_WARN([`missing' script is too old or missing]) 34592bb16f8Smrgfi 34692bb16f8Smrg]) 34792bb16f8Smrg 34892bb16f8Smrg# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 34992bb16f8Smrg# 35092bb16f8Smrg# This file is free software; the Free Software Foundation 35192bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 35292bb16f8Smrg# with or without modifications, as long as this notice is preserved. 35392bb16f8Smrg 35492bb16f8Smrg# AM_PROG_MKDIR_P 35592bb16f8Smrg# --------------- 35692bb16f8Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 35792bb16f8Smrg# 35892bb16f8Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 35992bb16f8Smrg# created by `make install' are always world readable, even if the 36092bb16f8Smrg# installer happens to have an overly restrictive umask (e.g. 077). 36192bb16f8Smrg# This was a mistake. There are at least two reasons why we must not 36292bb16f8Smrg# use `-m 0755': 36392bb16f8Smrg# - it causes special bits like SGID to be ignored, 36492bb16f8Smrg# - it may be too restrictive (some setups expect 775 directories). 36592bb16f8Smrg# 36692bb16f8Smrg# Do not use -m 0755 and let people choose whatever they expect by 36792bb16f8Smrg# setting umask. 36892bb16f8Smrg# 36992bb16f8Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'. 37092bb16f8Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a 37192bb16f8Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 37292bb16f8Smrg# concurrently, both version can detect that a/ is missing, but only 37392bb16f8Smrg# one can create it and the other will error out. Consequently we 37492bb16f8Smrg# restrict ourselves to GNU make (using the --version option ensures 37592bb16f8Smrg# this.) 37692bb16f8SmrgAC_DEFUN([AM_PROG_MKDIR_P], 37792bb16f8Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 37892bb16f8Smrg # We used to keeping the `.' as first argument, in order to 37992bb16f8Smrg # allow $(mkdir_p) to be used without argument. As in 38092bb16f8Smrg # $(mkdir_p) $(somedir) 38192bb16f8Smrg # where $(somedir) is conditionally defined. However this is wrong 38292bb16f8Smrg # for two reasons: 38392bb16f8Smrg # 1. if the package is installed by a user who cannot write `.' 38492bb16f8Smrg # make install will fail, 38592bb16f8Smrg # 2. the above comment should most certainly read 38692bb16f8Smrg # $(mkdir_p) $(DESTDIR)$(somedir) 38792bb16f8Smrg # so it does not work when $(somedir) is undefined and 38892bb16f8Smrg # $(DESTDIR) is not. 38992bb16f8Smrg # To support the latter case, we have to write 39092bb16f8Smrg # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 39192bb16f8Smrg # so the `.' trick is pointless. 39292bb16f8Smrg mkdir_p='mkdir -p --' 39392bb16f8Smrgelse 39492bb16f8Smrg # On NextStep and OpenStep, the `mkdir' command does not 39592bb16f8Smrg # recognize any option. It will interpret all options as 39692bb16f8Smrg # directories to create, and then abort because `.' already 39792bb16f8Smrg # exists. 39892bb16f8Smrg for d in ./-p ./--version; 39992bb16f8Smrg do 40092bb16f8Smrg test -d $d && rmdir $d 40192bb16f8Smrg done 40292bb16f8Smrg # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 40392bb16f8Smrg if test -f "$ac_aux_dir/mkinstalldirs"; then 40492bb16f8Smrg mkdir_p='$(mkinstalldirs)' 40592bb16f8Smrg else 40692bb16f8Smrg mkdir_p='$(install_sh) -d' 40792bb16f8Smrg fi 40892bb16f8Smrgfi 40992bb16f8SmrgAC_SUBST([mkdir_p])]) 41092bb16f8Smrg 41192bb16f8Smrg# Helper functions for option handling. -*- Autoconf -*- 41292bb16f8Smrg 41392bb16f8Smrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 41492bb16f8Smrg# 41592bb16f8Smrg# This file is free software; the Free Software Foundation 41692bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 41792bb16f8Smrg# with or without modifications, as long as this notice is preserved. 41892bb16f8Smrg 41992bb16f8Smrg# serial 3 42092bb16f8Smrg 42192bb16f8Smrg# _AM_MANGLE_OPTION(NAME) 42292bb16f8Smrg# ----------------------- 42392bb16f8SmrgAC_DEFUN([_AM_MANGLE_OPTION], 42492bb16f8Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 42592bb16f8Smrg 42692bb16f8Smrg# _AM_SET_OPTION(NAME) 42792bb16f8Smrg# ------------------------------ 42892bb16f8Smrg# Set option NAME. Presently that only means defining a flag for this option. 42992bb16f8SmrgAC_DEFUN([_AM_SET_OPTION], 43092bb16f8Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 43192bb16f8Smrg 43292bb16f8Smrg# _AM_SET_OPTIONS(OPTIONS) 43392bb16f8Smrg# ---------------------------------- 43492bb16f8Smrg# OPTIONS is a space-separated list of Automake options. 43592bb16f8SmrgAC_DEFUN([_AM_SET_OPTIONS], 43692bb16f8Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 43792bb16f8Smrg 43892bb16f8Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 43992bb16f8Smrg# ------------------------------------------- 44092bb16f8Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 44192bb16f8SmrgAC_DEFUN([_AM_IF_OPTION], 44292bb16f8Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 44392bb16f8Smrg 44492bb16f8Smrg 44592bb16f8Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 44692bb16f8Smrg# Free Software Foundation, Inc. 44792bb16f8Smrg# 44892bb16f8Smrg# This file is free software; the Free Software Foundation 44992bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 45092bb16f8Smrg# with or without modifications, as long as this notice is preserved. 45192bb16f8Smrg 45292bb16f8Smrg# serial 8 45392bb16f8Smrg 45492bb16f8Smrg 45592bb16f8Smrg# AM_PRETTY_CMDS 45692bb16f8Smrg# ------------ 45792bb16f8SmrgAC_DEFUN([AM_PRETTY_CMDS], 45892bb16f8Smrg[AC_ARG_ENABLE(pretty-cmds, 45992bb16f8Smrg[ --disable-pretty-cmds show all commands executed 46092bb16f8Smrg --enable-pretty-cmds do not output the entire command lines]) 46192bb16f8SmrgAMSHOWCMDSAT='' 46292bb16f8SmrgAMDEPSHOWCMDSAT='' 46392bb16f8SmrgAMPRETTYECHO=true 46492bb16f8SmrgAMCMDECHO=echo 46592bb16f8Smrgif test "x$enable_pretty_cmds" == xyes; 46692bb16f8Smrgthen 46792bb16f8Smrg AMSHOWCMDSAT='@' 46892bb16f8Smrg _AM_IF_OPTION([no-dependencies],,test x$enable_dependency_tracking == xno &&) AMDEPSHOWCMDSAT='@' 46992bb16f8Smrg AMPRETTYECHO=echo 47092bb16f8Smrg AMCMDECHO=true 47192bb16f8Smrg LT_QUIET='--quiet' 47292bb16f8Smrgfi 47392bb16f8SmrgAC_SUBST([AMSHOWCMDSAT]) 47492bb16f8SmrgAC_SUBST([AMDEPSHOWCMDSAT]) 47592bb16f8SmrgAC_SUBST([AMPRETTYECHO]) 47692bb16f8SmrgAC_SUBST([AMCMDECHO]) 47792bb16f8SmrgAC_SUBST([LT_QUIET]) 47892bb16f8Smrg]) 47992bb16f8Smrg 48092bb16f8Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 48192bb16f8Smrg 48292bb16f8Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 48392bb16f8Smrg# Free Software Foundation, Inc. 48492bb16f8Smrg# 48592bb16f8Smrg# This file is free software; the Free Software Foundation 48692bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 48792bb16f8Smrg# with or without modifications, as long as this notice is preserved. 48892bb16f8Smrg 48992bb16f8Smrg# serial 4 49092bb16f8Smrg 49192bb16f8Smrg# AM_SANITY_CHECK 49292bb16f8Smrg# --------------- 49392bb16f8SmrgAC_DEFUN([AM_SANITY_CHECK], 49492bb16f8Smrg[AC_MSG_CHECKING([whether build environment is sane]) 49592bb16f8Smrg# Just in case 49692bb16f8Smrgsleep 1 49792bb16f8Smrgecho timestamp > conftest.file 49892bb16f8Smrg# Do `set' in a subshell so we don't clobber the current shell's 49992bb16f8Smrg# arguments. Must try -L first in case configure is actually a 50092bb16f8Smrg# symlink; some systems play weird games with the mod time of symlinks 50192bb16f8Smrg# (eg FreeBSD returns the mod time of the symlink's containing 50292bb16f8Smrg# directory). 50392bb16f8Smrgif ( 50492bb16f8Smrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 50592bb16f8Smrg if test "$[*]" = "X"; then 50692bb16f8Smrg # -L didn't work. 50792bb16f8Smrg set X `ls -t $srcdir/configure conftest.file` 50892bb16f8Smrg fi 50992bb16f8Smrg rm -f conftest.file 51092bb16f8Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 51192bb16f8Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 51292bb16f8Smrg 51392bb16f8Smrg # If neither matched, then we have a broken ls. This can happen 51492bb16f8Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 51592bb16f8Smrg # broken ls alias from the environment. This has actually 51692bb16f8Smrg # happened. Such a system could not be considered "sane". 51792bb16f8Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 51892bb16f8Smrgalias in your environment]) 51992bb16f8Smrg fi 52092bb16f8Smrg 52192bb16f8Smrg test "$[2]" = conftest.file 52292bb16f8Smrg ) 52392bb16f8Smrgthen 52492bb16f8Smrg # Ok. 52592bb16f8Smrg : 52692bb16f8Smrgelse 52792bb16f8Smrg AC_MSG_ERROR([newly created file is older than distributed files! 52892bb16f8SmrgCheck your system clock]) 52992bb16f8Smrgfi 53092bb16f8SmrgAC_MSG_RESULT(yes)]) 53192bb16f8Smrg 53292bb16f8Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 53392bb16f8Smrg# 53492bb16f8Smrg# This file is free software; the Free Software Foundation 53592bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 53692bb16f8Smrg# with or without modifications, as long as this notice is preserved. 53792bb16f8Smrg 53892bb16f8Smrg# AM_PROG_INSTALL_STRIP 53992bb16f8Smrg# --------------------- 54092bb16f8Smrg# One issue with vendor `install' (even GNU) is that you can't 54192bb16f8Smrg# specify the program used to strip binaries. This is especially 54292bb16f8Smrg# annoying in cross-compiling environments, where the build's strip 54392bb16f8Smrg# is unlikely to handle the host's binaries. 54492bb16f8Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 54592bb16f8Smrg# always use install-sh in `make install-strip', and initialize 54692bb16f8Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 54792bb16f8SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 54892bb16f8Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 54992bb16f8Smrg# Installed binaries are usually stripped using `strip' when the user 55092bb16f8Smrg# run `make install-strip'. However `strip' might not be the right 55192bb16f8Smrg# tool to use in cross-compilation environments, therefore Automake 55292bb16f8Smrg# will honor the `STRIP' environment variable to overrule this program. 55392bb16f8Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 55492bb16f8Smrgif test "$cross_compiling" != no; then 55592bb16f8Smrg AC_CHECK_TOOL([STRIP], [strip], :) 55692bb16f8Smrgfi 55792bb16f8SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 55892bb16f8SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 55992bb16f8Smrg 56092bb16f8Smrg# Check how to create a tarball. -*- Autoconf -*- 56192bb16f8Smrg 56292bb16f8Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 56392bb16f8Smrg# 56492bb16f8Smrg# This file is free software; the Free Software Foundation 56592bb16f8Smrg# gives unlimited permission to copy and/or distribute it, 56692bb16f8Smrg# with or without modifications, as long as this notice is preserved. 56792bb16f8Smrg 56892bb16f8Smrg# serial 2 56992bb16f8Smrg 57092bb16f8Smrg# _AM_PROG_TAR(FORMAT) 57192bb16f8Smrg# -------------------- 57292bb16f8Smrg# Check how to create a tarball in format FORMAT. 57392bb16f8Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 57492bb16f8Smrg# 57592bb16f8Smrg# Substitute a variable $(am__tar) that is a command 57692bb16f8Smrg# writing to stdout a FORMAT-tarball containing the directory 57792bb16f8Smrg# $tardir. 57892bb16f8Smrg# tardir=directory && $(am__tar) > result.tar 57992bb16f8Smrg# 58092bb16f8Smrg# Substitute a variable $(am__untar) that extract such 58192bb16f8Smrg# a tarball read from stdin. 58292bb16f8Smrg# $(am__untar) < result.tar 58392bb16f8SmrgAC_DEFUN([_AM_PROG_TAR], 58492bb16f8Smrg[# Always define AMTAR for backward compatibility. 58592bb16f8SmrgAM_MISSING_PROG([AMTAR], [tar]) 58692bb16f8Smrgm4_if([$1], [v7], 58792bb16f8Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 58892bb16f8Smrg [m4_case([$1], [ustar],, [pax],, 58992bb16f8Smrg [m4_fatal([Unknown tar format])]) 59092bb16f8SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 59192bb16f8Smrg# Loop over all known methods to create a tar archive until one works. 59292bb16f8Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 59392bb16f8Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 59492bb16f8Smrg# Do not fold the above two line into one, because Tru64 sh and 59592bb16f8Smrg# Solaris sh will not grok spaces in the rhs of `-'. 59692bb16f8Smrgfor _am_tool in $_am_tools 59792bb16f8Smrgdo 59892bb16f8Smrg case $_am_tool in 59992bb16f8Smrg gnutar) 60092bb16f8Smrg for _am_tar in tar gnutar gtar; 60192bb16f8Smrg do 60292bb16f8Smrg AM_RUN_LOG([$_am_tar --version]) && break 60392bb16f8Smrg done 60492bb16f8Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 60592bb16f8Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 60692bb16f8Smrg am__untar="$_am_tar -xf -" 60792bb16f8Smrg ;; 60892bb16f8Smrg plaintar) 60992bb16f8Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 61092bb16f8Smrg # ustar tarball either. 61192bb16f8Smrg (tar --version) >/dev/null 2>&1 && continue 61292bb16f8Smrg am__tar='tar chf - "$$tardir"' 61392bb16f8Smrg am__tar_='tar chf - "$tardir"' 61492bb16f8Smrg am__untar='tar xf -' 61592bb16f8Smrg ;; 61692bb16f8Smrg pax) 61792bb16f8Smrg am__tar='pax -L -x $1 -w "$$tardir"' 61892bb16f8Smrg am__tar_='pax -L -x $1 -w "$tardir"' 61992bb16f8Smrg am__untar='pax -r' 62092bb16f8Smrg ;; 62192bb16f8Smrg cpio) 62292bb16f8Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 62392bb16f8Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 62492bb16f8Smrg am__untar='cpio -i -H $1 -d' 62592bb16f8Smrg ;; 62692bb16f8Smrg none) 62792bb16f8Smrg am__tar=false 62892bb16f8Smrg am__tar_=false 62992bb16f8Smrg am__untar=false 63092bb16f8Smrg ;; 63192bb16f8Smrg esac 63292bb16f8Smrg 63392bb16f8Smrg # If the value was cached, stop now. We just wanted to have am__tar 63492bb16f8Smrg # and am__untar set. 63592bb16f8Smrg test -n "${am_cv_prog_tar_$1}" && break 63692bb16f8Smrg 63792bb16f8Smrg # tar/untar a dummy directory, and stop if the command works 63892bb16f8Smrg rm -rf conftest.dir 63992bb16f8Smrg mkdir conftest.dir 64092bb16f8Smrg echo GrepMe > conftest.dir/file 64192bb16f8Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 64292bb16f8Smrg rm -rf conftest.dir 64392bb16f8Smrg if test -s conftest.tar; then 64492bb16f8Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 64592bb16f8Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 64692bb16f8Smrg fi 64792bb16f8Smrgdone 64892bb16f8Smrgrm -rf conftest.dir 64992bb16f8Smrg 65092bb16f8SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 65192bb16f8SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 65292bb16f8SmrgAC_SUBST([am__tar]) 65392bb16f8SmrgAC_SUBST([am__untar]) 65492bb16f8Smrg]) # _AM_PROG_TAR 65592bb16f8Smrg 656