From 0506cf492e7643ed4b62afecea42ebb45421003f Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 21 Jan 1999 04:09:39 +0000 Subject: [PATCH] * demo/configure.in: set DLPREOPEN to -dlopen if we don't have shared libraries * demo/Makefile.am (DLPREOPEN): use instead of -dlpreopen (STATIC): use $(STATIC), not @STATIC@ * mdemo/Makefile.am (STATIC): ditto * demo/Makefile.am, mdemo/Makefile.am (STATIC): do not use --- ChangeLog | 8 +++++++- demo/Makefile.am | 4 ++-- demo/configure.in | 3 +++ mdemo/Makefile.am | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03360e8a6..7f2bb194a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,16 @@ 1999-01-21 Alexandre Oliva + * demo/configure.in: set DLPREOPEN to -dlopen if we don't have + shared libraries + * demo/Makefile.am (DLPREOPEN): use instead of -dlpreopen + (STATIC): use $(STATIC), not @STATIC@ + * mdemo/Makefile.am (STATIC): ditto + * tests/demo-shared.test, tests/demo-static.test: new tests * tests/mdemo-shared.test, tests/mdemo-static.test: ditto * tests/Makefile.am: ditto * doc/libtool.texi: document them - * demo/Makefile.am, mdemo/Makefile.am (@STATIC@): do not use + * demo/Makefile.am, mdemo/Makefile.am (STATIC): do not use -static unconditionally, it can't work with --disable-static * demo/configure.in, mdemo/configure.in: check whether libtool was configured to build static libraries and, if not, set STATIC to an diff --git a/demo/Makefile.am b/demo/Makefile.am index 7cf94b32f..b561d9df8 100644 --- a/demo/Makefile.am +++ b/demo/Makefile.am @@ -29,13 +29,13 @@ hell_LDADD = libhello.la # Create an easier-to-debug version of hell. hell_debug_SOURCES = main.c hell_debug_LDADD = libhello.la -hell_debug_LDFLAGS = @STATIC@ +hell_debug_LDFLAGS = $(STATIC) if BINARY_HELLDL # Create a version of hell that does a preloaded dlopen. helldl_SOURCES = dlmain.c -helldl_LDFLAGS = -export-dynamic -dlpreopen libhello.la +helldl_LDFLAGS = -export-dynamic $(DLPREOPEN) libhello.la helldl_DEPENDENCIES = libhello.la else diff --git a/demo/configure.in b/demo/configure.in index e0fac772d..8f99a3eb4 100644 --- a/demo/configure.in +++ b/demo/configure.in @@ -9,10 +9,13 @@ AM_PROG_LIBTOOL if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then STATIC=-static + DLPREOPEN=-dlpreopen else STATIC= + DLPREOPEN=-dlopen fi AC_SUBST(STATIC) +AC_SUBST(DLPREOPEN) AM_CONDITIONAL(BINARY_HELLDL, [dnl grep '^global_symbol_pipe=..*$' ./libtool >/dev/null]) diff --git a/mdemo/Makefile.am b/mdemo/Makefile.am index b56c2ecaa..a5675a418 100644 --- a/mdemo/Makefile.am +++ b/mdemo/Makefile.am @@ -32,6 +32,6 @@ mdemo_DEPENDENCIES = ../libltdl/libltdlc.la foo1.la libfoo2.la # Create an easier-to-debug version of mdemo. mdemo_debug_SOURCES = $(mdemo_SOURCES) -mdemo_debug_LDFLAGS = @STATIC@ $(mdemo_LDFLAGS) +mdemo_debug_LDFLAGS = $(STATIC) $(mdemo_LDFLAGS) mdemo_debug_LDADD = $(mdemo_LDADD) mdemo_debug_DEPENDENCIES = $(mdemo_DEPENDENCIES) -- 2.47.2