Also kludge up a fix to etc/run-three-stages.
exit 1
fi
+choose_arch ()
+{
+ sh src/microcode/choose-arch.sh "${@}"
+}
+
+host_cpu="$(sh src/config.guess | awk -F- '{ print $1 }')"
+
+if [ $# -eq 1 ]; then
+ enable_native_code="${1}"
+else
+ enable_native_code=yes
+fi
+
+printf 'Enabling native code: %s\n' "${enable_native_code}"
+SCM_ARCH="$(choose_arch "${enable_native_code}" "${host_cpu}")"
+
# Hack for cph
if which cpx > /dev/null; then
: ${COPY:="cpx -sq"}
find_dist_stage ()
{
local STAGE=$(pwd)/${1}
- if [[ -x ${STAGE}/bin/scheme && -f ${STAGE}/lib/mit-scheme/all.com ]]; then
+ if [[ -x ${STAGE}/bin/mit-scheme-${SCM_ARCH} \
+ && -f ${STAGE}/lib/mit-scheme-${SCM_ARCH}/all.com ]]; then
echo "${STAGE}/bin/scheme --library ${STAGE}/lib/mit-scheme"
return 0
else
INSTALLED_SUBDIRS = microcode runtime $(LIARC_BUNDLES)
MIT_SCHEME_EXE = @MIT_SCHEME_EXE@
+EXE_NAME = @EXE_NAME@
AUXDIR_NAME = @AUXDIR_NAME@
AUXDIR = @AUXDIR@
EDDIR = $(AUXDIR)/edwin
echo "done" > $@
stamp_native-compile-scheme: compile-microcode
- @$(top_srcdir)/etc/compile.sh boot-root/bin/$(MIT_SCHEME_EXE) \
+ @$(top_srcdir)/etc/compile.sh boot-root/bin/$(EXE_NAME) \
--library boot-root/lib/$(AUXDIR_NAME) --band boot-compiler.com
echo "done" > $@
name or pathname of the MIT/GNU Scheme executable, which is usually
\`mit-scheme' or \`/usr/local/bin/mit-scheme', and set the environment
variable MITSCHEME_LIBRARY_PATH to the pathname of the MIT/GNU Scheme
-library directory, which is usually \`/usr/local/lib/mit-scheme'.
+library directory, which is usually \`/usr/local/lib/mit-scheme-ARCH',
+where ARCH is the compiled code architecture, such as \`c', \`i386',
+etc.
EOF
exit 1
fi
INSTALL_LIARC_BUNDLES=
;;
esac
+EXE_NAME=mit-scheme-${SCM_ARCH}
AUXDIR_NAME=mit-scheme-${SCM_ARCH}
AUXDIR='$(libdir)'/${AUXDIR_NAME}
: ${MIT_SCHEME_EXE:=mit-scheme-${SCM_ARCH}}
if test x"${enable_host_scheme_test}" = xyes; then
AC_MSG_CHECKING([for an existing MIT/GNU Scheme installation])
- if "${MIT_SCHEME_EXE}" --batch-mode --eval '(%exit)' >/dev/null 2>&1; then
+ if ${MIT_SCHEME_EXE} --batch-mode --eval '(%exit)' >/dev/null 2>&1; then
:
elif mit-scheme-native --batch-mode --eval '(%exit)' >/dev/null 2>&1; then
- MIT_SCHEME_EXE=mit-scheme
+ MIT_SCHEME_EXE=mit-scheme-native
else
AC_MSG_ERROR([
This script needs an existing MIT/GNU Scheme installation to function.
name or pathname of the MIT/GNU Scheme executable, which is usually
\`mit-scheme' or \`/usr/local/bin/mit-scheme', and set the environment
variable MITSCHEME_LIBRARY_PATH to the pathname of the MIT/GNU Scheme
-library directory, which is usually \`/usr/local/lib/mit-scheme'.
+library directory, which is usually \`/usr/local/lib/mit-scheme-${SCM_ARCH}'.
])
fi
AC_MSG_RESULT([yes])
AC_SUBST([INSTALL_COM])
AC_SUBST([INSTALL_LIARC_BUNDLES])
AC_SUBST([MIT_SCHEME_EXE])
+AC_SUBST([EXE_NAME])
AC_SUBST([AUXDIR_NAME])
AC_SUBST([AUXDIR])