libtool is required.
* tests/lex.test: Run AC_INIT once.
* tests/ldflags.test, tests/listval.test, tests/suffix2.test:
Libtool is required.
* tests/header.test: Built a correct configure.in.
* tests/defun2.test (configure.in): Be a bit respectful with
Autoconf, close the macro invocations.
* tests/confdeps.test: Even when not using aclocal, aclocal.m4
must be correct.
* automake.in (scan_autoconf_traces): Add support for
AC_CANONICAL_HOST, AC_CANONICAL_SYSTEM, A[CM]_PROG_LIBTOOL,
AM_CONFIG_HEADER, AM_MAINTAINER_MODE.
* tests/condincl.test (target): Better pattern, to avoid matching
the definition of `target_alias' which is now properly discovered
as an AC_SUBST by traces.
* cond4.test: Better grep pattern: After all, why shouldn't
TWO_FALSE be AC_SUBST properly.
* tests/installsh.test (AUTOMAKE, ACLOCAL): Adjust.
+2001-10-21 Akim Demaille <akim@epita.fr>
+
+ * tests/defs (ACLOCAL): Point to the installed aclocaldir is
+ libtool is required.
+ * tests/lex.test: Run AC_INIT once.
+ * tests/ldflags.test, tests/listval.test, tests/suffix2.test:
+ Libtool is required.
+ * tests/header.test: Built a correct configure.in.
+ * tests/defun2.test (configure.in): Be a bit respectful with
+ Autoconf, close the macro invocations.
+ * tests/confdeps.test: Even when not using aclocal, aclocal.m4
+ must be correct.
+
+ * automake.in (scan_autoconf_traces): Add support for
+ AC_CANONICAL_HOST, AC_CANONICAL_SYSTEM, A[CM]_PROG_LIBTOOL,
+ AM_CONFIG_HEADER, AM_MAINTAINER_MODE.
+ * tests/condincl.test (target): Better pattern, to avoid matching
+ the definition of `target_alias' which is now properly discovered
+ as an AC_SUBST by traces.
+ * cond4.test: Better grep pattern: After all, why shouldn't
+ TWO_FALSE be AC_SUBST properly.
+ * tests/installsh.test (AUTOMAKE, ACLOCAL): Adjust.
+
2001-10-20 Kevin Ryde <user42@zip.com.au>
* lib/am/ansi2knr.am (mostlyclean-kr): Only rm *_.c when
AC_CONFIG_AUX_DIR.
* tests/alpha.test (configure.in): Automake wants a Makefile.
-
2001-10-20 Akim Demaille <akim@epita.fr>
* automake.in (scan_autoconf_traces): Use an unlikely to be used
separator between trace arguments, in particular not `:' as it is
within AC_CONFIG_FILES's $1.
-
2001-10-20 Akim Demaille <akim@epita.fr>
* tests/alpha.test (configure.in): Create, don't append. A single
AC_INIT is enough.
-
2001-10-20 Akim Demaille <akim@epita.fr>
* tests/acoutnoq.test, tests/acoutput.test, tests/acoutput2.test,
AC_ARG_PROGRAM, AC_PROG_INSTALL and AC_PROG_MAKE_SET invocation
since AM_INIT_AUTOMAKE requires them.
-
2001-10-20 Akim Demaille <akim@epita.fr>
* tests/defs (configure.in): Use credible AM_INIT_AUTOMAKE
(&scan_autoconf_files): Using autoconf traces is no longer a
complement of the previous ad hoc scheme: use either.
-
2001-10-20 Akim Demaille <akim@epita.fr>
* automake.in (&scan_one_autoconf_file): `%generalize' is new, and
factors dedicated $libsources assignments.
-
2001-10-20 Akim Demaille <akim@epita.fr>
* m4/error.m4, m4/obstack.m4, m4/ptrdiff.m4, m4/strtod.m4:
my ($filename) = @_;
my @traced = (
+ 'AC_CANONICAL_HOST',
+ 'AC_CANONICAL_SYSTEM',
'AC_CONFIG_AUX_DIR',
'AC_CONFIG_FILES',
'AC_LIBSOURCE',
+ 'AC_PROG_LIBTOOL', 'AM_PROG_LIBTOOL',
'AC_SUBST',
'AM_CONDITIONAL',
+ 'AM_CONFIG_HEADER',
'AM_C_PROTOTYPES',
'AM_GNU_GETTEXT',
'AM_INIT_AUTOMAKE',
+ 'AM_MAINTAINER_MODE',
'AM_PROG_CC_C_O',
);
my $here = "$file:$line";
# Alphabetical ordering please.
- if ($macro eq 'AC_CONFIG_AUX_DIR')
+ if ($macro eq 'AC_CANONICAL_HOST')
+ {
+ $seen_canonical = $AC_CANONICAL_HOST
+ if ! $seen_canonical;
+ }
+ elsif ($macro eq 'AC_CANONICAL_SYSTEM')
+ {
+ $seen_canonical = $AC_CANONICAL_SYSTEM;
+ }
+ elsif ($macro eq 'AC_CONFIG_AUX_DIR')
{
@config_aux_path = $args[1];
$config_aux_dir_set_in_configure_in = 1;
{
$configure_vars{$args[1]} = $here;
}
+ elsif ($macro =~ /A(C|M)_PROG_LIBTOOL/)
+ {
+ $seen_libtool = $here;
+ $libtool_line = $line;
+ }
elsif ($macro eq 'AM_CONDITIONAL')
{
$configure_cond{$args[1]} = $here;
}
+ elsif ($macro eq 'AM_CONFIG_HEADER')
+ {
+ $config_header_line = $.;
+ foreach my $one_hdr (split (' ', $args[1]))
+ {
+ push (@config_fullnames, $one_hdr);
+ if ($one_hdr =~ /^([^:]+):(.+)$/)
+ {
+ push (@config_names, $1);
+ push (@config_headers, $2);
+ }
+ else
+ {
+ push (@config_names, $one_hdr);
+ push (@config_headers, $one_hdr . '.in');
+ }
+ }
+ }
elsif ($macro eq 'AM_C_PROTOTYPES')
{
$am_c_prototypes = $here;
$package_version_line = $line;
$seen_init_automake = 1;
}
+ elsif ($macro eq 'AM_MAINTAINER_MODE')
+ {
+ $seen_maint_mode = $here;
+ }
elsif ($macro eq 'AM_PROG_CC_C_O')
{
$seen_cc_c_o = $here;
$ACLOCAL || exit 1
$AUTOMAKE || exit 1
-test "`grep TWO_FALSE Makefile.in | wc -l`" -eq 0 || exit 1
+
+# We should not output useless definitions.
+test "`grep '^@TWO_FALSE@' Makefile.in | wc -l`" -eq 0 || exit 1
$AUTOCONF || exit 1
(gcc -v) > /dev/null 2>&1 || exit 77
$ACLOCAL || exit 1
$AUTOMAKE || exit 1
-grep '^target' Makefile.in && exit 1
+grep '^target:' Makefile.in && exit 1
-grep '^@TOBE_TRUE@target' Makefile.in || exit 1
+grep '^@TOBE_TRUE@target:' Makefile.in || exit 1
exit 0
echo "FOO = foo" > Makefile.am
set -e
-echo "$me: Not generated by aclocal..."
-echo "Hello, universe!" > aclocal.m4
-$AUTOMAKE
-grep '^\$(ACLOCAL_M4):' Makefile.in && exit 1
-
-
echo "$me: Generated by aclocal..."
$ACLOCAL
$AUTOMAKE
grep '^\$(ACLOCAL_M4):' Makefile.in
+echo "$me: Not generated by aclocal..."
+# Pretend it is not from aclocal (remove the signature),
+# but keep it correct, i.e., with AM_INIT_AUTOMAKE etc.
+sed -n '3,$p' aclocal.m4 >aclocal.m4t
+mv aclocal.m4t aclocal.m4
+$AUTOMAKE
+grep '^\$(ACLOCAL_M4):' Makefile.in && exit 1
+
exit 0
-# -*- ksh -*-
+# -*- shell-script -*-
# Defines for Automake testing environment.
# Tom Tromey <tromey@cygnus.com>
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
+}
+
+if test -n "$required"
+then
+ for tool in $required
+ do
+ echo "$me: running $tool --version"
+ ( $tool --version ) || exit 77
+ done
+fi
+
# Always use an absolute srcdir. Otherwise symlinks made in subdirs
# of the test dir just won't work.
case "$srcdir" in
# 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
AM_INIT_AUTOMAKE($me, 1.0)
AC_PROG_INSTALL
AC_PROG_MAKE_SET
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES(Makefile)
END
-# See how redirections should work. User can set VERBOSE to see all
-# output.
-test -z "$VERBOSE" && {
- exec > /dev/null 2>&1
-}
-
# User can set PERL to change the perl interpreter used.
test -z "$PERL" && PERL=perl
fi
# See how aclocal should be run.
-test -z "$ACLOCAL" \
- && ACLOCAL="$PERL ../../aclocal --acdir=$srcdir/../m4"
+if test -z "$ACLOCAL"; then
+ perllibdir=$srcdir/../lib
+ export perllibdir
+ ACLOCAL="$PERL ../../aclocal --acdir=$srcdir/../m4"
+fi
+
+# We might need extra macros, e.g., from Libtool or Gettext.
+# Find them on the system.
+aclocaldir=`(aclocal --print-ac-dir) 2>/dev/null`
+case $required in
+ *libtool*)
+ ACLOCAL="$ACLOCAL -I $aclocaldir"
+ ;;
+esac
cat >> configure.in << 'END'
dnl if buggy this will require getloadavg.c
AC_PROG_CC
-AC_DEFUN([AC_FUNC_GETLOADAVG],
+AC_DEFUN([AC_FUNC_GETLOADAVG])
dnl need this to avoid LIBOBJS used but not defined.
AC_FUNC_MEMCMP
END
. $srcdir/defs || exit 1
cat >> configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-PACKAGE=nonesuch
-VERSION=nonesuch
AC_SUBST(MY_HEADERS)
AC_PROG_CC
-AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
;;
esac
-AUTOMAKE="$PERL ../../../automake --libdir=$srcdir/../lib --foreign"
+AUTOMAKE="$PERL ../../../automake --libdir=$srcdir/../lib --foreign --Werror"
+ACLOCAL="$PERL ../../../aclocal --acdir=$srcdir/../m4"
# Now we proceed with the test
$ACLOCAL || exit 1
# Check for LDFLAGS in conditional.
# PR 77.
-
+required=libtool
. $srcdir/defs || exit 1
cat > configure.in << 'END'
. $srcdir/defs || exit 1
cat >> configure.in << 'END'
-AC_INIT
AC_PROG_CC
AM_PROG_LEX
END
# Test to make sure variable is expanded properly.
# From Adam J. Richter.
-
+required=libtool
. $srcdir/defs || exit 1
cat >> configure.in << 'END'
: > config.guess
: > config.sub
-$ACLOCAL || exit 1
+$ACLOCAL -I $aclocaldir || exit 1
$AUTOMAKE
#! /bin/sh
# Test to make sure .c.o rule is only included once.
+required=libtoolize
. $srcdir/defs || exit 1
set -e
-$ACLOCAL || exit 1
+$ACLOCAL -I $aclocaldir || exit 1
$AUTOMAKE -a
grep -c '^\.c\.o:' Makefile.in | grep '^1$'