+1999-01-10 Thomas Tanner <tanner@gmx.de>
+
+ * ltmain.in: define dld_preloaded_symbols if at least one of
+ -export-dynamic, -dlopen or -dlpreopen was specified,
+ do not include program objects in the symbol list
+ if -export-dynamic was not enabled
+ * libltdl/ltdl.c: limit symbols to max. 256 bytes
+ * mdemo/Makefile.am: build libltdl in a subdirectory,
+ do not use -export-dynamic for mdemo and mdemo.debug
+ * tests/mdemo-conf.test,tests/mdemo-make.test,tests/mdemo-inst.test:
+ do not check for libltdl
+
1999-01-09 Alexandre Oliva <oliva@dcc.unicamp.br>
* libltdl/ltdl.c (lt_dlopen): missing strlen in bound test
return 0;
}
-#define MAX_SYMBOL_LENGTH 128
+#define MAX_SYMBOL_LENGTH 256
lt_ptr_t
lt_dlsym (handle, symbol)
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
fi
- if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then
+ if test "$export_dynamic" = yes || test -n "$dlfiles$dlprefiles" && test -n "$NM" && test -n "$global_symbol_pipe"; then
dlsyms="${outputname}S.c"
else
dlsyms=
case "$dlsyms" in
"") ;;
*.c)
- if test -z "$export_symbols"; then
+ if test "$export_dynamic" = yes && test -z "$export_symbols"; then
# Add our own program objects to the preloaded list.
dlprefiles=`$echo "X$objs $dlprefiles" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
fi
/* External symbol declarations for the compiler. */\
"
- if test -n "$export_symbols"; then
+ if test "$export_dynamic" = yes && test -n "$export_symbols"; then
sed -e 's/^\(.*\)/\1 \1/' < "$export_symbols" > "$nlist"
fi
done
if test -z "$run"; then
- # Make sure we at least have an empty file.
+ # Make sure we have at least an empty file.
test -f "$nlist" || : > "$nlist"
# Try sorting and uniquifying the output.
{\
"
- if test -n "$export_symbols"; then
+ if test "$export_dynamic" = yes && test -n "$export_symbols"; then
echo >> "$output_objdir/$dlsyms" "\
{\"${output}\", (lt_ptr_t) 0},"
sed 's/^\(.*\)/ {"\1", (lt_ptr_t) \&\1},/' < "$export_symbols" >> "$output_objdir/$dlsyms"
exit 1
;;
esac
- elif test "$export_dynamic" != yes; then
- test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
else
# We keep going just in case the user didn't refer to
# dld_preloaded_symbols. The linker will fail if global_symbol_pipe
EXTRA_DIST = acinclude.m4
+# A little hack to build libltdl in a subdirectory
+libltdl/libltdl.la:
+ -mkdir $(top_builddir)/libltdl
+ (here=`pwd` && cd $(top_builddir)/libltdl && \
+ $$here/../libltdl/configure --srcdir=$$here/../libltdl && \
+ $(MAKE) all)
+
+distclean-local:
+ -rm -rf $(top_builddir)/libltdl
+
lib_LTLIBRARIES = libfoo1.la libfoo2.la
libfoo1_la_SOURCES = foo1.c
# Create a version of mdemo that does dlopen.
mdemo_SOURCES = main.c
-mdemo_LDADD = ../libltdl/libltdl.la \
+mdemo_LDADD = libltdl/libltdl.la \
$(LIBADD_M) # We won't need this when libltdl takes care of dependencies
-mdemo_LDFLAGS = -export-dynamic -dlopen libfoo1.la -dlopen libfoo2.la
-mdemo_DEPENDENCIES = ../libltdl/libltdl.la libfoo1.la libfoo2.la
+mdemo_LDFLAGS = -dlopen libfoo1.la -dlopen libfoo2.la
+mdemo_DEPENDENCIES = libltdl/libltdl.la libfoo1.la libfoo2.la
# Create an easier-to-debug version of mdemo.
mdemo_debug_SOURCES = main.c
-mdemo_debug_LDADD = ../libltdl/libltdl.la
-mdemo_debug_LDFLAGS = -static -export-dynamic \
- -dlopen libfoo1.la -dlopen libfoo2.la
-mdemo_debug_DEPENDENCIES = ../libltdl/libltdl.la libfoo1.la libfoo2.la
+mdemo_debug_LDADD = libltdl/libltdl.la
+mdemo_debug_LDFLAGS = -static -dlopen libfoo1.la -dlopen libfoo2.la
+mdemo_debug_DEPENDENCIES = libltdl/libltdl.la libfoo1.la libfoo2.la
fi
. $srcdir/defs || exit 1
-# Maybe we have a VPATH build, in which case, create a new subdir.
-test -d ../libltdl || mkdir ../libltdl
-
-# Change to our build directory.
-cd ../libltdl || exit 1
-
-# Possibly clean up the distribution.
-if test -f Makefile; then
- echo "= Running $make distclean in ../libltdl"
- $make distclean
-fi
-rm -f config.cache
-
-# Configure libltdl.
-echo "= Configuring in ../libltdl (prefix=$prefix)"
-CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../libltdl/configure --srcdir=$srcdir/../libltdl --prefix=$prefix || exit 1
-
# Maybe we have a VPATH build, in which case, create a new subdir.
test -d ../mdemo || mkdir ../mdemo
exit 1
fi
-# Check that things are built.
-if test -f ../libltdl/libltdl.la; then :
-else
- echo "You must build libltdl before $0" 1>&2
- exit 1
-fi
-
# Change to our build directory.
cd ../mdemo || exit 1
fi
. $srcdir/defs || exit 1
-if test -f ../libltdl/Makefile && test -f ../mdemo/Makefile; then :
+if test -f ../mdemo/Makefile; then :
else
echo "You must run mdemo-conf.test before running $0" 1>&2
exit 1
fi
-# Change to our build directory.
-cd ../libltdl || exit 1
-
-# Do the actual build.
-echo "Making in ../libltdl"
-$make || exit 1
-
# Change to our build directory.
cd ../mdemo || exit 1