1*1b8adde7SWilliam Kucharski# generated automatically by aclocal 1.9.4 -*- Autoconf -*- 2*1b8adde7SWilliam Kucharski 3*1b8adde7SWilliam Kucharski# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 4*1b8adde7SWilliam Kucharski# Free Software Foundation, Inc. 5*1b8adde7SWilliam Kucharski# This file is free software; the Free Software Foundation 6*1b8adde7SWilliam Kucharski# gives unlimited permission to copy and/or distribute it, 7*1b8adde7SWilliam Kucharski# with or without modifications, as long as this notice is preserved. 8*1b8adde7SWilliam Kucharski 9*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 10*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11*1b8adde7SWilliam Kucharski# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12*1b8adde7SWilliam Kucharski# PARTICULAR PURPOSE. 13*1b8adde7SWilliam Kucharski 14*1b8adde7SWilliam Kucharski# -*- Autoconf -*- 15*1b8adde7SWilliam Kucharski# Copyright (C) 2002, 2003 Free Software Foundation, Inc. 16*1b8adde7SWilliam Kucharski# Generated from amversion.in; do not edit by hand. 17*1b8adde7SWilliam Kucharski 18*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 19*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 20*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 21*1b8adde7SWilliam Kucharski# any later version. 22*1b8adde7SWilliam Kucharski 23*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 24*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 25*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 27*1b8adde7SWilliam Kucharski 28*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 29*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 30*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 31*1b8adde7SWilliam Kucharski 32*1b8adde7SWilliam Kucharski# AM_AUTOMAKE_VERSION(VERSION) 33*1b8adde7SWilliam Kucharski# ---------------------------- 34*1b8adde7SWilliam Kucharski# Automake X.Y traces this macro to ensure aclocal.m4 has been 35*1b8adde7SWilliam Kucharski# generated from the m4 files accompanying Automake X.Y. 36*1b8adde7SWilliam KucharskiAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) 37*1b8adde7SWilliam Kucharski 38*1b8adde7SWilliam Kucharski# AM_SET_CURRENT_AUTOMAKE_VERSION 39*1b8adde7SWilliam Kucharski# ------------------------------- 40*1b8adde7SWilliam Kucharski# Call AM_AUTOMAKE_VERSION so it can be traced. 41*1b8adde7SWilliam Kucharski# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 42*1b8adde7SWilliam KucharskiAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 43*1b8adde7SWilliam Kucharski [AM_AUTOMAKE_VERSION([1.9.4])]) 44*1b8adde7SWilliam Kucharski 45*1b8adde7SWilliam Kucharski# AM_AUX_DIR_EXPAND 46*1b8adde7SWilliam Kucharski 47*1b8adde7SWilliam Kucharski# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 48*1b8adde7SWilliam Kucharski 49*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 50*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 51*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 52*1b8adde7SWilliam Kucharski# any later version. 53*1b8adde7SWilliam Kucharski 54*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 55*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 56*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 57*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 58*1b8adde7SWilliam Kucharski 59*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 60*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 61*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 62*1b8adde7SWilliam Kucharski# 02111-1307, USA. 63*1b8adde7SWilliam Kucharski 64*1b8adde7SWilliam Kucharski# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 65*1b8adde7SWilliam Kucharski# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 66*1b8adde7SWilliam Kucharski# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 67*1b8adde7SWilliam Kucharski# 68*1b8adde7SWilliam Kucharski# Of course, Automake must honor this variable whenever it calls a 69*1b8adde7SWilliam Kucharski# tool from the auxiliary directory. The problem is that $srcdir (and 70*1b8adde7SWilliam Kucharski# therefore $ac_aux_dir as well) can be either absolute or relative, 71*1b8adde7SWilliam Kucharski# depending on how configure is run. This is pretty annoying, since 72*1b8adde7SWilliam Kucharski# it makes $ac_aux_dir quite unusable in subdirectories: in the top 73*1b8adde7SWilliam Kucharski# source directory, any form will work fine, but in subdirectories a 74*1b8adde7SWilliam Kucharski# relative path needs to be adjusted first. 75*1b8adde7SWilliam Kucharski# 76*1b8adde7SWilliam Kucharski# $ac_aux_dir/missing 77*1b8adde7SWilliam Kucharski# fails when called from a subdirectory if $ac_aux_dir is relative 78*1b8adde7SWilliam Kucharski# $top_srcdir/$ac_aux_dir/missing 79*1b8adde7SWilliam Kucharski# fails if $ac_aux_dir is absolute, 80*1b8adde7SWilliam Kucharski# fails when called from a subdirectory in a VPATH build with 81*1b8adde7SWilliam Kucharski# a relative $ac_aux_dir 82*1b8adde7SWilliam Kucharski# 83*1b8adde7SWilliam Kucharski# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 84*1b8adde7SWilliam Kucharski# are both prefixed by $srcdir. In an in-source build this is usually 85*1b8adde7SWilliam Kucharski# harmless because $srcdir is `.', but things will broke when you 86*1b8adde7SWilliam Kucharski# start a VPATH build or use an absolute $srcdir. 87*1b8adde7SWilliam Kucharski# 88*1b8adde7SWilliam Kucharski# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 89*1b8adde7SWilliam Kucharski# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 90*1b8adde7SWilliam Kucharski# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 91*1b8adde7SWilliam Kucharski# and then we would define $MISSING as 92*1b8adde7SWilliam Kucharski# MISSING="\${SHELL} $am_aux_dir/missing" 93*1b8adde7SWilliam Kucharski# This will work as long as MISSING is not called from configure, because 94*1b8adde7SWilliam Kucharski# unfortunately $(top_srcdir) has no meaning in configure. 95*1b8adde7SWilliam Kucharski# However there are other variables, like CC, which are often used in 96*1b8adde7SWilliam Kucharski# configure, and could therefore not use this "fixed" $ac_aux_dir. 97*1b8adde7SWilliam Kucharski# 98*1b8adde7SWilliam Kucharski# Another solution, used here, is to always expand $ac_aux_dir to an 99*1b8adde7SWilliam Kucharski# absolute PATH. The drawback is that using absolute paths prevent a 100*1b8adde7SWilliam Kucharski# configured tree to be moved without reconfiguration. 101*1b8adde7SWilliam Kucharski 102*1b8adde7SWilliam KucharskiAC_DEFUN([AM_AUX_DIR_EXPAND], 103*1b8adde7SWilliam Kucharski[dnl Rely on autoconf to set up CDPATH properly. 104*1b8adde7SWilliam KucharskiAC_PREREQ([2.50])dnl 105*1b8adde7SWilliam Kucharski# expand $ac_aux_dir to an absolute path 106*1b8adde7SWilliam Kucharskiam_aux_dir=`cd $ac_aux_dir && pwd` 107*1b8adde7SWilliam Kucharski]) 108*1b8adde7SWilliam Kucharski 109*1b8adde7SWilliam Kucharski# AM_CONDITIONAL -*- Autoconf -*- 110*1b8adde7SWilliam Kucharski 111*1b8adde7SWilliam Kucharski# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. 112*1b8adde7SWilliam Kucharski 113*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 114*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 115*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 116*1b8adde7SWilliam Kucharski# any later version. 117*1b8adde7SWilliam Kucharski 118*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 119*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 120*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 121*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 122*1b8adde7SWilliam Kucharski 123*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 124*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 125*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 126*1b8adde7SWilliam Kucharski# 02111-1307, USA. 127*1b8adde7SWilliam Kucharski 128*1b8adde7SWilliam Kucharski# serial 6 129*1b8adde7SWilliam Kucharski 130*1b8adde7SWilliam Kucharski# AM_CONDITIONAL(NAME, SHELL-CONDITION) 131*1b8adde7SWilliam Kucharski# ------------------------------------- 132*1b8adde7SWilliam Kucharski# Define a conditional. 133*1b8adde7SWilliam KucharskiAC_DEFUN([AM_CONDITIONAL], 134*1b8adde7SWilliam Kucharski[AC_PREREQ(2.52)dnl 135*1b8adde7SWilliam Kucharski ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 136*1b8adde7SWilliam Kucharski [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 137*1b8adde7SWilliam KucharskiAC_SUBST([$1_TRUE]) 138*1b8adde7SWilliam KucharskiAC_SUBST([$1_FALSE]) 139*1b8adde7SWilliam Kucharskiif $2; then 140*1b8adde7SWilliam Kucharski $1_TRUE= 141*1b8adde7SWilliam Kucharski $1_FALSE='#' 142*1b8adde7SWilliam Kucharskielse 143*1b8adde7SWilliam Kucharski $1_TRUE='#' 144*1b8adde7SWilliam Kucharski $1_FALSE= 145*1b8adde7SWilliam Kucharskifi 146*1b8adde7SWilliam KucharskiAC_CONFIG_COMMANDS_PRE( 147*1b8adde7SWilliam Kucharski[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 148*1b8adde7SWilliam Kucharski AC_MSG_ERROR([[conditional "$1" was never defined. 149*1b8adde7SWilliam KucharskiUsually this means the macro was only invoked conditionally.]]) 150*1b8adde7SWilliam Kucharskifi])]) 151*1b8adde7SWilliam Kucharski 152*1b8adde7SWilliam Kucharski# serial 7 -*- Autoconf -*- 153*1b8adde7SWilliam Kucharski 154*1b8adde7SWilliam Kucharski# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 155*1b8adde7SWilliam Kucharski# Free Software Foundation, Inc. 156*1b8adde7SWilliam Kucharski 157*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 158*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 159*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 160*1b8adde7SWilliam Kucharski# any later version. 161*1b8adde7SWilliam Kucharski 162*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 163*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 164*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 165*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 166*1b8adde7SWilliam Kucharski 167*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 168*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 169*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 170*1b8adde7SWilliam Kucharski# 02111-1307, USA. 171*1b8adde7SWilliam Kucharski 172*1b8adde7SWilliam Kucharski 173*1b8adde7SWilliam Kucharski# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 174*1b8adde7SWilliam Kucharski# written in clear, in which case automake, when reading aclocal.m4, 175*1b8adde7SWilliam Kucharski# will think it sees a *use*, and therefore will trigger all it's 176*1b8adde7SWilliam Kucharski# C support machinery. Also note that it means that autoscan, seeing 177*1b8adde7SWilliam Kucharski# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 178*1b8adde7SWilliam Kucharski 179*1b8adde7SWilliam Kucharski 180*1b8adde7SWilliam Kucharski 181*1b8adde7SWilliam Kucharski# _AM_DEPENDENCIES(NAME) 182*1b8adde7SWilliam Kucharski# ---------------------- 183*1b8adde7SWilliam Kucharski# See how the compiler implements dependency checking. 184*1b8adde7SWilliam Kucharski# NAME is "CC", "CXX", "GCJ", or "OBJC". 185*1b8adde7SWilliam Kucharski# We try a few techniques and use that to set a single cache variable. 186*1b8adde7SWilliam Kucharski# 187*1b8adde7SWilliam Kucharski# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 188*1b8adde7SWilliam Kucharski# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 189*1b8adde7SWilliam Kucharski# dependency, and given that the user is not expected to run this macro, 190*1b8adde7SWilliam Kucharski# just rely on AC_PROG_CC. 191*1b8adde7SWilliam KucharskiAC_DEFUN([_AM_DEPENDENCIES], 192*1b8adde7SWilliam Kucharski[AC_REQUIRE([AM_SET_DEPDIR])dnl 193*1b8adde7SWilliam KucharskiAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 194*1b8adde7SWilliam KucharskiAC_REQUIRE([AM_MAKE_INCLUDE])dnl 195*1b8adde7SWilliam KucharskiAC_REQUIRE([AM_DEP_TRACK])dnl 196*1b8adde7SWilliam Kucharski 197*1b8adde7SWilliam Kucharskiifelse([$1], CC, [depcc="$CC" am_compiler_list=], 198*1b8adde7SWilliam Kucharski [$1], CXX, [depcc="$CXX" am_compiler_list=], 199*1b8adde7SWilliam Kucharski [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 200*1b8adde7SWilliam Kucharski [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 201*1b8adde7SWilliam Kucharski [depcc="$$1" am_compiler_list=]) 202*1b8adde7SWilliam Kucharski 203*1b8adde7SWilliam KucharskiAC_CACHE_CHECK([dependency style of $depcc], 204*1b8adde7SWilliam Kucharski [am_cv_$1_dependencies_compiler_type], 205*1b8adde7SWilliam Kucharski[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 206*1b8adde7SWilliam Kucharski # We make a subdir and do the tests there. Otherwise we can end up 207*1b8adde7SWilliam Kucharski # making bogus files that we don't know about and never remove. For 208*1b8adde7SWilliam Kucharski # instance it was reported that on HP-UX the gcc test will end up 209*1b8adde7SWilliam Kucharski # making a dummy file named `D' -- because `-MD' means `put the output 210*1b8adde7SWilliam Kucharski # in D'. 211*1b8adde7SWilliam Kucharski mkdir conftest.dir 212*1b8adde7SWilliam Kucharski # Copy depcomp to subdir because otherwise we won't find it if we're 213*1b8adde7SWilliam Kucharski # using a relative directory. 214*1b8adde7SWilliam Kucharski cp "$am_depcomp" conftest.dir 215*1b8adde7SWilliam Kucharski cd conftest.dir 216*1b8adde7SWilliam Kucharski # We will build objects and dependencies in a subdirectory because 217*1b8adde7SWilliam Kucharski # it helps to detect inapplicable dependency modes. For instance 218*1b8adde7SWilliam Kucharski # both Tru64's cc and ICC support -MD to output dependencies as a 219*1b8adde7SWilliam Kucharski # side effect of compilation, but ICC will put the dependencies in 220*1b8adde7SWilliam Kucharski # the current directory while Tru64 will put them in the object 221*1b8adde7SWilliam Kucharski # directory. 222*1b8adde7SWilliam Kucharski mkdir sub 223*1b8adde7SWilliam Kucharski 224*1b8adde7SWilliam Kucharski am_cv_$1_dependencies_compiler_type=none 225*1b8adde7SWilliam Kucharski if test "$am_compiler_list" = ""; then 226*1b8adde7SWilliam Kucharski am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 227*1b8adde7SWilliam Kucharski fi 228*1b8adde7SWilliam Kucharski for depmode in $am_compiler_list; do 229*1b8adde7SWilliam Kucharski # Setup a source with many dependencies, because some compilers 230*1b8adde7SWilliam Kucharski # like to wrap large dependency lists on column 80 (with \), and 231*1b8adde7SWilliam Kucharski # we should not choose a depcomp mode which is confused by this. 232*1b8adde7SWilliam Kucharski # 233*1b8adde7SWilliam Kucharski # We need to recreate these files for each test, as the compiler may 234*1b8adde7SWilliam Kucharski # overwrite some of them when testing with obscure command lines. 235*1b8adde7SWilliam Kucharski # This happens at least with the AIX C compiler. 236*1b8adde7SWilliam Kucharski : > sub/conftest.c 237*1b8adde7SWilliam Kucharski for i in 1 2 3 4 5 6; do 238*1b8adde7SWilliam Kucharski echo '#include "conftst'$i'.h"' >> sub/conftest.c 239*1b8adde7SWilliam Kucharski # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 240*1b8adde7SWilliam Kucharski # Solaris 8's {/usr,}/bin/sh. 241*1b8adde7SWilliam Kucharski touch sub/conftst$i.h 242*1b8adde7SWilliam Kucharski done 243*1b8adde7SWilliam Kucharski echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 244*1b8adde7SWilliam Kucharski 245*1b8adde7SWilliam Kucharski case $depmode in 246*1b8adde7SWilliam Kucharski nosideeffect) 247*1b8adde7SWilliam Kucharski # after this tag, mechanisms are not by side-effect, so they'll 248*1b8adde7SWilliam Kucharski # only be used when explicitly requested 249*1b8adde7SWilliam Kucharski if test "x$enable_dependency_tracking" = xyes; then 250*1b8adde7SWilliam Kucharski continue 251*1b8adde7SWilliam Kucharski else 252*1b8adde7SWilliam Kucharski break 253*1b8adde7SWilliam Kucharski fi 254*1b8adde7SWilliam Kucharski ;; 255*1b8adde7SWilliam Kucharski none) break ;; 256*1b8adde7SWilliam Kucharski esac 257*1b8adde7SWilliam Kucharski # We check with `-c' and `-o' for the sake of the "dashmstdout" 258*1b8adde7SWilliam Kucharski # mode. It turns out that the SunPro C++ compiler does not properly 259*1b8adde7SWilliam Kucharski # handle `-M -o', and we need to detect this. 260*1b8adde7SWilliam Kucharski if depmode=$depmode \ 261*1b8adde7SWilliam Kucharski source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 262*1b8adde7SWilliam Kucharski depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 263*1b8adde7SWilliam Kucharski $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 264*1b8adde7SWilliam Kucharski >/dev/null 2>conftest.err && 265*1b8adde7SWilliam Kucharski grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 266*1b8adde7SWilliam Kucharski grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 267*1b8adde7SWilliam Kucharski ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 268*1b8adde7SWilliam Kucharski # icc doesn't choke on unknown options, it will just issue warnings 269*1b8adde7SWilliam Kucharski # or remarks (even with -Werror). So we grep stderr for any message 270*1b8adde7SWilliam Kucharski # that says an option was ignored or not supported. 271*1b8adde7SWilliam Kucharski # When given -MP, icc 7.0 and 7.1 complain thusly: 272*1b8adde7SWilliam Kucharski # icc: Command line warning: ignoring option '-M'; no argument required 273*1b8adde7SWilliam Kucharski # The diagnosis changed in icc 8.0: 274*1b8adde7SWilliam Kucharski # icc: Command line remark: option '-MP' not supported 275*1b8adde7SWilliam Kucharski if (grep 'ignoring option' conftest.err || 276*1b8adde7SWilliam Kucharski grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 277*1b8adde7SWilliam Kucharski am_cv_$1_dependencies_compiler_type=$depmode 278*1b8adde7SWilliam Kucharski break 279*1b8adde7SWilliam Kucharski fi 280*1b8adde7SWilliam Kucharski fi 281*1b8adde7SWilliam Kucharski done 282*1b8adde7SWilliam Kucharski 283*1b8adde7SWilliam Kucharski cd .. 284*1b8adde7SWilliam Kucharski rm -rf conftest.dir 285*1b8adde7SWilliam Kucharskielse 286*1b8adde7SWilliam Kucharski am_cv_$1_dependencies_compiler_type=none 287*1b8adde7SWilliam Kucharskifi 288*1b8adde7SWilliam Kucharski]) 289*1b8adde7SWilliam KucharskiAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 290*1b8adde7SWilliam KucharskiAM_CONDITIONAL([am__fastdep$1], [ 291*1b8adde7SWilliam Kucharski test "x$enable_dependency_tracking" != xno \ 292*1b8adde7SWilliam Kucharski && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 293*1b8adde7SWilliam Kucharski]) 294*1b8adde7SWilliam Kucharski 295*1b8adde7SWilliam Kucharski 296*1b8adde7SWilliam Kucharski# AM_SET_DEPDIR 297*1b8adde7SWilliam Kucharski# ------------- 298*1b8adde7SWilliam Kucharski# Choose a directory name for dependency files. 299*1b8adde7SWilliam Kucharski# This macro is AC_REQUIREd in _AM_DEPENDENCIES 300*1b8adde7SWilliam KucharskiAC_DEFUN([AM_SET_DEPDIR], 301*1b8adde7SWilliam Kucharski[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 302*1b8adde7SWilliam KucharskiAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 303*1b8adde7SWilliam Kucharski]) 304*1b8adde7SWilliam Kucharski 305*1b8adde7SWilliam Kucharski 306*1b8adde7SWilliam Kucharski# AM_DEP_TRACK 307*1b8adde7SWilliam Kucharski# ------------ 308*1b8adde7SWilliam KucharskiAC_DEFUN([AM_DEP_TRACK], 309*1b8adde7SWilliam Kucharski[AC_ARG_ENABLE(dependency-tracking, 310*1b8adde7SWilliam Kucharski[ --disable-dependency-tracking speeds up one-time build 311*1b8adde7SWilliam Kucharski --enable-dependency-tracking do not reject slow dependency extractors]) 312*1b8adde7SWilliam Kucharskiif test "x$enable_dependency_tracking" != xno; then 313*1b8adde7SWilliam Kucharski am_depcomp="$ac_aux_dir/depcomp" 314*1b8adde7SWilliam Kucharski AMDEPBACKSLASH='\' 315*1b8adde7SWilliam Kucharskifi 316*1b8adde7SWilliam KucharskiAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 317*1b8adde7SWilliam KucharskiAC_SUBST([AMDEPBACKSLASH]) 318*1b8adde7SWilliam Kucharski]) 319*1b8adde7SWilliam Kucharski 320*1b8adde7SWilliam Kucharski# Generate code to set up dependency tracking. -*- Autoconf -*- 321*1b8adde7SWilliam Kucharski 322*1b8adde7SWilliam Kucharski# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 323*1b8adde7SWilliam Kucharski# Free Software Foundation, Inc. 324*1b8adde7SWilliam Kucharski 325*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 326*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 327*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 328*1b8adde7SWilliam Kucharski# any later version. 329*1b8adde7SWilliam Kucharski 330*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 331*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 332*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 333*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 334*1b8adde7SWilliam Kucharski 335*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 336*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 337*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 338*1b8adde7SWilliam Kucharski# 02111-1307, USA. 339*1b8adde7SWilliam Kucharski 340*1b8adde7SWilliam Kucharski#serial 2 341*1b8adde7SWilliam Kucharski 342*1b8adde7SWilliam Kucharski# _AM_OUTPUT_DEPENDENCY_COMMANDS 343*1b8adde7SWilliam Kucharski# ------------------------------ 344*1b8adde7SWilliam KucharskiAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 345*1b8adde7SWilliam Kucharski[for mf in $CONFIG_FILES; do 346*1b8adde7SWilliam Kucharski # Strip MF so we end up with the name of the file. 347*1b8adde7SWilliam Kucharski mf=`echo "$mf" | sed -e 's/:.*$//'` 348*1b8adde7SWilliam Kucharski # Check whether this is an Automake generated Makefile or not. 349*1b8adde7SWilliam Kucharski # We used to match only the files named `Makefile.in', but 350*1b8adde7SWilliam Kucharski # some people rename them; so instead we look at the file content. 351*1b8adde7SWilliam Kucharski # Grep'ing the first line is not enough: some people post-process 352*1b8adde7SWilliam Kucharski # each Makefile.in and add a new line on top of each file to say so. 353*1b8adde7SWilliam Kucharski # So let's grep whole file. 354*1b8adde7SWilliam Kucharski if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then 355*1b8adde7SWilliam Kucharski dirpart=`AS_DIRNAME("$mf")` 356*1b8adde7SWilliam Kucharski else 357*1b8adde7SWilliam Kucharski continue 358*1b8adde7SWilliam Kucharski fi 359*1b8adde7SWilliam Kucharski # Extract the definition of DEPDIR, am__include, and am__quote 360*1b8adde7SWilliam Kucharski # from the Makefile without running `make'. 361*1b8adde7SWilliam Kucharski DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 362*1b8adde7SWilliam Kucharski test -z "$DEPDIR" && continue 363*1b8adde7SWilliam Kucharski am__include=`sed -n 's/^am__include = //p' < "$mf"` 364*1b8adde7SWilliam Kucharski test -z "am__include" && continue 365*1b8adde7SWilliam Kucharski am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 366*1b8adde7SWilliam Kucharski # When using ansi2knr, U may be empty or an underscore; expand it 367*1b8adde7SWilliam Kucharski U=`sed -n 's/^U = //p' < "$mf"` 368*1b8adde7SWilliam Kucharski # Find all dependency output files, they are included files with 369*1b8adde7SWilliam Kucharski # $(DEPDIR) in their names. We invoke sed twice because it is the 370*1b8adde7SWilliam Kucharski # simplest approach to changing $(DEPDIR) to its actual value in the 371*1b8adde7SWilliam Kucharski # expansion. 372*1b8adde7SWilliam Kucharski for file in `sed -n " 373*1b8adde7SWilliam Kucharski s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 374*1b8adde7SWilliam Kucharski sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 375*1b8adde7SWilliam Kucharski # Make sure the directory exists. 376*1b8adde7SWilliam Kucharski test -f "$dirpart/$file" && continue 377*1b8adde7SWilliam Kucharski fdir=`AS_DIRNAME(["$file"])` 378*1b8adde7SWilliam Kucharski AS_MKDIR_P([$dirpart/$fdir]) 379*1b8adde7SWilliam Kucharski # echo "creating $dirpart/$file" 380*1b8adde7SWilliam Kucharski echo '# dummy' > "$dirpart/$file" 381*1b8adde7SWilliam Kucharski done 382*1b8adde7SWilliam Kucharskidone 383*1b8adde7SWilliam Kucharski])# _AM_OUTPUT_DEPENDENCY_COMMANDS 384*1b8adde7SWilliam Kucharski 385*1b8adde7SWilliam Kucharski 386*1b8adde7SWilliam Kucharski# AM_OUTPUT_DEPENDENCY_COMMANDS 387*1b8adde7SWilliam Kucharski# ----------------------------- 388*1b8adde7SWilliam Kucharski# This macro should only be invoked once -- use via AC_REQUIRE. 389*1b8adde7SWilliam Kucharski# 390*1b8adde7SWilliam Kucharski# This code is only required when automatic dependency tracking 391*1b8adde7SWilliam Kucharski# is enabled. FIXME. This creates each `.P' file that we will 392*1b8adde7SWilliam Kucharski# need in order to bootstrap the dependency handling code. 393*1b8adde7SWilliam KucharskiAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 394*1b8adde7SWilliam Kucharski[AC_CONFIG_COMMANDS([depfiles], 395*1b8adde7SWilliam Kucharski [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 396*1b8adde7SWilliam Kucharski [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 397*1b8adde7SWilliam Kucharski]) 398*1b8adde7SWilliam Kucharski 399*1b8adde7SWilliam Kucharski# Do all the work for Automake. -*- Autoconf -*- 400*1b8adde7SWilliam Kucharski 401*1b8adde7SWilliam Kucharski# This macro actually does too much some checks are only needed if 402*1b8adde7SWilliam Kucharski# your package does certain things. But this isn't really a big deal. 403*1b8adde7SWilliam Kucharski 404*1b8adde7SWilliam Kucharski# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 405*1b8adde7SWilliam Kucharski# Free Software Foundation, Inc. 406*1b8adde7SWilliam Kucharski 407*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 408*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 409*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 410*1b8adde7SWilliam Kucharski# any later version. 411*1b8adde7SWilliam Kucharski 412*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 413*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 414*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 415*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 416*1b8adde7SWilliam Kucharski 417*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 418*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 419*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 420*1b8adde7SWilliam Kucharski# 02111-1307, USA. 421*1b8adde7SWilliam Kucharski 422*1b8adde7SWilliam Kucharski# serial 11 423*1b8adde7SWilliam Kucharski 424*1b8adde7SWilliam Kucharski# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 425*1b8adde7SWilliam Kucharski# AM_INIT_AUTOMAKE([OPTIONS]) 426*1b8adde7SWilliam Kucharski# ----------------------------------------------- 427*1b8adde7SWilliam Kucharski# The call with PACKAGE and VERSION arguments is the old style 428*1b8adde7SWilliam Kucharski# call (pre autoconf-2.50), which is being phased out. PACKAGE 429*1b8adde7SWilliam Kucharski# and VERSION should now be passed to AC_INIT and removed from 430*1b8adde7SWilliam Kucharski# the call to AM_INIT_AUTOMAKE. 431*1b8adde7SWilliam Kucharski# We support both call styles for the transition. After 432*1b8adde7SWilliam Kucharski# the next Automake release, Autoconf can make the AC_INIT 433*1b8adde7SWilliam Kucharski# arguments mandatory, and then we can depend on a new Autoconf 434*1b8adde7SWilliam Kucharski# release and drop the old call support. 435*1b8adde7SWilliam KucharskiAC_DEFUN([AM_INIT_AUTOMAKE], 436*1b8adde7SWilliam Kucharski[AC_PREREQ([2.58])dnl 437*1b8adde7SWilliam Kucharskidnl Autoconf wants to disallow AM_ names. We explicitly allow 438*1b8adde7SWilliam Kucharskidnl the ones we care about. 439*1b8adde7SWilliam Kucharskim4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 440*1b8adde7SWilliam KucharskiAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 441*1b8adde7SWilliam KucharskiAC_REQUIRE([AC_PROG_INSTALL])dnl 442*1b8adde7SWilliam Kucharski# test to see if srcdir already configured 443*1b8adde7SWilliam Kucharskiif test "`cd $srcdir && pwd`" != "`pwd`" && 444*1b8adde7SWilliam Kucharski test -f $srcdir/config.status; then 445*1b8adde7SWilliam Kucharski AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 446*1b8adde7SWilliam Kucharskifi 447*1b8adde7SWilliam Kucharski 448*1b8adde7SWilliam Kucharski# test whether we have cygpath 449*1b8adde7SWilliam Kucharskiif test -z "$CYGPATH_W"; then 450*1b8adde7SWilliam Kucharski if (cygpath --version) >/dev/null 2>/dev/null; then 451*1b8adde7SWilliam Kucharski CYGPATH_W='cygpath -w' 452*1b8adde7SWilliam Kucharski else 453*1b8adde7SWilliam Kucharski CYGPATH_W=echo 454*1b8adde7SWilliam Kucharski fi 455*1b8adde7SWilliam Kucharskifi 456*1b8adde7SWilliam KucharskiAC_SUBST([CYGPATH_W]) 457*1b8adde7SWilliam Kucharski 458*1b8adde7SWilliam Kucharski# Define the identity of the package. 459*1b8adde7SWilliam Kucharskidnl Distinguish between old-style and new-style calls. 460*1b8adde7SWilliam Kucharskim4_ifval([$2], 461*1b8adde7SWilliam Kucharski[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 462*1b8adde7SWilliam Kucharski AC_SUBST([PACKAGE], [$1])dnl 463*1b8adde7SWilliam Kucharski AC_SUBST([VERSION], [$2])], 464*1b8adde7SWilliam Kucharski[_AM_SET_OPTIONS([$1])dnl 465*1b8adde7SWilliam Kucharski AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 466*1b8adde7SWilliam Kucharski AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 467*1b8adde7SWilliam Kucharski 468*1b8adde7SWilliam Kucharski_AM_IF_OPTION([no-define],, 469*1b8adde7SWilliam Kucharski[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 470*1b8adde7SWilliam Kucharski AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 471*1b8adde7SWilliam Kucharski 472*1b8adde7SWilliam Kucharski# Some tools Automake needs. 473*1b8adde7SWilliam KucharskiAC_REQUIRE([AM_SANITY_CHECK])dnl 474*1b8adde7SWilliam KucharskiAC_REQUIRE([AC_ARG_PROGRAM])dnl 475*1b8adde7SWilliam KucharskiAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 476*1b8adde7SWilliam KucharskiAM_MISSING_PROG(AUTOCONF, autoconf) 477*1b8adde7SWilliam KucharskiAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 478*1b8adde7SWilliam KucharskiAM_MISSING_PROG(AUTOHEADER, autoheader) 479*1b8adde7SWilliam KucharskiAM_MISSING_PROG(MAKEINFO, makeinfo) 480*1b8adde7SWilliam KucharskiAM_PROG_INSTALL_SH 481*1b8adde7SWilliam KucharskiAM_PROG_INSTALL_STRIP 482*1b8adde7SWilliam KucharskiAC_REQUIRE([AM_PROG_MKDIR_P])dnl 483*1b8adde7SWilliam Kucharski# We need awk for the "check" target. The system "awk" is bad on 484*1b8adde7SWilliam Kucharski# some platforms. 485*1b8adde7SWilliam KucharskiAC_REQUIRE([AC_PROG_AWK])dnl 486*1b8adde7SWilliam KucharskiAC_REQUIRE([AC_PROG_MAKE_SET])dnl 487*1b8adde7SWilliam KucharskiAC_REQUIRE([AM_SET_LEADING_DOT])dnl 488*1b8adde7SWilliam Kucharski_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 489*1b8adde7SWilliam Kucharski [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 490*1b8adde7SWilliam Kucharski [_AM_PROG_TAR([v7])])]) 491*1b8adde7SWilliam Kucharski_AM_IF_OPTION([no-dependencies],, 492*1b8adde7SWilliam Kucharski[AC_PROVIDE_IFELSE([AC_PROG_CC], 493*1b8adde7SWilliam Kucharski [_AM_DEPENDENCIES(CC)], 494*1b8adde7SWilliam Kucharski [define([AC_PROG_CC], 495*1b8adde7SWilliam Kucharski defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 496*1b8adde7SWilliam KucharskiAC_PROVIDE_IFELSE([AC_PROG_CXX], 497*1b8adde7SWilliam Kucharski [_AM_DEPENDENCIES(CXX)], 498*1b8adde7SWilliam Kucharski [define([AC_PROG_CXX], 499*1b8adde7SWilliam Kucharski defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 500*1b8adde7SWilliam Kucharski]) 501*1b8adde7SWilliam Kucharski]) 502*1b8adde7SWilliam Kucharski 503*1b8adde7SWilliam Kucharski 504*1b8adde7SWilliam Kucharski# When config.status generates a header, we must update the stamp-h file. 505*1b8adde7SWilliam Kucharski# This file resides in the same directory as the config header 506*1b8adde7SWilliam Kucharski# that is generated. The stamp files are numbered to have different names. 507*1b8adde7SWilliam Kucharski 508*1b8adde7SWilliam Kucharski# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 509*1b8adde7SWilliam Kucharski# loop where config.status creates the headers, so we can generate 510*1b8adde7SWilliam Kucharski# our stamp files there. 511*1b8adde7SWilliam KucharskiAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 512*1b8adde7SWilliam Kucharski[# Compute $1's index in $config_headers. 513*1b8adde7SWilliam Kucharski_am_stamp_count=1 514*1b8adde7SWilliam Kucharskifor _am_header in $config_headers :; do 515*1b8adde7SWilliam Kucharski case $_am_header in 516*1b8adde7SWilliam Kucharski $1 | $1:* ) 517*1b8adde7SWilliam Kucharski break ;; 518*1b8adde7SWilliam Kucharski * ) 519*1b8adde7SWilliam Kucharski _am_stamp_count=`expr $_am_stamp_count + 1` ;; 520*1b8adde7SWilliam Kucharski esac 521*1b8adde7SWilliam Kucharskidone 522*1b8adde7SWilliam Kucharskiecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) 523*1b8adde7SWilliam Kucharski 524*1b8adde7SWilliam Kucharski# AM_PROG_INSTALL_SH 525*1b8adde7SWilliam Kucharski# ------------------ 526*1b8adde7SWilliam Kucharski# Define $install_sh. 527*1b8adde7SWilliam Kucharski 528*1b8adde7SWilliam Kucharski# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 529*1b8adde7SWilliam Kucharski 530*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 531*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 532*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 533*1b8adde7SWilliam Kucharski# any later version. 534*1b8adde7SWilliam Kucharski 535*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 536*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 537*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 538*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 539*1b8adde7SWilliam Kucharski 540*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 541*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 542*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 543*1b8adde7SWilliam Kucharski# 02111-1307, USA. 544*1b8adde7SWilliam Kucharski 545*1b8adde7SWilliam KucharskiAC_DEFUN([AM_PROG_INSTALL_SH], 546*1b8adde7SWilliam Kucharski[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 547*1b8adde7SWilliam Kucharskiinstall_sh=${install_sh-"$am_aux_dir/install-sh"} 548*1b8adde7SWilliam KucharskiAC_SUBST(install_sh)]) 549*1b8adde7SWilliam Kucharski 550*1b8adde7SWilliam Kucharski# -*- Autoconf -*- 551*1b8adde7SWilliam Kucharski# Copyright (C) 2003 Free Software Foundation, Inc. 552*1b8adde7SWilliam Kucharski 553*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 554*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 555*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 556*1b8adde7SWilliam Kucharski# any later version. 557*1b8adde7SWilliam Kucharski 558*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 559*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 560*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 561*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 562*1b8adde7SWilliam Kucharski 563*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 564*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 565*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 566*1b8adde7SWilliam Kucharski# 02111-1307, USA. 567*1b8adde7SWilliam Kucharski 568*1b8adde7SWilliam Kucharski# serial 1 569*1b8adde7SWilliam Kucharski 570*1b8adde7SWilliam Kucharski# Check whether the underlying file-system supports filenames 571*1b8adde7SWilliam Kucharski# with a leading dot. For instance MS-DOS doesn't. 572*1b8adde7SWilliam KucharskiAC_DEFUN([AM_SET_LEADING_DOT], 573*1b8adde7SWilliam Kucharski[rm -rf .tst 2>/dev/null 574*1b8adde7SWilliam Kucharskimkdir .tst 2>/dev/null 575*1b8adde7SWilliam Kucharskiif test -d .tst; then 576*1b8adde7SWilliam Kucharski am__leading_dot=. 577*1b8adde7SWilliam Kucharskielse 578*1b8adde7SWilliam Kucharski am__leading_dot=_ 579*1b8adde7SWilliam Kucharskifi 580*1b8adde7SWilliam Kucharskirmdir .tst 2>/dev/null 581*1b8adde7SWilliam KucharskiAC_SUBST([am__leading_dot])]) 582*1b8adde7SWilliam Kucharski 583*1b8adde7SWilliam Kucharski# Add --enable-maintainer-mode option to configure. 584*1b8adde7SWilliam Kucharski# From Jim Meyering 585*1b8adde7SWilliam Kucharski 586*1b8adde7SWilliam Kucharski# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 587*1b8adde7SWilliam Kucharski# Free Software Foundation, Inc. 588*1b8adde7SWilliam Kucharski 589*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 590*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 591*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 592*1b8adde7SWilliam Kucharski# any later version. 593*1b8adde7SWilliam Kucharski 594*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 595*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 596*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 597*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 598*1b8adde7SWilliam Kucharski 599*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 600*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 601*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 602*1b8adde7SWilliam Kucharski# 02111-1307, USA. 603*1b8adde7SWilliam Kucharski 604*1b8adde7SWilliam Kucharski# serial 3 605*1b8adde7SWilliam Kucharski 606*1b8adde7SWilliam KucharskiAC_DEFUN([AM_MAINTAINER_MODE], 607*1b8adde7SWilliam Kucharski[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 608*1b8adde7SWilliam Kucharski dnl maintainer-mode is disabled by default 609*1b8adde7SWilliam Kucharski AC_ARG_ENABLE(maintainer-mode, 610*1b8adde7SWilliam Kucharski[ --enable-maintainer-mode enable make rules and dependencies not useful 611*1b8adde7SWilliam Kucharski (and sometimes confusing) to the casual installer], 612*1b8adde7SWilliam Kucharski USE_MAINTAINER_MODE=$enableval, 613*1b8adde7SWilliam Kucharski USE_MAINTAINER_MODE=no) 614*1b8adde7SWilliam Kucharski AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 615*1b8adde7SWilliam Kucharski AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 616*1b8adde7SWilliam Kucharski MAINT=$MAINTAINER_MODE_TRUE 617*1b8adde7SWilliam Kucharski AC_SUBST(MAINT)dnl 618*1b8adde7SWilliam Kucharski] 619*1b8adde7SWilliam Kucharski) 620*1b8adde7SWilliam Kucharski 621*1b8adde7SWilliam KucharskiAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 622*1b8adde7SWilliam Kucharski 623*1b8adde7SWilliam Kucharski# Check to see how 'make' treats includes. -*- Autoconf -*- 624*1b8adde7SWilliam Kucharski 625*1b8adde7SWilliam Kucharski# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 626*1b8adde7SWilliam Kucharski 627*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 628*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 629*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 630*1b8adde7SWilliam Kucharski# any later version. 631*1b8adde7SWilliam Kucharski 632*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 633*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 634*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 635*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 636*1b8adde7SWilliam Kucharski 637*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 638*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 639*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 640*1b8adde7SWilliam Kucharski# 02111-1307, USA. 641*1b8adde7SWilliam Kucharski 642*1b8adde7SWilliam Kucharski# serial 2 643*1b8adde7SWilliam Kucharski 644*1b8adde7SWilliam Kucharski# AM_MAKE_INCLUDE() 645*1b8adde7SWilliam Kucharski# ----------------- 646*1b8adde7SWilliam Kucharski# Check to see how make treats includes. 647*1b8adde7SWilliam KucharskiAC_DEFUN([AM_MAKE_INCLUDE], 648*1b8adde7SWilliam Kucharski[am_make=${MAKE-make} 649*1b8adde7SWilliam Kucharskicat > confinc << 'END' 650*1b8adde7SWilliam Kucharskiam__doit: 651*1b8adde7SWilliam Kucharski @echo done 652*1b8adde7SWilliam Kucharski.PHONY: am__doit 653*1b8adde7SWilliam KucharskiEND 654*1b8adde7SWilliam Kucharski# If we don't find an include directive, just comment out the code. 655*1b8adde7SWilliam KucharskiAC_MSG_CHECKING([for style of include used by $am_make]) 656*1b8adde7SWilliam Kucharskiam__include="#" 657*1b8adde7SWilliam Kucharskiam__quote= 658*1b8adde7SWilliam Kucharski_am_result=none 659*1b8adde7SWilliam Kucharski# First try GNU make style include. 660*1b8adde7SWilliam Kucharskiecho "include confinc" > confmf 661*1b8adde7SWilliam Kucharski# We grep out `Entering directory' and `Leaving directory' 662*1b8adde7SWilliam Kucharski# messages which can occur if `w' ends up in MAKEFLAGS. 663*1b8adde7SWilliam Kucharski# In particular we don't look at `^make:' because GNU make might 664*1b8adde7SWilliam Kucharski# be invoked under some other name (usually "gmake"), in which 665*1b8adde7SWilliam Kucharski# case it prints its new name instead of `make'. 666*1b8adde7SWilliam Kucharskiif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 667*1b8adde7SWilliam Kucharski am__include=include 668*1b8adde7SWilliam Kucharski am__quote= 669*1b8adde7SWilliam Kucharski _am_result=GNU 670*1b8adde7SWilliam Kucharskifi 671*1b8adde7SWilliam Kucharski# Now try BSD make style include. 672*1b8adde7SWilliam Kucharskiif test "$am__include" = "#"; then 673*1b8adde7SWilliam Kucharski echo '.include "confinc"' > confmf 674*1b8adde7SWilliam Kucharski if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 675*1b8adde7SWilliam Kucharski am__include=.include 676*1b8adde7SWilliam Kucharski am__quote="\"" 677*1b8adde7SWilliam Kucharski _am_result=BSD 678*1b8adde7SWilliam Kucharski fi 679*1b8adde7SWilliam Kucharskifi 680*1b8adde7SWilliam KucharskiAC_SUBST([am__include]) 681*1b8adde7SWilliam KucharskiAC_SUBST([am__quote]) 682*1b8adde7SWilliam KucharskiAC_MSG_RESULT([$_am_result]) 683*1b8adde7SWilliam Kucharskirm -f confinc confmf 684*1b8adde7SWilliam Kucharski]) 685*1b8adde7SWilliam Kucharski 686*1b8adde7SWilliam Kucharski# -*- Autoconf -*- 687*1b8adde7SWilliam Kucharski 688*1b8adde7SWilliam Kucharski 689*1b8adde7SWilliam Kucharski# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. 690*1b8adde7SWilliam Kucharski 691*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 692*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 693*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 694*1b8adde7SWilliam Kucharski# any later version. 695*1b8adde7SWilliam Kucharski 696*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 697*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 698*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 699*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 700*1b8adde7SWilliam Kucharski 701*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 702*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 703*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 704*1b8adde7SWilliam Kucharski# 02111-1307, USA. 705*1b8adde7SWilliam Kucharski 706*1b8adde7SWilliam Kucharski# serial 3 707*1b8adde7SWilliam Kucharski 708*1b8adde7SWilliam Kucharski# AM_MISSING_PROG(NAME, PROGRAM) 709*1b8adde7SWilliam Kucharski# ------------------------------ 710*1b8adde7SWilliam KucharskiAC_DEFUN([AM_MISSING_PROG], 711*1b8adde7SWilliam Kucharski[AC_REQUIRE([AM_MISSING_HAS_RUN]) 712*1b8adde7SWilliam Kucharski$1=${$1-"${am_missing_run}$2"} 713*1b8adde7SWilliam KucharskiAC_SUBST($1)]) 714*1b8adde7SWilliam Kucharski 715*1b8adde7SWilliam Kucharski 716*1b8adde7SWilliam Kucharski# AM_MISSING_HAS_RUN 717*1b8adde7SWilliam Kucharski# ------------------ 718*1b8adde7SWilliam Kucharski# Define MISSING if not defined so far and test if it supports --run. 719*1b8adde7SWilliam Kucharski# If it does, set am_missing_run to use it, otherwise, to nothing. 720*1b8adde7SWilliam KucharskiAC_DEFUN([AM_MISSING_HAS_RUN], 721*1b8adde7SWilliam Kucharski[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 722*1b8adde7SWilliam Kucharskitest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 723*1b8adde7SWilliam Kucharski# Use eval to expand $SHELL 724*1b8adde7SWilliam Kucharskiif eval "$MISSING --run true"; then 725*1b8adde7SWilliam Kucharski am_missing_run="$MISSING --run " 726*1b8adde7SWilliam Kucharskielse 727*1b8adde7SWilliam Kucharski am_missing_run= 728*1b8adde7SWilliam Kucharski AC_MSG_WARN([`missing' script is too old or missing]) 729*1b8adde7SWilliam Kucharskifi 730*1b8adde7SWilliam Kucharski]) 731*1b8adde7SWilliam Kucharski 732*1b8adde7SWilliam Kucharski# AM_PROG_MKDIR_P 733*1b8adde7SWilliam Kucharski# --------------- 734*1b8adde7SWilliam Kucharski# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. 735*1b8adde7SWilliam Kucharski 736*1b8adde7SWilliam Kucharski# Copyright (C) 2003, 2004 Free Software Foundation, Inc. 737*1b8adde7SWilliam Kucharski 738*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 739*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 740*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 741*1b8adde7SWilliam Kucharski# any later version. 742*1b8adde7SWilliam Kucharski 743*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 744*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 745*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 746*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 747*1b8adde7SWilliam Kucharski 748*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 749*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 750*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 751*1b8adde7SWilliam Kucharski# 02111-1307, USA. 752*1b8adde7SWilliam Kucharski 753*1b8adde7SWilliam Kucharski# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories 754*1b8adde7SWilliam Kucharski# created by `make install' are always world readable, even if the 755*1b8adde7SWilliam Kucharski# installer happens to have an overly restrictive umask (e.g. 077). 756*1b8adde7SWilliam Kucharski# This was a mistake. There are at least two reasons why we must not 757*1b8adde7SWilliam Kucharski# use `-m 0755': 758*1b8adde7SWilliam Kucharski# - it causes special bits like SGID to be ignored, 759*1b8adde7SWilliam Kucharski# - it may be too restrictive (some setups expect 775 directories). 760*1b8adde7SWilliam Kucharski# 761*1b8adde7SWilliam Kucharski# Do not use -m 0755 and let people choose whatever they expect by 762*1b8adde7SWilliam Kucharski# setting umask. 763*1b8adde7SWilliam Kucharski# 764*1b8adde7SWilliam Kucharski# We cannot accept any implementation of `mkdir' that recognizes `-p'. 765*1b8adde7SWilliam Kucharski# Some implementations (such as Solaris 8's) are not thread-safe: if a 766*1b8adde7SWilliam Kucharski# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' 767*1b8adde7SWilliam Kucharski# concurrently, both version can detect that a/ is missing, but only 768*1b8adde7SWilliam Kucharski# one can create it and the other will error out. Consequently we 769*1b8adde7SWilliam Kucharski# restrict ourselves to GNU make (using the --version option ensures 770*1b8adde7SWilliam Kucharski# this.) 771*1b8adde7SWilliam KucharskiAC_DEFUN([AM_PROG_MKDIR_P], 772*1b8adde7SWilliam Kucharski[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 773*1b8adde7SWilliam Kucharski # We used to keeping the `.' as first argument, in order to 774*1b8adde7SWilliam Kucharski # allow $(mkdir_p) to be used without argument. As in 775*1b8adde7SWilliam Kucharski # $(mkdir_p) $(somedir) 776*1b8adde7SWilliam Kucharski # where $(somedir) is conditionally defined. However this is wrong 777*1b8adde7SWilliam Kucharski # for two reasons: 778*1b8adde7SWilliam Kucharski # 1. if the package is installed by a user who cannot write `.' 779*1b8adde7SWilliam Kucharski # make install will fail, 780*1b8adde7SWilliam Kucharski # 2. the above comment should most certainly read 781*1b8adde7SWilliam Kucharski # $(mkdir_p) $(DESTDIR)$(somedir) 782*1b8adde7SWilliam Kucharski # so it does not work when $(somedir) is undefined and 783*1b8adde7SWilliam Kucharski # $(DESTDIR) is not. 784*1b8adde7SWilliam Kucharski # To support the latter case, we have to write 785*1b8adde7SWilliam Kucharski # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), 786*1b8adde7SWilliam Kucharski # so the `.' trick is pointless. 787*1b8adde7SWilliam Kucharski mkdir_p='mkdir -p --' 788*1b8adde7SWilliam Kucharskielse 789*1b8adde7SWilliam Kucharski # On NextStep and OpenStep, the `mkdir' command does not 790*1b8adde7SWilliam Kucharski # recognize any option. It will interpret all options as 791*1b8adde7SWilliam Kucharski # directories to create, and then abort because `.' already 792*1b8adde7SWilliam Kucharski # exists. 793*1b8adde7SWilliam Kucharski for d in ./-p ./--version; 794*1b8adde7SWilliam Kucharski do 795*1b8adde7SWilliam Kucharski test -d $d && rmdir $d 796*1b8adde7SWilliam Kucharski done 797*1b8adde7SWilliam Kucharski # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. 798*1b8adde7SWilliam Kucharski if test -f "$ac_aux_dir/mkinstalldirs"; then 799*1b8adde7SWilliam Kucharski mkdir_p='$(mkinstalldirs)' 800*1b8adde7SWilliam Kucharski else 801*1b8adde7SWilliam Kucharski mkdir_p='$(install_sh) -d' 802*1b8adde7SWilliam Kucharski fi 803*1b8adde7SWilliam Kucharskifi 804*1b8adde7SWilliam KucharskiAC_SUBST([mkdir_p])]) 805*1b8adde7SWilliam Kucharski 806*1b8adde7SWilliam Kucharski# Helper functions for option handling. -*- Autoconf -*- 807*1b8adde7SWilliam Kucharski 808*1b8adde7SWilliam Kucharski# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 809*1b8adde7SWilliam Kucharski 810*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 811*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 812*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 813*1b8adde7SWilliam Kucharski# any later version. 814*1b8adde7SWilliam Kucharski 815*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 816*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 817*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 818*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 819*1b8adde7SWilliam Kucharski 820*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 821*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 822*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 823*1b8adde7SWilliam Kucharski# 02111-1307, USA. 824*1b8adde7SWilliam Kucharski 825*1b8adde7SWilliam Kucharski# serial 2 826*1b8adde7SWilliam Kucharski 827*1b8adde7SWilliam Kucharski# _AM_MANGLE_OPTION(NAME) 828*1b8adde7SWilliam Kucharski# ----------------------- 829*1b8adde7SWilliam KucharskiAC_DEFUN([_AM_MANGLE_OPTION], 830*1b8adde7SWilliam Kucharski[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 831*1b8adde7SWilliam Kucharski 832*1b8adde7SWilliam Kucharski# _AM_SET_OPTION(NAME) 833*1b8adde7SWilliam Kucharski# ------------------------------ 834*1b8adde7SWilliam Kucharski# Set option NAME. Presently that only means defining a flag for this option. 835*1b8adde7SWilliam KucharskiAC_DEFUN([_AM_SET_OPTION], 836*1b8adde7SWilliam Kucharski[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 837*1b8adde7SWilliam Kucharski 838*1b8adde7SWilliam Kucharski# _AM_SET_OPTIONS(OPTIONS) 839*1b8adde7SWilliam Kucharski# ---------------------------------- 840*1b8adde7SWilliam Kucharski# OPTIONS is a space-separated list of Automake options. 841*1b8adde7SWilliam KucharskiAC_DEFUN([_AM_SET_OPTIONS], 842*1b8adde7SWilliam Kucharski[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 843*1b8adde7SWilliam Kucharski 844*1b8adde7SWilliam Kucharski# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 845*1b8adde7SWilliam Kucharski# ------------------------------------------- 846*1b8adde7SWilliam Kucharski# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 847*1b8adde7SWilliam KucharskiAC_DEFUN([_AM_IF_OPTION], 848*1b8adde7SWilliam Kucharski[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 849*1b8adde7SWilliam Kucharski 850*1b8adde7SWilliam Kucharski# 851*1b8adde7SWilliam Kucharski# Check to make sure that the build environment is sane. 852*1b8adde7SWilliam Kucharski# 853*1b8adde7SWilliam Kucharski 854*1b8adde7SWilliam Kucharski# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. 855*1b8adde7SWilliam Kucharski 856*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 857*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 858*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 859*1b8adde7SWilliam Kucharski# any later version. 860*1b8adde7SWilliam Kucharski 861*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 862*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 863*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 864*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 865*1b8adde7SWilliam Kucharski 866*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 867*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 868*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 869*1b8adde7SWilliam Kucharski# 02111-1307, USA. 870*1b8adde7SWilliam Kucharski 871*1b8adde7SWilliam Kucharski# serial 3 872*1b8adde7SWilliam Kucharski 873*1b8adde7SWilliam Kucharski# AM_SANITY_CHECK 874*1b8adde7SWilliam Kucharski# --------------- 875*1b8adde7SWilliam KucharskiAC_DEFUN([AM_SANITY_CHECK], 876*1b8adde7SWilliam Kucharski[AC_MSG_CHECKING([whether build environment is sane]) 877*1b8adde7SWilliam Kucharski# Just in case 878*1b8adde7SWilliam Kucharskisleep 1 879*1b8adde7SWilliam Kucharskiecho timestamp > conftest.file 880*1b8adde7SWilliam Kucharski# Do `set' in a subshell so we don't clobber the current shell's 881*1b8adde7SWilliam Kucharski# arguments. Must try -L first in case configure is actually a 882*1b8adde7SWilliam Kucharski# symlink; some systems play weird games with the mod time of symlinks 883*1b8adde7SWilliam Kucharski# (eg FreeBSD returns the mod time of the symlink's containing 884*1b8adde7SWilliam Kucharski# directory). 885*1b8adde7SWilliam Kucharskiif ( 886*1b8adde7SWilliam Kucharski set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 887*1b8adde7SWilliam Kucharski if test "$[*]" = "X"; then 888*1b8adde7SWilliam Kucharski # -L didn't work. 889*1b8adde7SWilliam Kucharski set X `ls -t $srcdir/configure conftest.file` 890*1b8adde7SWilliam Kucharski fi 891*1b8adde7SWilliam Kucharski rm -f conftest.file 892*1b8adde7SWilliam Kucharski if test "$[*]" != "X $srcdir/configure conftest.file" \ 893*1b8adde7SWilliam Kucharski && test "$[*]" != "X conftest.file $srcdir/configure"; then 894*1b8adde7SWilliam Kucharski 895*1b8adde7SWilliam Kucharski # If neither matched, then we have a broken ls. This can happen 896*1b8adde7SWilliam Kucharski # if, for instance, CONFIG_SHELL is bash and it inherits a 897*1b8adde7SWilliam Kucharski # broken ls alias from the environment. This has actually 898*1b8adde7SWilliam Kucharski # happened. Such a system could not be considered "sane". 899*1b8adde7SWilliam Kucharski AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 900*1b8adde7SWilliam Kucharskialias in your environment]) 901*1b8adde7SWilliam Kucharski fi 902*1b8adde7SWilliam Kucharski 903*1b8adde7SWilliam Kucharski test "$[2]" = conftest.file 904*1b8adde7SWilliam Kucharski ) 905*1b8adde7SWilliam Kucharskithen 906*1b8adde7SWilliam Kucharski # Ok. 907*1b8adde7SWilliam Kucharski : 908*1b8adde7SWilliam Kucharskielse 909*1b8adde7SWilliam Kucharski AC_MSG_ERROR([newly created file is older than distributed files! 910*1b8adde7SWilliam KucharskiCheck your system clock]) 911*1b8adde7SWilliam Kucharskifi 912*1b8adde7SWilliam KucharskiAC_MSG_RESULT(yes)]) 913*1b8adde7SWilliam Kucharski 914*1b8adde7SWilliam Kucharski# AM_PROG_INSTALL_STRIP 915*1b8adde7SWilliam Kucharski 916*1b8adde7SWilliam Kucharski# Copyright (C) 2001, 2003 Free Software Foundation, Inc. 917*1b8adde7SWilliam Kucharski 918*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 919*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 920*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 921*1b8adde7SWilliam Kucharski# any later version. 922*1b8adde7SWilliam Kucharski 923*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 924*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 925*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 926*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 927*1b8adde7SWilliam Kucharski 928*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 929*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 930*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 931*1b8adde7SWilliam Kucharski# 02111-1307, USA. 932*1b8adde7SWilliam Kucharski 933*1b8adde7SWilliam Kucharski# One issue with vendor `install' (even GNU) is that you can't 934*1b8adde7SWilliam Kucharski# specify the program used to strip binaries. This is especially 935*1b8adde7SWilliam Kucharski# annoying in cross-compiling environments, where the build's strip 936*1b8adde7SWilliam Kucharski# is unlikely to handle the host's binaries. 937*1b8adde7SWilliam Kucharski# Fortunately install-sh will honor a STRIPPROG variable, so we 938*1b8adde7SWilliam Kucharski# always use install-sh in `make install-strip', and initialize 939*1b8adde7SWilliam Kucharski# STRIPPROG with the value of the STRIP variable (set by the user). 940*1b8adde7SWilliam KucharskiAC_DEFUN([AM_PROG_INSTALL_STRIP], 941*1b8adde7SWilliam Kucharski[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 942*1b8adde7SWilliam Kucharski# Installed binaries are usually stripped using `strip' when the user 943*1b8adde7SWilliam Kucharski# run `make install-strip'. However `strip' might not be the right 944*1b8adde7SWilliam Kucharski# tool to use in cross-compilation environments, therefore Automake 945*1b8adde7SWilliam Kucharski# will honor the `STRIP' environment variable to overrule this program. 946*1b8adde7SWilliam Kucharskidnl Don't test for $cross_compiling = yes, because it might be `maybe'. 947*1b8adde7SWilliam Kucharskiif test "$cross_compiling" != no; then 948*1b8adde7SWilliam Kucharski AC_CHECK_TOOL([STRIP], [strip], :) 949*1b8adde7SWilliam Kucharskifi 950*1b8adde7SWilliam KucharskiINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" 951*1b8adde7SWilliam KucharskiAC_SUBST([INSTALL_STRIP_PROGRAM])]) 952*1b8adde7SWilliam Kucharski 953*1b8adde7SWilliam Kucharski# Check how to create a tarball. -*- Autoconf -*- 954*1b8adde7SWilliam Kucharski 955*1b8adde7SWilliam Kucharski# Copyright (C) 2004 Free Software Foundation, Inc. 956*1b8adde7SWilliam Kucharski 957*1b8adde7SWilliam Kucharski# This program is free software; you can redistribute it and/or modify 958*1b8adde7SWilliam Kucharski# it under the terms of the GNU General Public License as published by 959*1b8adde7SWilliam Kucharski# the Free Software Foundation; either version 2, or (at your option) 960*1b8adde7SWilliam Kucharski# any later version. 961*1b8adde7SWilliam Kucharski 962*1b8adde7SWilliam Kucharski# This program is distributed in the hope that it will be useful, 963*1b8adde7SWilliam Kucharski# but WITHOUT ANY WARRANTY; without even the implied warranty of 964*1b8adde7SWilliam Kucharski# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 965*1b8adde7SWilliam Kucharski# GNU General Public License for more details. 966*1b8adde7SWilliam Kucharski 967*1b8adde7SWilliam Kucharski# You should have received a copy of the GNU General Public License 968*1b8adde7SWilliam Kucharski# along with this program; if not, write to the Free Software 969*1b8adde7SWilliam Kucharski# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 970*1b8adde7SWilliam Kucharski# 02111-1307, USA. 971*1b8adde7SWilliam Kucharski 972*1b8adde7SWilliam Kucharski# serial 1 973*1b8adde7SWilliam Kucharski 974*1b8adde7SWilliam Kucharski 975*1b8adde7SWilliam Kucharski# _AM_PROG_TAR(FORMAT) 976*1b8adde7SWilliam Kucharski# -------------------- 977*1b8adde7SWilliam Kucharski# Check how to create a tarball in format FORMAT. 978*1b8adde7SWilliam Kucharski# FORMAT should be one of `v7', `ustar', or `pax'. 979*1b8adde7SWilliam Kucharski# 980*1b8adde7SWilliam Kucharski# Substitute a variable $(am__tar) that is a command 981*1b8adde7SWilliam Kucharski# writing to stdout a FORMAT-tarball containing the directory 982*1b8adde7SWilliam Kucharski# $tardir. 983*1b8adde7SWilliam Kucharski# tardir=directory && $(am__tar) > result.tar 984*1b8adde7SWilliam Kucharski# 985*1b8adde7SWilliam Kucharski# Substitute a variable $(am__untar) that extract such 986*1b8adde7SWilliam Kucharski# a tarball read from stdin. 987*1b8adde7SWilliam Kucharski# $(am__untar) < result.tar 988*1b8adde7SWilliam KucharskiAC_DEFUN([_AM_PROG_TAR], 989*1b8adde7SWilliam Kucharski[# Always define AMTAR for backward compatibility. 990*1b8adde7SWilliam KucharskiAM_MISSING_PROG([AMTAR], [tar]) 991*1b8adde7SWilliam Kucharskim4_if([$1], [v7], 992*1b8adde7SWilliam Kucharski [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 993*1b8adde7SWilliam Kucharski [m4_case([$1], [ustar],, [pax],, 994*1b8adde7SWilliam Kucharski [m4_fatal([Unknown tar format])]) 995*1b8adde7SWilliam KucharskiAC_MSG_CHECKING([how to create a $1 tar archive]) 996*1b8adde7SWilliam Kucharski# Loop over all known methods to create a tar archive until one works. 997*1b8adde7SWilliam Kucharski_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 998*1b8adde7SWilliam Kucharski_am_tools=${am_cv_prog_tar_$1-$_am_tools} 999*1b8adde7SWilliam Kucharski# Do not fold the above two line into one, because Tru64 sh and 1000*1b8adde7SWilliam Kucharski# Solaris sh will not grok spaces in the rhs of `-'. 1001*1b8adde7SWilliam Kucharskifor _am_tool in $_am_tools 1002*1b8adde7SWilliam Kucharskido 1003*1b8adde7SWilliam Kucharski case $_am_tool in 1004*1b8adde7SWilliam Kucharski gnutar) 1005*1b8adde7SWilliam Kucharski for _am_tar in tar gnutar gtar; 1006*1b8adde7SWilliam Kucharski do 1007*1b8adde7SWilliam Kucharski AM_RUN_LOG([$_am_tar --version]) && break 1008*1b8adde7SWilliam Kucharski done 1009*1b8adde7SWilliam Kucharski am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1010*1b8adde7SWilliam Kucharski am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1011*1b8adde7SWilliam Kucharski am__untar="$_am_tar -xf -" 1012*1b8adde7SWilliam Kucharski ;; 1013*1b8adde7SWilliam Kucharski plaintar) 1014*1b8adde7SWilliam Kucharski # Must skip GNU tar: if it does not support --format= it doesn't create 1015*1b8adde7SWilliam Kucharski # ustar tarball either. 1016*1b8adde7SWilliam Kucharski (tar --version) >/dev/null 2>&1 && continue 1017*1b8adde7SWilliam Kucharski am__tar='tar chf - "$$tardir"' 1018*1b8adde7SWilliam Kucharski am__tar_='tar chf - "$tardir"' 1019*1b8adde7SWilliam Kucharski am__untar='tar xf -' 1020*1b8adde7SWilliam Kucharski ;; 1021*1b8adde7SWilliam Kucharski pax) 1022*1b8adde7SWilliam Kucharski am__tar='pax -L -x $1 -w "$$tardir"' 1023*1b8adde7SWilliam Kucharski am__tar_='pax -L -x $1 -w "$tardir"' 1024*1b8adde7SWilliam Kucharski am__untar='pax -r' 1025*1b8adde7SWilliam Kucharski ;; 1026*1b8adde7SWilliam Kucharski cpio) 1027*1b8adde7SWilliam Kucharski am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1028*1b8adde7SWilliam Kucharski am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1029*1b8adde7SWilliam Kucharski am__untar='cpio -i -H $1 -d' 1030*1b8adde7SWilliam Kucharski ;; 1031*1b8adde7SWilliam Kucharski none) 1032*1b8adde7SWilliam Kucharski am__tar=false 1033*1b8adde7SWilliam Kucharski am__tar_=false 1034*1b8adde7SWilliam Kucharski am__untar=false 1035*1b8adde7SWilliam Kucharski ;; 1036*1b8adde7SWilliam Kucharski esac 1037*1b8adde7SWilliam Kucharski 1038*1b8adde7SWilliam Kucharski # If the value was cached, stop now. We just wanted to have am__tar 1039*1b8adde7SWilliam Kucharski # and am__untar set. 1040*1b8adde7SWilliam Kucharski test -n "${am_cv_prog_tar_$1}" && break 1041*1b8adde7SWilliam Kucharski 1042*1b8adde7SWilliam Kucharski # tar/untar a dummy directory, and stop if the command works 1043*1b8adde7SWilliam Kucharski rm -rf conftest.dir 1044*1b8adde7SWilliam Kucharski mkdir conftest.dir 1045*1b8adde7SWilliam Kucharski echo GrepMe > conftest.dir/file 1046*1b8adde7SWilliam Kucharski AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1047*1b8adde7SWilliam Kucharski rm -rf conftest.dir 1048*1b8adde7SWilliam Kucharski if test -s conftest.tar; then 1049*1b8adde7SWilliam Kucharski AM_RUN_LOG([$am__untar <conftest.tar]) 1050*1b8adde7SWilliam Kucharski grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1051*1b8adde7SWilliam Kucharski fi 1052*1b8adde7SWilliam Kucharskidone 1053*1b8adde7SWilliam Kucharskirm -rf conftest.dir 1054*1b8adde7SWilliam Kucharski 1055*1b8adde7SWilliam KucharskiAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1056*1b8adde7SWilliam KucharskiAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1057*1b8adde7SWilliam KucharskiAC_SUBST([am__tar]) 1058*1b8adde7SWilliam KucharskiAC_SUBST([am__untar]) 1059*1b8adde7SWilliam Kucharski]) # _AM_PROG_TAR 1060*1b8adde7SWilliam Kucharski 1061*1b8adde7SWilliam Kucharskim4_include([acinclude.m4]) 1062