#!/bin/sh
-# $Id: configure,v 1.7 2006/09/16 11:19:09 gjr Exp $
+# $Id: configure,v 1.8 2006/09/25 04:40:04 cph Exp $
#
-# Copyright (c) 2000, 2006 Massachusetts Institute of Technology
+# Copyright 2000,2006 Massachusetts Institute of Technology
#
# This file is part of MIT/GNU Scheme.
#
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-if test ! -e machine; then
- case `./config.guess` in
- alpha-* | alphaev[56]-* | alphaev56-* | alphapca56-* )
- MACHINE=alpha
- ;;
- m68k-* )
- MACHINE=bobcat
- ;;
- i[3456]86-* )
- MACHINE=i386
- ;;
- mips-* | mipsel-* )
- MACHINE=mips
- ;;
- sparc-* )
- MACHINE=sparc
- ;;
- hppa-* | hppa1.[01]-* | hppa2.?-* )
- MACHINE=spectrum
+enable_c_back_end="no"
+
+while test $# -gt 0; do
+ case "${1}" in
+ (--enable-c-back-end)
+ enable_c_back_end="yes"
+ shift
;;
- vax-* )
- MACHINE=vax
+ (--disable-c-back-end)
+ enable_c_back_end="no"
+ shift
;;
- * )
- MACHINE=C
+ (*)
+ shift
;;
esac
- ln -s machines/${MACHINE} machine
+done
+
+if test ! -e machine; then
+ if test "${enable_c_back_end}" = "yes"; then
+ MACHINE="C"
+ else
+ case `./config.guess` in
+ (alpha-* | alphaev[56]-* | alphaev56-* | alphapca56-*)
+ MACHINE="alpha"
+ ;;
+ (m68k-*)
+ MACHINE="bobcat"
+ ;;
+ (i[3456]86-*)
+ MACHINE="i386"
+ ;;
+ (mips-* | mipsel-*)
+ MACHINE="mips"
+ ;;
+ (sparc-*)
+ MACHINE="sparc"
+ ;;
+ (hppa-* | hppa1.[01]-* | hppa2.?-*)
+ MACHINE="spectrum"
+ ;;
+ (vax-*)
+ MACHINE="vax"
+ ;;
+ (*)
+ MACHINE="C"
+ ;;
+ esac
+ fi
+ ln -s "machines/${MACHINE}" machine
fi
-for FN in compiler.cbf compiler.pkg compiler.sf make.com; do \
- test -e ${FN} || ln -s machine/${FN} .; \
+for FN in compiler.cbf compiler.pkg compiler.sf make.com; do
+ test -h "${FN}" || ln -s "machine/${FN}" .;
done
dnl Process this file with autoconf to produce a configure script.
AC_INIT([MIT/GNU Scheme], [7.7.91], [bug-mit-scheme@gnu.org], [mit-scheme])
-AC_REVISION([$Id: configure.ac,v 1.2 2004/11/01 19:21:21 cph Exp $])
+AC_REVISION([$Id: configure.ac,v 1.3 2006/09/25 04:39:59 cph Exp $])
AC_CONFIG_SRCDIR([microcode/boot.c])
AC_PROG_MAKE_SET
AC_COPYRIGHT(
-[Copyright 2000,2001,2004 Massachusetts Institute of Technology
+[Copyright 2000,2001,2004,2006 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
USA.
])
+AC_ARG_ENABLE([c-back-end],
+[[ --enable-c-back-end Build portable system with C output [no]]])
+
AC_PROG_INSTALL
AC_PROG_LN_S
if test "$(${INSTALL} --help 2> /dev/null | fgrep -e --preserve-timestamps)"
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([MIT/GNU Scheme], [14.18], [bug-mit-scheme@gnu.org], [mit-scheme])
-AC_REVISION([$Id: configure.ac,v 1.13 2006/09/24 23:54:12 cph Exp $])
+AC_INIT([MIT/GNU Scheme microcode], [14.18], [bug-mit-scheme@gnu.org], [mit-scheme])
+AC_REVISION([$Id: configure.ac,v 1.14 2006/09/25 04:40:10 cph Exp $])
AC_CONFIG_SRCDIR([boot.c])
AC_CONFIG_HEADERS([config.h])
AC_PROG_MAKE_SET
#endif /* SCM_CONFIG_H */])
dnl Feature options.
+AC_ARG_ENABLE([c-back-end],
+[[ --enable-c-back-end Build portable system with C output [no]]])
AC_ARG_ENABLE([static-libs],
[[ --enable-static-libs Link some libraries statically [no]]])
AC_ARG_ENABLE([dynamic-modules],
AC_ARG_WITH([libpq],
[[ --with-libpq Use PostgreSQL libpq library if available [yes]]])
+enable_c_back_end="${enable_c_back_end:-no}"
+
dnl Substitution variables to be filled in below.
AS_FLAGS=
GC_HEAD_FILES=
dnl Add architecture-dependent customizations.
dnl This is mostly support for native-code compilation.
+AC_MSG_CHECKING([for native-code support])
scheme_arch=
OPTIONAL_BASES="${OPTIONAL_BASES} cmpint"
GC_HEAD_FILES="gccode.h cmpgc.h"
-case "$host_cpu" in
-alpha*)
- scheme_arch=alpha
- ;;
-hppa*)
- scheme_arch=hppa
- GC_HEAD_FILES="${GC_HEAD_FILES} hppacach.h"
- ;;
-i?86)
- scheme_arch=i386
- ;;
-# x86_64)
-# scheme_arch=i386
-# CFLAGS="${CFLAGS} -m32"
-# LDFLAGS="${LDFLAGS} -m32"
-# ;;
-m68k|m680?0)
- scheme_arch=mc68k
- ;;
-mips*)
- scheme_arch=mips
- ;;
-vax)
- scheme_arch=vax
- ;;
-esac
+if test "${enable_c_back_end}" = "no"; then
+ case "$host_cpu" in
+ alpha*)
+ scheme_arch=alpha
+ ;;
+ hppa*)
+ scheme_arch=hppa
+ GC_HEAD_FILES="${GC_HEAD_FILES} hppacach.h"
+ ;;
+ i?86)
+ scheme_arch=i386
+ ;;
+ # x86_64)
+ # scheme_arch=i386
+ # CFLAGS="${CFLAGS} -m32"
+ # LDFLAGS="${LDFLAGS} -m32"
+ # ;;
+ m68k|m680?0)
+ scheme_arch=mc68k
+ ;;
+ mips*)
+ scheme_arch=mips
+ ;;
+ vax)
+ scheme_arch=vax
+ ;;
+ esac
+fi
+AC_DEFINE([HAS_COMPILER_SUPPORT], [1],
+ [Define if architecture has native-code compiler support.])
if test "${scheme_arch}" != ""; then
- AC_DEFINE([HAS_COMPILER_SUPPORT], [1],
- [Define if architecture has native-code compiler support.])
+ AC_MSG_RESULT([yes, for ${scheme_arch}])
test -f cmpauxmd.m4 || ${LN_S} cmpauxmd/${scheme_arch}.m4 cmpauxmd.m4
test -f cmpintmd.h || ${LN_S} cmpintmd/${scheme_arch}.h cmpintmd.h
OPTIONAL_SOURCES="${OPTIONAL_SOURCES} cmpauxmd.m4"
GC_HEAD_FILES="${GC_HEAD_FILES} cmpintmd.h"
CMPAUXMDO="Ignore-me.o"
else
- AC_DEFINE([HAS_COMPILER_SUPPORT], [1],
- [Define if architecture has native-code compiler support.])
+ AC_MSG_RESULT([yes, using portable C code])
AC_DEFINE([NATIVE_CODE_IS_C], [1],
[Define that the compiler outputs C code instead of binaries.])
test -f cmpauxmd.c || ${LN_S} cmpauxmd/c.c cmpauxmd.c