1999-01-18 Alexandre Oliva <oliva@dcc.unicamp.br>
+ * libtool.m4 (LIBTOOL_DEPS): set it
+ * libltdl/configure.in (LIBTOOL_DEPS): AC_SUBST it
+ * libltdl/Makefile.am (libtool): use it
+ * doc/libtool.texi (AM_PROG_LIBTOOL): document it
+
* Makefile.am (libltdl.tar.gz): don't create it as part of the
build, since it is likely to become stale if we do
(install-data-hook): create and install libltdl.tar.gz, without
The package name @samp{default} matches any packages which have not set
their name in the @code{PACKAGE} environment variable.
+
+This macro also sets the shell variable @var{LIBTOOL_DEPS}, that you can
+use to automatically update the libtool script if it becomes
+out-of-date. In order to do that, add to your @file{configure.in}:
+
+@example
+AM_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
+@end example
+
+and, to @file{Makefile.in} or @file{Makefile.am}:
+
+@example
+LIBTOOL_DEPS = @@LIBTOOL_DEPS@@
+libtool: $(LIBTOOL_DEPS)
+ ./config.status --recheck
+@end example
+
+If you are using GNU automake, you can omit the assignment, as automake
+will take care of it.
+
@end defmac
@defmac AM_DISABLE_SHARED
libltdlc_la_SOURCES = $(libltdl_la_SOURCES)
libltdlc_la_LDFLAGS =
libltdlc_la_LIBADD = $(libltdl_la_LIBADD)
+
+libtool: $(LIBTOOL_DEPS)
+ ./config.status --recheck
AC_PROG_CC
AM_PROG_LIBTOOL
+AC_SUBST(LIBTOOL_DEPS)
AC_CACHE_CHECK([which variable specifies run-time library path],
libltdl_cv_shlibpath_var, [dnl
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log