From: Peter O'Gorman Date: Wed, 10 Sep 2003 15:13:36 +0000 (+0000) Subject: * mdemo2/configure.ac: Use AC_LIBTOOL_DLOPEN. X-Git-Tag: help~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35929a5312e12da91128533fe1066d1545876f79;p=thirdparty%2Flibtool.git * mdemo2/configure.ac: Use AC_LIBTOOL_DLOPEN. * mdemo2/main.c: Use LTDL_SET_PRELOADED_SYMBOLS(). * mdemo2/Makefile.am: Set INCLUDES properly and add -dlopen force to make sure the symbols file is included in the link line. --- diff --git a/ChangeLog b/ChangeLog index ca093ff94..35deb68f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2003-09-10 Peter O'Gorman + * mdemo2/configure.ac: Use AC_LIBTOOL_DLOPEN. + * mdemo2/main.c: Use LTDL_SET_PRELOADED_SYMBOLS(). + * mdemo2/Makefile.am: Set INCLUDES properly and add -dlopen force + to make sure the symbols file is included in the link line. + * ltmain.in: Accept -framework for darwin and put it in dependency_libs. For non-installed .la's try to avoid having ./.libs/.libs/libfoo.so on the link line. diff --git a/mdemo2/Makefile.am b/mdemo2/Makefile.am index 332949535..92be306dc 100644 --- a/mdemo2/Makefile.am +++ b/mdemo2/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = no-dependencies foreign -INCLUDES = $(INCLTDL) +INCLUDES = -I../libltdl EXTRA_DIST = acinclude.m4 @@ -10,7 +10,7 @@ bin_PROGRAMS = mdemo2 mdemo2_static # Create a version of mdemo2 that links a library that does dlopen. mdemo2_SOURCES = main.c -mdemo2_LDFLAGS = -export-dynamic +mdemo2_LDFLAGS = -export-dynamic "-dlopen" force mdemo2_LDADD = ../mdemo/libmlib.la # Create a statically linked version of mdemo. diff --git a/mdemo2/configure.ac b/mdemo2/configure.ac index 9f7b3fd26..8efaf9b0c 100644 --- a/mdemo2/configure.ac +++ b/mdemo2/configure.ac @@ -42,6 +42,7 @@ AC_C_CONST ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## +AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) diff --git a/mdemo2/main.c b/mdemo2/main.c index b6bd75a0e..7e85a438c 100644 --- a/mdemo2/main.c +++ b/mdemo2/main.c @@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include +#include "ltdl.h" int main (argc, argv) @@ -28,11 +29,13 @@ main (argc, argv) int ret = 0; printf ("Welcome to GNU libtool mdemo2!\n"); - if (argc < 2) { fprintf (stderr, "usage: %s module [module...]\n", argv[0]); } +/* This must be called in the program to get the preloaded symbols */ + LTDL_SET_PRELOADED_SYMBOLS(); + ret = mlib_func(argc, argv); return ret;