Tag
Hash :
eafb319c
Author :
Date :
2002-07-19T20:17:59
* m4/init.m4: Require Autoconf 2.53b. * m4/header.m4 (AM_CONFIG_HEADER): Redefine using AU_DEFUN. * m4/ccstdc.m4 (fp_PROG_CC_STDC): New AU_DEFUN. * m4/dmalloc.m4 (fp_WITH_DMALLOC): Likewise. * m4/lispdir.m4 (ud_PATH_LISPDIR): Likewise. * m4/maintainer.m4 (jm_MAINTAINER_MODE): Likewise. * m4/protos.m4 (fp_C_PROTOTYPES): Likewise. * m4/regex.m4 (fp_WITH_REGEX): Likewise. * m4/termios.m4: Delete. AM_SYS_POSIX_TERMIOS is now AU_DEFUNed in m4/obsolete.m4. * m4/winsz.m4: Delete. AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL is now AU_DEFUNed in m4/obsolete.m4. * m4/obsol-gt.m4, m4/obsol-lt.m4, m4/obsolete.m4 : New files. * m4/Makefile.am (dist_m4data_DATA): Add obsol-gt.m4, obsol-lt.m4, and obsolete.m4. Remove termios.m4 and winsz.m4. * aclocal.in (obsolete, obsolete_rx): Remove. (scan_configure): Don't grep for obsolete macros. * tests/defs (AUTOUPDATE): Define. * Makefile.am (maintainer-check): Check for misuses of autoupdate. * tests/obsolete.test: Rewrite. Exercize the AU_DEFUN macros from m4/obsolete.m4.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
# -*- shell-script -*-
# Defines for Automake testing environment.
# Tom Tromey <tromey@cygnus.com>
# Ensure $srcdir set correctly.
test -f $srcdir/defs || {
echo "defs: installation error" 1>&2
exit 1
}
me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
# See how redirections should work. User can set VERBOSE to see all
# output.
test -z "$VERBOSE" && {
exec > /dev/null 2>&1
}
# User can override various tools used.
test -z "$PERL" && PERL=perl
test -z "$MAKE" && MAKE=make
test -z "$AUTOCONF" && AUTOCONF=autoconf
test -z "$AUTOHEADER" && AUTOHEADER=autoheader
test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
if test -n "$required"
then
for tool in $required
do
# Check that each required tool is present.
case $tool in
bison)
# Since bison is required, we pick YACC for ./configure.
YACC='bison -y'
export YACC
echo "$me: running bison --version"
( bison --version ) || exit 77
;;
GNUmake)
echo "$me: running $MAKE --version"
( $MAKE --version ) || exit 77
;;
gcc)
# When gcc is required, export `CC=gcc' so that ./configure
# always use it. This is important only when the user
# has defined CC in his environment, otherwise ./configure will
# prefer gcc to other compilers.
CC=gcc
export CC
echo "$me: running $CC --version"
( $CC --version ) || exit 77
;;
g++)
CXX=g++
export CXX
echo "$me: running $CXX --version"
( $CXX --version ) || exit 77
;;
# Generic case: the tool must support --version.
*)
echo "$me: running $tool --version"
( $tool --version ) || exit 77
;;
esac
# Additional variables to define if some $tool is required.
case $tool in
gcc)
;;
esac
done
fi
# Always use an absolute srcdir. Otherwise symlinks made in subdirs
# of the test dir just won't work.
case "$srcdir" in
[\\/]* | ?:[\\/]*)
;;
*)
srcdir=`CDPATH=: && cd "$srcdir" && pwd`
;;
esac
chmod -R a+rwx testSubDir > /dev/null 2>&1
rm -rf testSubDir > /dev/null 2>&1
mkdir testSubDir
# Copy in some files we need.
for file in install-sh mkinstalldirs missing depcomp; do
cp $srcdir/../lib/$file testSubDir/$file || exit 1
done
cd ./testSubDir
# Build appropriate environment in test directory. Eg create
# configure.in, touch all necessary files, etc.
# Don't use AC_OUTPUT, but AC_CONFIG_FILES so that appending
# still produces a valid configure.ac. But then, tests running
# config.status really need to append AC_OUTPUT.
cat > configure.in << END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_CONFIG_FILES([Makefile])
END
# Unset some MAKE... variables that may cause $MAKE to act like a
# recursively invoked sub-make. Any $MAKE invocation in a test is
# conceptually an independent invocation, not part of the main
# 'automake' build.
unset MFLAGS
unset MAKEFLAGS
unset MAKELEVEL
unset DESTDIR
echo "=== Running test $0"
# See how Automake should be run. We put --foreign as the default
# strictness to avoid having to create lots and lots of files. A test
# can override this by specifying a different strictness.
if test -z "$AUTOMAKE"; then
perllibdir=$srcdir/../lib
export perllibdir
# Use -Wall -Werror by default. Tests for which this is inappropriate
# (e.g. when testing that a warning is enabled by a specific switch)
# should use -Wnone or/and -Wno-error
AUTOMAKE="$PERL `pwd`/../../automake --libdir=$srcdir/../lib --foreign -Werror -Wall"
fi
# See how aclocal should be run.
if test -z "$ACLOCAL"; then
perllibdir=$srcdir/../lib
export perllibdir
# Most of the files are in $srcdir/../m4. However amversion.m4 is
# generated in ../m4, so we include that directory in the search
# path too.
ACLOCAL="$PERL `pwd`/../../aclocal -I `pwd`/../../m4 --acdir=$srcdir/../m4"
fi
# We might need extra macros, e.g., from Libtool or Gettext.
# Find them on the system.
# Use `-I $srcdir/../m4' in addition to `--acdir', because the
# other `-I' directories added for libtool and gettext might contain
# files from an old version of Automake that we don't want to use.
aclocaldir=`(aclocal --print-ac-dir) 2>/dev/null`
case $required in
*libtool* )
test -f "$aclocaldir/libtool.m4" || exit 77
ACLOCAL="$ACLOCAL -I $srcdir/../m4 -I $aclocaldir"
;;
*gettext* )
test -f "$aclocaldir/gettext.m4" || exit 77
ACLOCAL="$ACLOCAL -I $srcdir/../m4 -I $aclocaldir"
;;
esac
# Export AUTOMAKE and ACLOCAL so that rebuild rules in Makefiles
# generated for the tests do not use the installed tools.
export AUTOMAKE ACLOCAL
# POSIX no longer requires 'egrep' and 'fgrep',
# but some hosts lack 'grep -E' and 'grep -F'.
if test -z "$EGREP"; then
if echo a | (grep -E '(a|b)') >/dev/null 2>&1; then
EGREP='grep -E'
else
EGREP='egrep'
fi
fi
if test -z "$FGREP"; then
if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1; then
FGREP='grep -F'
else
FGREP='fgrep'
fi
fi
# The tests call `make -e' but we do not want $srcdir from the evironment
# to override the definition from the Makefile.
testsrcdir=$srcdir
unset srcdir
# Turn on shell traces when VERBOSE=x.
if test "x$VERBOSE" = xx; then
set -x
else
:
fi