* tests/link-order2.at (Link order of deplibs.): On w32 (and
others, e.g., AIX), the wrongly linked executable picks up only
one instance of the bad function instead of two; relax the test
to accept this; we still require the right link order with the
correctly linked executable.
Reported by Roumen Petrov and others.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/convenience.at, tests/ctor.at, tests/darwin.at,
tests/deplibs-ident.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/export.at, tests/fail.at, tests/indirect_deps.at,
tests/inherited_flags.at, tests/link-order.at,
tests/link-order2.at, tests/lt_dladvise.at, tests/lt_dlexit.at,
tests/need_lib_prefix.at, tests/runpath-in-lalib.at,
tests/search-path.at, tests/shlibpath.at, tests/static.at,
tests/stresstest.at, tests/template.at, tests/testsuite.at:
Use $EXEEXT throughout, except in Makefile.am snippets where
automake takes care of it, and in testsuite macros that take
care of the extension.
Reports by Roumen Petrov and Alon Bar-Lev.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/testsuite.at (LT_AT_EXEC_CHECK): Accept fifth argument
ARGS-OR-STATUS-ADJUST, for command-line arguments and/or exit
status flattening. Rewrite to prefer the executable with the
`.exe' prefix over one without. Test exit status against
expected exit status, not against zero, when determining whether
this may be a cross-compilation-induced result.
(LT_AT_NOINST_EXEC_CHECK): Likewise.
* tests/static.at (static linking flags for programs): Adjust
calls.
Report by Roumen Petrov.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/link-order.at (Link order test): Drop trailing period
from test name.
* tests/link-order2.at (Link order of deplibs): Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/standalone.at (linking libltdl without autotools): Wrap
lines with dnl, to avoid turning off tracing of AT_CHECK.
* tests/subproject.at (linking libltdl without autotools):
Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/general.m4sh: Replace all uses of `$ECHO "X..."
| $Xsed' with `$ECHO "..." | $SED', and employ further trivial
simplifications. Replace $ECHO with echo where appropriate.
(func_echo_all): New function.
* libltdl/config/getopt.m4sh: Likewise simplifications.
* libltdl/config/ltmain.m4sh: Likewise.
* libltdl/m4/libtool.m4: Likewise.
(LT_CMD_MAX_LEN): Use func_fallback_echo, to ensure that the
command line is passed through an exec* function.
* libtoolize.m4sh: Likewise simplifications. Use func_echo_all
to implement --dry-run.
* tests/defs.m4sh: Likewise simplifications.
* tests/quote.test: Likewise simplifications.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (LT_INIT): Require
AC_CONFIG_AUX_DIR_DEFAULT.
* tests/old-m4-iface.at (AM_PROG_LIBTOOL): Amend test to
expose this.
Report, analysis, and test example by Jakub Bogusz.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/search-path.at (sys_lib_search_path): Autotest needs at
least one AT_CHECK executed in a test group. So if we haven't
found -lz anywhere, as may happen with cross-compilers, skip the
test.
* THANKS: Update.
Report by Alon Bar-Lev.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/execute-mode.at (execute mode): Actually also test the
cwrapper on the arguments.
Report by Bruno Haible.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac: Bump Autoconf requirement.
* libltdl/config/general.m4sh: Use $as_echo as default $ECHO.
* tests/testsuite.at: Use $as_echo as default $ECHO.
* libltdl/m4/libtool.m4 (LT_INIT): Add _LT_SHELL_INIT to
work around Autoconf <2.64 bug.
(_LT_OUTPUT_LIBTOOL_COMMANDS_INIT): Add func_fallback_echo.
Eliminate lt_ECHO requoting.
(_LT_SHELL_INIT): Use a public M4sh diversion.
(_LT_PROG_ECHO_BACKSLASH): Rewrite.
(LT_CMD_MAX_LEN): Do not use --fallback-echo.
* libltdl/config/ltmain.m4sh: Remove --no-reexec and --fallback-echo
handling.
(func_fallback_echo): New.
(func_emit_wrapper_part1): Quote ECHO. Remove --no-reexec and
--fallback-echo handling.
(Execute mode): Do not set qecho.
* clcommit.m4sh: Do not unset CDPATH, use AS_INIT and M4sh diversions.
* libltdl/config/mailnotify.m4sh: Likewise.
* libtoolize.m4sh: Likewise.
* tests/defs.m4sh: Likewise.
* tests/testsuite.at: Move AT_INIT invocation at the top.
* libltdl/m4/libtool.m4 (_LT_GENERATED_FILE_INIT): New.
(LT_OUTPUT): Use it.
* libltdl/config/general.m4sh (M4SH_IN_HEADER): New.
(progpath): Move setting before $0 could be clobbered.
* libltdl/config/ltmain.m4sh (M4SH_IN_HEADER): New.
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src): On
mingw, preprocess the argument vector through prepare_spawn.
* tests/execute-mode.at (execute mode): Output args
newline-separated. Extend tests by more argument pairs that
contain special characters, where the w32 cwrapper fails.
Also test a real compiled program, linked against an uninstalled
library, to expose cwrapper issues.
* NEWS: Update.
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>
* tests/testsuite.at (_LIBTOOLIZE_TRANSFORM): Fix test failures
with --program-prefix, where the test case output contains the
transformed name somewhere other than the beginning of a line.
* libtoolize.m4sh (func_check_macros): Be sure to always use
the transformed name in output messages.
* 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_mode_link): Diagnose `-L'
without argument, and `-L path', i.e., with a space.
* tests/fail.at (Failure tests): Test for these failures.
* THANKS: Update.
Report by Olaf Lenz.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/lt_dladvise.at (lt_dlopenadvise library loading): Drop
some newlines in AT_CHECK commands, for better 'testsuite -x'
output. Only create a static installable libpreload.la, to
avoid exposing the bug libtool currently has with preloading of
shared libraries. Add a note to revisit this later.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/ltdl.m4 (LTDL_INIT): Check for a libltdl that
provides lt_dladvise_preopen when deciding if installed libltdl
is 'new enough'.
* libltdl/libltdl/lt__private.h (lt__advise): Add a new
is_preload flag.
* libltdl/ltdl.c (lt_dladvise_preload): New api call to set it.
(try_dlopen): If it is set, and the search of preloaded modules
didn't return a match, don't bother searching the filesystem.
* libltdl/ltdl.h (lt_dladvise_preload): Declare it.
* doc/libtool.texi (Libltdl Interface): Document it.
* tests/lt_dladvise.at: Test it (and incidentally add some test
coverage for `libtool -dlpreopen').
* NEWS: Announce it.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux] <icc, icpc>:
Use -fPIC, newer Intel compilers (icc 10, ifort 9) reject -KPIC.
* tests/localization.at: Skip test if the compiler fails merely
due to the locale setting.
* THANKS: Update.
Report by Vincent Lefevre.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/libtoolize.at
(verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR): Older aclocal
requires a space between -I and the directory argument.
Reported by Daniel Macks <dmacks@netspace.org>
* tests/testsuite.at (_LIBTOOLIZE_TRANSFORM): When $tst_aclocal
is set, transform paths that use it to generic
/usr/local/share/aclocal in time for AT_CHECK comparisons.
* libtoolize.m4sh (all_pkgconfig_files, all_pkgmacro_files)
(all_pkgltdl_files): New variables listing all files ever
maintained by any release of libtoolize.
(func_install_pkgconfig_parent, func_install_pkgltdl_files)
(func_install_pkgconfig_subproject, func_install_pkgmacro_parent)
(func_install_pkgmacro_subproject): Carefully clean up any files
that may have been installed by previous libtoolize releases.
* tests/libtoolize.at: New test for libltdl/acinclude.m4 removal.
Reported by Andreas Schwab <schwab@suse.de>.
* libltdl/config/general.m4sh (opt_warning): New option.
(func_warning): Only display a warning message if $opt_warning
is true.
* libtoolize.m4sh: Accept options in LIBTOOLIZE_OPTIONS
environment variable.
(--no-warn): Parse new option.
(func_serial_update_check, func_keyword_update): Use func_warning.
(func_check_macros): Bail out before style issues nags when
$opt_warning is false.
* doc/libtool.texi (Invoking Libtoolize): Document it.
* tests/libtoolize.at: Test it.
* NEWS: Updated.
* libtoolize.at (func_check_macros): Always advise use of
AC_CONFIG_MACRO_DIR when not able to copy libtool macros into
the project tree.
* tests/libtoolize.at: New test for correct diagnosis of mismatch
between AC_CONFIG_MACRO_DIR and ACLOCAL_AMFLAGS.
Update expected output of other tests.
* NEWS: Updated.
As a side effect, this also means that when `aclocal' copies the
libtool macros into `aclocal.m4' libtoolize complains only about
the macro files that are missing or not up-to-date.
* libtoolize.m4sh (func_echo_once): New function that prints
the contents of a named variable only on the first call.
(func_aclocal_update_check): New function that compares serial
numbers of libtool macros in aclocal.m4 and only diagnoses the
missing files.
(func_copy, func_copy_cb, func_copy_some_files, func_serial_update)
(func_keyword_update, func_ltmain_update, func_config_update)
(func_install_update): Accept a new argument naming a variable
containing a header string to print with func_echo_once iff any
body text is output by this function.
(func_install_pkgmacro_subproject, func_install_pkgmacro_parent)
(func_install_pkgltdl_files, func_install_pkgconfig_subproject)
(func_install_pkgconfig_parent: Set and pass a suitable
header string variable for the above functions.
(func_serial_update_check): Don't advise rerunning `libtoolize
--force' when aclocal.m4 is not m4_including libtoolize installed
macro files.
* tests/testsuite.at (_LIBTOOLIZE_TRANSFORM): Transform generic
/usr/local/share/aclocal paths to point into the uninstalled
libtool macro directory.
* tests/libtoolize.at: Update tests that were checking for old
behaviour of outputing `file is already up to date' even when
--force was not passed.
* tests/libtoolize.at: New tests to prevent regressions of these
smarter messages.
* NEWS: Updated.
Reported by Olly Betts <olly@survex.com>
* libltdl/config/ltmain.m4sh (func_mode_link): Add
$link_static_flag to compile_command and link_command only
later, instead of right after a possible compiler wrapper.
* tests/static.at (ccache -all-static): New test.
* THANKS: Update.
Report by Richard Purdie.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* 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>
* tests/testsuite.at [ aix ]: Set file mode creation so that
'others' have no permissions. Shared libraries are kept in
memory on AIX after use if they are world-readable, which means
on NFS mounts cleanup of test group directories will fail later.
* THANKS: Update.
Report and analysis by Michael Haubenwallner.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
definition of func_dirname_and_basename ...
* libltdl/config/general.m4sh (func_dirname_and_basename):
... here, to use it for the other scripts that use general.m4sh
(and as portable fallback for libtool). Add marker for early
insertion of generated shell functions (into libtool, not the
other scripts) here.
Use func_dirname_and_basename to compute progname, progpath.
* libltdl/config/ltmain.m4sh (func_mode_help): Remove marker
for insertion of generated shell functions.
* tests/sh.test: Adjust function definition test to not match
function call.
New function.
* libltdl/config/ltmain.m4sh (func_mode_compile): Use it to
avoid two forks with XSI shells.
* tests/suffix.test: Also test a file with multiple dots.
func_generate_dlsyms, func_extract_an_archive,
func_extract_archives, func_mode_help): move these so they
appear after func_mode_compile.
* tests/nomode.test: Check that --mode=link --help works.
Reported by Josh Triplett <josh@freedesktop.org>
* doc/libtool.texi (Link mode): -all-static does not go well
with disable-static on most systems.
* tests/static.at (static linking flags for programs) [!aix]:
With --disable-static but nonempty link_static_flag, skip the
m-all-static link. Do not skip it on AIX, as there the
enable_static is self-inflicted, and thus expected to work.
* THANKS: Update.
Report by Nix.
up extracting several variables at once. Use it to extract all
default variables at once. Also extract build_alias and
host_alias from the libtool script.
(func_configure_nofail): Use build_alias and host_alias for
--build and --host, respectively. Pass each if nonempty.
* tests/testsuite.at: Pass --build if build_alias is nonemtpy.
* tests/quote.test: Extract ECHO and wl at once.
* 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.