Some luser might run `./configure M4=/usr/frobblethorpe/bin/m4'.
This requires makegen/m4.sh to accept the m4 program as an argument.
(Don't try to pass any extra arguments to the m4 program that way...)
;;
*)
AC_CHECK_PROG([M4], [m4], [m4])
- if test "x${M4}" != xm4; then
+ if test "x${M4}" = x; then
AC_MSG_ERROR([m4 not found])
fi
AC_CONFIG_LINKS([cmpauxmd.m4:cmpauxmd/${mit_scheme_native_code}.m4])
AC_SUBST([AS_FLAGS])
AC_SUBST([GC_HEAD_FILES])
AC_SUBST([M4_FLAGS])
+AC_SUBST([M4])
AC_SUBST([OPTIONAL_SOURCES])
AC_SUBST([OPTIONAL_OBJECTS])
AC_SUBST([PRBFISH_LIBS])
CC = @CC@
CCLD = @CCLD@
-M4 = $(srcdir)/makegen/m4.sh
+M4 = $(srcdir)/makegen/m4.sh @M4@
AS = as
TAR = tar
GZIP_ENV = --best
set -e
+if [ $# -le 1 ]; then
+ printf 'Usage: %s m4 <file/definition> ...\n' >&2
+ exit 1
+fi
+
+M4="${1}"
+shift
+
TMP_FILE="m4.tmp"
clean ()
run_m4 ()
{
- m4 && clean
+ ${M4} && clean
}
trap clean EXIT INT QUIT TERM