m4-patches
[Top][All Lists]
Advanced

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

Re: building m4 master HEAD with Libtool HEAD [WAS FYI: 333-gary-refacto


From: Gary V. Vaughan
Subject: Re: building m4 master HEAD with Libtool HEAD [WAS FYI: 333-gary-refactor-LTDL_INIT.patch]
Date: Tue, 29 Jan 2008 02:27:07 +0800

Hi Eric,

On 23 Jan 2008, at 14:30, Eric Blake wrote:
According to Ralf Wildenhues on 1/7/2008 1:40 PM:
|
| Well, I finally got done with my look over this, so you may want to
| consider it first. And when you're done and bored again, I will post a
| few test failures to ponder over, ok?  ;-)

I haven't looked at this patch in detail, but I decided to give it a spin and convert M4 head to use nonrecursive mode. Following the examples from
the documentation, I updated configure.ac to include this snippet:

LT_PREREQ([2.1a])
LT_CONFIG_LTDL_DIR([ltdl])
LT_INIT([shared dlopen win32-dll])
LTDL_INIT([nonrecursive convenience])
[[...]]
Since you are more familiar with the recent Libtool patch: Any ideas why, or how to fix libtool to recognize that M4 is using a custom name for the libtool files (ltdl, not libltdl)? I may get around to it, but it will
take me longer to come up to speed.

Yes, libtoolize was more or less ignoring the libtool mode setting.  And
ltdl.m4 had missed some important corner cases. :-(

At any rate, here's the current state of the patch for M4, for reproducing
this.


Thanks. If you wait until my libtool patches 349 and 350 are committed (or apply them to your local libtool and reinstall), I reworked your patch as
follows such that m4 now builds with a nonrecursive mode libltdl.

(No ChangeLog, but feel free to write one and commit it when the libtool
patch queue is empty again)

Cheers,
        Gary

  diff --git a/Makefile.am b/Makefile.am
  index e79210c..65cb0ef 100644
  --- a/Makefile.am
  +++ b/Makefile.am
  @@ -23,34 +23,44 @@
   config_aux_dir       = build-aux
   config_macro_dir= ltdl/m4

  -SUBDIRS              = ltdl po gnu tests/gnu .
  +SUBDIRS              = po gnu tests/gnu .

   ACLOCAL_AMFLAGS = -I ltdl/m4
   AUTOMAKE_OPTIONS = nostdinc
  -AM_CPPFLAGS  = -I. -I$(srcdir) \
  -               -Ignu -I$(srcdir)/gnu \
  -               -Im4 -I$(srcdir)/m4 \
  -               $(LTDLINCL)
  +
  +# Prime variables that will be added to by libtool.
  +AM_CPPFLAGS  = -Ignu -I$(srcdir)/gnu \
  +               -Im4 -I$(srcdir)/m4
  +EXTRA_DIST   = bootstrap \
  +               $(config_aux_dir)/mkstamp \
  +               $(config_macro_dir)/gnulib-cache.m4
  +
# FIXME - the -export-symbols-regex ".*" is a hack to work around the # fact that on cygwin, the convenience library libltdl exports symbols, # which effectively disables the auto-exporting of all other symbols.
   # Revisit this if libtool on cygwin improves.
   # See http://lists.gnu.org/archive/html/libtool-patches/2007-02/msg00062.html
-AM_LDFLAGS = -no-undefined -export-dynamic -export-symbols-regex ".*"
  +AM_LDFLAGS   = -export-dynamic -export-symbols-regex ".*"

  -EXTRA_DIST   = bootstrap \
  -               $(config_aux_dir)/mkstamp \
  -               $(config_macro_dir)/gnulib-cache.m4
  +BUILT_SOURCES        =
   CLEANFILES   =
  -DISTCLEANFILES       =
   MOSTLYCLEANFILES=
  +
  +include_HEADERS      =
  +noinst_LTLIBRARIES=
  +lib_LTLIBRARIES      =
  +EXTRA_LTLIBRARIES=
  +
  +# Include Libtool's rules.
  +include ltdl/Makefile.inc
  +
  +# Additional configuration.
  +DISTCLEANFILES       =
   MAINTAINERCLEANFILES = \
                  ABOUT-NLS COPYING INSTALL Makefile.in aclocal.m4 \
                  config-h.in configure stamp-h.in \
                  po/cat-id-tbl.c po/m4.pot po/stamp-cat-id

  -BUILT_SOURCES        =
  -
   MKSTAMP = $(SHELL) $(srcdir)/$(config_aux_dir)/mkstamp

# Make sure config.status is regenerated when the version timestamp changes
  @@ -202,7 +212,7 @@ EXTRA_DIST     += \
   ## libm4 ##
   ## ----- ##

  -lib_LTLIBRARIES      = m4/libm4.la
  +lib_LTLIBRARIES      += m4/libm4.la

   nobase_include_HEADERS = \
                  m4/m4module.h
  @@ -234,13 +244,6 @@ dist-hook:
   EXTRA_DIST     += m4/system_.h


  -## ------- ##
  -## libltdl ##
  -## ------- ##
  -
  -ltdl/libltdlc.la:
  -     cd ltdl && $(MAKE) $(MAKEFLAGS) libltdlc.la
  -
   ## -------------- ##
   ## Documentation. ##
   ## -------------- ##
  diff --git a/bootstrap b/bootstrap
  index 8da38fd..a3352cf 100755
  --- a/bootstrap
  +++ b/bootstrap
  @@ -52,6 +52,7 @@
   : ${AUTORECONF=autoreconf}
   : ${AWK=awk}
   : ${GNULIB_TOOL=gnulib-tool}
  +: ${LIBTOOLIZE=libtoolize}
   : ${M4=m4}
   : ${RM=rm -f}
   : ${SED=sed}
  @@ -400,6 +401,17 @@ fi
   func_echo "running: $AUTOPOINT --force"
   $AUTOPOINT --force

  +## ----------- ##
  +## Libtoolize. ##
  +## ----------- ##
  +
  +# Autoreconf runs aclocal before libtoolize, which causes spurious
+# wornings while the initial aclocal is confused by the unlibtoolized
  +# (or worse out-of-date) macro directory.
  +func_echo "running: $LIBTOOLIZE --force --copy --install"
  +${LIBTOOLIZE} --force --copy --install
  +
  +
   ## ---------------------------- ##
   ## Find the gnulib module tree. ##
   ## ---------------------------- ##
  @@ -470,10 +482,11 @@ $bailout_cb
   ## Autoreconf. ##
   ## ----------- ##

  -# Disable autopoint, since it was already done above.
  -func_echo "running: AUTOPOINT=true" \
+# Disable autopoint and libtoolize, since they were already done above.
  +func_echo "running: AUTOPOINT=true LIBTOOLIZE=true" \
       "$AUTORECONF --force --verbose --install --no-recursive"
-AUTOPOINT=true $AUTORECONF --force --verbose --install --no- recursive
  +AUTOPOINT=true LIBTOOLIZE=true \
  +    $AUTORECONF --force --verbose --install --no-recursive


   ## ---------------------------------------- ##
  diff --git a/configure.ac b/configure.ac
  index 05c5c9a..40eefcb 100644
  --- a/configure.ac
  +++ b/configure.ac
  @@ -89,7 +89,20 @@ M4_CHECK_DEBUGGING
   LT_PREREQ([2.1a])
   LT_CONFIG_LTDL_DIR([ltdl])
   LT_INIT([shared dlopen win32-dll])
  -LTDL_INIT
  +LTDL_INIT([nonrecursive convenience])
  +
  +# The lt_dlhandle_iterate symbol was added with libtool-2.2
  +if test "x$with_included_ltdl" != "xyes"; then
  +  save_CFLAGS="$CFLAGS"
  +  save_LDFLAGS="$LDFLAGS"
  +  CFLAGS="$CFLAGS $LTDLINCL"
  +  LDFLAGS="$LDFLAGS $LIBLTDL"
  +  AC_CHECK_LIB([ltdl], [lt_dlhandle_iterate],
  +             [],
  +     [AC_MSG_ERROR([installed libltdl is too old])])
  +  LDFLAGS="$save_LDFLAGS"
  +  CFLAGS="$save_CFLAGS"
  +fi

   # Use gcc's -pipe option if available: for faster compilation.
   case "$CFLAGS" in

--
Gary V. Vaughan (address@hidden)



Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

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