2001-07-30 Tom Tromey <tromey@redhat.com>
+ * tests/Makefile.am (TESTS): Added aclibobj.test.
+ * tests/aclibobj.test: New file.
+ * automake.in (handle_lib_objects_cond): Avoid undefined variable
+ error.
+ (scan_one_autoconf_file): Handle AC_LIBSOURCE and AC_LIBSOURCES.
+
* automake.texi (Dist): Mention other distribution types.
(Install): Updates.
# means adding entries to dep_files.
if ($lsearch =~ /^\@(LT)?LIBOBJS\@$/)
{
+ my $lt = $1 ? $1 : '';
my $myobjext = ($1 ? 'l' : '') . 'o';
push (@dep_list, $lsearch);
$seen_libobjs = 1;
if (! keys %libsources
- && ! &variable_defined ($1 . 'LIBOBJS'))
+ && ! &variable_defined ($lt . 'LIBOBJS'))
{
- &am_line_error ($var, "\@$1" . "LIBOBJS\@ seen but never set in `$configure_ac'");
+ &am_line_error ($var, "\@$lt" . "LIBOBJS\@ seen but never set in `$configure_ac'");
}
foreach my $iter (keys %libsources)
}
elsif ($lsearch =~ /^\@(LT)?ALLOCA\@$/)
{
+ my $lt = $1 ? $1 : '';
my $myobjext = ($1 ? 'l' : '') . 'o';
push (@dep_list, $lsearch);
&am_line_error ($var,
- "\@$1" . "ALLOCA\@ seen but `AC_FUNC_ALLOCA' not in `$configure_ac'")
+ "\@$lt" . "ALLOCA\@ seen but `AC_FUNC_ALLOCA' not in `$configure_ac'")
if ! defined $libsources{'alloca.c'};
$dep_files{'$(DEPDIR)/alloca.P' . $myobjext} = 1;
&require_file_with_line ($var, $FOREIGN, 'alloca.c');
{
$libsources{"$1.c"} = 1;
}
+ elsif (/AC_LIBSOURCE\(([^)]+)\)/)
+ {
+ $libsources{&unquote_m4_arg ($1)} = 1;
+ }
+ elsif (/AC_LIBSOURCES\(([^)]+)\)/)
+ {
+ foreach my $lc_iter (split (/[, ]+/, &unquote_m4_arg ($1)))
+ {
+ $libsources{$lc_iter} = 1;
+ }
+ }
if (! $in_ac_replace && s/AC_REPLACE_FUNCS\s*\(\[?//)
{
--- /dev/null
+#! /bin/sh
+
+# Make sure AC_LIBOBJ and friends work.
+
+. $srcdir/defs || exit 1
+
+cat > X << 'END'
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
+END
+
+: > maude.c
+: > liver.c
+
+$ACLOCAL
+
+set -e
+
+cp X configure.in
+echo 'AC_LIBSOURCE(maude.c)' >> configure.in
+$AUTOMAKE
+
+cp X configure.in
+echo 'AC_LIBSOURCES([maude.c, liver.c])' >> configure.in
+$AUTOMAKE