* libltdl/ltdl.m4: that no longer exists.
* configure.in (ACINCLUDE_M4_LIST): Removed libltdl/acinclude.m4.
* Makefile.am (aclocal_macros): Added ltdl.m4.
(libltdl/acinclude.m4): Concatenate libtool.m4 and ltdl.m4.
* bootstrap: Likewise.
* libltdl/Makefile.am (ACLOCAL): Remove the definition. Relying
upon -I may lead to duplicates.
* doc/libtool.texi: Suggest appending ltdl.m4 to acinclude.m4.
* libtoolize.in: Check AC_LIB_LTDL version number in aclocal.m4.
1999-12-16 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+ * ltdl.m4: Renamed from...
+ * libltdl/ltdl.m4: that no longer exists.
+ * configure.in (ACINCLUDE_M4_LIST): Removed libltdl/acinclude.m4.
+ * Makefile.am (aclocal_macros): Added ltdl.m4.
+ (libltdl/acinclude.m4): Concatenate libtool.m4 and ltdl.m4.
+ * bootstrap: Likewise.
+ * libltdl/Makefile.am (ACLOCAL): Remove the definition. Relying
+ upon -I may lead to duplicates.
+ * doc/libtool.texi: Suggest appending ltdl.m4 to acinclude.m4.
+ * libtoolize.in: Check AC_LIB_LTDL version number in aclocal.m4.
+
* libltdl/configure.in (with_auxdir): Do not use it as the
argument of AC_CONFIG_AUX_DIR, automake requires a literal here.
Use AC_CONFIG_AUX_DIRS/DIR_DEFAULT instead.
LDFLAGS = @LDFLAGS@
LIBS= @LIBS@
-aclocal_macros = libtool.m4
+aclocal_macros = libtool.m4 ltdl.m4
EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \
mkstamp ChangeLog.0
(rm -f $@ && cp ltconfig.T $@ && rm -f ltconfig.T)
@srcdir@/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS)
- rm -f ltmain.shT
+ -rm -f ltmain.shT
date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \
sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \
-e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT
(rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT)
# All our rules should depend on these demo files.
-all-recursive: $(ACINCLUDE_M4_LIST)
+all-recursive: $(srcdir)/libltdl/acinclude.m4 $(ACINCLUDE_M4_LIST)
+
+@srcdir@/libltdl/acinclude.m4: $(srcdir)/libtool.m4 $(srcdir)/ltdl.m4
+ -rm -f $@ $@T
+ cat $(srcdir)/libtool.m4 $(srcdir)/ltdl.m4 > $@T
+ mv $@T $@
@ACINCLUDE_M4_LIST@: $(srcdir)/libtool.m4
- rm -f $@
- cp $(srcdir)/libtool.m4 $@
+ -rm -f $@ $@T
+ cat $(srcdir)/libtool.m4 > $@T
+ mv $@T $@
.PHONY: configure-subdirs
configure-subdirs distdir: $(DIST_MAKEFILE_LIST)
automake --gnu --add-missing
autoconf
-for sub in demo depdemo libltdl mdemo cdemo; do
+for sub in libltdl demo depdemo mdemo cdemo; do
cd $sub
rm -f acinclude.m4
- cp ../libtool.m4 acinclude.m4
- aclocal -I .
+ cat ../libtool.m4 > acinclude.m4
+ case "$sub" in libltdl) cat ../ltdl.m4 >> acinclude.m4 ;; esac
+ aclocal
test "$sub" = libltdl && autoheader
automake --gnits --add-missing
autoconf
CONF_SUBDIRS="cdemo demo depdemo mdemo"
AC_SUBST(CONF_SUBDIRS)
-ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4 ${srcdir}/libltdl/acinclude.m4 "
+ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4"
DIST_MAKEFILE_LIST=
for dir in $CONF_SUBDIRS; do
- ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST${srcdir}/$dir/acinclude.m4 "
+ ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST ${srcdir}/$dir/acinclude.m4"
DIST_MAKEFILE_LIST="$DIST_MAKEFILE_LIST$dir/Makefile "
done
AC_SUBST(ACINCLUDE_M4_LIST)
a convenience library or an installable libtool library.
The most simplistic way to add @code{ltdl} to your package is to copy
-the source files, @file{ltdl.c} and @file{ltdl.h}, to a source
-directory withing your package and to build and link them along with
-the rest of your sources. To help you do this, the m4 macros for
-autoconf are available in @file{ltdl.m4}. You must ensure that they
-are available in @file{aclocal.m4} before you run autoconf -- either
-by copying @file{ltdl.m4} to the macro directory of your package (if
-you have one) before running aclocal, or else @code{cat}ting its contents
-directly to the end of @file{aclocal.m4} if you are not using automake.
-Having made the macros available, you must add a call to the
-@samp{AC_LIB_LTDL} macro to your package's @file{configure.in} to perform
-the configure time checks required to build @file{ltdl.o} correctly.
-This method has problems if you then try to link the package binaries
-with an installed libltdl, or a library which depends on libltdl, which
-will cause problems with multiple symbol definitions.
+the source files, @file{ltdl.c} and @file{ltdl.h}, to a source directory
+withing your package and to build and link them along with the rest of
+your sources. To help you do this, the m4 macros for autoconf are
+available in @file{ltdl.m4}. You must ensure that they are available in
+@file{aclocal.m4} before you run autoconf -- by appending the contents
+of @file{ltdl.m4} to @file{acinclude.m4}, if you are using automake, or
+to @file{aclocal.m4} if you are not. Having made the macros available,
+you must add a call to the @samp{AC_LIB_LTDL} macro to your package's
+@file{configure.in} to perform the configure time checks required to
+build @file{ltdl.o} correctly. This method has problems if you then try
+to link the package binaries with an installed libltdl, or a library
+which depends on libltdl: you may have problems with duplicate symbol
+definitions.
One advantage of the convenience library is that it is not installed, so
the fact that you use libltdl will not be apparent to the user, and it
AUTOMAKE_OPTIONS = no-dependencies foreign
-## for ltdl.m4
-ACLOCAL = @ACLOCAL@ -I .
-
if INSTALL_LTDL
include_HEADERS = ltdl.h
lib_LTLIBRARIES = libltdl.la
aclocaldir=@aclocaldir@
libtool_m4="$aclocaldir/libtool.m4"
+ltdl_m4="$aclocaldir/ltdl.m4"
dry_run=no
help="Try \`$progname --help' for more information."
else
echo "You should $updatemsg."
fi
+
+ if grep '^AC_LIB_LTDL' configure.in >/dev/null 2>&1; then
+ if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then
+ updatemsg="update your \`aclocal.m4' by running aclocal"
+ else
+ updatemsg="add the contents of \`$ltdl_m4' to \`aclocal.m4'"
+ fi
+
+ if egrep '^AC_DEFUN\(AC_LIB_LTDL' aclocal.m4 >/dev/null 2>&1; then
+ # Check the version number on ltdl.m4 and the one used in aclocal.m4.
+ instserial=`grep '^# serial ' $ltdl_m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`
+
+ if test -z "$instserial"; then
+ echo "$progname: warning: no serial number on \`$ltdl_m4'" 1>&2
+ else
+ # If the local macro has no serial number, we assume it's ancient.
+ localserial=`grep '^# serial ' aclocal.m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`
+
+ test -z "$localserial" && localserial=0
+
+ if test "$localserial" -lt "$instserial"; then
+ echo "You should $updatemsg."
+ elif test "$localserial" -gt "$instserial"; then
+ echo "$progname: \`$ltld_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2
+ if test -z "$force"; then
+ echo "Use \`--force' to replace newer libtool files with this version." 1>&2
+ exit 1
+ fi
+ echo "To remain compatible, you should $updatemsg."
+ fi
+ fi
+ else
+ echo "You should $updatemsg."
+ fi
+ fi
fi