AC_CANONICAL_HOST
-MIT_SCHEME_NATIVE_CODE([${enable_native_code}],[${host_cpu}])
+ALL_TARGET=all-native
+INSTALL_COM='$(INSTALL_DATA)'
+INSTALL_LIARC_BUNDLES=
IF_LIARC='#!LIARC: '
IF_SVM='#!SVM: '
+
+MIT_SCHEME_NATIVE_CODE([${enable_native_code}],[${host_cpu}])
case ${mit_scheme_native_code} in
c)
- ALL_TARGET=all-liarc
INSTALL_COM=:
INSTALL_LIARC_BUNDLES=install-liarc-bundles
IF_LIARC=
;;
svm1)
- ALL_TARGET=all-native
- INSTALL_COM='$(INSTALL_DATA)'
- INSTALL_LIARC_BUNDLES=
IF_SVM=
;;
-*)
- ALL_TARGET=all-native
- INSTALL_COM='$(INSTALL_DATA)'
- INSTALL_LIARC_BUNDLES=
- ;;
esac
-AC_MSG_CHECKING([for compiler target])
-IF_SVM_COMPILER='#!SVM compiler: '
-MIT_SCHEME_ARCHITECTURE([${with_compiler_target}])
-case ${mit_scheme_architecture} in
-yes)
- mit_scheme_compiler_target=${mit_scheme_native_code}
- ;;
-*)
- mit_scheme_compiler_target=${mit_scheme_architecture}
- ;;
-esac
-
-case ${mit_scheme_compiler_target} in
-none)
- AC_MSG_RESULT([none])
- ;;
-c)
- AC_MSG_RESULT([yes, using portable C code])
- ;;
-svm1)
- AC_MSG_RESULT([yes, using portable SVM code])
+MIT_SCHEME_COMPILER_TARGET([${with_compiler_target}])
+if test x"${mit_scheme_compiler_target}" = xsvm1; then
IF_SVM_COMPILER=
- ;;
-*)
- AC_MSG_RESULT([yes, for ${mit_scheme_compiler_target}])
- ;;
-esac
+else
+ IF_SVM_COMPILER='#!SVM compiler: '
+fi
AUXDIR_NAME=mit-scheme-${mit_scheme_native_code}
AUXDIR='$(libdir)'/${AUXDIR_NAME}
else
AC_MSG_ERROR([no, unable to use ${MIT_SCHEME_EXE}])
fi
+ # To get some version numbers into the build log:
+ ${MIT_SCHEME_EXE} --version
else
AC_MSG_CHECKING([for an existing MIT/GNU Scheme installation])
# Kinda hairy logic to detect this: (1) Use MIT_SCHEME_EXE, and
])
AC_OUTPUT
-if test x"${mit_scheme_native_code}" = xc; then
+if test x"${mit_scheme_compiler_target}" = xc; then
BN=liarc-cc
(cd lib; rm -f ${BN}; ${LN_S} ../microcode/${BN} .)
BN=liarc-ld
(cd lib; rm -f ${BN}; ${LN_S} ../microcode/${BN} .)
+fi
+
+if test x"${mit_scheme_native_code}" = xc; then
for BN in star-parser; do
(cd lib; rm -f ${BN}; ${LN_S} ../${BN} .)
done
+ mkdir lib/lib
for BUNDLE in 6001 compiler cref ffi sf sos ssp star-parser \
xdoc xml; do
SO=${BUNDLE}.so
esac
])
+# MIT_SCHEME_COMPILER_TARGET(SPEC)
+# --------------------------------
+AC_DEFUN([MIT_SCHEME_COMPILER_TARGET],[
+_mit_scheme_compiler_target_spec=$1
+
+AC_MSG_CHECKING([for compiler target])
+MIT_SCHEME_ARCHITECTURE([${with_compiler_target}])
+
+case ${mit_scheme_architecture} in
+yes)
+ mit_scheme_compiler_target=${mit_scheme_native_code}
+ ;;
+*)
+ mit_scheme_compiler_target=${mit_scheme_architecture}
+ ;;
+esac
+
+case ${mit_scheme_compiler_target} in
+none)
+ AC_MSG_RESULT([none])
+ ;;
+c)
+ AC_MSG_RESULT([yes, using portable C code])
+ ;;
+svm1)
+ AC_MSG_RESULT([yes, using portable SVM code])
+ ;;
+*)
+ AC_MSG_RESULT([yes, for ${mit_scheme_compiler_target}])
+ ;;
+esac
+])
# MIT_SCHEME_ARCHITECTURE(SPEC)
# -----------------------------
[Support native compiled code if available [[yes]]]))
: ${enable_native_code='yes'}
+AC_ARG_WITH([compiler-target],
+ AS_HELP_STRING([--with-compiler-target],
+ [Compiler target architecture [[same as native code]]]))
+: ${with_compiler_target=yes}
+
AC_ARG_WITH([termcap],
AS_HELP_STRING([--with-termcap],
[Use a termcap library if available [[yes]]]))
CCLD=${CC}
MIT_SCHEME_NATIVE_CODE([${enable_native_code}],[${host_cpu}])
+MIT_SCHEME_COMPILER_TARGET([${with_compiler_target}])
AUXDIR_NAME=mit-scheme-${mit_scheme_native_code}
EXE_NAME=mit-scheme-${mit_scheme_native_code}
;;
c)
AC_CONFIG_LINKS([cmpauxmd.c:cmpauxmd/c.c])
- AC_CONFIG_FILES([liarc-cc], [chmod +x liarc-cc])
- AC_CONFIG_FILES([liarc-ld], [chmod +x liarc-ld])
OPTIONAL_BASES="${OPTIONAL_BASES} cmpauxmd unstackify compinit"
LIARC_VARS=liarc-vars
LIARC_RULES=liarc-rules
;;
esac
+if test x"${mit_scheme_compiler_target}" = xc; then
+ AC_CONFIG_FILES([liarc-cc], [chmod +x liarc-cc])
+ AC_CONFIG_FILES([liarc-ld], [chmod +x liarc-ld])
+fi
+
AC_CONFIG_LINKS([
cmpintmd.h:cmpintmd/${mit_scheme_native_code}.h
cmpintmd.c:cmpintmd/${mit_scheme_native_code}.c