From a78b093478a36e5c052734036f4fe20cbe73b8a6 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 8 Mar 1999 17:40:42 +0000 Subject: [PATCH] * libltdl/Makefile.am, libltdl/configure.in, mdemo/Makefile.am: libltdl must not be renamed; if there's a problem with the install option, let's fix it, not just work around it by breaking code of users of the convenience library --- ChangeLog | 5 +++++ libltdl/Makefile.am | 19 +++++++++++-------- libltdl/configure.in | 5 ++++- mdemo/Makefile.am | 8 ++++---- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 703ca7bdc..740eca056 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1999-03-08 Alexandre Oliva + * libltdl/Makefile.am, libltdl/configure.in, mdemo/Makefile.am: + libltdl must not be renamed; if there's a problem with the install + option, let's fix it, not just work around it by breaking code of + users of the convenience library + * tests/build-relink.test: link broken libhello.la with at least one libtool object diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am index 9f7468ebd..472ab0510 100644 --- a/libltdl/Makefile.am +++ b/libltdl/Makefile.am @@ -10,18 +10,21 @@ else noinst_HEADERS = ltdl.h endif -EXTRA_LTLIBRARIES = libltdl.la - -lib_LTLIBRARIES = @LIBLIBS@ -noinst_LTLIBRARIES = libltdlc.la +noinst_LTLIBRARIES = libltdl.la libltdl_la_SOURCES = ltdl.c -libltdl_la_LDFLAGS = $(LTDL_VERSION) -rpath $(libdir) libltdl_la_LIBADD = $(LIBADD_DL) -libltdlc_la_SOURCES = $(libltdl_la_SOURCES) -libltdlc_la_LDFLAGS = -libltdlc_la_LIBADD = $(libltdl_la_LIBADD) +lib_LTLIBRARIES = @LIBLIBS@ +EXTRA_LTLIBRARIES = + +@TOINST@/libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES) + @test -d $(TOINST) || mkdir $(TOINST) + $(LINK) -o $@ $(libltdl_la_OBJECTS) \ + -rpath $(libdir) $(LTDL_VERSION) $(libltdl_la_LIBADD) + +distclean-local: + test -z $(TOINST) || rm -rf $(TOINST) libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck diff --git a/libltdl/configure.in b/libltdl/configure.in index d367f63a1..3785958af 100644 --- a/libltdl/configure.in +++ b/libltdl/configure.in @@ -6,11 +6,14 @@ AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE +TOINST=toinst +AC_SUBST(TOINST) + AC_ARG_ENABLE(ltdl-install, [--enable-ltdl-install install libltdl]) AM_CONDITIONAL(INSTALL_LTDL, test x$enable_ltdl_install = xyes) if test x$enable_ltdl_install = xyes; then - LIBLIBS=libltdl.la + LIBLIBS=$TOINST/libltdl.la else LIBLIBS= fi diff --git a/mdemo/Makefile.am b/mdemo/Makefile.am index 53aa49554..e2b62f446 100644 --- a/mdemo/Makefile.am +++ b/mdemo/Makefile.am @@ -18,9 +18,9 @@ noinst_HEADERS = foo.h bin_PROGRAMS = mdemo mdemo.static -../libltdl/libltdlc.la: ../libtool ../libltdl/libtool \ +../libltdl/libltdl.la: ../libtool ../libltdl/libtool \ $(srcdir)/../libltdl/ltdl.c $(srcdir)/../libltdl/ltdl.h - (cd ../libltdl; $(MAKE) libltdlc.la) + (cd ../libltdl; $(MAKE) libltdl.la) # Without the following line, the check may fail if libltdl/libtool is # removed after libltdl is configured ../libltdl/libtool: @@ -30,9 +30,9 @@ mdemo_SOURCES = main.c mdemo_LDFLAGS = -export-dynamic ## FIXME: remove this when libtool and libltdl ## handle dependencies of modules ## The quotes around -dlopen below fool automake into accepting it -mdemo_LDADD = ../libltdl/libltdlc.la "-dlopen" self \ +mdemo_LDADD = ../libltdl/libltdl.la "-dlopen" self \ "-dlopen" foo1.la "-dlopen" libfoo2.la -mdemo_DEPENDENCIES = ../libltdl/libltdlc.la foo1.la libfoo2.la +mdemo_DEPENDENCIES = ../libltdl/libltdl.la foo1.la libfoo2.la # Create a statically linked version of mdemo. mdemo_static_SOURCES = $(mdemo_SOURCES) -- 2.47.3