* 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.
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.
AUTOMAKE_OPTIONS = no-dependencies foreign
-INCLUDES = $(INCLTDL)
+INCLUDES = -I../libltdl
EXTRA_DIST = acinclude.m4
# 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.
## ----------------------- ##
## Libtool initialisation. ##
## ----------------------- ##
+AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
USA. */
#include <stdio.h>
+#include "ltdl.h"
int
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;