To safely use a non-literal first argument to `test', you must
always prepend a literal non-`-' character, but often the second
operand is a constant that doesn't begin with a `-' already, so
always use `test a = "$b"' instead of noisy `test "X$b" = Xa'.
* cfg.mk (sc_prohibit_test_const_follows_var): New syntax-check
rule to ensure we don't reintroduce noisy test operands.
* bootstrap, build-aux/extract-trace, build-aux/general.m4sh,
build-aux/ltmain.m4sh, doc/libtool.texi, libtoolize.m4sh,
m4/argz.m4, m4/libtool.m4, m4/ltdl.m4, tests/bindir.at,
tests/defs.m4sh, tests/demo-relink.test,
tests/demo/configure.ac, tests/depdemo-relink.test,
tests/destdir.at, tests/duplicate_conv.at, tests/fail.at,
tests/getopt-m4sh.at, tests/help.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order2.at, tests/lt_dlopenext.at,
tests/mdemo/configure.ac, tests/mdemo2/configure.ac,
tests/need_lib_prefix.at, tests/nocase.at,
tests/pdemo/configure.ac, tests/pic_flag.at,
tests/search-path.at, tests/shlibpath.at, tests/static.at,
tests/sysroot.at, tests/tagtrace.test, tests/testsuite.at,
tests/with-pic.at: Swap operands to avoid useless noise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* cfg.mk (local-checks-to-fix): Remove sc_space_tab from list of
disabled checks.
(exclude_file_name_regexp--sc_space_tab): Don't flag space-tab
sequences in diff files as an error.
* Makefile.am, build-aux/general.m4sh, build-aux/git-hooks/commit-msg,
build-aux/ltmain.m4sh, libltdl/loaders/dyld.c,
libltdl/loaders/shl_load.c, libltdl/ltdl.h, libltdl/ltdl.mk,
libltdl/slist.c, libtoolize.m4sh, m4/ltoptions.m4, tests/demo/dlmain.c,
tests/depdemo/main.c, tests/libtoolize.at, tests/lt_dladvise.at,
tests/pdemo/longer_file_name_dlmain.c, tests/sh.test, tests/static.at,
tests/stresstest.at, tests/template.at: Fix space-tab sequences by
reversing them in regexps, and deleting leading spaces in indentation.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
In addition to moving the autoconf auxiliary script directory
into the place expected by GNU developers ($top_srcdir/build-aux)
we also simplify libtoolize somewhat by having libltdl use
whatever directory was specified by the parent project. This is
much more flexible, allows libltdl client projects to also use a
single canonical `$top_srcdir/build-aux' auxiliary script
directory, and maintains backward compatibility with existing
projects that wish to continue using $ltdl_dir/config.
* libltdl/config: Moved whole directory from here...
* build-aux: ...to here.
* libtoolize.m4sh (func_install_pkgaux_subproject): Remove.
(func_install_pkgaux_parent): Remove.
(func_install_pkgaux_files): Considerably simplified now that we
have only a single auxiliary directory to worry about.
(subproject_aux_dir): Remove.
* bootstrap.conf (libtool_readme_release_package_substitutions):
No need to substitute our old unusual aux_dir location into
README-release any more.
* cfg.mk (_build-aux): Now that we use the standard location for
this directory, no need to set this variable either.
* configure.ac (AC_INIT): git-version-gen has moved.
(AC_CONFIG_AUX_DIR): Adjust.
* Makefile.am (stamp-mk, auxexefiles, auxfiles)
(install-data-local): Use build-aux instead of config.
(libltdl/stamp-mk): Ditto.
* libltdl/configure.ac, tests/cdemo/configure.ac,
tests/demo/configure.ac, tests/depdemo/configure.ac,
tests/f77demo/configure.ac, tests/fcdemo/configure.ac,
tests/mdemo/configure.ac, tests/mdemo2/configure.ac,
tests/pdemo/configure.ac, tests/tagdemo/configure.ac
(AC_CONFIG_AUX_DIR): Ditto.
* tests/defs.m4sh (aux_dir): Ditto.
* tests/configure-iface.at, tests/getopt-m4sh.at,
tests/libtoolize.at, tests/subproject.at, tests/testsuite.at:
Ditto.
* Makefile.am (ltdl_ac_aux_dir): Extract at build-time...
* libtoolize.m4sh (require_ltdl_ac_aux_dir): ...so that
libtoolize can access it at runtime without requiring GNU M4 via
the extract-trace script.
(require_Makefile_am_filter): Use it to determine whether the
aux_dir declared in the current (parent) project configure is
compatible with the declarations in installed ltdl autotools
source files.
(require_configure_ac_filter): New function to perform similar
checks and rewrite configure.ac during installation if necessary.
* NEWS: Updated.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
In addition to moving the autoconf macro directory into the
place expected by GNU developers ($top_srcdir/m4), we also
simplify libtoolize somewhat by having libltdl use whatever
directory was specified by the parent project. This is much
more flexible, allows libltdl client projects to also use a
single canonical `$top_srcdir/m4' macro directory, and maintains
backward compatibility with existing projects that wish to
continue using $ltdl_dir/m4.
* libltdl/m4: Moved to it's parent directory.
* Makefile.am (ACLOCAL_AMFLAGS, BUILDCHECK_ENVIRONMENT)
(libltdl/Makefile.am, libltdl/aclocal.m4): Adjust.
* configure.ac (AC_CONFIG_MACRO_DIR): Adjust.
* libltdl/configure.ac (AC_CONFIG_MACRO_DIR): Remove. The
libtoolize script can pick up the project macro directory from
ACLOCAL_AMFLAGS in libltdl/Makefile.am, saving us from needing
to regenerate configure for the sake of a different macro
directory declared in the libltdl using client project.
* libtoolize.m4sh (func_install_pkgmacro_subproject): Remove.
(func_install_pkgmacro_parent): Remove.
(subproject_macro_dir): Remove.
(require_libltdl_Makefile_am, require_ltdl_aclocal_amflags)
(require_ltdl_am_macro_dir): New functions, generated at runtime
by adding libltdl/Makefile.am to the generation loop.
(func_install_pkgmacro_files): Considerably simplified now that
we have only a single macro directory to worry about.
(require_ltdl_relative_macro_dir): New function. Calculate the
relative path from $ltdl_dir to the parent project macro_dir.
(require_Makefile_am_filter): Depending on $ltdl_mode, edit
Makefile.am ACLOCAL_AMFLAGS to use the parent project macro
directory if necessary.
(require_aclocal_m4_filter): Make sure m4_includes point to the
correct macro directory by editing the file as it is copied
into the parent project.
(func_install_pkgltdl_files): Use the filters.
(func_check_macros): Remove various advice that no longer
applies with an always shared macro directory.
(func_require_ltdl_dir): Don't default ltdl_dir to subproject
when `--ltdl' was not given.
(func_require_ltdl_mode): Leave ltdl_mode empty when ltdl_dir is
not set.
(func_require_macro_dir): Default to $ltdl_dir/m4 in subproject
mode with no other directory implied by AC_CONFIG_MACRO_DIR or
ACLOCAL_AMFLAGS, otherwise m4 as before.
* tests/libtoolize.at: Match new "creating file `Makefile.am'"
messages correctly.
(subproject ltdl with non-shared directories): This test no
longer makes sense, so repurposed...
(subproject ltdl with non-canonical macro dir): ...this, to
ensure subproject ltdl continues to automatically share the
parent macro directory.
* tests/cdemo/Makefile.am, tests/demo/Makefile.am,
tests/depdemo/Makefile.am, tests/f77demo/Makefile.am,
tests/fcdemo/Makefile.am, tests/mdemo/Makefile.am,
tests/mdemo2/Makefile.am, tests/pdemo/Makefile.am,
tests/tagdemo/Makefile.am (ACLOCAL_AMFLAGS): Use new location
of macro_dir.
* NEWS: Updated.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
The `gnulib-tool' and gnulib `bootstrap' scripts maintain
`.gitignore' files in asciibetical order, so reorder them now
to avoid spurious patches later.
Take advantage of putting recursive file ignore matches into
`$top_srcdir/.gitignore' and remove repetitions from other
`.gitignore' files.
Makes the touched tests pass for MSVC when DLLs are built.
* tests/demo/Makefile.am, tests/pdemo/Makefile.am: Define
BUILDING_LIBHELLO when building libhello.la.
* tests/demo/foo.h, tests/pdemo/foo.h (nothing) <MSVC>: Export
variable when building the libhello dll and import when using
libhello. For GCC and non-w32, and when building a static
libhello, leave as an ordinary extern.
* tests/pdemo/foo.h [Cygwin]: Remove unneeded and "dead" export
and import logic (LIBFOO_DLL is always undefined).
* tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c (_LIBFOO_COMPILATION_): Not
useful before, even less so now. Removed.
* tests/depdemo/l1/Makefile.am: Define BUILDING_LIBL1 when
building libl1.la.
* tests/depdemo/l2/Makefile.am: Define BUILDING_LIBL2 when
building libl2.la.
* tests/depdemo/l3/Makefile.am: Define BUILDING_LIBL3 when
building libl3.la.
* tests/depdemo/l4/Makefile.am: Define BUILDING_LIBL4 when
building libl4.la.
* tests/depdemo/l1/l1.h, tests/depdemo/l2/l2.h,
tests/depdemo/l3/l3.h, tests/depdemo/l4/l4.h <MSVC>: Export
variables when building the associated library dll and import
when using the library. For GCC and non-w32, and when building
static libraries, leave as an ordinary extern.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* .cvsignore, doc/.cvsignore, libltdl/.cvsignore,
libltdl/config/.cvsignore, libltdl/loaders/.cvsignore,
libltdl/m4/.cvsignore, tests/.cvsignore,
tests/cdemo/.cvsignore, tests/demo/.cvsignore,
tests/depdemo/l1/.cvsignore, tests/depdemo/l2/.cvsignore,
tests/depdemo/l3/.cvsignore, tests/depdemo/l4/.cvsignore,
tests/f77demo/.cvsignore, tests/fcdemo/.cvsignore,
tests/mdemo/.cvsignore, tests/mdemo2/.cvsignore,
tests/pdemo/.cvsignore, tests/tagdemo/.cvsignore: Deleted. Even
when using savannah's CVS readonly mirror there's no way to commit
back to the real repo, so this files are not worth maintaining
or keeping around.
On some systems, lt_preloaded_symbols may not be declared
const due to relocation issues. C99 requires qualification to
match for compatible declarations, so ensure we declare
const'ness in the same way everywhere; link-time optimization
may otherwise rightfully complain about inconsistencies.
Since ltdl.h may not depend upon config.h, rely on system
defines for choosing const'ness.
* NEWS: Update.
* doc/libtool.texi (Dlpreopening): Document this issue.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms):
[__WINDOWS__, __CYGWIN__, _WIN32_WCE]: Define LT_DLSYM_CONST
according to system defines. Remove old shell cruft. Use
LT_DLSYM_CONST for lt_${my_prefix}_LTX_preloaded_symbols.
* libltdl/libltdl/lt_system.h (LT_DLSYM_CONST): Likewise,
define LT_DLSYM_CONST according to system defines.
* tests/demo/foo.h (LT_DLSYM_CONST): Likewise.
* tests/pdemo/foo.h (LT_DLSYM_CONST): Likewise.
* tests/demo/dlmain.c (lt_dlsymlist): Use LT_DLSYM_CONST.
* tests/pdemo/longer_file_name_dlmain.c (lt_dlsymlist):
Likewise.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Likewise
for configure test code.
* libltdl/ltdl.c (preloaded_symbols): Use LT_DLSYM_CONST.
* libltdl/ltdl.h (LTDL_SET_PRELOADED_SYMBOLS): Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/libtool.texi (Dlpreopening): Remove broken documentation
of lt_dlsymbol and lt_dlsymlist. Document typedef lt_dlsymlist
and symbol lt_preloaded_symbols according to the implementation.
* tests/demo/dlmain.c (lt_symlist): Make struct anonymous ...
(lt_dlsymlist): ... and typedef to this name.
(lt_preloaded_symbols, main): Adjust.
* tests/pdemo/longer_file_name_dlmain.c: Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
tests/demo, tests/f77demo, tests/mdemo, tests/tagdemo
(distclean-local): Remove compiler file droppings left by
Autoconf tests that prevent make dist from finishing on
several machines including Mac OS 10.5.
installation to the libtoolize master tree, so that libltdl is
useable even in the extreme case of when automake and autoconf are
not installed on the developers machine. Part of this change
requires some duplication of rules between Makefile.am (which
builds libltdl for this distribution) and libltdl/Makefile.am
(which is used by projects that libltoolize --ltdl --copy), so
libtool now really does use a single toplevel Makefile.am, and we
generate libltdl/Makefile.am from that:
* m4, config: Moved from here...
* libltdl/m4, libltdl/config: ...to here, to reduce the amount of
kludging needed in bootstrap for autoreconf to run.
* tests/cdemo/Makefile.am, tests/demo/Makefile.am,
tests/depdemo/Makefile.am, tests/f77demo/Makefile.am,
tests/fcdemo/Makefile.am, tests/mdemo/Makefile.am,
tests/mdemo2/Makefile.am, tests/pdemo/Makefile.am,
tests/tagdemo/Makefile.am (ACLOCAL_AMFLAGS): Adjust to
compensate.
* tests/cdemo/configure.ac, tests/demo/configure.ac,
tests/depdemo/configure.ac, tests/f77demo/configure.ac,
tests/fcdemo/configure.ac, tests/mdemo/configure.ac,
tests/mdemo2/configure.ac, tests/pdemo/configure.ac,
tests/tagdemo/configure.ac (AC_CONFIG_AUX_DIR): Ditto.
* libltdl/m4/ltdl.m4: Increment serial number.
(LTDL_INIT): Accept an optional directory argument to prefix each
of the LD_DLLOADERS locations. Default to empty for backwards
compatibility.
* Makefile.maint: Adjust to compensate.
* configure.ac (AC_CONFIG_AUX_DIR, AC_CONFIG_MACRO_DIR): Adjust.
(AC_CONFIG_LIBOBJ_DIR): Set here so that we can build LTLIBOBJS
from in a subdirectory from the amalgamated Makefile.am.
(AM_PROG_CC_C_O, AM_INIT_AUTOMAKE): Use subdir-objects.
(AC_CONFIG_FILES): Remove libltdl/Makefile.am.
* libltdl/Makefile.am: Removed from repository, and merged into
Makefile.am as we now generate it...
* Makefile.am (libltdl/Makefile.am): ...from here, by extracting
the merged rules, and tweaking paths to accomodate the difference
in directory from Makefile.am to libltdl/Makefile.am.
(nobase_dist_pkgdata_DATA): Automake generated installation rules
change timestamps of installed files, so renamed this...
(configauxfiles): ...to this...
(libtoolize): ...substitute it...
(install-data-local): ...install manually, preserving
timestamps...
(install-data-hook): ...and set execute bit as appropriate.
(uninstall-hook): Not forgetting to remove them at uninstall.
(libltdl/Makefile.in): New rule. Called from...
* bootstrap: ...here to avoid relying on config.status at
bootstrap time.
(auxdir, m4dir): Extract from configure.ac for ease of future
maintenance. Adjust all references.
(reconfdirs): Call autoreconf for libltdl too -- even
though we don't use it for the build, libltdl/configure and
friends are installed with `libtoolize --ltdl --copy'.
* libtoolize.m4sh: Add files from the installed config master tree
to libtoolize --ltdl project subdirectory.
Diagnose duplicated files when --ltdl is used in an autotooled
project.
It's perfectly fine to run `libtoolize --ltdl --copy' in a tree
that has no configure.ac or configure.in; we want libltdl to be
useful even to projects that don't use autotools themselves.
(libtoolize_flags): Removed. Changed all callers.
(func_massage_pkgconfig_files): New function.
* tests/standalone.at: New tests for using libltdl without
supporting configury in the parent project.
* tests/testsuite.at: Run them!
* 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>
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.
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.
`configure.ac' to allow users to better control the list of
supported languages. Three LT_INIT options 'no-lang', 'all-lang'
and 'auto-lang' (the default) control the initial list and others
may be added with LT_LANG.
* m4/libtool.m4 (_LT_CONFIG): Renamed AC_LIBTOOL_CONFIG to _LT_CONFIG
which is more consistent with our own namespace and gets us further out
of Autoconf's.
(_LT_LIBTOOL_TAGS): Output available_tags variable based entirely
on the value of _LT_TAGS.
(_LT_COPYING): Call _LT_LIBTOOL_TAGS to output available tags,
always append tag configuration if the tag is available.
(LT_LANG): New macro to enable support for a language that accepts
tag names (eg. "CXX") or human language names (eg. "C++").
(_LT_LANG): Internal support macro for above that appends the
tag to _LT_TAGS and calls the appropriate config macro.
(LT_INIT): Ensure that LT_LANG is not called before LT_INIT.
(AC_LIBTOOL_TAGS): Removed, call LT_LANG for each language now.
(_LT_AC_TAG_CHECK): Removed, _LT_LANG handles duplicate calls.
(_LT_LANG_DEFAULT_CONFIG): Macro to set initial language support
based on options passed to LT_INIT.
(_LT_SETUP): Call _LT_LANG_DEFAULT_CONFIG.
(_LT_AC_TAG_CONFIG): Removed, handled by _LT_LANG_DEFAULT_CONFIG.
(_LT_AC_LANG_CXX, _LT_AC_LANG_F77, _LT_AC_LANG_GCJ): Removed,
automatic language support inclusion now handled by
_LT_LANG_DEFAULT_CONFIG.
(AC_LIBTOOL_CXX): Obsolete macro, update to LT_LANG(C++).
(AC_LIBTOOL_F77): Obsolete macro, update to LT_LANG(Fortran 77).
(AC_LIBTOOL_GCJ): Obsolete macro, update to LT_LANG(Java).
(AC_LIBTOOL_LANG_C_CONFIG_: Removed.
(_LT_AC_LANG_C_CONFIG): Renamed to _LT_LANG_C_CONFIG, call
_LT_CONFIG instead of AC_LIBTOOL_CONFIG.
(_LT_SETUP): Replace call to AC_LIBTOOL_LANG_C_CONFIG with call to
new _LT_LANG_C_CONFIG macro.
(AC_LIBTOOL_LANG_CXX_CONFIG): Removed.
(_LT_AC_LANG_CXX_CONFIG): Renamed to _LT_LANG_CXX_CONFIG, call
_LT_CONFIG instead of AC_LIBTOOL_CONFIG.
(AC_LIBTOOL_LANG_F77_CONFIG): Removed.
(_LT_AC_LANG_F77_CONFIG): Renamed to _LT_LANG_F77_CONFIG, call
_LT_CONFIG instead of AC_LIBTOOL_CONFIG.
(AC_LIBTOOL_LANG_GCJ_CONFIG): Removed.
(_LT_AC_LANG_GCJ_CONFIG): Renamed to _LT_LANG_GCJ_CONFIG, call
_LT_CONFIG instead of AC_LIBTOOL_CONFIG.
(AC_LIBTOOL_LANG_RC_CONFIG): Removed.
(_LT_AC_LANG_RC_CONFIG): Renamed to _LT_LANG_RC_CONFIG, call
_LT_CONFIG instead of AC_LIBTOOL_CONFIG.
(LT_AC_PROG_GCJ): Renamed to LT_PROG_GCJ.
(LT_AC_PROG_RC): Renamed to LT_PROG_RC.
* m4/ltoptions.m4: Define new 'no-lang', 'auto-lang' and 'all-lang'
options which set the default for _LT_LANG_DEFAULT_CONFIG.
* m4/lt~obsolete.m4: Removed AC_LIBTOOL_CONFIG, _LT_AC_LANG_C_CONFIG,
_LT_AC_LANG_GCJ_CONFIG, _LT_AC_LANG_RC_CONFIG; all of which are no
long referenced in any way.
* configure.ac: Enable all languages.
* tests/cdemo/configure.ac, tests/demo/configure,ac,
tests/depdemo/configure.ac, tests/f77demo/configure.ac,
tests/mdemo/configure.ac, tests/pdemo/configure,ac,
tests/tagdemo/configure.ac: Remove calls to AC_LIBTOOL_TAGS,
the default 'auto-lang' mode now does the right thing.
* doc/libtool.texi (The LT_INIT macro): Add documentation for
new LT_INIT options and the LT_LANG macro, replacing the old
documentation of AC_LIBTOOL_TAGS which is no more.
* NEWS: Updated.
`configure.ac' to be more like AC_INIT and accept a space
delimited list of options. Instead of calling `AC_LIBTOOL_DLOPEN;
AC_PROG_LIBTOOL', we now recommend `LT_INIT([dlopen])':
* m4/libtool.m4 (AC_PROG_LIBTOOL, _AC_PROG_LIBTOOL)
(AC_LIBTOOL_SETUP): Removed. Added AU_DEFUNs.
(LT_INIT): Replace with an Autoconf like interface which accepts a
version number as a minimum required libtool release at configure
time.
* m4/ltoptions.m4: New file inspired by automake/m4/amoptions.m4,
which additionally flags an error if the configuring libtool
macros are not new enough according to LT_INIT.
(LT_OPTION_DEFINE): New macro to declare option handlers.
(dlopen, win32-dll, shared, disable-shared, static)
(disable-static, fast-install, disable-fast-install, pic-only)
(no-pic): Newly LT_OPTION_DEFINEd option handlers that use...
(_LT_ENABLE_SHARED, _LT_ENABLE_STATIC, _LT_ENABLE_FAST_INSTALL)
(_LT_WITH_PIC, _LT_WIN32_DLL): New macros to handle
LT_LIBTOOL_INIT options...
* m4/libtool.m4 (AC_ENABLE_SHARED, AC_ENABLE_STATIC)
(AC_ENABLE_FAST_INSTALL, AC_LIBTOOL_DLOPEN, AC_LIBTOOL_WIN32_DLL):
...to replace these user interface macros, now defined as
AU_DEFUNs.
(AC_DISABLE_SHARED, AC_DISABLE_STATIC, AC_DISABLE_FAST_INSTALL):
Removed. No longer required with LT_INIT_LIBTOOL interface.
Added AU_DEFUNs.
(AM_ENABLE_SHARED, AM_DISABLE_SHARED, AM_ENABLE_STATIC)
(AM_DISABLE_STATIC): Changed AU_DEFUNs to match new interface.
(_LT_SETUP): Internal to LT_INIT, replaces AC_LIBTOOL_SETUP.
* m4/lt~obsolete.m4 (AC_LIBTOOL_SETUP, _AC_PROG_LIBTOOL)
(_LT_PROG_LTMAIN): More AC_DEFUNs that have been retracted.
* configure.ac: Use new interface.
* doc/libtool.texi: Document new interface.
* NEWS: Updated.
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.
then tweak the results by hand:
* m4/libtool.m4 (AC_PROG_LD): In common with all the other
AC_PROG_ macros, AC_SUBST the discovered LD.
(AC_PROG_NM): Similarly for NM.
(LT_AC_PROG_SED): Similarly for SED.
* configure.ac: No need to SUBST NM and LD manually any more.
(AC_PREREQ): Conservatively downgrade from 2.59 to 2.54.
* tests/cdemo/configure.ac, tests/demo/configure.ac,
tests/depdemo/configure.ac, tests/f77demo/configure.ac,
tests/mdemo/configure.ac, tests/mdemo2/configure.ac,
tests/pdemo/configure.ac, tests/tagdemo/configure.ac: Ditto.
* m4/libtool.m4 (AM_PROG_LIBTOOL, AM_ENABLE_SHARED,
AM_ENABLE_STATIC, AM_DISABLE_SHARED, AM_DISABLE_STATIC,
AM_PROG_LD, AM_PROG_NM): AU_DEFUN these macros so autoupdate can
use the newer definitions.
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 :-$
checkout by generating ltmain.sh, using that to create libtool,
and then adding the tags to that, all from config.status.
* configure.ac (AC_CONFIG_FILES): Make config/ltmain.sh, and copy
it to libltdl.
* Makefile.am ($(srcdir)/config/ltmain.sh): This file is now
created by config.status. Adjust this rule.
(libtoolize): Set CONFIG_COMMANDS to empty to prevent regenerating
the libtool script as a side effect of running this rule.
* libtool.m4: Bump serial number. Fix comment typos.
(_LT_CONFIG_LIBTOOL_INIT, _LT_CONFIG_LIBTOOL,
_LT_CONFIG_SAVE_COMMANDS, _LT_CONFIG_COMMANDS: New macros. They
don't work for some reason - the variable value quoting in the
init section is all wrong. Not used at the moment.
(AC_LIBTOOL_CONFIG): Generate libtool from config.status.
(_LT_AC_TAG_CONFIG): Add the tags in config.status.
(compiler_DEFAULT): Save the compiler value for the DEFAULT tag,
or it gets overwritten by the other macros.
(EOF): Globally replace with _LT_EOF to avoid namespace pollution.
* tests/demo/configure.ac (STATIC): Check $enable_static instead
of running ./libtool which doesn't exist yet.
(BINARY_HELLDL): Check $lt_cv_sys_global_symbol_pipe with case
instead of grepping ./libtool which doesn't exist yet.
* tests/pdemo/configure.ac (STATIC, BINARY_HELLDL): Ditto.
* doc/libtool.texi (AC_PROG_LIBTOOL): Add some notes about trying
to get config details from `libtool --config'.
* NEWS: Updated.
already built with libtool...
(libhell0_a_LIBADD): ...instead name the objects directly. This
prevents a long standing warning from automake 1.7+.
* pdemo/Makefile.am (libhell0_a_SOURCES, libhell0_a_LIBADD):
Ditto.