From: Chris Hanson Date: Sat, 20 Oct 2018 03:21:29 +0000 (-0700) Subject: Implement MIT_SCHEME_COMPILER_TARGET for TL and microcode configuration. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~203 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=61944d61b5b89d9280997628c37a0fa996f33cb9;p=mit-scheme.git Implement MIT_SCHEME_COMPILER_TARGET for TL and microcode configuration. --- diff --git a/src/configure.ac b/src/configure.ac index 2022e2888..977530f59 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -89,56 +89,30 @@ AC_ARG_WITH([scheme-build], 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} @@ -173,6 +147,8 @@ if test x"${with_scheme_build}" != xdefault; then 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 @@ -278,14 +254,18 @@ xml/Makefile ]) 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 diff --git a/src/microcode/aclocal.m4 b/src/microcode/aclocal.m4 index 4113994d8..990eacd72 100644 --- a/src/microcode/aclocal.m4 +++ b/src/microcode/aclocal.m4 @@ -54,6 +54,38 @@ svm1) 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) # ----------------------------- diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index 738e08476..337c9ea96 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -130,6 +130,11 @@ AC_ARG_ENABLE([native-code], [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]]])) @@ -235,6 +240,7 @@ fi 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} @@ -819,8 +825,6 @@ none) ;; 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 @@ -841,6 +845,11 @@ svm1) ;; 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