libtool-patches
[Top][All Lists]
Advanced

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

Re: (non)recursive mode fixups


From: Gary V. Vaughan
Subject: Re: (non)recursive mode fixups
Date: Mon, 07 Nov 2005 15:55:16 +0000
User-agent: Mozilla Thunderbird 1.0 (X11/20050305)

Ralf Wildenhues wrote:
Hi Gary,

Hallo Ralf!

nonrecursive mode is cool.  Thanks for all your commits!

NP.  Thanks for all your reviews! :-D

It has a few warts, though, but also another cool thing can be fixed
now.

First the good thing: in principle, libltdl can do fine without an
AC_CONFIG_HEADER at all:

--- libltdl/Makefile.inc        2005-10-26 12:42:05.000000000 +0200
+++ libltdl/Makefile.inc        2005-11-07 16:13:55.000000000 +0100
@@ -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
diff -u m4/ltdl.m4 
/mount/endor/wildenhu/download/software/libtool/install/libtool-2.1/share/aclocal/ltdl.m4
--- libltdl/m4/ltdl.m4  2005-11-07 15:49:08.000000000 +0100
+++ libltdl/m4/ltdl.m4  2005-11-07 16:18:01.000000000 +0100
@@ -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],

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

Now the warts:  This works:  (Note no autoheader!)

cat >configure.ac <<EOF
AC_INIT([nonrec-test],1,[devnull])
LT_CONFIG_LTDL_DIR([libltdl],[nonrecursive])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
LT_INIT
LT_WITH_LTDL
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF
cat >Makefile.am <<EOF
ACLOCAL_AMFLAGS = -I libltdl/m4
AM_CPPFLAGS =
AM_LDFLAGS =
EXTRA_DIST =
CLEANFILES =
MOSTLYCLEANFILES =
noinst_LTLIBRARIES =
lib_LTLIBRARIES =
EXTRA_LTLIBRARIES =
BUILT_SOURCES =
include libltdl/Makefile.inc
EOF
libtoolize --ltdl --install --nonrecursive
aclocal -I libltdl/m4
automake -a
autoconf
./configure
make

But this then fails:
make dist

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.

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.

Cheers,
        Gary.
--
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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