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.
Gary V. Vaughan [Fri, 29 Jun 2001 02:38:04 +0000 (02:38 +0000)]
* mdemo/Makefile,am (foo1_la_LIBADD): Add libsub.la, since foo1
does use symbols from libsub.la -- only platforms that allow
undefined symbols in libraries were able to cope with this
previously.
Reported by Robert Collins <robert.collins@itdomain.com.au>
Gary V. Vaughan [Fri, 29 Jun 2001 01:43:19 +0000 (01:43 +0000)]
From Bruno Haible <haible@ilog.fr>
* NEWS: Updated.
* libtool.m4 (_LT_AC_LTCONFIG_HACK): Make sure ac_objext is
set to `lo' when testing for compiler output to *.lo filenames.
Gary V. Vaughan [Wed, 27 Jun 2001 18:44:03 +0000 (18:44 +0000)]
From brad@openbsd.org:
* NEWS: Updated.
* libtool.m4 (_LT_AC_LTCONFIG_HACK) [openbsd]: Improved support
for various openbsd platforms.
* ltmain.in: Ditto,
Alexandre Oliva [Sun, 20 May 2001 18:10:01 +0000 (18:10 +0000)]
* ltmain.in (exec_cmd): New variable. Don't exec programs within
the big `case'; set the variable instead, and exec the cmd
afterwards, so that the shell gets a chance to clean up here-doc
files.
* NEWS: Update.
Peter Eisentraut [Tue, 24 Apr 2001 23:40:42 +0000 (23:40 +0000)]
* libtool.m4: Support $host_os as /sysv5uw7*/ from newer
config.guess in addition to older /unixware*/. Use compiler
driver, not linker, for linking shared libraries.
Gary V. Vaughan [Tue, 24 Apr 2001 22:53:48 +0000 (22:53 +0000)]
* ltdl.m4 (AC_C_INLINE): No longer required.
* libltdl/ltdl.c (strdup, strcmp, strchr, strrchr, memcpy, trim,
free_vars): Revoke inline keyword from declarations. `static
inline' is not very portable, and in addition Unixware 7.1.1's
compiler says you can't access static variables from inline
functions.
Reported by Peter Eisentraut <peter_e@gmx.net>
Gary V. Vaughan [Tue, 24 Apr 2001 17:13:01 +0000 (17:13 +0000)]
From Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
* tests/Makefile.am (TESTS_ENVIRONMENT): Make sure the *.test
scripts get the same make that was used in the top level
directory.
Gary V. Vaughan [Mon, 23 Apr 2001 20:08:33 +0000 (20:08 +0000)]
* doc/PLATFORMS: With this patch, my Solaris boxes now pass the
test suite, Yay!
From Albert Chin-A-Young <china@thewrittenword.com>
* ltmain.in: `test -L' is not portable, and infact breaks uninstall
mode on Solaris. Fallback to `test -h' and finally `test -f',
but be careful not to let the failure status cause libtool to
stop.
Gary V. Vaughan [Mon, 23 Apr 2001 00:12:01 +0000 (00:12 +0000)]
* TODO: Make a note to undo this later.
From Christoph Pfisterer <cp@chrisp.de>
* libtool.m4: Use $() execution substitution quotation to work
around zsh builtin echo escape removal.
Gary V. Vaughan [Sun, 22 Apr 2001 22:50:54 +0000 (22:50 +0000)]
* ltdl.m4 (AC_CHECK_HEADERS): UW7 has sys/dl.h, so we must
check for that here.
* libltdl/ltdl.c (HAVE_SYS_DL_H): Include it if necessary for
the dlopen loader.
Reported by Matthew Schalit <mschalit@pacbell.net>
Gary V. Vaughan [Sun, 22 Apr 2001 22:13:49 +0000 (22:13 +0000)]
* libtool.m4 (AC_DEPLIBS_CHECK_METHOD): Use pass_all for
various releases of UnixWare and OpenServer that support it.
Reported by Matthew Schalit <mschalit@pacbell.net>
Dan McNichol [Thu, 19 Apr 2001 01:13:13 +0000 (01:13 +0000)]
* libtool.m4: Build standard shared libraries on AIX POWER
more like AIX does, with a shared object archived into lib<xxx>.a.
On AIX -bexpall flag does strange things... Don't use it.
Fix quotes around -berok flag. Add support for AIX 5.
Add support for run time linking on AIX POWER. (should work
on AIX 4.2 and up). Turn this feature on by adding -brtl flag
to LD_FLAGS. Add support for AIX on IA64. Note: AIX on IA64
uses a SYSV type linker. Add a comment telling what to do if the
TOC starts getting too large on AIX.
* NEWS: mention aix5 support.
Gary V. Vaughan [Sun, 8 Apr 2001 11:14:56 +0000 (11:14 +0000)]
* libtool.m4 (hardcode_libdir_flag_spec, osf4/osf5): Use ${wl}
to pass -rpath when compiling with gcc.
Reported by Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
Gary V. Vaughan [Sun, 8 Apr 2001 10:34:45 +0000 (10:34 +0000)]
* libltdl/ltdl.c (sys_shl_open): Cache a handle for the `self'
module, since HPUX adds module symbols into the `self' pool if
it is opened later. Return the cached pointer if the caller
subsequently tries to open `self'.
(sys_shl_sym): Diagnose NULL modules.
Gary V. Vaughan [Sun, 8 Apr 2001 09:51:22 +0000 (09:51 +0000)]
From Peter Eisentraut <peter_e@gmx.net>
* ltmain.in (clean,uninstall): test -e is not portable. Well,
neither is -L, but I'm hoping that redirecting error messages
to /dev/null and relying on non-zero exit status will work okay
on the few hosts that don't support -L.
Gary V. Vaughan [Thu, 5 Apr 2001 23:09:38 +0000 (23:09 +0000)]
* tests/Makefile.am (TESTS): Delete references to depdemo-dups.test.
* tests/depdemo-dups.test: Removed, as part of the patch
reversion below.
* ltmain.in: Revert my change from 2001-03-31. Although it
was technically correct, it opens a whole can of worms we don't
want to deal with right now.
Gary V. Vaughan [Thu, 5 Apr 2001 22:05:49 +0000 (22:05 +0000)]
From Ahmed Masud <masud@googgun.com>
* libltdl/ltdl.c (sys_shl_open): Return a NULL module handle
for self opening.
(sys_shl_close): Be careful not to close a NULL module handle.
(sys_shl_sym): Allow shl_findsym() to open NULL modules, but
discard the modified module address it returns.
Gary V. Vaughan [Thu, 5 Apr 2001 21:32:49 +0000 (21:32 +0000)]
* libltdl/ltdl.c (lt_dlopen): When reading the .la file,
reallocate the line buffer size if the line overflows the
original buffer.
Reported by Nick Hudson <skrll@netbsd.org>
* libtool.m4: Fixed support for Darwin and Rhapsody. Now correctly
hardcodes the library path and adds versioning. Other small
fixes.
* ltmain.in: Fixed special cases for libc and libm on Rhapsody and
Darwin. One of them was misplaced. Added version_type case for
Rhapsody and Darwin, named "darwin".
Gary V. Vaughan [Sat, 31 Mar 2001 23:51:10 +0000 (23:51 +0000)]
* ltmain.in: Remove the code for stripping duplicate deplibs
from libtool link lines -- duplicates are somtimes necessary
to satisfy inter-library dependencies, and never cause link to
fail even if they are spurious.
* tests/depdemo-dups.test: New file. Make sure this bug doesn't
creep back in again!
* tests/Makefile.am (TESTS): Use the new test above.
Edward M. Lee [Sat, 31 Mar 2001 00:08:03 +0000 (00:08 +0000)]
* libtool.m4: Generate dll/import libraries for cygwin according
to the following: libFOO.a (static lib), libFOO.dll.a (import
lib), cygFOO-version.dll (dll). Update postinstall_cmds and
postuninstall_cmds to reflect this.
* ltmain.in: Generate installed .la files with dlnames set to
../bin/cygFOO-version.dll for normal dlls. dlls for modules
remain with the .la file.