From: Chris Hanson Date: Tue, 30 Oct 2018 04:30:33 +0000 (-0700) Subject: Don't assume that it's possible to run MIT_SCHEME_EXE during configuration. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~126^2~2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=959de5c90b6c254f0b40c612981900a7b19a4316;p=mit-scheme.git Don't assume that it's possible to run MIT_SCHEME_EXE during configuration. This won't work with a native distribution, since there may not be a working scheme on the host. Instead use other ways to do the necessary work. --- diff --git a/src/blowfish/configure.ac b/src/blowfish/configure.ac index 51ff03ecf..1d818e79b 100644 --- a/src/blowfish/configure.ac +++ b/src/blowfish/configure.ac @@ -124,30 +124,35 @@ fi MIT_SCHEME_PROJECT=mit-scheme : ${MIT_SCHEME_EXE=mit-scheme} -default_libdir=`( echo "(display (->namestring" ;\ - echo " (system-library-directory-pathname)))" ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_LIBDIR=${default_libdir}} -default_includedir=`( echo "(display (->namestring" ;\ - echo " (directory-pathname" ;\ - echo " (system-library-pathname" ;\ - echo ' "mit-scheme.h"))))' ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_INCLUDEDIR=${default_includedir}} - -cc_type=`echo "(display microcode-id/compiled-code-type)" \ - | ${MIT_SCHEME_EXE} --batch-mode` -os_suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` - -MIT_SCHEME_PKD="blowfish-${os_suffix}.pkd" +if test x"${MIT_SCHEME_LIBDIR}" = x; then + MIT_SCHEME_LIBDIR=`( echo "(display (->namestring" ;\ + echo " (system-library-directory-pathname)))" ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_INCLUDEDIR}" = x; then + MIT_SCHEME_INCLUDEDIR=`( echo "(display (->namestring" ;\ + echo " (directory-pathname" ;\ + echo " (system-library-pathname" ;\ + echo ' "mit-scheme.h"))))' ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_OS_SUFFIX}" = x; then + MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_CC_TYPE}" = x; then + MIT_SCHEME_CC_TYPE=`echo "(display microcode-id/compiled-code-type)" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi + +MIT_SCHEME_PKD="blowfish-${MIT_SCHEME_OS_SUFFIX}.pkd" for f in blowfish; do MIT_SCHEME_SCMs="${MIT_SCHEME_SCMs} ${f}.scm" MIT_SCHEME_BCIs="${MIT_SCHEME_BCIs} ${f}.bci" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} ${f}.bci: stamp-scheme" - if test "$cc_type" = "c"; then + if test x"${MIT_SCHEME_CC_TYPE}" = xc; then MIT_SCHEME_COMs="${MIT_SCHEME_COMs} ${f}.so" MIT_SCHEME_CLEAN="${MIT_SCHEME_CLEAN} ${f}.c" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} diff --git a/src/configure.ac b/src/configure.ac index 0d5c9fd73..2a395fd4c 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -162,6 +162,8 @@ AUXDIR_NAME=mit-scheme-${mit_scheme_native_code} AUXDIR='$(libdir)'/${AUXDIR_NAME} MIT_SCHEME_LIBDIR=${AUXDIR}/ MIT_SCHEME_INCLUDEDIR=${AUXDIR}/ +MIT_SCHEME_OS_SUFFIX=unx +MIT_SCHEME_CC_TYPE=${mit_scheme_native_code} # Please keep the following messages synchronized with the messages in # these files: @@ -217,7 +219,7 @@ else found_p=yes fi elif "${native_exe}" --batch-mode --no-init-file --eval '(%exit)' >/dev/null 2>&1; then - MIT_SCHEME_EXE="${native_exe}" + MIT_SCHEME_EXE=${native_exe} found_p=yes elif mit-scheme --batch-mode --no-init-file --eval '(%exit)' >/dev/null 2>&1; then MIT_SCHEME_EXE=mit-scheme @@ -225,8 +227,10 @@ else fi if test x"${found_p}" = xyes; then AC_MSG_RESULT([yes, using ${MIT_SCHEME_EXE}]) - # To get some version numbers into the build log: - ${MIT_SCHEME_EXE} --version --no-init-file + if test x"${enable_host_scheme_test}" != xno; then + # To get some version numbers into the build log: + ${MIT_SCHEME_EXE} --version --no-init-file + fi else message= if test x"${env_p}" = xyes; then @@ -254,10 +258,11 @@ directory, which is usually \`/usr/local/lib/mit-scheme-${mit_scheme_native_code fi # A 32bit host running LIAR/svm needs a large heap. -small_words='(= 4 (vector-ref (gc-space-status) 0))' -if test x"${mit_scheme_native_code}" = xsvm1 \ - && ${MIT_SCHEME_EXE} --no-init-file --eval "(%exit (if ${small_words} 0 1))" >/dev/null; then \ - HOST_COMPILER_HEAP="--heap 10000" +if test x"${mit_scheme_native_code}" = xsvm1; then + AC_CHECK_SIZEOF([unsigned long]) + if test ${ac_cv_sizeof_unsigned_long} -eq 4; then + HOST_COMPILER_HEAP="--heap 10000" + fi fi if test x"${enable_x11}" = x && test x"${enable_default_plugins}" = xyes; then @@ -383,6 +388,8 @@ compiler/configure "${mit_scheme_compiler_target}" || exit $? export MIT_SCHEME_EXE export MIT_SCHEME_LIBDIR export MIT_SCHEME_INCLUDEDIR +export MIT_SCHEME_OS_SUFFIX +export MIT_SCHEME_CC_TYPE AC_CONFIG_SUBDIRS([microcode]) if test x"${enable_blowfish}" = xyes; then diff --git a/src/edwin/Makefile.am b/src/edwin/Makefile.am index 66cb4c5f1..ff758bd1b 100644 --- a/src/edwin/Makefile.am +++ b/src/edwin/Makefile.am @@ -29,9 +29,6 @@ scmlibdir = @MIT_SCHEME_LIBDIR@ scmlib_subdir = $(scmlibdir)edwin scmdocdir = $(datarootdir)/doc/@MIT_SCHEME_PROJECT@ -sources =@MIT_SCHEME_SOURCES@ -binaries =@MIT_SCHEME_BINARIES@ - scmlib_sub_DATA = $(sources) scmlib_sub_DATA += $(binaries) scmlib_sub_DATA += loadef.scm edwin.bld diff --git a/src/edwin/autogen.sh b/src/edwin/autogen.sh index 297d46ab5..68beef3d7 100755 --- a/src/edwin/autogen.sh +++ b/src/edwin/autogen.sh @@ -1,5 +1,5 @@ #!/bin/sh set -e -./sources.sh deps >source-dependencies.am +./sources.sh autoreconf --force --install diff --git a/src/edwin/configure.ac b/src/edwin/configure.ac index 418722063..10e0148e4 100644 --- a/src/edwin/configure.ac +++ b/src/edwin/configure.ac @@ -36,18 +36,17 @@ AC_PROG_INSTALL MIT_SCHEME_PROJECT=mit-scheme : ${MIT_SCHEME_EXE=mit-scheme} -default_libdir=`( echo "(display (->namestring" ;\ - echo " (system-library-directory-pathname)))" ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_LIBDIR=${default_libdir}} -MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` -MIT_SCHEME_SOURCES=`./sources.sh scm` -MIT_SCHEME_BINARIES=`./sources.sh com` +if test x"${MIT_SCHEME_LIBDIR}" = x; then + MIT_SCHEME_LIBDIR=`( echo "(display (->namestring" ;\ + echo " (system-library-directory-pathname)))" ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_OS_SUFFIX}" = x; then + MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi AC_SUBST([MIT_SCHEME_PROJECT]) -AC_SUBST([MIT_SCHEME_SOURCES]) -AC_SUBST([MIT_SCHEME_BINARIES]) AC_SUBST([MIT_SCHEME_EXE]) AC_SUBST([MIT_SCHEME_LIBDIR]) AC_SUBST([MIT_SCHEME_OS_SUFFIX]) diff --git a/src/edwin/sources.scm b/src/edwin/sources.scm new file mode 100644 index 000000000..e455a65a0 --- /dev/null +++ b/src/edwin/sources.scm @@ -0,0 +1,83 @@ +#| -*-Scheme-*- + +Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, + 2017, 2018 Massachusetts Institute of Technology + +This file is part of MIT/GNU Scheme. + +MIT/GNU Scheme is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +MIT/GNU Scheme is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with MIT/GNU Scheme; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, +USA. + +|# + +;;;; Generate a list of all source files + +(call-with-output-file "source-dependencies.am" + (lambda (port) + + (define (filenames) + '("abbrev" "ansi" "argred" "artdebug" "autold" "autosv" "basic" + "bios" "bufcom" "buffer" "buffrm" "bufinp" "bufmnu" "bufout" + "bufset" "bufwfs" "bufwin" "bufwiu" "bufwmc" "c-mode" "calias" + "cinden" "class" "clscon" "clsmac" "comatch" "comhst" "comint" + "comman" "compile" "comred" "comtab" "comwin" "curren" "dabbrev" + "debian-changelog" "debug" "debuge" "diff" "dired" "dirunx" + "dirw32" "display" "docstr" "dos" "doscom" "dosfile" "dosproc" + "dosshell" "ed-ffi" "editor" "edtfrm" "edtstr" "evlcom" "eystep" + "filcom" "fileio" "fill" "grpops" "hlpcom" "htmlmode" "image" + "info" "input" "intmod" "iserch" "javamode" "key-w32" "keymap" + "keyparse" "kilcom" "kmacro" "lincom" "linden" "lisppaste" + "loadef" "lspcom" "macros" "make" "malias" "manual" "midas" + "modefs" "modes" "modlin" "modwin" "motcom" "motion" "mousecom" + "nntp" "notify" "nvector" "occur" "outline" "paredit" "pasmod" + "paths" "print" "process" "prompt" "pwedit" "pwparse" "rcsparse" + "reccom" "regcom" "regexp" "regops" "replaz" "rfc822" + "ring" "rmail" "rmailsrt" "rmailsum" "schmod" "scrcom" "screen" + "search" "sendmail" "sercom" "shell" "simple" "snr" "sort" + "string" "strpad" "strtab" "struct" "syntax" "tagutl" "techinfo" + "telnet" "termcap" "texcom" "things" "tparse" "tterm" "tximod" + "txtprp" "undo" "unix" "utils" "utlwin" "vc" "vc-bzr" "vc-cvs" + "vc-git" "vc-rcs" "vc-svn" "verilog" "vhdl" "webster" "win32" + "win32com" "wincom" "window" "winout" "world-monitor" + "xform" "xterm")) + + (define (my-write . strings) + (for-each (lambda (string) + (write-string string port)) + strings)) + + (define (+type file type) + (->namestring (pathname-new-type file type))) + + (let ((files (sort (filenames) stringnamestring (pathname-new-type pathname "scm"))) - files) - stringnamestring files) stringnamestring files) stringnamestring" ;\ - echo " (system-library-directory-pathname)))" ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_LIBDIR=${default_libdir}} -default_includedir=`( echo "(display (->namestring" ;\ - echo " (directory-pathname" ;\ - echo " (system-library-pathname" ;\ - echo ' "mit-scheme.h"))))' ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_INCLUDEDIR=${default_includedir}} - -cc_type=`echo "(display microcode-id/compiled-code-type)" \ - | ${MIT_SCHEME_EXE} --batch-mode` -os_suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` - -MIT_SCHEME_PKD="gdbm-${os_suffix}.pkd" +if test x"${MIT_SCHEME_LIBDIR}" = x; then + MIT_SCHEME_LIBDIR=`( echo "(display (->namestring" ;\ + echo " (system-library-directory-pathname)))" ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_INCLUDEDIR}" = x; then + MIT_SCHEME_INCLUDEDIR=`( echo "(display (->namestring" ;\ + echo " (directory-pathname" ;\ + echo " (system-library-pathname" ;\ + echo ' "mit-scheme.h"))))' ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_OS_SUFFIX}" = x; then + MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_CC_TYPE}" = x; then + MIT_SCHEME_CC_TYPE=`echo "(display microcode-id/compiled-code-type)" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi + +MIT_SCHEME_PKD="gdbm-${MIT_SCHEME_OS_SUFFIX}.pkd" for f in gdbm; do MIT_SCHEME_SCMs="${MIT_SCHEME_SCMs} ${f}.scm" MIT_SCHEME_BCIs="${MIT_SCHEME_BCIs} ${f}.bci" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} ${f}.bci: stamp-scheme" - if test "$cc_type" = "c"; then + if test x"${MIT_SCHEME_CC_TYPE}" = xc; then MIT_SCHEME_COMs="${MIT_SCHEME_COMs} ${f}.so" MIT_SCHEME_CLEAN="${MIT_SCHEME_CLEAN} ${f}.c" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} diff --git a/src/imail/configure.ac b/src/imail/configure.ac index 977c1b364..4e86a4b0b 100644 --- a/src/imail/configure.ac +++ b/src/imail/configure.ac @@ -36,12 +36,15 @@ AC_PROG_INSTALL MIT_SCHEME_PROJECT=mit-scheme : ${MIT_SCHEME_EXE=mit-scheme} -default_libdir=`( echo "(display (->namestring" ;\ - echo " (system-library-directory-pathname)))" ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_LIBDIR=${default_libdir}} -MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` +if test x"${MIT_SCHEME_LIBDIR}" = x; then + MIT_SCHEME_LIBDIR=`( echo "(display (->namestring" ;\ + echo " (system-library-directory-pathname)))" ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_OS_SUFFIX}" = x; then + MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi # Install plugin docs in Scheme's docdir. docdir='$(datarootdir)/doc/$(MIT_SCHEME_PROJECT)' diff --git a/src/mcrypt/configure.ac b/src/mcrypt/configure.ac index 484c6293b..28b6e9374 100644 --- a/src/mcrypt/configure.ac +++ b/src/mcrypt/configure.ac @@ -109,30 +109,35 @@ LIBS="${LIBS} ${MCRYPT_LIBS}" MIT_SCHEME_PROJECT=mit-scheme : ${MIT_SCHEME_EXE=mit-scheme} -default_libdir=`( echo "(display (->namestring" ;\ - echo " (system-library-directory-pathname)))" ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_LIBDIR=${default_libdir}} -default_includedir=`( echo "(display (->namestring" ;\ - echo " (directory-pathname" ;\ - echo " (system-library-pathname" ;\ - echo ' "mit-scheme.h"))))' ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_INCLUDEDIR=${default_includedir}} - -cc_type=`echo "(display microcode-id/compiled-code-type)" \ - | ${MIT_SCHEME_EXE} --batch-mode` -os_suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` - -MIT_SCHEME_PKD="mcrypt-${os_suffix}.pkd" +rif test x"${MIT_SCHEME_LIBDIR}" = x; then + MIT_SCHEME_LIBDIR=`( echo "(display (->namestring" ;\ + echo " (system-library-directory-pathname)))" ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_INCLUDEDIR}" = x; then + MIT_SCHEME_INCLUDEDIR=`( echo "(display (->namestring" ;\ + echo " (directory-pathname" ;\ + echo " (system-library-pathname" ;\ + echo ' "mit-scheme.h"))))' ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_OS_SUFFIX}" = x; then + MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_CC_TYPE}" = x; then + MIT_SCHEME_CC_TYPE=`echo "(display microcode-id/compiled-code-type)" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi + +MIT_SCHEME_PKD="mcrypt-${MIT_SCHEME_OS_SUFFIX}.pkd" for f in mcrypt; do MIT_SCHEME_SCMs="${MIT_SCHEME_SCMs} ${f}.scm" MIT_SCHEME_BCIs="${MIT_SCHEME_BCIs} ${f}.bci" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} ${f}.bci: stamp-scheme" - if test "$cc_type" = "c"; then + if test x"${MIT_SCHEME_CC_TYPE}" = xc; then MIT_SCHEME_COMs="${MIT_SCHEME_COMs} ${f}.so" MIT_SCHEME_CLEAN="${MIT_SCHEME_CLEAN} ${f}.c" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} diff --git a/src/pgsql/configure.ac b/src/pgsql/configure.ac index d63b53632..74342a77c 100644 --- a/src/pgsql/configure.ac +++ b/src/pgsql/configure.ac @@ -110,30 +110,35 @@ AC_DEFINE([HAVE_LIBPQ_FE_H], [1], MIT_SCHEME_PROJECT=mit-scheme : ${MIT_SCHEME_EXE=mit-scheme} -default_libdir=`( echo "(display (->namestring" ;\ - echo " (system-library-directory-pathname)))" ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_LIBDIR=${default_libdir}} -default_includedir=`( echo "(display (->namestring" ;\ - echo " (directory-pathname" ;\ - echo " (system-library-pathname" ;\ - echo ' "mit-scheme.h"))))' ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_INCLUDEDIR=${default_includedir}} - -cc_type=`echo "(display microcode-id/compiled-code-type)" \ - | ${MIT_SCHEME_EXE} --batch-mode` -os_suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` - -MIT_SCHEME_PKD="pgsql-${os_suffix}.pkd" +if test x"${MIT_SCHEME_LIBDIR}" = x; then + MIT_SCHEME_LIBDIR=`( echo "(display (->namestring" ;\ + echo " (system-library-directory-pathname)))" ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_INCLUDEDIR}" = x; then + MIT_SCHEME_INCLUDEDIR=`( echo "(display (->namestring" ;\ + echo " (directory-pathname" ;\ + echo " (system-library-pathname" ;\ + echo ' "mit-scheme.h"))))' ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_OS_SUFFIX}" = x; then + MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_CC_TYPE}" = x; then + MIT_SCHEME_CC_TYPE=`echo "(display microcode-id/compiled-code-type)" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi + +MIT_SCHEME_PKD="pgsql-${MIT_SCHEME_OS_SUFFIX}.pkd" for f in pgsql; do MIT_SCHEME_SCMs="${MIT_SCHEME_SCMs} ${f}.scm" MIT_SCHEME_BCIs="${MIT_SCHEME_BCIs} ${f}.bci" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} ${f}.bci: stamp-scheme" - if test "$cc_type" = "c"; then + if test x"${MIT_SCHEME_CC_TYPE}" = xc; then MIT_SCHEME_COMs="${MIT_SCHEME_COMs} ${f}.so" MIT_SCHEME_CLEAN="${MIT_SCHEME_CLEAN} ${f}.c" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} diff --git a/src/x11-screen/configure.ac b/src/x11-screen/configure.ac index fa9336427..b3ac05f66 100644 --- a/src/x11-screen/configure.ac +++ b/src/x11-screen/configure.ac @@ -36,24 +36,28 @@ AC_PROG_INSTALL MIT_SCHEME_PROJECT=mit-scheme : ${MIT_SCHEME_EXE=mit-scheme} -default_libdir=`( echo "(display (->namestring" ;\ - echo " (system-library-directory-pathname)))" ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_LIBDIR=${default_libdir}} +if test x"${MIT_SCHEME_LIBDIR}" = x; then + MIT_SCHEME_LIBDIR=`( echo "(display (->namestring" ;\ + echo " (system-library-directory-pathname)))" ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_OS_SUFFIX}" = x; then + MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_CC_TYPE}" = x; then + MIT_SCHEME_CC_TYPE=`echo "(display microcode-id/compiled-code-type)" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi -cc_type=`echo "(display microcode-id/compiled-code-type)" \ - | ${MIT_SCHEME_EXE} --batch-mode` -os_suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` - -MIT_SCHEME_PKD="x11-screen-${os_suffix}.pkd" +MIT_SCHEME_PKD="x11-screen-${MIT_SCHEME_OS_SUFFIX}.pkd" for f in x11-screen x11-key x11-command; do MIT_SCHEME_SCMs="${MIT_SCHEME_SCMs} ${f}.scm" MIT_SCHEME_BCIs="${MIT_SCHEME_BCIs} ${f}.bci" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} ${f}.bci: stamp-scheme" - if test "$cc_type" = "c"; then + if test x"${MIT_SCHEME_CC_TYPE}" = xc; then MIT_SCHEME_COMs="${MIT_SCHEME_COMs} ${f}.so" MIT_SCHEME_CLEAN="${MIT_SCHEME_CLEAN} ${f}.c" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} diff --git a/src/x11/configure.ac b/src/x11/configure.ac index 2039b1be8..ab3bdad83 100644 --- a/src/x11/configure.ac +++ b/src/x11/configure.ac @@ -101,30 +101,35 @@ fi MIT_SCHEME_PROJECT=mit-scheme : ${MIT_SCHEME_EXE=mit-scheme} -default_libdir=`( echo "(display (->namestring" ;\ - echo " (system-library-directory-pathname)))" ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_LIBDIR=${default_libdir}} -default_includedir=`( echo "(display (->namestring" ;\ - echo " (directory-pathname" ;\ - echo " (system-library-pathname" ;\ - echo ' "mit-scheme.h"))))' ) \ - | ${MIT_SCHEME_EXE} --batch-mode` -: ${MIT_SCHEME_INCLUDEDIR=${default_includedir}} - -cc_type=`echo "(display microcode-id/compiled-code-type)" \ - | ${MIT_SCHEME_EXE} --batch-mode` -os_suffix=`echo "(display (microcode-id/operating-system-suffix))" \ - | ${MIT_SCHEME_EXE} --batch-mode` - -MIT_SCHEME_PKD="x11-${os_suffix}.pkd" +if test x"${MIT_SCHEME_LIBDIR}" = x; then + MIT_SCHEME_LIBDIR=`( echo "(display (->namestring" ;\ + echo " (system-library-directory-pathname)))" ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_INCLUDEDIR}" = x; then + MIT_SCHEME_INCLUDEDIR=`( echo "(display (->namestring" ;\ + echo " (directory-pathname" ;\ + echo " (system-library-pathname" ;\ + echo ' "mit-scheme.h"))))' ) \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_OS_SUFFIX}" = x; then + MIT_SCHEME_OS_SUFFIX=`echo "(display (microcode-id/operating-system-suffix))" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi +if test x"${MIT_SCHEME_CC_TYPE}" = x; then + MIT_SCHEME_CC_TYPE=`echo "(display microcode-id/compiled-code-type)" \ + | ${MIT_SCHEME_EXE} --batch-mode` +fi + +MIT_SCHEME_PKD="x11-${MIT_SCHEME_OS_SUFFIX}.pkd" for f in x11 x11-base x11-color x11-graphics x11-terminal x11-device; do MIT_SCHEME_SCMs="${MIT_SCHEME_SCMs} ${f}.scm" MIT_SCHEME_BCIs="${MIT_SCHEME_BCIs} ${f}.bci" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS} ${f}.bci: stamp-scheme" - if test "$cc_type" = "c"; then + if test x"${MIT_SCHEME_CC_TYPE}" = xc; then MIT_SCHEME_COMs="${MIT_SCHEME_COMs} ${f}.so" MIT_SCHEME_CLEAN="${MIT_SCHEME_CLEAN} ${f}.c" MIT_SCHEME_DEPS="${MIT_SCHEME_DEPS}