* 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
This commit is contained in:
Alexandre Oliva 1999-01-21 04:09:39 +00:00 committed by Alexandre Oliva
parent 6593e3f41e
commit 0506cf492e
4 changed files with 13 additions and 4 deletions

View File

@ -1,10 +1,16 @@
1999-01-21 Alexandre Oliva <oliva@dcc.unicamp.br>
* 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

View File

@ -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

View File

@ -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])

View File

@ -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)