automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: use AU_DEFUN for obsolete macros


From: Alexandre Duret-Lutz
Subject: FYI: use AU_DEFUN for obsolete macros
Date: 19 Jul 2002 22:12:09 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

This is an update of my patch of April.
  http://mail.gnu.org/pipermail/automake-patches/2002-April/000753.html

This adds AU_DEFUNs for AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL, 
AM_SYS_POSIX_TERMIOS, and AM_CONFIG_HEADER.

Installed on HEAD.

2002-07-19  Alexandre Duret-Lutz  <address@hidden>

        * 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.

Index: Makefile.am
===================================================================
RCS file: /cvs/automake/automake/Makefile.am,v
retrieving revision 1.198
diff -u -r1.198 Makefile.am
--- Makefile.am 27 Jun 2002 08:46:44 -0000      1.198
+++ Makefile.am 19 Jul 2002 20:10:37 -0000
@@ -162,6 +162,11 @@
          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;  \
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.186
diff -u -r1.186 NEWS
--- NEWS        18 Jul 2002 11:16:39 -0000      1.186
+++ NEWS        19 Jul 2002 20:10:39 -0000
@@ -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 @@
   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.
Index: aclocal.in
===================================================================
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.69
diff -u -r1.69 aclocal.in
--- aclocal.in  27 Jun 2002 19:19:47 -0000      1.69
+++ aclocal.in  19 Jul 2002 20:10:40 -0000
@@ -76,44 +76,8 @@
 # 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\\(\\[?([^])]*)\\]?\\)";
@@ -248,18 +212,6 @@
        # Remove comments from current line.
        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
Index: m4/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/m4/Makefile.am,v
retrieving revision 1.42
diff -u -r1.42 Makefile.am
--- m4/Makefile.am      17 Jan 2002 22:30:25 -0000      1.42
+++ m4/Makefile.am      19 Jul 2002 20:10:40 -0000
@@ -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
Index: m4/ccstdc.m4
===================================================================
RCS file: /cvs/automake/automake/m4/ccstdc.m4,v
retrieving revision 1.10
diff -u -r1.10 ccstdc.m4
--- m4/ccstdc.m4        22 Sep 2001 16:05:36 -0000      1.10
+++ m4/ccstdc.m4        19 Jul 2002 20:10:42 -0000
@@ -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 @@
   *) CC="$CC $am_cv_prog_cc_stdc" ;;
 esac
 ])
+
+AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])
Index: m4/dmalloc.m4
===================================================================
RCS file: /cvs/automake/automake/m4/dmalloc.m4,v
retrieving revision 1.6
diff -u -r1.6 dmalloc.m4
--- m4/dmalloc.m4       22 Sep 2001 16:05:36 -0000      1.6
+++ m4/dmalloc.m4       19 Jul 2002 20:10:42 -0000
@@ -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 @@
   AC_MSG_RESULT(no)
 fi], [AC_MSG_RESULT(no)])
 ])
+
+AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
Index: m4/header.m4
===================================================================
RCS file: /cvs/automake/automake/m4/header.m4,v
retrieving revision 1.19
diff -u -r1.19 header.m4
--- m4/header.m4        18 Jul 2002 11:16:40 -0000      1.19
+++ m4/header.m4        19 Jul 2002 20:10:42 -0000
@@ -22,4 +22,4 @@
 # 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($@)])
Index: m4/init.m4
===================================================================
RCS file: /cvs/automake/automake/m4/init.m4,v
retrieving revision 1.46
diff -u -r1.46 init.m4
--- m4/init.m4  18 Jul 2002 11:16:40 -0000      1.46
+++ m4/init.m4  19 Jul 2002 20:10:43 -0000
@@ -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.
Index: m4/lispdir.m4
===================================================================
RCS file: /cvs/automake/automake/m4/lispdir.m4,v
retrieving revision 1.17
diff -u -r1.17 lispdir.m4
--- m4/lispdir.m4       20 Feb 2002 18:10:21 -0000      1.17
+++ m4/lispdir.m4       19 Jul 2002 20:10:43 -0000
@@ -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_SUBST(lispdir)
 ])# AM_PATH_LISPDIR
+
+AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR])
Index: m4/maintainer.m4
===================================================================
RCS file: /cvs/automake/automake/m4/maintainer.m4,v
retrieving revision 1.6
diff -u -r1.6 maintainer.m4
--- m4/maintainer.m4    22 Sep 2001 16:05:36 -0000      1.6
+++ m4/maintainer.m4    19 Jul 2002 20:10:43 -0000
@@ -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_SUBST(MAINT)dnl
 ]
 )
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
Index: m4/obsol-gt.m4
===================================================================
RCS file: m4/obsol-gt.m4
diff -N m4/obsol-gt.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ m4/obsol-gt.m4      19 Jul 2002 20:10:43 -0000
@@ -0,0 +1,23 @@
+# Support for obsolete Gettext 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([ud_GNU_GETTEXT], [AM_GNU_GETTEXT])
Index: m4/obsol-lt.m4
===================================================================
RCS file: m4/obsol-lt.m4
diff -N m4/obsol-lt.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ m4/obsol-lt.m4      19 Jul 2002 20:10:43 -0000
@@ -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])
Index: m4/obsolete.m4
===================================================================
RCS file: m4/obsolete.m4
diff -N m4/obsolete.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ m4/obsolete.m4      19 Jul 2002 20:10:43 -0000
@@ -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
Index: m4/protos.m4
===================================================================
RCS file: /cvs/automake/automake/m4/protos.m4,v
retrieving revision 1.7
diff -u -r1.7 protos.m4
--- m4/protos.m4        22 Sep 2001 16:05:36 -0000      1.7
+++ m4/protos.m4        19 Jul 2002 20:10:43 -0000
@@ -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_SUBST(U)dnl
 AC_SUBST(ANSI2KNR)dnl
 ])
+
+AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
Index: m4/regex.m4
===================================================================
RCS file: /cvs/automake/automake/m4/regex.m4,v
retrieving revision 1.9
diff -u -r1.9 regex.m4
--- m4/regex.m4 21 Oct 2001 18:05:37 -0000      1.9
+++ m4/regex.m4 19 Jul 2002 20:10:43 -0000
@@ -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 @@
 fi
 AC_SUBST(LIBOBJS)dnl
 ])
+
+AU_DEFUN([fp_WITH_REGEX], [AM_WITH_REGEX])
Index: m4/termios.m4
===================================================================
RCS file: m4/termios.m4
diff -N m4/termios.m4
--- m4/termios.m4       22 Sep 2001 16:05:36 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
-# AM_SYS_POSIX_TERMIOS
-
-# Copyright 1996, 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_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)])
-])
Index: m4/winsz.m4
===================================================================
RCS file: m4/winsz.m4
diff -N m4/winsz.m4
--- m4/winsz.m4 22 Sep 2001 16:05:36 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -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
-])
Index: tests/defs
===================================================================
RCS file: /cvs/automake/automake/tests/defs,v
retrieving revision 1.56
diff -u -r1.56 defs
--- tests/defs  8 Jul 2002 19:11:44 -0000       1.56
+++ tests/defs  19 Jul 2002 20:10:44 -0000
@@ -21,6 +21,7 @@
 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
Index: tests/obsolete.test
===================================================================
RCS file: /cvs/automake/automake/tests/obsolete.test,v
retrieving revision 1.6
diff -u -r1.6 obsolete.test
--- tests/obsolete.test 12 Apr 2002 15:28:15 -0000      1.6
+++ tests/obsolete.test 19 Jul 2002 20:10:44 -0000
@@ -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

-- 
Alexandre Duret-Lutz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]