Commit Graph

50 Commits

Author SHA1 Message Date
Peter O'Gorman
6c304c9d89 * config/ltmain.m4sh [darwin]: Don't add installed libs to
temp_rpath when building executables on darwin, or other systems
which use hardcode_automatic. It may break our wrapper scripts.
2005-02-03 03:53:12 +00:00
Ralf Wildenhues
f6c870a584 * config/getopt.m4sh (func_version, func_usage, func_help,
* config/ltmain.m4sh (func_mode_help, func_config, func_features):
Exit with nonzero status on write failures.
2005-02-02 22:15:02 +00:00
Ralf Wildenhues
37a552884d * HACKING (Editing `.m4sh' Files): Document preferred function
header layout.
* config/ltmain.m4sh (func_win32_libid, func_infer_tag)
(func_generate_dlsyms, func_extract_an_archive, func_extract_archives):
adjust to fit.
2005-02-01 07:34:34 +00:00
Ralf Wildenhues
41a67fb432 * config/ltmain.m4sh, m4/libtool.m4: Change `( cmd ) 2>/dev/null' to
`{ cmd; } 2>/dev/null', when cmd has no side effects and might be a
builtin.  Note that it is unspecified whether cmd will run within a
subshell (e.g. Bourne shells) or within the current shell (most modern
shells).
2005-01-31 16:17:06 +00:00
Craig Dooley
94a93ca621 * NEWS, m4/libtool.m4, config/ltmain.m4sh [dragonfly]:
Add support for DragonFly.
2005-01-26 17:38:51 +00:00
Ralf Wildenhues
d31d296136 * config/ltmain.m4sh: Fix endless loop in cmdline parsing. 2005-01-25 20:28:04 +00:00
Albert Chin-A-Young
1bd0a5d138 * config/ltmain.m4sh (func_mode_link) [irix]: Preserve processor
option for SGI Compiler (-r[0-9][0-9]*).
2005-01-25 08:16:35 +00:00
Ralf Wildenhues
3dfd1f265b * m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Define Bourne and XSI
variants of new function func_stripname for stripping literal
prefixes and suffixes.
* config/ltmain.m4sh (all over): Use func_stripname.
2005-01-24 13:28:47 +00:00
Peter O'Gorman
1dfabd5cdc * config/ltmain.m4sh (func_mode_link): Don't pass through
compiler-like thread flags when using $LD to do the linking.
Use compiler_flags instead.
Reported by Mark_Andrews@isc.org.
2005-01-16 14:07:35 +00:00
Ralf Wildenhues
1cb1fdb666 * config/ltmain.m4sh: New option --verbose'/-v' to enable
override of `--silent'.  Verbose is the default behavior.
* doc/libtool.texi (Invoking libtool): Document it.
2005-01-12 16:35:55 +00:00
Peter O'Gorman
92ee209330 * config/ltmain.m4sh (func_mode_link): Fix
inherited_linker_flags so it puts it on the link line when
linking shared libraries as well as when linking executables.
* tests/inherited_flags.at: test inherited_linker_flags.
* tests/Makefile.am: Add test.
* tests/testsuite.at: Add test.
Reported by: Albert Chin-A-Young <china@thewrittenword.com>
2005-01-10 15:44:13 +00:00
Ralf Wildenhues
cb791887dc * tests/sh.test: After set dummy [...]', check for shift'
within the same and following line.
* config/ltmain.m4sh (func_enable_tag, func_mode_install)
(func_mode_link): Sprinkle `shift's all over to conform to this.
2005-01-10 10:59:37 +00:00
Ralf Wildenhues
52ba41bdad * Makefile.am, bootstrap, clcommit.m4sh, libtoolize.m4sh,
config/ltmain.m4sh: Replace `set --' with `set dummy [...]; shift'
for portability.  tests/sh.test: Test for this.
2004-12-28 13:50:23 +00:00
Ralf Wildenhues
6f8f4b5a86 * libtoolize.m4sh, config/ltmain.m4sh (most functions):
New variable $opt_debug is either `:' or `set -x' depending on --debug.
Execute at most function entries to cater for ksh which resets `-x'.
* tests/defs.m4sh: Ditto for VERBOSE=debug.
2004-12-28 13:31:12 +00:00
Ralf Wildenhues
50c4db3fb9 * config/ltmain.m4sh (func_extract_archives): Not all shells grok
`read -r' (unnecessary in this case).
Reported by Ralf Menzel <menzel@ls6.cs.uni-dortmund.de>.
2004-12-28 12:54:49 +00:00
Peter O'Gorman
fc9914a1d1 * config/ltmain.m4sh (func_extract_archives,func_extract_an_archive):
On darwin, uniq can not take the flags -cd together, thanks to Ralf
for the fix, also ar does not accept N, so we use the fact that
ar x libfoo.a foo.o will always extract the first foo.o in the
archive and we then delete foo.o from the archive, which will also
delete only the first foo.o, then rinse and repeat. Also add markers
for the testuite.
* m4/libtool.m4 (_LT_CONFIG): Add a marker so that we can use a sed
expression to find the shell functions in libtool.
* tests/functests.at: Test this feature.
* tests/testsuite.at: Add the test.
* tests/Makefile.am: Add the test.
2004-12-20 15:03:39 +00:00
Ralf Wildenhues
6e7507d7b8 * config/ltmain.m4sh (func_extract_archive): Send stderr of $NM
to /dev/null.  Reported by Martin Waitz <tali@admingilde.org>.
2004-12-10 17:18:59 +00:00
Albert Chin-A-Young
27c1434f7d * config/ltmain.m4sh: Preserve -model [arg] option, used
with the Tru64 UNIX C++ compiler. This option selects the
layout of C++ classes, name mangling, and exception handling.
2004-12-09 17:59:15 +00:00
Ralf Wildenhues
d1a251240e * config/ltmain.m4sh (func_mode_finish) [solaris]: Fix [] escaping bug. 2004-12-09 17:18:48 +00:00
Ralf Wildenhues
5819188d83 * config/ltmain.m4sh (all over the map): Make use of func_basename and
func_dirname in most occasions.
2004-12-09 17:12:41 +00:00
Ralf Wildenhues
b7fc99d0c0 * config/ltmain.m4sh: Set marker for insertion of shell functions. 2004-12-09 17:07:28 +00:00
Bob Friesenhahn
bf66ef8b8d * config/ltmain.m4sh: Remove code which is no longer needed
now that temp_rpath only contains fully-qualified elements.
2004-12-02 16:40:55 +00:00
Ralf Wildenhues
b430e15d24 * config/general.m4sh: basename sed-subst is anchored and thus
does not need the `g' flag.
(func_quote_for_eval): Return both the possibly double-quoted
backslashified as well as only the backslashified argument.
* config/ltmain.m4sh (func_mode_link): Use both return values,
to save another sed_quote_subst application per cmdline arg.
2004-11-30 20:46:23 +00:00
Ralf Wildenhues
81b4ad79e3 * config/ltmain.m4sh (func_lalib_p): Update function
description. (func_lalib_unsafe_p): New function with same
functionality but written without forks; this function is safe
to use for cases where the argument either does not exist or
is required to be a lalib for correct operation.
* NEWS: Mention the fact that stdin is not to be used.
* (func_mode_execute, func_mode_install, func_mode_link):
Use func_lalib_unsafe_p where appropriate.
* (func_mode_execute): For the program wrapper, use
func_ltwrapper_p instead of func_lalib_p.
2004-11-29 21:18:26 +00:00
Ralf Wildenhues
6e51fb6c28 * config/ltmain.m4sh (func_mode_link): $dlsymsobj is really
$symfileobj, bug exposed only in the static preloading case
(symfileobj is created, but not linked into output).
2004-11-28 19:55:40 +00:00
Bob Friesenhahn
c9ceb28f7a * config/ltmain.m4sh: Add fully-qualified paths to temp_rpath
rather than unqualified paths in order to avoid possible errors
when computing the fully-qualified path later.
2004-11-28 01:35:45 +00:00
Gary V. Vaughan
62a363718f * config/ltmain.m4sh (func_mode_install): Now that func_mktempdir
has been improved, the default directory template is perfectly
fine.
2004-11-22 22:36:16 +00:00
Ralf Wildenhues
3e437f3043 * config/ltmain.m4sh (func_mode_link), tests/objectlist.test:
Make sure the argument to `-objectlist' may contain spaces.
2004-11-22 15:43:44 +00:00
James E Wilson
95b4514791 * config/ltmain.m4sh (func_mode_link), tests/Makefile.am,
Fix error message with `-objectlist' file that does not exist.
tests/objectlist.test:  New test for this.
2004-11-10 10:14:12 +00:00
Peter Ekberg
e5d7f88100 * config/ltmain.m4sh (func_mode_link): forward thread
related flags to dependent applications and libraries
by adding them to `inherited_linker_flags'.
2004-11-08 15:19:45 +00:00
Peter Ekberg
81ac758669 * ltmain.m4sh (cwrappersource): clean up other warning on MinGW. 2004-11-05 18:04:39 +00:00
Ralf Wildenhues
93b5b6e02f * ltmain.m4sh (cwrappersource): Cast isalpha arguments correctly. 2004-11-03 14:11:52 +00:00
Peter Ekberg
2f06b761c4 * ltmain.m4sh (cwrappersource): clean up warnings and
#include errors on MinGW.
2004-11-03 14:10:32 +00:00
Peter Ekberg
9097c9c8e9 * config/ltmain.m4sh (cwrappersource): clean up warnings and
#include errors.
2004-11-01 18:22:54 +00:00
Peter Ekberg
f862366c5f 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.
2004-11-01 17:28:30 +00:00
Charles Wilson
5817d126bf * 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.
2004-11-01 16:29:15 +00:00
Noah Misch
4d01904ca5 * config/ltmain.m4sh (func_lalib_p, func_ltwrapper_p): New
functions that abstract .la sanity checking.
(func_mode_execute, func_mode_install, func_mode_link)
(func_mode_uninstall): Use them.
2004-10-24 16:34:29 +00:00
Gary V. Vaughan
17e61a7564 * config/ltmain.m4sh (opt_silent): Whether --silent was given.
(run, show): Deleted.  All callers converted to opt_dry_run,
opt_silent or calls to func_show_eval.
* tests/mdemo-dryrun.test: Adjust.
2004-10-24 15:17:23 +00:00
Peter O'Gorman
596e2489bd * config/ltmain.m4sh (func_mode_link): Make Gary's new tests
pass. When the output wrapper script is not in the current
directory, we can not use an rpath which is relative to the
current directory. Use an absolute path instead.
2004-10-23 12:04:34 +00:00
Noah Misch
ba1e69caa4 * 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.
2004-10-20 08:45:10 +00:00
Gary V. Vaughan
f5eb2e88c3 * config/ltmain.m4sh (func_mode_finish): solaris-2.6 also has
crle(1).
Reported by Albert Chin-A-Young <china@thewrittenword.com>
2004-10-16 15:02:05 +00:00
Peter O'Gorman
609e9db7f0 * 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.
2004-10-14 14:13:43 +00:00
Gary V. Vaughan
a6949eb270 * config/ltmain.m4sh (func_mode_finish): Mention crle(1) on
solaris 2.7 and higher in the finalisation notes.
Reported by Kurt J. Lidl <lidl@pix.net>
2004-10-13 16:06:49 +00:00
Peter O'Gorman
274b26c703 * config/ltmain.m4sh: Make sure that we $show what we will $run,
use eval $show if we do $run eval.
2004-10-13 14:55:59 +00:00
Charles Wilson
9a2bd4eb89 * 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.
2004-10-13 13:48:23 +00:00
Charles Wilson
c57c62b12e * config/ltmain.m4sh: Really don't require versions of GNU
sed newer than 3.02 for Cygwin and MinGW, and don't break
dryrun mode.
2004-10-11 04:15:43 +00:00
Albert Chin-A-Young
c9ac8fcb3b * config/ltmain.m4sh: Don't require versions of GNU sed newer than
3.02 for Cygwin and MinGW.
2004-10-10 22:15:09 +00:00
Charles Wilson
56295ae2e9 * 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.
2004-10-08 16:16:10 +00:00
Peter O'Gorman
96786b270c * config/ltmain.m4sh [darwin]: Make the -dylib_file flag work on
older darwins too. Reported by Christoph Egger.
2004-10-05 04:16:10 +00:00
Gary V. Vaughan
e5d70992b8 * 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.

* config/ltmain.m4sh: Need to include getopt.m4sh earlier so that
progpath is set before it is called to --no-reexec.
* NEWS: Updated.

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.
2004-10-04 18:32:45 +00:00