Commit Graph

116 Commits

Author SHA1 Message Date
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
e49e871547 * config/getopt.m4sh (func_version, func_usage, func_help):
Use `$SED -n' instead of `$SED RANGE {..}; d' as AIX sed cannot
handle the latter.
(func_help): start autoconf and automake in subshells to avoid
error messages from ash or Bourne shell if not available.
2004-12-30 12:03:39 +00:00
Ralf Wildenhues
8782d88386 * config/general.m4sh (func_quote_for_eval): Move backslash to
beginning of character class, to work around old Bash bug.
(func_quote_for_expand): Also test to avoid unnecessary fork.
2004-12-28 15:16:33 +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
Ralf Wildenhues
38dc34aca8 * config/general.m4sh: New variable quote_scanset..
(func_quote_for_eval, func_quote_for_expand)  ..use it to work around
SunOS ksh `case' backslash-escaping bug: protect character class by
variable expansion.  Reported by Alexander Kurz <alexander.kurz@qsc.de>.
2004-12-28 12:40:43 +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
Ralf Wildenhues
20540cfb42 * config/general.m4sh (func_quote_for_eval): Only fork if the
substitution matches.
2004-12-09 17:05:10 +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
28f3a396d6 If the user's login shell is something crazy like, oooh,
/bin/tcsh, trying to execute bourne shell helper scripts with
the `$SHELL /path/to/helper $helper_flags' idiom incase the
execute bits were lost by say, eeer, cvs, is gonna blow up in
our faces.  This changeset tries to save these people from
their shells^H^H^H^H^H^H^H^H^Hmselves :->

* tests/defs.m4sh (SHELL): Move definition from here...
* config/general.m4sh (SHELL): ...to here.
2004-11-24 14:04:15 +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
Gary V. Vaughan
83eaf5a14d * config/m4general.m4sh, config/mailnotify.m4sh,
clcommit.m4sh: Updated from cvs-utils--tla--1.0 to allow
parallel commits, and use safer tmpfiles.
2004-11-19 17:04:22 +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
Gary V. Vaughan
e7a9d306f6 * clcommit.m4sh, config/mailnotify.m4sh: Updated from
cvs-utils--tla--1.0 to fix quoting of metachars in patch names.
2004-10-22 12:10:31 +00:00
Gary V. Vaughan
6b55376125 * config/general.m4sh (sed_double_backslash): Undo an
over-optimisation.
2004-10-22 07:58:24 +00:00
Noah Misch
443bae7dd9 * 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.
2004-10-21 16:54:54 +00:00
Gary V. Vaughan
ff7eac153d * 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.
2004-10-20 20:43:58 +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