This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Use AC_DEFUN instead of m4_defun in libtool.m4


Hello world,

* Peter O'Gorman wrote on Sun, Jul 01, 2007 at 08:08:12PM CEST:
> On Sun, 2007-07-01 at 10:47 -0700, H.J. Lu wrote:
> > On Sun, Jul 01, 2007 at 12:36:13PM -0500, Peter O'Gorman wrote:
> > > 
> > > Does gcc have lt~obsolete.m4 anywhere? Its function is to ensure that
> > > aclocal does not use the installed libtool.m4.
> > 
> > I didn't see lt~obsolete.m4, ltobsolete.m4 nor ltobsolete.m4 in gcc.

Maybe we should just force everybody to have lt~obsolete.m4.  To me,
that seems to be the simplest way to avoid any hassles here.  There have
been at least three different scenarios where users were confused about
whether they need it or not.

OK to install?

Cheers,
Ralf

2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* libltdl/m4/lt~obsolete.m4 (LTOBSOLETE_VERSION): New macro, to
	force-pull in this file by aclocal.
	* libltdl/m4/libtool.m4 (LT_INIT): Require LTOBSOLETE_VERSION.
	* tests/libtoolize.at (upgrading verbatim style aclocal.m4):
	Adjust.
	Report by H. J. Lu <hjl@lucon.org>.

Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.109
diff -u -r1.109 libtool.m4
--- libltdl/m4/libtool.m4	30 Jun 2007 09:31:28 -0000	1.109
+++ libltdl/m4/libtool.m4	1 Jul 2007 20:15:00 -0000
@@ -37,7 +37,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ])
 
-# serial 53 LT_INIT
+# serial 54 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -66,6 +66,7 @@
 AC_REQUIRE([LTOPTIONS_VERSION])dnl
 AC_REQUIRE([LTSUGAR_VERSION])dnl
 AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 m4_require([_LT_PROG_LTMAIN])dnl
 m4_require([_LT_SET_OPTIONS], [_LT_SET_OPTIONS([$1])])dnl
 
Index: libltdl/m4/lt~obsolete.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/lt~obsolete.m4,v
retrieving revision 1.4
diff -u -r1.4 lt~obsolete.m4
--- libltdl/m4/lt~obsolete.m4	25 Mar 2007 12:12:43 -0000	1.4
+++ libltdl/m4/lt~obsolete.m4	1 Jul 2007 20:15:00 -0000
@@ -1,13 +1,13 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # 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 2
+# serial 3
 
 # These exist entirely to fool aclocal when bootstrapping libtool.
 #
@@ -32,6 +32,9 @@
 # we give up compatibility with versions before 1.7, at which point
 # we need to keep only those names which we still refer to.
 
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
 m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
Index: tests/libtoolize.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/libtoolize.at,v
retrieving revision 1.12
diff -u -r1.12 libtoolize.at
--- tests/libtoolize.at	25 Mar 2007 12:12:43 -0000	1.12
+++ tests/libtoolize.at	1 Jul 2007 20:15:00 -0000
@@ -1,6 +1,6 @@
 # libtoolize.at -- test libtoolize operation                  -*- Autotest -*-
 #
-#   Copyright (C) 2005 Free Software Foundation, Inc.
+#   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2005
 #
 #   This file is part of GNU Libtool.
@@ -457,7 +457,6 @@
 libtoolize: `m4/ltsugar.m4' is already up to date.
 libtoolize: `m4/ltversion.m4' is already up to date.
 libtoolize: `m4/lt~obsolete.m4' is already up to date.
-libtoolize: You should add the contents of `m4/lt~obsolete.m4' to `aclocal.m4'.
 ]])
 
 AT_DATA([experr],
@@ -479,7 +478,6 @@
 libtoolize: copying file `m4/ltsugar.m4'
 libtoolize: copying file `m4/ltversion.m4'
 libtoolize: copying file `m4/lt~obsolete.m4'
-libtoolize: You should add the contents of `m4/lt~obsolete.m4' to `aclocal.m4'.
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy --force], 0, expout)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]