-if test x`ls -1t acinclude.m4 2>/dev/null \
- config/gnulib.m4i config/acinclude.m4i config/libtool.m4i |
- sed 1q` != x"acinclude.m4"; then
- rm -f acinclude.m4
- # keep libtool.m4i first here, as it has a "serial number" comment that it wants
- # first in the file
- cat config/libtool.m4i config/gnulib.m4i config/acinclude.m4i > acinclude.m4
-fi
+ echo "## this file is automatically generated by autogen" > "automake/file-list"
+ for f in automake/*.am; do echo "EXTRA_DIST += $f" >> "automake/file-list"; done
+)
+
+echo "..aclocal"
+aclocal $includes || die "aclocal failed"
+
+echo "...aclocal patches"
+# See http://bugzilla.gnome.org/show_bug.cgi?id=418778
+#
+# The Glib developers are a bit over-eager in their version requirements, requiring
+# an unnecessarily high verison of pkg-config at configure time, when they really
+# only need it at autogen time. This patch resets the version number in the file
+# just generated by aclocal to the version we've been requiring all along.
+sed --in-place -e \
+ 's/PKG_PROG_PKG_CONFIG(\[0\.16\])/PKG_PROG_PKG_CONFIG([0.7])/g' \
+ aclocal.m4
+
+echo "..autoconf"
+autoconf || die "autoconf failed"
+
+echo "..autoheader"
+autoheader || die "autoheader failed"
+touch config/config.h.in