Alexandre Oliva [Sun, 7 Mar 1999 22:34:30 +0000 (22:34 +0000)]
* ltconfig.in (enable_fast_install): force it to no only if we
need relink; in the other cases, set it to needless
* ltmain.in (fast_install): if needless, set relink_command empty
* doc/libtool.texi (fast_install, shlibpath_overrides_runpath):
document the new behavior
Thomas Tanner [Sun, 7 Mar 1999 15:27:23 +0000 (15:27 +0000)]
* TODO: scheduled some items for next release/future
* demo/configure.in: use AC_LIBTOOL_DLOPEN
* libtool.m4: added AC_ENABLE/DISABLE_FAST_INSTALL macro
* ltconfig.in: added --disable-fast-install flag
* ltmain.in: partially reverted Alexandre's patch and implemented
on-demand linking in such a way that the old developer-friendly
linking style is optional,
don't hardcode library paths that are in the system search path,
fixed a typo in lib_search_path,
implemented -export-symbols-regex for programs
Alexandre Oliva [Sat, 6 Mar 1999 20:24:57 +0000 (20:24 +0000)]
* libltdl/ltdl.c (LTDL_LAZY_OR_NOW): renamed from LTDL_NOW; prefer
LAZY loading because it's much faster and NOW is apparently
partially broken on FreeBSD
Reported by Archie Cobbs <archie@whistle.com>
Alexandre Oliva [Sat, 6 Mar 1999 19:26:20 +0000 (19:26 +0000)]
* ltmain.in (freebsd): compile symbol table file with pic_flag
only on FreeBSD and when not static linking; it's been causing
trouble on platforms such as OpenBSD.
Gary V. Vaughan [Fri, 26 Feb 1999 16:17:43 +0000 (16:17 +0000)]
* ltconfig.in (sub_uncdrive): removed. This won't work with
the next version of cygwin.
(sub_uncdir): removed. We use <drive>:/path/to/executable now.
* libtool.m4 (AC_PROG_LD): removed sub_uncdrive and sub_uncdir.
Thomas Tanner [Thu, 25 Feb 1999 06:46:55 +0000 (06:46 +0000)]
* TODO: added items for next alpha release, ILD etc.
* libltdl/ltdl.c: removed unnecessary check from presym_sym,
fixed bug in lt_dlclose, allow lt_dlopenext(NULL),
set deplibs for lt_dlopen(NULL)
Thomas Tanner [Mon, 22 Feb 1999 21:17:56 +0000 (21:17 +0000)]
* ltconfig.in (dlopen, dlopen_self): default is unknown
* ltmain.in: fixed -dlopen self, print a warning
if -dlopen is used without AC_LIBTOOL_DLOPEN
* mdemo/Makefile.am: use -dlopen self
Alexandre Oliva [Mon, 22 Feb 1999 20:47:30 +0000 (20:47 +0000)]
* ltmain.in: create on-demand executable as $progdir/$$-$program,
and rename it to $progdir/$program only when it's finished, to
avoid race conditions. We can still get the program linked
multiple times, if multiple instances are started simultaneously
and the program does not exist, but they are very unlikely to
interfere with each other. There's still a possibility that one
process removes the $program another has just created, and doesn't
replace it before the other tries to run it, in a system whose
`mv' is not atomic, so it will $rm then $mv, but so what? :-)
Locking files have been avoided to prevent dead-locks in case they
are left over after a reboot or crash.
Alexandre Oliva [Mon, 22 Feb 1999 19:43:36 +0000 (19:43 +0000)]
* ltmain.in: remove on-demand executable in the proper place, and
just warn if it can't be removed; add wrapper code to test whether
the install-executable is newer than the build-executable, to
relink it when it appears to be out-of-date
Alexandre Oliva [Mon, 22 Feb 1999 19:24:55 +0000 (19:24 +0000)]
* libltdl/configure.in: check for dld.h
* libltdl/ltdl.c: include dld.h
(dld_open) it's spelled memory_error, not no_memory_error
Reported by Stefan Burstroem <f94sbu@efd.lth.se>
Thomas Tanner [Sun, 21 Feb 1999 15:38:02 +0000 (15:38 +0000)]
* libltdl/ltdl.c (lt_dlopen): use newhandle instead of handle
when dlopening the executable
* libtool.m4 (AC_LIBTOOL_DLOPEN): removed the redundant "yes: "
prefix for lt_cv_dlopen, renamed lt_cv_dlopen_LIBS
to lt_cv_dlopen_libs (more consistent)
* ltmain.in: implemented -dl[pre]open self, necessary for
lt_dlopen(NULL), generation of exported symbols was broken
Alexandre Oliva [Sat, 20 Feb 1999 16:42:07 +0000 (16:42 +0000)]
* ltconfig.in (shlibpath_overrides_runpath): new variable;
determines whether LD_LIBRARY_PATH or equivalent can be used to
override a hard-coded library search path; default to unknown
(linux-gnu*): set it to no
(solaris*, sunos4*): set it to yes
* ltmain.in (build_libdirs_flags, build_libdirs, build_rpath): if
shlibpath_overrides_runpath is not yes, arrange that wrapper
scripts create, on demand, programs that use uninstalled libraries
* doc/libtool.texi: document it
Alexandre Oliva [Sat, 20 Feb 1999 15:07:54 +0000 (15:07 +0000)]
* libtool.m4 (AC_LIBTOOL_DLOPEN): check for dlopen in libc before
trying in dl. Add the actual dlopening type to lt_cv_dlopen, and
add any needed libraries to lt_cv_dlopen_LIBS. Add test for
MS-Windows' LoadLibrary. Check whether a program can dlopen
itself only if we really have dlopen(), not some equivalent
function, but leave room for testing with other mechanisms.
(AC_PROG_LIBTOOL): assume some form of dlopen, but not
dlopen(NULL), is available if AC_LIBTOOL_DLOPEN is not used, for
backward compatibility.
Gary V. Vaughan [Fri, 19 Feb 1999 17:41:51 +0000 (17:41 +0000)]
* ltconfig.in (export_symbols_cmds): renamed from
export_symbols_cmd.
(cygwin, mingw): Be sure to compile the ltdll.c object before
extracting the exported symbol list. Extract only the names
of the exported symbols from the def file [otherwise we might
run into trouble with -export-symbols-regex].
(archive_expsym_cmds): Regenerate the def file from the symbol
export list.
(delay_variable_subst): New sed expression to allow us to delay
evaluation of $foo in a double_quote_subst evaluated variable by
using $.
* ltmain.in (export_symbols_cmds): evaluate each ~ delimitted cmd
separately.
* doc/libtool.texi (libtool script contents): new paragraph to
explain the difference between _cmd and _cmds suffixes for
variable names.
(export_symbols_cmds): renamed from export_symbols_cmd.
Alexandre Oliva [Thu, 18 Feb 1999 20:58:14 +0000 (20:58 +0000)]
* ltconfig.in (ld_shlibs): move -soname and similar flags to the
end of archive_cmds and archive_expsym_cmds, so as to prevent
gcc's collect2 from inserting an object file between -soname and
the library name
Alexandre Oliva [Thu, 18 Feb 1999 18:50:24 +0000 (18:50 +0000)]
* ltconfig.in (archive{,_sym}_commands): Be careful not to
re-export the dll entry points DllMain@12, _cygwin_dll_entry@12 and
_cygwin_noncygwin_dll_entry@12 to avoid bugs with the wrong entry
function being called with inter-dll dependencies.
Reported by DJ Delorie <dj@delorie.com>
* THANKS: Added DJ Delorie, since his code inspired the impgen.c
program and because he has patiently answered all of the
irritating dll and win32 questions I have fired at him.
Gary V. Vaughan [Thu, 18 Feb 1999 14:46:46 +0000 (14:46 +0000)]
* ltmain.in (impgen.c): Added a new embedded C file that can be
used under win32 to extract a def file (symbol export list) from a
dll that has none. Code to use it might need to wait for the ILD
merge before it will be useful...
Thomas Tanner [Thu, 18 Feb 1999 11:38:36 +0000 (11:38 +0000)]
* TODO: updated
* autogen: only libltdl needs autoheader
* doc/libtool.texi (link mode): documented -export-symbols-regex
and updated -export-symbols
* doc/libtool.texi (script contents): documented
always_export_symbols, export_symbols_cmd, exclude_expsyms,
include_expsyms, dlopen and dlopen_self
more detailed description of need_lib_prefix
* ltconfig.in: a "'" was missing in the default value
of export_symbols_cmd
* ltmain.in: implemented -export-symbols-regex
Thomas Tanner [Mon, 15 Feb 1999 16:46:55 +0000 (16:46 +0000)]
* cdemo/Makefile.am: renamed *foo1 to *foo, removed $(MATH_LIB)
* cdemo/foo1.c: renamed to foo.c
* libltdl/ltdl.c: eliminated lt_dltype, in presym_open():
search for @PROGRAM@ if filename == 0, in lt_dlopen():
fixed bug for filename == 0
* libltdl/ltdl.h: use __P macro for lt_dlmalloc/free
* libtool.m4: new macro AC_LIBTOOL_DLOPEN: checks for dlopen
and dlopen(NULL) support
* ltconfig.in: added new variables dlopen and dlopen_self,
--enable-dlopen[-self] flags for AC_LIBTOOL_DLOPEN
* ltmain.in: use dlopen[_self], dlpreopen files if there's no
dlopen support, build lt_preloaded_symbols only if
-dl[pre]open was used, include program symbols if -export-dynamic
was specified and there's no dlopen(NULL) support
* mdemo/configure.in: use AC_LIBTOOL_DLOPEN
* mdemo/main.c: demonstrate lt_dlopen(0)
Gary V. Vaughan [Mon, 15 Feb 1999 14:23:02 +0000 (14:23 +0000)]
* demo/dlmain.c (_WIN32): The lt_symlist structure is now const,
so my original horrible temporary win32 hack no longer worked.
Here is a new horrible temporary hack to prevent helldl from SEGVing
on win32. I will fix this properly when we figure out how to do
data exports from dlls.
Alexandre Oliva [Sun, 14 Feb 1999 03:04:51 +0000 (03:04 +0000)]
* libtool.m4 (AC_CHECK_LIBM): do not set MATHLIB or AC_SUBST it,
this has a negative side-effect of causing automake to add MATHLIB
to every single Makefile. Let's use plain AC_CHECK_LIB, so that
LIBS get set, until we find a better alternative
* *demo/Makefile.am: remove $(MATHLIB)
Thomas Tanner [Sat, 13 Feb 1999 15:43:04 +0000 (15:43 +0000)]
* *demo/Makefile.am: use $(MATHLIB)
* *demo/configure.in: use AC_CHECK_LIBM
* doc/libtool.texi: renamed file_magic_command to file_magic_cmd,
renamed archive_sym_cmds to archive_expsym_cmds
* ltconfig.in: ditto
* ltmain.in: ditto
* libltdl/ltdl.c: use lt_dlmalloc/free
* libltdl/ltdl.h: define lt_dlmalloc/free
* libtool.m4: added AC_CHECK_LIBM macro
* ltconfig.in: renamed archive_sym_cmds to archive_expsym_cmds,
added always_export_symbols, export_symbols_cmd, exclude_expsyms,
include_expsyms, removed archive_cmds for cygwin/mingw and AIX,
on Solaris store the exported symbols list in objdir
* ltmain.in: allow -export-symbols for modules, use thread_safe flag,
add include_expsyms to the exported symbols
Gary V. Vaughan [Fri, 12 Feb 1999 17:35:39 +0000 (17:35 +0000)]
* libltdl/ltdl.h (_LTDLL_EXTERN): libltdl is no longer linked as a
shared library, so the _declspec's were preventing the linker from
resolving symbols on win32. They have been removed now.
Thomas Tanner [Thu, 11 Feb 1999 23:48:25 +0000 (23:48 +0000)]
* autogen: libltdl needs autoheader
* demo/Makefile.am: renamed hell.debug to hell.static
(we're demonstrating static linking, not debugging)
* tests/demo*: ditto
* doc/libtool.texi (libltdl): documented new lt_dlopen(NULL)
feature
* libltdl/acconfig.h: required for config.h
* libltdl/configure.in: use config.h
* libltdl/ltdl.c: use config.h, support lt_dlopen(NULL)
(returns a handle for the program itself)
* ltconfig.in: minor reformatting
* ltmain.in: in lt_preloaded_symbols always define
the program's symbols first, for -export-dynamic list all
program symbols together, -export-symbols was broken for
programs, minor reformatting
* mdemo/Makefile.am: renamed mdemo.debug to mdemo.static
* tests/mdemo*: ditto, mdemo.test was completely broken
Alexandre Oliva [Wed, 10 Feb 1999 16:27:52 +0000 (16:27 +0000)]
* ltconfig.in (irix5*, irix6*, osf3*, osf4*): do not use
-set_version in archive_cmds if verstring is empty
(irix6*, shlibpath_var, sys_lib_search_path-spec,
deplibs_check_method): set appropriate values depending on
selected ABI, -32, -n32 or -64, as set in LD by libtool.m4
(uts4*): remove dot between .so and versuffix
Alexandre Oliva [Mon, 8 Feb 1999 21:33:17 +0000 (21:33 +0000)]
* ltconfig.in (irix5*, hardcode_libdir_separator): set it to a
colon, because on IRIX 5 only the last -rpath switch prevails, and
it can be a list of colon-separated directories. This change will
affect irix6 too, but that's not a problem.
Thomas Tanner [Mon, 8 Feb 1999 00:10:28 +0000 (00:10 +0000)]
* ltconfig.in: according to Marcus Sundberg <mackan@stacken.kth.se>
HP/UX, IRIX, OpenBSD, Digital Unix and SunOS support
need_version=no and need_lib_prefix=no,
fixed a bug in Solaris' archive_sym_cmds
Alexandre Oliva [Thu, 4 Feb 1999 15:09:14 +0000 (15:09 +0000)]
* libtool.m4 (ac_cv_sys_global_symbol_pipe): accept TAB in
addition to space as separator, and allow more than one space
between the symbol code and the symbol name; HP/UX's nm, for
example, uses two spaces
* ltconfig.in (global_symbol_pipe): ditto
(bsdi4, deplibs_check_method): variable name was misspelled
* libltdl/configure.in (libltdl_cv_preloaded_symbols): rewrite
test, so as not to depend on the way global_symbol_pipe is
initialized; the current test would get false positives, as
global_symbol_pipe was initialized `x=""', not `x='
Alexandre Oliva [Wed, 3 Feb 1999 11:34:52 +0000 (11:34 +0000)]
* ltconfig.in: new config.guess returns *-*-cygwin now instead of
*-*-cygwin32. sed -e 's%(cygwin|mingw)32%1%g' ltconfig.in
* ltmain.in: sed -e 's%(cygwin|mingw)32%1%g' ltmain.in
* ltconfig.in (hardcode_libdir_flag_spec, allow_undefined_flag,
archive_cmds, archive_sym_cmds, old_archive_from_new_cmds):
removed duplication of config by assuming that `test $with_gcc =
yes' implies gnu ld, otherwise MSVC++ (which I haven't tested
since I inheritted the code from Ian Lance Taylor btw!) is implied.
Gary V. Vaughan [Thu, 28 Jan 1999 13:33:33 +0000 (13:33 +0000)]
* ltmain.in: Reverted this change of Alexandre's from the
1999-01-25; "don't try to use .o instead of .lo just because
there's no PIC flag. It loses if --disable-static, and there's
not much point if we're referring to the same file anyway...",
because not all linkers will accept .lo object names.
* ltmain.in: In the case where --disable-static is specified (as
noted in Alexandre's log entry), we just link some .o files to
prevent the original error.
Reported by Andrey Slepuhin <pooh@msu.ru>
Gary V. Vaughan [Wed, 27 Jan 1999 13:41:08 +0000 (13:41 +0000)]
* THANKS: Now that we have a policy, applied it to the existing
list. This in no way demeans the work of those people removed
from the THANKS file, who are still credited in the ChangeLogs and
without who's work, libtool would not work so well on many
platforms, but serves to highlight the outstanding and continued
contribution the remaining people have made. And I quote, "We
reserve THANKS for people who have made major contributions, and
leave the credit to the others for the ChangeLog only."
Gary V. Vaughan [Wed, 27 Jan 1999 11:14:35 +0000 (11:14 +0000)]
* ltconfig.in ($echo): When using printf to replace echo the shell
expands %sn to %sn. Changed to use "%sn" (with quotes).
Reported by Sam Vilain <sam.vilain@nz.unisys.com>
Alexandre Oliva [Wed, 27 Jan 1999 06:23:47 +0000 (06:23 +0000)]
* Makefile.am (ltconfig, ltmain.sh): some broken makes don't like
macros in targets; replace $(srcdir) with @srcdir@
* configure.in (ACINCLUDE_M4_LIST): same problem; expand $srcdir
Alexandre Oliva [Wed, 27 Jan 1999 06:15:21 +0000 (06:15 +0000)]
* libltdl/Makefile.am (@TOINST@/libltdl.la): if installation is
enabled, create to-be-installed libltdl.la within @TOINST@
directory
(noinst_LTLIBRARIES): even if installation is enabled, build
convenience libltdl.la, otherwise builds of random packages may
fail if the user happens to enable installation
(distclean-hook): wipe out $(TOINST)
* libltdl/configure.in: set TOINST and LIBLIBS as appropriate;
don't set NOINSTLIBS any more
* mdemo/Makefile.am: use libltdl.la
Alexandre Oliva [Wed, 27 Jan 1999 05:36:49 +0000 (05:36 +0000)]
* libltdl/configure.in (AC_PROG_LIBTOOL): automake does not
recognize it and fail, better keep using AM_PROG_LIBTOOL until the
next release of automake
* demo/configure.in, cdemo/configure.in: ditto
* depdemo/configure.in, mdemo/configure.in: ditto
Alexandre Oliva [Wed, 27 Jan 1999 04:31:23 +0000 (04:31 +0000)]
* libltdl/ltdl.c: make all global strings char[], not char*; check
that all calls to malloc() are properly cast
(strdup, strchr, strrchr, trim, free_vars): declare as inline
(find_module): allocate filename dynamically; support null dir
(free_vars): free dir and name only if non-null
(lt_dlopen): keep dir as NULL if not given; fix expression that
calculated the size of name; only free and name if non-null
(lt_dlopenext): allocate tmp dynamically
Thomas Tanner [Wed, 27 Jan 1999 00:49:06 +0000 (00:49 +0000)]
* cdemo/configure.in: renamed AM_PROG_LIBTOOL to AC_PROG_LIBTOOL
* demo/configure.in: likewise
* depdemo/configure.in: likewise
* libltdl/configure.in: likewise
* mdemo/configure.in: likewise
* libltdl/ltdl.c: in find_module() check whether libdir is defined,
tryall_dlopen(): move deallocation of an already opened handle
to lt_dlopen(), allocate the directory in lt_dlopen() dynamically,
minor cleanups, fixed memory leak (name)
* libtool.m4: renamed all AM_ macros to AC_ and added aliases for
compatibilty, updated AC_SYS_NM_PARSE (no undefined symbols,
don't count the symbols)
* ltconfig.in: added thread_safe_flag_spec (not used yet),
added generic variable for linker options "linkopts" in
all archive_cmds
* ltmain.in: added -thread-safe flag (unused)
Gary V. Vaughan [Tue, 26 Jan 1999 15:22:52 +0000 (15:22 +0000)]
* Makefile.am (install-data-hook): Don't show the if expression
that tests for gzip with a conditional error message; just do it
quietly and show the error if it fails, or the next action if it
succeeds.
Alexandre Oliva [Mon, 25 Jan 1999 10:01:23 +0000 (10:01 +0000)]
* ltmain.in (file_magic): use egrep instead of expr to support
more general regular expressions
(file_regex): remove it; the name is misleading, it's not used
* ltconfig.in, doc/libtool.texi: ditto
* ltconfig.in (linux-gnu*, deplibs_check_method): extend regex to
support `LSB dynamic lib' in the output of `file'
Reported by Scott D. Heavner <sdh@po.cwru.edu>
Alexandre Oliva [Mon, 25 Jan 1999 08:06:09 +0000 (08:06 +0000)]
* ltmain.in (dependency_libs, xrpath): add -R switches to
dependency_libs only just before creating the .la file; they
should not be passed to the C compiler or linker at
library-creation time, since we don't know whether it is supported