]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* mdemo2/configure.ac: Use AC_LIBTOOL_DLOPEN.
authorPeter O'Gorman <peter@pogma.com>
Wed, 10 Sep 2003 15:13:36 +0000 (15:13 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 10 Sep 2003 15:13:36 +0000 (15:13 +0000)
* 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.

ChangeLog
mdemo2/Makefile.am
mdemo2/configure.ac
mdemo2/main.c

index ca093ff949b42f89a529998a1aedd0da5be21835..35deb68f4d65b2908ac51f1dfd588fa3be0cb514 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2003-09-10  Peter O'Gorman  <peter@pogma.com>
 
+       * 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.
index 332949535e9721e78cab3cc67614738737339c63..92be306dce42f0e610cec0ff487debdd5be86f44 100644 (file)
@@ -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.
index 9f7b3fd26707dffcde4cf78fdc4506b7360da431..8efaf9b0c158c5869804c389eff14921f1f72f36 100644 (file)
@@ -42,6 +42,7 @@ AC_C_CONST
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
+AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
 
index b6bd75a0efd2850f513a16fe4e549fff91f0fcb5..7e85a438cfd108cb72759fd793f9a93f005f1cc1 100644 (file)
@@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 USA. */
 
 #include <stdio.h>
+#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;