summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--Makefile.am5
-rw-r--r--NEWS11
-rw-r--r--aclocal.in50
-rw-r--r--m4/Makefile.am34
-rw-r--r--m4/Makefile.in35
-rw-r--r--m4/ccstdc.m46
-rw-r--r--m4/dmalloc.m46
-rw-r--r--m4/header.m42
-rw-r--r--m4/init.m42
-rw-r--r--m4/lispdir.m47
-rw-r--r--m4/maintainer.m46
-rw-r--r--m4/obsol-gt.m4 (renamed from m4/termios.m4)18
-rw-r--r--m4/obsol-lt.m423
-rw-r--r--m4/obsolete.m449
-rw-r--r--m4/protos.m46
-rw-r--r--m4/regex.m46
-rw-r--r--m4/winsz.m455
-rw-r--r--tests/defs1
-rwxr-xr-xtests/obsolete.test28
20 files changed, 221 insertions, 151 deletions
diff --git a/ChangeLog b/ChangeLog
index c64209a79..ddd5eed5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
2002-07-19 Alexandre Duret-Lutz <duret_g@epita.fr>
+ * 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.
+
Fix for PR automake/338:
* automake.in (seen_gettext_external): New variable.
(handle_gettext): Conditionalize the intl/ check on
diff --git a/Makefile.am b/Makefile.am
index 37d61fe5c..1be834df0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -162,6 +162,11 @@ maintainer-check: automake aclocal
echo 'Do not run "autoconf" in the above tests. Use "$$AUTOCONF" instead.' 1>&2; \
exit 1; \
fi
+## Tests should never call autoupdate directly.
+ @if grep -v '^#' $(srcdir)/tests/*.test | egrep ':[ ]*autoupdate'; then \
+ echo 'Do not run "autoupdate" in the above tests. Use "$$AUTOUPDATE" instead.' 1>&2; \
+ exit 1; \
+ fi
## Tests should never call automake directly.
@if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*automake'; then \
echo 'Do not run "automake" in the above tests. Use "$$AUTOMAKE" instead.' 1>&2; \
diff --git a/NEWS b/NEWS
index 2b9bbf675..7eb60a87a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,12 @@
New in 1.6a:
+* Autoconf 2.53b is required.
+* `aclocal' and `automake' will no longer warn about obsolete
+ configure macros. This is done by `autoconf -Wobsolete'.
+* AM_CONFIG_HEADER, AM_SYS_POSIX_TERMIOS and
+ AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL are obsolete (although still
+ supported). You should use AC_CONFIG_HEADERS, AC_SYS_POSIX_TERMIOS,
+ and AC_HEADER_TIOCGWINSZ instead. `autoupdate' can upgrade
+ `configure.ac' for you.
* Support for per-program and per-library `_CPPFLAGS'.
* New `ctags' target (builds CTAGS files).
* Support for -Wmumble and -Wno-mumble, where mumble is a warning category
@@ -12,9 +20,6 @@ New in 1.6a:
a DESTDIR install.
* `+=' can be used in conditionals, even if the augmented variable
was defined for another condition.
-* It is no longer a requirement to use AM_CONFIG_HEADER instead of
- AC_CONFIG_HEADERS. Although still supported, AM_CONFIG_HEADER is
- obsolete.
* Use Autoconf's --trace interface to inspect configure.ac and get
a more accurate view of it.
* automake --output-dir is deprecated.
diff --git a/aclocal.in b/aclocal.in
index fe35aaa3f..6684f34d9 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -76,44 +76,8 @@ $output_file = 'aclocal.m4';
# How much to say.
$verbose = 0;
-# Map from obsolete macros to hints for new macros.
-my %obsolete_macros =
- (
- 'AC_FEATURE_CTYPE' => "use `AC_HEADER_STDC'",
- 'AC_FEATURE_ERRNO' => "add `strerror' to `AC_REPLACE_FUNCS(...)'",
- 'AC_FEATURE_EXIT' => '',
- 'AC_SYSTEM_HEADER' => '',
-
- # Note that we do not handle this one, because it is still run
- # from AM_CONFIG_HEADER.
- # 'AC_CONFIG_HEADER' => "use `AM_CONFIG_HEADER'",
-
- 'fp_C_PROTOTYPES' => "use `AM_C_PROTOTYPES'",
- 'fp_PROG_CC_STDC' => "use `AM_PROG_CC_STDC'",
- 'fp_PROG_INSTALL' => "use `AC_PROG_INSTALL'",
- 'fp_WITH_DMALLOC' => "use `AM_WITH_DMALLOC'",
- 'fp_WITH_REGEX' => "use `AM_WITH_REGEX'",
- 'gm_PROG_LIBTOOL' => "use `AM_PROG_LIBTOOL'",
- 'jm_MAINTAINER_MODE' => "use `AM_MAINTAINER_MODE'",
- 'md_TYPE_PTRDIFF_T' => "add `ptrdiff_t' to `AC_CHECK_TYPES(...)'",
- 'ud_PATH_LISPDIR' => "use `AM_PATH_LISPDIR'",
- 'ud_GNU_GETTEXT' => "use `AM_GNU_GETTEXT'",
-
- # Now part of autoconf proper, under a different name.
- 'fp_FUNC_FNMATCH' => "use `AC_FUNC_FNMATCH'",
- 'AM_SANITY_CHECK_CC' => "automatically done by `AC_PROG_CC'",
- 'AM_PROG_INSTALL' => "use `AC_PROG_INSTALL'",
- 'AM_EXEEXT' => "automatically done by `AC_PROG_(CC|CXX|F77)'",
- 'AM_CYGWIN32' => "use `AC_CYGWIN'",
- 'AM_MINGW32' => "use `AC_MINGW32'",
- 'AM_FUNC_MKTIME' => "use `AC_FUNC_MKTIME'",
- );
-
-# Regexp to match the above macros.
-$obsolete_rx = '\b(' . join ('|', keys %obsolete_macros) . ')\b';
-
# Matches a macro definition.
-$ac_defun_rx = "AC_DEFUN\\(\\[?([^],)\n]+)\\]?";
+$ac_defun_rx = "A[CU]_DEFUN\\(\\[?([^],)\n]+)\\]?";
# Matches an AC_REQUIRE line.
$ac_require_rx = "AC_REQUIRE\\(\\[?([^])]*)\\]?\\)";
@@ -249,18 +213,6 @@ sub scan_configure
s/\bdnl\b.*$//;
s/\#.*$//;
- if (/$obsolete_rx/o)
- {
- local ($hint) = '';
- if ($obsolete_macros{$1} ne '')
- {
- $hint = '; ' . $obsolete_macros{$1};
- }
- warn "aclocal: $configure_ac: $.: `$1' is obsolete$hint\n";
- $exit_status = 1;
- next;
- }
-
# Search for things we know about. The "search" sub is
# constructed dynamically by scan_m4_files. The last
# parenthethical match makes sure we don't match things that
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 296df6bf3..cfcb55c6b 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -21,11 +21,35 @@
m4datadir = $(datadir)/aclocal-$(APIVERSION)
-dist_m4data_DATA = as.m4 auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \
-dmalloc.m4 gcj.m4 header.m4 init.m4 install-sh.m4 lex.m4 lispdir.m4 \
-make.m4 maintainer.m4 minuso.m4 missing.m4 multi.m4 options.m4 \
-protos.m4 python.m4 regex.m4 runlog.m4 sanity.m4 strip.m4 termios.m4 \
-winsz.m4
+dist_m4data_DATA = \
+as.m4 \
+auxdir.m4 \
+ccstdc.m4 \
+cond.m4 \
+depend.m4 \
+depout.m4 \
+dmalloc.m4 \
+gcj.m4 \
+header.m4 \
+init.m4 \
+install-sh.m4 \
+lex.m4 \
+lispdir.m4 \
+maintainer.m4 \
+make.m4 \
+minuso.m4 \
+missing.m4 \
+multi.m4 \
+obsol-gt.m4 \
+obsol-lt.m4 \
+obsolete.m4 \
+options.m4 \
+protos.m4 \
+python.m4 \
+regex.m4 \
+runlog.m4 \
+sanity.m4 \
+strip.m4
nodist_m4data_DATA = amversion.m4
DISTCLEANFILES = amversion.m4
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 52ad8987a..f52dd29fe 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -52,6 +52,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LIBS = @LIBS@
LN = @LN@
+LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -89,11 +90,35 @@ target_alias = @target_alias@
m4datadir = $(datadir)/aclocal-$(APIVERSION)
-dist_m4data_DATA = as.m4 auxdir.m4 ccstdc.m4 cond.m4 depend.m4 depout.m4 \
-dmalloc.m4 gcj.m4 header.m4 init.m4 install-sh.m4 lex.m4 lispdir.m4 \
-make.m4 maintainer.m4 minuso.m4 missing.m4 multi.m4 options.m4 \
-protos.m4 python.m4 regex.m4 runlog.m4 sanity.m4 strip.m4 termios.m4 \
-winsz.m4
+dist_m4data_DATA = \
+as.m4 \
+auxdir.m4 \
+ccstdc.m4 \
+cond.m4 \
+depend.m4 \
+depout.m4 \
+dmalloc.m4 \
+gcj.m4 \
+header.m4 \
+init.m4 \
+install-sh.m4 \
+lex.m4 \
+lispdir.m4 \
+maintainer.m4 \
+make.m4 \
+minuso.m4 \
+missing.m4 \
+multi.m4 \
+obsol-gt.m4 \
+obsol-lt.m4 \
+obsolete.m4 \
+options.m4 \
+protos.m4 \
+python.m4 \
+regex.m4 \
+runlog.m4 \
+sanity.m4 \
+strip.m4
nodist_m4data_DATA = amversion.m4
diff --git a/m4/ccstdc.m4 b/m4/ccstdc.m4
index 7c9f6da36..d5cab3b82 100644
--- a/m4/ccstdc.m4
+++ b/m4/ccstdc.m4
@@ -3,7 +3,7 @@
## From Franc,ois Pinard ##
## ----------------------------------------- ##
-# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1996, 1997, 1999, 2000, 2001, 2002 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
@@ -20,7 +20,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 1
+# serial 2
# @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC
@@ -107,3 +107,5 @@ case "x$am_cv_prog_cc_stdc" in
*) CC="$CC $am_cv_prog_cc_stdc" ;;
esac
])
+
+AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
diff --git a/m4/dmalloc.m4 b/m4/dmalloc.m4
index dec56a9b3..ce96de4d3 100644
--- a/m4/dmalloc.m4
+++ b/m4/dmalloc.m4
@@ -3,7 +3,7 @@
## From Franc,ois Pinard ##
## ----------------------------------- ##
-# Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1996, 1998, 1999, 2000, 2001, 2002 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
@@ -20,7 +20,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 1
+# serial 2
AC_DEFUN([AM_WITH_DMALLOC],
[AC_MSG_CHECKING([if malloc debugging is wanted])
@@ -37,3 +37,5 @@ else
AC_MSG_RESULT(no)
fi], [AC_MSG_RESULT(no)])
])
+
+AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
diff --git a/m4/header.m4 b/m4/header.m4
index 3e0d5be97..1850546a6 100644
--- a/m4/header.m4
+++ b/m4/header.m4
@@ -22,4 +22,4 @@ AC_PREREQ([2.52])
# serial 6
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AC_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
diff --git a/m4/init.m4 b/m4/init.m4
index 261ac0c2b..2e2af3445 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -30,7 +30,7 @@
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-AC_PREREQ([2.52])
+AC_PREREQ([2.53b])
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
# the ones we care about.
diff --git a/m4/lispdir.m4 b/m4/lispdir.m4
index a790ad438..42e537e6c 100644
--- a/m4/lispdir.m4
+++ b/m4/lispdir.m4
@@ -4,7 +4,8 @@
## Almost entirely rewritten by Alexandre Oliva
## ------------------------
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# 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
@@ -21,7 +22,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 5
+# serial 6
# AM_PATH_LISPDIR
# ---------------
@@ -61,3 +62,5 @@ AC_DEFUN([AM_PATH_LISPDIR],
])
AC_SUBST(lispdir)
])# AM_PATH_LISPDIR
+
+AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])
diff --git a/m4/maintainer.m4 b/m4/maintainer.m4
index b2535d8a4..f63e67360 100644
--- a/m4/maintainer.m4
+++ b/m4/maintainer.m4
@@ -1,7 +1,7 @@
# Add --enable-maintainer-mode option to configure.
# From Jim Meyering
-# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1996, 1998, 2000, 2001, 2002 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
@@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 1
+# serial 2
AC_DEFUN([AM_MAINTAINER_MODE],
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
@@ -34,3 +34,5 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AC_SUBST(MAINT)dnl
]
)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
diff --git a/m4/termios.m4 b/m4/obsol-gt.m4
index a5f0009c4..efe7f1dea 100644
--- a/m4/termios.m4
+++ b/m4/obsol-gt.m4
@@ -1,6 +1,6 @@
-# AM_SYS_POSIX_TERMIOS
+# Support for obsolete Gettext macro. -*- Autoconf -*-
-# Copyright 1996, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 2002 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
@@ -17,17 +17,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# From Jim Meyering.
-
# serial 1
-AC_DEFUN([AM_SYS_POSIX_TERMIOS],
-[AC_CACHE_CHECK([POSIX termios], am_cv_sys_posix_termios,
- [AC_TRY_LINK([#include <sys/types.h>
-#include <unistd.h>
-#include <termios.h>],
- [/* SunOS 4.0.3 has termios.h but not the library calls. */
- tcgetattr(0, 0);],
- am_cv_sys_posix_termios=yes,
- am_cv_sys_posix_termios=no)])
-])
+# See comment in obsolete.m4.
+AU_DEFUN([ud_GNU_GETTEXT], [AM_GNU_GETTEXT])
diff --git a/m4/obsol-lt.m4 b/m4/obsol-lt.m4
new file mode 100644
index 000000000..72e7c7a32
--- /dev/null
+++ b/m4/obsol-lt.m4
@@ -0,0 +1,23 @@
+# Support for obsolete Libtool macro. -*- Autoconf -*-
+
+# Copyright 2002 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# See comment in obsolete.m4.
+AU_DEFUN([gm_PROG_LIBTOOL], [AM_PROG_LIBTOOL])
diff --git a/m4/obsolete.m4 b/m4/obsolete.m4
new file mode 100644
index 000000000..f43c30b0c
--- /dev/null
+++ b/m4/obsolete.m4
@@ -0,0 +1,49 @@
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright 2002 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Obsolete Automake macros.
+
+# We put here only the macros whose substitution is not an Automake
+# macro; otherwise including this file would trigger dependencies for
+# all the subsitutions. Generally, obsolete Automake macros are
+# better AU_DEFUNed in the same file as their replacement, or alone in
+# a separate file (see obsol-gt.m4 or obsol-lt.m4 for instance).
+
+AU_DEFUN([AC_FEATURE_CTYPE], [AC_HEADER_STDC])
+AU_DEFUN([AC_FEATURE_ERRNO], [AC_REPLACE_FUNCS([strerror])])
+AU_DEFUN([AM_CYGWIN32], [AC_CYGWIN])
+AU_DEFUN([AM_EXEEXT], [AC_EXEEXT])
+AU_DEFUN([AM_FUNC_MKTIME], [AC_FUNC_MKTIME])
+AU_DEFUN([AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
+ [AC_HEADER_TIOCGWINSZ])
+AU_DEFUN([AM_MINGW32], [AC_MINGW32])
+AU_DEFUN([AM_PROG_INSTALL], [AC_PROG_INSTALL])
+AU_DEFUN([AM_SANITY_CHECK_CC], [AC_PROG_CC])
+AU_DEFUN([AM_SYS_POSIX_TERMIOS], [AC_SYS_POSIX_TERMIOS])
+AU_DEFUN([fp_FUNC_FNMATCH], [AC_FUNC_FNMATCH])
+AU_DEFUN([fp_PROG_INSTALL], [AC_PROG_INSTALL])
+AU_DEFUN([md_TYPE_PTRDIFF_T], [AC_CHECK_TYPES([ptrdiff_t])])
+
+# Don't know how to translate these.
+# If used, Autoconf will complain that they are possibly unexpended;
+# this seems a good enough error message.
+# AC_FEATURE_EXIT
+# AC_SYSTEM_HEADER
diff --git a/m4/protos.m4 b/m4/protos.m4
index e83b8b027..7d007d595 100644
--- a/m4/protos.m4
+++ b/m4/protos.m4
@@ -3,7 +3,7 @@
## From Franc,ois Pinard ##
## ------------------------------- ##
-# Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1996, 1997, 1998, 2000, 2001, 2002 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
@@ -20,7 +20,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 1
+# serial 2
AC_DEFUN([AM_C_PROTOTYPES],
[AC_REQUIRE([AM_PROG_CC_STDC])
@@ -40,3 +40,5 @@ AC_CHECK_HEADERS(string.h)
AC_SUBST(U)dnl
AC_SUBST(ANSI2KNR)dnl
])
+
+AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
diff --git a/m4/regex.m4 b/m4/regex.m4
index 54155c0f9..a8fd3aad5 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -2,7 +2,7 @@
## Check if --with-regex was given. ##
## --------------------------------- ##
-# Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright 1996, 1998, 1999, 2000, 2001, 2002 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
@@ -19,7 +19,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 3
+# serial 4
AC_PREREQ(2.50)
# AM_WITH_REGEX
@@ -61,3 +61,5 @@ else
fi
AC_SUBST(LIBOBJS)dnl
])
+
+AU_DEFUN([fp_WITH_REGEX], [AM_WITH_REGEX])
diff --git a/m4/winsz.m4 b/m4/winsz.m4
deleted file mode 100644
index e71451496..000000000
--- a/m4/winsz.m4
+++ /dev/null
@@ -1,55 +0,0 @@
-# AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
-
-# Copyright 1996, 1998, 2000, 2001 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# From Jim Meyering.
-
-# serial 1
-
-AC_DEFUN([AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
-[AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
- AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
- am_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
- [am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
-
- gwinsz_in_termios_h=no
- if test $am_cv_sys_posix_termios = yes; then
- AC_EGREP_CPP([yes],
- [#include <sys/types.h>
-# include <termios.h>
-# ifdef TIOCGWINSZ
- yes
-# endif
- ], gwinsz_in_termios_h=yes)
- fi
-
- if test $gwinsz_in_termios_h = no; then
- AC_EGREP_CPP([yes],
- [#include <sys/types.h>
-# include <sys/ioctl.h>
-# ifdef TIOCGWINSZ
- yes
-# endif
- ], am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
- fi
- ])
- if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
- AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1,
- [Define if TIOCGWINSZ requires sys/ioctl.h])
- fi
-])
diff --git a/tests/defs b/tests/defs
index 68c28386c..5127d01b6 100644
--- a/tests/defs
+++ b/tests/defs
@@ -21,6 +21,7 @@ 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
diff --git a/tests/obsolete.test b/tests/obsolete.test
index 59b38e34a..1036659af 100755
--- a/tests/obsolete.test
+++ b/tests/obsolete.test
@@ -1,16 +1,32 @@
#! /bin/sh
-# Test to make sure obsolete macros really are.
+# Test to make sure obsolete macros can be autoupdated.
. $srcdir/defs || exit 1
-cat >> configure.in << 'END'
-fp_PROG_INSTALL
+cat > configure.in << 'END'
+AC_INIT
END
-: > Makefile.am
+$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
+ $testsrcdir/../m4/obsolete.m4 >> obs
+cat obs >> configure.in
+$PERL -ne 'chomp; print "grep $_ stderr || exit 1\n"; ' obs > obs.1
+$PERL -ne 'chomp; print "grep $_ configure.in && exit 1\n"; ' obs > obs.2
-$ACLOCAL 2>stderr && exit 1
-grep AC_PROG_INSTALL stderr || exit 1
+# Sanity check. Make sure we have added something to configure.in.
+test `cat configure.in | wc -l` -gt 1 || exit 1
+
+$ACLOCAL || exit 1
+
+# Expect Autoconf to complain about each of the macros in obs.
+$AUTOCONF -Wobsolete >stderr 2>&1
+. obs.1
+# Make sure Autoupdate remove each of these macros.
+$AUTOUPDATE || exit 1
+. obs.2
+
+# Autoconf should be able to grok the updated configure.in.
+$AUTOCONF || exit 1
exit 0