+1999-02-18 Thomas Tanner <tanner@gmx.de>
+
+ * TODO: updated
+ * autogen: only libltdl needs autoheader
+ * doc/libtool.texi (link mode): documented -export-symbols-regex
+ and updated -export-symbols
+ * doc/libtool.texi (script contents): documented
+ always_export_symbols, export_symbols_cmd, exclude_expsyms,
+ include_expsyms, dlopen and dlopen_self
+ more detailed description of need_lib_prefix
+ * ltconfig.in: a "'" was missing in the default value
+ of export_symbols_cmd
+ * ltmain.in: implemented -export-symbols-regex
+
1999-02-17 Alexandre Oliva <oliva@dcc.unicamp.br>
* ltconfig.in: (freebsd2*, sunos4*, exclude_expsyms): exclude
* Inter-library dependencies should be fully tracked by libtool.
Reminded by Alexandre Oliva. This requires looking up installed
libtool libraries for transparent support.
+Thomas Tanner has a patch for this.
* Inter-library dependencies need to work for ltlibraries too.
Thomas Tanner has a patch for this.
* Alexandre Oliva suggests that we hardcode paths into libraries, as
well as binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'. Tim
Mooney wants the same thing.
+Thomas Tanner has a patch for this.
* Tom Lane adds that HP-UX's linker, at least (I've also found this on
AIX 4), distinguishes between global function and global variable
- libltdl documentation needs to be completed.
+- AC_PROG_LIBTOOL, AC_ENABLE/DISABLE_SHARED/STATIC, AC_LIBTOOL_DLOPEN
+ are not documented.
+
In the future:
**************
rm -f acinclude.m4
cp ../libtool.m4 acinclude.m4
aclocal
- autoheader
+ test "$sub" = libltdl && autoheader
automake --gnits --add-missing
autoconf
cd ..
@item -export-symbols @var{symfile}
Tells the linker to export only the symbols listed in @var{symfile}.
The symbol file should end in @samp{.sym} and must contain the name of one
-symbol per line. This option does not work for modules and is not
-supported on all platforms.
+symbol per line. This option has no effect on some platforms.
+By default all symbols are exported.
+
+@item -export-symbols-regex @var{regex}
+Same as @samp{-export-symbols}, except that only symbols matching
+the regular expression @var{regex} are exported.
By default all symbols are exported.
@item -L@var{libdir}
aren't defined in that library.
@end defvar
+@defvar always_export_symbols
+Whether libtool should automatically generate a list of exported symbols
+using @var{export_symbols_cmd} before linking an archive.
+Set to @samp{yes} or @samp{no}. Default is @samp{no}
+@end defvar
+
@defvar archive_cmds
@defvarx archive_expsym_cmds
@defvarx old_archive_cmds
Set to @samp{yes} or @samp{no}.
@end defvar
+@defvar dlopen
+Whether @code{dlopen} is supported on the platform.
+Set to @samp{yes} or @samp{no}.
+@end defvar
+
+@defvar dlopen_self
+Whether it is possible to @code{dlopen} the executable itself.
+Set to @samp{yes} or @samp{no}.
+@end defvar
+
@defvar echo
An @code{echo} program which does not interpret backslashes as an
escape character.
@end defvar
+@defvar exclude_expsyms
+List of symbols that should not be listed in the preloaded symbols.
+@end defvar
+
@defvar export_dynamic_flag_spec
Compiler link flag that allows a dlopened shared library to reference
symbols that are defined in the program.
@end defvar
+@defvar export_symbols_cmd
+Command to extract exported symbols from @var{libobjs} to the
+file @var{export_symbols}.
+@end defvar
+
@defvar finish_cmds
Commands to tell the dynamic linker how to find shared libraries in a
specific directory.
the system that libtool was configured for.
@end defvar
+@defvar include_expsyms
+List of symbols that must always be exported when using @var{export_symbols}.
+@end defvar
+
@defvar libext
The standard old archive suffix (normally "a").
@end defvar
Set to @samp{yes} or @samp{no}. By default, it is @samp{unknown}, which
means the same as @samp{yes}, but documents that we are not really sure
about it.
+@samp{yes} means that it is possible both to @code{dlopen} and to
+link against a library wihthout 'lib' prefix,
+i.e. it requires @var{hardcode_direct} to be @samp{yes}.
@end defvar
@defvar need_version
hardcode_shlibpath_var=unsupported
runpath_var=
always_export_symbols=no
-export_symbols_cmd="$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\' | sort | uniq > $export_symbols"
+export_symbols_cmd='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
# include_expsyms should be a list of space-separated symbols to be *always*
# included in the symbol list
include_expsyms=
dlprefiles=
export_dynamic=no
export_symbols=
+ export_symbols_regex=
generated=
hardcode_libdirs=
finalize_hardcode_libdirs=
;;
esac
;;
- exportsyms)
+ expsyms)
export_symbols="$arg"
if test ! -f "$arg"; then
$echo "$modename: symbol file \`$arg' does not exist"
prev=
continue
;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
release)
release="-$arg"
prev=
fi
;;
- -export-symbols)
- if test -n "$export_symbols"; then
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: cannot have more than one -exported-symbols"
exit 1
fi
- prev=exportsyms
+ if test "$arg" = "-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
continue
;;
fi
# Prepare the list of exported symbols
- if test "$always_export_symbols" = yes && test -z "$export_symbols"; then
- export_symbols="$objdir/$libname.exp"
- $run $rm $export_symbols
- $run eval "$export_symbols_cmd"
+ if test -z "$run" && test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ export_symbols="$objdir/$libname.exp"
+ $rm $export_symbols
+ eval cmd=\"$export_symbols_cmd\"
+ eval "$cmd"
+ if test -n "$export_symbols_regex"; then
+ egrep -e "$export_symbols_regex" "$export_symbols" > "$export_symbols"T
+ $mv "$export_symbols"T "$export_symbols"
+ fi
+ fi
fi
if test -n "$include_expsyms"; then
- $run $echo "X$include_expsyms" | $SP2NL >> $export_symbols
+ $run $echo "X$include_expsyms" | $SP2NL >> "$export_symbols"
fi
# Do each of the archive commands.