[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: support standalone libltdl [libtool--devo--1.0--patch-221]
From: |
Gary V. Vaughan |
Subject: |
FYI: support standalone libltdl [libtool--devo--1.0--patch-221] |
Date: |
Tue, 23 Aug 2005 02:55:17 +0100 (BST) |
User-agent: |
mailnotify/0.6 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Applied to HEAD.
* looking for address@hidden/libtool--devo--1.0--patch-220 to compare with
* comparing to address@hidden/libtool--devo--1.0--patch-220
D/ config/.arch-ids
D/ m4/.arch-ids
A/ libltdl/config/.arch-ids
A/ libltdl/m4/.arch-ids
D libltdl/.arch-ids/Makefile.am.id
D libltdl/Makefile.am
A tests/.arch-ids/standalone.at.id
A tests/standalone.at
A
{arch}/libtool/libtool--gary/libtool--gary--1.0/address@hidden/patch-log/patch-23
M Makefile.am
M Makefile.maint
M tests/depdemo/Makefile.am
M tests/depdemo/configure.ac
M NEWS
M tests/f77demo/Makefile.am
M tests/f77demo/configure.ac
M tests/mdemo/Makefile.am
M tests/mdemo/configure.ac
M tests/mdemo2/Makefile.am
M tests/mdemo2/configure.ac
M tests/pdemo/Makefile.am
M bootstrap
M tests/pdemo/configure.ac
M tests/tagdemo/Makefile.am
M tests/tagdemo/configure.ac
M configure.ac
M libtoolize.m4sh
M libltdl/m4/ltdl.m4
M tests/cdemo/Makefile.am
M tests/cdemo/configure.ac
M tests/demo/Makefile.am
M tests/demo/configure.ac
M ChangeLog
M tests/fcdemo/Makefile.am
M tests/fcdemo/configure.ac
M tests/testsuite.at
/> config libltdl/config
/> m4 libltdl/m4
=> config/.arch-ids/=id libltdl/config/.arch-ids/=id
=> config/.arch-ids/general.m4sh.id libltdl/config/.arch-ids/general.m4sh.id
=> config/.arch-ids/getopt.m4sh.id libltdl/config/.arch-ids/getopt.m4sh.id
=> config/.arch-ids/ltmain.m4sh.id libltdl/config/.arch-ids/ltmain.m4sh.id
=> config/.arch-ids/mailnotify.m4sh.id
libltdl/config/.arch-ids/mailnotify.m4sh.id
=> config/.arch-ids/mkstamp.id libltdl/config/.arch-ids/mkstamp.id
=> m4/.arch-ids/=id libltdl/m4/.arch-ids/=id
=> m4/.arch-ids/argz.m4.id libltdl/m4/.arch-ids/argz.m4.id
=> m4/.arch-ids/libtool.m4.id libltdl/m4/.arch-ids/libtool.m4.id
=> m4/.arch-ids/ltdl.m4.id libltdl/m4/.arch-ids/ltdl.m4.id
=> m4/.arch-ids/ltoptions.m4.id libltdl/m4/.arch-ids/ltoptions.m4.id
=> m4/.arch-ids/ltsugar.m4.id libltdl/m4/.arch-ids/ltsugar.m4.id
=> m4/.arch-ids/ltversion.in.id libltdl/m4/.arch-ids/ltversion.in.id
=> m4/.arch-ids/lt~obsolete.m4.id libltdl/m4/.arch-ids/lt~obsolete.m4.id
* modified files
Index: Changelog
from Gary V. Vaughan <address@hidden>
Reorganise the libtool tree to create a bootstrapped libltdl for
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.
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/README, tests/fcdemo/configure.ac,
tests/fcdemo/cprogram.c, tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/fcdemo/foof.f90, tests/fcdemo/foof2.f90,
tests/fcdemo/foof3.f90, tests/fcdemo/fprogram.f90: New tests for
Fortran.
* m4/libtool.m4 (_LT_LINKER_HARDCODE_LIBPATH, _LT_LINKER_SHLIBS)
(_LT_LANG_CXX_CONFIG): Comment typos.
--- orig/Makefile.am
+++ mod/Makefile.am
@@ -22,12 +22,28 @@
## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301, USA.
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I libltdl/m4
-BUILD_SUBDIRS = . libltdl
-SUBDIRS = $(BUILD_SUBDIRS)
-DIST_SUBDIRS = $(BUILD_SUBDIRS)
-EXTRA_DIST =
+DIST_SUBDIRS = .
+
+BUILT_SOURCES = libtool
+
+CLEANFILES =
+MOSTLYCLEANFILES =
+DISTCLEANFILES =
+
+EXTRA_DIST = libltdl/COPYING.LIB \
+ libltdl/Makefile.am \
+ libltdl/Makefile.in \
+ libltdl/README \
+ libltdl/config-h.in \
+ libltdl/configure \
+ libltdl/configure.ac \
+ libltdl/aclocal.m4 \
+ libltdl/m4/lt~obsolete.m4
+
+auxdir = libltdl/config
+m4dir = libltdl/m4
# Using `cd' in backquotes may print the directory name, use this instead:
lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
@@ -47,6 +63,7 @@
$(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
-e 's,@aclocal_DATA\@,$(aclocalfiles),g' \
-e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \
+ -e "s,@pkgconfig_files\@,$(auxfiles),g" \
$(srcdir)/libtoolize.in > libtoolize.tmp
chmod a+x libtoolize.tmp
chmod a-w libtoolize.tmp
@@ -58,9 +75,9 @@
$(srcdir)/libtoolize.in: $(sh_files) libtoolize.m4sh Makefile.am
cd $(srcdir); \
rm -f libtoolize.in; \
- $(M4SH) -B ./config libtoolize.m4sh > libtoolize.in
+ $(M4SH) -B $(auxdir) libtoolize.m4sh > libtoolize.in
-libtool: $(top_builddir)/config.status $(srcdir)/config/ltmain.sh \
+libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh \
$(srcdir)/stamp-vcl
cd $(top_builddir) && $(SHELL) ./config.status $@
@@ -104,32 +121,21 @@
*) TIMESTAMP="" ;; \
esac
-sh_files = config/general.m4sh config/getopt.m4sh
-EXTRA_DIST += bootstrap libtoolize.in config/ltmain.m4sh config/mkstamp \
- $(sh_files) stamp-vcl ChangeLog.1996 ChangeLog.1997 \
- ChangeLog.1998 ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \
- ChangeLog.2002 ChangeLog.2003
-CLEANFILES = libtool libtoolize \
- libtoolize.tmp config/ltmain.tmp m4/ltversion.tmp
-DISTCLEANFILES =
-
-# These are required by libtoolize and must be executable when installed.
-# Since _SCRIPTS gets the program transform applied we make them
-# executable by hand
-nobase_dist_pkgdata_DATA = config/config.guess config/config.sub \
- config/ltmain.sh config/install-sh
-
-# Everything that gets picked up by aclocal is automatically distributed,
-# this is the list of macro files we install on the user's system.
-aclocalfiles = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 \
- m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
+sh_files = $(auxdir)/general.m4sh $(auxdir)/getopt.m4sh
+EXTRA_DIST += bootstrap libtoolize.in $(auxdir)/ltmain.m4sh \
+ $(auxdir)/mkstamp $(sh_files) stamp-vcl \
+ ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \
+ ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \
+ ChangeLog.2002 ChangeLog.2003 ChangeLog.2004
+CLEANFILES += libtool libtoolize libtoolize.tmp \
+ $(auxdir)/ltmain.tmp $(m4dir)/ltversion.tmp
## We know that $(srcdir)/ChangeLog has been edited if stamp-vcl
## needs updating, so we assume we have write access to $(srcdir).
## If we try to maintain ./stamp-vcl to avoid writing to a possibly
## read-only $(srcdir), then when the two stamp-vcls differ, distcheck
## will try to update the one in the read-only source tree it makes.
-MKSTAMP = $(SHELL) $(srcdir)/config/mkstamp
+MKSTAMP = $(SHELL) $(srcdir)/$(auxdir)/mkstamp
$(srcdir)/stamp-vcl: vcl-tmp clean-ltmain-sh ChangeLog
vcl-tmp:
@set dummy `$(MKSTAMP) < $(srcdir)/ChangeLog`; shift; \
@@ -144,7 +150,7 @@
## source tree version in current builds.
clean-ltmain-sh:
@-test "$(srcdir)" = "$(top_builddir)" || \
- rm -f "$(top_builddir)/config/ltmain.sh"
+ rm -f "$(top_builddir)/$(auxdir)/ltmain.sh"
# We build ltversion.m4 here, instead of from config.status,
# because config.status is rerun each time one of configure's
@@ -153,40 +159,181 @@
# a loop otherwise.
# Use `$(srcdir)/m4' for the benefit of non-GNU makes: this is
# how ltversion.m4 appears in our dependencies.
-EXTRA_DIST += m4/ltversion.in m4/ltversion.m4
-$(srcdir)/m4/ltversion.m4: m4/ltversion.in configure.ac $(srcdir)/stamp-vcl
+EXTRA_DIST += $(m4dir)/ltversion.in $(m4dir)/ltversion.m4
+$(srcdir)/$(m4dir)/ltversion.m4: $(m4dir)/ltversion.in configure.ac
$(srcdir)/stamp-vcl
set dummy `$(MKSTAMP) < $(srcdir)/ChangeLog`; shift; \
cd $(srcdir); \
- rm -f m4/ltversion.tmp; \
+ rm -f $(m4dir)/ltversion.tmp; \
serial=`echo $$1 | sed 's,^1[.],,g'`; \
input="ltversion.in"; \
$(edit) -e "s,@MACRO_REVISION\@,$$1,g" \
-e "s,@MACRO_SERIAL\@,$$serial,g" \
- m4/ltversion.in > m4/ltversion.tmp; \
- chmod a-w m4/ltversion.tmp; \
- mv -f m4/ltversion.tmp m4/ltversion.m4
+ $(m4dir)/ltversion.in > $(m4dir)/ltversion.tmp; \
+ chmod a-w $(m4dir)/ltversion.tmp; \
+ mv -f $(m4dir)/ltversion.tmp $(m4dir)/ltversion.m4
## And for similar reasons, ltmain.sh can't be built from config.status.
## !WARNING! If you edit this rule to change the contents of ltmain.sh,
-## you must `touch $(srcdir)/config/ltmain.in' from the
+## you must `touch $(srcdir)/$(auxdir)/ltmain.in' from the
## shell if you need ltmain.sh to be regenerated. Ideally, we
## should make this rule depend on Makefile but that will break
## distcheck (at least) by rebuilding ltmain.sh in the source
## tree whenever config.status regenerates the Makefile.
-EXTRA_DIST += config/ltmain.sh
-$(srcdir)/config/ltmain.sh: $(sh_files) config/ltmain.m4sh configure.ac \
+EXTRA_DIST += $(auxdir)/ltmain.sh
+$(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh
configure.ac \
$(srcdir)/stamp-vcl
$(timestamp); \
cd $(srcdir); \
- rm -f config/ltmain.in config/ltmain.tmp config/ltmain.sh; \
- $(M4SH) -B ./config config/ltmain.m4sh > config/ltmain.in; \
+ rm -f $(auxdir)/ltmain.in $(auxdir)/ltmain.tmp \
+ $(auxdir)/ltmain.sh; \
+ $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \
+ > $(auxdir)/ltmain.in; \
input="ltmain.m4sh"; \
$(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
-e "s,@package_revision\@,$$1,g" \
- config/ltmain.in > config/ltmain.tmp; \
- rm -f config/ltmain.in; \
- chmod a-w config/ltmain.tmp; \
- mv -f config/ltmain.tmp config/ltmain.sh
+ $(auxdir)/ltmain.in > $(auxdir)/ltmain.tmp; \
+ rm -f $(auxdir)/ltmain.in; \
+ chmod a-w $(auxdir)/ltmain.tmp; \
+ mv -f $(auxdir)/ltmain.tmp $(auxdir)/ltmain.sh
+
+$(srcdir)/libltdl/Makefile.am: Makefile.am
+ cd $(srcdir); \
+ in=Makefile.am; out=libltdl/Makefile.am; \
+ rm -f $$out; \
+ $(SED) -n '/^.. Makefile.am -- /,/^.. Boston, MA/p' $$in > $$out; \
+ { echo 'ACLOCAL_AMFLAGS = -I m4'; \
+ echo 'AUTOMAKE_OPTIONS = foreign'; \
+ echo 'BUILT_SOURCES ='; \
+ echo 'EXTRA_DIST ='; \
+ echo 'CLEANFILES ='; \
+ echo 'MOSTLYCLEANFILES ='; \
+ } >> $$out; \
+ $(SED) -n '/^. %%% BEGIN /,/^. %%% END / \
+ { s,libltdl_,,; s,libltdl/,,; s,: libltdl/,: ,; \
+ s,\$$(libltdl_,$$(,; p; }' $$in >> $$out;
+ chmod a-w $(srcdir)/libltdl/Makefile.am
+
+$(srcdir)/libltdl/Makefile.in: libltdl/Makefile.am
+ cd $(srcdir)/libltdl && $(AUTOMAKE) Makefile
+
+
+## -------- ##
+## Libltdl. ##
+## -------- ##
+
+# %%% BEGIN libltdl/Makefile.am
+
+DEFS = -DHAVE_CONFIG_H="<$(CONFIG_H)>" -DLTDL
+
+# -I$(srcdir) is needed for user that built libltdl with a sub-Automake
+# (not as a sub-package!) using 'nostdinc':
+AM_CPPFLAGS = -I. -I$(srcdir) -Ilibltdl -I$(srcdir)/libltdl \
+ -I$(srcdir)/libltdl/libltdl
+AM_LDFLAGS = -no-undefined
+VERSION_INFO = -version-info 6:0:0
+
+noinst_LTLIBRARIES = $(LT_DLLOADERS)
+
+if INSTALL_LTDL
+ltdlincludedir = $(includedir)/libltdl
+ltdlinclude_HEADERS = libltdl/libltdl/lt_system.h \
+ libltdl/libltdl/lt_error.h \
+ libltdl/libltdl/lt_dlloader.h
+include_HEADERS = libltdl/ltdl.h
+lib_LTLIBRARIES = libltdl/libltdl.la
+endif
+
+if CONVENIENCE_LTDL
+noinst_LTLIBRARIES += libltdl/libltdlc.la
+endif
+
+libltdl_libltdl_la_SOURCES = 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/preopen.c \
+ libltdl/lt__alloc.c \
+ libltdl/lt_dlloader.c \
+ libltdl/lt_error.c \
+ libltdl/ltdl.c \
+ libltdl/ltdl.h \
+ libltdl/slist.c
+
+libltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
+libltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(VERSION_INFO) $(LT_DLPREOPEN)
+libltdl_libltdl_la_LIBADD = $(LTLIBOBJS)
+libltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(LTLIBOBJS)
+
+libltdl_libltdlc_la_SOURCES = $(libltdl_libltdl_la_SOURCES)
+libltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
+libltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
+libltdl_libltdlc_la_LIBADD = $(libltdl_libltdl_la_LIBADD)
+libltdl_libltdlc_la_DEPENDENCIES= $(libltdl_libltdl_la_DEPENDENCIES)
+
+## The loaders are preopened by libltdl, itself always built from
+## pic-objects (either as a shared library, or a convenience library),
+## so the loaders themselves must be made from pic-objects too. We
+## use convenience libraries for that purpose:
+EXTRA_LTLIBRARIES = libltdl/dlopen.la \
+ libltdl/dld_link.la \
+ libltdl/dyld.la \
+ libltdl/load_add_on.la \
+ libltdl/loadlibrary.la \
+ libltdl/shl_load.la
+
+libltdl_dlopen_la_SOURCES = libltdl/loaders/dlopen.c
+libltdl_dlopen_la_LDFLAGS = -module -avoid-version
+libltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
+
+libltdl_dld_link_la_SOURCES = libltdl/loaders/dld_link.c
+libltdl_dld_link_la_LDFLAGS = -module -avoid-version
+libltdl_dld_link_la_LIBADD = -ldld
+
+libltdl_dyld_la_SOURCES = libltdl/loaders/dyld.c
+libltdl_dyld_la_LDFLAGS = -module -avoid-version
+
+libltdl_load_add_on_la_SOURCES = libltdl/loaders/load_add_on.c
+libltdl_load_add_on_la_LDFLAGS = -module -avoid-version
+
+libltdl_loadlibrary_la_SOURCES = libltdl/loaders/loadlibrary.c
+libltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
+
+libltdl_shl_load_la_SOURCES = libltdl/loaders/shl_load.c
+libltdl_shl_load_la_LDFLAGS = -module -avoid-version
+libltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
+
+## Make sure these will be cleaned even when they're not built by default:
+CLEANFILES += libltdl/libltdl.la \
+ libltdl/libltdlc.la \
+ libltdl/libdlloader.la
+
+## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
+## automatically:
+CLEANFILES += $(LIBOBJS) $(LTLIBOBJS)
+
+
+## --------------------------- ##
+## Gnulib Makefile.am snippets ##
+## --------------------------- ##
+
+BUILT_SOURCES += libltdl/$(ARGZ_H)
+EXTRA_DIST += libltdl/argz_.h
+
+# We need the following in order to create an <argz.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(lib_OBJECTS): libltdl/$(ARGZ_H)
+libltdl/argz.h: libltdl/argz_.h
+ cp $(srcdir)/libltdl/argz_.h address@hidden
+ mv address@hidden $@
+MOSTLYCLEANFILES += libltdl/argz.h \
+ libltdl/argz.h-t
+
+# %%% END libltdl/Makefile.am
## -------------- ##
@@ -208,59 +355,66 @@
## Installation. ##
## ------------- ##
+# These are required by libtoolize and must be executable when installed.
+# The timestamps on these files must be preserved carefully so we install,
+# uninstall and set executable with custom rules here.
+auxexefiles = config/compile config/config.guess config/config.sub \
+ config/depcomp config/install-sh config/missing
+auxfiles = $(auxexefiles) config/ltmain.sh
+
+# Everything that gets picked up by aclocal is automatically distributed,
+# this is the list of macro files we install on the user's system.
+aclocalfiles = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 m4/ltoptions.m4 \
+ m4/ltsugar.m4 m4/ltversion.m4
+
## These are installed as a subdirectory of pkgdatadir so that
## libtoolize --ltdl can find them later:
-ltdldatadir = $(pkgdatadir)/libltdl
-ltdldatafiles = COPYING.LIB README \
- Makefile.am Makefile.in \
- argz_.h argz.c \
- configure.ac configure \
- libltdl/lt__alloc.h \
- libltdl/lt__dirent.h \
- libltdl/lt__glibc.h \
- libltdl/lt__private.h \
- libltdl/lt__strl.h \
- libltdl/lt_dlloader.h \
- libltdl/lt_error.h \
- libltdl/lt_system.h \
- libltdl/slist.h \
- loaders/dld_link.c \
- loaders/dlopen.c \
- loaders/dyld.c \
- loaders/load_add_on.c \
- loaders/loadlibrary.c \
- loaders/preopen.c \
- loaders/shl_load.c \
- lt__alloc.c \
- lt__dirent.c \
- lt__strl.c \
- lt_dlloader.c \
- lt_error.c \
- ltdl.c ltdl.h \
- slist.c
+ltdldatafiles = libltdl/COPYING.LIB \
+ libltdl/README \
+ libltdl/Makefile.am \
+ libltdl/Makefile.in \
+ libltdl/aclocal.m4 \
+ libltdl/config-h.in \
+ libltdl/configure.ac \
+ libltdl/configure \
+ libltdl/argz_.h \
+ libltdl/argz.c \
+ 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/shl_load.c \
+ libltdl/lt__dirent.c \
+ libltdl/lt__strl.c \
+ $(libltdl_libltdl_la_SOURCES)
-install-data-local:
+install-data-local: libltdl/Makefile.in
## Don't install over the top of an old pkgdatadir
-rm -rf $(DESTDIR)$(pkgdatadir)
## To avoid spurious reconfiguration when the user installs these files
## with libtoolize, we have to preserve their timestamps carefully:
- $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
- ( cd $(srcdir)/libltdl && $(AMTAR) chf - $(ltdldatafiles); ) \
- | ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
+ ( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
+ | ( umask 0 && cd $(DESTDIR)$(pkgdatadir) && $(AMTAR) xf -; )
+## And similarly copy the config auxilliary files into the master tree
+ ( cd $(srcdir)/libltdl && $(AMTAR) chf - $(auxfiles); ) \
+ | ( umask 0 && cd $(DESTDIR)$(pkgdatadir) && $(AMTAR) xf -; )
+ @for f in : $(auxexefiles); do \
+ test "X$$f" = X: && continue; \
+ echo "chmod +x '$(DESTDIR)$(pkgdatadir)/$$f'"; \
+ chmod +x "$(DESTDIR)$(pkgdatadir)/$$f"; \
+ done
+## Put a copy of the libtool m4 macros in the aclocal dir
$(mkinstalldirs) $(DESTDIR)$(aclocaldir)
@for p in $(aclocalfiles); do \
f=`echo "$$p" | sed 's|^.*/||'`; \
aclocalfiles="$$aclocalfiles $$f"; \
done; \
- ( cd $(srcdir)/m4 && $(AMTAR) chf - $$aclocalfiles; ) \
+ ( cd $(srcdir)/$(m4dir) && $(AMTAR) chf - $$aclocalfiles; ) \
| ( umask 0 && cd $(DESTDIR)$(aclocaldir) && $(AMTAR) xf -; )
- chown -R root $(DESTDIR)$(ltdldatadir) && \
- chgrp -R root $(DESTDIR)$(ltdldatadir) || :
-
-install-data-hook:
- chmod +x $(DESTDIR)$(pkgdatadir)/config/config.guess
- chmod +x $(DESTDIR)$(pkgdatadir)/config/config.sub
- chmod +x $(DESTDIR)$(pkgdatadir)/config/install-sh
+ chown -R root $(DESTDIR)$(pkgdatadir) && \
+ chgrp -R root $(DESTDIR)$(pkgdatadir) || :
## ------------- ##
@@ -276,11 +430,17 @@
f=`echo "$$p" | sed 's|^.*/||'`; \
echo " rm -rf '$(DESTDIR)$(aclocaldir)/$$f'"; \
rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \
- done;
+ done
+## Uninstall files from install-data-local rule above:
+ @for f in $(ltdldatafiles) $(auxfiles); do \
+ test -f $(DESTDIR)$(pkgdatadir)/$$f || continue; \
+ echo "rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
+ rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
+ done
-## Ship README.alpha only in alpha release, but renamed to README
dist-hook:
+## Ship README.alpha only in alpha release, but renamed to README
address@hidden -f $(distdir)/README.alpha && \
case $(VERSION) in \
*[a-z]) mv $(distdir)/README.alpha $(distdir)/README ;; \
@@ -298,6 +458,7 @@
tests/duplicate_members.at \
tests/inherited_flags.at \
tests/libtoolize.at \
+ tests/standalone.at \
tests/stresstest.at \
tests/link-order.at \
tests/convenience.at \
@@ -336,6 +497,7 @@
tests/atconfig: config.status
$(SHELL) ./config.status tests/atconfig
+
DISTCLEANFILES += tests/atconfig
CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests
@@ -457,10 +619,10 @@
# Use `$(srcdir)/tests' for the benefit of non-GNU makes: this is
# how defs.in appears in our dependencies.
-$(srcdir)/tests/defs.in: config/general.m4sh tests/defs.m4sh Makefile.am
+$(srcdir)/tests/defs.in: $(auxdir)/general.m4sh tests/defs.m4sh Makefile.am
cd $(srcdir); \
rm -f tests/defs.in; \
- $(M4SH) -B ./config tests/defs.m4sh > tests/defs.in
+ $(M4SH) -B $(auxdir) tests/defs.m4sh > tests/defs.in
# We need to remove any files that the above tests created.
clean-local-legacy:
--- orig/Makefile.maint
+++ mod/Makefile.maint
@@ -1,6 +1,6 @@
## Makefile.maint -- Makefile rules for libtool maintainers -*-Makefile-*-
##
-## Copyright (C) 2004 Free Software Foundation
+## Copyright (C) 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -31,11 +31,11 @@
TEXI2HTML = texi2html
-$(top_srcdir)/commit: $(top_srcdir)/config/mailnotify clcommit.m4sh
+$(srcdir)/commit: $(srcdir)/$(auxdir)/mailnotify clcommit.m4sh
$(timestamp); \
- cd $(top_srcdir); \
+ cd $(srcdir); \
rm -f commit commit.in commit.tmp; \
- $(M4SH) -B ./config clcommit.m4sh > commit.in; \
+ $(M4SH) -B $(auxdir) clcommit.m4sh > commit.in; \
input="clcommit.m4sh"; \
$(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" commit.in > commit.tmp; \
chmod a+x commit.tmp; \
@@ -43,9 +43,9 @@
mv -f commit.tmp commit; \
rm -f commit.in
-$(top_srcdir)/config/mailnotify: config/mailnotify.m4sh
+$(srcdir)/$(auxdir)/mailnotify: $(auxdir)/mailnotify.m4sh
$(timestamp); \
- cd $(top_srcdir)/config; \
+ cd $(srcdir)/$(auxdir); \
rm -f mailnotify mailnotify.in mailnotify.tmp; \
$(M4SH) -B . mailnotify.m4sh > mailnotify.in; \
input="mailnotify.m4sh"; \
@@ -119,10 +119,10 @@
## FIXME should be a lot more here
FETCHFILES = \
./INSTALL \
-config/install-sh \
-config/config.guess \
-config/config.sub \
-config/texinfo.tex
+$(auxdir)/install-sh \
+$(auxdir)/config.guess \
+$(auxdir)/config.sub \
+$(auxdir)/texinfo.tex
## Fetch the latest versions of files we care about.
.PHONY: fetch
@@ -238,7 +238,7 @@
.PHONY: web-manual
web-manual:
- @$(LN_S) $(top_srcdir)/doc/libtool.texi doc/manual.texi
+ @$(LN_S) $(srcdir)/doc/libtool.texi doc/manual.texi
$(TEXI2HTML) -I doc -monolithic -number -verbose doc/manual.texi
@mv doc/manual.html manual.html
@rm -f doc/manual.texi
--- orig/NEWS
+++ mod/NEWS
@@ -12,6 +12,7 @@
in object names, to enhance GCJ support.
* Detection of compiler wrappers like distcc/ccache and $host_alias prefix.
* Initial Support for FC (modern Fortran).
+* Fixed a regression that prevented use of libltdl without autotools.
New in 1.9h: 2004-??-??; CVS version 1.9g, Libtool team:
* Bug fixes.
--- orig/bootstrap
+++ mod/bootstrap
@@ -39,6 +39,19 @@
exit 1
}
+
+# Extract auxdir and m4dir from configure.ac:
+my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;
+ /AC_CONFIG_AUX_DIR[^_]/ {
+ s,^.*AC_CONFIG_AUX_DIR([[ ]*\([^])]*\).*$,auxdir=\1,; p;
+ };
+ /AC_CONFIG_MACRO_DIR/ {
+ s,^.*AC_CONFIG_MACRO_DIR([[ ]*\([^])]*\).*$,m4dir=\1,; p;
+ };
+ d;'
+eval `cat configure.ac 2>/dev/null | $SED "$my_sed_traces"`
+
+
# Upgrade caveat:
cat <<'EOF'
WARNING: If bootstrapping with this script fails, it may be due to an
@@ -52,10 +65,10 @@
rm -rf `find . -path './{arch}' -prune -o \( -name autom4te.cache -o -name
libtool \) -print`
# Delete stale files from previous libtool versions.
-rm -f acinclude.m4 config/ltmain.sh libltdl/config.h
+rm -f acinclude.m4 libltdl/config.h
if test -z "$reconfdirs"; then
- reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
+ reconfdirs=". libltdl `ls -1d tests/*demo tests/*demo[0-9]`"
fi
# Extract the package name and version number from configure.ac:
@@ -71,13 +84,14 @@
# We don't have all the substitution values to build ltmain.sh from this
# script yet, but we need config/ltmain.sh for the libtool commands in
# configure, and ltversion.m4 to generate configure in the first place:
-rm -f ./config/ltmain.sh ./m4/ltversion.m4
+rm -f $auxdir/ltmain.sh $m4dir/ltversion.m4
-$MAKE ./config/ltmain.sh ./doc/notes.txt ./m4/ltversion.m4 ./libtoolize.in \
- ./tests/defs.in ./tests/package.m4 ./tests/testsuite \
+$MAKE $auxdir/ltmain.sh $m4dir/ltversion.m4 ./doc/notes.txt \
+ ./libtoolize.in ./tests/defs.in ./tests/package.m4 \
+ ./tests/testsuite ./libltdl/Makefile.am \
srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" \
PACKAGE_BUGREPORT="address@hidden" M4SH="$AUTOM4TE --language=m4sh" \
- AUTOTEST="$AUTOM4TE --language=autotest" MAKEINFO="$MAKEINFO"
+ AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO"
test -f clcommit.m4sh && $MAKE -f Makefile.maint commit \
srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="$AUTOM4TE -l m4sh"
\
@@ -86,25 +100,33 @@
rm -f Makefile
# Make a dummy libtoolize script for autoreconf:
-test -f clcommit.m4sh && cat > ./config/libtoolize <<'EOF'
+test -f clcommit.m4sh && cat > $auxdir/libtoolize <<'EOF'
#! /bin/sh
# This is a dummy file for bootstrapping CVS libtool.
echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'
exit 0
EOF
-chmod 755 ./config/libtoolize
+chmod 755 $auxdir/libtoolize
# Running the installed `libtoolize' will trash the local (newer) libtool.m4
# among others. Call the dummy script we made earlier.
-LIBTOOLIZE=`pwd`/config/libtoolize
+LIBTOOLIZE=`pwd`/$auxdir/libtoolize
export LIBTOOLIZE
for sub in $reconfdirs; do
$AUTORECONF --force --verbose --install $sub
done
+# Autoheader valiantly tries to prevent needless reconfigurations by
+# not changing the timestamp of config-h.in unless the file contents
+# are updated. Unfortunately config-h.in depends on aclocal.m4 which
+# *is* updated, so running 'libtoolize --ltdl=. && configure && make'
+# causes autoheader to be called... undesireable for users that do not
+# have it! Fudge the timestamp to prevent that:
+sleep 2 && touch libltdl/config-h.in
+
# Remove our dummy libtoolize
-rm -f ./config/libtoolize
+rm -f $auxdir/libtoolize
# These files can cause an infinite configure loop if left behind.
rm -f Makefile libltdl/Makefile libtool vcl.tmp
@@ -112,7 +134,7 @@
# This file is misgenerated earlier in bootstrap to satisfy automake 1.9.1
# and earlier, but has a new enough timestamp to not be updated. Force it
# to be regenerated at make-time with proper substitutions in place:
-touch config/ltmain.in
+touch $auxdir/ltmain.in
# Commit script caveat:
cat <<'EOF'
@@ -120,7 +142,7 @@
WARNING: after you have run `configure' to discover the real whereabouts
WARNING: of `sed', `grep' etc. like this:
WARNING:
-WARNING: rm -f config/mailnotify; make -f Makefile.maint commit
+WARNING: rm -f $auxdir/mailnotify; make -f Makefile.maint commit
EOF
exit 0
--- orig/configure.ac
+++ mod/configure.ac
@@ -27,7 +27,9 @@
AC_INIT([libtool], [2.1a], address@hidden)
AC_CONFIG_HEADERS([config.h:config-h.in])
AC_CONFIG_SRCDIR([libtoolize.in])
-AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_AUX_DIR([libltdl/config])
+AC_CONFIG_MACRO_DIR([libltdl/m4])
+AC_CONFIG_LIBOBJ_DIR([libltdl])
## ------------------------ ##
@@ -113,7 +115,7 @@
dnl These are bootstrap requirements, once built, libtool may work with
dnl much older releases of autoconf and automake. See release notes.
-AM_INIT_AUTOMAKE([1.8 gnits dist-bzip2])dnl We use auto-m4_including
+AM_INIT_AUTOMAKE([1.9 gnits subdir-objects dist-bzip2])
dnl We use m4sh to generate libtool's portable shell scripts
AC_SUBST([M4SH], ['$(AUTOM4TE) --language=m4sh'])
@@ -155,13 +157,14 @@
# a good C compiler: if the following C++ tests fail, the whole libtool
# build fails!
AC_PROG_CC
+AM_PROG_CC_C_O
AC_PROG_CPP
## ----------------------- ##
## Libtool initialisation. ##
## ----------------------- ##
LT_INIT([dlopen win32-dll])
-LTDL_INIT
+LTDL_INIT([libltdl])
# Enable all the language support we can
LT_LANG(C++)
@@ -184,5 +187,5 @@
## -------- ##
## Outputs. ##
## -------- ##
-AC_CONFIG_FILES([Makefile libltdl/Makefile])
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT
--- orig/m4/ltdl.m4
+++ mod/libltdl/m4/ltdl.m4
@@ -5,7 +5,7 @@
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
-# serial 7 LTDL_INIT
+# serial 8 LTDL_INIT
# LT_WITH_LTDL([DIRECTORY])
# -------------------------
@@ -136,12 +136,17 @@
dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
-# LTDL_INIT
-# ---------
+# LTDL_INIT([DIRECTORY])
+# ----------------------
# Perform all the checks necessary for compilation of the ltdl objects
# -- including compiler checks and header checks.
AC_DEFUN([LTDL_INIT],
-[AC_REQUIRE([AC_PROG_CC])dnl
+[m4_if([$#], 1, [m4_divert_push([DEFAULTS])dnl
+# libltdl will be built in the named DIRECTORY, relative to $top_builddir.
+lt_ltdl_dir='$1'
+m4_divert_pop([DEFAULTS])])dnl
+
+AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_HEADER_DIRENT])dnl
@@ -385,6 +390,9 @@
LT_DLLOADERS=
AC_SUBST([LT_DLLOADERS])
+test "X${lt_ltdl_dir-.}" != X. &&
+ lt_ltdl_dir=`echo "$lt_ltdl_dir/" | sed 's,/*$,/,'`
+
AC_LANG_PUSH([C])
LIBADD_DLOPEN=
@@ -392,7 +400,7 @@
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
LIBADD_DLOPEN="-ldl" libltdl_cv_lib_dl_dlopen="yes"
- LT_DLLOADERS="$LT_DLLOADERS dlopen.la"],
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}dlopen.la"],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
# include <dlfcn.h>
#endif
@@ -400,12 +408,12 @@
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
libltdl_cv_func_dlopen="yes"
- LT_DLLOADERS="$LT_DLLOADERS dlopen.la"],
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}dlopen.la"],
[AC_CHECK_LIB([svld], [dlopen],
[AC_DEFINE([HAVE_LIBDL], [1],
[Define if you have the libdl library or equivalent.])
LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
- LT_DLLOADERS="$LT_DLLOADERS dlopen.la"])])])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}dlopen.la"])])])
if test x"$libltdl_cv_func_dlopen" = xyes || test
x"$libltdl_cv_lib_dl_dlopen" = xyes
then
lt_save_LIBS="$LIBS"
@@ -419,11 +427,11 @@
AC_CHECK_FUNC([shl_load],
[AC_DEFINE([HAVE_SHL_LOAD], [1],
[Define if you have the shl_load function.])
- LT_DLLOADERS="$LT_DLLOADERS shl_load.la"],
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}shl_load.la"],
[AC_CHECK_LIB([dld], [shl_load],
[AC_DEFINE([HAVE_SHL_LOAD], [1],
[Define if you have the shl_load function.])
- LT_DLLOADERS="$LT_DLLOADERS shl_load.la"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}shl_load.la"
LIBADD_SHL_LOAD="-ldld"])])
AC_SUBST([LIBADD_SHL_LOAD])
@@ -433,20 +441,20 @@
AC_CHECK_FUNC([_dyld_func_lookup],
[AC_DEFINE([HAVE_DYLD], [1],
[Define if you have the _dyld_func_lookup function.])
- LT_DLLOADERS="$LT_DLLOADERS dyld.la"])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}dyld.la"])
;;
beos*)
- LT_DLLOADERS="$LT_DLLOADERS load_add_on.la"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}load_add_on.la"
;;
cygwin* | mingw* | os2* | pw32*)
- LT_DLLOADERS="$LT_DLLOADERS loadlibrary.la"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}loadlibrary.la"
;;
esac
AC_CHECK_LIB([dld], [dld_link],
[AC_DEFINE([HAVE_DLD], [1],
[Define if you have the GNU dld library.])
- LT_DLLOADERS="$LT_DLLOADERS dld_link.la"])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_ltdl_dir}dld_link.la"])
AC_SUBST([LIBADD_DLD_LINK])
m4_pattern_allow([^LT_DLPREOPEN$])
--- orig/libtoolize.m4sh
+++ mod/libtoolize.m4sh
@@ -73,16 +73,15 @@
opt_link=:
opt_debug=:
+seen_autoconf=false
seen_libtool=false
seen_ltdl=false
-# Collect flags to pass into libltdl libtoolize
-libtoolize_flags=
-
# Locations for important files:
address@hidden@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
auxdir=
m4dir=
@@ -103,12 +102,9 @@
opt="$1"
shift
case $opt in
- --copy|-c) opt_link=false
- libtoolize_flags="$libtoolize_flags --copy"
- ;;
+ --copy|-c) opt_link=false ;;
--debug) func_echo "enabling shell trace mode"
- libtoolize_flags="$libtoolize_flags --debug"
opt_debug='set -x'
$opt_debug
;;
@@ -121,16 +117,11 @@
MKDIR="$ECHO $MKDIR"
TAR="$ECHO $TAR"
fi
- libtoolize_flags="${libtoolize_flags} --dry-run"
;;
- --force|-f) opt_force=:
- libtoolize_flags="${libtoolize_flags} --force"
- ;;
+ --force|-f) opt_force=: ;;
- --install|-i) opt_install=:
- libtoolize_flags="${libtoolize_flags} --install"
- ;;
+ --install|-i) opt_install=: ;;
--ltdl) ltdldir=libltdl
if test "$#" -gt 0; then
@@ -143,12 +134,9 @@
--quiet|--automake|-q) # --automake is for 1.5 compatibility
opt_quiet=:
- libtoolize_flags="${libtoolize_flags} --quiet"
;;
- --verbose|-v) opt_verbose=:
- libtoolize_flags="${libtoolize_flags} --verbose"
- ;;
+ --verbose|-v) opt_verbose=: ;;
# Separate optargs to long options:
--*=*)
@@ -226,18 +214,22 @@
test -f "$my_srcdir/$my_file" || \
{ func_error "\`$my_file' not found in \`$my_srcdir'"; return; }
- func_mkdir_p "$my_destdir"
+ case $opt_verbose in
+ false) my_copy_msg="file \`$my_destdir/$my_file'" ;;
+ *) my_copy_msg="file from \`$my_srcdir/$my_file'" ;;
+ esac
+ func_mkdir_p `$ECHO "X$my_destdir/$my_file" | $Xsed -e "$dirname"`
$RM "$my_destdir/$my_file"
if $opt_link && $LN_S "$my_srcdir/$my_file" "$my_destdir/$my_file"; then
- $opt_quiet || func_echo "copying file \`$my_destdir/$my_file'"
+ $opt_quiet || func_echo "linking $my_copy_msg"
copy_return_status=0
elif { ( cd "$my_srcdir" 2>/dev/null && $TAR chf - "$my_file"
2>/dev/null; ) \
| ( umask 0 && cd "$my_destdir" 2>/dev/null && "$TAR" xf -
>/dev/null 2>&1; ); } ; then
- $opt_quiet || func_echo "copying file \`$my_destdir/$my_file'"
+ $opt_quiet || func_echo "copying $my_copy_msg"
copy_return_status=0
elif $CP -p "$my_srcdir/$my_file" "$my_destdir/$my_file"; then
- $opt_quiet || func_echo "copying file \`$my_destdir/$my_file'"
+ $opt_quiet || func_echo "copying $my_copy_msg"
copy_return_status=0
else
func_error "can not copy \`$my_srcdir/$my_file' to \`$my_destdir/'"
@@ -349,18 +341,19 @@
$opt_debug
# Prefer configure.ac to configure.in
test -f configure.ac && configure_ac=configure.ac
- test -f "$configure_ac" \
- || func_fatal_help "\`$configure_ac' does not exist"
+ test -f "$configure_ac" || configure_ac=
# Set local variables to reflect contents of configure.ac
- my_uses_autoconf=false
my_sed_scan_configure_ac='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;
- /AC_INIT/ { s,^.*$,my_uses_autoconf=:,; p; };
+ /AC_INIT/ { s,^.*$,seen_autoconf=:,; p; };
d'
- eval `$SED "$my_sed_scan_configure_ac" "$configure_ac"`
+ test -z "$configure_ac" \
+ || eval `$SED "$my_sed_scan_configure_ac" "$configure_ac"`
- $my_uses_autoconf || {
- func_verbose "$configure_ac: not using Autoconf"
+ $seen_autoconf || {
+ my_configure_ac=
+ test -n "$configure_ac" && my_configure_ac="$configure_ac: "
+ func_verbose "${my_configure_ac}not using Autoconf"
return
}
@@ -751,6 +744,10 @@
func_check_macros ()
{
$opt_debug
+
+ $seen_autoconf \
+ || return
+
# Don't trace for this, we're just checking the user didn't invoke it
# directly from configure.ac.
$SED 's,[d]nl .*$,,; s,# .*$,,' "$configure_ac" | grep AC_PROG_RANLIB \
@@ -801,6 +798,9 @@
# Massage a value for pkgltdl_files from the value used in Makefile.am
for my_filename in @pkgltdl_files@; do
+ # Strip surplus leading 'libltdl/':
+ my_filename=`expr "X$my_filename" : 'Xlibltdl/\(.*\)'`
+
# ignore excluded filenames
if test -n "$my_glob_exclude"; then
eval 'case $my_filename in '$my_glob_exclude') continue ;; esac'
@@ -818,6 +818,35 @@
}
+# func_massage_pkgconfig_files [glob_exclude]
+# @pkgconfig_files\@ is substituted as per its value in Makefile.am; this
+# function massages it into a suitable format for func_copy_some_files.
+func_massage_pkgconfig_files ()
+{
+ pkgconfig_files= # GLOBAL VAR
+
+ my_glob_exclude="$1"
+
+ # Massage a value for pkgconfig_files from the value used in Makefile.am
+ for my_filename in @pkgconfig_files@; do
+
+ # ignore excluded filenames
+ if test -n "$my_glob_exclude"; then
+ eval 'case $my_filename in '$my_glob_exclude') continue ;; esac'
+ fi
+
+ # ignore duplicates
+ case :$pkgconfig_files: in
+ *:$my_filename:*) ;;
+ *) pkgconfig_files="$pkgconfig_files:$my_filename" ;;
+ esac
+ done
+
+ # strip spurious leading `:'
+ pkgconfig_files=`$ECHO "X$pkgconfig_files" | $Xsed -e 's,^:*,,'`
+}
+
+
# func_nonemptydir_p dirvar
# DIRVAR is the name of a variable to evaluate. Unless DIRVAR names
# a directory that exists and is non-empty abort with a diagnostic.
@@ -846,13 +875,16 @@
# Allow the user to override the master libtoolize repository:
if test -n "$_lt_pkgdatadir"; then
- pkgdatadir="$_lt_pkgdatadir"
- aclocaldir="$_lt_pkgdatadir/m4"
+ pkgltdldir="$_lt_pkgdatadir"
+ pkgdatadir="$_lt_pkgdatadir/libltdl"
+ aclocaldir="$_lt_pkgdatadir/libltdl/m4"
fi
+ func_nonemptydir_p pkgltdldir
func_nonemptydir_p pkgdatadir
func_nonemptydir_p aclocaldir
func_massage_pkgltdl_files
+ func_massage_pkgconfig_files
# libtool.m4 and ltdl.m4 are handled specially below
func_massage_aclocal_DATA 'libtool.m4|ltdl.m4'
@@ -865,24 +897,38 @@
# Copy all the files from installed libltdl to this project, if the
# user specified `--ltdl'.
if test -n "$ltdldir"; then
- func_copy_some_files "$pkgltdl_files" "$pkgdatadir/libltdl" "$ltdldir"
+ func_copy_some_files "$pkgltdl_files" "$pkgltdldir/libltdl" "$ltdldir"
- # libtoolize the newly copied libltdl tree
- ( cd "$ltdldir" && eval "$progpath" $libtoolize_flags ) \
- || exit $EXIT_FAILURE
- fi
+ # Unless we share CONFIG_MACRO_DIR with our parent project,
+ # copy macros here.
+ if test "$ltdldir/m4" != "$m4dir"; then
+ func_copy_some_files "$pkgmacro_files:libtool.m4:ltdl.m4" \
+ "$aclocaldir" "$ltdldir/m4"
+ fi
- # Copy all the installed utility files to the auxiliary directory if
- # `--install' was passed, or else copy just ltmain.sh.
- $opt_quiet || if test "$auxdir" != .; then
- func_echo "putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
+ # Unless we share CONFIG_AUX_DIR with our parent project,
+ # copy config aux files into libltdl.
+ if test "$ltdldir/config" != "$auxdir"; then
+ func_copy_some_files "$pkgconfig_files" "$pkgdatadir" "$ltdldir"
+ fi
fi
- if $opt_install; then
- func_config_update config.guess "$pkgdatadir/config" "$auxdir"
- func_config_update config.sub "$pkgdatadir/config" "$auxdir"
- func_install_update install-sh "$pkgdatadir/config" "$auxdir"
+
+ # If they are newer, copy all the installed utility files to the
+ # auxiliary directory if `--install' was passed, or else copy just
+ # ltmain.sh.
+ if test -n "$auxdir"; then
+ $opt_quiet || if test "$auxdir" != .; then
+ func_echo "putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
+ fi
+ if $opt_install; then
+ func_config_update config.guess "$pkgdatadir/config" "$auxdir"
+ func_config_update config.sub "$pkgdatadir/config" "$auxdir"
+ func_install_update install-sh "$pkgdatadir/config" "$auxdir"
+ fi
+ func_ltmain_update ltmain.sh "$pkgdatadir/config" "$auxdir"
+ else
+ func_verbose "AC_CONFIG_AUX_DIR not defined, not copying libtool
auxilliary files."
fi
- func_ltmain_update ltmain.sh "$pkgdatadir/config" "$auxdir"
# Copy libtool's m4 macros to the macro directory, if they are newer.
if test -n "$m4dir"; then
@@ -902,6 +948,15 @@
else
func_verbose "AC_CONFIG_MACRO_DIR not defined, not copying libtool macro
files."
fi
+
+ # Offer some suggestions for avoiding duplicate files in a project
+ # that uses libltdl:
+ if test -n "$ltdldir" && $seen_autoconf; then
+ $opt_quiet || test "$ltdldir/config" = "$auxdir" || \
+ func_echo "consider using \`AC_CONFIG_AUX_DIR([[$ltdldir/config]])' in
$configure_ac"
+ $opt_quiet || test "$ltdldir/m4" = "$m4dir" || \
+ func_echo "consider using \`AC_CONFIG_MACRO_DIR([[$ltdldir/m4]])' in
$configure_ac"
+ fi
}
exit $exit_status
--- orig/tests/cdemo/Makefile.am
+++ mod/tests/cdemo/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../..
noinst_LTLIBRARIES = libfoo.la
--- orig/tests/cdemo/configure.ac
+++ mod/tests/cdemo/configure.ac
@@ -1,5 +1,5 @@
## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
## ------------------------ ##
AC_INIT([cdemo], [1.0], address@hidden)
AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
## ------------------------ ##
--- orig/tests/demo/Makefile.am
+++ mod/tests/demo/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../..
# Build a libtool library, libhello.la for installation in libdir.
--- orig/tests/demo/configure.ac
+++ mod/tests/demo/configure.ac
@@ -1,5 +1,5 @@
## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
## ------------------------ ##
AC_INIT([demo], [1.0], address@hidden)
AC_CONFIG_SRCDIR([hello.c])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
## ------------------------ ##
--- orig/tests/depdemo/Makefile.am
+++ mod/tests/depdemo/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../..
SUBDIRS = l1 l2 l3 l4
--- orig/tests/depdemo/configure.ac
+++ mod/tests/depdemo/configure.ac
@@ -1,5 +1,5 @@
## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
## ------------------------ ##
AC_INIT([depdemo], [1.0], address@hidden)
AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
## ------------------------ ##
--- orig/tests/f77demo/Makefile.am
+++ mod/tests/f77demo/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../..
lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
--- orig/tests/f77demo/configure.ac
+++ mod/tests/f77demo/configure.ac
@@ -1,5 +1,5 @@
## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
AC_INIT([f77demo], [1.0], address@hidden)
AC_CONFIG_HEADERS([config.h:config-h.in])
AC_CONFIG_SRCDIR([foof.f])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
## ------------------------ ##
## Automake Initialisation. ##
--- orig/tests/fcdemo/Makefile.am
+++ mod/tests/fcdemo/Makefile.am
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../..
lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
--- orig/tests/fcdemo/configure.ac
+++ mod/tests/fcdemo/configure.ac
@@ -24,7 +24,7 @@
AC_INIT([fcdemo], [1.0], address@hidden)
AC_CONFIG_HEADERS([config.h:config-h.in])
AC_CONFIG_SRCDIR([foof.f90])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
## ------------------------ ##
## Automake Initialisation. ##
--- orig/tests/mdemo/Makefile.am
+++ mod/tests/mdemo/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../.. $(INCLTDL)
lib_LTLIBRARIES = libsub.la foo1.la libfoo2.la libmlib.la
@@ -49,7 +49,7 @@
@LIBLTDL@: $(top_distdir)/libtool $(top_distdir)/libltdl/libtool \
$(top_distdir)/libltdl/config.h $(srcdir)/$(top_distdir)/libltdl/ltdl.c \
$(srcdir)/$(top_distdir)/libltdl/ltdl.h
- (cd $(top_distdir)/libltdl; $(MAKE) `echo $(LIBLTDL) | sed
's,.*\.\./libltdl/,,g'`)
+ (cd $(top_distdir); $(MAKE) `echo $(LIBLTDL) | sed
's,.*\.\./libltdl/,libltdl/,g'`)
# Without the following line, the check may fail if libltdl/libtool is
# removed after libltdl is configured
$(top_distdir)/libltdl/libtool $(top_distdir)/libltdl/config.h:
--- orig/tests/mdemo/configure.ac
+++ mod/tests/mdemo/configure.ac
@@ -1,5 +1,5 @@
## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
## ------------------------ ##
AC_INIT([mdemo], [1.0], address@hidden)
AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
## ------------------------ ##
--- orig/tests/mdemo2/Makefile.am
+++ mod/tests/mdemo2/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../.. -I$(top_srcdir)/../../libltdl
bin_PROGRAMS = mdemo2 mdemo2_static
--- orig/tests/mdemo2/configure.ac
+++ mod/tests/mdemo2/configure.ac
@@ -1,5 +1,5 @@
## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
## ------------------------ ##
AC_INIT([mdemo2], [1.0], address@hidden)
AC_CONFIG_SRCDIR([main.c])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
## ------------------------ ##
--- orig/tests/pdemo/Makefile.am
+++ mod/tests/pdemo/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../..
# Build a libtool library, libhello.la for installation in libdir.
--- orig/tests/pdemo/configure.ac
+++ mod/tests/pdemo/configure.ac
@@ -1,5 +1,5 @@
## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
## ------------------------ ##
AC_INIT([pdemo], [1.0], address@hidden)
AC_CONFIG_SRCDIR([longer_file_name_hello.c])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
## ------------------------ ##
--- orig/tests/tagdemo/Makefile.am
+++ mod/tests/tagdemo/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am -- Process this file with automake to produce Makefile.in
##
-## Copyright (C) 2003, 2004 Free Software Foundation
+## Copyright (C) 2003, 2004, 2005 Free Software Foundation
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
## Boston, MA 02110-1301, USA.
AUTOMAKE_OPTIONS = no-dependencies foreign
-ACLOCAL_AMFLAGS = -I ../../m4
+ACLOCAL_AMFLAGS = -I ../../libltdl/m4
AM_CPPFLAGS = -I$(top_srcdir)/../..
noinst_LTLIBRARIES = libconv.la
--- orig/tests/tagdemo/configure.ac
+++ mod/tests/tagdemo/configure.ac
@@ -1,5 +1,5 @@
## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
## ------------------------ ##
AC_INIT([tagdemo], [1.0], address@hidden)
AC_CONFIG_SRCDIR([foo.cpp])
-AC_CONFIG_AUX_DIR([../../config])
+AC_CONFIG_AUX_DIR([../../libltdl/config])
AC_CANONICAL_TARGET
--- orig/tests/testsuite.at
+++ mod/tests/testsuite.at
@@ -97,6 +97,8 @@
m4_include([link-order.at])
# Torturing subdir-objects builds
m4_include([am-subdir.at])
+# standalone libltdl compilation
+m4_include([standalone.at])
# C++ templates tests
m4_include([template.at])
# Behaviour of LT_OUTPUT
* added files
--- /dev/null
+++
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./tests/.arch-ids/standalone.at.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Tue Apr 26 13:52:34 2005 23843.0
--- /dev/null
+++
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./tests/standalone.at
@@ -0,0 +1,157 @@
+# Hand crafted tests for GNU Libtool. -*- Autotest
-*-
+# Copyright 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+AT_BANNER([Standalone Libltdl.])
+
+## ------------------------ ##
+## Softlinked libltdl tree. ##
+## ------------------------ ##
+
+AT_SETUP([compiling softlinked libltdl])
+
+LT_AT_LIBTOOLIZE([--ltdl=.])
+./configure
+${MAKE-make}
+
+AT_CHECK([test -f libltdlc.la])
+
+AT_CLEANUP
+
+
+## -------------------- ##
+## Copied libltdl tree. ##
+## -------------------- ##
+
+AT_SETUP([compiling copied libltdl])
+
+LT_AT_LIBTOOLIZE([--copy --ltdl=.])
+./configure
+${MAKE-make}
+
+AT_CHECK([test -f libltdlc.la])
+
+AT_CLEANUP
+
+
+## ------------------------- ##
+## Installable libltdl tree. ##
+## ------------------------- ##
+
+AT_SETUP([installable libltdl])
+
+prefix=`pwd`/_inst
+
+LT_AT_LIBTOOLIZE([--copy --ltdl=.])
+./configure --enable-ltdl-install --prefix=$prefix
+${MAKE-make} all install
+
+AT_CHECK([test -f $prefix/lib/libltdl.la])
+AT_CHECK([test -f $prefix/include/ltdl.h])
+
+AT_CLEANUP
+
+
+## ----------------------------------------------- ##
+## libltdl is usable without Autoconf or Automake. ##
+## ----------------------------------------------- ##
+
+AT_SETUP([linking libltdl without autotools])
+
+AT_DATA([module.c],
+[[char *
+hello (void)
+{
+ return "Hello!";
+}
+]])
+
+AT_DATA([main.c],
+[[#include <stdio.h>
+#include "ltdl.h"
+
+int
+main (int argc, char **argv)
+{
+ lt_dlhandle handle;
+ char *(*func) (void) = 0;
+ int status = 1;
+
+ LTDL_SET_PRELOADED_SYMBOLS();
+ if (lt_dlinit() != 0) {
+ fprintf (stderr, "error during initialisation: %s\n", lt_dlerror());
+ return 1;
+ }
+
+ handle = lt_dlopen("module.la");
+ if (!handle) {
+ fprintf (stderr, "error dlopening module.la: %s\n", lt_dlerror());
+ goto finish;
+ }
+
+ func = (char *(*)(void)) lt_dlsym (handle, "hello");
+ if (!func) {
+ fprintf (stderr, "error fetching func: %s\n", lt_dlerror());
+ goto finish;
+ }
+
+ printf ("%s\n", (*func) ());
+ status = 0;
+
+finish:
+ lt_dlexit();
+
+ return status;
+}
+]])
+
+AT_DATA([Makefile],
+[[LIBTOOL = ./libltdl/libtool
+INCLUDES = -I./libltdl
+MODFLAGS = -module -avoid-version
+
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(INCLUDES)
+LTLINK = $(LIBTOOL) --mode=link $(CC) $(CPPFLAGS) $(INCLUDES)
$(LDFLAGS)
+
+TARGETS = libltdl/libltdlc.la module.la ltdldemo
+
+all: $(TARGETS)
+
+$(LIBTOOL) libltdl/libltdlc.la:
+ cd libltdl && ./configure && $(MAKE)
+
+ltdldemo: $(LIBTOOL) module.la libltdl/libltdlc.la main.c
+ $(LTLINK) -o ltdldemo main.c -dlopen module.la ./libltdl/libltdlc.la
+
+module.la: $(LIBTOOL) module.lo
+ $(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null
+
+module.lo: $(LIBTOOL) module.c
+ $(LTCOMPILE) -c module.c
+]])
+
+LT_AT_LIBTOOLIZE([--copy --ltdl])
+${MAKE-make} CC="$CC" CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS"
+
+AT_DATA([expout],
+[[Hello!
+]])
+
+AT_CHECK([./ltdldemo], 0, expout)
+
+AT_CLEANUP
--- /dev/null
+++
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./{arch}/libtool/libtool--gary/libtool--gary--1.0/address@hidden/patch-log/patch-23
@@ -0,0 +1,90 @@
+Revision: libtool--gary--1.0--patch-23
+Archive: address@hidden
+Creator: Gary V. Vaughan <address@hidden>
+Date: Tue Apr 26 13:59:37 BST 2005
+Standard-date: 2005-04-26 12:59:37 GMT
+New-files: tests/.arch-ids/standalone.at.id
+ tests/standalone.at
+New-directories: libltdl/config/.arch-ids
+ libltdl/m4/.arch-ids
+Removed-files: libltdl/.arch-ids/Makefile.am.id
+ libltdl/Makefile.am
+Removed-directories: config/.arch-ids m4/.arch-ids
+Renamed-files: config/.arch-ids/=id libltdl/config/.arch-ids/=id
+ config/.arch-ids/general.m4sh.id libltdl/config/.arch-ids/general.m4sh.id
+ config/.arch-ids/getopt.m4sh.id libltdl/config/.arch-ids/getopt.m4sh.id
+ config/.arch-ids/ltmain.m4sh.id libltdl/config/.arch-ids/ltmain.m4sh.id
+ config/.arch-ids/mailnotify.m4sh.id
libltdl/config/.arch-ids/mailnotify.m4sh.id
+ config/.arch-ids/mkstamp.id libltdl/config/.arch-ids/mkstamp.id
+ m4/.arch-ids/=id libltdl/m4/.arch-ids/=id
+ m4/.arch-ids/argz.m4.id libltdl/m4/.arch-ids/argz.m4.id
+ m4/.arch-ids/libtool.m4.id libltdl/m4/.arch-ids/libtool.m4.id
+ m4/.arch-ids/ltdl.m4.id libltdl/m4/.arch-ids/ltdl.m4.id
+ m4/.arch-ids/ltoptions.m4.id libltdl/m4/.arch-ids/ltoptions.m4.id
+ m4/.arch-ids/ltsugar.m4.id libltdl/m4/.arch-ids/ltsugar.m4.id
+ m4/.arch-ids/ltversion.in.id libltdl/m4/.arch-ids/ltversion.in.id
+ m4/.arch-ids/lt~obsolete.m4.id libltdl/m4/.arch-ids/lt~obsolete.m4.id
+Renamed-directories: config libltdl/config
+ m4 libltdl/m4
+Modified-files: ChangeLog Makefile.am Makefile.maint
+ bootstrap configure.ac libltdl/m4/ltdl.m4 libtoolize.m4sh
+ tests/testsuite.at
+New-patches: address@hidden/libtool--gary--1.0--patch-23
+Summary: support standalone libltdl
+Keywords:
+
+Reorganise the libtool tree to create a bootstrapped libltdl for
+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.
+* 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.
+(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!
- --
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFDCoIEFRMICSmD1gYRAqOPAJ4u5q2hd9gJaw2mhb/nsOPjZkHraACdGKZj
BSbXApcNGMIdWdpAACuOkdM=
=DbxS
-----END PGP SIGNATURE-----
- FYI: support standalone libltdl [libtool--devo--1.0--patch-221],
Gary V. Vaughan <=