summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-01-21 19:43:29 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-01-21 19:43:29 +0100
commit7f3a7271101d0add799abd44f0326b8aa73a0c1d (patch)
tree65681102b0dbfe8e3324051985a2814794242639
parent23a9b4365b641e02a61b95b1d84a5c5068c44830 (diff)
parent91158d7245f194f7fc40d8da8965c59965112601 (diff)
downloadautomake-7f3a7271101d0add799abd44f0326b8aa73a0c1d.tar.gz
Merge branch 'maint' into branch-1.11
* maint: fixup: distribute 'contrib/multilib/multi.m4' multilib: deprecate, will be moved to contrib fixlet: flags for Fortran77 compiler are in FFLAGS, not F77FLAGS cosmetics: fix a botched comment in a maintainer check cmdline parsing: move into a dedicated perl module
-rw-r--r--Makefile.am10
-rw-r--r--NEWS4
-rw-r--r--aclocal.in54
-rw-r--r--automake.in56
-rw-r--r--contrib/Makefile.am4
-rw-r--r--contrib/multilib/multi.m465
-rw-r--r--doc/automake.texi56
-rw-r--r--lib/Automake/Getopt.pm115
-rw-r--r--lib/Automake/Makefile.am1
-rw-r--r--lib/Automake/Variable.pm2
-rw-r--r--m4/multi.m45
-rwxr-xr-xtests/getopt.test41
-rw-r--r--tests/list-of-tests.mk1
-rwxr-xr-xtests/multlib.test28
14 files changed, 263 insertions, 179 deletions
diff --git a/Makefile.am b/Makefile.am
index b9166dbaa..ad4d372e1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -397,7 +397,8 @@ sc_AMDEP_TRUE_in_automake_in:
exit 1; \
fi
-## Tests should never call make directly.
+## Recursive make invocations should always pass $(AM_MAKEFLAGS)
+## to $(MAKE), for portability to non-GNU make.
sc_tests_make_without_am_makeflags:
@if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
grep -v 'AM_MAKEFLAGS'; then \
@@ -708,18 +709,15 @@ WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
WGET_SV_GIT_CF = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
WGET_SV_GIT_AC = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;hb=HEAD;f='
WGET_SV_GIT_GL = $(WGET) 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;hb=HEAD;f='
-WGET_GCC = $(WGET) 'http://gcc.gnu.org/viewcvs/*checkout*/trunk/'
## Files that we fetch and which we compare against.
## FIXME should be a lot more here
FETCHFILES = \
INSTALL \
-config-ml.in \
config.guess \
config.sub \
gnupload \
gitlog-to-changelog \
-symlink-tree \
texinfo.tex
## Fetch the latest versions of files we care about.
@@ -733,9 +731,7 @@ fetch:
$(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
$(WGET_SV_GIT_GL)doc/INSTALL -O INSTALL && \
$(WGET_SV_GIT_GL)build-aux/gnupload -O gnupload && \
- $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog && \
- $(WGET_GCC)config-ml.in -O config-ml.in && \
- $(WGET_GCC)symlink-tree -O symlink-tree)
+ $(WGET_SV_GIT_GL)build-aux/gitlog-to-changelog -O gitlog-to-changelog)
## Don't exit after test because we want to give as many errors as
## possible.
@stat=0; for file in $(FETCHFILES); do \
diff --git a/NEWS b/NEWS
index b11b8ac88..ebc071417 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ New in 1.11.2a:
* WARNING: Future backward-incompatibilities!
+ - The support for the "obscure" multilib feature has been deprecated,
+ and will be moved out of the automake core in the next major Automake
+ release (1.12).
+
- The support for ".log -> .html" conversion and the check-html and
recheck-html targets will be removed in the next major Automake
release (1.12).
diff --git a/aclocal.in b/aclocal.in
index 2ae9a8934..ed1d8d90f 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -945,6 +945,8 @@ sub parse_arguments ()
my %cli_options =
(
+ 'help' => sub { usage(0); },
+ 'version' => \&version,
'acdir=s' => \&handle_acdir_option,
'system-acdir=s' => sub { shift; @system_includes = @_; },
'automake-acdir=s' => sub { shift; @automake_includes = @_; },
@@ -958,55 +960,9 @@ sub parse_arguments ()
'verbose' => sub { setup_channel 'verb', silent => 0; },
'W|warnings=s' => \&parse_warnings,
);
- use Getopt::Long;
- Getopt::Long::config ("bundling", "pass_through");
-
- # See if --version or --help is used. We want to process these before
- # anything else because the GNU Coding Standards require us to
- # `exit 0' after processing these options, and we can't guarantee this
- # if we treat other options first. (Handling other options first
- # could produce error diagnostics, and in this condition it is
- # confusing if aclocal does `exit 0'.)
- my %cli_options_1st_pass =
- (
- 'version' => \&version,
- 'help' => sub { usage(0); },
- # Recognize all other options (and their arguments) but do nothing.
- map { $_ => sub {} } (keys %cli_options)
- );
- my @ARGV_backup = @ARGV;
- Getopt::Long::GetOptions %cli_options_1st_pass
- or exit 1;
- @ARGV = @ARGV_backup;
-
- # Now *really* process the options. This time we know that --help
- # and --version are not present, but we specify them nonetheless so
- # that ambiguous abbreviation are diagnosed.
- Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
- or exit 1;
-
- if (@ARGV)
- {
- my %argopts;
- for my $k (keys %cli_options)
- {
- if ($k =~ /(.*)=s$/)
- {
- map { $argopts{(length ($_) == 1)
- ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
- }
- }
- if (exists $argopts{$ARGV[0]})
- {
- fatal ("option `$ARGV[0]' requires an argument\n"
- . "Try `$0 --help' for more information.");
- }
- else
- {
- fatal ("unrecognized option `$ARGV[0]'\n"
- . "Try `$0 --help' for more information.");
- }
- }
+
+ use Automake::Getopt ();
+ Automake::Getopt::parse_options %cli_options;
if ($print_and_exit)
{
diff --git a/automake.in b/automake.in
index fab921da1..cd918b921 100644
--- a/automake.in
+++ b/automake.in
@@ -8518,6 +8518,8 @@ sub parse_arguments ()
my $cli_where = new Automake::Location;
my %cli_options =
(
+ 'version' => \&version,
+ 'help' => \&usage,
'libdir=s' => \$libdir,
'gnu' => sub { set_strictness ('gnu'); },
'gnits' => sub { set_strictness ('gnits'); },
@@ -8538,32 +8540,9 @@ sub parse_arguments ()
'Werror' => sub { parse_warnings 'W', 'error'; },
'Wno-error' => sub { parse_warnings 'W', 'no-error'; },
);
- use Getopt::Long;
- Getopt::Long::config ("bundling", "pass_through");
-
- # See if --version or --help is used. We want to process these before
- # anything else because the GNU Coding Standards require us to
- # `exit 0' after processing these options, and we can't guarantee this
- # if we treat other options first. (Handling other options first
- # could produce error diagnostics, and in this condition it is
- # confusing if Automake does `exit 0'.)
- my %cli_options_1st_pass =
- (
- 'version' => \&version,
- 'help' => \&usage,
- # Recognize all other options (and their arguments) but do nothing.
- map { $_ => sub {} } (keys %cli_options)
- );
- my @ARGV_backup = @ARGV;
- Getopt::Long::GetOptions %cli_options_1st_pass
- or exit 1;
- @ARGV = @ARGV_backup;
- # Now *really* process the options. This time we know that --help
- # and --version are not present, but we specify them nonetheless so
- # that ambiguous abbreviation are diagnosed.
- Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
- or exit 1;
+ use Automake::Getopt ();
+ Automake::Getopt::parse_options %cli_options;
if (defined $output_directory)
{
@@ -8577,33 +8556,6 @@ sub parse_arguments ()
return unless @ARGV;
- if ($ARGV[0] =~ /^-./)
- {
- my %argopts;
- for my $k (keys %cli_options)
- {
- if ($k =~ /(.*)=s$/)
- {
- map { $argopts{(length ($_) == 1)
- ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
- }
- }
- if ($ARGV[0] eq '--')
- {
- shift @ARGV;
- }
- elsif (exists $argopts{$ARGV[0]})
- {
- fatal ("option `$ARGV[0]' requires an argument\n"
- . "Try `$0 --help' for more information.");
- }
- else
- {
- fatal ("unrecognized option `$ARGV[0]'.\n"
- . "Try `$0 --help' for more information.");
- }
- }
-
my $errspec = 0;
foreach my $arg (@ARGV)
{
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index b49192317..820b54732 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -17,4 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = README
+EXTRA_DIST = \
+ multilib/multi.m4 \
+ README
diff --git a/contrib/multilib/multi.m4 b/contrib/multilib/multi.m4
new file mode 100644
index 000000000..98417679f
--- /dev/null
+++ b/contrib/multilib/multi.m4
@@ -0,0 +1,65 @@
+## -*- Autoconf -*-
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
+# ---------------------------------------------------
+# Add --enable-multilib to configure.
+AC_DEFUN([AM_ENABLE_MULTILIB],
+[# Default to --enable-multilib
+AC_ARG_ENABLE(multilib,
+[ --enable-multilib build many library versions (default)],
+[case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
+ esac],
+ [multilib=yes])
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../$2"
+ else
+ multi_basedir="$srcdir/$with_multisrctop$2"
+ fi
+else
+ multi_basedir="$srcdir/$2"
+fi
+AC_SUBST(multi_basedir)
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
+AC_OUTPUT_COMMANDS([
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" ]m4_default([$1],Makefile)[ "*)
+ ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
+ ;;
+esac],
+ [
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"])])dnl
diff --git a/doc/automake.texi b/doc/automake.texi
index 5cc33c360..d66825b8f 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -323,7 +323,7 @@ Miscellaneous Rules
* Tags:: Interfacing to etags and mkid
* Suffixes:: Handling new file extensions
-* Multilibs:: Support for multilibs.
+* Multilibs:: Support for multilibs (deprecated, soon to be removed).
Conditionals
@@ -2278,8 +2278,11 @@ release.
@item config-ml.in
This file is not a program, it is a @file{configure} fragment used for
-multilib support (@pxref{Multilibs}). This file is maintained in the
-GCC tree at @url{http://gcc.gnu.org/svn.html}.
+multilib support (@pxref{Multilibs}). Since the Automake multilib
+support has been @emph{deprecated} and targeted for removal, this
+file is going to be @emph{removed from the Automake core} in the next
+major release. The master copy of this file is maintained in the GCC
+tree at @url{http://gcc.gnu.org/svn.html}.
@item depcomp
This program understands how to run a compiler so that it will
@@ -2320,8 +2323,11 @@ This is used to byte-compile Python scripts.
@item symlink-tree
This program duplicates a tree of directories, using symbolic links
instead of copying files. Such an operation is performed when building
-multilibs (@pxref{Multilibs}). This file is maintained in the GCC
-tree at @url{http://gcc.gnu.org/svn.html}.
+multilibs (@pxref{Multilibs}). Since the Automake multilib support has
+been @emph{deprecated} and targeted for removal, this file is going to
+be @emph{removed from the Automake core} in the next major release.
+The master copy of this file is maintained in the GCC tree at
+@url{http://gcc.gnu.org/svn.html}.
@item texinfo.tex
Not a program, this file is required for @samp{make dvi}, @samp{make
@@ -3921,12 +3927,18 @@ Automake ships with several Autoconf macros that you can use from your
@item AM_ENABLE_MULTILIB
@acindex AM_ENABLE_MULTILIB
-This is used when a ``multilib'' library is being built. The first
-optional argument is the name of the @file{Makefile} being generated; it
-defaults to @samp{Makefile}. The second optional argument is used to find
-the top source directory; it defaults to the empty string (generally
-this should not be used unless you are familiar with the internals).
-@xref{Multilibs}.
+
+This is used when a ``multilib'' library is being built. Please be
+aware that multilib support @emph{will be removed} from the Automake
+core in the next major release, and then @emph{this macro will go away
+as well} (even if a ``frozen'' version of will remain available in the
+@file{contrib/} directory of the Automake distribution).
+
+The first optional argument is the name of the @file{Makefile} being
+generated; it defaults to @samp{Makefile}. The second optional argument
+is used to find the top source directory; it defaults to the empty
+string (generally this should not be used unless you are familiar with
+the internals). @xref{Multilibs}.
@item AM_INIT_AUTOMAKE([OPTIONS])
@itemx AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
@@ -9597,9 +9609,9 @@ the @code{AM_INIT_AUTOMAKE} macro in @file{configure.ac}.
There are a few rules and variables that didn't fit anywhere else.
@menu
-* Tags:: Interfacing to etags and mkid
-* Suffixes:: Handling new file extensions
-* Multilibs:: Support for multilibs.
+* Tags:: Interfacing to etags and mkid
+* Suffixes:: Handling new file extensions
+* Multilibs:: Support for multilibs (deprecated, soon to be removed).
@end menu
@@ -9720,19 +9732,21 @@ Automake generate the suffix list for @code{.SUFFIXES}. Any given
by Automake generated suffixes not already in the list.
@node Multilibs
-@section Support for Multilibs
+@section Support for Multilibs (deprecated, soon to be removed).
+
+Automake used to support an obscure feature called multilibs. @emph{This
+feature is now deprecated, and will be removed in the next major Automake
+version}. Still, its implementation will remain available in the
+@file{contrib/} directory of the Automake distribution, so it should be
+very easy for motivated users to continue to use it in their projects,
+if they really need to.
-Automake has support for an obscure feature called multilibs. A
-@dfn{multilib} is a library that is built for multiple different ABIs
+A @dfn{multilib} is a library that is built for multiple different ABIs
at a single time; each time the library is built with a different target
flag combination. This is only useful when the library is intended to
be cross-compiled, and it is almost exclusively used for compiler
support libraries.
-The multilib support is still experimental. Only use it if you are
-familiar with multilibs and can debug problems you might encounter.
-
-
@node Include
@chapter Include
diff --git a/lib/Automake/Getopt.pm b/lib/Automake/Getopt.pm
new file mode 100644
index 000000000..84cee5e4a
--- /dev/null
+++ b/lib/Automake/Getopt.pm
@@ -0,0 +1,115 @@
+# Copyright (C) 2012 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package Automake::Getopt;
+
+=head1 NAME
+
+Automake::Getopt - GCS conforming parser for command line options
+
+=head1 SYNOPSIS
+
+ use Automake::Getopt;
+
+=head1 DESCRIPTION
+
+Export a function C<parse_options>, performing parsing of command
+line options in conformance to the GNU Coding standards.
+
+=cut
+
+use 5.006_002;
+use strict;
+use warnings FATAL => 'all';
+use Exporter ();
+use Getopt::Long ();
+use Automake::ChannelDefs qw/fatal/;
+use Carp qw/croak confess/;
+
+use vars qw (@ISA @EXPORT);
+@ISA = qw (Exporter);
+@EXPORT= qw/getopt/;
+
+=item C<parse_options (%option)>
+
+Wrapper around C<Getopt::Long>, trying to conform to the GNU
+Coding Standards for error messages.
+
+=cut
+
+sub parse_options (%)
+{
+ my %option = @_;
+
+ Getopt::Long::Configure ("bundling", "pass_through");
+ # Unrecognized options are passed through, so GetOption can only fail
+ # due to internal errors or misuse of options specification.
+ Getopt::Long::GetOptions (%option)
+ or confess "error in options specification (likely)";
+
+ if (@ARGV && $ARGV[0] =~ /^-./)
+ {
+ my %argopts;
+ for my $k (keys %option)
+ {
+ if ($k =~ /(.*)=s$/)
+ {
+ map { $argopts{(length ($_) == 1)
+ ? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
+ }
+ }
+ if ($ARGV[0] eq '--')
+ {
+ shift @ARGV;
+ }
+ elsif (exists $argopts{$ARGV[0]})
+ {
+ fatal ("option `$ARGV[0]' requires an argument\n"
+ . "Try `$0 --help' for more information.");
+ }
+ else
+ {
+ fatal ("unrecognized option `$ARGV[0]'.\n"
+ . "Try `$0 --help' for more information.");
+ }
+ }
+}
+
+=back
+
+=head1 SEE ALSO
+
+L<Getopt::Long>
+
+=cut
+
+1; # for require
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## End:
diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am
index 980502462..ac9356a49 100644
--- a/lib/Automake/Makefile.am
+++ b/lib/Automake/Makefile.am
@@ -25,6 +25,7 @@ dist_perllib_DATA = \
DisjConditions.pm \
FileUtils.pm \
General.pm \
+ Getopt.pm \
Item.pm \
ItemDef.pm \
Location.pm \
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 686847d4f..8f712bd2c 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -181,7 +181,7 @@ my %_ac_macro_for_var =
CXX => 'AC_PROG_CXX',
CXXFLAGS => 'AC_PROG_CXX',
F77 => 'AC_PROG_F77',
- F77FLAGS => 'AC_PROG_F77',
+ FFLAGS => 'AC_PROG_F77',
FC => 'AC_PROG_FC',
FCFLAGS => 'AC_PROG_FC',
OBJC => 'AC_PROG_OBJC',
diff --git a/m4/multi.m4 b/m4/multi.m4
index 98417679f..447591f9e 100644
--- a/m4/multi.m4
+++ b/m4/multi.m4
@@ -1,5 +1,5 @@
## -*- Autoconf -*-
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2012
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -12,6 +12,9 @@
# ---------------------------------------------------
# Add --enable-multilib to configure.
AC_DEFUN([AM_ENABLE_MULTILIB],
+[m4_warn([obsolete], [$0 will be removed from Automake core soon.
+Files implementing the "multilib" feature are (and will remain) available
+to the 'contrib/' directory in the Automake distribution.])]dnl
[# Default to --enable-multilib
AC_ARG_ENABLE(multilib,
[ --enable-multilib build many library versions (default)],
diff --git a/tests/getopt.test b/tests/getopt.test
deleted file mode 100755
index bc829846f..000000000
--- a/tests/getopt.test
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Automake --help, and --version should have priority over any other option
-# so that their `Exit 0' is coherent.
-
-. ./defs || Exit 1
-
-set -e
-
-# This is expected to fail ...
-AUTOMAKE_fails -Wnonexistent
-grep ':.*nonexistent' stderr
-
-# ... but this should not.
-AUTOMAKE_run 0 -Wnonexistent --help
-grep ':.*nonexistent' stderr && Exit 1
-
-
-# Similarly, this should fail ...
-AUTOMAKE_fails --nonexistent
-grep ':.*nonexistent' stderr
-
-# ... but this should not.
-AUTOMAKE_run 0 --nonexistent --help
-grep ':.*nonexistent' stderr && Exit 1
-
-:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 7ca3144da..04e1ace06 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -412,7 +412,6 @@ gcj3.test \
gcj4.test \
gcj5.test \
gcj6.test \
-getopt.test \
gettext.test \
gettext2.test \
gettext3.test \
diff --git a/tests/multlib.test b/tests/multlib.test
index 1072a5745..59a2260c0 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 2010, 2012 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,6 +23,23 @@ required='gcc GNUmake'
set -e
+# Multilib support has been deprecated in the Automake core.
+
+cat >>configure.in <<'END'
+AM_ENABLE_MULTILIB([Makefile], [.])
+END
+
+$ACLOCAL
+$AUTOCONF -Wall -Werror 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '^configure\.in:4:.*AM_ENABLE_MULTILIB.* removed.* soon' stderr
+grep '"multilib".*feature' stderr
+grep 'contrib.* in the Automake distribution' stderr
+
+rm -rf autom4te*.cache aclocal.m4 configure
+
+# Functional tests now.
+
cat >configure.in <<'END'
AC_INIT([multlib], [1.0])
AC_CONFIG_SRCDIR(libfoo/foo.c)
@@ -112,16 +130,16 @@ mkdir libbar/sub
cp "$testsrcdir/../lib/config-ml.in" .
cp "$testsrcdir/../lib/symlink-tree" .
-$ACLOCAL
-$AUTOCONF
+$ACLOCAL -Wno-obsolete
+$AUTOCONF -Werror -Wall -Wno-obsolete
$AUTOMAKE --add-missing
cd libfoo
$ACLOCAL
-$AUTOCONF
+$AUTOCONF -Werror -Wall -Wno-obsolete
$AUTOMAKE --add-missing
cd ../libbar
$ACLOCAL
-$AUTOCONF
+$AUTOCONF -Werror -Wall -Wno-obsolete
$AUTOMAKE --add-missing
cd ..