necessary.
* Makefile.am (libtool): Reworked rule for regeneration of libtool,
now that it is built entirely withing config.status.
(libtoolize): Tidied for orthogonality with the other generation
rules.
(ltconfig): This is now generated by AC_PROG_LIBTOOL, called from
make by running config.status --recheck.
(ltmain.sh): Moved primary generation of this file into here...
* configure.in (AC_OUTPUT): ...instead of here.
* libtool.m4 (AC_OUTPUT_COMMANDS): Write the config to ltconfig
where it can be reused, rather than directly to libtool.
* demo/configure.in: libtool is no longer present immediately
after AC_LIBTOOL_M4 has completed, so the tests now grep through
ltconfig instead -- which *will* be present.
+2000-09-17 Gary V. Vaughan <gvv@techie.com>
+
+ * bootstrap: Backed out yesterdays patch which is no longer
+ necessary.
+ * Makefile.am (libtool): Reworked rule for regeneration of libtool,
+ now that it is built entirely withing config.status.
+ (libtoolize): Tidied for orthogonality with the other generation
+ rules.
+ (ltconfig): This is now generated by AC_PROG_LIBTOOL, called from
+ make by running config.status --recheck.
+ (ltmain.sh): Moved primary generation of this file into here...
+ * configure.in (AC_OUTPUT): ...instead of here.
+ * libtool.m4 (AC_OUTPUT_COMMANDS): Write the config to ltconfig
+ where it can be reused, rather than directly to libtool.
+ * demo/configure.in: libtool is no longer present immediately
+ after AC_LIBTOOL_M4 has completed, so the tests now grep through
+ ltconfig instead -- which *will* be present.
+
2000-09-16 Gary V. Vaughan <gvv@techie.com>
* TODO: Removed the item describing the change below, and added a
# The standalone libtool script, and the libtool distributor.
bin_SCRIPTS = libtool libtoolize
-libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
- CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status
- chmod +x libtoolize
-
-libtool: $(srcdir)/ltmain.sh $(top_builddir)/configure
- $(top_builddir)/configure --no-recursion
+libtool: ltconfig ltmain.sh $(top_builddir)/configure
+ CONFIG_OTHER=$@ CONFIG_FILES= CONFIG_HEADERS= \
+ $(SHELL) $(top_builddir)/config.status
+ chmod +x $@
-@srcdir@/ltmain.sh: $(TSDEPS)
+libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status
+ CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) $(top_builddir)/config.status
+ chmod +x $@
+
+ltconfig: $(top_srcdir)/configure.in
+ $(top_builddir)/config.status --recheck
+
+$(srcdir)/ltmain.sh: $(TSDEPS)
+ -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
+ mv -f ltmain.shT $@ || \
+ (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT)
# TSDEPS will be defined to TSDEPS_DIST at `make dist' time
TSDEPS =
touch libtoolize
aclocal
automake --gnu --add-missing --copy
-sed 's/ ltconfig//' < $file > ${file}T && mv ${file}T $file || rm -f ${file}T
autoconf
for sub in libltdl demo depdemo mdemo cdemo; do
aclocal
test "$sub" = libltdl && autoheader
automake --gnits --add-missing
- sed 's/ ltconfig//' < $file > ${file}T && mv ${file}T $file || rm -f ${file}T
autoconf
cd ..
done
AC_SUBST(ACINCLUDE_M4_LIST)
AC_SUBST(DIST_MAKEFILE_LIST)
-AC_OUTPUT([Makefile doc/Makefile tests/Makefile \
- $ac_aux_dir/ltmain.sh:ltmain.in])
+AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
-if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
+if grep '^build_old_libs=yes$' ./ltconfig > /dev/null 2>&1; then
STATIC=-static
else
STATIC=
AC_SUBST(STATIC)
AM_CONDITIONAL(BINARY_HELLDL, [dnl
-grep '^global_symbol_pipe=..*$' ./libtool >/dev/null])
+grep '^global_symbol_pipe=..*$' ./ltconfig >/dev/null])
AC_CHECK_HEADERS(string.h math.h)
rm="rm -f"
# Global variables:
-default_ofile=libtool
+default_ofile=ltconfig
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except M$VC,
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values, take copies of the
# variables and quote the copies for generation of the libtool script.
+
for var in echo old_CC old_CFLAGS \
AR AR_FLAGS CC LD LN_S NM SHELL \
reload_flag reload_cmds wl \
done
trap "$rm \"$ofile\"; exit 1" 1 2 15
-$rm "$ofile"
+$rm -f "$ofile"
+echo creating $ofile
cat <<__EOF__ > "$ofile"
#! $SHELL
;;
esac
-# Set this here so that when configure calls config.status, the
-# libtool script is generated. The CONFIG_OTHER requirement is to
-# prevent automake rules (for the generation of libtoolize etc.)
-# from appending another copy of ltmain.sh to libtool.
-CONFIG_OTHER=${CONFIG_OTHER-libtool}
+# This is necessary.
+CONFIG_OTHER=libtool
export CONFIG_OTHER
AC_OUTPUT_COMMANDS([
- case "$CONFIG_OTHER" in
- *libtool*)
- trap "$rm \"$ofile\"; exit 1" 1 2 15
- echo "creating $ofile"
-
- # Append the ltmain.sh script.
- sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
-
- chmod +x "$ofile"
+ case " $CONFIG_OTHER " in
+ *" $libtool "*)
+ if test -f Makefile; then
+
+ # The second clause should only fire when bootstrapping the
+ # libtool distribution, otherwise you forgot to ship ltmain.sh
+ # with your package, and you will get complaints that there are
+ # no rules to generate ltmain.sh.
+ test -f "$ltmain" || make "$ltmain"
+
+ trap "$rm \"$libtool\"; exit 1" 1 2 15
+ rm -f "$libtool"
+ echo "creating $libtool"
+
+ # Copy the configuration from ltconfig
+ sed '$q' "$ofile" > "$libtool" || (rm -f "$libtool"; exit 1)
+
+ # Append the ltmain.sh script.
+ sed '$q' "$ltmain" >> libtool || (rm -f "$libtool"; exit 1)
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+
+ chmod +x "$libtool"
+ fi
;;
esac
], [
ofile="$ofile"
+libtool=libtool
ltmain="$ltmain"
])
##