2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
+ Get --enable-gcc-warnings to work after touching configure.ac.
+ Preserve ACLOCAL_PATH in later builds, so that by default it has
+ the same value as it did in the first build after initial checkout.
+ * Makefile.in (ACLOCAL_PATH): New macro.
+ ($(srcdir)/aclocal.m4): Use it.
+ * configure.ac (ACLOCAL_PATH): AC_SUBST it.
+ * autogen.sh (env_space): New var.
+ Tell user what variables, if any, to pass to 'configure'.
+
Get --enable-gcc-warnings working again.
The recent changes to configure.ac removed the transliteration of
-I to -isystem in CFLAGS, which is needed for --enable-gcc-warnings.
$(srcdir)/configure: $(AUTOCONF_INPUTS)
cd ${srcdir} && autoconf
+ACLOCAL_PATH = @ACLOCAL_PATH@
ACLOCAL_INPUTS = $(srcdir)/configure.ac $(srcdir)/m4/gnulib-comp.m4
$(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
- cd $(srcdir) && aclocal -I m4
+ cd $(srcdir) && ACLOCAL_PATH='$(ACLOCAL_PATH)' aclocal -I m4
AUTOMAKE_INPUTS = $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am \
$(srcdir)/lib/gnulib.mk
# find the pkg.m4 that is installed in the standard location.
echo "Checking for pkg.m4..."
AUTORECONF_ENV=
+env_space=
ac_dir=`aclocal --print-ac-dir` && test -r "$ac_dir/pkg.m4" || {
oIFS=$IFS
IFS=:
?*) ACLOCAL_PATH=$ACLOCAL_PATH:$ac_dir;;
esac
export ACLOCAL_PATH
- AUTORECONF_ENV="ACLOCAL_PATH='$ACLOCAL_PATH' "
+ AUTORECONF_ENV="ACLOCAL_PATH='$ACLOCAL_PATH'"
+ env_space=' '
break
fi
fi
echo ok
echo 'Your system has the required tools.'
-echo "Running \"${AUTORECONF_ENV}autoreconf -fi -I m4\" ..."
+echo "Running \"$AUTORECONF_ENV${env_space}autoreconf -fi -I m4\" ..."
## Let autoreconf figure out what, if anything, needs doing.
## cause 'make' to needlessly run 'autoheader'.
echo timestamp > src/stamp-h.in || exit
-echo "You can now run \`./configure'."
+echo "You can now run \`./configure$env_space$AUTORECONF_ENV'."
exit 0
dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html
OPTION_DEFAULT_ON([makeinfo],[don't require makeinfo for building manuals])
+## This might be a 'configure' arg, e.g., autogen.sh might set it.
+AC_SUBST([ACLOCAL_PATH])
+
## Makefile.in needs the cache file name.
AC_SUBST(cache_file)