libtool-patches
[Top][All Lists]
Advanced

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

Re: 350-gary-maintain-private-libobj-namespace


From: Eric Blake
Subject: Re: 350-gary-maintain-private-libobj-namespace
Date: Tue, 13 May 2008 22:47:32 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> 
> Gnulib was able to get away with an autoconf-time check because it 
_generates_ 
> the .m4 file that contains the replacement *_LIBSOURCES definition, and 
> substitutes the correct directory name in during that generation.  And with 
my 
> proposed patch to gnulib-tool, the autoconf-time test is run only once on a 
> list of files, rather than one syscmd per file.  We need to rework this 
patch, 
> or else fall back to configure-time checking instead of autoconf-time 
checking.
> 

After thinking about this more: I like the concept of checking early (autoconf) 
rather than late (configure), when the check is necessary.  And I think it is 
technically possible - the user must run libtoolize to copy the various ltdl 
*.c files into location in the first place; so that same libtoolize invocation 
should also create a generated .m4 file that defines the replacement 
_LIBSOURCES macro, such that at autoconf time, the macro contains the hard-
coded location of the *.c files relative to the directory where libtoolize was 
run (and where configure.ac lives).

On the other hand, I'm not sure the check buys us anything.  In gnulib's case, 
I added the check into gnulib-tool because we once made the mistake of calling
AC_REPLACE_FUNC([__fpending]) while providing fpending.c instead of 
__fpending.c.  Additionally, the gnulib bug wasn't caught until the broken 
fpending module was used in another project, since gnulib itself doesn't really 
undergo a release process.  But libtool isn't as modular as gnulib, is less 
likely to be adding new AC_REPLACE_FUNC calls any time soon, and has its own 
testsuite that we run prior to any release (unlike gnulib), so we can probably 
skip the check altogether without any big loss in bug-catching ability.  It 
should be easy enough to prove that libtoolize always copies the correct *.c 
files into place, rather than penalizing every client package's autoconf with 
checks that libtoolize did its job.

So how about this patch?

>From 5160f84d0c1d00883b0db3336d79863286e8e89a Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 13 May 2008 16:45:29 -0600
Subject: [PATCH] Kill _LT_LIBSOURCES; it wasn't checking anything useful.

* libltdl/m4/ltdl.m4 (_LT_LIBSOURCES): Delete.
(LTDL_INIT): Ignore arguments to AC_LIBSOURCES during _LTDL_SETUP,
on the assumption that libtoolize correctly installed them.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog          |    7 +++++++
 libltdl/m4/ltdl.m4 |   19 ++-----------------
 2 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 81f532e..685d826 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-13  Eric Blake  <address@hidden>
+
+       Kill _LT_LIBSOURCES; it wasn't checking anything useful.
+       * libltdl/m4/ltdl.m4 (_LT_LIBSOURCES): Delete.
+       (LTDL_INIT): Ignore arguments to AC_LIBSOURCES during _LTDL_SETUP,
+       on the assumption that libtoolize correctly installed them.
+
 2008-05-11  Charles Wilson  <address@hidden>
 
        Ensure cwrapper compiles without warnings under -std=c99.
diff --git a/libltdl/m4/ltdl.m4 b/libltdl/m4/ltdl.m4
index 6c277b4..f3f5c7b 100644
--- a/libltdl/m4/ltdl.m4
+++ b/libltdl/m4/ltdl.m4
@@ -217,21 +217,6 @@ AC_DEFUN([_LT_LIBOBJ], [
 ])# _LT_LIBOBJS
 
 
-# _LT_LIBSOURCES(MODULE_NAMES)
-# ----------------------------
-# Like AC_LIBSOURCES, except the directory where the libltdl source files
-# are expected is distinct from the user LIBOBJ directory.
-AC_DEFUN([_LT_LIBSOURCES], [
-  m4_foreach([_LTNAME], [$1], [
-    m4_syscmd([test -r "$lt_libobj_prefix]_LTNAME[" ||
-               test -z "$lt_libobj_prefix" ||
-               test ! -d "$lt_libobj_prefix"])dnl
-    m4_if(m4_sysval, [0], [],
-      [AC_FATAL([missing $lt_libobj_prefix/]_LTNAME)])
-  ])
-])# _LT_LIBSOURCES
-
-
 # LTDL_INIT([OPTIONS])
 # --------------------
 # Clients of libltdl can use this macro to allow the installer to
@@ -245,9 +230,9 @@ _LT_SET_OPTIONS([$0], [$1])
 
 dnl We need to keep our own list of libobjs separate from our parent project,
 dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
-dnl we look for our own LIBOBJs. Definitions in ltdl-libobj.m4.
+dnl we look for our own LIBOBJs.
 m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
-m4_pushdef([AC_LIBSOURCES], m4_defn([_LT_LIBSOURCES]))
+m4_pushdef([AC_LIBSOURCES])
 
 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
 m4_if(_LTDL_MODE, [],
-- 
1.5.5.1







reply via email to

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