Peter Ekberg [Mon, 1 Nov 2004 17:25:55 +0000 (17:25 +0000)]
Sometimes, a wrapper script is generated for an executable that,
itself, does not link against an uninstalled library. It appears
that this can happen if you are building a project where:
(1) there is a library
(2) there is an executable that does not, itself, link against
that library
In this case, notinst_deplibs is empty, and when the wrapper
script is loaded by libtool during ./libtool mode=install, there
is a check for "is notinst_deplibs empty". In this case, it is,
so libtool reports an error.
I don't think it is wrong to have a wrapper script for an exe that
*technically* doesn't need it. But instead of checking for
notinst_deplib nonempty as a proxy for "did wrapper script get
sourced into my environment properly" a different var should be
used.
* config/ltmain.m4sh (func_mode_install): set new variable
`generated_by_libtool_version' in wrapper script when using
libtool_install_magic. When verifying that wrapper script was
properly sourced, check that `generated_by_libtool_version' is
non-empty, instead of using notinst_deplibs.
Charles Wilson [Mon, 1 Nov 2004 15:05:23 +0000 (15:05 +0000)]
* config/ltmain.m4sh (func_mode_install): On Windows based hosts,
ensure that import libraries don't get stripped.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): On Windows based hosts,
use postinstall_cmds to strip DLL (not import lib!) when symbol
stripped installation was requested.
Gary V. Vaughan [Fri, 22 Oct 2004 17:25:35 +0000 (17:25 +0000)]
* clcommit.m4sh: Updated again, to support file list limited
commits to CVS, and to fix another occurence of the bash bug
that was preventing non-tla users from sending a commit mail.
Gary V. Vaughan [Fri, 22 Oct 2004 07:15:30 +0000 (07:15 +0000)]
* AUTHORS: Reformatted to better reflect the current state of
Libtool maintainership.
* THANKS: Reformatted to give maintainers a quick way to look
up who has supplied FSF paperwork.
Noah Misch [Thu, 21 Oct 2004 16:51:07 +0000 (16:51 +0000)]
* config/general.m4sh (sed_double_backslash): Improve this sed
expression to correct left anchored $ input to
double_quote_subst, as well as backslash escaped $ preceded by
any odd-numbered amount of characters.
Gary V. Vaughan [Wed, 20 Oct 2004 20:50:53 +0000 (20:50 +0000)]
* config/general.m4sh (sed_double_backslash): New sed expression
to escape $ properly in combination with double_quote_subst.
(func_quote_for_eval): Four space indent margin for functions!
(func_quote_for_expand): Use $sed_double_backslash.
(func_show_eval): New function that echos an escaped but variable
expanded command, and then evaluates it.
Noah Misch [Wed, 20 Oct 2004 08:41:34 +0000 (08:41 +0000)]
* m4/libtool.m4 (sed_quote_subst): Remove superfluous backslashes
from the match character set.
(double_quote_subst): Ditto.
* lib/general.m4sh (sed_quote_subst): Ditto.
(double_quote_subst): New variable, copied from
m4/libtool.m4. Much the same as sed_quote_subst, but variable
references are not quoted.
(func_quote_for_eval): Given any $foo; $bar and
$foo must be identical after the following commands:
func_quote_for_eval "$foo"
eval "bar=$func_quote_for_eval_result"
(func_quote_for_expand): In a similar vein to to func_quote_for_eval,
except that variable expansions are not protected when quoting the
command for subsequent display.
* config/ltmain.m4sh: Factor away use of $sed_quote_subst now that
it has been subsumed into func_quote_for_eval.
(func_mode_link): Instead of `2004-10-14 Peter O'Gorman' below,
use func_quote_for_expand so that ${wl} is expanded properly in
the $show expression.
Peter O'Gorman [Thu, 14 Oct 2004 14:13:38 +0000 (14:13 +0000)]
* config/ltmain.m4sh: Revert most of my last commit, only eval
$show "$cmds", and only when building a library. I'm a wimp.
Thanks Gary for pointing out errors in previous commit.
Gary V. Vaughan [Wed, 13 Oct 2004 15:34:09 +0000 (15:34 +0000)]
* tests/cdemo-undef.test: New test for hosts that allow shared
libraries with undefined symbols, but have no C++ compiler
installed.
* tests/Makefile.am (COMMON_TESTS): Add it.
Charles Wilson [Wed, 13 Oct 2004 13:47:54 +0000 (13:47 +0000)]
* config/ltmain.m4sh: add foo/bin for every foo/lib
in dllsearchpath when creating wrapper script. Fixes
depdemo-relink test failure.
* config/ltmain.m4sh (func_mode_link): don't relink
on cygwin/mingw; no need. But do ensure that wrappers
are created unless doing a purely static build.
Bob Friesenhahn [Sun, 10 Oct 2004 23:24:39 +0000 (23:24 +0000)]
* config/getopt.m4sh: Under MinGW, reported paths may include ':'
so ':' should not be used as the sed delimiter. Use '*' instead
since it is very unlikely to appear in a path.
Gary V. Vaughan [Sat, 9 Oct 2004 20:43:23 +0000 (20:43 +0000)]
* m4/libtool.m4 (_LT_LANG_F77_CONFIG): Make sure the save and
restore code for CC is nested at the same depth.
(_LT_LANG_CXX_CONFIG): Ditto, but for several variables.
Gary V. Vaughan [Fri, 8 Oct 2004 21:44:43 +0000 (21:44 +0000)]
Update to the latest commit and mailnotify scripts from
gary@gnu.org--2004/cvs-utils--tla--1.0:
* commit, config/mailnotify: Removed. Now built from...
* clcommit.m4sh, config/mailnotify.m4sh: ...these new sources.
* Makefile.maint (commit, config/mailnotify): How to build them.
* bootstrap: If we have a checked out tree (i.e. clcommit.m4sh
is present), then build them.
Charles Wilson [Fri, 8 Oct 2004 16:17:40 +0000 (16:17 +0000)]
* tests/pdemo-inst.test: pdemo-inst should depend on pdemo-make.
* config/ltmain.m4sh: Windows and Cygwin reserve the .lnk
extension to represent shortcuts. Use the extension ".lnkscript"
rather than ".lnk" for the piecewise linking ld script in order to
avoid the conflict.
Gary V. Vaughan [Fri, 8 Oct 2004 15:50:56 +0000 (15:50 +0000)]
Fix some issues that mangled the reexecution path to a script,
and thus prevented it from finding itself:
* lib/general.m4sh (progname): Don't actually change the name of
the script if it begins with a `-', just prepend `./'.
(progpath): Add a new clause that first searches the execution
PATH, and then finally assumes this script is in the current
working directory if $progname has no directory separators (e.g
when invoked as `$SHELL progname').
Gary V. Vaughan [Thu, 7 Oct 2004 02:17:01 +0000 (02:17 +0000)]
* m4/libtool.m4 (_LT_FORMAT_COMMENT): Shell meta-characters in
_LT_DECL descriptions were not being escaped before injection into
TAG CONFIG here documents in config.status.
Peter O'Gorman [Wed, 6 Oct 2004 13:48:56 +0000 (13:48 +0000)]
* m4/libtool.m4 (_LT_PROG_CXX, _LT_PROG_F77): New macros to work
around the deficiencies in AC_PROG_CXX and AC_PROG_F77.
* configure.ac: Cleaned up, having moved the checks for compilers
which do not exist to libtool.m4.
Gary V. Vaughan [Mon, 4 Oct 2004 17:06:35 +0000 (17:06 +0000)]
* m4/libtool.m4 (_LT_PROG_ECHO_BACKSLASH): Don't confuse $ECHO
with $lt_ECHO, or we always get a libtool with ECHO=echo, rather
than testing for a mechanism that quotes properly.
* NEWS: Updated.
Gary V. Vaughan [Mon, 4 Oct 2004 08:59:34 +0000 (08:59 +0000)]
Without this change, the distributed libtool tarball has a
dependency on autom4te. There was some inconsistency in the
filenames: now we have foo.m4sh -> m4sh -> foo.in -> configure
-> foo[.sh]. Bootstrap runs the m4sh steps and the resulting .in
files are distributed.
* tests/Makefile.am (EXTRA_DIST): Distribute defs.m4sh.
* Makefile.am (EXTRA_DIST): Distribute libtoolize.m4sh.
(libtoolize.in, libtoolize): Split into bootstrap and runtime
stages.
($(top_srcdir)/tests/defs.in, $(top_srcdir)/tests/defs): Ditto.
($(top_srcdir)/config/ltmain.sh): Swap ltmain.m4sh and ltmain.in
names.
* bootstrap: Make libtoolize.in and tests/defs.in.
* NEWS: Updated.
Bob Friesenhahn [Sun, 3 Oct 2004 23:12:35 +0000 (23:12 +0000)]
* config/ltmain.in: Change $XSED to $Xsed to fix hang noticed
under MinGW.
* tests/defs.in: Support VERBOSE=debug to enable shell tracing
while running tests.
Gary V. Vaughan [Sun, 3 Oct 2004 17:12:53 +0000 (17:12 +0000)]
* libltdl/Makefile.am (libltdlc_la_LIBADD): Don't use
libdlloader_la_OBJECTS, an undocumented Automake internal
variable...
(libltdlc_la_SOURCES): ...use libdlloader_la_SOURCES here
instead.
Reported by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Ralf Wildenhues [Sun, 3 Oct 2004 13:50:10 +0000 (13:50 +0000)]
* libltdl/lt__alloc.h: Declare exported functions with LT_SCOPE
for mingw32.
* libltdl/lt__dirent.h: Ditto.
* libltdl/argz._h: Ditto. Be careful about not requiring
additional libltdl files when used outside of libltdl.
* libltdl/slist.h: Ditto.
* HACKING: Add a section on libltdl implementation layering.
Gary V. Vaughan [Sun, 3 Oct 2004 11:20:53 +0000 (11:20 +0000)]
* tests/quote.test: echo is called ECHO now. Make sure we extract
the value of ECHO from the libtool script.
Reported by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Gary V. Vaughan [Sat, 2 Oct 2004 15:56:20 +0000 (15:56 +0000)]
* m4/libtool.m4 (hardcode_shlibpath_var) [darwin7*]: Revert my
hack from 2004-09-30 now that I've removed /lib/hello.la and the
tests work properly for me again.
Jim Tison [Sat, 2 Oct 2004 12:57:45 +0000 (12:57 +0000)]
Initial support for s390x-ibm-tpf:
* m4/libtool.m4: Correct obvious spelling errors in remarks.
(_LT_ENABLE_LOCK): Make s390x-ibm-tpf hosts adopt elf64_s390
conventions.
(_LT_SYS_DYNAMIC_LINKER): Set defaults for s390x-ibm-tpf host.
(_LT_CHECK_MAGIC_METHOD): Skip all dependency checks for
s390x-ibm-tpf hosts.
(_LT_LINKER_SHLIBS): Make s390x-ibm-tpf hosts adopt GNU/Linux OS
attributes.
* NEWS: Updated.
Ralf Wildenhues [Fri, 1 Oct 2004 10:24:18 +0000 (10:24 +0000)]
* libltdl/lt__alloc.c (lt__memdup): Allocation can fail, so we
need to guard against null pointer dereference here.
* libltdl/ltdl.c (lt_dlcaller_register): Ditto.
Gary V. Vaughan [Thu, 30 Sep 2004 20:53:17 +0000 (20:53 +0000)]
* m4/libtool.m4 (hardcode_shlibpath_var) [darwin7]: My Panther
workstation doesn't hardcode the shared library path, although it
used to, so this is more likely a function of the binutils and/or
gcc I am using at the moment. The hardcode value setting code for
the configure script sucks at the moment though...
* (TODO): ...and needs to do a test compile instead of a table
lookup before 2.0 final.
* m4/libtool.m4 (_LT_LINKER_SHLIBS) [aix]: In archive_expsym_cmds,
move -bnoentry linker option before $compiler_flags to honor any
possible -e entries in LDFLAGS.
Gary V. Vaughan [Sat, 25 Sep 2004 13:38:53 +0000 (13:38 +0000)]
* config/ltmain.in (func_mode_link): When linking an installed
libtool library on the command line using -lfoo we need to find
the library in the search paths and add it's dependency_libs to
the link in the conv pass so that any libtool libs listed are
correctly expanded in the link pass.
Gary V. Vaughan [Fri, 24 Sep 2004 16:08:33 +0000 (16:08 +0000)]
* config/general.m4sh (Xsed): Set a default when not used from
ltmain.in.
(ECHO): Audit for (and correct!) uses of $ECHO with more than one
argument, which breaks when ECHO='printf %sn', and with possible
`-' as first character of the argument, which breaks `print -r'
and some implementations of `echo'.
* config/ltmain.in, tests/defs.in, libtoolize.in (ECHO): Ditto.
Reported by Albert Chin-A-Young <china@thewrittenword.com>
Gary V. Vaughan [Fri, 24 Sep 2004 10:15:16 +0000 (10:15 +0000)]
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [openbsd3.3]: Set
need_version to yes or no depending on the os release.
Reported by Dalibor Topic <robilad@kaffe.org>
Gary V. Vaughan [Thu, 23 Sep 2004 13:07:15 +0000 (13:07 +0000)]
Since defs can change (path to grep for example) when it is made
for a different host, it can't be shipped. That also means that
defs will always be generated in the build tree, so each test case
can have the srcdir discovery factored away into tests/defs.in:
Gary V. Vaughan [Thu, 23 Sep 2004 01:16:41 +0000 (01:16 +0000)]
* configure.ac (M4SH): AC_SUBST m4sh expander.
* config/general.m4sh, config/getopt.m4sh: New files with factored
out functionality from...
* config/ltmain.in, libtoolize.in: ...here. m4_include the shared
code, and call AS_SHELL_SANITIZE. Also quote all `[' and `]' to
survive m4 run.
(func_serial): No need to double up m4sh quotes after a `#'.
(func_check_macros): Escape `dnl' to stop m4sh interpreting it as
a macro.
* tests/defs.in: New file expanded into tests/defs by autom4te.
* m4/libtool.m4 (_LT_DECL_EGREP): Also require fgrep for the tests
that use it.
* Makefile.am ($(top_srcdir)/config/ltmain.sh): Now built with
M4SH.
(libtoolize): Ditto.
* bootstrap: Set M4SH for call to make.
* HACKING: No need to sync to AS_SHELL_SANITIZE by hand any more.
Gary V. Vaughan [Thu, 23 Sep 2004 00:13:02 +0000 (00:13 +0000)]
* m4/libtool.m4: _LT_DECL uppercase ECHO.
* config/ltmain.in: Use it throughout.
(func_mkdir_p): Now matches the other implementations in
tests/defs and libtoolize.in.
* tests/sh.test: Updated to detect ECHO misuse.
Gary V. Vaughan [Wed, 22 Sep 2004 23:31:27 +0000 (23:31 +0000)]
* config/ltmain.in (func_mode_link): Propagate a convenience
library's dependency libs correctly when it is being linked into a
libtool library. Deplibs are now propagated whether libdir is set
or not.
Andreas Schwab [Wed, 22 Sep 2004 22:46:12 +0000 (22:46 +0000)]
The dlpreopen pass over libraries reverses the elements in the
$deplibs list. This causes problems when the link pass tries to
find libraries when they are located in non-standard places
denoted by -L options. Due to the reversed order these -L options
occur after the libraries that need them, and they are not found:
* config/ltmain.in: (Un)Reverse $deplibs list at the start of the
link pass in lib mode.
Charles Wilson [Wed, 22 Sep 2004 08:50:34 +0000 (08:50 +0000)]
* ltmain.in (func_generate_dlsyms) [cygwin, mingw]: when creating
a .exp file for an executable, also create a .def file, and add
that file to the link command via SYMFILES. This causes binutils
to generate an .edata section, and allows self dlopening to work.
* NEWS: Updated.
Charles Wilson [Wed, 22 Sep 2004 07:40:25 +0000 (07:40 +0000)]
* config/ltmain.in (func_generate_dlsyms): Addresses in
_preloaded_symbols[] cannot go into .rdata section if symbols are
DATA imported from DLL, on windows, because runtime relocations
must happen.
* m4/libtool.m4 (_LT_LINKER_SHLIBS([TAGNAME])): Build exports for
symbols in .rdata sections.
Gary V. Vaughan [Sun, 19 Sep 2004 23:21:45 +0000 (23:21 +0000)]
The checks in assign.test are trying to catch case of this ilk:
`foo=bar break', but unfortunately they also choke on `foo=bar;
break' and `foo=bar && break'. Writing a sophisticated test to
catch just the intended case seems like more trouble than it's
worth, but leaving the test in causes the testsuite to fail on
valid m4sh output:
* tests/assign.test: Removed; chokes on perfectly valid shell
syntax.
* tests/Makefile.am (COMMON_TESTS): Remove assign.test.
* tests/defs.in (scripts): Don't check the m4sh inputs, go back
to checking the generated ltmain.sh script.
Gary V. Vaughan [Fri, 17 Sep 2004 17:12:17 +0000 (17:12 +0000)]
* config/ltmain.in (func_echo): Except for multi-line warnings and
errors, always use func_echo. $show is for command output, and
$echo is for internal use in backtick expressions and similar.
Gary V. Vaughan [Fri, 17 Sep 2004 14:13:04 +0000 (14:13 +0000)]
Missed a couple of MKDIR_P references in ltmain.in in my last
patch; fix them carefully. Introduce an opt_dry_run to ltmain.in
so that the implementations of func_mkdir_p can converge, and a
func_mktempdir to do a better job of temporary directory creation:
* libtoolize.in (func_mkdir_p): Don't fail if the directory wasn't
created in dry run mode.
* tests/defs (func_mkdir_p): Ditto. We don't actually have a dry
run mode for the tests, but the function is written carefully to
be kept in synch and work correctly here too.
* config/ltmain.in (func_mkdir_p): Ditto. This copy of the
function now only differs in its use of $echo over $ECHO.
(func_extract_archive): Removed first redundant mkdir call.
(func_mktempdir): New function that tries to avoid races when
making temporary directories.
(opt_dry_run): Set this if --dry-run is given at the CLI, or if
tests/mdemo-dryrun.test has forced the value of $run.
(func_mode_install): Call $MKDIR directly and error out if the
directory cannot be created.
(func_mode_link): Rather than copying func_mkdir_p into the
wrapper script as a replacement for $MKDIR_P, we know that the
script won't be called my `make -j', so write the current value of
$MKDIR.
Gary V. Vaughan [Thu, 16 Sep 2004 14:57:02 +0000 (14:57 +0000)]
My most recent `2004-09-02 Gary V. Vaughan' patch for mkdir_p
below is horrendously broken since it makes the installed libtool
try to run the mkinstalldirs or install-sh helper scripts. This
patch fixes the `make -j' mkdir race condition internally:
* libtoolize.in (func_mkdir_p): New slice and dice algorithm
to build the directory tree one dir at a time, ignoring errors
until the end incase they are transient due to a concurrent
identical mkdir.
* tests/defs (func_mkdir_p): Ditto.
* config/ltmain.in (func_mkdir_p): Ditto, except that ltmain.in
uses $echo rather than $ECHO, and uses $show and $run to interact
correctly with the command line.
* configure.ac (AM_INIT_AUTOMAKE): 1.8 is sufficient again.
* Makefile.am (edit): Don't substitute automake's $(mkdir_p).
* NEWS: Updated.