libtool-patches
[Top][All Lists]
Advanced

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

FYI: (non)recursive mode fixups


From: Ralf Wildenhues
Subject: FYI: (non)recursive mode fixups
Date: Wed, 9 Nov 2005 22:38:15 +0100
User-agent: Mutt/1.5.9i

Hi Gary,

* Gary V. Vaughan wrote on Mon, Nov 07, 2005 at 04:55:16PM CET:
> Ralf Wildenhues wrote:
> >
> >First the good thing: in principle, libltdl can do fine without an
> >AC_CONFIG_HEADER at all:
*snip*
> 
> Sweet!  Along with a patch to libtool.texi that explains to the user
> how to make sure everything is setup to help the macro run properly,
> I think this will be a fine commit before the 2.0 alpha...

Erm, what do you mean?  The nice thing about the patch is that it
requires _no_ adjustment by the user.  Whether he uses AC_CONFIG_HEADERS
or not, libltdl will build in non-subproject mode.

Given that this below is fixed..

> >The dist target currently needs all these files to exist:
> >libltdl/m4/lt~obsolete.m4 libltdl/aclocal.m4 libltdl/configure.ac
> >libltdl/configure libltdl/config-h.in libltdl/Makefile.in
> >libltdl/Makefile.am
> >
> >If I touch them, "make distcheck" passes.
> >
> >Can you fix this?  Then, (non)recursive mode will be really usable!
> 
> Hmmm.  Well the easy fix would be to have libtoolize always dump all
> of those files into the ltdl directory as it copies things into the
> parent project.   I think that for the sake of the alpha release,
> this is a good enough workaround.

Yuck.

> Further down the line (maybe before 2.0 final if it turns out to be
> both easy and non-invasive), I think we need to actually break the
> dependency on those files.  And that will possibly involve more
> (s)editing of Makefile.inc at libtoolize time... or else moving some
> of the dist rules out of libltdl/Makefile.inc and back into
> Makefile.am.  I'd like to concentrate my limited time on the release
> for now... but I don't mind helping someone else write the patch.

I'll eventually try this, together with (s)editing of Makefile.inc so it
can be used nonrecursively with subdir names other than libltdl/.

Meanwhile, I have applied the following to HEAD.

Cheers,
Ralf

        * libltdl/Makefile.inc (AM_CPPFLAGS): Do not define
        HAVE_CONFIG_H.
        * libltdl/m4/ltdl.m4 (LTDL_INIT): Do not invoke
        AC_CONFIG_HEADERS ourselves, we can build with or without now.

Index: libltdl/Makefile.inc
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/Makefile.inc,v
retrieving revision 1.1
diff -u -r1.1 Makefile.inc
--- libltdl/Makefile.inc        26 Oct 2005 10:42:05 -0000      1.1
+++ libltdl/Makefile.inc        9 Nov 2005 21:36:26 -0000
@@ -26,7 +26,7 @@
 
 # -I$(srcdir) is needed for user that built libltdl with a sub-Automake
 # (not as a sub-package!) using 'nostdinc':
-AM_CPPFLAGS           += -DHAVE_CONFIG_H -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
+AM_CPPFLAGS           += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
                          -DLTDL -I. -I$(srcdir) -Ilibltdl \
                          -I$(srcdir)/libltdl -I$(srcdir)/libltdl/libltdl
 AM_LDFLAGS            += -no-undefined
Index: libltdl/m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/ltdl.m4,v
retrieving revision 1.23
diff -u -r1.23 ltdl.m4
--- libltdl/m4/ltdl.m4  7 Nov 2005 14:35:35 -0000       1.23
+++ libltdl/m4/ltdl.m4  9 Nov 2005 21:36:31 -0000
@@ -273,10 +273,10 @@
 dnl _LTDL_MODE specific code must be evaluated at least once:
 _LTDL_MODE_DISPATCH
 
-# In order that ltdl.c can compile, run AC_CONFIG_HEADERS for the user
-# if they did not call it themself.  This is so that ltdl.h can pick up
-# the parent projects config.h file, The first file in AC_CONFIG_HEADERS
-# must contain the definitions required by ltdl.c.
+# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
+# the user used.  This is so that ltdl.h can pick up the parent projects
+# config.h file, The first file in AC_CONFIG_HEADERS must contain the
+# definitions required by ltdl.c.
 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
 AC_CONFIG_COMMANDS_PRE([dnl
 m4_pattern_allow([^LT_CONFIG_H$])dnl
@@ -284,11 +284,7 @@
     [LT_CONFIG_H=AH_HEADER],
     [m4_ifset([AC_LIST_HEADERS],
            [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[      ]]*,,;s,[[ 
:]].*$,,'`],
-       [LT_CONFIG_H=config.h
-       dnl subproject mode libltdl has its own config.h...
-       m4_if(_LTDL_MODE, [subproject],
-               [],
-           [AC_CONFIG_HEADERS([config.h:config-h.in])])])])])
+       [])])])
 AC_SUBST([LT_CONFIG_H])
 
 AC_CHECK_HEADERS([memory.h unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h],




reply via email to

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