* libltdl/ltdl.c (file_worker_func): New type.
(lt_dlforeachfile): Instead of passing a function pointer as a
data pointer, pass a pointer to a file_worker_func pointer.
(foreach_callback_func): Adjust.
* tests/mdemo/main.c: Assume C89. Exercise lt_dlforeachfile.
(callback, try_iterate, my_dirname): New functions.
* tests/mdemo-exec.test: Check for its output.
files generated in doc and tests already lived in
$top_srcdir/Makefile.am, along with proxy rules in sub-Makefiles,
this changeset consolidates almost everything into the top
Makefile.am, simplifying things considerably:
* doc/Makefile.am, tests/Makefile.am: Removed. All rules moved...
* Makefile.am: ...to here and adjusted to run from $top_builddir.
Some reformatting to group rules and declarations by purpose, and
simplify with respect to removing much of the make recursion.
Add `doc/PLATFORMS', `doc/fdl.texi' and `doc/notes.texi'.
`defs.in' and `defs.m4sh' are in directory `tests'.
(uninstall-hook): Don't forget to uninstall libtoolize's libltdl
source tree.
* bootstrap: Simplified dirty makefile management, and bootstrap
file creation in light of having only a single pertinent
Makefile.
* configure.ac (CONF_SUBDIRS): Add tests/ prefix to each subdir to
compensate.
(DIST_MAKEFILE_LIST): Adjust.
(AC_CONFIG_FILES): Remove doc/Makefile and tests/Makefile.
* tests/defs.m4sh (LIBTOOL, scripts): Adjust paths.
* tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/f77demo-conf.test,
tests/f77demo-exec.test, tests/f77demo-make.test,
tests/f77demo-shared.test, tests/f77demo-static.test,
tests/link-2.test, tests/link.test, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test, tests/nomode.test,
tests/objectlist.test, tests/pdemo-conf.test,
tests/pdemo-exec.test, tests/pdemo-inst.test,
tests/pdemo-make.test, tests/quote.test, tests/sh.test,
tests/suffix.test, tests/tagdemo-conf.test,
tests/tagdemo-exec.test, tests/tagdemo-make.test,
tests/tagdemo-shared.test, tests/tagdemo-static.test,
tests/tagdemo-undef.test, tests/tagtrace.test (func_cd,
func_require): Adjust paths..
for a different host, it can't be shipped. That also means that
defs will always be generated in the build tree, so each test case
can have the srcdir discovery factored away into tests/defs.in:
* Makefile.am (EXTRA_DIST): s/defs/defs.in/g
* tests/Makefile.am (defs): New rule to remake defs from the
parent directory's Makefile.
* tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/demo-conf.test,
tests/demo-deplibs.test, tests/demo-exec.test,
tests/demo-hardcode.test, tests/demo-inst.test,
tests/demo-make.test, tests/demo-nofast.test,
tests/demo-noinst-link.test, tests/demo-nopic.test,
tests/demo-pic.test, tests/demo-relink.test,
tests/demo-shared.test, tests/demo-static.test,
tests/demo-unst.test, tests/depdemo-conf.test,
tests/depdemo-exec.test, tests/depdemo-inst.test,
tests/depdemo-make.test, tests/depdemo-nofast.test,
tests/depdemo-relink.test, tests/depdemo-shared.test,
tests/depdemo-static.test, tests/depdemo-unst.test,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/link-2.test, tests/link.test,
tests/mdemo-conf.test, tests/mdemo-dryrun.test,
tests/mdemo-exec.test, tests/mdemo-inst.test,
tests/mdemo-make.test, tests/mdemo-shared.test,
tests/mdemo-static.test, tests/mdemo-unst.test,
tests/mdemo2-conf.test, tests/mdemo2-exec.test,
tests/mdemo2-make.test, tests/nomode.test, tests/pdemo-conf.test,
tests/pdemo-exec.test, tests/pdemo-inst.test,
tests/pdemo-make.test, tests/quote.test, tests/sh.test,
tests/suffix.test, tests/tagdemo-conf.test,
tests/tagdemo-exec.test, tests/tagdemo-make.test,
tests/tagdemo-shared.test, tests/tagdemo-static.test,
tests/tagtrace.test: Removed srcdir discovery boilerplate...
* tests/defs.in: ...and put it here.
* tests/defs: Set CONFIG_SITE to /nonexistent, except on DJGPP,
which requires its config.site, to work correctly.
* tests/cdemo-conf.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/demo-conf.test,
tests/demo-nofast.test, tests/demo-nopic.test,
tests/demo-pic.test, tests/demo-shared.test,
tests/demo-static.test, tests/depdemo-conf.test,
tests/depdemo-nofast.test, tests/depdemo-shared.test,
tests/depdemo-static.test, tests/f77demo-conf.test,
tests/f77demo-shared.test, tests/f77demo-static.test,
tests/mdemo-conf.test, tests/mdemo-shared.test,
tests/mdemo-static.test, tests/pdemo-conf.test,
tests/tagdemo-conf.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test: Don't set CONFIG_SITE, now that
tests/defs sets it.
* tests/cdemo-exec.test, tests/demo-exec.test,
tests/demo-inst.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/f77demo-exec.test,
tests/mdemo-exec.test, tests/mdemo-inst.test,
tests/pdemo-exec.test, tests/pdemo-inst.test,
tests/tagdemo-exec.test: When checking for the existence
of executables, use the executable file extension from $EXEEXT.
* THANKS: Added Rob Collins and Chuck Wilson for their cygwin
work.
From Robert Collins <robert.collins@itdomain.com.au>:
* configure.ac (AC_EXEEXT): Needed for DOSish systems.
* libtool.m4 (shlibpath_overrides_runpath) [cygwin]: Set to yes
when compiling with gcc.
(lt_prog_compiler_pic) [cygwin]: No longer needs the -DDLL_EXPORT
hack, so we just say the pic is the default.
(AC_LIBTOOL_PROG_LD_SHLIBS) [cygwin]: Extract symbols from a
library normally.
[cygwin]: Declare C++ compiler characterisics for g++, taking into
account the new auto-import support in cygwin ld.
* ltmain.in (specialdeplibs) [cygwin]: Be careful about
eliminating duplicate -lgcc's from the link line.
[cygwin]: Be smarter about .exe suffixes.
* demo/configure.ac (AC_EXEEXT, AC_LIBTOOL_WIN32_DLL): Support
DOSish systems properly.
* depdemo/configure.ac (AC_EXEEXT, AC_LIBTOOL_WIN32_DLL): Ditto.
* demo/Makefile.am (deplibs-check): Allow for .exe suffix. Use
hell_static instead of hell.static for multi-`.' inhibited OSes.
* tests/demo-exec.test: Ditto.
* tests/demo-inst.test: Ditto.
* demo/foo.h [cygwin]: Sanitize cygwin dll support.
* demo/foo.c (_LIBFOO_COMPILATION_): No longer required.
* demo/hello.c (_LIBFOO_COMPILATION_): Ditto.
* depdemo/Makefile.am (bin_PROGRAMS): Use depdemo_static instead
of depdemo.static for multi-`.' inhibited OSes.
* tests/depdemo-exec.test: Ditto.
* tests/depdemo-inst.test: Ditto.
* mdemo/Makefile.am (bin_PROGRAMS): Ditto for mdemo.static.
* tests/dryrun.test: Ditto.
* tests/mdemo-exec.test: Ditto.
* tests/mdemo-inst.test: Ditto.
* tests/build-relink.test: Be careful about possible .exe
suffixes.
* tests/noinst-link.test: Allow for .exe suffix.
* 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
depdemo commented out, so that `dist' works before `check'
(BUILD_LTDL): will contain libltdl if --enable-ltdl-install
* Makefile.am (DIST_SUBDIRS): expand SUBDIRS and add depdemo,
commented out
(SUBDIRS): add $(BUILT_LTDL)
* libltdl/Makefile.am (EXTRA_LTLIBRARIES): add libtest.la, the
same as libltdl but always a convenience library. Not built by
default. Both libraries now depend on the libtool script, that
depends on ../libtool and is rebuilt when needed
* mdemo/Makefile.am (mdemo, mdemo.debug): depend on and link with
../libltdl/libtest.la, that is rebuilt if needed
(mdemo_LDADD): removed $(LIBADD_M), to avoid silent failures
(foo1.la): renamed from libfoo1.la; test removing the lib prefix
* mdemo/foo1.c: renamed libfoo1_LTX symbols to foo1_LTX
* mdemo/main.c: don't include string.h nor math.h, nor refer to
sin nor cos
* tests/mdemo-exec.test: renamed libfoo1.la to foo1.la
* tests/mdemo-inst.test: ditto
* libltdl/Makefile.am (CFLAGS): ditto
* libltdl/configure.in: check for memory.h, rindex() and
dlpreopening. Fixed NEED_USCORE caching policy.
* libltdl/ltdl.h (lt_dlsym): make the name argument const
* libltdl/ltdl.c (types): new variable: head of list of available
dlopening mechanisms
(lt_dltype_t): interface of a dlopening mechanism, with pointers
to functions for init, exit, open, close and sym
(lt_dlhandle_t): added pointer to interface type
(strdup): don't name it strdup; it can be troublesome
(strrchr): ditto; use rindex if available
(LIBTOOL_STATIC): check HAVE_DLPREOPEN instead, and move to the
end of the file, so that it becomes the header of the list
(all): renamed all interface-implementation functions, to avoid
name clashes, and created lt_dltype_t nodes for all of them
(lt_dlinit): initialize all available interfaces; remove those
that fail from the list. Return failure only if no interfaces
could be initialized.
(lt_dlexit): return number of failures
(tryall_dlopen): try to open the library with all available
interfaces
(lt_dlopen): use tryall_dlopen; increased size of fixed buffers.
We should probably make these bound-checked or dynamically
allocated for the final release! Fix bug when filename did not
contain slashes; should we check for `\\' too? Try old_library if
everything else fails.
(lt_dlclose): use the interface type for closing
(lt_dlsym): make `symbol' const, use interface type for looking up
* mdemo/Makefile.am: moved mdemo/modules/* back into mdemo
(SUBDIRS): removed
(libfoo2_la_LDFLAGS): added -static; nice test. However, since it
causes -lm to linked into hell*, it causes tests that should fail
to pass
(noinst_HEADERS): no need to install foo.h
* mdemo/configure.in: remove modules/Makefile
tests/mdemo-exec.test: updated accordingly
* ltconfig.in, ltmain.in: updated and fixed the patches below
1998-11-04 Thomas Tanner <tanner@gmx.de>
* mdemo/*: added new demo to demonstrate building of dlopenend
modules
* tests/Makefile.am, tests/mdemo*: added some tests for mdemo
1998-11-04 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
* demo/configure.in: added AC_EXEEXT macro so that the tests can
work on cywin32/mingw32 hosts. This requires the current CVS
autoconf
1998-11-04 Thomas Tanner <tanner@gmx.de>
* ltmain.in: New flag -export-symbols; new dlpreopen system
* demo/dlmain.c: removed dld_preloaded_symbol_count
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltmain.in: On installation, don't get confused if the same name
appears more than once in the list of library names.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add objext and libext variables. Check for object
suffix. Check for mingw32* as well as cygwin32*. Use objext when
testing compiler. Add support for Visual C++ on cygwin32 when not
using gcc. Add objext, libext, and fix_srcfile_path to generated
libtool script.
* ltmain.in: Use .${objext} rather than .o. Use fix_srcfile_path
if it is set. Check for .obj as well as for .o, and for .lib as
well as for .a. Use .${libext} rather than .a when creating old
libraries.
* libtoolize.in: Change initial /bin/sh to @SHELL@.
* libtool.m4 (AM_PROG_LIBTOOL): Add AC_REQUIRE for
AC_CANONICAL_BUILD, so that autoconf doesn't get mixed up by the
AC_REQUIRE in AC_CHECK_TOOL.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Look in the right directory for libtool.c in
archive_cmds for cygwin32.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Fix cygwin32 support to avoid using a double
extension, to delete the def file, to set version_type to windows,
and to include versuffix in the DLL name.
* ltmain.in: Add support for a version_type of windows.
1998-11-04 Ian Lance Taylor <ian@cygnus.com>
* ltconfig.in: Add cygwin32 support.
* libtool.m4 (AM_PROG_LIBTOOL): Call AM_SYS_LIBTOOL_CYGWIN32 on a
cygwin32 host. Pass DLLTOOL and AS to ltconfig.
(AM_SYS_LIBTOOL_CYGWIN32): New macro.