dependency libraries from dlpreopened modules to libraries:
* config/ltmain.in: Support new -weak link mode option. Adjust
help message.
* libltdl/Makefile.am (libltdlc_la_LDFLAGS): Use it.
* doc/libtool.texi (Linking with dlopened modules): Document it.
(Link mode): Mention -weak.
* NEWS: Updated.
the many and varied m4 symbols accumulated by libtool over the
years, considering also that modern autoconf can detect unexpanded
macros even without AC in the macro name:
* bootstrap: Remove libltdl/config.h from previous releases.
* m4/libtool.m4, m4/ltdl.m4, doc/libtool.texi: Basically, run a
giant sed transformation like this:
s,AC_LIB_LTDL,LTDL_INIT,g
s,AC_LIBLTDL_CONVENIENCE,LTDL_CONVENIENCE,g
s,AC_LIBLTDL_INSTALLABLE,LTDL_INSTALLABLE,g
s,AC_WITH_LTDL,LT_WITH_LTDL,g
s,AC_LTDL_ENABLE_INSTALL,_LT_ENABLE_INSTALL,g
s,AC_DEPLIBS_CHECK_METHOD,_LT_CHECK_MAGIC_METHOD,g
s,AC_LIBTOOL_OBJDIR,_LT_CHECK_OBJDIR,g
s,AC_LTDL_OBJDIR,_LT_CHECK_OBJDIR,g
s,AC_LTDL_DLPREOPEN,_LT_CHECK_DLPREOPEN,g
s,AC_LIBTOOL_SYS_MAX_CMD_LEN,LT_CMD_MAX_LEN,g
s,AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE,_LT_CMD_GLOBAL_SYMBOLS,g
s,AC_LIBTOOL_SYS_OLD_ARCHIVE,_LT_CMD_OLD_ARCHIVE,g
s,AC_PROG_LD_RELOAD_FLAG,_LT_CMD_RELOAD,g
s,AC_LIBTOOL_SYS_LIB_STRIP,_LT_CMD_STRIPLIB,g
s,AC_CHECK_LIBM,LT_LIB_M,g
s,AC_LTDL_DLLIB,LT_LIB_DLLOAD,g
s,AC_LIBTOOL_COMPILER_OPTION,_LT_COMPILER_OPTION,g
s,AC_LIBTOOL_PROG_CC_C_O,_LT_COMPILER_C_O,g
s,AC_LIBTOOL_PROG_COMPILER_NO_RTTI,_LT_COMPILER_NO_RTTI,g
s,AC_LIBTOOL_PROG_COMPILER_PIC,_LT_COMPILER_PIC,g
s,AC_LIBTOOL_SYS_HARD_LINK_LOCKS,_LT_COMPILER_FILE_LOCKS,g
s,AC_LTDL_DLSYM_USCORE,LT_FUNC_DLSYM_USCORE,g
s,AC_LIBTOOL_LINKER_OPTION,_LT_LINKER_OPTION,g
s,AC_LIBTOOL_PROG_LD_SHLIBS,_LT_LINKER_SHLIBS,g
s,AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH,_LT_LINKER_HARDCODE_LIBPATH,g
s,AC_PATH_MAGIC,_LT_PATH_MAGIC,g
s,AC_PATH_TOOL_PREFIX,_LT_PATH_TOOL_PREFIX,g
s,AC_PROG_LD,LT_PATH_LD,g
s,AC_PROG_LD_GNU,_LT_PATH_LD_GNU,g
s,AC_PROG_NM,LT_PATH_NM,g
s,AC_LTDL_SYS_DLOPEN_DEPLIBS,LT_SYS_DLOPEN_DEPLIBS,g
s,AC_LIBTOOL_DLOPEN_SELF,LT_SYS_DLOPEN_SELF,g
s,AC_LIBTOOL_POSTDEP_PREDEP,_LT_SYS_HIDDEN_LIBDEPS,g
s,AC_LTDL_SYSSEARCHPATH,LT_SYS_DLSEARCH_PATH,g
s,AC_LTDL_SHLIBEXT,LT_SYS_MODULE_EXT,g
s,AC_LTDL_SHLIBPATH,LT_SYS_MODULE_PATH,g
s,AC_LTDL_SYMBOL_USCORE,LT_SYS_SYMBOL_USCORE,g
s,AC_LIBTOOL_SYS_DYNAMIC_LINKER,_LT_SYS_DYNAMIC_LINKER,g
s,_LT_AC_TAGVAR,_LT_TAGVAR,g
s,_LT_AC_SYS_COMPILER,_LT_TAG_COMPILER,g
s,_LT_AC_PROG_ECHO_BACKSLASH,_LT_PROG_ECHO_BACKSLASH,g
s,_LT_AC_SYS_LIBPATH_AIX,_LT_SYS_MODULE_PATH_AIX,g
s,_LT_AC_SHELL_INIT,_LT_SHELL_INIT,g
s,_LT_AC_LOCK,_LT_ENABLE_LOCK,g
s,_LT_AC_CHECK_DLFCN,_LT_HEADER_DLFCN,g
s,_LT_AC_TRY_DLOPEN_SELF,_LT_TRY_DLOPEN_SELF,g
s,LT_AC_PROG_EGREP,_LT_DECL_EGREP,g
s,LT_AC_PROG_SED,_LT_DECL_SED,g
* doc/libtool.texi (Autoconf macros): Document exported macros.
* libtoolize.in: Compare ltdl.m4 serial numbers for LTDL_INIT
instead of newly obsoleted AC_LIB_LTDL.
(func_scan_files): Also set seen_ltdl for LTDL_INIT and
LT_WITH_LTDL.
* libltdl/ltdl.c (lt_dlforeachfile): LT_SYS_LIBSEARCH_PATH is not
an environment variable, it is an actual path.
Reported by Noah Mish <noah@cs.caltech.edu>
the installed libltdl sources for libtoolize need to put
libltdl/configure.ac in the parent package so that *it* can
subconfigure libltdl. That way we don't put any constraints on
the build system used by the parent package because the
libtoolized libltdl subtree is a self-contained sub-project:
* libltdl/Makefile.am (EXTRA_DIST): Add configure.ac.
(nobase_ltdldata_DATA): Change back to libltdl's own
configure.ac.
lt__handle to better reflect the naming scheme.
* libltdl/ltdl.h (lt_dlhandle): Be truly opaque with a void *.
* libltdl/lt_dlloader.c (lt_dlloader_remove): Party to
lt__private.h, so use internal lt__handle instead of opaque
lt_dlhandle.
* libltdl/ltdl.c (LT_DLGET_FLAG, LT_DLSET_FLAG): Add a cast to
internal lt__handle type.
(try_dlopen, tryall_dlopen, load_deplibs, unload_deplibs): Ditto.
(lt_dlexit, lt_dlclose, lt_dlsym): Use lt__handle to iterate
throught the handle list.
(try_dlopen): Use lt__zalloc instead of MALLOC and memset.
* libltdl/ltdl.h (lt_dlcaller_id): Be truly opaque with a void *.
(lt_dlhandle_interface): New callback type for filtering handles
according to the interface they present.
* libltdl/ltdl.c (lt_dlcaller_register): Take an id and an
interface check callback, and generate a caller_id.
(iterator): New static variable for the use of...
(lt_dlhandle_first): New function. Set the iterator for
subsequent calls to lt_dlhandle_next.
(lt_dlhandle_next): Either work as before when iterator is unset,
or else skip handles that fail the interface check in iterator set
by lt_dlhandle_first.
* libltdl/ltdl.h (lt_dlhandle_first): Declaration.
* doc/libtool.texi (User defined module data): Document the new
APIs.
* NEWS: Updated.
`loaders' list management into a new SList ADT. In the process,
the API for writing loaders is a little cleaner, so all the
existing loaders were tweaked to take advantage of that:
* libltdl/slist.h, libltdl/slist.c: New files implementing a
generic singly linked list container ADT. The ADT is purely
internal, and none of its API's are visible from an installed
libltdl.
* libltdl/lt_dlloader.h (lt_dlloader): Removed next field again
:-) Renamed to lt_dlvtable for API. Changed all callers.
(lt_dlloader_get): New function to turn an lt_dlloader into its
associated lt_dlvtable.
(lt_dlloader_add): Removed unused data parameter. The caller
data belongs to (and is set by) the loader itself, not the
loader's client. Changed all callers.
(lt_dlloader_name, lt_dlloader_data): Removed. Use
lt_dlloader_get instead!
* libltdl/lt__private.h: Include slist.h.
(lt__alloc_die_callback): Add missing LT_SCOPE to declaration.
(lt_dlhandle_struct): Use lt_dlvtable instead of opaque
lt_dlloader.
* libltdl/ltdl.c (lt_dlexit): Rewritten for the new loader API.
(loaders, lt_dlloader_add, lt_dlloader_remove, lt_dlloader_next,
lt_dlloader_find): Moved from here...
* libltdl/lt_dlloader.c ((loaders, lt_dlloader_add,
lt_dlloader_remove, lt_dlloader_next, lt_dlloader_find): ...to
here. And rewritten in terms of new SList interface.
* libltdl/ltdl.c (lt_dlexit, tryall_dlopen): Rewritten in terms of
new lt_dlloader interface.
* libltdl/Makefile.am (libdlloader_la_SOURCES): Add slist.h and
slist.c. Move lt_dlloader.h from here...
(pkginclude_HEADERS): ...to here.
(libltdl_la_SOURCES): Add lt_dlloader.c and lt_dlloader.h.
* libltdl/lt_dlloader.h (lt_dlloader): Add next field.
* libltdl/ltdl.c (lt_user_dlloader): Remove entirely. Change all
callers to use lt_dlloader instead. Add a compatibility macro.
(lt_dlloader_add): Remove copy and allocate stage, just hook
directly into the loaders list.
than my move of the module field into lt_dlinfo:
* libltdl/ltdl.c (lt_caller_data, lt_dlhandle_struct): Move from
here...
* libltdl/lt__private.h (lt_caller_data, lt_dlhandle_struct):
...to here. And put the module field back here...
* libltdl/ltdl.h (lt_dlinfo): ...instead of here.
* libltdl/loaders/loadlibrary.c (vm_open): Adjust.
operation of libtool (neither would work alone). First, there is
a new feature that allows libraries to preopen modules. This
entails a backwards incompatible change to the libltdl API for
separating out the preloaded symbol lists by owner. Second, in
the tradition of "eating our own dogfood", libltdl now preloads
its own dlloaders. The internal API for dlloaders has also had to
change in a backwards incompatible way in support of the new
library preloading feature. If you don't use preloaded libraries,
you needn't change your project sources, though you will need to
recompile against the new libltdl. The API changes are mostly
confined to dlloaders, so you probably needn't worry about those
(unless you have written a custom loader that you want libltdl to
use):
* configure.ac (AC_CONFIG_FILES): Add libltdl/loaders/Makefile.
* libltdl/configure.ac (AC_CONFIG_FILES): Add loaders/Makefile.
* libltdl/loaders: New directory for module loaders, to simplify
Makefile rules, and to give the loaders themselves names that are
unique in the first few characters.
* libtoolize.in (func_copy_all_files): Copy recursively to pick up
the loaders directory contents.
* libltdl/loaders/Makefile.am: New file. Move module building
rules to here...
* libltdl/Makefile.am: ...from here.
(VERSION_INFO): Bumped version info to signify interface changes.
(libltdl_la_CPPFLAGS, libltdlc_la_CPPFLAGS): Set LTDLOPEN
appropriately for each library.
* libltdl/loader-dld_link.c, libltdl/loader-dlopen.c,
libltdl/loader-dyld.c, libltdl/loader-load_add_on.c,
libltdl/loader-loadlibrary.c libltdl/loader-preopen.c,
libltdl/loader-shl_load.c: Moved from here...
* libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c: ...to here.
(get_vtable): New entry function for each.
* libltdl/loaders/preopen.c (lt_dlsymlists_t): Replaced by...
(symlist_chain): ...a new structure which maps lists of preloaded
symbols from the object that loads them.
(lt_dlpreload_open): New function to automatically open all
preloaded modules belonging to a named object (ORIGINATOR).
* libltdl/lt__alloc.c (lt__zalloc): New function to return a block
of zeroed out new memory.
* libltdl/lt__alloc.h (lt__zalloc): Prototype it.
* libltdl/lt__private.h (lt__alloc_die_callback): Add missing
prototype.
(lt__error_strings): Make this opaque to callers.
* libltdl/lt_error.c (lt__error_strings): Move the implementation
to here.
* libltdl/lt_dlloader.h (lt_user_dlloader): Add extra fields to
make originator focused preloading possible. *BREAKS BACKWARDS
COMPATIBILITY*
(lt_dlloader_add): Take advantage of new fields to simplify
paramater list.
* libltdl/lt_system.h (LT_STR): New ANSI stringification macro.
(LT_CONC): Fix it to work from within macros.
* libltdl/ltdl.c (loader_init, loader_init_callback): Simplify
dlloader loading.
(get_vtable, preloaded_symbols): Point these at the preopen.c
symbols to bootstrap the loader chain.
(lt_dlinit): Load the preopen dlloader manually, and then use it
to load any other preloaded dlloaders.
(lt_dlloader_add): Simplify parameter list. Populate new
fields. Chain new loaders according to priority field.
* libltdl/ltdl.h (lt_dlsymlist): Add a new originator field.
(lt_dlpreload_callback_func): Type of a callback for automatic
lt_dlpreload_open loading.
(LTDL_SET_PRELOADED_SYMBOLS): Adjust to hook into preloaded
symbols from the "@PROGRAM@" originator.
* tests/demo/dlmain.c (main): Use mangled preloaded_symbols symbol.
* tests/pdemo/longer_file_name_dlmain.c (main): Ditto.
* ltmain.in: Don't spew spurious warnings when dlopening and
dlpreopening modules.
(func_generate_dlsyms): Factored out from multiple copies in the
rest of the code. Generate originator keyed symbol lists.
(func_extract_archives): Also factored. Extract the contents of
convenience archives for linking with dependent libraries when
--whole-archive is not available.
[darwin]: Don't try to link $old_library unless it exists, and
$lib is a bundle.
* m4/ltdl.m4 (AC_LTDL_DLLIB): Check for all possible dynamic
loading libraries/apis rather that stopping when an acceptable one
is discovered.
(LT_DLLOADERS): New variable for holding dlloaders that can be
preloaded.
* doc/libtool.texi: Document interface changes.
* NEWS: Updated.
* libltdl/ltdl.c (lt_dlhandle_struct): ...from here. Changed all
callers.
* libltdl/loader-loadlibrary.c (sys_wll_open): Use new inteface to
scan loaded handle->info.module fields for previously loaded
modules.
* doc/libtool.texi (User defined module data): Document changes to
the interface.
* NEWS: Updated.
Reported by Chuck Wilson <cwilson@ece.gatech.edu>
share the same configure.ac. Libtool itself doesn't compile any
code, so it is okay to do it during bootstrap, but other projects
need to treat libltdl as a configurable subproject to keep their
respective LIBOBJS separate:
* libltdl/configure.ac: New file, based on configure.ac.
* libltdl/Makefile.am (AC_LOCAL_AMFLAGS): Use our own m4
directory.
(ltdldata_DATA): List *all* the files that libtoolize --ltdl will
install.
* libltdl/argz_.h: ...to here, so as not to shadow system
argz.h when we `#include <argz.h>' for example.
#include stdlib.h and sys/types.h to ensure we get a size_t
definition.
* libltdl/argz.c (HAVE_CONFIG_H): Set it up how ltdl likes it when
used by another client.
* m4/argz.m4: New file.
(gl_FUNC_ARGZ): Try to find an error_t definition, and a system
argz.h.
* m4/ltdl.m4: Use it.
(AC_LTDL_FUNC_ARGZ): Removed.
* libltdl/lt__glibc.h: #include <argz.h> to pick up either the
system argz.h or our libltdl/argz.h if necessary.
* libltdl/Makefile.am (libltdl_la_SOURCES): Move argz.h from
here...
(ltdldata_DATA): ...here. Along with argz.c.
(argz.h): Generate from argz_.h if the system file is missing.
Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Applications should assume that the native dlopen is NOT
thread-safe, and take care of locking themselves. All application
calls into libltdl should thus be protected by the caller.
* libltdl/lt_mutex.c, libltdl/lt_mutex.h: Removed.
* libltdl/Makefile.am (pkginclude_HEADERS): Removed lt_mutex.h.
(libltdl_la_SOURCES): Removed lt_mutex.c and lt_mutex.h.
* libltdl/ltdl.h: Don't include lt_mutex.h.
* libltdl/lt__private.h (LT__MUTEX_GETERROR, LT__MUTEX_SETERROR)
(LT__MUTEX_SETERRORSTR): Renamed to...
(LT__GETERROR, LT__SETERROR, LT__SETERRORSTR): ...this. Changed
all callers.
(LT__MUTEX_LOCK, LT__MUTEX_UNLOCK, lt_dlmutex_lock)
(lt_dlmutex_unlock, lt_dlmutex_seterror, lt_dlmutex_geterror):
Removed. Changed all callers.
* doc/libtool.texi (Thread Saftey in libltdl):
* NEWS: Updated.
libltdl/argz.h, libltdl/lt__glibc.h, libltdl/lt_dlloader.h,
libltdl/lt__dirent.c, libltdl/lt__dirent.h, libltdl/lt__private.h,
libltdl/lt__alloc.c, libltdl/lt__alloc.h, libltdl/lt_system.h,
libltdl/loader-dld_link.c, libltdl/loader-dlopen.c,
libltdl/loader-dyld.c, libltdl/loader-loadlibrary.c,
libltdl/loader-shl_load.c, libltdl/lt_error.h, libltdl/lt_mutex.h:
Autoconf either defines to 1 or undefs the discovery macros it
puts in config.h, and many (non-GNU) compilers throw a spurious
warning when testing an #undef macro with #if. For consistency,
while we are touching all these lines, use defined(MACRO) style
throughout.
Reported by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
them as libtool modules. Currently loader-preopen.c is linked
unconditionally and other appropriate loaders discovered by
AC_LTDL_DLLIB are built and linked in:
* libltdl/Makefile.am (libltdl_la_SOURCES): Add loader-preopen
module.
* m4/ltdl.m4 (AC_LTDL_DLLIB): Use AC_LIBOBJ to add appropriate
loaders to libltdl.
* libltdl/lt_system.h (LT_SCOPE): Moved to here.
* libltdl/ltdl.h (lt_dlloader, lt_user_data, lt_module)
(lt_module_open, lt_module_close, lt_find_sym, lt_dlloader_exit)
(struct lt_user_dlloader, lt_dlloader_next, lt_dlloader_find)
(lt_dlloader_name, lt_dlloader_data, lt_dlloader_add)
(lt_dlloader_remove): Moved declarations...
* libltdl/lt_loader.h: ...to here.
* libltdl/ltdl.c: Include lt_loader.h. Move loader implementation
code from here...
* libltdl/loader-dld_link.c, libltdl/loader-dlopen.c,
libltdl/loader-dyld.c, libltdl/loader-load_add_on.c,
libltdl/loader-loadlibrary.c, libltdl/loader-preopen.c,
libltdl/loader-shl_load.c: ...to here.
* tests/cdemo/Makefile.am, tests/demo/Makefile.am,
tests/depdemo/Makefile.am, tests/f77demo/Makefile.am,
tests/mdemo/Makefile.am, tests/mdemo2/Makefile.am,
tests/pdemo/Makefile.am, tests/tagdemo/Makefile.am (AM_CPPFLAGS):
Add -I$(top_srcdir)/../.. so that libltdl include files can be
written as #include <libltdl/lt_dlloader.h> and found correctly.
modules. Mutex handling is not currently useful in combination
with posix threads, and should be easier to replace if it is in a
separate module. Additionally, we can factor out the loaders in
such a way as to depend on only the portability layer and these
new mutex and error modules now:
* libltdl/Makefile.am (pkginclude_HEADERS): Install lt_error.h and
lt_mutex.h to $includedir/libltdl.
(libltdl_la_SOURCES): Build lt_error and lt_mutex objects.
* libltdl/ltdl.h (LT_SCOPE): Moved from here...
* libltdl/lt_system.h (LT_SCOPE): ...to here.
* libltdl/ltdl.c (lt_dlerror_strings, LT_DLSTRERROR): Moved from
here...
* libltdl/lt__private.h (lt__error_strings, LT__STRERROR): ...to
here as additional internal interfaces to lt_error. Changed all
callers.
* libltdl/ltdl.c (LT_DLMUTEX_LOCK, LT_DLMUTEX_UNLOCK)
(LT_DLMUTEX_SETERROR, LT_DLMUTEX_GETERROR, lt_dlmutex_lock_func)
(lt_dlmutex_unlock_func, lt_dlmutex_geterror_func)
(lt_dllast_error): Moved from here...
(LT__MUTEX_LOCK, LT__MUTEX_UNLOCK, LT__MUTEX_SETERRORSTR)
(LT__MUTEX_GETERROR, lt__mutex_lock_func, lt__mutex_unlock_func)
(lt__mutex_geterror_func, lt__last_error): ...to here as
additional internal interfaces to lt_mutex. Changed all callers.
(LT_MUTEX_SETERROR): Take an errorcode rather than a string.
Changed all callers.
* libltdl/ltdl.c, libltdl/ltdl.h (lt_dlmutex_register): Moved from
here...
* libltdl/lt_mutex.c, libltdl/lt_mutex.h (lt_dlmutex_register):
...to here. New files.
* libltdl/ltdl.c, libltdl/ltdl.h (lt_dladderror, lt_dlseterror)
(lt_dlerror_table):
Moved from here...
* libltdl/lt_error.c, libltdl/lt_error.h (lt_dladderror)
(lt_dlseterror, lt_dlerror_table): ...to here. New files.
(argz_next, argz_stringify): Move from here...
* libltdl/argz.c: New file. ...to here.
* libltdl/lt__glibc.h: New file. Rename global symbols into the
lt__ namespace.
* libltdl/lt__private.h: Include lt__glibc.h.
* libltdl/Makefile.am (libltdl_la_SOURCES): Add new files.
(AM_CPPFLAGS): Add -DLTDL.
* libltdl/argz.h (argz_append, argz_create_sep, argz_insert)
(argz_next, argz_stringify): New file. Declare argz functions
here, including lt__glibc.h when LTDL is defined to rename global
symbols for libltdl.
* m4/ltdl.m4 (AC_LTDL_FUNC_ARGZ): Add argz to AC_LIBOBJ if any of
our argz_* functions are missing from the system libraries.
from here...
* libltdl/lt__private.h: ...to here. New file to declare ltdl's
internal interfaces.
* libltdl/ltdl.c: Include lt__private.h.
* m4/ltdl.m4 (AC_LIB_LTDL): Add lt_dirent to AC_LIBOBJ if all of
opendir, readdir and closedir are missing.
(AC_CHECK_HEADERS): Remove assert.h, ctype.h, errno.h, malloc.h,
stdio.h and stdlib.h; these headers are all available in standard
c89 environments and newer.
* libltdl/lt__private.h: Include them here unconditionally.
* libltdl/lt__dirent.c (opendir, readdir, closedir): New file.
Windows dirent emulation functions moved to here...
* libltdl/ltdl.c (opendir, readdir, closedir): ...from here.
* libltdl/lt__dirent.h: New file. Rename the global symbols from
lt__dirent.c into the lt__ namespace so they don't clash with
other libraries.
Factor out the bottom portability layer from ltdl. Code in this
layer has global symbols renamed by lt__pre89.h, and may not
refer to any symbols except those provided by the system libraries
or other code in the portability layer:
* libltdl/lt__pre89.h: New file. Rename all the symbols from
LTLIBOBJS into the lt__ namespace so that they don't clash with
other libraries.
* libltdl/ltdl.c (rpl_memcpy, rpl_memmove, rpl_strchr, rpl_strcmp)
(rpl_strrchr): Moved from here...
* libltdl/memcpy.c (memcpy): ...to here, and fixed void *
dereference bug...
* libltdl/memmove.c (memmove): ...to here, and fixed void *
dereference bug...
* libltdl/strchr.c (strchr): ...to here...
* libltdl/strcmp.c (strcmp): ...here...
* libltdl/strrchr.c (strrchr): ...and here.
* libltdl/Makefile.am (libltdl_la_SOURCES): Add lt__pre89.h.
(libltdl_la_LIBADD, libltdlc_la_LIBADD): Add $(LTLIBOBJS).
(ltdldata_DATA): Add replacement sources files.
* m4/ltdl.m4 (AC_LIB_LTDL): Do careful config.h and LTLIBOBJ
setting for missing pre89 functions.
$Revision: 1.1470 $ $Date: 2004/04/08 12:01:57 $
There was no clean separation of abstraction layers in libltdl.
The first step in fixing this is to factor out the memory
management abstraction, making a start on removing promiscuity
from the underlying portability layer:
* doc/libtool.texi (Libltdl interface): Remove lt_dlmalloc,
lt_dlrealloc and lt_dlfree references. The memory management
layer used by libltdl is now private.
* libltdl/lt_system.h: New installed header for system portability
abstraction.
* libltdl/ltdl.h: Use it.
* libltdl/lt__alloc.c, libltdl/lt__alloc.h: New module above
system portability layer to abstract ltdl's memory management.
* libltdl/ltdl.c: Use lt__alloc.h.
(closedir): Use free.
(opendir): Use malloc/free.
(lt__xalloc_die_callback): Report memory failures through
lt_dlerror.
(lt_dlinit): Use it to initialise memory management.
(LT_DLMALLOC, LT_DLREALLOC, LT_DLFREE, LT_EMALLOC, LT_EREALLOC)
(rpl_strdup, rpl_realloc, lt_estrdup, lt_emalloc, lt_erealloc):
Removed in favour of...
(lt__strdup, lt__memdup, MALLOC, REALLOC, FREE): ...these calls
from libltdl/lt__alloc.h. Changed all callers.
(rpl_argz_append, rpl_argz_create_sep, rpl_argz_insert): As part
of the portability layer, these functions no longer use libltdl
memory management API.
(free_vars): Factored out.
(LT_DLMEM_REASSIGN): While redoing memory handling, renamed...
* libltdl/lt__alloc.h (MEMREASSIGN): ...to this.
* libltdl/Makefile.am (AUTOMAKE_OPTIONS): Let automake track
dependencies automatically.
(pkgincludedir): Override from parent package's setting.
(pkginclude_HEADERS): Install lt_system.h.
(libltdl_la_SOURCES): Add new files.
* NEWS: Updated.
Reported by Dalibor Topic <robilad@kaffe.org>
which were copying Makefile.in from the libtool tree into the
package running libtoolize. Now we explicitly list the files to
copy to force the package to generate its own Makefile.in:
* libltdl/Makefile.am (libltdl_la_SOURCES, libltdlc_la_SOURCES):
Add ltdl.h.
(ltdldatadir): New variable for installation directory of
libtoolize --ltdl files.
(ltdldata_DATA): Tell automake what files to copy there at install
time (and remove at unistall time!).
(local-install-files): Removed. This hack is not required
anymore, the automake generated install rules are much more
advanced than this.
* Makefile.am (install-data-hook, uninstall-local): Removed.
Libltdl files for libtoolize are installed by their own Makefile
now.
$top_srcdir.
* m4/ltdl.m4 (AC_LIB_LTDL): Run AC_CONFIG_HEADERS for the user if
necessary. Calculate filename from first argument to
AC_CONFIG_HEADERS, and substitute as CONFIG_H.
* libltdl/Makefile.am (AM_CPPFLAGS): Make sure we are searching in
$top_srcdir for headers.
(DEFS): Override the default HAVE_CONFIG_H with the config.h
filename.
(ltdl.lo): Reference config.h via $(CONFIG_H).
* libltdl/ltdl.c (HAVE_CONFIG_H): Ditto.
tests/depdemo/configure.ac, tests/f77demo/configure.ac,
tests/mdemo/configure.ac, tests/mdemo2/configure.ac,
tests/pdemo/configure.ac, tests/tagdemo/configure.ac: Declare just
the tags we need using AC_LIBTOOL_TAGS, reducing the size of the
configure script by 50% in most cases.
added to the list, in exchange for appending loaders to the list
with O(N) rather than O(1). The longest the loader list can ever
get is 4 (on cygwin with dld installed) so it probably constitutes
a small speedup, in addition to making the code much more readable.
ltmain unconditionally.
(_LT_PROG_LTMAIN): New macro to ensure that the
shell variable `ltmain' actually points at a suitable `ltmain.sh'.
(_AC_PROG_LIBTOOL): Require it.
(AC_LIBTOOL_CONFIG, _LT_AC_TAG_CONFIG): Invoke it.
* Makefile.am (libtool): ltmain.sh is in the build tree.
* libltdl/configure.ac: Ditto.
tests/depdemo/configure.ac, tests/f77demo/configure.ac,
tests/mdemo/configure.ac, tests/mdemo2/configure.ac,
tests/pdemo/configure.ac, tests/tagdemo/configure.ac:
s/AM_PROG_LIBTOOL/AC_PROG_LIBTOOL/. Marching boldly into the 21th
century :-$
defined, unless __CYGWIN__ or __CYGWIN32__ are defined.
(LT_SCOPE): Now set without reference to __CYGWIN__ definition,
since __WINDOWS__ now implies !__CYGWIN__ after canonicalisation.
(LT_PARAMS, lt_ptr): Use canonicalised __WINDOWS__ to determine
which values to set these macros to.
* config.guess, config.sub, mkstamp: Moved from here...
* config/config.guess, config/config.sub, config/mkstamp: ...to
here, respectively.
* libtool.m4, ltdl.m4: Moved from here...
* m4/libtool.m4, m4/ltdl.m4: ...to here, respectively.
* configure.ac: Removed various acinclude.m4 hackery, as these
files are no longer needed with automake 1.8.
* Makefile.am: Removed various acinclude.m4 hackery, as these
files are no longer needed with automake 1.8.
(AUTOMAKE_OPTIONS): Require CVS automake.
(CONF_SUBDIRS, CFLAGS, CPPFLAGS, LDFLAGS, LIBS, FFLAGS, FLIBS):
Automake now makes a Make variable from every AC_SUBST, so these
are NOP.
(aclocal_macros): These files are now in their own m4 subdir.
Changed all clients.
(EXTRA_DIST): mkstamp has moved to the new config subdir. Changed
all clients.
(pkgdata_SCRIPTS): Ditto wrt config.guess and config.sub.
(pkgdata_DATA): Ditto wrt ltmain.sh.
* f77demo/configure.ac, libltdl/configure.ac (AM_CONFIG_HEADER):
Is deprecated in favour of AC_CONFIG_HEADERS. Updated to the
latter.
* Makefile.am, cdemo/Makefile.am, demo/Makefile.am,
depdemo/Makefile.am, f77demo/Makefile.am, mdemo/Makefile.am,
mdemo2/Makefile.am, pdemo/Makefile.am, tagdemo/Makefile.am
(EXTRA_DIST): Remove acinclude.m4.
(ACLOCAL_AMFLAGS): Search new `m4' macro directory.
* configure.ac, cdemo/configure.ac, demo/configure.ac,
depdemo/configure.ac, f77demo/configure.ac, mdemo/configure.ac,
mdemo2/configure.ac, pdemo/configure.ac, tagdemo/configure.ac
(AC_CONFIG_AUX_DIR): Declare that config helper scripts are now
kept in the new config subdir.
* libltdl/configure.ac (AC_CONFIG_AUX_DIR): Removed. Defaults to
`.' anyway.