summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2005-04-04 12:12:25 +0000
committerGary V. Vaughan <gary@gnu.org>2005-04-04 12:12:25 +0000
commit0aa2e304c60c60a8ee1af358f9551b01f387ba41 (patch)
treed6e8433bb80a8a8b37448846802660bed480e6ef
parente0833142671fb5a90a75592c384962f324176196 (diff)
downloadlibtool-0aa2e304c60c60a8ee1af358f9551b01f387ba41.tar.gz
Getting the value of ltdldatafiles from a submake was not
portable, and had problems with GNU make-3.80 at least. This changeset pulls the installation rules for libtoolize's copy of the libltdl sources out of libltdl/Makefile.am so that ltdldatafiles is defined in the same Makefile that uses it. Also, this makes a start at cleaning up libltdl/Makefile.am so that it is useful in a package that uses `libtoolize --ltdl': * libltdl/loaders/Makefile.am: Removed entirely. * libltdl/Makefile.am (dlopen.la, dld_link.la, dyld.la) (load_add_on.la, loadlibrary.la, shl_load.la): All built from here now that the loaders submake has gone. (show-ltdldatafiles): Removed. No longer required. (ltdldatadir, ltdldatafiles, install-local): Moved from here... * Makefile.am (ltdldatadir, ltdldatafiles, install-local): ..to here. (libtoolize): Substitute $(ltdldatafiles) directly without calling make to get the value from libltdl/Makefile.
-rw-r--r--ChangeLog21
-rw-r--r--Makefile.am39
-rw-r--r--configure.ac3
-rw-r--r--libltdl/Makefile.am89
-rw-r--r--m4/ltdl.m42
5 files changed, 107 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index 56d3a871..1ed3838e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2005-04-04 Gary V. Vaughan <gary@gnu.org>
+
+ Getting the value of ltdldatafiles from a submake was not
+ portable, and had problems with GNU make-3.80 at least. This
+ changeset pulls the installation rules for libtoolize's copy of
+ the libltdl sources out of libltdl/Makefile.am so that
+ ltdldatafiles is defined in the same Makefile that uses it. Also,
+ this makes a start at cleaning up libltdl/Makefile.am so that it
+ is useful in a package that uses `libtoolize --ltdl':
+
+ * libltdl/loaders/Makefile.am: Removed entirely.
+ * libltdl/Makefile.am (dlopen.la, dld_link.la, dyld.la)
+ (load_add_on.la, loadlibrary.la, shl_load.la): All built from here
+ now that the loaders submake has gone.
+ (show-ltdldatafiles): Removed. No longer required.
+ (ltdldatadir, ltdldatafiles, install-local): Moved from here...
+ * Makefile.am (ltdldatadir, ltdldatafiles, install-local): ..to
+ here.
+ (libtoolize): Substitute $(ltdldatafiles) directly without calling
+ make to get the value from libltdl/Makefile.
+
2005-04-01 Gary V. Vaughan <gary@gnu.org>
* Makefile.am (libtoolize): Substitute $(nobase_pkgvdata_DATA).
diff --git a/Makefile.am b/Makefile.am
index fb5c7078..b748069c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -161,10 +161,9 @@ libtoolize: $(top_srcdir)/libtoolize.in
rm -f libtoolize.tmp libtoolize
$(timestamp); \
input="libtoolize.m4sh"; \
- ltdldatafiles=`cd libltdl; make show-ltdldatafiles`; \
$(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
-e 's,@nobase_pkgvdata_DATA\@,$(nobase_pkgvdata_DATA),g' \
- -e "s,@pkgvltdl_files\@,`echo $$ltdldatafiles`,g" \
+ -e "s,@pkgvltdl_files\@,`echo $(ltdldatafiles)`,g" \
$(top_srcdir)/libtoolize.in > libtoolize.tmp
chmod a+x libtoolize.tmp
chmod a-w libtoolize.tmp
@@ -213,6 +212,37 @@ configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
abs_srcdir=`cd $(top_srcdir) && pwd`; \
(cd $$dir && $$abs_srcdir/$$dir/configure) || exit 1
+## These are installed as a subdirectory of pkgdatadir so that
+## libtoolize --ltdl can find them later:
+ltdldatadir = $(pkgvdatadir)/libltdl
+ltdldatafiles = COPYING.LIB README \
+ Makefile.am Makefile.in \
+ argz_.h argz.c \
+ configure.ac configure \
+ libltdl/lt__alloc.h \
+ libltdl/lt__dirent.h \
+ libltdl/lt__glibc.h \
+ libltdl/lt__private.h \
+ libltdl/lt__strl.h \
+ libltdl/lt_dlloader.h \
+ libltdl/lt_error.h \
+ libltdl/lt_system.h \
+ libltdl/slist.h \
+ loaders/dld_link.c \
+ loaders/dlopen.c \
+ loaders/dyld.c \
+ loaders/load_add_on.c \
+ loaders/loadlibrary.c \
+ loaders/preopen.c \
+ loaders/shl_load.c \
+ lt__alloc.c \
+ lt__dirent.c \
+ lt__strl.c \
+ lt_dlloader.c \
+ lt_error.c \
+ ltdl.c ltdl.h \
+ slist.c
+
install-data-local:
## Don't install over the top of an old pkgvdatadir
-rm -rf $(DESTDIR)$(pkgvdatadir)
@@ -221,6 +251,11 @@ install-data-local:
## Remove old macro definitions
-rm -rf $(DESTDIR)$(aclocaldir)/ltdl.m4
-rm -rf $(DESTDIR)$(aclocaldir)/libtool.m4
+## To avoid spurious reconfiguration when the user installs these files
+## with libtoolize, we have to preserve their timestamps carefully:
+ $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
+ ( cd $(srcdir)/libltdl && $(AMTAR) chf - $(ltdldatafiles); ) \
+ | ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
install-data-hook:
chmod +x $(DESTDIR)$(pkgvdatadir)/config/config.guess
diff --git a/configure.ac b/configure.ac
index d2df8479..292fdac8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,6 +208,5 @@ AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"])
## -------- ##
## Outputs. ##
## -------- ##
-AC_CONFIG_FILES([Makefile libltdl/Makefile libltdl/loaders/Makefile
- doc/Makefile tests/Makefile])
+AC_CONFIG_FILES([Makefile libltdl/Makefile doc/Makefile tests/Makefile])
AC_OUTPUT
diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am
index c28ab3f4..86e3d185 100644
--- a/libltdl/Makefile.am
+++ b/libltdl/Makefile.am
@@ -18,8 +18,6 @@
## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
## Boston, MA 02111-1307, USA.
-SUBDIRS = loaders .
-
BUILT_SOURCES =
MOSTLYCLEANFILES =
EXTRA_DIST = configure.ac
@@ -32,67 +30,74 @@ AM_CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/libltdl
AM_LDFLAGS = -no-undefined
VERSION_INFO = -version-info 6:0:0
-pkgincludedir = $(includedir)/libltdl
+noinst_LTLIBRARIES = $(LT_DLLOADERS)
if INSTALL_LTDL
-include_HEADERS = ltdl.h
-pkginclude_HEADERS = libltdl/lt_system.h libltdl/lt_error.h \
+nobase_include_HEADERS = ltdl.h \
+ libltdl/lt_system.h libltdl/lt_error.h \
libltdl/lt_dlloader.h
lib_LTLIBRARIES = libltdl.la
endif
if CONVENIENCE_LTDL
-noinst_LTLIBRARIES = libltdlc.la
+noinst_LTLIBRARIES += libltdlc.la
endif
-libltdl_la_SOURCES = ltdl.c ltdl.h \
- lt_error.c libltdl/lt_error.h \
+## !!NOTE!! Be sure to update ../Makefile.am:ltdldatafiles if you
+## make any changes here:
+libltdl_la_SOURCES = libltdl/lt__alloc.h \
+ libltdl/lt__dirent.h \
+ libltdl/lt__glibc.h \
libltdl/lt__private.h \
libltdl/lt__strl.h \
+ libltdl/lt_dlloader.h \
+ libltdl/lt_error.h \
libltdl/lt_system.h \
- lt__alloc.c libltdl/lt__alloc.h \
- libltdl/lt__glibc.h \
- libltdl/lt__dirent.h \
- slist.c libltdl/slist.h \
- lt_dlloader.c libltdl/lt_dlloader.h loaders/preopen.c
+ libltdl/slist.h \
+ loaders/preopen.c \
+ lt__alloc.c \
+ lt_dlloader.c \
+ lt_error.c \
+ ltdl.c ltdl.h \
+ slist.c
libltdl_la_CPPFLAGS = -DLTDLOPEN=libltdl $(AM_CPPFLAGS)
libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(VERSION_INFO) $(LT_DLPREOPEN)
libltdl_la_LIBADD = $(LTLIBOBJS)
+libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(LTLIBOBJS)
libltdlc_la_SOURCES = $(libltdl_la_SOURCES)
libltdlc_la_CPPFLAGS = -DLTDLOPEN=libltdlc $(AM_CPPFLAGS)
libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
libltdlc_la_LIBADD = $(libltdl_la_LIBADD)
+libltdlc_la_DEPENDENCIES= $(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 = dlopen.la dld_link.la dyld.la load_add_on.la \
+ loadlibrary.la shl_load.la
+
+dlopen_la_SOURCES = loaders/dlopen.c
+dlopen_la_LDFLAGS = -module -avoid-version
+dlopen_la_LIBADD = $(LIBADD_DLOPEN)
+
+dld_link_la_SOURCES = loaders/dld_link.c
+dld_link_la_LDFLAGS = -module -avoid-version
+dld_link_la_LIBADD = -ldld
+
+dyld_la_SOURCES = loaders/dyld.c
+dyld_la_LDFLAGS = -module -avoid-version
+
+load_add_on_la_SOURCES = loaders/load_add_on.c
+load_add_on_la_LDFLAGS = -module -avoid-version
+
+loadlibrary_la_SOURCES = loaders/loadlibrary.c
+loadlibrary_la_LDFLAGS = -module -avoid-version
-## These are installed as a subdirectory of pkgdatadir so that
-## libtoolize --ltdl can find them later:
-ltdldatadir = $(pkgvdatadir)/libltdl
-ltdldatafiles = COPYING.LIB README \
- Makefile.am Makefile.in \
- configure.ac configure \
- $(libltdl_la_SOURCES) \
- lt__dirent.c libltdl/lt__dirent.h \
- lt__strl.c libltdl/lt__strl.h \
- argz_.h argz.c \
- loaders/Makefile.am loaders/Makefile.in \
- loaders/dld_link.c \
- loaders/dlopen.c \
- loaders/dyld.c \
- loaders/load_add_on.c \
- loaders/loadlibrary.c \
- loaders/shl_load.c
-
-## To avoid spurious reconfiguration when the user installs these files
-## with libtoolize, we have to preserve their timestamps carefully:
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
- ( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
- | ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
-
-## This rule is used by the top Makefile.am to get the list of ltdl
-## files that libtoolize will use to implement 'libtoolize --ltdl':
-show-ltdldatafiles:
- @echo "$(ltdldatafiles)"
+shl_load_la_SOURCES = loaders/shl_load.c
+shl_load_la_LDFLAGS = -module -avoid-version
+shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
## Make sure these will be cleaned even when they're not built by default:
CLEANFILES = libltdl.la libltdlc.la libdlloader.la
diff --git a/m4/ltdl.m4 b/m4/ltdl.m4
index c7ac88b9..1cd27104 100644
--- a/m4/ltdl.m4
+++ b/m4/ltdl.m4
@@ -448,7 +448,7 @@ LT_DLPREOPEN=
if test -n "$LT_DLLOADERS"
then
for lt_loader in $LT_DLLOADERS; do
- LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen loaders/$lt_loader "
+ LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
done
AC_DEFINE([HAVE_LIBDLLOADER], [1],
[Define if libdlloader will be built on this platform])