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
Alexandre Oliva [Mon, 25 Jan 1999 06:57:48 +0000 (06:57 +0000)]
* mkstamp: move the sed script to extract revision and date
information into a separate shell-script, so that we can break
lines between commands; FreeBSD's sed doesn't like `;' after `t'
Reported by Axel Thimm <Axel.Thimm@physik.fu-berlin.de>
* Makefile.am: use mkstamp
* THANKS: added Axel Thimm
Alexandre Oliva [Mon, 25 Jan 1999 06:22:23 +0000 (06:22 +0000)]
* ltmain.in: 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...
Thomas Tanner [Sun, 24 Jan 1999 20:43:52 +0000 (20:43 +0000)]
* libltdl/ltdl.c: minor bugfixes, append a "/" the search
directory only if necessary
* ltconfig.in: added support for FreeBSD >= 3.0
(patch from Kurt D. Zeilenga)
* THANKS: added Kurt D. Zeilenga
Thomas Tanner [Sun, 24 Jan 1999 14:24:17 +0000 (14:24 +0000)]
* doc/libtool.texi (libltdl): list supported dlopen mechanisms,
added function lt_dlopenext(), removed reference to
LTDL_PRELOADED_SYMBOLS in LTDL_SET_PRELOADED_SYMBOLS
* libltdl/ltdl.c: partially reverted Alexandre's dynamic string
allocation change (it was not necessary and the code was unreadable),
cleanups, removed usr_search_path_size, renamed usr_search_path
to user_search_path, in find_module() also check for moved
modules, merged find_file() and find_library(),
added lt_dlopenext(), in lt_dladdsearchdir() no longer reset
the search path if 'search_dir' == NULL and don't use realloc()
(might not be available on all platforms),
removed __P((void)) in the declaration of lt_dlgetsearchpath()
* libltdl/ltdl.h: added lt_dlopenext()
* ltconfig.in: AIX archive commands were broken,
fixed a MAJOR bug in global_symbol_pipe which caused
"demo-shared.test;demo-make.test" to fail (libtool must not extract
undefined symbols of libraries, i.e. symcode must not contain 'U')
* tests/Makefile.am (clean-local): "make distclean" in cdemo, too
Alexandre Oliva [Fri, 22 Jan 1999 18:04:51 +0000 (18:04 +0000)]
* Makefile.am (ltconfig, ltmain.sh): add ChangeLog Revision to
TIMESTAMP
* configure.in: get values of PACKAGE and VERSION set by
AM_INIT_AUTOMAKE, and extract only TIMESTAMP from the ChangeLog
Alexandre Oliva [Fri, 22 Jan 1999 17:08:26 +0000 (17:08 +0000)]
* libltdl/ltdl.c (lt_dlopen): if we're reusing a previously opened
handle, don't reset its name nor add it to the list, and free the
name we have allocated
Reported by Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
Gary V. Vaughan [Fri, 22 Jan 1999 13:27:51 +0000 (13:27 +0000)]
* Makefile.am ($(srcdir)/ltconfig): Oops. cvs co keyword
expansion ate the sed expression! Changed sed separator to '%'
because there are '/' in the date. Added missing '(' to search
expression. Inserted a null string to stop cvs from expanding it
next time =)O|
($(srcdir)/ltmain.sh): ditto.
Alexandre Oliva [Fri, 22 Jan 1999 12:21:05 +0000 (12:21 +0000)]
* Makefile.am (TSDEPS_DIST): dist-time dependencies for timestamps
(timestamps, update-timestamps): check whether TSDEPS_DIST are
up-to-date and update ltconfig and ltmain.sh if needed
(ltconfig, ltmain.sh): depend on TSDEPS; replace @TIMESTAMP@ with
the Date tag in the ChangeLog
(TSDEPS): empty unless overridden by update-timestamps
* ltconfig.in, ltmain.in (TIMESTAMP): append timestamp to most
references to VERSION
Gary V. Vaughan [Fri, 22 Jan 1999 12:13:58 +0000 (12:13 +0000)]
* ltmain.in (ild): Revert the change which allowed libtool to
link libraries with dependencies on .la libs.
* NEWS: Removed reference to win32, incase 1.3 ships before
ild is ready.
* doc/PLATFORMS: Removed i686-pc-cygwin32, for the same reason.
* doc/libtool.texi: Removed win32 refs, for the same reason.
Alexandre Oliva [Fri, 22 Jan 1999 10:26:47 +0000 (10:26 +0000)]
* ltmain.in (Xsed): add 1 to Xsed definition that goes into
temporary wrapper scripts
* libtool.m4: we don't have Xsed here, expand it manually
Reported by Pavel Roskin <pavel_roskin@geocities.com>
* ltmain.in (finalize_hardcode_libdirs, finalize_rpath): in
platforms that use -rpath, programs must be finalized at
installation time, otherwise build-tree programs will
prefer installed libraries over build-tree ones
Alexandre Oliva [Fri, 22 Jan 1999 09:39:15 +0000 (09:39 +0000)]
* mdemo/Makefile.am (../libltdl/libtool): if it does not exist,
the sub-make for libltdlc.la will take care of it, but we must at
least provide an empty rule for it, otherwise the sub-make will
never run
Alexandre Oliva [Fri, 22 Jan 1999 07:01:25 +0000 (07:01 +0000)]
- add --fast as synonym for -f
- document --msg
- add -q --quiet
- use `cvs -n update' instead of `cvs stat', because stat wouldn't
notice that a conflict had been resolved
- don't leave log_files behind
- don't accept unknown flags before --
- check for common mistakes in ChangeLog entries, and emit warnings
- reject commit message if it does not contain any non-blank line
- add `sleep 1' after running PAGER to give the user some time for a ^C