* libtool.m4: If ld is being used on IRIX to embed the
runtmie path, use -rpath, not -Wl,-rpath. Embed the runtime
path into libraries for AIX (supported on AIX 4.3.2+).
Embed the runtime path into Tru64 libraries, even though it
doesn't make much sense unless using Tru64 UNIX 5.1 with a
specific patch and >5.1.
* libtool.m4 (aix): When LDFLAGS="-Wl,-brtl,[other options]",
the "-brtl" special-case code for AIX never gets triggered
because were are being too specific about how we search for
"-brtl". Use case statement to avoid this. Remove extraneous
semicolon.
* ltmain.in: Recognize the IBM xlc compiler family.
Christoph Egger [Fri, 11 Oct 2002 15:04:05 +0000 (15:04 +0000)]
* libtool.m4 (darwin): Add -install_name to the link line only
when -dynamiclib is specified for a module.
* ltmain.in (darwin): Use -bind_at_load when linking shared
libraries.
* libtool.m4 (osf[345]): Append $major to soname_spec.
Reflect this in library_names_spec.
* ltmain.in (osf): Prefix $major with '.' for use as extension.
Gary V. Vaughan [Sun, 23 Jun 2002 21:47:20 +0000 (21:47 +0000)]
* libltdl/ltdl.c (argz_insert): Actually, BEFORE can be NULL
when *PARGZ_LEN is non-NULL, so the assertion to the contrary was
bogus.
Reported by Bob Friesenhahn <bfreisen@simple.dallas.tx.us>
and Albert Chin-A-Young <china@thewrittenword.com>
Paul Eggert [Mon, 6 May 2002 14:51:24 +0000 (14:51 +0000)]
* ltmain.in: Don't assume that "sort +2" works, as POSIX
1003.1-2001 says that "sort +2" is supposed to sort the file
named "+2". An example host that behaves like this is
textutils 2.0.21 with _POSIX2_VERSION=200112.
* libtool.m4 (LT_AC_PROG_SED): Use $ac_n and $ac_c rather than
$ECHO_N and $ECHO_C for new LT_AC_PROG_SED macro.
$ECHO_N and $ECHO_C defined for autoconf 2.50 and above only.
Robert Boehne [Sat, 2 Feb 2002 00:17:12 +0000 (00:17 +0000)]
* libtool.m4 (LT_AC_PROG_SED): New macro tests sed for truncation of
output. AC_REQUIRE the new macro.
* ltmain.in: Use $SED rather than plan old sed, as set by the new
macro LT_AC_PROG_SED.
Ossama Othman [Mon, 14 Jan 2002 19:04:40 +0000 (19:04 +0000)]
From Roger Leigh <rl117@york.ac.uk>:
* libtoolize.in (auxdirline): Fixed hardcoded value of
"configure.in." Instead use "$configure_ac" variable. Corrects
AC_CONFIG_AUX_DIR support when using new style `configure.ac.'
* doc/libtool.texi: Corrected typo. "Safety" not "Saftey".
Volker Christian [Thu, 10 Jan 2002 20:56:20 +0000 (20:56 +0000)]
* libltdl/ltdl.c (find_handle_callback): treat the result of a call
to access(2) correctly when deciding whether a library can be found
in a directory from user_search_path.
Robert Boehne [Wed, 28 Nov 2001 21:50:32 +0000 (21:50 +0000)]
With help from Michael Matz <matz@kde.org>:
* ltmain.in: Add a new command line argument
--preserve-dup-deps for preserving duplicate
dependent libraries.
* libtool.texi: Document it.
Gary V. Vaughan [Wed, 28 Nov 2001 00:42:30 +0000 (00:42 +0000)]
* libtoolize.in: The test for whether AC_PROG_LIBTOOL is defined
in aclocal.m4 had bitrotted slightly.
Reported by Takahiko Kawasaki <Takahiko_Kawasaki@cii.csk.co.jp>
* ltmain.in: Treat freebsd like openbsd, in that -lc/-lc_r should
not be explicitly used. ld handles this depending on the presence
of the -pthread option.
Mo DeJong [Thu, 15 Nov 2001 00:47:39 +0000 (00:47 +0000)]
* ltmain.in: Place parens around a generated relink_command
so it is run is a subshell. This avoids an install error
where libtool ended up in the wrong directory after
relinking a .la file.
Gary V. Vaughan [Sun, 28 Oct 2001 12:01:43 +0000 (12:01 +0000)]
From Tom Bates <Tom.Bates@compaq.com>:
* libtool.m4 [mips-compaq-nonstopux]: New port.
* ltmain.in [mips-compaq-nonstopux]: Support
$version_type == nonstopux.
* NEWS: Updated.
* libltdl/ltdl.c (foreach_dirinpath): change some types to size_t
from int because strlen() returns size_t. argz_len changed to
size_t because argzize_path() takes 3rd argument as size_t, not
int.
Based on lint run from Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Gary V. Vaughan [Sat, 27 Oct 2001 23:52:57 +0000 (23:52 +0000)]
* ltdl.m4 (AC_WITH_LTDL): New macro to add `--with-included-ltdl'
option to configure, but to find an appropriate ltdl library and
append the right options to link it.
Gary V. Vaughan [Sun, 30 Sep 2001 10:35:39 +0000 (10:35 +0000)]
* libtool.m4 (AC_LIBLTDL_CONVENIENCE): s/INCLTDL/LTDLINCL/ for
consistency with gettext's INTLINCL. Keep the old symbol too for
backwards compatibility.
(AC_LIBLTDL_INSTALLABLE): Ditto.
* doc/libtool.texi (Distributing libltdl): Adjust documentation.
* ltdl.m4 (AC_LTDL_DLLIB): Even though HP-UX 10.20 and 11.00
support shl_load *and* dlopen, dlopen works correctly only
with a patch. Because we want to avoid the situation where we
build on a system with the patch but deploy on a system without,
use shl_load exclusively if found.
Gary V. Vaughan [Fri, 21 Sep 2001 18:09:59 +0000 (18:09 +0000)]
* libtool.m4 (archive_cmds) [darwin1.[0-2]]: Darwin uses zsh-3.1.6
for /bin/sh, and that shell does not handle escaped quotes
properly yet.
Reported by Christopher Pfisterer <cp@chrisp.de>
Gary V. Vaughan [Thu, 13 Sep 2001 21:20:08 +0000 (21:20 +0000)]
* ltmain.in (exec_cmd): Don't overquote or we end up with this:
$ libtool --mode=execute echo foo
"foo"
Reported by Rob Browning <rlb@defaultvalue.org>
Gary V. Vaughan [Tue, 11 Sep 2001 19:28:19 +0000 (19:28 +0000)]
* libltdl/Makefile.am (OBJECTS): In addition to making $(OBJECTS)
depend on libtool -- which causes Automake 1.4 to generate the
ibtool script in this directory during bootstrap -- also add
libltdl_la_OBJECTS and libltdlc_la_OBJECTS, the Automake 1.5
equivalents.
* NEWS: Updated.
Tim Van Holder [Tue, 11 Sep 2001 03:18:52 +0000 (03:18 +0000)]
* libtool.m4 (no_undefine_flag) [solaris*]: Don't set this flag
if GCC < 3.0 with native ld, which introduces a dependency on
libgcc.a under certain circumstances, which in turn violates
-no-undefined. Also display a prominent configure time warning if
the buggy combination of GCC and ld is detected.
(AC_LIBTOOL_HEADER_ASSERT): libltdl falls foul of this bug
because assert requires __eprintf from libgcc.a. This macro
detects the combination of GCC and ld that produce this problem,
and pretends that assert.h does not exist...
* libltdl/ltdl.c (HAVE_ASSERT_H): ...so that assertions can be
disabled in libltdl. Otherwise the library would only be useable
when linking using gcc, or by manually adding libgcc.a to the link
line of the application that uses libltdl.
* ltdl.m4 (AC_LIB_LTDL): Require AC_LIBTOOL_HEADER_ASSERT.
* doc/PLATFORMS: Updated.
Gary V. Vaughan [Tue, 11 Sep 2001 01:22:03 +0000 (01:22 +0000)]
* libltdl/configure.in (AM_INIT_AUTOMAKE): Bump libltdl version to
1.2.
* libltdl/Makefile.am (libltdl_la_LDFLAGS): Bump libtool library
version info to 4:0:1.
Gary V. Vaughan [Tue, 11 Sep 2001 00:05:33 +0000 (00:05 +0000)]
* libtool.m4 (_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR): Oops. We
really ought to set PATH_SEPARATOR in here somewhere.
(AC_PROG_LD): Don't forget to AC_REQUIRE it! Be careful not to
set IFS="${IFS}$PATH_SEPARATOR" for PATH splitting, otherwise
spaces in directory names will be lost.
(AC_PROG_NM): Dittp.
* ltmain.in: Default IFS once, at the start.
Reported by Akim Demaille <akim@epita.fr>
Gary V. Vaughan [Mon, 10 Sep 2001 22:25:55 +0000 (22:25 +0000)]
From Brad <brad@comstyle.com>:
* doc/libtool.texi: Remove obsolete references to ltconfig.
* bootstrap: Don't bother creating an empty ltconfig and then
removing it.
* tests/quote.test: s/ltconfig/$0/
Gary V. Vaughan [Thu, 6 Sep 2001 21:44:10 +0000 (21:44 +0000)]
* libtool.m4 (archive_cmds, archive_expsym_cmds) [solaris*]: Changing
no_undefined_flag from `-z text' to `-z defs' (see entry below at
2001-04-11 Alexandre Oliva <aoliva@redhat.com>) has a problem.
when linking a shared library with gcc calling /usr/ccs/bin/ld (eg.
the gcc supplied with Solaris 8 companion CD), using the flag
-no-undefined, shared library linking will always fail because of
the unresolved symbols from libgcc.a. Consequently we have to
provide a path to libgcc.a when linking shared libraries in
conjunction with -no-undefined!
Gary V. Vaughan [Thu, 6 Sep 2001 21:32:02 +0000 (21:32 +0000)]
From Michael Pruett <mpruett@engr.sgi.com>:
* libltdl/ltdl.c (find_module): `0' valued arguments to
tryall_dlopen_module() must be explicitly cast to avoid compiler
warnings on some environments.
Gary V. Vaughan [Mon, 3 Sep 2001 22:06:19 +0000 (22:06 +0000)]
* demo/Makefile.am (helldl): Automake 1.4 can't find the target
if we use helldl$(EXEEXT), and Automake 1.5 barfs unless we do.
Using both targets to the left of the colon seems to work though!
Gary V. Vaughan [Mon, 3 Sep 2001 01:22:13 +0000 (01:22 +0000)]
* ltdl.m4 (AC_CHECK_TYPES): This macro was introduced in Autoconf
2.5x. Backported a fallback implementation (directly to ltdl.m4)
from Autoconf 2.50, so that we can still bootstrap with Autoconf
2.13.
Gary V. Vaughan [Sun, 2 Sep 2001 22:59:50 +0000 (22:59 +0000)]
From Albert Chin <china@thewrittenword.com>:
* libtool.m4 (_LT_AC_LANG_C_CONFIG) [aix4*]: Be careful with
shared namespaces for static and shared libs.
(AC_LIBTOOL_DLOPEN_SELF): If all else fails, try dld_link from GNU
DLD.
Gary V. Vaughan [Sun, 2 Sep 2001 18:54:31 +0000 (18:54 +0000)]
Backported the following patches from the development branch:
Based on a patch from Marius Vollmer <mvo@zagadka.ping.de>:
* NEWS: updated.
* ltdl.m4 (AC_LIB_LTDL): Check for unistd.h.
* libltdl/ltdl.c: Include unistd.h if it exists.
(LTDL_SEARCHPATH_VAR): Macro to prevent hardcoding
"LTDL_LIBRARY_PATH".
(LTDL_ARCHIVE_EXT): Macro to prevent hardcoding ".la".
(archive_ext): Have only one copy of ".la" in the readonly
segment of the compiled library.
(find_handle_callback): Don't bother trying to dlopen the file if
it doesn't exist.
(find_handle): Don't bother searching for files if no search_path
was supplied.
(file_not_found): A new function to determine whether the last
error was due to a file not found condition.
(try_dlopen): Renamed from lt_dlopen() and changed to have the
same footprint as tryall_dlopen. This involved a minor rewrite of
much of the internals of this function.
(lt_dlopen): A new function wrapped arounf try_dlopen().
(lt_dlopenext): If a file already has a suitable extension, don't
bother adding additional extensions and trying to open those.
Tidy up the rest of the code to prevent continued searching with
an eventual FILE_NOT_FOUND when a genuine failure earlier in the
search process could be legitimately reported.
* libltdl/ltdl.c (argz_create_sep): Don't forget to include the
terminating '0' when counting argz_len.
(argz_create_sep): When canonicalizing argz, don't forget to copy
the terminating '0', incase canonicalization has shortened argz.
(argz_stringify): Don't covert the final '0' to a separator.
* libltdl/ltdl.c (lt_dlhandle_next): Now we can loop through all
loaded module handles as originally intended.
* libltdl/ltdl.c (lt_dlseterror): Oops. This never worked
either, due to a pair of typos. Now fixed.
* libltdl/ltdl.c (N_ELEMENTS): Deleted. How come nobody noticed
there was no way this could have ever worked?
(lt_dlcaller_set_data): Now that valid caller_ids must be
non-zero, allocate an addition entry in the caller_data vector and
use a zero valued key as the end marker.
(lt_dlcaller_get_data): Iterate up to the end marker in one pass.
* libltdl/ltdl.c (lt_dlcaller_register): Caller ids are allocated
starting from value `1', so that clients can use a value of zero
to indicate that libltdl has not yet initialised.
* libltdl/ltdl.c (find_file_callback): Fix a multiple free()
bug.
(tryall_dlopen_module): Remove some unused variables.
* libltdl/ltdl.c (lt_dlinsertsearchdir): Calculate the address
of the end of user_search_path correctly.
* libltdl/ltdl.c (rpl_argz_stringify): New fallback implementation.
* ltdl.m4 (AC_LTDL_FUNC_ARGZ): Test for argz_stringify in libc.
* libltdl/ltdl.c (lt_argz_insertinorder): Renamed from
lt_argz_insert to make room for...
(lt_argz_insert): Wraps argz_insert with libltdl error handling.
(lt_dlpath_insertdir): Insert new path elements into an
argzized path.
(lt_dlinsertsearchdir): New function to insert new search
directories anywhere into user_search_path using the above.
(lt_dladdsearchdir): Rewritten to use lt_dlpath_insertdir.
* libltdl/ltdl.h (lt_dlinsertsearchdir): Prototype for export.
* doc/libtool.texi (Libltdl interface): Document it.
Dan McNichol [Thu, 12 Jul 2001 00:08:42 +0000 (00:08 +0000)]
From albert chin <china@thewrittenword.com>
* ltmain.in: Fix a case where the lockfile is not removed, thus
causing libtool to loop forever waiting for it to be removed.
Gary V. Vaughan [Thu, 5 Jul 2001 22:08:58 +0000 (22:08 +0000)]
* libtool.m4 (_LT_AC_LTCONFIG_HACK): Revert to 1.3.x
sematics, and always build static libs when the host machine
cannot build shared libs. Even if static libs were explicitly
disabled.
Gary V. Vaughan [Thu, 5 Jul 2001 20:19:56 +0000 (20:19 +0000)]
* libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE) [HPUX]: Define
lt_cv_sys_global_symbol_to_c_name_address to be a sed expression
for mangling the output of the symbol pipe into a brace delimited
C declaration of symbol name and address.
* ltmain.in: Use it to generate the fooS.c symbol name to address
map.
Gary V. Vaughan [Sat, 30 Jun 2001 20:27:42 +0000 (20:27 +0000)]
Porting test improvements from multi-language-branch:
* tests/defs: Find and set the value of CC probed by libtool.m4
* tests/link-2.test: Use a .lo wrapper script, and the value of
CC set by defs instead of hardcoding gcc.
* tests/link.test: Use the value of CC set by defs instead of
hardcoding gcc.
* tests/quote.test: Ditto.
* tests/suffix.test: Ditto.
Gary V. Vaughan [Fri, 29 Jun 2001 21:58:16 +0000 (21:58 +0000)]
From Bruno Haible <haible@ilog.fr>
* libtool.m4: undefine the m4 builtin `symbols', so that the
string `symbols' can be used in the rest of the code without
causing errors with autoconf-2.13.