Commit Graph

102 Commits

Author SHA1 Message Date
Alastair McKinstry
4e6ccefb94
libtool: Change how version is derived
Avoid duplication of '(GNU @PACKAGE@) @VERSION@' in multiple
places by using '$scriptversion'.

* libtoolize.in, build-aux/ltmain.in: Change version from
  '(GNU @PACKAGE@) @VERSION@' to '$scriptversion'.
2024-10-22 20:02:17 +03:00
Ileana Dumitrescu
3226abb870
Update documentation and version output
* libtoolize.in: Overwrite function in bootstrap for printing version
  information for libtoolize.
* build-aux/ltmain.in: Overwrite function in bootstrap for printing
  version information for libtool.
* doc/libtool.texi: Fix typo and correct references for tests/demo
  subdirectory to the tests/demo.at Autotest file.
* gl/top/README-release.diff: Add documentation for maintainers so
  the CVS repository is properly updated following a stable release.
2024-10-22 20:00:47 +03:00
Bruno Haible
67c5a06a46
libtoolize: Don't use uninitialized variable.
* libtoolize.in (func_serial_update): Initialize my_src_serial and
my_dest_serial before use.
* tests/libtoolize.at: Update expected test result.
2024-05-18 16:04:29 +03:00
Mike Frysinger
8d188608ca libtoolize: always copy config-h.in like aclocal.m4
When running `libtoolize --ltdl`, a symlink to the source config-h.in
is used rather than a copy of the file.  This causes the build system
to look at its old timestamp relative to the other generated files
that are copied in, and then try to regenerate things, and update the
config-h.in timestamp by touching the symlink (which will dereference
things).  This breaks `make distcheck` because when a few tests run
that invoke `libtoolize --ltdl --install` w/out --copy, and then try
to build the project, automake's rules trigger autoheader regen, and
then update the timestamp, which updates the underlying file, and then
causes libtool's own files to get out of sync.  So the next time make
is run in the tree, it tries to regenerate the source files, and fails
as the source tree is read-only.

Change libtoolize to always copying the header over during install.
It's not clear to me whether this is 100% the right answer, but it
shouldn't make things worse beyond missing a case to use a symlink.
We probably can't avoid this as long as aclocal.m4 itself is copied
in instead of symlinked.  This changed between v2.4.2 and v2.4.3 in
commit 4e671d6ba6 ("libtoolize:
simplify file-copying and -linking call-graph.").

Example failure log:

$ make distcheck
...
make[3]: Entering directory '.../libtool-2.4.7.62-3e11/_build/sub'
  GEN      ../../libltdl/Makefile.in
  GEN      ../../libltdl/configure
autom4te-2.72: error: cannot create autom4te.cache in .../libtool-2.4.7.62-3e11/libltdl: Permission denied
make[3]: *** [Makefile:2411: ../../libltdl/configure] Error 1
make[3]: *** Waiting for unfinished jobs....
autom4te-2.72: error: cannot create autom4te.cache in .../libtool-2.4.7.62-3e11/libltdl: Permission denied
automake-1.16: error: autoconf failed with exit status: 1
make[3]: *** [Makefile:2387: ../../libltdl/Makefile.in] Error 1

We can see this in old-m4-iface.at:AC_WITH_LTDL which doesn't use
--copy with libtoolize:

$ stat libltdl/config-h.in | grep Modify
Modify: 2024-01-18 01:18:52.998059970 -0500
$ make check-local TESTSUITEFLAGS=100
...
100: AC_WITH_LTDL                                    ok
...
$ stat libltdl/config-h.in | grep Modify
Modify: 2024-01-18 01:19:19.254727020 -0500

And in the test log we can see:

100. old-m4-iface.at:113: testing AC_WITH_LTDL ...
...
libtoolize: linking file 'libltdl/config-h.in'
...
./old-m4-iface.at:161: : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL;    $CONFIG_SHELL ./configure $configure_options           --prefix="$prefix" --exec-prefix="$prefix" --bindir="$prefix/bin" --libdir="$prefix/lib" --with-included-ltdl
...
./old-m4-iface.at:161: $as_unset LIBTOOL; $as_unset LIBTOOLIZE; $MAKE $target
stderr:
stdout:
cd libltdl && make
make[1]: Entering directory '/usr/local/src/gnu/libtool/tests/testsuite.dir/100/libltdl'
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal -I m4
 cd . && automake --foreign
CDPATH="${ZSH_VERSION+.}:" && cd . && autoconf
/bin/sh ./config.status --recheck
...
(CDPATH="${ZSH_VERSION+.}:" && cd . && autoheader)
rm -f stamp-h1
touch config-h.in
...

* libtoolize.in: Copy config-h.in.
* tests/libtoolize.at: Change "linking" to "copying".
2024-01-22 08:09:47 -05:00
Antonin Décimo
fd8ab0cbd3 Fix various typos
* NEWS: Fix various typos.
* NO-THANKS, README.md, TODO, bootstrap, bootstrap.conf,
build-aux/edit-readme-alpha, build-aux/git-log-fix, build-aux/ltmain.in,
doc/libtool.texi, libltdl/libltdl/lt_error.h, libltdl/lt__argz.c,
libltdl/ltdl.c, libtoolize.in, tests/depdemo.at, tests/link-order.at: Likewise.
* cfg.mk (old_NEWS_hash): Update.

Copyright-paperwork-exempt: Yes
2024-01-16 17:54:26 -05:00
Mike Frysinger
003520d346 use https:// with more gnu.org sites
* NEWS: Change http:// to https:// for some URIs.
* bootstrap.conf, build-aux/ltmain.in, configure.ac, libtoolize.in: Likewise.
2024-01-16 15:46:12 -05:00
Mike Frysinger
85093d697a maint: update copyrights across project 2024-01-12 01:35:32 -05:00
Alex Ameen
2dc7dad770 maint: update copyrights across project. 2022-02-08 12:11:10 -06:00
Alex Ameen
da2e352735 libtool: replace some references to /usr/bin/file and /bin/sh
* build-aux/ltmain.sh: use '/usr/bin/env sh' in shebang
* libtoolize.in: use '/usr/bin/env sh' in shebang
* m4/libtool.m4: 'FILECMD' to replace use of '/usr/bin/file'
2021-11-20 14:37:05 -06:00
aakropotkin
0c1bc69dac maint: update copyrights across project.
* AUTHORS: Correct manually modified copyright to be consistent with
other files.
2021-11-14 22:37:22 -06:00
Pavel Raiskup
544fc0e2c2 maint: update bootstrap, gnulib, copyright dates
* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
2019-03-13 15:38:36 +01:00
Pavel Raiskup
b88cebd510 maint: update bootstrap, gnulib, copyright dates
* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
* gl/top/README-release.diff: Update the patch for the latest
changes in gnulib's README-release.
2018-07-24 09:06:44 +02:00
Pavel Raiskup
792b680701 maint: update copyright years
Also sync gnulib & bootstrap git submodules.

* gnulib, gl-mod/bootstrap: Move to latest git versions.
* bootstrap: Regenerate.
* all files: Bump years by 'make update-copyright'.
2017-04-21 16:56:19 +02:00
Pavel Raiskup
08c5524fb2 bootstrap: use the upstream repo as git module
.. instead of copying it all the time;  gnulib-tool and bootstrap
are now ready to do this correctly.

Bootstrap upstream is now dual-licensed as MIT/GPLv2+;  so the
sources are redistributed automatically under GPLv3+ license in
in libtool project.

* .gitmodules (bootstrap): New submodule.
* bootstrap.conf (local_gl_dir): Renamed to local_gl_path.
(local_gl_path): Renamed from local_gl_dir.  Two sub-directories
are now mentioned as two --local-dir's are used.
(gnulib_git_submodules): New option to automatically clone the
bootstrap git submodule.
* build-aux/ltmain.in (libtool_options_prep)
(libtool_parse_options): Changing function exit status is not
needed with new options-parser.
* libtoolize.in: Don't func_quote when it is not necessary, don't
set the function return value.
* gl-mod/bootstrap: New git submodule.
* gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
gl/build-aux/funclib.sh, gl/build-aux/inline-source,
gl/build-aux/options-parser, gl/doc/bootstrap.texi,
gl/modules/all-shells-tests, gl/modules/bootstrap,
gl/modules/extract-trace, gl/modules/funclib.sh,
gl/modules/funclib.sh-tests, gl/modules/inline-source
gl/modules/options-parser, gl/modules/options-parser-tests,
gl/tests/test-all-shells.sh, gl/tests/test-funclib-quote.sh
gl/tests/test-option-parser-helper,
gl/tests/test-option-parser.sh: Files removed, those are
automatically pulled from upstream now.
* bootstrap: Sync with upstream.
2016-03-09 09:38:47 +01:00
Mike Frysinger
807cbd63ab libtoolize: exec automake and autoconf only with --help
Same fix as applied to libtool in commit 408cfb9c5f
to delay use of automake/autoconf to when the --help option is
actually specified.

* libtoolize.in (func_help): Override func_help() from
gl/build-aux/options-parser to only run automake --version and
autoconf --version when libtool --help is executed on the command
line.
Copyright-paperwork-exempt: Yes
2016-02-19 09:50:34 +01:00
Pavel Raiskup
bb8e7b4a06 maint: update copyright years
Also update gnulib submodule as it contains updated copyright
years too.

* gnulib: Latest greatest git hash.
* all files: Run 'make update-copyright'.
2016-02-16 00:33:51 +01:00
Pavel Raiskup
9187e9a231 funclib: refactor quoting methods a bit
From now we have two basic functions to perform string quoting for
shell evaluation -- 'func_quote_arg' to quote one argument and
'func_quote' which takes list of arguments to be quoted.

New function name-scheme should be more descriptive (previously we
called func_quote_for_eval with one argument and also multiple
arguments, while we had confusing
$func_quote_for_eval_unquoted_result which is redundant for
multiple-arguments call).

New abstraction allowed us (in an easy way) to implement
bash-specific optimization for quoting  (using
'printf -v VARNAME %q "$value"', suggested by Eric Blake), this
construct may be used on those places where we don't care much
about the result aesthetics (its thus not useful for '*.la'
generation or for error printing).

* gl/build-aux/funclib.sh (func_append_quoted): Use
func_quote_arg internally (kept in 'pretty' mode for now).
(func_quote): Made to be "main" high-level quoting method taking
list of arguments to be quoted into single command.  It replaces
func_quote_for_{expand,eval}.
(func_quote_portable): Implements quoting in shell, falling back
to portable sed call (rare cases).
(func_quotefast_eval): New internal function using fast
bash-specific construct, falling back to func_quote_portable for
non-Bash scripts.
(func_quote_arg): New function to quote one argument.
(func_quote_for_eval): Removed.  All callers changed to call
func_quote.
(func_quote_for_expand): Likewise.
* bootstrap: Sync with funclib.sh and options-parser.
2015-10-12 21:26:51 +02:00
Gary V. Vaughan
fda42eb8c6 maint: update copyright statements to include 2015.
* AUTHORS, HACKING, Makefile.am, NEWS, README.md, TODO,
bootstrap, bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in, cfg.mk,
configure.ac, doc/libtool.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/README, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__argz_.h,
libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h,
libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h,
libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h,
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, libltdl/lt__alloc.c,
libltdl/lt__argz.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/ltdl.mk, libltdl/slist.c, libtoolize.in,
m4/autobuild.m4, m4/libtool.m4, m4/ltargz.m4, m4/ltdl.m4,
m4/ltoptions.m4, m4/ltsugar.m4, m4/ltversion.in,
m4/lt~obsolete.m4, m4/m4.m4, tests/am-subdir.at,
tests/archive-in-archive.at, tests/bindir.at, tests/cdemo.at,
tests/cmdline_wrap.at, tests/configure-iface.at,
tests/convenience.at, tests/ctor.at, tests/cwrapper.at,
tests/darwin.at, tests/demo.at, tests/depdemo.at,
tests/deplib-in-subdir.at, tests/deplibs-ident.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/dlloader-api.at,
tests/dumpbin-symbols.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/exceptions.at,
tests/execute-mode.at, tests/exeext.at, tests/export-def.at,
tests/export.at, tests/f77demo.at, tests/fail.at,
tests/fcdemo.at, tests/flags.at, tests/help.at,
tests/indirect_deps.at, tests/infer-tag.at,
tests/inherited_flags.at, tests/install.at,
tests/lalib-syntax.at, tests/libtool.at, tests/libtoolize.at,
tests/link-order.at, tests/link-order2.at, tests/loadlibrary.at,
tests/localization.at, tests/lt_dladvise.at, tests/lt_dlexit.at,
tests/lt_dlopen.at, tests/lt_dlopen_a.at, tests/lt_dlopenext.at,
tests/ltdl-api.at, tests/ltdl-libdir.at, tests/mdemo.at,
tests/need_lib_prefix.at, tests/no-executables.at,
tests/nocase.at, tests/nonrecursive.at, tests/old-ltdl-iface.at,
tests/old-m4-iface.at, tests/pic_flag.at, tests/recursive.at,
tests/resident.at, tests/runpath-in-lalib.at,
tests/search-path.at, tests/shlibpath.at, tests/slist.at,
tests/standalone.at, tests/static.at, tests/stresstest.at,
tests/subproject.at, tests/sysroot.at, tests/tagdemo.at,
tests/template.at, tests/testsuite.at, tests/versioning.at,
tests/with-pic.at: Update copyright statement to include 2015.
* cfg.mk: Adjust old_NEWS_hash accordingly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2015-01-18 13:16:42 +00:00
Tijl Coosemans
cbeefbc8f0 libtoolize: no need for umask 0 now that copying does not use tar.
The umask calls seem to be left over as a workaround for several
releases ago when libtoolize copied libltdl sources with the help
of tar.  Now that we use cp or ln -s exclusively, this just
needlessly makes the files world writable; we should just respect
the users' own umask setting.
* libtoolize.in (func_copy): Remove umask 0 calls and simplify.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-11-28 20:23:42 +00:00
Gary V. Vaughan
9b63b9b666 libtoolize: don't forget to remove old non-gnulib argz files.
* libtoolize.in (all_pkgltdl_files): Add back argz.c and argz_.h,
as installed by previous libtool releases.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-11-02 14:40:13 +00:00
Gary V. Vaughan
cdb6ac2df4 libltdl: move libltdl argz module into LT namespace.
To avoid clashes with gnulib argz module in ltdl client projects,
move ours into its own namespace.
* libltdl/argz_.h, libltdl/argz.c, m4/argz.m4: Move from here...
* libltdl/libltdl/lt__argz_.h, libltdl/lt__argz.c, m4/ltargz.m4:
...to here.
* Makefile.am, libltdl/libltdl/lt__glibc.h, libltdl/ltdl.mk,
libtoolize.in, m4/ltdl.m4: Adjust accordingly.
* tests/libtoolize.at, tests/ltdl-api.at, tests/nonrecursive.at,
tests/old-ltdl-iface.at: Adjust for different libtoolize output.
* libltdl/.gitignore: Adjust accordingly.
* NEWS: Update.
Reported by Pavel Raiskup

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-11-02 14:28:55 +00:00
Pavel Raiskup
2ed391b4a8 libtoolize: do not remove gnulib files with --force.
* libtoolize.in (func_require_seen_libtool): Do not remove
snippet/* files which are from Gnulib.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-11-02 10:53:20 +00:00
Todd C. Miller
2f75576d05 libtoolize: don't remove install-sh.
If you are not using automake, libtoolize would remove install-sh.
It needs the same treatment as config.guess and config.sub.
* libtoolize.in (func_require_seen_libtool): Remove install-sh
from $all_pkgaux_files, the list of files removed by
`libtoolize --force`.
* THANKS: Add Todd C. Miller.
* NEWS: Update.

Copyright-paperwork-exempt: Yes
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-01-11 13:25:42 +13:00
Gary V. Vaughan
0955ed3ca4 maint: update copyright notices to include 2014.
* .x-update-copyright: New file. Exclude files not owned by this
project from update-copyright rules.
* doc/libtool.texi: Replace m-dash with n-dash in texinfo
copyright notice so that update-copyright matches correctly.
Undo bogus copyright updates to example output from gdb session.
Bump copyright year.
* Changelog.old: Revert bogus updates from previous years
without .x-update-copyright.
AUTHORS, HACKING, Makefile.am, NEWS, README, THANKS, TODO,
bootstrap, bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in, cfg.mk,
configure.ac, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/configure.ac, libltdl/libltdl/lt__alloc.h,
libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h,
libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h,
libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h,
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, libltdl/lt__alloc.c,
libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c,
libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h,
libltdl/ltdl.mk, libltdl/slist.c, libtoolize.in, m4/argz.m4,
m4/autobuild.m4, m4/libtool.m4, m4/ltdl.m4, m4/ltoptions.m4,
m4/ltsugar.m4, m4/ltversion.in, m4/lt~obsolete.m4,
tests/am-subdir.at, tests/archive-in-archive.at,
tests/bindir.at, tests/cdemo.at, tests/cmdline_wrap.at,
tests/configure-iface.at, tests/convenience.at, tests/ctor.at,
tests/cwrapper.at, tests/darwin.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at,
tests/deplibs-ident.at, tests/deplibs-mingw.at,
tests/destdir.at, tests/dlloader-api.at,
tests/dumpbin-symbols.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/exceptions.at,
tests/execute-mode.at, tests/exeext.at, tests/export-def.at,
tests/export.at, tests/f77demo.at, tests/fail.at,
tests/fcdemo.at, tests/flags.at, tests/help.at,
tests/indirect_deps.at, tests/infer-tag.at,
tests/inherited_flags.at, tests/install.at,
tests/lalib-syntax.at, tests/libtool.at, tests/libtoolize.at,
tests/link-order.at, tests/link-order2.at, tests/loadlibrary.at,
tests/localization.at, tests/lt_dladvise.at, tests/lt_dlexit.at,
tests/lt_dlopen.at, tests/lt_dlopen_a.at, tests/lt_dlopenext.at,
tests/ltdl-api.at, tests/ltdl-libdir.at, tests/mdemo.at,
tests/need_lib_prefix.at, tests/no-executables.at,
tests/nocase.at, tests/nonrecursive.at, tests/old-ltdl-iface.at,
tests/old-m4-iface.at, tests/pic_flag.at, tests/recursive.at,
tests/resident.at, tests/runpath-in-lalib.at,
tests/search-path.at, tests/shlibpath.at, tests/slist.at,
tests/standalone.at, tests/static.at, tests/stresstest.at,
tests/subproject.at, tests/sysroot.at, tests/tagdemo.at,
tests/template.at, tests/testsuite.at, tests/versioning.at,
tests/with-pic.at: Bump copyright year.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-01-02 12:26:44 +13:00
Gary V. Vaughan
7f99bfd86c maint: use $SED and $GREP, not sed and grep in all scripts.
Choosing between hardcoding a tool's name, or using the shell
variable with a path to the user's prefered implementation or
configure's idea of the best available is a premature
optimisation.
* build-aux/ltmain.in, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
libtoolize.in: Use $SED and $GREP consistently throughout,
instead of hardcoding sed and grep.
* bootstrap: Regenerate.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-01-02 12:06:30 +13:00
Gary V. Vaughan
e87a65fa0c maint: correct many abuses of the word "which".
* HACKING, NEWS, TODO, bootstrap, bootstrap.conf,
build-aux/ltmain.in, cfg.mk, configure.ac, doc/libtool.texi,
doc/notes.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/doc/bootstrap.texi, libltdl/libltdl/lt_system.h,
libltdl/loaders/loadlibrary.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/ltdl.c, libtoolize.in,
m4/libtool.m4, m4/ltdl.m4, m4/ltsugar.m4, m4/lt~obsolete.m4,
tests/exceptions.at, tests/need_lib_prefix.at, tests/static.at:
Use "which" correctly, or replace with "that", "where" or "what"
as appropriate.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2013-08-23 11:12:57 +07:00
Gary V. Vaughan
9a7071e668 maint: update copyright notices to include 2013.
* gnulib/: Update to latest upstream.
* AUTHORS, ChangeLog.old, HACKING, Makefile.am, NEWS, README,
THANKS, TODO, bootstrap, bootstrap.conf,
build-aux/edit-readme-alpha, build-aux/ltmain.in, cfg.mk,
configure.ac, doc/libtool.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/configure.ac, libltdl/libltdl/lt__alloc.h,
libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h,
libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h,
libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h,
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, libltdl/lt__alloc.c,
libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c,
libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h,
libltdl/ltdl.mk, libltdl/slist.c, libtoolize.in, m4/argz.m4,
m4/autobuild.m4, m4/libtool.m4, m4/ltdl.m4, m4/ltoptions.m4,
m4/ltsugar.m4, m4/ltversion.in, m4/lt~obsolete.m4,
tests/am-subdir.at, tests/archive-in-archive.at,
tests/bindir.at, tests/cdemo.at, tests/cmdline_wrap.at,
tests/configure-iface.at, tests/convenience.at, tests/ctor.at,
tests/cwrapper.at, tests/darwin.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at,
tests/deplibs-ident.at, tests/deplibs-mingw.at,
tests/destdir.at, tests/dlloader-api.at,
tests/dumpbin-symbols.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/exceptions.at,
tests/execute-mode.at, tests/exeext.at, tests/export.at,
tests/f77demo.at, tests/fail.at, tests/fcdemo.at,
tests/flags.at, tests/help.at, tests/indirect_deps.at,
tests/infer-tag.at, tests/inherited_flags.at, tests/install.at,
tests/lalib-syntax.at, tests/libtool.at, tests/libtoolize.at,
tests/link-order.at, tests/link-order2.at, tests/loadlibrary.at,
tests/localization.at, tests/lt_dladvise.at, tests/lt_dlexit.at,
tests/lt_dlopen.at, tests/lt_dlopen_a.at, tests/lt_dlopenext.at,
tests/ltdl-api.at, tests/ltdl-libdir.at, tests/mdemo.at,
tests/need_lib_prefix.at, tests/no-executables.at,
tests/nocase.at, tests/nonrecursive.at, tests/old-ltdl-iface.at,
tests/old-m4-iface.at, tests/pic_flag.at, tests/recursive.at,
tests/resident.at, tests/runpath-in-lalib.at,
tests/search-path.at, tests/shlibpath.at, tests/slist.at,
tests/standalone.at, tests/static.at, tests/stresstest.at,
tests/subproject.at, tests/sysroot.at, tests/tagdemo.at,
tests/template.at, tests/testsuite.at, tests/versioning.at,
tests/with-pic.at: Bump copyright year.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2013-01-02 00:34:06 +07:00
Gary V. Vaughan
d98a30fbce syntax-check: fix violations and implement sc_old_style_quoting.
Modern GNU ASCII quoting in output and comments is done
'like this'.
* cfg.mk (sc_old_style_quoting): Try to catch most instances
of `old style quoting' so that it is not accidentally re-
introduced to the code.
* HACKING, Makefile.am, NEWS, PORTING, README, TODO, bootstrap,
bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in,
doc/libtool.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/libltdl/slist.h, libltdl/loaders/loadlibrary.c,
libltdl/ltdl.c, libltdl/slist.c, libtoolize.in, m4/argz.m4,
m4/libtool.m4, m4/ltdl.m4, m4/ltoptions.m4, m4/ltsugar.m4,
tests/cmdline_wrap.at, tests/configure-iface.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/execute-mode.at,
tests/f77demo.at, tests/fail.at, tests/inherited_flags.at,
tests/libtool.at, tests/libtoolize.at, tests/lt_dladvise.at,
tests/lt_dlexit.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/old-ltdl-iface.at, tests/old-m4-iface.at, tests/static.at,
tests/stresstest.at, tests/testsuite.at, tests/versioning.at:
Convert to upright quotes.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-22 00:01:13 +07:00
Gary V. Vaughan
fad11c7777 libtoolize: select the first directory from AC_CONFIG_MACRO_DIRS.
* tests/libtoolize.at (multiple AC_CONFIG_MACRO_DIRS directories):
New test to ensure multiple directory arguments mork correctly.
* libtoolize.in (func_require_ac_macro_dir): Use expr to discard
any additional space delimited entries in the first
AC_CONFIG_MACRO_DIRS argument.
* bootstrap (func_require_macro_dir): Likewise.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-20 11:21:56 +07:00
Gary V. Vaughan
4d644c39d8 libtoolize: migrate to new AC_CONFIG_MACRO_DIRS api.
* libtoolize.in (func_install_pkgmacro_files): Uee
AC_CONFIG_MACRO_DIRS.
(func_check_macros): Advise using AC_CONFIG_MACRO_DIRS.
(require_ac_macro_dir): Give priority to AC_CONFIG_MACRO_DIRS.
(require_macro_dir): Likewise.
* bootstrap: Give priority to AC_CONFIG_MACRO_DIRS.
* configure.ac: Define dummy AC_CONFIG_MACRO_DIRS for older
Autotools, that is allow bootstrap with current release versions.
Use AC_CONFIG_MACRO_DIRS instead of AC_CONFIG_MACRO_DIR.
* tests/testsuite.at: Source build-aux/extract-trace for access
to func_extract_trace.
(LT_AT_ACLOCAL): Use it to get the AC_CONFIG_MACRO_DIRS argument
to pass manually to aclocal for compatibility with old Automake.
Add a fallback AC_CONFIG_MACRO_DIRS definition to acinclude.m4
in the test directory.
(LT_AT_AUTORECONF): Likewise.
* tests/cdemo.at, tests/configure-iface.at, tests/darwin.at,
tests/demo.at, tests/depdemo.at, tests/early-libtool.at,
tests/libtoolize.at, tests/mdemo.at, tests/no-executables.at,
tests/nonrecursive.at, tests/old-ltdl-iface.at,
tests/recursive.at, tests/subproject.at, tests/tagdemo.at,
tests/template.at: Likewise.
* doc/libtool.texi: Update.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-20 11:21:55 +07:00
Gary V. Vaughan
9477e33ef0 libtoolize: fix a misspelled variable name.
* libtoolize.in (func_require_am_macro_dir): The loop uses _G_arg
not _G_opt.  Now spelled correctly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-19 14:24:21 +07:00
Gary V. Vaughan
55262b6fe4 tests: always extract only the first AC_CONFIG_MACRO_DIR arg.
Previous releases of libtoolize used the final invocation when
there were several, and after the rewrite over extract-trace,
all the invocation directories were concatenated.  This change
enforces correct and consistent behaviour.
* tests/libtoolize.at (multiple AC_CONFIG_MACRO_DIR invocation):
New test.
* build-aux/extract-trace (func_extract_trace_first): New function
for clients that source this file, which returns only the first
argument to the first invocation of the named macros.
* libtoolize.in (func_require_ac_macro_dir): Use it to make sure
the first argument is always used.
(func_require_ac_aux_dir, func_require_ac_ltdl_dir)
(func_require_ac_ltdl_options): Future proof these functions against
multiple invocations or additional arguments to the macros they
trace.
* News (Important incompatible changes): Note change in semantics.
Reported by Eric Blake.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-19 14:24:21 +07:00
Gary V. Vaughan
f8061eabaf tests: always extract only the first ACLOCAL_AMFLAGS include arg.
* tests/libtoolize.at (libtoolize ACLOCAL_AMFLAGS extraction):
New test.
* libtoolize.in (func_check_macros): Display the correct advice
when ACLOCAL_AMFLAGS specifies a macrodir, but AC_CONFIG_MACRO_DIR
does not.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-19 14:24:20 +07:00
Gary V. Vaughan
3cf11cfe2b libtoolize: rewritten over funclib.sh instead of general.m4sh.
* Makefile.am (libtoolize_m4sh): Remove.
(EXTRA_DIST): Delete libtoolize_m4sh.
(libtoolize_in): Remove rule.
(libtoolize): Apply bootstrap_edit to libtoolize.in too.
* configure.ac (AC_CONFIG_SRCDIR): Refer to libtoolize.in.
* libtoolize.m4sh: Remove.
* libtoolize.in: Rewrite as a client of options-parser and the
new funclib.sh, avoiding the m4sh expansion step.
* tests/libtoolize.at, tests/old-ltdl-iface.at (experr): adjust
to match funclib.sh error output.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2012-10-12 20:18:29 +07:00
Gary V. Vaughan
e5d70992b8 * m4/libtool.m4 (_LT_PROG_ECHO_BACKSLASH): Don't confuse $ECHO
with $lt_ECHO, or we always get a libtool with ECHO=echo, rather
than testing for a mechanism that quotes  properly.
* NEWS: Updated.

* config/ltmain.m4sh: Need to include getopt.m4sh earlier so that
progpath is set before it is called to --no-reexec.
* NEWS: Updated.

Without this change, the distributed libtool tarball has a
dependency on autom4te.  There was some inconsistency in the
filenames: now we have foo.m4sh -> m4sh -> foo.in -> configure
-> foo[.sh].  Bootstrap runs the m4sh steps and the resulting .in
files are distributed:

* tests/Makefile.am (EXTRA_DIST): Distribute defs.m4sh.
* Makefile.am (EXTRA_DIST): Distribute libtoolize.m4sh.
(libtoolize.in, libtoolize): Split into bootstrap and runtime
stages.
($(top_srcdir)/tests/defs.in, $(top_srcdir)/tests/defs): Ditto.
($(top_srcdir)/config/ltmain.sh): Swap ltmain.m4sh and ltmain.in
names.
* bootstrap: Make libtoolize.in and tests/defs.in.
* NEWS: Updated.
2004-10-04 18:32:45 +00:00
Gary V. Vaughan
fc4e513ee0 * config/general.m4sh (Xsed): Set a default when not used from
ltmain.in.
(ECHO): Audit for (and correct!) uses of $ECHO with more than one
argument, which breaks when ECHO='printf %sn', and with possible
`-' as first character of the argument, which breaks `print -r'
and some implementations of `echo'.
* config/ltmain.in, tests/defs.in, libtoolize.in (ECHO): Ditto.
Reported by Albert Chin-A-Young <china@thewrittenword.com>
2004-09-24 16:08:33 +00:00
Gary V. Vaughan
bfce27f524 * configure.ac (M4SH): AC_SUBST m4sh expander.
* config/general.m4sh, config/getopt.m4sh: New files with factored
out functionality from...
* config/ltmain.in, libtoolize.in: ...here.  m4_include the shared
code, and call AS_SHELL_SANITIZE.  Also quote all `[' and `]' to
survive m4 run.
(func_serial): No need to double up m4sh quotes after a `#'.
(func_check_macros): Escape `dnl' to stop m4sh interpreting it as
a macro.
* tests/defs.in: New file expanded into tests/defs by autom4te.
* m4/libtool.m4 (_LT_DECL_EGREP): Also require fgrep for the tests
that use it.
* Makefile.am ($(top_srcdir)/config/ltmain.sh): Now built with
M4SH.
(libtoolize): Ditto.
* bootstrap: Set M4SH for call to make.
* HACKING: No need to sync to AS_SHELL_SANITIZE by hand any more.
2004-09-23 01:16:41 +00:00
Gary V. Vaughan
4bf4433f70 Missed a couple of MKDIR_P references in ltmain.in in my last
patch; fix them carefully.  Introduce an opt_dry_run to ltmain.in
so that the implementations of func_mkdir_p can converge, and a
func_mktempdir to do a better job of temporary directory creation:

* libtoolize.in (func_mkdir_p): Don't fail if the directory wasn't
created in dry run mode.
* tests/defs (func_mkdir_p): Ditto.  We don't actually have a dry
run mode for the tests, but the function is written carefully to
be kept in synch and work correctly here too.
* config/ltmain.in (func_mkdir_p): Ditto.  This copy of the
function now only differs in its use of $echo over $ECHO.
(func_extract_archive): Removed first redundant mkdir call.
(func_mktempdir): New function that tries to avoid races when
making temporary directories.
(opt_dry_run): Set this if --dry-run is given at the CLI, or if
tests/mdemo-dryrun.test has forced the value of $run.
(func_mode_install): Call $MKDIR directly and error out if the
directory cannot be created.
(func_mode_link): Rather than copying func_mkdir_p into the
wrapper script as a replacement for $MKDIR_P, we know that the
script won't be called my `make -j', so write the current value of
$MKDIR.
2004-09-17 14:13:04 +00:00
Gary V. Vaughan
0e0104aa45 My most recent `2004-09-02 Gary V. Vaughan' patch for mkdir_p
below is horrendously broken since it makes the installed libtool
try to run the mkinstalldirs or install-sh helper scripts.  This
patch fixes the `make -j' mkdir race condition internally:

* libtoolize.in (func_mkdir_p): New slice and dice algorithm
to build the directory tree one dir at a time, ignoring errors
until the end incase they are transient due to a concurrent
identical mkdir.
* tests/defs (func_mkdir_p): Ditto.
* config/ltmain.in (func_mkdir_p): Ditto, except that ltmain.in
uses $echo rather than $ECHO, and uses $show and $run to interact
correctly with the command line.
* configure.ac (AM_INIT_AUTOMAKE): 1.8 is sufficient again.
* Makefile.am (edit): Don't substitute automake's $(mkdir_p).
* NEWS: Updated.
2004-09-16 14:57:02 +00:00
Gary V. Vaughan
ba6daa7408 Builds of packages that use libtool and make -j produce "directory
already exists warnings" for .lib directory.  Build on automake
wisdom to support make -j builds where a suitable mkdir is
available:

* configure.ac (AM_INIT_AUTOMAKE): Require 1.9, which goes to some
trouble to find a $(mkdir_p) that doesn't interfere with make -j.
* Makefile.am (edit): Substitute for @mkdir_p@.
* config/ltmain.in (MKDIR_P): Take @mkdir_p@ value.
(mkdir): Removed.
(func_mkdir_p): New function to use $MKDIR_P.  Factor out all
previous mkdir calls to use this function.
(RM, MV): Declared as in libtoolize.in.  Changed all callers.
* libtoolize.in (MKDIR_P): Take @mkdir_p@ value from automake.
(func_mkdir_p): Use it, similarly to new config/ltmain.in.
* tests/defs: Synchronize boiler plate code with ltmain.in.
Adjust all callers.
Add missing copyright preamble.
* tests/demo-static.test: Add missing copyright preamble.
Reported by Daniel Reed <n@ml.org>
2004-09-03 00:26:37 +00:00
Gary V. Vaughan
2d9235e58c * libtoolize.in, config/ltmain.in: Add CDPATH protection to
preamble.
* tests/defs: Put a full m4sh.m4 style 'Be Bourne compatible'
preamble in here too.
* HACKING: Note that tests/defs needs synching with m4sh.m4 too.
* TODO: Add new item.
2004-09-01 09:48:25 +00:00
Gary V. Vaughan
fd970d8493 To help users submit better bug reports, improve the general
instructions, and provide additional useful info alongside the bug
reporting address in --help output:

* Makefile.am (edit): Substitute $host_triplet.
* libtoolize.in: Output useful debug info with --help.
* config/ltmain.in: Ditto.
* README: Rewritten.  Added copyright info.
* README-alpha: Rewritten.  Added copyright info.
* HACKING: New file, partly taken from old README-alpha.
2004-08-28 16:15:23 +00:00
Gary V. Vaughan
388b7626dc The Grand Renaming. In preparation for libtool-2.0, move all of
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>
2004-08-22 22:02:07 +00:00
Gary V. Vaughan
cf79a98549 To take full advantage of this, libtool must be bootstrapped with
CVS autoconf, otherwise pdksh chokes on some nested escaped quotes
from libtool.m4.  Using CVS autoconf protects configure from
non-bourne compatible shells in the same way this changeset
protects libtool and libtoolize:

* libtoolize.in: Include latest CVS autoconf AS_SHELL_SANITIZE
expansion to make various shells fully bourne compatible.
* ltmain.in: Ditto.
* m4/libtool.m4 (AC_PATH_TOOL_PREFIX): Remove spurious quotes, the
RHS of = assignment is not IFS split.
(_LT_LANG_CXX_CONFIG): Ditto.
(AC_LIBTOOL_POSTDEP_PREDEP): Ditto.
2004-07-28 14:57:28 +00:00
Gary V. Vaughan
706e672811 This pervasive changeset makes two intertwined deep changes to the
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.
2004-07-15 12:14:48 +00:00
Gary V. Vaughan
769c1c1837 * libtoolize.in (libtoolize_flags): With the --ltdl option, we
libtoolize the libltdl subdirectory automatically.
* m4/ltdl.m4 (AC_WITH_LTDL): Fix overquoted args.
2004-06-21 16:40:01 +00:00
Gary V. Vaughan
9b519b39fd From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>:
* libtoolize.in: Quote $# to make sh.test happy again.
2004-06-21 13:44:14 +00:00
Gary V. Vaughan
9e0d44f562 * m4/ltdl.m4 (AC_WITH_LTDL): Remove redundant AC_REQUIRE calls.
Either set variables to allow a client to link with the installed
libltdl, or else compile a local libltdl as a convenience library.
* libtoolize.in (opt_ltdl): Removed in favour of...
(ltdldir): ...this, which is defaulted to "libltdl" or can be set
by the user with an argument to --ltdl.
(Main): Use it!
* doc/libtool.texi (Distributing libltdl): Improved documentation
on libltdl.
(Invoking libtoolize): Document new optional --ltdl target
directory argument.
2004-06-21 10:17:27 +00:00
Gary V. Vaughan
cab5f352d5 * libtoolize.in (func_scan_files): Accept AC_WITH_LTDL as an
indication that libltdl is being used.
(Main): Without AC_CONFIG_MACRO_DIR, don't just dump all the
macro files in `.' since they are never used, and aclocal will
copy them from $aclocaldir into aclocal.m4 anyway.
Reported by Alexandre Duret-Lutz <adl@gnu.org>
2004-06-17 08:03:49 +00:00
Gary V. Vaughan
3cb36d316f Automake 1.9 won't have the AC_PROG_EGREP bug (aclocal used to
pull an old installed libtool.m4 as well as the bootstrap
m4/libtool.m4 if an AC_DEFUN was removed), and we have
lt~obsolete.m4 to work around it in the mean time.  libtoolize
can install macro files from $prefix/share/aclocal perfectly well
without us needing to move to a whole other directory:

* Makefile.am (pkgmacro_DATA): Renamed to aclocal_DATA, so m4
files are installed to $prefix/share/aclocal again.
(install-data-local): Don't remove just installed macros!
* libtoolize.in (pkgmacrodir): Renamed to aclocaldir.
(func_copy_some_files): New function factored out of...
(func_copy_all_files): ...here.  Adjust to use func_copy_some_files.
(re_pkgaux_files): Renamed to glob_pkgaux_files, since it is not
a regular expression.
(re_pkgmagro_files): Replaced with...
(pkgmacro_files): ...a colon delimited list of libtool installed
m4 files from aclocaldir.
(Main): Copy macro files from aclocaldir again.
* NEWS: Updated.
2004-06-16 15:08:28 +00:00