On Thu, Apr 29, 2004 at 08:31:16AM +0100, Joe Orton wrote:
> On Sat, Apr 24, 2004 at 08:38:01PM +0100, Patrick Welche wrote:
> > Libtool is busily sprouting files.. Before just making a loop for all these
> > files, srclib/apr-util/xml/expat/buildconf.sh has
> >
> > if [ -f ltsugar.m4 ]; then
> > echo "Incorporating ltsugar.m4 into aclocal.m4 ..."
> > cat ltsugar.m4 >> aclocal.m4
> > fi
...
> Or even simpler, just add "sinclude(ltsugar.m4)" to aclocal.m4
> regardless of whether it exists or not. What are the new files libtool
> has sprouted?
Attached is what I had to do for a successful httpd build with a very
recent cvs libtool.
I think we could get rid of the rest of the use aclocal.m4 in
xml/expat/buildconf.sh, and maybe we want to do the same dance of
moving the *.m4 files into build/ in xml/expat as is done in apr/ ?
The m4_pattern_allow in configure.in are just needed because libtool
now reserves all variables beginning LT_, so we could simply rename
them instead.
I haven't tested with an old libtool!
Cheers,
Patrick
Index: srclib/apr/buildconf
===================================================================
RCS file: /home/cvspublic/apr/buildconf,v
retrieving revision 1.29
diff -u -r1.29 buildconf
--- srclib/apr/buildconf 28 Feb 2004 18:31:41 -0000 1.29
+++ srclib/apr/buildconf 29 Apr 2004 19:04:39 -0000
@@ -38,7 +38,8 @@
# Remove any libtool files so one can switch between libtool 1.3
# and libtool 1.4 by simply rerunning the buildconf script.
-(cd build ; rm -f ltconfig ltmain.sh libtool.m4)
+ltfiles="argz.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
+(cd build ; rm -f ltconfig ltmain.sh libtool.m4 $ltfiles)
$libtoolize --copy --automake
@@ -59,13 +60,15 @@
cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' >
build/libtool.m4
# libtool.m4 from 1.6 requires ltsugar.m4
-if [ -f ltsugar.m4 ]; then
- rm -f build/ltsugar.m4
- mv ltsugar.m4 build/ltsugar.m4
-fi
+for ltfile in $ltfiles; do
+ if [ -f $ltfile ]; then
+ rm -f build/$ltfile
+ mv $ltfile build/$ltfile
+ fi
+done
# Clean up any leftovers
-rm -f aclocal.m4 libtool.m4
+rm -f aclocal.m4 libtool.m4 $ltfiles
#
# Generate the autoconf header and ./configure
Index: srclib/apr/configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.579
diff -u -r1.579 configure.in
--- srclib/apr/configure.in 16 Apr 2004 16:32:25 -0000 1.579
+++ srclib/apr/configure.in 29 Apr 2004 19:04:39 -0000
@@ -16,7 +16,11 @@
sinclude(build/apr_threads.m4)
sinclude(build/apr_hints.m4)
sinclude(build/libtool.m4)
+sinclude(build/argz.m4)
+sinclude(build/ltdl.m4)
+sinclude(build/ltoptions.m4)
sinclude(build/ltsugar.m4)
+sinclude(build/ltversion.m4)
dnl Save user-defined environment settings for later restoration
dnl
@@ -177,8 +181,10 @@
AC_ARG_WITH(libtool, [ --without-libtool avoid using libtool to link
the library],
[ use_libtool=$withval ], [ use_libtool="yes" ] )
+m4_pattern_allow([LT_LDFLAGS])
if test "x$use_libtool" = "xyes"; then
lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -o $@ -c $<
&& touch $@'
+ m4_pattern_allow([LT_VERSION])
LT_VERSION="-version-info `$get_version libtool $version_hdr APR`"
link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE)
${LT_VERSION} \$(ALL_LDFLAGS) -o \$@"
so_ext='lo'
Index: srclib/apr-util/xml/expat/buildconf.sh
===================================================================
RCS file: /home/cvspublic/apr-util/xml/expat/buildconf.sh,v
retrieving revision 1.13
diff -u -r1.13 buildconf.sh
--- srclib/apr-util/xml/expat/buildconf.sh 3 Feb 2004 10:32:32 -0000
1.13
+++ srclib/apr-util/xml/expat/buildconf.sh 29 Apr 2004 19:04:40 -0000
@@ -21,8 +21,9 @@
# Remove any libtool files so one can switch between libtool 1.3
# and libtool 1.4 by simply rerunning the buildconf script.
+ltfiles="argz.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
(cd conftools ; rm -f ltconfig ltmain.sh)
-rm -f aclocal.m4 libtool.m4 ltsugar.m4
+rm -f aclocal.m4 libtool.m4 $ltfiles
$libtoolize --copy --automake
@@ -30,23 +31,15 @@
# Build aclocal.m4 from libtool's libtool.m4
#
if [ -f libtool.m4 ]; then
- ltfile=libtool.m4
+ # sinclude(libtool.m4) in configure.in will copy it
else
ltpath=`dirname $libtoolize`
ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
+ echo "Incorporating $ltfile into aclocal.m4 ..."
+ echo "dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf.sh" > aclocal.m4
+ echo "dnl edits here will be lost" >> aclocal.m4
+ cat $ltfile >> aclocal.m4
fi
-echo "Incorporating $ltfile into aclocal.m4 ..."
-echo "dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf.sh" > aclocal.m4
-echo "dnl edits here will be lost" >> aclocal.m4
-cat $ltfile >> aclocal.m4
-
-if [ -f ltsugar.m4 ]; then
- echo "Incorporating ltsugar.m4 into aclocal.m4 ..."
- cat ltsugar.m4 >> aclocal.m4
-fi
-
-# Clean up again
-rm -f libtool.m4 ltsugar.m4
cross_compile_warning="warning: AC_TRY_RUN called without default to allow
cross compiling"
Index: srclib/apr-util/xml/expat/configure.in
===================================================================
RCS file: /home/cvspublic/apr-util/xml/expat/configure.in,v
retrieving revision 1.6
diff -u -r1.6 configure.in
--- srclib/apr-util/xml/expat/configure.in 9 Jul 2001 02:31:04 -0000
1.6
+++ srclib/apr-util/xml/expat/configure.in 29 Apr 2004 19:04:40 -0000
@@ -46,6 +46,16 @@
AC_CONFIG_HEADER(config.h)
AC_CANONICAL_SYSTEM
+dnl
+dnl Include libtool M4 macros
+dnl
+sinclude(libtool.m4)
+sinclude(argz.m4)
+sinclude(ltdl.m4)
+sinclude(ltoptions.m4)
+sinclude(ltsugar.m4)
+sinclude(ltversion.m4)
+
case "$host_alias" in
*os2*)
# Use a custom made libtool replacement