[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch 04/19] 286-gary-libtoolize-recursive-ltdl.diff Queue
From: |
Gary V. Vaughan |
Subject: |
Re: [patch 04/19] 286-gary-libtoolize-recursive-ltdl.diff Queue |
Date: |
Fri, 14 Oct 2005 16:34:28 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20050305) |
Tweaked this patch slightly to allow for the next one to work whether
or not SUBDIR_LIBOBJS are supported by the user's autotools. Okay to
commit?
Another step towards fixing LT_WITH_LTDL. Here we add an optional mode
argument to libtoolize so that the user can tell libtoolize whether she
is going to subconfigure libltdl as always, or use either a non-recursive
automake (like libtool itself), or a recursive automake with a top-level
configure. This patch *doesn't* attempt to clean up the m4 macros.
Incidentally, this also removes the troublesome '## %%% BEGIN' magic from
Makefile.am.
Makefile.am | 137 +++-------------------------------------
NEWS | 4 +
bootstrap | 5 -
configure.ac | 6 -
doc/libtool.texi | 63 ++++++++++++++++++
libltdl/Makefile.inc | 173
+++++++++++++++++++++++++++++++++++++++++++++++++++ libltdl/m4/ltdl.m4 | 12
+++
libtoolize.m4sh | 69 ++++++++++++++++++--
8 files changed, 329 insertions(+), 140 deletions(-)
Index: libtool--devo--1.0/ChangeLog
from Gary V. Vaughan <address@hidden>
* configure.ac: Move SUBDIR_LIBOBJS check from here...
* libltdl/m4/ltdl.m4 (_LT_CHECK_SUBDIR_LIBOBJS: ...to here.
(LT_INIT): Adjust.
* libltdl/Makefile.inc: New file, factored out of Makefile.am for
use in non-recursive libltdl installations.
* Makefile.am: include it.
(libltdl/Makefile.am): Adjust to build from the new
libltdl/Makefile.inc.
* bootstrap: Adjust.
* doc/libtool.texi (Invoking libtoolize): Document the new modes
and libtoolize option to select them.
* libtoolize.m4sh: Parse new options, --nonrecursive, --recursive
and --subproject. Install the appropriate files with --ltdl
according to the selected mode.
(func_scan_files): If --subproject, --recursive or --nonrecursive
options were not given, use the value from LT_CONFIG_LTDL_DIR; if
a mode was given, and there is also an argument to
LT_CONFIG_LTDL_DIR, ensure they are the same.
* NEWS: Updated.
Index: libtool--devo--1.0/Makefile.am
===================================================================
--- libtool--devo--1.0.orig/Makefile.am
+++ libtool--devo--1.0/Makefile.am
@@ -25,6 +25,7 @@
ACLOCAL_AMFLAGS = -I libltdl/m4
DIST_SUBDIRS = .
+EXTRA_DIST =
BUILT_SOURCES = libtool
@@ -32,15 +33,9 @@ CLEANFILES =
MOSTLYCLEANFILES =
DISTCLEANFILES =
-EXTRA_DIST = libltdl/COPYING.LIB \
- libltdl/Makefile.am \
- libltdl/Makefile.in \
- libltdl/README \
- libltdl/config-h.in \
- libltdl/configure \
- libltdl/configure.ac \
- libltdl/aclocal.m4 \
- libltdl/m4/lt~obsolete.m4
+noinst_LTLIBRARIES =
+lib_LTLIBRARIES =
+EXTRA_LTLIBRARIES =
auxdir = libltdl/config
m4dir = libltdl/m4
@@ -196,19 +191,22 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_file
chmod a-w $(auxdir)/ltmain.tmp; \
mv -f $(auxdir)/ltmain.tmp $(auxdir)/ltmain.sh
-$(srcdir)/libltdl/Makefile.am: Makefile.am
+$(srcdir)/libltdl/Makefile.am: $(srcdir)/libltdl/Makefile.inc
cd $(srcdir); \
- in=Makefile.am; out=libltdl/Makefile.am; \
+ in=libltdl/Makefile.inc; out=libltdl/Makefile.am; \
rm -f $$out; \
$(SED) -n '/^.. Makefile.am -- /,/^.. Boston, MA/p' $$in > $$out; \
{ echo 'ACLOCAL_AMFLAGS = -I m4'; \
echo 'AUTOMAKE_OPTIONS = foreign'; \
echo 'BUILT_SOURCES ='; \
+ echo 'noinst_LTLIBRARIES ='; \
+ echo 'lib_LTLIBRARIES ='; \
+ echo 'EXTRA_LTLIBRARIES ='; \
echo 'EXTRA_DIST ='; \
echo 'CLEANFILES ='; \
echo 'MOSTLYCLEANFILES ='; \
} >> $$out; \
- $(SED) -n '/^. %%% BEGIN /,/^. %%% END / \
+ $(SED) -n '/^.. DO NOT REMOVE THIS LINE -- /,$$ \
{ s,libltdl_,,; s,libltdl/,,; s,: libltdl/,: ,; \
s,\$$(libltdl_,$$(,; p; }' $$in >> $$out;
chmod a-w $(srcdir)/libltdl/Makefile.am
@@ -224,119 +222,7 @@ all-local: $(srcdir)/libltdl/Makefile.in
## Libltdl. ##
## -------- ##
-# %%% BEGIN libltdl/Makefile.am
-
-DEFS = -DLTDL -DHAVE_CONFIG_H
-DLT_CONFIG_H='<$(LT_CONFIG_H)>'
-
-# -I$(srcdir) is needed for user that built libltdl with a sub-Automake
-# (not as a sub-package!) using 'nostdinc':
-AM_CPPFLAGS = -I. -I$(srcdir) -Ilibltdl -I$(srcdir)/libltdl \
- -I$(srcdir)/libltdl/libltdl
-AM_LDFLAGS = -no-undefined
-VERSION_INFO = -version-info 7:0:0
-
-noinst_LTLIBRARIES = $(LT_DLLOADERS)
-
-if INSTALL_LTDL
-ltdlincludedir = $(includedir)/libltdl
-ltdlinclude_HEADERS = libltdl/libltdl/lt_system.h \
- libltdl/libltdl/lt_error.h \
- libltdl/libltdl/lt_dlloader.h
-include_HEADERS = libltdl/ltdl.h
-lib_LTLIBRARIES = libltdl/libltdl.la
-endif
-
-if CONVENIENCE_LTDL
-noinst_LTLIBRARIES += libltdl/libltdlc.la
-endif
-
-libltdl_libltdl_la_SOURCES = libltdl/libltdl/lt__alloc.h \
- libltdl/libltdl/lt__dirent.h \
- libltdl/libltdl/lt__glibc.h \
- libltdl/libltdl/lt__private.h \
- libltdl/libltdl/lt__strl.h \
- libltdl/libltdl/lt_dlloader.h \
- libltdl/libltdl/lt_error.h \
- libltdl/libltdl/lt_system.h \
- libltdl/libltdl/slist.h \
- libltdl/loaders/preopen.c \
- libltdl/lt__alloc.c \
- libltdl/lt_dlloader.c \
- libltdl/lt_error.c \
- libltdl/ltdl.c \
- libltdl/ltdl.h \
- libltdl/slist.c
-
-libltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
-libltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(VERSION_INFO) $(LT_DLPREOPEN)
-libltdl_libltdl_la_LIBADD = $(LTLIBOBJS)
-libltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(LTLIBOBJS)
-
-libltdl_libltdlc_la_SOURCES = $(libltdl_libltdl_la_SOURCES)
-libltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
-libltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
-libltdl_libltdlc_la_LIBADD = $(libltdl_libltdl_la_LIBADD)
-libltdl_libltdlc_la_DEPENDENCIES= $(libltdl_libltdl_la_DEPENDENCIES)
-
-## The loaders are preopened by libltdl, itself always built from
-## pic-objects (either as a shared library, or a convenience library),
-## so the loaders themselves must be made from pic-objects too. We
-## use convenience libraries for that purpose:
-EXTRA_LTLIBRARIES = libltdl/dlopen.la \
- libltdl/dld_link.la \
- libltdl/dyld.la \
- libltdl/load_add_on.la \
- libltdl/loadlibrary.la \
- libltdl/shl_load.la
-
-libltdl_dlopen_la_SOURCES = libltdl/loaders/dlopen.c
-libltdl_dlopen_la_LDFLAGS = -module -avoid-version
-libltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
-
-libltdl_dld_link_la_SOURCES = libltdl/loaders/dld_link.c
-libltdl_dld_link_la_LDFLAGS = -module -avoid-version
-libltdl_dld_link_la_LIBADD = -ldld
-
-libltdl_dyld_la_SOURCES = libltdl/loaders/dyld.c
-libltdl_dyld_la_LDFLAGS = -module -avoid-version
-
-libltdl_load_add_on_la_SOURCES = libltdl/loaders/load_add_on.c
-libltdl_load_add_on_la_LDFLAGS = -module -avoid-version
-
-libltdl_loadlibrary_la_SOURCES = libltdl/loaders/loadlibrary.c
-libltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
-
-libltdl_shl_load_la_SOURCES = libltdl/loaders/shl_load.c
-libltdl_shl_load_la_LDFLAGS = -module -avoid-version
-libltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
-
-## Make sure these will be cleaned even when they're not built by default:
-CLEANFILES += libltdl/libltdl.la \
- libltdl/libltdlc.la \
- libltdl/libdlloader.la
-
-## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
-## automatically:
-CLEANFILES += $(LIBOBJS) $(LTLIBOBJS)
-
-
-## --------------------------- ##
-## Gnulib Makefile.am snippets ##
-## --------------------------- ##
-
-BUILT_SOURCES += libltdl/$(ARGZ_H)
-EXTRA_DIST += libltdl/argz_.h
-
-# We need the following in order to create an <argz.h> when the system
-# doesn't have one that works with the given compiler.
-all-local $(lib_OBJECTS): libltdl/$(ARGZ_H)
-libltdl/argz.h: libltdl/argz_.h
- cp $(srcdir)/libltdl/argz_.h address@hidden
- mv address@hidden $@
-MOSTLYCLEANFILES += libltdl/argz.h \
- libltdl/argz.h-t
-
-# %%% END libltdl/Makefile.am
+include libltdl/Makefile.inc
if ! SUBDIR_LIBOBJS
## workaround for Autoconf 2.59, Automake 1.9.6:
@@ -384,6 +270,7 @@ aclocalfiles = m4/argz.m4 m4/libtool.m4
ltdldatafiles = libltdl/COPYING.LIB \
libltdl/README \
libltdl/Makefile.am \
+ libltdl/Makefile.inc \
libltdl/configure.ac \
libltdl/aclocal.m4 \
libltdl/Makefile.in \
Index: libtool--devo--1.0/NEWS
===================================================================
--- libtool--devo--1.0.orig/NEWS
+++ libtool--devo--1.0/NEWS
@@ -4,6 +4,10 @@ New in 1.9h: 2005-??-??; CVS version 2.1
* New tests for support of Automake subdir-objects.
* Fix libltdl on static platforms.
* New LT_CONFIG_LTDL_DIR macro.
+* New libtoolize options: --non-recursive, --recursive, --subproject. These
+ options control the way libltdl is installed by libtoolize.
+* New recursive and non-recursive build modes for libltdl that don't require
+ a subconfigure.
* New multi-module-loader safe libltdl handle iteration APIs:
lt_dlhandle_iterate, lt_dlhandle_fetch, lt_dlhandle_map.
* New lt_dlinterface_register to maintain separation of concerns between
Index: libtool--devo--1.0/bootstrap
===================================================================
--- libtool--devo--1.0.orig/bootstrap
+++ libtool--devo--1.0/bootstrap
@@ -89,8 +89,9 @@ set dummy `$SED -n '/AC_INIT/{s/[][,()]/
shift
# Whip up a dirty Makefile:
-test -f Makefile \
- || $SED '/^if /,/^endif$/d;/^else$/,/^endif$/d' Makefile.am > Makefile
+makes='Makefile.am libltdl/Makefile.inc'
+test -f Makefile ||
+ $SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes > Makefile
# Building distributed files from configure is bad for automake, so we
# generate them here, and have Makefile rules to keep them up to date.
Index: libtool--devo--1.0/configure.ac
===================================================================
--- libtool--devo--1.0.orig/configure.ac
+++ libtool--devo--1.0/configure.ac
@@ -123,12 +123,6 @@ AC_SUBST([M4SH], ['$(AUTOM4TE) --languag
dnl Make sure config.status is regenerated when the version timestamp changes
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/stamp-vcl'])
-dnl automake-1.9.x or autoconf-2.59 don't support subdir libobjs
-AC_MSG_CHECKING([whether subdir libobjs are useable])
-test -f $srcdir/argz.c || sublibobjs_supported=yes
-AM_CONDITIONAL([SUBDIR_LIBOBJS], test x"${sublibobjs_supported-no}" != xno)
-AC_MSG_RESULT([${sublibobjs_supported-no}])
-
## ------------------------------- ##
## Libtool specific configuration. ##
Index: libtool--devo--1.0/doc/libtool.texi
===================================================================
--- libtool--devo--1.0.orig/doc/libtool.texi
+++ libtool--devo--1.0/doc/libtool.texi
@@ -2249,11 +2249,74 @@ also specify a subdirectory name here if
for example. If @command{libtoolize} can't determine the target
directory, @samp{libltdl} is used as the default.
address@hidden --nonrecursive
+If passed in conjunction with @option{--ltdl}, this option will cause
+the @command{libltdl} installed by @samp{libtoolize} to be set up for
+use with a non-recursive @command{automake} build. To make use of it,
+you will need to add the following to the @file{Makefile.am} of the
+parent project:
+
address@hidden
+## libltdl/Makefile.inc @r{appends to the following variables}
+## @r{so we set them here before including it:}
+BUILT_SOURCES =
+
+noinst_LTLIBRARIES =
+lib_LTLIBRARIES =
+EXTRA_LTLIBRARIES =
+
+EXTRA_DIST =
+
+CLEANFILES =
+MOSTLYCLEANFILES =
+
+include libltdl/Makefile.inc
address@hidden example
+
address@hidden
+The @file{Makefile.inc} included here requires that the libltdl
+sources are in a subdirectory named @file{libltdl}, and you cannot use
+a different directory name for a @samp{nonrecursive} build.
+
@item --quiet
@itemx -q
Work silently. @samp{libtoolize --quiet} is used by @sc{gnu} Automake
to add libtool files to your package if necessary.
address@hidden --recursive
+If passed in conjunction with @option{--ltdl}, this option will cause
+the @command{libtoolize} installed @samp{libltdl} to be set up for use
+with a recursive @command{automake} build. To make use of it, you
+will need to adjust the parent project's @file{configure.ac}:
+
address@hidden
+AC_CONFIG_FILES([libltdl/Makefile])
address@hidden example
+
address@hidden
+and @file{Makefile.am}:
+
address@hidden
+SUBDIRS += libltdl
address@hidden example
+
address@hidden --subproject
+If passed in conjunction with @option{--ltdl}, this option will cause
+the @command{libtoolize} installed @samp{libltd} to be set up for
+independent configuration and compilation as a self-contained
+subproject. To make use of it, you should arrange for your build to
+call @command{libltdl/configure}, and then run @command{make} in the
address@hidden directory (or the subdirectory you put libltdl into).
+If your project uses Autoconf, you can use the supplied
address@hidden macro, or else call @samp{AC_CONFIG_SUBDIRS}
+directly.
+
+Previous releases of @samp{libltdl} built exclusively in this mode,
+but now it is the default mode both for backwards compatibility and
+because, for example, it is suitable for use in projects that wish to
+use @samp{libltdl}, but not use the Autotools for their own build
+process.
+
@item --verbose
@itemx -v
Work noisily! Give a blow by blow account of what
Index: libtool--devo--1.0/libltdl/Makefile.inc
===================================================================
--- /dev/null
+++ libtool--devo--1.0/libltdl/Makefile.inc
@@ -0,0 +1,173 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+##
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## As a special exception to the GNU Lesser General Public License,
+## if you distribute this file as part of a program or library that
+## is built using GNU libtool, you may include it under the same
+## distribution terms that you use for the rest of that program.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; see the file COPYING. If not, write to
+## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301, USA.
+
+## DO NOT REMOVE THIS LINE -- make depends on it
+
+# -I$(srcdir) is needed for user that built libltdl with a sub-Automake
+# (not as a sub-package!) using 'nostdinc':
+ltdl_CPPFLAGS = -DHAVE_CONFIG_H -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
+ -DLTDL -I. -I$(srcdir) -Ilibltdl \
+ -I$(srcdir)/libltdl -I$(srcdir)/libltdl/libltdl
+ltdl_LDFLAGS = -no-undefined
+ltdl_VERSION_INFO = -version-info 7:0:0
+
+noinst_LTLIBRARIES += $(LT_DLLOADERS)
+
+if INSTALL_LTDL
+ltdlincludedir = $(includedir)/libltdl
+ltdlinclude_HEADERS = libltdl/libltdl/lt_system.h \
+ libltdl/libltdl/lt_error.h \
+ libltdl/libltdl/lt_dlloader.h
+include_HEADERS = libltdl/ltdl.h
+lib_LTLIBRARIES += libltdl/libltdl.la
+endif
+
+if CONVENIENCE_LTDL
+noinst_LTLIBRARIES += libltdl/libltdlc.la
+endif
+
+libltdl_libltdl_la_SOURCES = libltdl/libltdl/lt__alloc.h \
+ libltdl/libltdl/lt__dirent.h \
+ libltdl/libltdl/lt__glibc.h \
+ libltdl/libltdl/lt__private.h \
+ libltdl/libltdl/lt__strl.h \
+ libltdl/libltdl/lt_dlloader.h \
+ libltdl/libltdl/lt_error.h \
+ libltdl/libltdl/lt_system.h \
+ libltdl/libltdl/slist.h \
+ libltdl/loaders/preopen.c \
+ libltdl/lt__alloc.c \
+ libltdl/lt_dlloader.c \
+ libltdl/lt_error.c \
+ libltdl/ltdl.c \
+ libltdl/ltdl.h \
+ libltdl/slist.c
+
+libltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(ltdl_CPPFLAGS)
+libltdl_libltdl_la_LDFLAGS = $(ltdl_LDFLAGS) $(ltdl_VERSION_INFO)
$(LT_DLPREOPEN)
+libltdl_libltdl_la_LIBADD = $(LTLIBOBJS)
+libltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(LTLIBOBJS)
+
+libltdl_libltdlc_la_SOURCES = $(libltdl_libltdl_la_SOURCES)
+libltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(ltdl_CPPFLAGS)
+libltdl_libltdlc_la_LDFLAGS = $(ltdl_LDFLAGS) $(LT_DLPREOPEN)
+libltdl_libltdlc_la_LIBADD = $(libltdl_libltdl_la_LIBADD)
+libltdl_libltdlc_la_DEPENDENCIES= $(libltdl_libltdl_la_DEPENDENCIES)
+
+# ---------------------------------------------------------------- #
+# Automake-1.9.6 doesn't pass the per-target CPPFLAGS to LTLIBOBJS #
+# correctly, so we have to override the automake-generated rule: #
+# ---------------------------------------------------------------- #
+
+LTOBJCOMPILE = $(LTCOMPILE) $(ltdl_CPPFLAGS) -c
+
+if SUBDIR_LIBOBJS
+libltdl/argz.lo: $(top_srcdir)/libltdl/argz.c
+ $(LTOBJCOMPILE) -o libltdl/argz.lo $(top_srcdir)/libltdl/argz.c
+libltdl/lt__dirent.lo: $(top_srcdir)/libltdl/lt__dirent.c
+ $(LTOBJCOMPILE) -o libltdl/lt__dirent.lo
$(top_srcdir)/libltdl/lt__dirent.c
+libltdl/lt__strl.lo: $(top_srcdir)/libltdl/lt__strl.c
+ $(LTOBJCOMPILE) -o libltdl/lt__strl.lo $(top_srcdir)/libltdl/lt__strl.c
+else
+argz.lo: $(top_srcdir)/argz.c
+ $(LTOBJCOMPILE) -o argz.lo $(top_srcdir)/argz.c
+lt__strl.lo: $(top_srcdir)/lt__strl.c
+ $(LTOBJCOMPILE) -o lt__strl.lo $(top_srcdir)/lt__strl.c
+lt__dirent.lo: $(top_srcdir)/lt__dirent.c
+ $(LTOBJCOMPILE) -o lt__dirent.lo $(top_srcdir)/lt__dirent.c
+endif
+
+## The loaders are preopened by libltdl, itself always built from
+## pic-objects (either as a shared library, or a convenience library),
+## so the loaders themselves must be made from pic-objects too. We
+## use convenience libraries for that purpose:
+EXTRA_LTLIBRARIES += libltdl/dlopen.la \
+ libltdl/dld_link.la \
+ libltdl/dyld.la \
+ libltdl/load_add_on.la \
+ libltdl/loadlibrary.la \
+ libltdl/shl_load.la
+
+libltdl_dlopen_la_SOURCES = libltdl/loaders/dlopen.c
+libltdl_dlopen_la_CPPFLAGS = $(ltdl_CPPFLAGS)
+libltdl_dlopen_la_LDFLAGS = -module -avoid-version
+libltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
+
+libltdl_dld_link_la_SOURCES = libltdl/loaders/dld_link.c
+libltdl_dld_link_la_CPPFLAGS = $(ltdl_CPPFLAGS)
+libltdl_dld_link_la_LDFLAGS = -module -avoid-version
+libltdl_dld_link_la_LIBADD = -ldld
+
+libltdl_dyld_la_SOURCES = libltdl/loaders/dyld.c
+libltdl_dyld_la_CPPFLAGS = $(ltdl_CPPFLAGS)
+libltdl_dyld_la_LDFLAGS = -module -avoid-version
+
+libltdl_load_add_on_la_SOURCES = libltdl/loaders/load_add_on.c
+libltdl_load_add_on_la_CPPFLAGS = $(ltdl_CPPFLAGS)
+libltdl_load_add_on_la_LDFLAGS = -module -avoid-version
+
+libltdl_loadlibrary_la_SOURCES = libltdl/loaders/loadlibrary.c
+libltdl_loadlibrary_la_CPPFLAGS = $(ltdl_CPPFLAGS)
+libltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
+
+libltdl_shl_load_la_SOURCES = libltdl/loaders/shl_load.c
+libltdl_shl_load_la_CPPFLAGS = $(ltdl_CPPFLAGS)
+libltdl_shl_load_la_LDFLAGS = -module -avoid-version
+libltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
+
+## Make sure these will be cleaned even when they're not built by default:
+CLEANFILES += libltdl/libltdl.la \
+ libltdl/libltdlc.la \
+ libltdl/libdlloader.la
+
+## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
+## automatically:
+CLEANFILES += $(LIBOBJS) $(LTLIBOBJS)
+
+EXTRA_DIST += libltdl/COPYING.LIB \
+ libltdl/Makefile.am \
+ libltdl/Makefile.in \
+ libltdl/Makefile.inc \
+ libltdl/README \
+ libltdl/config-h.in \
+ libltdl/configure \
+ libltdl/configure.ac \
+ libltdl/aclocal.m4 \
+ libltdl/m4/lt~obsolete.m4
+
+## --------------------------- ##
+## Gnulib Makefile.am snippets ##
+## --------------------------- ##
+
+BUILT_SOURCES += libltdl/$(ARGZ_H)
+EXTRA_DIST += libltdl/argz_.h
+
+# We need the following in order to create an <argz.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(lib_OBJECTS): libltdl/$(ARGZ_H)
+libltdl/argz.h: libltdl/argz_.h
+ cp $(srcdir)/libltdl/argz_.h address@hidden
+ mv address@hidden $@
+MOSTLYCLEANFILES += libltdl/argz.h \
+ libltdl/argz.h-t
Index: libtool--devo--1.0/libltdl/m4/ltdl.m4
===================================================================
--- libtool--devo--1.0.orig/libltdl/m4/ltdl.m4
+++ libtool--devo--1.0/libltdl/m4/ltdl.m4
@@ -228,6 +228,7 @@ AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
AC_REQUIRE([gl_FUNC_ARGZ])dnl
m4_require([_LT_CHECK_OBJDIR])dnl
+m4_require([_LT_CHECK_SUBDIR_LIBOBJS])dnl
m4_require([_LT_HEADER_DLFCN])dnl
m4_require([_LT_ENABLE_INSTALL])dnl
m4_require([_LT_CHECK_DLPREOPEN])dnl
@@ -285,6 +286,17 @@ AM_CONDITIONAL(CONVENIENCE_LTDL, test x"
])# _LT_ENABLE_INSTALL
+# _LT_CHECK_SUBDIR_LIBOBJS
+# ------------------------
+# Automake-1.9.x or autoconf-2.59 don't support subdir libobjs.
+m4_defun([_LT_CHECK_SUBDIR_LIBOBJS],
+[AC_MSG_CHECKING([whether subdir libobjs are useable])
+test -f $srcdir/argz.c || sublibobjs_supported=yes
+AM_CONDITIONAL([SUBDIR_LIBOBJS], test x"${sublibobjs_supported-no}" != xno)
+AC_MSG_RESULT([${sublibobjs_supported-no}])
+])# _LT_CHECK_SUBDIR_LIBOBJS
+
+
# LT_SYS_DLOPEN_DEPLIBS
# ---------------------
AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
Index: libtool--devo--1.0/libtoolize.m4sh
===================================================================
--- libtool--devo--1.0.orig/libtoolize.m4sh
+++ libtool--devo--1.0/libtoolize.m4sh
@@ -40,7 +40,10 @@ m4_divert_push([SCRIPT])#! /bin/sh
# -f, --force replace existing files
# -i, --install copy missing auxiliary files
# --ltdl[=DIR] install libltdl sources [default: libltdl]
+# --nonrecursive prepare ltdl for non-recursive make
# -q, --quiet work silently
+# --recursive prepare ltdl for recursive make
+# --subproject prepare ltdl to configure and build independently
# -v, --verbose verbosely report processing
# --version print version information and exit
# -h, --help print short or long help message
@@ -78,6 +81,11 @@ seen_autoconf=false
seen_libtool=false
seen_ltdl=false
+# ltdl can be installed to be self-contained (subproject, the default);
+# or to be configured by a parent project, either with a recursive or
+# nonrecursive automake driven make:
+ltdl_mode=
+
# Locations for important files:
address@hidden@
address@hidden@
@@ -135,10 +143,18 @@ configure_ac=configure.in
fi
;;
+ --nonrecursive|--non-recursive)
+ ltdl_mode=nonrecursive
+ ;;
+
--quiet|--automake|-q) # --automake is for 1.5 compatibility
opt_quiet=:
;;
+ --recursive) ltdl_mode=recursive ;;
+
+ --subproject) ltdl_mode=subproject ;;
+
--verbose|-v) opt_verbose=: ;;
# Separate optargs to long options:
@@ -386,7 +402,9 @@ func_scan_files ()
};
/_LT_CONFIG_LTDL_DIR(/d;
/LT_CONFIG_LTDL_DIR(/ {
- s,^.*LT_CONFIG_LTDL_DIR([[[ ]*\([^])]]*\).*$,ac_ltdldir=\1,; p;
+ s/^.*LT_CONFIG_LTDL_DIR([[[ ]*\([^]),]*\)[^,]]*/ac_ltdldir=\1%%/;
+ s/%%[[[, ]*\([^])]]*\).*$/ ac_ltdl_mode=\1%%/;
+ s/%%.*$//; p;
};
/A[[CM]]_PROG_LIBTOOL/ { s,^.*$,seen_libtool=:,; p; };
/LT_INIT/ { s,^.*$,seen_libtool=:,; p; };
@@ -404,9 +422,9 @@ func_scan_files ()
ac_ltdldir=`$ECHO "X$ac_ltdldir" | $Xsed -e 's,/*$,,'`
- # If $configure_ac contains AC_CONFIG_AUX_DIR, check that it was
- # not given in terms of a shell variable!
- case "$ac_ltdldir" in
+ # If $configure_ac contains AC_CONFIG_LTDL_DIR, check that its
+ # arguments were not given in terms of a shell variable!
+ case "$ac_ltdldir$ac_ltdl_mode" in
*\$*)
func_fatal_error "can not handle variables in LT_CONFIG_LTDL_DIR"
;;
@@ -427,6 +445,26 @@ func_scan_files ()
esac
+ # ------------------- #
+ # Validate ltdl_mode. #
+ # ------------------- #
+
+ test -n "$ac_ltdl_mode" && seen_ltdl=:
+
+ # If neither --ltdl nor LT_CONFIG_LTDL_DIR are specified, default to
+ # `subproject'. If both are specified, they must be the same. Otherwise,
+ # take the one that is given!
+ case x$ac_ltdl_mode,x$ltdl_mode in
+ x,x) ltdl_mode=subproject ;;
+ x*,x) ltdl_mode=$ac_ltdl_mode ;;
+ x,x*) ltdl_mode=$ltdl_mode ;;
+ *)
+ test x"$ac_ltdl_mode" = x"$ltdl_mode" || \
+ func_fatal_error "--$ltdl_mode does not match
LT_CONFIG_LTDL_DIR($ac_ltdldir, $ac_ltdl_mode)"
+ ;;
+ esac
+
+
# ---------------- #
# Validate auxdir. #
# ---------------- #
@@ -982,7 +1020,19 @@ func_nonemptydir_p ()
func_nonemptydir_p pkgdatadir
func_nonemptydir_p aclocaldir
- func_massage_pkgltdl_files
+ func_scan_files
+
+ # These files are handled specially, depending on ltdl_mode:
+ case $ltdl_mode in
+ *recursive)
+ glob_exclude_pkgltdl_files='Makefile.am|Makefile.in*|aclocal.m4|config*'
+ ;;
+ *)
+ glob_exclude_pkgltdl_files='Makefile.inc'
+ ;;
+ esac
+
+ func_massage_pkgltdl_files "$glob_exclude_pkgltdl_files"
func_massage_pkgconfig_files
# libtool.m4 and ltdl.m4 are handled specially below
@@ -990,11 +1040,16 @@ func_nonemptydir_p ()
glob_exclude_pkgaux_files='config.guess|config.sub|install-sh|ltmain.sh'
- func_scan_files
-
# Copy all the files from installed libltdl to this project, if the
# user specified `--ltdl'.
if $opt_ltdl; then
+
+ # For recursive ltdl modes, copy a suitable Makefile.{am,inc}:
+ case $ltdl_mode in
+ recursive) pkgltdl_files="Makefile.am:$pkgltdl_files" ;;
+ nonrecursive) pkgltdl_files="Makefile.inc:$pkgltdl_files" ;;
+ esac
+
func_copy_some_files "$pkgltdl_files" "$pkgltdldir/libltdl" "$ltdldir"
# Unless we share CONFIG_MACRO_DIR with our parent project,
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
signature.asc
Description: OpenPGP digital signature
- [patch 19/19] 272-gary-sync-m4sh-utils.diff Queue, (continued)
- [patch 04/19] 286-gary-libtoolize-recursive-ltdl.diff Queue, Gary V. Vaughan, 2005/10/10
- Re: [patch 04/19] 286-gary-libtoolize-recursive-ltdl.diff Queue, Ralf Wildenhues, 2005/10/11
- Re: [patch 04/19] 286-gary-libtoolize-recursive-ltdl.diff Queue, Gary V. Vaughan, 2005/10/13
- Re: [patch 04/19] 286-gary-libtoolize-recursive-ltdl.diff Queue,
Gary V. Vaughan <=
- Re: [patch 04/19] 286-gary-libtoolize-recursive-ltdl.diff Queue, Ralf Wildenhues, 2005/10/16
- 286-gary-libtoolize-recursive-ltdl.diff, Gary V. Vaughan, 2005/10/17
- Re: 286-gary-libtoolize-recursive-ltdl.diff, Ralf Wildenhues, 2005/10/18
- Re: 286-gary-libtoolize-recursive-ltdl.diff, Gary V. Vaughan, 2005/10/18
- Re: 286-gary-libtoolize-recursive-ltdl.diff, Ralf Wildenhues, 2005/10/24
Re: [patch 00/19] @patch@ Queue, Ralf Wildenhues, 2005/10/10