Re: withGCC unset
Ralf Wildenhues wrote: Hi Peter, * Peter O'Gorman wrote on Tue, Jan 15, 2008 at 04:01:20PM CET: Ralf Wildenhues wrote: Intended before 2.2? Does not have to be (similarly, this one could be considered cosmetic, and wait 'til after 2.2 - I'll leave that up to you). If you ask me, you can apply this one now. Better not expose $with_GCC in a stable release (was introduces in HEAD only). Hi Ralf, I did ask you :-) So committed - thank you. Peter -- Peter O'Gorman http://pogma.com
Do not use AM_CONDITIONAL if it's not defined
I've applied this to not depend upon aclocal. If it's used, it will pull in AM_CONDITIONAL, so no difference in that case. Cheers, Ralf 2008-01-16 Ralf Wildenhues [EMAIL PROTECTED] * libltdl/m4/ltdl.m4 (_LT_ENABLE_INSTALL): Use AM_CONDITIONAL only if defined. Allows to use libltdl without aclocal. Index: libltdl/m4/ltdl.m4 === RCS file: /cvsroot/libtool/libtool/libltdl/m4/ltdl.m4,v retrieving revision 1.40 diff -u -r1.40 ltdl.m4 --- libltdl/m4/ltdl.m4 12 Jan 2008 17:00:51 - 1.40 +++ libltdl/m4/ltdl.m4 16 Jan 2008 18:23:29 - @@ -388,8 +388,9 @@ *) enable_ltdl_convenience=yes ;; esac -AM_CONDITIONAL(INSTALL_LTDL, test x${enable_ltdl_install-no} != xno) -AM_CONDITIONAL(CONVENIENCE_LTDL, test x${enable_ltdl_convenience-no} != xno) +m4_ifdef([AM_CONDITIONAL], +[AM_CONDITIONAL(INSTALL_LTDL, test x${enable_ltdl_install-no} != xno) + AM_CONDITIONAL(CONVENIENCE_LTDL, test x${enable_ltdl_convenience-no} != xno)]) ])# _LT_ENABLE_INSTALL
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
* Ralf Wildenhues wrote on Sat, Jan 12, 2008 at 03:15:03PM CET: So I ask to please clarify once and for all the order in which things should be (including a notice in NEWS), the rationale for it, and please to make it clear in the manual whether LTDL_INIT requires that LT_INIT also be called or not (some examples given in the manual carry LTDL_INIT but do not mention LT_INIT at all). OK to apply this fix? Cheers, Ralf 2008-01-16 Ralf Wildenhues [EMAIL PROTECTED] * doc/libtool.texi (Distributing libltdl): Clarify that LTDL_INIT goes after LT_INIT; also show the latter in the respective examples. * tests/subproject.at: Adjust order. Index: doc/libtool.texi === RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v retrieving revision 1.234 diff -u -r1.234 libtool.texi --- doc/libtool.texi6 Jan 2008 16:33:30 - 1.234 +++ doc/libtool.texi16 Jan 2008 19:07:07 - @@ -4378,7 +4378,8 @@ if you move to a different release of libltdl. @c }. Having made the macros available, you must add a call to the [EMAIL PROTECTED] macro to your package's @file{configure.ac} to [EMAIL PROTECTED] macro (after the call to @samp{LTDL_INIT} +to your package's @file{configure.ac} to perform the configure time checks required to build the library correctly. Unfortunately, this method has problems if you then try to link the package binaries with an installed libltdl, or a library that @@ -4489,6 +4490,7 @@ AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_HEADERS([config.h]) LT_CONFIG_LTDL_DIR([libltdl]) +LT_INIT([dlopen]) LTDL_INIT([nonrecursive]) @end example @@ -4531,6 +4533,7 @@ AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([config.h]) LT_CONFIG_LTDL_DIR([libltdl]) +LT_INIT([dlopen]) LTDL_INIT([recursive]) AC_CONFIG_FILES([libltdl/Makefile]) @end example Index: tests/subproject.at === RCS file: /cvsroot/libtool/libtool/tests/subproject.at,v retrieving revision 1.13 diff -u -r1.13 subproject.at --- tests/subproject.at 8 Jan 2008 05:07:41 - 1.13 +++ tests/subproject.at 16 Jan 2008 19:07:07 - @@ -33,8 +33,8 @@ AC_CONFIG_AUX_DIR([sub/ltdl/config]) AC_CONFIG_MACRO_DIR([sub/ltdl/m4]) AM_INIT_AUTOMAKE([foreign]) -LT_WITH_LTDL LT_INIT +LT_WITH_LTDL AC_CONFIG_FILES([Makefile]) AC_OUTPUT ]])
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
On Wed, Jan 16, 2008 at 08:07:41PM +0100, Ralf Wildenhues wrote: * Ralf Wildenhues wrote on Sat, Jan 12, 2008 at 03:15:03PM CET: So I ask to please clarify once and for all the order in which things should be (including a notice in NEWS), the rationale for it, and please to make it clear in the manual whether LTDL_INIT requires that LT_INIT also be called or not (some examples given in the manual carry LTDL_INIT but do not mention LT_INIT at all). OK to apply this fix? [snip] [EMAIL PROTECTED] macro (after the call to @samp{LTDL_INIT} Is the second instance a typo? Should be LT_INIT, right? However, as usual, I don't feel qualified to review other aspects of this patch... Cheers, Peter
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
Hi Peter, * Peter Rosin wrote on Wed, Jan 16, 2008 at 08:13:59PM CET: On Wed, Jan 16, 2008 at 08:07:41PM +0100, Ralf Wildenhues wrote: [EMAIL PROTECTED] macro (after the call to @samp{LTDL_INIT} Is the second instance a typo? Should be LT_INIT, right? Yes. However, as usual, I don't feel qualified to review other aspects of this patch... Well, thanks anyway for spotting this typo! Cheers, Ralf
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
When the user copies the libtool macros into aclocal.m4 (which is discouraged but something we support), the 333 patch causes a nice failure in a third-party package: [Running] /tmp/libtool/install/libtool-2.1/bin/libtoolize --automake --copy /tmp/libtool/install/libtool-2.1/bin/libtoolize: eval: line 991: syntax error near unexpected token `[$0],' /tmp/libtool/install/libtool-2.1/bin/libtoolize: eval: line 991: `AC_BEFORE([$0], [LTDL_INIT])dnl seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: seen_libtool=: LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], LT_OPTION_DEFINE([LTDL_INIT], [recursive], LT_OPTION_DEFINE([LTDL_INIT], [subproject], LT_OPTION_DEFINE([LTDL_INIT], [installable], LT_OPTION_DEFINE([LTDL_INIT], [convenience], auxdir=confdb seen_libtool=:' because libtoolize wrongly recognizes code from libtool macro files, such as [_LT_SET_OPTION([LT_INIT], [shared]) or LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], as being user calls to setup libtool. OK to apply this patch to fix it and some other cases? I realize that this is still a bit fragile when Libtool evolves (really only m4 can parse m4), which is why I'm adding a testcase, too. Cheers, Ralf 2008-01-16 Ralf Wildenhues [EMAIL PROTECTED] * libtoolize.m4sh (func_scan_files): Avoid matching our own macro code when scanning configure.ac and aclocal.m4. Don't produce spurious output if AC_PROG_RANLIB is found. * tests/old-m4-iface.at (AM_PROG_LIBTOOL): Add a (weak) check that we don't match our own macro code when searching for user code calling us. Index: libtoolize.m4sh === RCS file: /cvsroot/libtool/libtool/libtoolize.m4sh,v retrieving revision 1.64 diff -u -r1.64 libtoolize.m4sh --- libtoolize.m4sh 6 Jan 2008 16:33:30 - 1.64 +++ libtoolize.m4sh 16 Jan 2008 19:28:21 - @@ -418,14 +418,18 @@ s,^.*LT_CONFIG_LTDL_DIR([[ ]*\([^])]*\).*$,ac_ltdldir=\1, p } + /\@:@A[CM]_PROG_LIBTOOL/d /A[CM]_PROG_LIBTOOL/ { s,^.*$,seen_libtool=:, p } + /the.*option into.*LT_INIT.*parameter/d + /\@:@LT_INIT/d /LT_INIT/{ s,^.*$,seen_libtool=:, p } + /\@:@LTDL_INIT/d /LTDL_INIT/ { s,^.*LTDL_INIT([[ ]*\([^])]*\).*$,ltdl_options=\1, s,^.*LTDL_INIT[ ]*$,seen_ltdl=:, @@ -960,7 +964,7 @@ else # Don't trace for this, we're just checking the user didn't invoke it # directly from configure.ac. - $SED 's,dnl .*$,,; s,# .*$,,' $configure_ac | grep AC_PROG_RANLIB + $SED 's,dnl .*$,,; s,# .*$,,' $configure_ac | grep AC_PROG_RANLIB /dev/null func_echo \`AC_PROG_RANLIB' is rendered obsolete by \`LT_INIT' fi Index: tests/old-m4-iface.at === RCS file: /cvsroot/libtool/libtool/tests/old-m4-iface.at,v retrieving revision 1.14 diff -u -r1.14 old-m4-iface.at --- tests/old-m4-iface.at 12 Jan 2008 14:07:02 - 1.14 +++ tests/old-m4-iface.at 16 Jan 2008 19:34:28 - @@ -86,6 +86,17 @@ LT_AT_EXEC_CHECK([./old], 0, [Hello, World!]) +# Now, test that libtoolize doesn't mistakenly think the user called +# any libtool macros if in fact she didn't. +sed '/AM_PROG_LIBTOOL/d' configure.in configure.int +mv -f configure.int configure.in +AT_CHECK([$LIBTOOLIZE -n], [0], [stdout], [stderr]) +# ensure no shell errors: +AT_CHECK([grep -v ^libtoolize: stderr], [1]) +AT_CHECK([grep Remember to add.*LT_INIT.*to configure.in stdout], [0], [ignore]) +AT_CHECK([grep Consider adding.*LT_WITH_LTDL stdout], [1]) +AT_CHECK([grep Remember to add.*LT_CONFIG_LTDL_DIR stdout], [1]) + AT_CLEANUP
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
On Wed, 16 Jan 2008, Ralf Wildenhues wrote: However, as usual, I don't feel qualified to review other aspects of this patch... Well, thanks anyway for spotting this typo! With this change, I am ok with the documentation updates. However, I am fairly confident that old libtool documentation recommended the opposite order, and opposite order was likely required at that time. Bob == Bob Friesenhahn [EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: make -s
On Mon, Jan 14, 2008 at 11:06:00PM +0100, Ralf Wildenhues wrote: * Peter O'Gorman wrote on Mon, Jan 14, 2008 at 11:00:35PM CET: Ralf Wildenhues wrote: Since repeatedly nobody stepped forward to do this, I wrote that patch myself now. OK to apply to HEAD? Yes. Thank you. Done, thanks! Thank you Ralf. I owe you one. Bob Rossi
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
Hallo Ralf, Thanks for the fast fixes! On 16 Jan 2008, at 14:22, Ralf Wildenhues wrote: OK to apply? I have some nits first. Please commit once they are addressed. 2008-01-16 Ralf Wildenhues [EMAIL PROTECTED] New variable LIBLTDL_DEP for use in output_DEPENDENCIES. * libltdl/m4/ltdl.m4 (_LTDL_CONVENIENCE, _LTDL_INSTALLABLE) (LTDL_INIT): Set and substitute LIBLTDL_DEP according to chosen method. * tests/configure-iface.at (installable libltdl) (--with-ltdl-include/lib, --with-included-ltdl): Test it. * doc/libtool.texi (Distributing libltdl): Document LIBLTDL_DEP. Our ChangeLog standard says to write intro's like this: New variable LIBLTDL_DEP for use in output_DEPENDENCIES: * libltdl/m4/ltdl.m4 (_LTDL_CONVENIENCE, _LTDL_INSTALLABLE) (LTDL_INIT): Set and substitute [[...]] Also clarify that `${top_build_prefix}' may be used in place of `${top_builddir}/'. This is a different patch. * NEWS: Update. Except for a couple of instances in the latest ChangeLog rotation, we've always used past tense here. Super picky, I know, but we might as well strive for consistency. [[...]] Index: doc/libtool.texi === RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v retrieving revision 1.234 diff -u -r1.234 libtool.texi --- doc/libtool.texi6 Jan 2008 16:33:30 - 1.234 +++ doc/libtool.texi16 Jan 2008 06:21:06 - @@ -4443,10 +4443,11 @@ @option{--with-included-ltdl}. If an installed @code{libltdl} is found, then @code{LIBLTDL} is set to -the link flags needed to use it, and @code{LTDLINCL} to the -preprocessor flags needed to find the installed headers. Note, -however, that no version checking is performed. You should manually -check for the @code{libltdl} features you need in @file{configure.ac}: +the link flags needed to use it, @code{LIBLTDL_DEP} is empty, and [EMAIL PROTECTED] to the preprocessor flags needed to find the installed +headers. If an installed @code{libltdl} is found, then @code{LIBLTDL} is set to the link flags needed to use it, and @code{LTDLINCL} to the preprocessor flags needed to find the installed headers, and @code{LIBLTDL_DEP} will be empty. I'm also not sure about the name LIBLTDL_DEP, as it is visibly different to the other two, and also to existing PREOPEN_DEPENDENCIES and INFO_DEPS, and gnulibs use of the '_DEPENDENCIES' suffix. I'd prefer either LTDLDEPS (vis LTDLINCL) or LIBLTDL_DEPENDENCIES for consistency with prior art. There are several other occurrences in the patch I haven't highlighted. -Whatever method you use, @samp{LTDL_INIT} will define both the shell -variable @var{LIBLTDL} to the link flag that you should use to link -with @code{libltdl}, and the shell variable @var{LTDLINCL} to the -preprocessor flag that you should use to compile programs that -include @file{ltdl.h}. So, when you want to link a program with -libltdl, be it a convenience, installed or installable library, just -use @samp{$(LTDLINCL)} for preprocessing and compilation, and +Whatever method you use, @samp{LTDL_INIT} will define the shell variable [EMAIL PROTECTED] to the link flag that you should use to link +with @code{libltdl}, the shell variable @var{LIBLTDL_DEP} to the file s/file/files/ +that can be used as @command{make} dependency, and the shell variable ...can be used as a dependency in @file{Makefile} rules, ... Actually, now that I think about it, the user doesn't see these as shell variables at all, but as make macros. It might be better to simply refer to them as make macros to avoid any confusion. Index: tests/configure-iface.at === RCS file: /cvsroot/libtool/libtool/tests/configure-iface.at,v retrieving revision 1.5 diff -u -r1.5 configure-iface.at --- tests/configure-iface.at12 Jan 2008 14:07:02 - 1.5 +++ tests/configure-iface.at16 Jan 2008 06:21:09 - @@ -144,6 +145,10 @@ AT_CHECK([test -f $prefix/lib/libltdl.la]) AT_CHECK([test -f $prefix/include/ltdl.h]) +# Check that main is rebuilt if libltdl.la is newer +rm -f libltdl/libltdl.la +AT_CHECK([$MAKE -q main$EXEEXT || exit 1], [1], [ignore], [ignore]) + -q might not work with some of the makes that we support. Safer to use: AT_CHECK([$MAKE main$EXEEXT /dev/null 21 || exit 1], ... @@ -262,6 +269,10 @@ ## previously installed system libltdl. LT_AT_NOINST_EXEC_CHECK([./main], [-dlopen libmodule.la], [], [expout], []) +# Check that main is rebuilt if libltdlc.la is newer +rm -f libltdl/libltdlc.la +AT_CHECK([$MAKE -q main$EXEEXT || exit 1], [1], [ignore], [ignore]) Same here. Cheers, Gary -- ())_. Email me: [EMAIL PROTECTED] ( '/ Read my blog: http://blog.azazil.net / )= ...and my book: http://sources.redhat.com/autobook `(_~)_ Join my AGLOCO Network:
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
Hi Bob, * Bob Friesenhahn wrote on Thu, Jan 17, 2008 at 01:17:58AM CET: On Wed, 16 Jan 2008, Ralf Wildenhues wrote: However, as usual, I don't feel qualified to review other aspects of this patch... Well, thanks anyway for spotting this typo! With this change, I am ok with the documentation updates. Applied, thanks for the review. However, I am fairly confident that old libtool documentation recommended the opposite order, and opposite order was likely required at that time. I can't find any mention toward the relative order of AC_PROG_LIBTOOL and AC_LIB_LTDL in branch-1-5's manual at all. And AC_WITH_LTDL was not mentioned at all. Cheers, Ralf
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
Hallo Ralf, On 17 Jan 2008, at 13:06, Ralf Wildenhues wrote: * Gary V. Vaughan wrote on Thu, Jan 17, 2008 at 05:29:17AM CET: On 16 Jan 2008, at 14:22, Ralf Wildenhues wrote: Also clarify that `${top_build_prefix}' may be used in place of `${top_builddir}/'. This is a different patch. Yes, it's instance 10/11 of cleaning up after patch 333. Applied like this. *blush* I need to be more careful about the mego-patches I drop from time to time. Apologies. :) Cheers, Gary -- ())_. Email me: [EMAIL PROTECTED] ( '/ Read my blog: http://blog.azazil.net / )= ...and my book: http://sources.redhat.com/autobook `(_~)_ Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912 PGP.sig Description: This is a digitally signed message part
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
On 17 Jan 2008, at 12:47, Ralf Wildenhues wrote: However, I am fairly confident that old libtool documentation recommended the opposite order, and opposite order was likely required at that time. I can't find any mention toward the relative order of AC_PROG_LIBTOOL and AC_LIB_LTDL in branch-1-5's manual at all. And AC_WITH_LTDL was not mentioned at all. AC_WITH_LTDL was an experiment that never really worked out. I think we did require pathological ordering at some point too, but as far as I'm aware the interface never settled down enough to make it into the docs. Cheers, Gary -- Gary V. Vaughan ([EMAIL PROTECTED]) PGP.sig Description: This is a digitally signed message part
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
Hi Gary, * Gary V. Vaughan wrote on Thu, Jan 17, 2008 at 05:29:17AM CET: On 16 Jan 2008, at 14:22, Ralf Wildenhues wrote: OK to apply? I have some nits first. Please commit once they are addressed. Addressed and committed as noted below. Thanks for your quick review. * NEWS: Update. Except for a couple of instances in the latest ChangeLog rotation, we've always used past tense here. Super picky, I know, but we might as well strive for consistency. Actually, it's a noun, or just active instead of passive voice. FWIW, the GCS uses present tense in all their examples. But hey, I'm not attached to that. I'm also not sure about the name LIBLTDL_DEP, as it is visibly different to the other two, and also to existing PREOPEN_DEPENDENCIES and INFO_DEPS, and gnulibs use of the '_DEPENDENCIES' suffix. I'd prefer either LTDLDEPS (vis LTDLINCL) or LIBLTDL_DEPENDENCIES for consistency with prior art. Be it LTDLDEPS then. Actually, now that I think about it, the user doesn't see these as shell variables at all, but as make macros. It might be better to simply refer to them as make macros to avoid any confusion. But that would then be another independent change, yes? Because it not only touches the issue I'm fixing now, but also the other instances of shell variables that were there earlier, from which I merely copied. Would you please write this patch for me? Thanks. +AT_CHECK([$MAKE -q main$EXEEXT || exit 1], [1], [ignore], [ignore]) + -q might not work with some of the makes that we support. Safer to use: AT_CHECK([$MAKE main$EXEEXT /dev/null 21 || exit 1], ... 'make -q' is POSIX and works with make implementations from AIX 4.3.3 and up, HP-UX 10.20 and up, IRIX 6.5, Tru64 4.0D, FreeBSD, NetBSD, OpenBSD, GNU, Solaris 6 and up. Do you know one that doesn't support it? It should be mentioned in the Autoconf manual. Note 'make -q' is not like 'grep -q'. Cheers, Ralf 2008-01-17 Ralf Wildenhues [EMAIL PROTECTED] New variable LTDLDEPS for use in output_DEPENDENCIES. * libltdl/m4/ltdl.m4 (_LTDL_CONVENIENCE, _LTDL_INSTALLABLE) (LTDL_INIT): Set and substitute LTDLDEPS according to chosen method. * tests/configure-iface.at (installable libltdl) (--with-ltdl-include/lib, --with-included-ltdl): Test it. * doc/libtool.texi (Distributing libltdl): Document LTDLDEPS. * NEWS: Updated. Dependency bug exposed by Eric Blake in M4, found by Bob Proulx build daemon. Index: NEWS === RCS file: /cvsroot/libtool/libtool/NEWS,v retrieving revision 1.214 diff -u -r1.214 NEWS --- NEWS12 Jan 2008 17:00:51 - 1.214 +++ NEWS17 Jan 2008 05:25:22 - @@ -52,6 +52,7 @@ The Libtool package itself builds libltdl nonrecursively. - The 'nonrecursive', 'recursive' and 'subproject' libltdl build modes are given as LTDL_INIT options. + - New make variable LTDLDEPS for use in output_DEPENDENCIES. - New multi-module-loader safe libltdl handle iteration APIs: lt_dlhandle_iterate, lt_dlhandle_fetch, lt_dlhandle_map. - New lt_dlinterface_register to maintain separation of concerns Index: doc/libtool.texi === RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v retrieving revision 1.236 diff -u -r1.236 libtool.texi --- doc/libtool.texi17 Jan 2008 05:05:59 - 1.236 +++ doc/libtool.texi17 Jan 2008 05:25:25 - @@ -,10 +,11 @@ @option{--with-included-ltdl}. If an installed @code{libltdl} is found, then @code{LIBLTDL} is set to -the link flags needed to use it, and @code{LTDLINCL} to the -preprocessor flags needed to find the installed headers. Note, -however, that no version checking is performed. You should manually -check for the @code{libltdl} features you need in @file{configure.ac}: +the link flags needed to use it, and @code{LTDLINCL} to the preprocessor +flags needed to find the installed headers, and @code{LTDLDEPS} will +be empty. Note, however, that no version checking is performed. You +should manually check for the @code{libltdl} features you need in [EMAIL PROTECTED]: @example LT_INIT([dlopen]) @@ -4588,7 +4589,7 @@ to cause it to be built as a convenience library. If you're not using automake, you will need to define @code{top_build_prefix}, @code{top_builddir}, and @code{top_srcdir} in your makefile so that [EMAIL PROTECTED] and @code{LTDLINCL} expand correctly. [EMAIL PROTECTED], @code{LTDLDEPS}, and @code{LTDLINCL} expand correctly. One advantage of the convenience library is that it is not installed, so the fact that you use @code{libltdl} will not be apparent to the @@ -4612,42 +4613,46 @@ to cause it to be built as an installable library. If you're not using automake, you will need to define @code{top_build_prefix}, @code{top_builddir} and @code{top_srcdir} in your makefile
Re: FYI: 333-gary-refactor-LTDL_INIT.patch
* Gary V. Vaughan wrote on Thu, Jan 17, 2008 at 06:20:31AM CET: On 17 Jan 2008, at 03:37, Ralf Wildenhues wrote: OK to apply this patch to fix it and some other cases? Yes please. Done as below, thanks. Our libtoolize test coverage is still extremely poor. When you commit could you also please add a TODO for writing a test case that adds the libtool macros to aclocal.m4? Yep. Cheers, Ralf 2008-01-17 Ralf Wildenhues [EMAIL PROTECTED] * libtoolize.m4sh (func_scan_files): Avoid matching our own macro code when scanning configure.ac and aclocal.m4. Don't produce spurious output if AC_PROG_RANLIB is found. * tests/old-m4-iface.at (AM_PROG_LIBTOOL): Add a (weak) check that we don't match our own macro code when searching for user code calling us. * TODO: Updated. Index: TODO === RCS file: /cvsroot/libtool/libtool/TODO,v retrieving revision 1.73 diff -u -r1.73 TODO --- TODO25 Mar 2007 12:12:42 - 1.73 +++ TODO17 Jan 2008 05:35:45 - @@ -103,6 +103,8 @@ processes per copied file, a list of files to copy is built and all files copied with a single pair of tar processes. +* Write test case that adds libtool macros to aclocal.m4. + 2. In the future @@ -278,7 +280,7 @@ it easier to add new platforms. -- - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 This file is part of GNU Libtool. Index: libtoolize.m4sh === RCS file: /cvsroot/libtool/libtool/libtoolize.m4sh,v retrieving revision 1.64 diff -u -r1.64 libtoolize.m4sh --- libtoolize.m4sh 6 Jan 2008 16:33:30 - 1.64 +++ libtoolize.m4sh 17 Jan 2008 05:35:45 - @@ -418,14 +418,18 @@ s,^.*LT_CONFIG_LTDL_DIR([[ ]*\([^])]*\).*$,ac_ltdldir=\1, p } + /\@:@A[CM]_PROG_LIBTOOL/d /A[CM]_PROG_LIBTOOL/ { s,^.*$,seen_libtool=:, p } + /the.*option into.*LT_INIT.*parameter/d + /\@:@LT_INIT/d /LT_INIT/{ s,^.*$,seen_libtool=:, p } + /\@:@LTDL_INIT/d /LTDL_INIT/ { s,^.*LTDL_INIT([[ ]*\([^])]*\).*$,ltdl_options=\1, s,^.*LTDL_INIT[ ]*$,seen_ltdl=:, @@ -960,7 +964,7 @@ else # Don't trace for this, we're just checking the user didn't invoke it # directly from configure.ac. - $SED 's,dnl .*$,,; s,# .*$,,' $configure_ac | grep AC_PROG_RANLIB + $SED 's,dnl .*$,,; s,# .*$,,' $configure_ac | grep AC_PROG_RANLIB /dev/null func_echo \`AC_PROG_RANLIB' is rendered obsolete by \`LT_INIT' fi Index: tests/old-m4-iface.at === RCS file: /cvsroot/libtool/libtool/tests/old-m4-iface.at,v retrieving revision 1.14 diff -u -r1.14 old-m4-iface.at --- tests/old-m4-iface.at 12 Jan 2008 14:07:02 - 1.14 +++ tests/old-m4-iface.at 17 Jan 2008 05:35:45 - @@ -86,6 +86,17 @@ LT_AT_EXEC_CHECK([./old], 0, [Hello, World!]) +# Now, test that libtoolize doesn't mistakenly think the user called +# any libtool macros if in fact she didn't. +sed '/AM_PROG_LIBTOOL/d' configure.in configure.int +mv -f configure.int configure.in +AT_CHECK([$LIBTOOLIZE -n], [0], [stdout], [stderr]) +# ensure no shell errors: +AT_CHECK([grep -v ^libtoolize: stderr], [1]) +AT_CHECK([grep Remember to add.*LT_INIT.*to configure.in stdout], [0], [ignore]) +AT_CHECK([grep Consider adding.*LT_WITH_LTDL stdout], [1]) +AT_CHECK([grep Remember to add.*LT_CONFIG_LTDL_DIR stdout], [1]) + AT_CLEANUP