mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-21 01:40:57 +08:00
757d7dc478
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. |
||
---|---|---|
.. | ||
.cvsignore | ||
configure.ac | ||
foo1.c | ||
foo2.c | ||
foo.h | ||
main.c | ||
Makefile.am | ||
mlib.c | ||
README | ||
sub.c |
This is mdemo, an example package that uses GNU libtool with an Automake-generated environment to build two simple modules and a program. It demonstrates how to build both dynamic and static libraries that can be dlopened. mdemo uses libtool's portable dlopen wrapper called "libltdl". All exported symbols are prefixed with "libname_LTX_" to avoid symbols conflicts, especially when linking statically. libltdl will automatically cut the prefix off to get the real name. Note that on Windows, for the purposes of illustrating ltdl, the libraries *are* built as dll's, but do not have the __declspec machinery to make them suitable for loading at link time. This is only for clarity inside this example, look at the example in ../demo to see how the __declspec macros should be set up.