Don't assume that it's possible to run MIT_SCHEME_EXE during configuration.
authorChris Hanson <org/chris-hanson/cph>
Tue, 30 Oct 2018 04:30:33 +0000 (21:30 -0700)
committerChris Hanson <org/chris-hanson/cph>
Tue, 30 Oct 2018 04:30:33 +0000 (21:30 -0700)
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.

13 files changed:
src/blowfish/configure.ac
src/configure.ac
src/edwin/Makefile.am
src/edwin/autogen.sh
src/edwin/configure.ac
src/edwin/sources.scm [new file with mode: 0644]
src/edwin/sources.sh
src/gdbm/configure.ac
src/imail/configure.ac
src/mcrypt/configure.ac
src/pgsql/configure.ac
src/x11-screen/configure.ac
src/x11/configure.ac

index 51ff03ecf474f9a80cc1cb145061cbee4b8d9dc1..1d818e79b6bcd8063abad72abc68f55af6e1bc6d 100644 (file)
@@ -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}
index 0d5c9fd73addd20e3e8e0f0778e7b0bc95f3643c..2a395fd4c4b5109aa20321ed8aaa7faad72e0d5e 100644 (file)
@@ -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
index 66cb4c5f1af2b9698ba93259598d75a4e6b0c229..ff758bd1b41ceeb40582590f687eca701223fdc9 100644 (file)
@@ -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
index 297d46ab5258f4588366bbf4ebb65ef09fd8e6ae..68beef3d7a64761d707fa2b05792b3072ccb19e6 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
 set -e
-./sources.sh deps >source-dependencies.am
+./sources.sh
 autoreconf --force --install
index 418722063f050bb14199ceb51a2b76d7b3db47ad..10e0148e438cf76891792c9881f2d271155fd03c 100644 (file)
@@ -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 (file)
index 0000000..e455a65
--- /dev/null
@@ -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) string<?)))
+      (my-write "sources =")
+      (for-each (lambda (file)
+                 (my-write " " (+type file "scm")))
+               files)
+      (newline port)
+      (my-write "binaries =")
+      (for-each (lambda (file)
+                 (my-write " " (+type file "bci")
+                           " " (+type file "com")))
+               files)
+      (newline port)
+      (for-each (lambda (file)
+                 (my-write (+type file "bci") ": stamp-scheme")
+                 (newline port)
+                 (my-write (+type file "com") ": stamp-scheme")
+                 (newline port))
+               files))))
\ No newline at end of file
index aa2c720b2723e9271786e417752f5fd9c990591c..3778f4815c9c28c12472cd12e4c7a22125482b92 100755 (executable)
@@ -1,10 +1,9 @@
 #!/bin/sh
-# -*-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
-#     Massachusetts Institute of Technology
+#     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.
 #
 # 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,
 
 set -e
 : ${MIT_SCHEME_EXE=mit-scheme}
-${MIT_SCHEME_EXE} --batch-mode -- $1 <<\EOF
-(begin
-
-  (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 write-string strings))
-
-  (define (my-write-line . strings)
-    (apply my-write strings) (newline))
-
-  (let ((command (car (if (environment-bound? system-global-environment
-                                             'command-line-arguments)
-                         (command-line-arguments)
-                         (command-line))))
-       (files (filenames)))
-    (cond ((string=? command "scm")
-          (for-each (lambda (name) (my-write " "name))
-                    (sort (map (lambda (pathname)
-                                 (->namestring (pathname-new-type pathname "scm")))
-                               files)
-                          string<?)))
-         ((string=? command "com")
-          (for-each
-            (lambda (name) (my-write " "name".bci "name".com"))
-            (sort (map ->namestring files) string<?)))
-         ((string=? command "deps")
-          (for-each
-            (lambda (name)
-              (my-write-line name".bci: stamp-scheme")
-              (my-write-line name".com: stamp-scheme"))
-            (sort (map ->namestring files) string<?)))
-         (else
-          (error "Unexpected command:" command))))
-  )
+${MIT_SCHEME_EXE} --batch-mode <<\EOF
+(load "sources.scm")
 EOF
index c5bf3443df85ec3c6f6b03e62dad89c3afd017ba..c48e642ba84057152b40a566c21d67d18bd0e824 100644 (file)
@@ -79,30 +79,35 @@ LIBS="-lgdbm"
 
 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="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}
index 977c1b36448fb9a830e5c00b2f17369cbb22116c..4e86a4b0bf813dcf366df9822144189174fd8817 100644 (file)
@@ -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)'
index 484c6293be91e89305150b899c117f4795314286..28b6e93744d61cdccf5d2e795e707c7b47efc415 100644 (file)
@@ -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}
index d63b536322adece01f51dc12482b2defff95ed1c..74342a77c02d6b15a80ce23661ad73d58277f358 100644 (file)
@@ -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}
index fa933642707f5cfe79769bc6b7f95dcbc0112313..b3ac05f66f3df0e7b03a3fa4348dc425357f36a9 100644 (file)
@@ -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}
index 2039b1be8c5a448423bacfdefbb5bea50e0b45f1..ab3bdad8363c9afa45ab59a374ae520968104d28 100644 (file)
@@ -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}