* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS)
<nm_file_list_spec>: New tag variable. Set it to '@' if input
files can be passed to $NM in a file named with the '@' option.
* libltdl/config/ltmain.m4sh (func_mode_link): When
nm_file_list_spec is nonempty, use it to avoid skipped_export.
* doc/libtool.texi (libtool script contents): Document
new variable.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
[ cygwin, mingw, cegcc ] <cl*>: Remove all spaces in the
case statement of postlink_cmds to make file name expansion
more unlikely.
(_LT_LANG_CXX_CONFIG): Likewise, but also add the missing |.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Fixes a lot of testsuite failures with MSVC 2003 (v8.0) and
above (and perhaps also MSVC .Net) related to running programs
that have been moved (e.g. installed) without their manifests
also having been moved.
* libltdl/m4/libtool.m4 (_LT_PATH_MANIFEST_TOOL): New macro
that locates the Manifest Tool (mt) and verifies that it is
indeed the manifest tool. The result is stored in the new
variable MANIFEST_TOOL.
(_LT_LINKER_SHLIBS) <postlink_cmds>: New tag variable.
[ cygwin, mingw, cegcc ] <cl*>: Embed the manifest file as a
resource. Make sure the embedding work regardless of if the
@OUTPUT@ file name includes a trailing $EXEEXT.
(_LT_LANG_CXX_CONFIG): Likewise.
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG): Require the above
_LT_PATH_MANIFEST_TOOL.
* libltdl/config/ltmain.m4sh (func_mode_link): After linking
a program, replace @OUTPUT@ in $postlink_cmds and then execute
the commands.
* doc/libtool.texi (libtool script contents): Document
new postlink_cmds variable.
(LT_INIT): Add that the MANIFEST_TOOL environment variable can
be used to override the manifest tool to use.
* tests/exeext.at: New. Make sure linking with both -o prog
and -o prog$EXEEXT works.
* Makefile.am (TESTSUITE_AT): Update.
(TESTS_ENVIRONMENT): Propagate $(MANIFEST_TOOL) to the
testsuite.
* NEWS: Add note of the new MANIFEST_TOOL environment variable.
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) [mingw, cygwin]: Add
support for the Microsoft C/C++ Compiler (cl) relying on help
from the compile script in Automake.
* NEWS: Add note of the above.
* tests/getopt-m4sh.at [enhanced shell option appending]:
_LT_AT_XSI_FUNC_EXTRACT will not be able to find the enhanced
libtool func_append function if the replacement wasn't substituted
by configure, since the decorator comments will be different - in
that case simply skip the test.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* tests/getopt-m4sh.at (_LT_AT_FALLBACK_FUNC_EXTRACT): New
macro to extract a fallback function implementation from
ltmain.m4sh.
[option appending]: Use it for a test of the fallback
implementation of func_append.
[enhanced shell option appending]: And also test the enhanced
implementation.
* libltdl/config/ltmain.m4sh (func_append_quoted): Fix missing \
to escape a quoted space for eval.
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Fix missing $ in
dereference of func_append inline replacement for retarded
shells.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libtool/m4/libtool.m4 (_LT_CHECK_SHELL_FEATURES): Remove
test ${foo:n:m} substrings, instead adding a ${foo%??} check
to the existing XSI tests.
(_LT_PROG_XSI_SHELLFNS): Remove the ${foo:n:m} based
func_split_short_opt substitution in favour of a properly
XSI compliant substitution.
Suggested by Paolo Bonzini.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libtool/config/ltmain.m4sh: Replace all occurrences of
`foo="$foo bar"' with func_append. No decorator comment was
added since /func_append [a-zA-Z0-9_]* "/ is already an
excellent match regexp, and additional comments would only
complicate things.
(func_append_quoted): New function that quotes a value with
func_quote_for_eval before appending it. To avoid quoting the
whitespace in the passed value, a single whitespace is added
automatically. Changed callers where possible.
* libtool/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Perform a
`+=' implementation substitution for func_append_quoted. More
importantly, systematically replace matching func_append calls
with inline `+=' when supported (for maximum speed), and
longhand `foo="$foo bar"' otherwise to avoid the function
overhead.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/config/getopt.m4sh (m4go_shortnoargs): Remove 'v' now
that getopt.m4sh doesn't steal that letter for the --version
short option.
* libltdl/config/ltmain.m4sh (M4SH_GETOPTS): We can now use 'v'
as a short option for '--verbose'.
* libltdl/config/getopt.m4sh (m4go_printopts): Add back in the
leading '-' for remaining non-argument short options.
(func_split_short_opt): Use the correct sed script variable.
* libltdl/m4/libtool.m4 (_LT_CHECK_SHELL_FEATURES): Also ensure
that XSI substring extraction is supported.
(_LT_PROG_XSI_SHELLFNS): Use XSI substring extraction to split
short options to avoid unnecessary forks if the host shell
supports that.
* tests/getopt-m4sh.at: New tests for getopt.m4sh coverage.
* Makefile.am (TESTSUITE_AT): Add getopt-m4sh.at.
(TESTS_ENVIRONMENT): Pass M4SH and SED for substition into the
m4sh expansion performed in tests/getopt-m4sh.at.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_REPLACE): Some editors
might optimise away the SPACE in SPACE-TAB sequences, so use
TAB-SPACE just in case.
Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_REPLACE): `sed -i' is not
portable; use `mv -f ...|| cp -f ...' instead.
Add an initial backslash to sed `c' substitutions with leading
whitespace, so that indentation is not removed by some non-POSIX
compliant sed implementations.
(_LT_PROG_XSI_SHELLFNS): Display a diagnostic warning message if
one or more XSI function replacements failed.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Moved portable
shell versions of various utility functions from here...
* libltdl/config/getopt.m4sh (func_split_long_opt): ...to here...
* libltdl/config/general.m4sh (func_dirname, func_basename)
(func_dirname_and_basename, func_strip_name): ...here...
* libltdl/config/ltmain.m4sh (func_append, func_arith, func_len)
(func_lo2o, func_xform): ...and here.
* libltdl/config/libtool.m4 (_LT_PROG_XSI_REPLACE): New macro that
expands into a sed command for replacing the contents of a
suitably decorated shell function with an alternate XSI
implementation.
(_LT_PROG_XSI_SHELLFNS): Use it to replace the portable shell
versions of the functions above with equivalent XSI
implementations that avoid unnecessary forks if the host shell
supports that.
* libltdl/config/ltmain.m4sh: Replace hand written shell code
with a call to M4SH_GETOPTS. Rename some option variables in
the client code to match the generated option parser settings.
* libltdl/config/general.m4sh (func_echo, func_error)
(func_warning): Use $opt_mode instead of obsoleted $mode in
message leader.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* tests/exception.at (common.h): New file, refactored from
(module.h): Move declaration of modexc to libcommon.
Include common.h. Use explicit import/export markings for
symbols when building on win32 or cygwin.
(common.cpp): New file.
(module.cpp): Ensure correct symbols markings when including
module.h.
(lib.h): Use explicit import/export markings for symbols
when building on win32 or cygwin.
(lib.cpp): Ensure correct symbol markings when including lib.h.
(main.cpp): Include common.h.
(commands): Ensure correct symbol markings when compiling
main.cpp, and lib.cpp, and module.cpp. Add command to compile
common.cpp, and to link libcommon.la. Add libcommon.la when
linking module.la and main. Add command to install libcommon.la.
Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
* libltdl/config/getopt.m4sh (m4_chomp): Ensure this macro is
implemented even if Autoconf's m4sugar.m4 doesn't provide it.
(m4go_expand): New macro based on Autoconf-2.64 m4_expand. Use
it everywhere incase m4sugar.m4 doesn't have an implementation.
(m4_ifnblank): Replace all uses with m4_ifval, which was
available long before m4_ifnblank was introduced.
* libltdl/config/ltmain.m4sh (func_mode_uninstall): Do not try
to match a null string in a case pattern, even with surrounding
spaces. Fixes `lt_dlopenadvise library loading' test.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/flags.at (passing CC flags through libtool): When $LD
is used for linking libraries, ensure flags passed with `-Wc,'
are not passed through to $LD, but flags passed with `-Wl,' use
$wl when linking programs. Fixed testsuite failure on HP-UX
10.20.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/exceptions.at (main.cpp:exceptions_in_module):
Move dlclose outside catch block; otherwise __cxa_end_catch
(part of the cygwin g++ ABI) accesses pointers to data inside
unloaded DLL. This is a platform ABI-specific bug, but is
likely common to many platforms' g++ and/or other C++
compilers.
Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
* tests/defs.m4sh: Strip trailing `/tests' from srcdir, to allow
`$srcdir/tests/FOO.test' to be run from the top build directory.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/libtool.texi: Throughout the manual, replace @var with
@samp or @code as appropriate, ensure the argument of remaining
@var uses are lower-case.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/execute-mode.at (execute mode): Do not use grep -F
with an empty pattern.
* THANKS: Update.
Report by Jay K.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) <lt_prog_compiler_pic>:
Save result, and allow override, through cache variable
lt_cv_prog_compiler_pic{,_CXX,_F77,_FC}. The cache variable
needs to contain an eventual -DPIC.
* doc/libtool.texi (): Document it.
* tests/pic_flag.at (override pic_flag at configure time):
New file, new test.
* Makefile.am (TESTSUITE_AT): Update.
* NEWS, THANKS: Update.
Suggestion by Joakim Tjernlund and Paolo Bonzini.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/ltmain.m4sh (func_ltwrapper_scriptname): Do not
call func_ltwrapper_executable_p again here, this function is
documented to allow being called with wrapper executables.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* bootstrap: When extracting PACKAGE and VERSION from AC_INIT
arguments, be sure to remove a 'GNU ' prefix and lowercase the
package name for PACKAGE. Also set PACKAGE_NAME and PACKAGE_URL
appropriately for GNU software. Pass these variables to the
make commands creating tests/package.m4 and other files.
* Makefile.am (edit): Fix substitution of PACKAGE_NAME and
PACKAGE_STRING.
* libltdl/config/announce-gen.m4sh: Use @PACKAGE@ not
@PACKAGE_STRING@.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD),
libltdl/config/ltmain.m4sh (func_mode_link): On Windows,
find potential libs regardless of file name case.
* tests/nocase.at: New test, to check for regressions
of the above.
* Makefile.am: Add above new test.
* doc/libtool.texi (libtool script contents): Document
new variables.
* NEWS: Updated.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/ltmain.m4sh (func_mode_uninstall): Do not
override global objdir variable, instead use odir for the
directory of to-be-removed files. Drop unneeded origobjdir.
Report by Charles Wilson.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/testsuite.at: Move AT_INIT call down to late in the
file, all prior code can go beforehand.
Call AT_COLOR_TESTS if defined.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_INIT): Set PACKAGE argument to `GNU Libtool',
so Autoconf knows this is GNU software. For Autoconf < 2.64,
if AC_PACKAGE_URL is not defined, substitute PACKAGE_URL.
* Makefile.am (edit): Substitute PACKAGE_URL.
($(srcdir)/tests/package.m4): Also depend on Makefile.am.
Define AT_PACKAGE_URL, for `tests/testsuite --help' output.
* libltdl/config/getopt.m4sh (func_help): Also extract comment
lines that mention a home page and general GNU help.
* libltdl/config/ltmain.m4sh: Use @PACKAGE_BUGREPORT@ instead of
hard-coded list address. Also mention Libtool home page and
general GNU help web page.
* libtoolize.m4sh: Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/ltdl.c (parse_dotla_file) [__WINDOWS__]: Read the
libdir entry in the .la file, but accept it only if it is not
a unix-style absolute name.
* tests/ltdl-libdir.at: New test that checks if ltdl finds an
installed module via the libdir variable in the .la file. On
MinGW, use a Windows-style libdir name including drive spec.
* Makefile.am: Add above.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libtoolize.m4sh: Replace hand written shell code with a
call to M4SH_GETOPTS. Move some premature initialization
from the preamble to the main part of the script. Exit with
an error on spurious additional non-option arguments.
(envopts): Integrate LIBTOOLIZE_OPTIONS pre-parsing into the
main option parsing loop.
(opt_copy): Use in place of and in the reverse sense of the
old opt_link variable.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/config/ltmain.m4sh: When not building a shared
library, use the non-pic objects to create a reloadable
object, because pic objects do not exist.
* Makefile.am (LTDL_BOOTSTRAP_DEPS): New variable.
(all-local): Use it to simplify dependencies.
(testsuite_deps_uninstalled): Add $(LTDL_BOOTSTRAP_DEPS).
Report by Peter Rosin.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/config/getopt.m4sh: Set $opt_debug to be either `:'
or `set -x' depending on whether --debug was parsed to match
usage in libtoolize.m4sh and ltmain.m4sh.
* clcommit.m4sh, libltdl/config/announce-gen.sh: Instead of
`$opt_debug && ...', use `test "$opt_debug" != ":" && ...'.
* clcommit.m4sh, libltdl/config/announce-gen.m4sh,
libltdl/config/getopt.m4sh, libltdl/connfig/mailnotify.m4sh:
Execute at the start of functions to cater to ksh, which
resets `-x' inside shell functions.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>