Commit Graph

592 Commits

Author SHA1 Message Date
Ralf Wildenhues
b8b793325e * libltdl/Makefile.inc: Fix the file description, so that it
matches recursive and nonrecursive libltdl setup.
* Makefile.am ($(srcdir)/libltdl/Makefile.am): Do not depend
upon the exact text of the copyright header, just copy until
the marker line.  Remove the marker lines in the output, and
adjust the description for subpackage setup.
2007-02-27 21:59:33 +00:00
Gary V. Vaughan
7367171ad0 * HACKING, Makefile.am, Makefile.maint, bootstrap,
libltdl/Makefile.am, libltdl/Makefile.inc, libltdl/m4/libtool.m4,
ltmain.c, tests/cdemo/Makefile.am, tests/demo/Makefile.am,
tests/depdemo/Makefile.am, tests/depdemo/l1/Makefile.am,
tests/depdemo/l2/Makefile.am, tests/depdemo/l3/Makefile.am,
tests/depdemo/l4/Makefile.am, tests/f77demo/Makefile.am,
tests/fcdemo/Makefile.am, tests/libtoolize.at,
tests/mdemo/Makefile.am, tests/mdemo2/Makefile.am,
tests/pdemo/Makefile.am, tests/tagdemo/Makefile.am: Update
Copyright notice text to include URL for canonical GPL document.
2007-02-26 07:44:25 +00:00
Ralf Wildenhues
a0cd232cc1 * doc/libtool.texi (LT_INIT): Fix wording of intro a bit.
<shared, static>: Also describe these default LT_INIT options.
<AC_LIBTOOL_DLOPEN, AC_LIBTOOL_WIN32_DLL>
<AC_DISABLE_FAST_INSTALL>: Mention deprecated macro names,
including the respective LT_INIT replacement.
<AC_DISABLE_SHARED, AC_DISABLE_STATIC, AC_ENABLE_SHARED>
<AC_ENABLE_STATIC>: Document, un-deprecate.  Suggest the
respective LT_INIT replacement.
<AM_DISABLE_SHARED, AM_DISABLE_STATIC, AM_ENABLE_SHARED>
<AM_ENABLE_STATIC>: Document deprecated aliases.
(Distributing libltdl) <AC_WITH_LTDL, AC_LIBLTDL_INSTALLABLE>
<AC_LIBLTDL_CONVENIENCE>: Document deprecated aliases.
* libltdl/m4/ltoptions.m4 (AM_ENABLE_SHARED, AM_DISABLE_SHARED)
(AM_ENABLE_STATIC, AM_DISABLE_STATIC): Make these AU_ALIASes of
the respective AC_* macros, so we do not recommend LT_INIT(*) in
this case.
(AC_ENABLE_SHARED, AC_DISABLE_SHARED, AC_ENABLE_STATIC)
(AC_DISABLE_STATIC): Un-deprecate these.  Remove now-superfluous
aclocal-1.4 backwards compatibility comments.
2007-02-24 08:52:13 +00:00
Ralf Wildenhues
265432e423 Fix -export-symbols and -export-symbols-regex for links that
exceed the command line length and use convenience archives.

* libltdl/config/ltmain.m4sh (func_mode_link): Avoid grepping a
nonexistent file if using reloadable objects.  Do not create a
linker script nor a linker input file if no objects are passed.
Apply export_symbols_regex in case the command line length is
exceeded.
2007-02-23 21:52:50 +00:00
Ralf Wildenhues
b3709c2f9d * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
<compiler_needs_object>: New tag variable.  Default to `no'.
(_LT_LINKER_SHLIBS) [ linux ]: Set it to yes for Sun C 5.9.
(_LT_LANG_CXX_CONFIG): Also default it to `no'.
[ linux ]: Set it to `yes' for Sun C++ 5.9.
* libltdl/config/ltmain.m4sh (func_mode_link): If we link
no objects but only convenience archives into a library,
force expansion if `compiler_needs_object' is yes.
For creating a linker input filelist due to long cmdline,
extract the first object if `compiler_needs_object' is yes.
* doc/libtool.texi (libtool script contents): Document it.
Fixes test failures of Sun compilers on GNU/Linux.
Report by Terry D. Dontje.
2007-02-23 21:11:25 +00:00
Ralf Wildenhues
8ef9778c39 * libltdl/config/ltmain.m4sh (func_mode_link): Avoid setting
`$libobjs' to a single space; set it to empty in that case.
2007-02-23 20:43:50 +00:00
Ralf Wildenhues
c4028959cf * libltdl/config/ltmain.m4sh (func_generate_dlsyms) [ osf5 ]:
On Tru64 5.1, const relocations do not work well.  Omit the
const here.  Fixes failure of demo-make after demo-shared with
link editor error `seg_info_ptr: Couldnt find a seg type 2'.
2007-02-23 19:45:42 +00:00
Ralf Menzel
3fa76ea860 * libltdl/config/general.m4sh (sed_double_backslash): Fix
hacky sed script to avoid limitations but retain portability to
Solaris /bin/sed.  Remove old obsolete cruft.
2007-02-23 18:18:34 +00:00
Ralf Wildenhues
14e51abfa8 * libltdl/config/ltmain.m4sh (func_mode_link): Fix the check for
convenience archives when warning about linking against static
libraries: test against $deplib rather than empty $lib.
2007-02-22 19:53:14 +00:00
Ralf Wildenhues
82b619a320 * libltdl/m4/ltdl.m4 (LT_WITH_LTDL): Fix detection of new enough
libltdl by actually checking for the declaration of
lt_dlinterface_register in ltdl.h with AC_CHECK_DECL.
Remove redundant configure output line.
2007-02-19 09:10:32 +00:00
Ralf Wildenhues
1fb049828e * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [ linux |
k*bsd*-gnu ]: Fix eval quoting in the DT_RUNPATH test.
2007-02-17 15:15:23 +00:00
Ralf Wildenhues
d747b79187 * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [ linux ]
<whole_archive_flag_spec>: For Sun C/C++ 5.9, do not add
/dev/null as dummy object, it fails with GNU ld version
2.16.91.0.7-amd-sles9.  Report by Terry D. Dontje.
* THANKS: Update.
2007-02-17 08:22:59 +00:00
Ralf Wildenhues
79e33032b4 * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [ osf4, osf5 ]
<archive_expsym_cmds>: Use `${wl}-input' not `-input', for
cc.  Could use `-input_to_ld'.
(_LT_LANG_CXX_CONFIG) [ osf4, osf5 ] <archive_expsym_cmds>:
Use `${wl}' instead of `-Wl,', for consistency.
2007-02-14 18:55:24 +00:00
Ralf Wildenhues
19f9aabf89 * libltdl/config/ltmain.m4sh: Remove duplicate marker for
generated shell functions.
2007-02-12 19:57:24 +00:00
Ralf Wildenhues
0891f8ccc9 * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): New substituted
function `func_lo2o', saving two fork&exec with XSI shells.
* libltdl/config/ltmain.m4sh (func_mode_compile)
(func_mode_install, func_mode_link): Use it for rewrites of
single files.
2007-02-11 16:22:42 +00:00
Ralf Wildenhues
9ebe7b436b * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): New function
func_opt_split, for XSI and portable shell.
* libltdl/config/ltmain.m4sh: Move the insertion point for the
configure-generated shell functions to before the first option
parsing loop.  Rewrite the separation of the long options to use
func_opt_split.
2007-02-11 16:19:09 +00:00
Ralf Wildenhues
f3186c9c01 Eliminate roughly a third of the script execution time overhead
for all modes except for link/relink and uninstall/clean.

* libltdl/m4/libtool.m4 (_LT_CONFIG): Remove unused `TEST SUITE
MARKER', obsolete since 2005-04-17.
* libltdl/config/ltmain.m4sh: Likewise, several instances.
(Main): Tear apart, moving individual bits up as early in the
script as possible, to help the shell to avoid parsing the rest.
2007-02-11 16:16:38 +00:00
Ralf Wildenhues
8faf59a421 * libltdl/config/general.m4sh (sed_double_backslash): Replace
POSIX sed script with a hack that treats up to 10 backslashes
in the input correctly and is portable to Solaris /bin/sed.
2007-02-11 11:07:08 +00:00
Ralf Wildenhues
713a03c4de * libltdl/ltdl.c (lt_dlexit): Add casts to fix compilation with
C++ compiler again.
2007-02-06 19:00:50 +00:00
Ralf Wildenhues
afd4429046 * libltdl/m4/libtool.m4 (_LT_COMPILER_BOILERPLATE)
(_LT_LINKER_BOILERPLATE, _LT_SYS_MODULE_PATH_AIX)
(_LT_COMPILER_C_O): Require _LT_DECL_SED.
* THANKS: Update.
Report by Maciej W. Rozycki.
2007-02-05 19:40:18 +00:00
Samuel Thibault
f219156ee1 * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [ gnu ]
<archive_expsym_cmds>: Behave like Linux, so that
--version-script is used for Hurd as well.
2007-01-29 19:51:19 +00:00
Brian W. Barrett
95e4b2aef7 * libltdl/config/ltmain.m4sh [darwin]: Use otool64 if otool fails. 2007-01-28 15:13:25 +00:00
Dave Brolley
afa7deb340 * libltdl/ltdl.c (lt_dlexit): Make sure that 'cur' is not NULL
before checking that it is still in the list.
* tests/lt_dlexit.at: New test.
* Makefile.am (TESTSUITE_AT): Adjust.
(check-local): Also depend on libltdl/libltdlc.la.
(check-recursive): Removed, unnecessary use of Automake
internals.
2007-01-28 14:55:01 +00:00
Mike Frysinger
b7a0f78052 * libltdl/config/ltmain.m4sh (func_mode_link): Pass through
`-p' and `-fprofile-*' for GCC.
2007-01-28 14:18:59 +00:00
Ralf Wildenhues
bb9ec35b3c * libltdl/libltdl/lt_system.h: Adjust copyright years. 2007-01-28 13:40:25 +00:00
Charles Wilson
a08ebfdf40 * libltdl/libltdl/lt__private.h (LT_GLOBAL_DATA) [__CYGWIN__]:
Also define on Cygwin.
* libltdl/libltdl/lt_system.h (LT_SCOPE) [__CYGWIN__]: Likewise.
2007-01-28 13:33:27 +00:00
Ralf Wildenhues
f8bc8895c4 * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [ cygwin, mingw ]
<export_symbols_cmds>: Avoid shell expansion of '/s/.*' through
double expansion, in case there is a 'S:' drive.
Report by Charles Wilson.
2007-01-28 13:03:47 +00:00
Ralf Wildenhues
baf8599e6f Assume C89 for included headers, and throughout the testsuite.
* NEWS: Update.
* libltdl/argz.c: Do not include strings.h nor memory.h, include
string.h unconditionally.
Patch by Simon Josefsson <jas@extundo.com>.
* libltdl/libltdl/lt__private.h: Likewise.
* libltdl/m4/ltdl.m4 (LTDL_INIT): Do not check for string.h,
strings.h, memory.h.
* tests/cdemo/configure.ac: Assume presence of math.h.
* tests/cdemo/foo.c: Likewise.
* tests/demo/configure.ac: Likewise for math.h, string.h.
Assume 'const'.  Drop obsolete AC_EXEEXT.
* tests/demo/dlmain.c: Likewise.
* tests/demo/foo.c: Likewise.
* tests/depdemo/configure.ac: Likewise.
* tests/depdemo/l4/l4.c: Likewise.
* tests/f77demo/configure.ac: Likewise.  Also drop obsolete
AC_OBJEXT.
* tests/fcdemo/configure.ac: Likewise.
* tests/mdemo/configure.ac: Likewise.
* tests/mdemo/foo1.c: Likewise.
* tests/mdemo/foo2.c: Likewise.
* tests/mdemo2/configure.ac: Likewise.
* tests/pdemo/configure.ac: Likewise.
* tests/pdemo/longer_file_name_dlmain.c:
* tests/pdemo/longer_file_name_foo.c: Likewise.
* tests/pdemo/longer_file_name_foo2.c: Likewise.
* tests/tagdemo/configure.ac: Likewise.
* tests/tagdemo/foo.cpp: Likewise.
2007-01-27 16:45:40 +00:00
Ralf Wildenhues
af00446d40 * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin, mingw]:
Use `lib -OUT' rather than `lib /OUT' to avoid MSYS path
translation mangling.  Report by Christopher Hulbert.
* THANKS: Update.
2007-01-21 16:15:36 +00:00
Ralf Wildenhues
4d8e7a3784 * libltdl/config/ltmain.m4sh (func_mode_compile): Accept
suffixes matching `[fF][09].', for Fortran.
* tests/suffix.test: Also test F90, F95, f03, F03.
2007-01-21 14:57:58 +00:00
Ralf Wildenhues
8b77562fee Assume presence of a config header in all files, to provoke
test failures on all systems.
* libltdl/lt__alloc.c: Likewise.
* libltdl/libltdl/lt__dirent.h: Likewise.
* libltdl/libltdl/lt__glibc.h: Likewise.
* libltdl/libltdl/lt__private.h: Likewise.
* libltdl/libltdl/lt__strl.h: Likewise.
* tests/recursive.at: Use AC_CONFIG_HEADERS.
* tests/nonrecursive.at: Likewise.  Invoke autoheader.
* HACKING: Adjust.
Report by Patrick Welche.
2006-10-26 20:39:04 +00:00
Paul Eggert
a68608ef1f * doc/libtool.texi (Distributing libltdl): In recursive and
nonrecursive mode, a config header is now required.
* libltdl/argz.c: Remove check for HAVE_CONFIG_H, to conform
to gnulib's policy of including config.h unconditionally.
2006-10-24 20:33:38 +00:00
Peter O'Gorman
bd9ae5e61b * libltdl/config/ltmain.m4sh: Add -F* to flags that are passed
to the linker.
Reported by SIGOURE Benoit <sigoure.benoit@lrde.epita.fr>
2006-10-22 14:10:33 +00:00
Peter O'Gorman
a3440cbca2 * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Improve
multilib support.
Reported by Kate Minola <kate01123@gmail.com> and others.
2006-10-19 05:06:14 +00:00
Eric Blake
65e173f8cb * libltdl/ltdl.c (load_deplibs): Avoid memory leak on failure.
(unload_deplibs): Avoid memory leak on cleanup.
2006-10-13 14:11:18 +00:00
Ralf Wildenhues
997601f675 * libltdl/m4/libtool.m4 (func_mode_compile): Accept files with
extension `.f9?'.
* tests/suffix.test: Test `f95'.
2006-09-20 19:08:22 +00:00
Ralf Wildenhues
e6b8918f7e * libltdl/config/ltmain.m4sh (func_mode_uninstall): Use
`func_source' consistently.
2006-09-20 18:15:06 +00:00
Ralf Wildenhues
786ef35a4e * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [ linux ]
[k*bsd*-gnu ]: Fix brown paper bag: save and restore `libdir'.
2006-09-18 05:49:39 +00:00
Ralf Wildenhues
8f951c011f * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
[ openbsd ]: Set `hardcode_direct_absolute', to prefer rpath
over putting absolute file names in NEEDED entries.
* NEWS: Update.
Reported by Jake Meuser and others.
2006-09-17 19:30:15 +00:00
Ralf Wildenhues
a47ab0fc66 * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [ linux ]
[ k*bsd*-gnu ]: Test if ld sets DT_RUNPATH; in that case, set
shlib_overrides_runpath to `yes'.  Fixes test failure of new
test on Gentoo GNU/Linux.
2006-09-17 19:27:14 +00:00
Ralf Wildenhues
6ae279553a * libltdl/ltdl.c: Move LT__UNUSED before parameter name, for g++
3.2.3 (on MinGW).
* libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c: Likewise.
2006-09-04 17:43:37 +00:00
George Bosilca
8a17ccd68d Make libltdl work when compiled with a C++ compiler.
* libltdl/lt__alloc.c, libltdl/lt_dlloader.c, libltdl/ltdl.c,
libltdl/slist.c, libltdl/libltdl/lt__alloc.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/slist.h,
libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c, tests/stresstest.at,
tests/testsuite.at, tests/f77demo/foo.h, tests/fcdemo/foo.h,
tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c,
tests/mdemo/main.c: Allow sources to be compiled by a C++
compiler: Cast appropriately, add C linkage for `get_vtable'
functions, do not use C++ keyword `delete'.
2006-09-04 17:27:27 +00:00
George Bosilca
c6b76b4385 * libltdl/config/ltmain.m4sh (func_mode_link): In the dlsym
file, define a type for the symbol list, and declare the list
`extern', so that it is extern even if compiled by a C++
compiler.  The type definition helps avoid a compiler warning
against anonymous extern struct.
* libltdl/libltdl/lt_system.h: Add `extern' to `LT_SCOPE' for
the same reason.
2006-09-04 17:25:15 +00:00
George Bosilca
c7a33e176b * libltdl/argz_.h: It's __cplusplus, not _cplusplus.
* libltdl/libltdl/slist.h: Likewise.
2006-09-04 17:23:30 +00:00
George Bosilca
4936fb4a91 * libltdl/libltdl/lt__glibc.h: Wrap included argz.h in
`extern "C"', for broken headers on Cygwin.
2006-09-04 17:21:35 +00:00
Ralf Wildenhues
833a91c5bf Avoid mixing functions and data pointers in callback functions.
* libltdl/ltdl.c (file_worker_func): New type.
(lt_dlforeachfile): Instead of passing a function pointer as a
data pointer, pass a pointer to a file_worker_func pointer.
(foreach_callback_func): Adjust.
* tests/mdemo/main.c: Assume C89. Exercise lt_dlforeachfile.
(callback, try_iterate, my_dirname): New functions.
* tests/mdemo-exec.test: Check for its output.
2006-08-31 05:34:01 +00:00
Ralf Wildenhues
673d0f40fe * libltdl/libltdl/lt__private.h (__attribute__, LT__UNUSED):
New macros.
* libltdl/loaders/dld_link.c: Use LT__UNUSED where
appropriate.
* libltdl/loaders/dlopen.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c: Likewise.
* libltdl/ltdl.c: Likewise.
(find_file_callback): Fix declaration names to match definition.
(load_deplibs) [!LTDL_DLOPEN_DEPLIBS]: Use separate definition
for less preprocessor clutter.
2006-08-30 04:14:21 +00:00
Ralf Wildenhues
2166e633ae * libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
sharing with gnulib.  Report by Eric Blake.
* libltdl/lt__alloc.c, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h: Likewise.
* HACKING: Update.
2006-08-28 16:02:14 +00:00
Ralf Wildenhues
05f26e584d * libltdl/config/ltmain.m4sh (func_mode_link): Pass through
`--coverage' and `-pg', for GCC.  Report by Rainer Keller
<keller@hlrs.de> and Tor Lillqvist <tml@iki.fi>.
2006-08-25 15:08:14 +00:00
Kurt Roeckx
956f27f44c * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_CHECK_MAGIC_METHOD, _LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
(_LT_LANG_CXX_CONFIG) [k*bsd*-gnu]: kfreebsd*-gnu and
knetbsd*-gnu behave like linux-gnu.
* libltdl/m4/ltdl.m4 (LT_SYS_DLOPEN_DEPLIBS): Likewise.
* libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK)
[x86_64-*kfreebsd*-gnu]: Add 32/64 bit bi-arch support.
* NEWS: Update.
2006-08-25 15:04:30 +00:00