* libltdl/loaders/loadlibrary.c (loadlibraryerror): New
helper function that returns the latest Windows error as a
string, or the provided default string on failure to do so.
(LOADLIB_SETERROR): New macro that wraps previous to make it
easy to use.
(vm_open, vm_close, vm_sym): Make use of previous.
(LOCALFREE): New macro to help free the Windows error string.
(vl_exit): Make use of previous.
* tests/loadlibarry.at: New file, new test that makes sure
the loadlibrary loader reports non-standard error messages.
* Makefile.am (TESTSUITE_AT): Add above test.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* tests/resident.at (resident modules): New file, new test.
* Makefile.am (TESTSUITE_AT): Adjust.
Report by Bob Friesenhahn.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/deplib-in-subdir.at (deplib in subdir): New file, new
test.
* Makefile.am (TESTSUITE_AT): Update.
Prompted by report from Bob Friesenhahn.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/ltdl.c (trim): Do not dump core upon missing quote in
module .la file.
* tests/lalib-syntax.at (syntax of .la files): New file, new
test.
* Makefile.am (TESTSUITE_AT): Add tests/lalib-syntax.at.
Report by Bob Friesenhahn.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/libltdl/slist.h: Include stddef.h, for size_t.
(slist_remove): Return pointer to SList, not void.
* libltdl/slist.c: Include stdlib.h, for malloc and free.
(slist_remove): Adjust prototype as above.
(slist_sort): Do not loop forever on one-item list.
* tests/slist.at (SList functionality): New file, new test.
* Makefile.am (TESTSUITE_AT): Add tests/slist.at.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/general.m4sh (func_normal_abspath): New function.
(func_relative_path): Likewise.
* libltdl/config/ltmain.m4sh (func_mode_help): Document "-bindir".
(func_mode_link): Accept new "-bindir" option and use it, if
supplied, to place Windows DLLs.
* tests/bindir.at: New file for install tests using "-bindir".
* Makefile.am (TESTSUITE_AT): Add bindir.at.
* doc/libtool.texi (Link Mode): Update documentation.
* NEWS, THANKS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (testsuite_deps, testsuite_deps_uninstalled):
New variables.
(check-local, installcheck-local): Use them.
(check-interactive, check-noninteractive): New rules.
* tests/link-order2.at (Link order of deplibs),
tests/static.at (static linking flags for programs): Add keyword
`interactive'.
* doc/libtool.texi (Test descriptions): Document all keywords
used in the Libtool test suite.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/flags.at (passing flags through libtool): New file, new
test, for bug fixed in previous commit.
* Makefile.am (TESTSUITE_AT): Add tests/flags.at.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/versioning.at (versioning): New file, new test.
* Makefile.am (TESTSUITE_AT): Adjust.
Prompted by bug report from Mike Gorchak.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (TESTS_ENVIRONMENT): Set lt_INSTALL, not INSTALL,
so that a bogus relative path to the install-sh script in the
source tree is not propagated to the configure scripts of the
old test suite.
* tests/testsuite.at: Adjust.
* tests/install.at (Install tests): Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/lt_dlopenext.at (lt_dlopenext error messages): New file,
with new test, with sources taken from the Autobook example.
* Makefile.am: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/lt_dlopen.at (lt_dlopen error messages): New file, new
test, marked as XFAIL for now.
* Makefile.am: Adjust.
Report and reproducible test case by Jeff Squyres.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/getopt.m4sh (func_version): Slurp in copyright
lines until a period is found.
* libltdl/config/ltmain.m4sh: Multi-line copyright is ok to use
now.
* tests/help.at (standard command line options): New file, new
tests. Make this test group the first one for libtool tests,
moving the banner ...
* tests/duplicate_members.at: ... from here.
* Makefile.am (TESTSUITE_AT): Add tests/help.at.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_LINKER_SHLIBS): Add cache variables to tests that
require the linker to work. For shlibpath_overrides_runpath,
this also changes the semantics to let the result from the C
compiler take precedence.
* tests/no-executables.at (AC_NO_EXECUTABLES): New file.
* Makefile.am: Update.
* NEWS: Update.
Report of shlibpath_overrides_runpath issue by Mike Frysinger,
report of GCC issue by Andreas Schwab.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (dist-hook): Bail out if shipped aclocal.m4 files
contain LT_INIT, AC_PROG_LIBTOOL, or AM_PROG_LIBTOOL macro
definitions. These can only come from bogus pull-ins from older
installed Libtool macro files.
* bootstrap: Likewise.
Report by Akim Demaille.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
The HP-UX 11 runtime linker fails to mmap shared libraries
without execute permissions. Fixing them with postinstall_cmds
may be too late, as ln, sed, and chmod may link against the
library being installed.
* libltdl/m4/libtool.m4 (install_override_mode): New LT_DECL.
(_LT_SYS_DYNAMIC_LINKER) [hpux9*, hpux10*, hpux11*]: Set it.
* libltdl/config/ltmain.m4sh (func_mode_install): Build a second
command line, $install_shared_prog, for the installation of the
shared library. Override resp. set the permission mode if
install_override_mode is nonempty.
* doc/libtool.texi (libtool script contents): Document it.
* tests/install.at (Install tests): New test.
* Makefile.am (TESTSUITE_AT): Adjust.
(TESTS_ENVIRONMENT): Pass INSTALL.
Report by Bruno Haible.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.am (dist_man1_MANS, update_mans): New macros.
($(srcdir)/doc/libtool.1, $(srcdir)/doc/libtoolize.1): New
rules. Use --help-all for libtool.
(MAINTAINERCLEANFILES): New macro. Add dist_man1_MANS.
(BUILT_SOURCES): Add libtoolize.
* configure.ac: Check for help2man, set HELP2MAN.
* doc/libtool.texi: Add @direntry for libtool-invocation.
(Invoking libtool): Document -h, --help-all. Reorder mode
description for consistency.
(Compile mode): Do not document -Wl,FLAG and -XCClinker here.
(Link mode): Document -Wc,FLAG here, reformat a bit.
* libtoolize.m4sh: Reformat --help output a bit, to help
help2man.
* libltdl/config/ltmain.m4sh: Likewise. Also, set PROGRAM to
`libtool', not `ltmain.sh', so the former is used in the man
page.
New argument `--help-all'. If given, call func_help and
func_mode_help several times, beating output in shape with sed.
(func_mode_help): Do not exit here.
* libltdl/config/getopt.m4sh (func_usage): Work with different
indentations, but require comment hash in first column, when
grepping for '-h' in usage to end short help.
(func_help): Accept optional argument to not exit.
* NEWS, THANKS: Update.
Suggestion by Karl Berry.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/argz.c (argz_add,argz_count): Remove.
* libltdl/argz_.h (argz_add,argz_count): Remove.
* NEWS: Announce it.
* tests/ltdl-api.at: Test so we don't repeat it.
* Makefile.am: Add new test.
* libltdl/config/ltmain.m4sh(func_extract_archives): Use sed
$basename.
* tests/darwin.at: New. Check that we can built fat program,
shared library and convenience library.
* Makefile.am: Add test.
Reported by LiKai Liu <liulk@cs.bu.edu>
* Makefile.am: Pass srcdir as an argument to mkstamp and expect only 2 fields in mkstamps output.
* clcommit.m4sh: Ditto.
* configure.ac: Ditto.
* libltdl/config/mkstamp: return a revision and date based on the number of lines which look like dates in all the ChangeLog* files in the directory we got as arg 1.
* libltdl/config/general.m4sh (func_show_eval_locale): New
function, for running commands in the user locale.
* libltdl/config/ltmain.m4sh (func_mode_compile): Use it for
compiling.
* tests/localization.at (localized compiler messages): New test.
* Makefile.am: Adjust.
Report by Bruno Haible.
* Makefile.am (installcheck-local): Depend upon tests/atconfig
and $(srcdir)/$(TESTSUITE).
* tests/testsuite.at (_LIBTOOLIZE_TRANSFORM): New macro.
(LT_AT_CHECK_LIBTOOLIZE): Use it to transform expout and experr
files suitably.
* HACKING: Update.
arguments we have identified as shell or C wrappers.
(func_emit_wrapper): Output error message on stderr.
* tests/execute-mode.at: New file, with --mode=execute tests.
* Makefile.am: Adjust.
* NEWS: Update.
Fixes 2.2 regression. Report by Roberto Bagnara.
LTDL_INIT. Accept (optional) new 'convenience' and 'installable'
options in lieu of LTDL_CONVENIENCE and LTDL_INSTALL macros. And
also, implement --with-included-ltdl, --with-ltdl-lib and
--with-ltdl-include configure-time options:
* libltdl/m4/ltoptions.m4: Associate existing option settings with
LT_INIT.
(LT_OPTION_DEFINE): Associate options 'nonrecursive', 'recursive',
'subproject', 'installable' and 'convenience' with LTDL_INIT.
(_LT_MANGLE_OPTION, _LT_SET_OPTION, _LT_IF_OPTION)
(_LT_UNLESS_OPTIONS, _LT_SET_OPTIONS): Add MACRO-NAME argument to
support options to named macros instead of hardcoding only LT_INIT
options.
* libltdl/m4/ltdl.m4 (_LTDL_CONVENIENCE): Factor common code from
LTDL_CONVENIENCE and LTDL_INIT([convenience]).
(_LTDL_INSTALLABLE): Factor out common code from LTDL_INSTALLABLE
and LTDL_INIT([installable]).
(_LTDL_SETUP): Renamed from LTDL_INIT. Support new configure-time
options: --with-included-ltdl, --with-ltdl-lib,
--with-ltdl-include.
(LTDL_CONVENIENCE, LTDL_INSTALLABLE): Adjust.
(LT_WITH_LTDL): Removed.
(LTDL_INIT): Parse caller options.
* libltdl/m4/libtool.m4 (LT_INIT): Declare that this macro must be
expanded before LTDL_INIT, and be sure to parse caller options.
* configure.ac: Call directly into internal _LTDL_SETUP macro.
* libtoolize.m4sh (func_scan_files): Ltdl mode argument moved from
LT_CONFIG_LTDL_DIR to LT_INIT.
* tests/nonrecursive.at, tests/recursive.at: Use new interfaces.
* tests/configure-iface.at: Test it.
* Makefile.am (TESTSUITE_AT): Add configure-iface.at.
* doc/libtool.texi (Distributing libltdl): Document improved.
LTDL_INIT interfaces.
* NEWS: Updated.
generated files libtool, libtoolize, libltdl/m4/ltversion.m4,
tests/defs, as they are still in a preferred source code form as
required by GPL.
Report by DJ Delorie.
need a library prefix like 'lib', such as BeOS. Fix a number
of bugs exposed by this test in order for it to pass.
Currently the prefix is hardcoded as 'lib', as I am not aware
of systems that require a different prefix:
* libltdl/loaders/preopen.c (lt_dlpreload_open): Move error
condition out of test loop to be sure that each originator is
tried, instead of erroring out if the first doesn't match.
Support passing NULL as the originator to load all preloaded
modules originating in the program itself.
* libltdl/lt_dlloader.c (lt_dlloader_dump): New debug function.
* libltdl/libltdl/lt_dlloader.h (lt_dlloader_dump): Declare it
when LT_DEBUG_LOADERS is defined at compile time.
* libltdl/ltdl.c (lt_dlinit): Dump loader list after successful
initialisation.
(tryall_dlopen): Add a new VTABLE parameter to force use of a
specific loader in preference to trying every loader in turn.
Adjust all callers.
(try_dlopen): Always see whether a module was preloaded for
module names with no directory component before searching the
filesystem for a match.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Declare
a new global_symbol_to_c_name_address_lib_prefix variable.
(global_symbol_to_c_name_address_lib_prefix): The sed
expressions to use when a lib prefix is enforced need to be
slightly different to work with preloaded modules.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms): In order
to name preloaded symbols correctly for the lookup algorithm
to work when the loaded module file must be prefixed with lib.
Use global_symbol_to_c_name_address_lib_prefix when
need_lib_prefix is other than no.
* tests/need_lib_prefix.at: New test to check for breakage on
hosts where need_lib_prefix is unknown.
* Makefile.am (TESTSUITE_AT): Add new test.
* tests/TODO: Note missing tests that would have caught some
of the latent bugs fixed by this patch.
* HACKING: Document libltdl keyword.
* NEWS: Updated.
old_deplibs.
* tests/dmacks.at: Check for archives as members of static
archives. Currently XFAILS, above only eliminates one of the
two static archives.
* Makefile.am: Add test.
Reported by Daniel Macks <dmacks@netspace.org>
visibility set according to the underlying implementation.
Here, we add lt_dlopenadvise() to allow callers to request,
among other things, local or global symbol visibility from the
underlying dlloader:
* libltdl/ltdl.c (LT_DLRESIDENT_FLAG): Removed.
(LT_DLIS_RESIDENT): Use public is_resident info field.
(LT_DLIS_SYMLOCAL, LT_DLIS_SYMGLOBAL): New macros to test for
module symbol visibility status.
(tryall_dlopen): If vtable->module_open() was able to act on
either is_symlocal or is_symglobal hints, store that in
the handle flags.
(lt_dlopenadvise): New function that works like lt_dlopen(),
but accepts an advise type to determine whether to ask
dlloaders to change default symbol visibility.
(lt_dlopen, lt_dlopenext): Just call lt_dlopenadvise() with
the correct parameters.
(lt_dladvise_init, lt_dladvise_destroy): New functions to
initialize and destroy an advise type hint.
(lt_dladvise_ext, lt_dladvise_resident, lt_dladvise_local)
(lt_dladvise_global): Set hints on an advise type.
(openadvise): Factored out of lt_dlopenadvise.
(has_library_ext): Factored out of lt_dlopenadvise.
* libltdl/ltdl.h: Declare all of the above.
(lt_dlinfo): New fields for advise hints.
* libltdl/libltdl/lt_dlloader.h (lt_module_open): Add a new
advise parameter. Adjust all callers.
(lt_dladvise): New opaque type for advise hints.
* libltdl/libltdl/lt__private.h (lt__advise): Declare
contents of opaque lt_dladvise type.
* libltdl/libltdl/lt_error.h (CONFLICTING_FLAGS): New error
for attempts to have local and global symbol visibility at the
same time.
* libltdl/loaders/dld_link.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c: Adjust.
* libltdl/loaders/dlopen.c (RTLD_LOCAL, RTLD_GLOBAL): Try to
define these symbols if the system has equivalents.
(vmopen): If unable to act on a caller request to set symbol
visibility, then unset the relevant hints in the advise type.
* tests/lt_dladvise.at: New tests for the above.
* doc/libtool.texi (Libltdl Interface): Updated.
* NEWS: Updated.
(libtool, $(srcdir)/$(m4dir)/ltversion.m4)
($(srcdir)/$(auxdir)/ltmain.sh): Updated to not depend on any
phony rules. Test `$?' for prerequisites that should always
cause us to update the target. Fixes rebuilding rules, at the
cost of sometimes updating too much with non-GNU make.
parts of the configuration process on each invocation. Instead
of relying on a stamp file, we now compare version numbers of
generated files with the ChangeLog timestamp manually in the
affected make rules to decide whether regenerating is necessary:
* Makefile.am (EXTRA_DIST): Remove stamp-vcl.
(clean-ltmain-sh): Also remove users' obsolescent stamp-vcl.
(rebuild): Keep some common code here for...
(libtool, libltdl/m4/ltversion.m4, libltdl/config/ltmain.sh):
Rewritten to work without reference to intermediate stamp-vcl
file.
* configure.ac (CONFIG_STATUS_DEPENDENCIES): Change from
stamp-vcl to ChangeLog.
* NEWS: Removed entry saying this fix is needed.
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.