]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* mdemo/Makefile.am (mdemo_LDFLAGS, mdemo_LDADD): moved -dlopen
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Tue, 19 Jan 1999 23:45:01 +0000 (23:45 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 19 Jan 1999 23:45:01 +0000 (23:45 +0000)
flags to LDADD
* doc/libtool.texi (Using Automake): how to add -dlopen to LDADD

ChangeLog
doc/libtool.texi
mdemo/Makefile.am

index 1e96f0fe362ab06916a7e15a44f907bfca43a1cf..91b3cf39baaf6e5262881fe7de7be8fd18fea969 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1999-01-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * mdemo/Makefile.am (mdemo_LDFLAGS, mdemo_LDADD): moved -dlopen
+       flags to LDADD
+       * doc/libtool.texi (Using Automake): how to add -dlopen to LDADD
+
 1999-01-19  Gary V. Vaughan  <gvaughan@oranda.demon.co.uk>
 
        From Andrey Slepuhin <pooh@msu.ru>
index 1be7d068c0e8faeb63e7fee5f57a58de5fbd121c..0953acc954e6d73d564d58ab1942b4abfc48c4f6 100644 (file)
@@ -1373,6 +1373,36 @@ hell_debug_LDADD = libhello.la
 hell_debug_LDFLAGS = -static
 @end example
 
+The flags @samp{-dlopen} or @samp{-dlpreopen} (@pxref{Link mode}) would
+fit better in the @var{program_LDADD} variable.  Unfortunately, GNU
+automake, up to release 1.4, doesn't accept these flags in a
+@var{program_LDADD} variable, so you have the following alternatives:
+
+@itemize @bullet
+@item
+add them to @var{program_LDFLAGS}, and optionally list the libraries in
+@var{program_DEPENDENCIES}, then wait for a release of GNU automake that
+accepts these flags where they belong;
+
+@item
+surround the flags between quotes, but then you must set
+@var{program_DEPENDENCIES} too:
+
+@example
+program_LDADD = "-dlopen" libfoo.la
+program_DEPENDENCIES = libfoo.la
+@end example
+
+@item
+set and @samp{AC_SUBST} variables @var{DLOPEN} and @var{DLPREOPEN} in
+@file{configure.in} and use @samp{@@DLOPEN@@} and @samp{@@DLPREOPEN@@}
+instead of @samp{-dlopen} and @samp{-dlpreopen} in
+@samp{program_LDADD}.  Automake will discard @samp{AC_SUBST}ed variables 
+from dependencies, so it will behave exactly as we expect it to behave
+when it accepts these flags in @samp{program_LDADD}.  But hey!, this is
+ugly!
+@end itemize
+
 You may use the @samp{program_LDFLAGS} variable to stuff in any flags
 you want to pass to libtool while linking @samp{program} (such as
 @samp{-static} to avoid linking uninstalled shared libtool libraries).
@@ -1622,11 +1652,12 @@ and, to @file{Makefile.in} or @file{Makefile.am}:
 @example
 LIBTOOL_DEPS = @@LIBTOOL_DEPS@@
 libtool: $(LIBTOOL_DEPS)
-        ./config.status --recheck
+        $(SHELL) ./config.status --recheck
 @end example
 
 If you are using GNU automake, you can omit the assignment, as automake
-will take care of it.
+will take care of it.  You'll obviously have to create some dependency
+on @file{libtool}.
 
 @end defmac
 
index 228943c3b4c0d024848e2f939714894d207ccdbb..31600e7a25305ad405c64bdf50606fcc8b3f7aef 100644 (file)
@@ -24,14 +24,14 @@ bin_PROGRAMS = mdemo mdemo.debug
 
 # Create a version of mdemo that does dlopen.
 mdemo_SOURCES = main.c
-mdemo_LDADD = ../libltdl/libltdlc.la
-mdemo_LDFLAGS = -dlopen foo1.la -dlopen libfoo2.la \
-       -export-dynamic ## FIXME: remove this when libtool and libltdl
+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" foo1.la "-dlopen" libfoo2.la
 mdemo_DEPENDENCIES = ../libltdl/libltdlc.la foo1.la libfoo2.la
 
 # Create an easier-to-debug version of mdemo.
 mdemo_debug_SOURCES = $(mdemo_SOURCES)
-mdemo_debug_LDADD = $(mdemo_LDADD)
 mdemo_debug_LDFLAGS = -static $(mdemo_LDFLAGS)
+mdemo_debug_LDADD = $(mdemo_LDADD)
 mdemo_debug_DEPENDENCIES = $(mdemo_DEPENDENCIES)