Commit Graph

22 Commits

Author SHA1 Message Date
Gary V. Vaughan
6c7f7fe214 * ltdl.m4: Bump serial number to 3.
(AC_LIB_LTDL): Require AC_HEADER_DIRENT for ltdl.c.
* libltdl/ltdl.h (lt_dlforeachfile): Prototype for new function.
* libltdl/ltdl.c: Include an appropriate header for the
opendir/dirent api.
(foreach_dirinpath): Visit each file in a list of directories.
(find_file_callback): Factor out the core of find_file() to make
use of foreach_dirinpath().
(find_file): Use it!
(find_handle_callback, find_handle): Ditto.
(lt_dlforeachfile):  New function to find files in a searchpath.,,
(foreachfile_callback): ...using this callback.
* doc/libtool.texi (Libltdl interface): Document new
lt_dlforeachfile api call.
2001-06-26 00:50:39 +00:00
Gary V. Vaughan
fb267cab4e * 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>
2001-04-24 22:53:48 +00:00
Gary V. Vaughan
0c23b107bc * ltdl.m4 (AC_LTDL_DLSYM_USCORE): Add $LIBADD_DL while
checking for dlsym _.

From Simon Spero <ses@ibiblio.org>
2001-04-23 00:34:53 +00:00
Gary V. Vaughan
3050795c98 * 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>
2001-04-22 22:50:54 +00:00
Gary V. Vaughan
9c1932087e From Nick Hudson <skrll@netbsd.org>
* ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): netbsd* is able to
automatically load module deplibs without assistance from
libltdl.
2001-02-05 00:24:55 +00:00
Gary V. Vaughan
482d62add6 * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): If we know that the host
architecture automatically loads deplibs, then...
* libltdl/ltdl.c (load_deplibs): ...don't manually load each one.
2001-02-02 19:02:38 +00:00
Gary V. Vaughan
bd96d1928a * NEWS: Updated.
* doc/libtool.texi (User defined module data):  Document it all.
* ltdl.m4:  Check for memcpy, or else bcopy.
* ltdl.c (lt_caller_data): New type.
(lt_dl_handle_struct): Add an lt_caller_data field.
(lt_dlcaller_register, lt_dlcaller_set_data,
lt_dlcaller_get_data): New functions.
(rpl_memcpy): A minimal fallback implementation.
(rpl_realloc): A realloc implemented with lt_dlmalloc and
lt_dlfree.
(LT_DLMALLOC, LT_DLFREE, LT_DLREALLOC, LT_DLMEM_REASSIGN):
New memory handling convenience macros.  Use them
appropriately throughout the rest of this file.
* ltdl.h (lt_dlcaller_register, lt_dlcaller_set_data,
lt_dlcaller_get_data): Prototyped.
2001-01-05 09:33:39 +00:00
Gary V. Vaughan
010aafbcb0 * libtool.m4 (_LT_AC_LTCONFIG_HACK): Move the tests for dlopen
from here...
(AC_LTDL_DLOPEN_SELF): ...to here.
(_LTDL_AC_CHECK_DLFCN):  Factor out repeated code for dlfcn.h
(_LT_AC_TRY_DLOPEN_SELF): Factor out repeated code for
checking dlopen status.
* ltdl.m4 (AC_LIB_LTDL):  Use _LTDL_AC_CHECK_DLFCN.
dlopen compile time checking.  Use _LTDL_AC_CHECK_DLFCN.
(AC_LTDL_DLSYM_USCORE):  Use _LTDL_AC_TRY_DLOPEN_SELF.
2000-12-01 19:13:20 +00:00
Morten Eriksen
ede7b592b5 * ltdl.m4 (AC_LIB_LTDL, AC_LTDL_SYMBOL_USCORE): Break a circular
dependency between AC_LTDL_SYMBOL_USCORE and AC_LTDL_DLSYM_USCORE.
2000-11-20 23:15:09 +00:00
Gary V. Vaughan
0e7f0e281f * ltdl.m4 (AC_LTDL_SYMBOL_USCORE): Use $ac_ext for conftest
sourcefile.
* libtool.m4: Use $ac_ext and $ac_objext respectively for conftest
sources and objects.
Reported by Carlo Wood <carlo@alinoe.com>
2000-11-11 13:19:53 +00:00
Gary V. Vaughan
7361cdafc0 * TODO: Removed the item describing the change below, and added a
similar item to remind us to change the ltdl.m4 macros again when
_LT_AC_LTCONFIG_HACK is divided into proper macros.
* ltdl.m4 (AC_LTDL_SNARF_CONFIG):  Removed.  No longet required
now that ltconfig has migrated to libtool.m4.
(AC_LTDL_SHLIBEXT): Require _LT_AC_LTCONFIG_HACK.
(AC_LTDL_SHLIBPATH): ditto.
(AC_LTDL_SYSSEARCHPATH): ditto.
2000-09-16 20:08:07 +00:00
Gary V. Vaughan
2ccd27d360 * ltdl.m4 (AC_LTDL_DLPREOPEN): require the libtool.m4 symbol_pipe
macro.
(AC_LTDL_SYMBOL_USCORE): ditto.
(AC_LTDL_GLOBAL_SYMBOL_PIPE): Removed, since it is a duplicate
of...
* libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): ...this new
macro, extracted from _LT_AC_LTCONFIG_HACK.
2000-09-16 17:55:00 +00:00
Gary V. Vaughan
59806b1784 * ltdl.m4 (changequote): An audit of changequote and m4
quote usage -- all changequotes have been removed, and some
latent unquoted `[' and `]' bugs have been fixed.
2000-09-16 16:09:39 +00:00
Gary V. Vaughan
e927e43114 libtool.m4 now contains a version of the code that used to run
from ltconfig, so that ltmain.sh and then libtool are
generated at configure time.

* Makefile.am:  Don't generate ltmain.sh or ltconfig anymore.
* bootstrap: ltconfig is no more!
* configure.in: Call AC_PROG_LIBTOOL directly.
(AC_OUTPUT): Generate tmain.sh.
* libtool.m4: Don't build an argument list for ltconfig.
(_LT_AC_LTCONFIG_HACK):  Refactoring of the former contents of
ltconfig.in to take advantage of the m4 macros from autoconf.
* ltmain.in: Don't do a version check against ltconfig.
* tests/assign.test: Remove reference to ltconfig.
* tests/hardcode.test: ditto.
* tests/sh.test: ditto.
2000-09-06 17:31:09 +00:00
Alexandre Oliva
4281dfe395 * ltdl.m4 (HAVE_LIBDL): Look for dlopen in -lsvld.
* ltconfig.in: Likewise.
2000-09-04 01:41:59 +00:00
Alexandre Oliva
d098088cd9 * ltdl.m4: Oops, I had forgotten to commit this part of Syd Polk's
patch from 2000-06-17.
2000-09-02 23:06:57 +00:00
Gary V. Vaughan
f802484346 * NEWS: updated.
* doc/libtool.texi (Libltdl interface): Moved user defined module
loader documentation from here...
(Module loaders for libltdl) ...to here, and updated the text and
added examples.
* ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader.
* libltdl/ltdl.h: Reformatted and commented for readability.
(struct lt_user_dlloader): New data type for passing
initialisation pointers to lt_add_dlloader.
(LTDL_ERROR_INVALID_LOADER):  New error message when non loader
handles are passed to the user loader API.
(LTDL_ERROR_INIT_LOADER): New error when loader initialisation
fails.
(LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails.
(lt_module_open_t): renamed from lt_lib_open_t.
(lt_module_close_t): renamed from lt_lib_close_t.
(lt_dlloader_exit_t): renamed from lt_dlloader_exit_t.
* libltdl/ltdl.c: Reordered builtin loaders so that the "dld"
loader no longer occurs before "dlopen" on some platforms and
after it on others.
(lt_dlloader_t): Moved here from ltdl.h, added a field,
"loader_name", for identifying the loader, and renamed from
lt_dltype_t.  Renamed type variables to loader IFF of type
lt_dlloader_t.
(lt_module_t): Renamed from lt_syshandle. Renamed handle variables
to module IFF of type lt_module_t.
(LTDL_TYPE_TOP): Deleted.  No longer required.
(sys_dl): Initialised as a struct lt_user_dlloader.
(sys_dl_init): Deleted.  No longer required.
(sys_dl_exit): Ditto.
(sys_shl): Initialised as a struct lt_user_dlloader.
(sys_shl_init): Deleted.  No longer required.
(sys_shl_exit): Ditto.
(sys_wll): Initialised as a struct lt_user_dlloader.
(sys_wll_init): Deleted.  No longer required.
(sys_wll_exit): Ditto.
(sys_bedl): Initialised as a struct lt_user_dlloader.
(sys_bedl_init): Deleted.  No longer required.
(sys_bedl_exit): Ditto.
(sys_dld): Initialised as a struct lt_user_dlloader.
(sys_dld_init): Deleted.  No longer required.
(sys_dld_exit): Ditto.
(sys_presym): Initialised as a struct lt_user_dlloader.
(lt_mod_init_t): Moved to here from ltdl.h.
(lt_dlinit): Add builtin loaders using the user loader API.
(lt_dlexit): Unregister and free all loaders.
(lt_add_dlloader): New function to add a new module loader after the
loader specified in the argument.
(lt_remove_dlloader): New function to remove a module loader.
(lt_next_dlloader): New function for iterating over module loaders.
(lt_dlloader_name): Accessor function for name of dlloader.
(lt_find_dlloader): New function to get a reference to a registered
module loader.
(strcmp): static implementation incase the host has none.
(lt_dlgettypes, lt_dlsettypes): Removed.
2000-02-02 22:43:14 +00:00
Thomas Tanner
58931da319 fix severe bugs reported by Elrond <Elrond@Wunder-Nett.org>
* ltconfig.in: replace $objdir with $output_objdir

* ltmain.in: change to the builddir before relinking programs

* ltmain.in, ltconfig.in, libtool.m4, ltdl.m4:
  remove unnessary spaces from line endings
2000-01-24 20:34:46 +00:00
Thomas Tanner
8683e2f1b4 * ltmain.in: rewrite of the ILD code, merge linking code for
programs, libraries and objects, allow linking of shared libraries
  against static libraries/objects on platforms that support it
  but print a warning, fix some typos

* partially revert my previous change and
  update only copyright notices of files that were actually modified

* NEWS: update

* libltdl/Makefile.am: version number was wrong

* libltdl/ltdl.c (tryall_dlopen): revert Gary's change
  since it breaks dlpreopening
* ltdl.m4: ditto

* libltdl/ltdl.c (sys_search_path): search in the system default
  library search path, too
* ltdl.m4 (AC_LTDL_SYSSEARCHPATH): extract the path

* libltdl/ltdl.c (find_module): remove bogus file_not_found_error

* libltdl/ltdl.c (load_deplibs): implement loading of dependency
  libraries
* libltdl/ltdl.c (unload_deplibs): implement unloading of dependency
  libraries
* libltdl/ltdl.c (lt_dlexit): correctly close all modules and
  their dependencies

* libltdl/ltdl.c (lt_dlforeach): new function
* libltdl/ltdl.h: ditto
* doc/libtool.texi (using libltdl): document it

* libtool.m4: reformatting, only add -I$topsrc_dir/libltdl to
  INCLTDL

* libtoolize.in: reformatting
* ltconfig.in: reformatting
* ltmain.in: reformatting

* mdemo/configure.in: AC_SUBST INCLTDL
* mdemo/Makefile.am: use INCLTDL

* tests/Makefile.am: reexport OBJEXT and EXEEXT
* tests/dryrun.test: use them for building main.obj and mdemo.exe
2000-01-19 20:34:37 +00:00
Gary V. Vaughan
f7c496a099 * libltdl/ltdl.c (tryall_dlopen): Abort with
file_not_found_error before trying all lib_open() methods
if the file to be dlopened doesn't exist.
* ltdl.m4 (AC_HAVE_HEADERS): add unistd.h.
2000-01-17 15:21:33 +00:00
Thomas Tanner
47938d46eb * update all copyright notices to 2000
* doc/libtool.texi (using libltdl): document new lt_dlinfo struct,
  replace NULL with @code{NULL}, document lt_dlsetdata(),
  lt_dlgetdata() and lt_dlgetinfo()
* libltdl/Makefile.am: increment interface version number
* libltdl/configure.in: set version number to 1.1
* libltdl/ltdl.c: make some variables public by moving them
  to the info struct, add support for application specific data
  within module handles, new lt_dlsetdata(), lt_dlgetdata() and
  lt_dlgetinfo() functions,
  fix memory leaks, minor cleanups
* libltdl/ltdl.h: ditto
* mdemo/main.c: demonstrate use of lt_dlgetinfo,
  improved handling of errors

* ltconfig.in: set hardcode_into_libs = yes for GNU/Hurd, Linux
  and Solaris, only hardcode *all* run-paths if hardcode_into_libs
  is set to 'all', otherwise hardcode only user-specified rpaths
  into libraries
* ltmain.in: minor cleanups, we don't need to add user-specified
  rpaths to compile_rpath, finalize_rpath is sufficient

* ltconfig.in: transform linux* -> *linux-gnu* _after_ host_os has
  been set! (reported by Bruno Haible <haible@ilog.fr>)

* configure.in: AC_SUBST reload_flag, deplibs_check_method
  and file_magic_cmd

* README: use 'libtool --version' instead of 'ltconfig --version'
  (suggested by Francios Pinard <pinard@iro.umontreal.ca>
2000-01-13 00:28:09 +00:00
Alexandre Oliva
a7a4a73302 * ltdl.m4: Renamed from...
* libltdl/ltdl.m4: that no longer exists.
* configure.in (ACINCLUDE_M4_LIST): Removed libltdl/acinclude.m4.
* Makefile.am (aclocal_macros): Added ltdl.m4.
(libltdl/acinclude.m4): Concatenate libtool.m4 and ltdl.m4.
* bootstrap: Likewise.
* libltdl/Makefile.am (ACLOCAL): Remove the definition.  Relying
upon -I may lead to duplicates.
* doc/libtool.texi: Suggest appending ltdl.m4 to acinclude.m4.
* libtoolize.in: Check AC_LIB_LTDL version number in aclocal.m4.
1999-12-16 11:40:16 +00:00