diff --git a/ChangeLog b/ChangeLog index 4c8da3ca..4d3bf0ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1999-01-18 Alexandre Oliva + * 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 diff --git a/doc/libtool.texi b/doc/libtool.texi index 6d008f74..1be7d068 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -1607,6 +1607,27 @@ similarly, but it uses @samp{--enable-static} and 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 diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am index af310238..110d5d01 100644 --- a/libltdl/Makefile.am +++ b/libltdl/Makefile.am @@ -24,3 +24,6 @@ libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = $(libltdl_la_SOURCES) libltdlc_la_LDFLAGS = libltdlc_la_LIBADD = $(libltdl_la_LIBADD) + +libtool: $(LIBTOOL_DEPS) + ./config.status --recheck diff --git a/libltdl/configure.in b/libltdl/configure.in index 6810d333..b792492d 100644 --- a/libltdl/configure.in +++ b/libltdl/configure.in @@ -20,6 +20,7 @@ AC_SUBST(NOINSTLIBS) 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 diff --git a/libtool.m4 b/libtool.m4 index a69daea4..a5584bd8 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -108,6 +108,9 @@ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $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