Re: FYI: (non)recursive mode fixups

2005-11-10 Thread Ralf Wildenhues
Hi Gary,

* Gary V. Vaughan wrote on Thu, Nov 10, 2005 at 12:29:08PM CET:
> Ralf Wildenhues wrote:
> >
> >I'll eventually try this, together with (s)editing of Makefile.inc so it
> >can be used nonrecursively with subdir names other than libltdl/.
> 
> No need... 'tis done.  Hmmm, does one of the modes still require libltdl?
> I thought I'd fixed that already?

nonrecursive mode, as far as I can see.  If you could fix it: great!

I believe it should be rather easy: something like the sed script in
toplevel Makefile.am, in the rule for $(srcdir)/libltdl/Makefile.am,
only now in libtoolize, and with nonempty replacements.

Cheers,
Ralf




Re: FYI: (non)recursive mode fixups

2005-11-10 Thread Gary V. Vaughan

Ralf Wildenhues wrote:

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?


That the examples are tweaked to match the new way of using it.


 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.


Oh, okay.  Well if the examples all work as is, then maybe there
is no need to obfuscate things anymore than they are already ;-)


Given that this below is fixed..


See my recent patch posts :-D


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


No need... 'tis done.  Hmmm, does one of the modes still require libltdl?
I thought I'd fixed that already?


Meanwhile, I have applied the following to HEAD.


Cool, thanks.  It was a prerequisite for my patches.


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


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


signature.asc
Description: OpenPGP digital signature


FYI: (non)recursive mode fixups

2005-11-09 Thread Ralf Wildenhues
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.inc26 Oct 2005 10:42:05 -  1.1
+++ libltdl/Makefile.inc9 Nov 2005 21:36:26 -
@@ -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 -   1.23
+++ libltdl/m4/ltdl.m4  9 Nov 2005 21:36:31 -
@@ -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],