+2004-10-27 James Henstridge <james@jamesh.id.au>
+
+ * gnome-autogen.sh (ACLOCAL): if AC_CONFIG_MACRO_DIR() is used in
+ configure.ac, pass that directory to aclocal.
+ Run libtoolize if the configure.ac file calls LT_INIT (the new
+ name for AC_PROG_LIBTOOL in libtool-2.0).
+
2004-08-16 Kjartan Maraas <kmaraas@gnome.org>
* gnome-autogen.sh: Add some foo to handle automake-1.9.x too.
configure_files="`find $srcdir -name '{arch}' -prune -o -name configure.ac -print -o -name configure.in -print`"
for configure_ac in $configure_files; do
- if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null; then
+ if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null || \
+ grep "^LT_INIT" $configure_ac >/dev/null; then
want_libtool=true
fi
if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then
# details.
# programs that might install new macros get run before aclocal
- if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null; then
+ if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null || \
+ grep "^LT_INIT" $basename >/dev/null; then
printbold "Running $LIBTOOLIZE..."
$LIBTOOLIZE --force || exit 1
fi
fi
# Now run aclocal to pull in any additional macros needed
- aclocalinclude="$ACLOCAL_FLAGS"
+
+ # if the AC_CONFIG_MACRO_DIR() macro is used, pass that
+ # directory to aclocal.
+ m4dir=`cat "$configure_ac" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
+ if [ -n "$m4dir" ]; then
+ m4dir="-I $m4dir"
+ fi
printbold "Running $ACLOCAL..."
- $ACLOCAL $aclocalinclude || exit 1
+ $ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1
if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
printerr "*** obsolete gnome macros were used in $configure_ac"