Permalink
Browse files

updated for version 7.3.049

Problem:    PLT has rebranded their Scheme to Racket.
Solution:   Add support for Racket 5.x. (Sergey Khorev)
  • Loading branch information...
1 parent 8a2d763 commit 180512e30818eb21126498e3ab17793002c37af1 @brammool brammool committed Nov 3, 2010
Showing with 129 additions and 27 deletions.
  1. +11 −4 src/Make_cyg.mak
  2. +9 −3 src/Make_ming.mak
  3. +12 −6 src/Make_mvc.mak
  4. +48 −8 src/auto/configure
  5. +40 −6 src/configure.in
  6. +7 −0 src/if_mzsch.c
  7. +2 −0 src/version.c
View
@@ -1,6 +1,6 @@
#
# Makefile for VIM on Win32, using Cygnus gcc
-# Last updated by Dan Sharp. Last Change: 2010 Feb 24
+# Last updated by Dan Sharp. Last Change: 2010 Nov 03
#
# Also read INSTALLpc.txt!
#
@@ -27,6 +27,7 @@
# MZSCHEME_VER define to version of MzScheme being used (209_000)
# DYNAMIC_MZSCHEME no or yes: use yes to load the MzScheme DLLs dynamically (yes)
# MZSCHEME_DLLS path to MzScheme DLLs (libmzgc and libmzsch), for "static" build.
+# MZSCHEME_USE_RACKET define to use "racket" instead of "mzsch".
# LUA define to path to Lua dir to get Lua support (not defined)
# LUA_VER define to version of Lua being used (51)
# DYNAMIC_LUA no or yes: use yes to load the Lua DLL dynamically (yes)
@@ -254,16 +255,22 @@ ifndef MZSCHEME_GENERATE_BASE
MZSCHEME_GENERATE_BASE=no
endif
+ifndef MZSCHEME_USE_RACKET
+MZSCHEME_MAIN_LIB=mzsch
+else
+MZSCHEME_MAIN_LIB=racket
+endif
+
ifeq (yes, $(DYNAMIC_MZSCHEME))
-DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
+DEFINES += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
else
ifndef MZSCHEME_DLLS
MZSCHEME_DLLS = $(MZSCHEME)
endif
ifeq (yes,$(MZSCHEME_PRECISE_GC))
-MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
+MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
else
-MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
+MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
EXTRA_LIBS += -L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)/lib $(MZSCHEME_LIB)
endif
View
@@ -141,11 +141,17 @@ ifndef MZSCHEME_GENERATE_BASE
MZSCHEME_GENERATE_BASE=no
endif
+ifndef MZSCHEME_USE_RACKET
+MZSCHEME_MAIN_LIB=mzsch
+else
+MZSCHEME_MAIN_LIB=racket
+endif
+
ifeq (no,$(DYNAMIC_MZSCHEME))
ifeq (yes,$(MZSCHEME_PRECISE_GC))
-MZSCHEME_LIB=-lmzsch$(MZSCHEME_VER)
+MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
else
-MZSCHEME_LIB = -lmzsch$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
+MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
endif
# the modern MinGW can dynamically link to dlls directly.
# point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
@@ -343,7 +349,7 @@ endif
ifdef MZSCHEME
CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
ifeq (yes, $(DYNAMIC_MZSCHEME))
-CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
+CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
endif
endif
View
@@ -705,12 +705,18 @@ PYTHON3_LIB = $(PYTHON3)\libs\python$(PYTHON3_VER).lib
MZSCHEME_VER = 205_000
!endif
CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
-!if EXIST("$(MZSCHEME)\collects\scheme\base.ss")
-# for MzScheme 4.x we need to include byte code for basic Scheme stuff
+!if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \
+ || EXIST("$(MZSCHEME)\collects\scheme\base.rkt")
+# for MzScheme >= 4 we need to include byte code for basic Scheme stuff
MZSCHEME_EXTRA_DEP = mzscheme_base.c
CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE
!endif
-!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib") \
+!if EXIST("$(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib")
+MZSCHEME_MAIN_LIB=mzsch
+!else
+MZSCHEME_MAIN_LIB=racket
+!endif
+!if EXIST("$(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib") \
&& !EXIST("$(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib")
!message Building with Precise GC
MZSCHEME_PRECISE_GC = yes
@@ -722,18 +728,18 @@ CFLAGS = $(CFLAGS) -DMZ_PRECISE_GC
!endif
!message MzScheme DLLs will be loaded dynamically
CFLAGS = $(CFLAGS) -DDYNAMIC_MZSCHEME \
- -DDYNAMIC_MZSCH_DLL=\"libmzsch$(MZSCHEME_VER).dll\" \
+ -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" \
-DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
!else
!if "$(MZSCHEME_DEBUG)" == "yes"
CFLAGS = $(CFLAGS) -DMZSCHEME_FORCE_GC
!endif
!if "$(MZSCHEME_PRECISE_GC)" == "yes"
# Precise GC does not use separate dll
-MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
+MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
!else
MZSCHEME_LIB = $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib \
- $(MZSCHEME)\lib\msvc\libmzsch$(MZSCHEME_VER).lib
+ $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib
!endif
!endif
MZSCHEME_OBJ = $(OUTDIR)\if_mzsch.obj
View
@@ -4862,16 +4862,36 @@ $as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
-$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
- if test -f /usr/include/plt/scheme.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
+$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
+ if test -f $vi_cv_path_mzscheme_pfx/include/racket/scheme.h; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- SCHEME_INC=/usr/include/plt
+ SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- vi_cv_path_mzscheme_pfx=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
+$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
+ if test -f /usr/include/plt/scheme.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SCHEME_INC=/usr/include/plt
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
+$as_echo_n "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
+ if test -f /usr/include/racket/scheme.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SCHEME_INC=/usr/include/racket
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ vi_cv_path_mzscheme_pfx=
+ fi
+ fi
fi
fi
fi
@@ -4883,12 +4903,22 @@ $as_echo "no" >&6; }
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
- elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"; then
+ MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"
+ MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.a"; then
+ MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
else
if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.so"; then
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme3m"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.so"; then
+ MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket3m"
+ MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.so"; then
+ MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket -lmzgc"
else
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
fi
@@ -4901,10 +4931,20 @@ $as_echo "no" >&6; }
fi
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
SCHEME_COLLECTS=lib/plt/
+ else
+ if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
+ SCHEME_COLLECTS=lib/racket/
+ fi
fi
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
- MZSCHEME_EXTRA="mzscheme_base.c"
- MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
+ MZSCHEME_EXTRA="mzscheme_base.c"
+ else
+ if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
+ MZSCHEME_EXTRA="mzscheme_base.c"
+ fi
+ fi
+ if test "X$MZSCHEME_EXTRA" != "X" ; then
+ MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
fi
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
View
@@ -568,13 +568,27 @@ if test "$enable_mzschemeinterp" = "yes"; then
SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
else
AC_MSG_RESULT(no)
- AC_MSG_CHECKING(if scheme.h can be found in /usr/include/plt/)
- if test -f /usr/include/plt/scheme.h; then
+ AC_MSG_CHECKING(if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket)
+ if test -f $vi_cv_path_mzscheme_pfx/include/racket/scheme.h; then
AC_MSG_RESULT(yes)
- SCHEME_INC=/usr/include/plt
+ SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
else
AC_MSG_RESULT(no)
- vi_cv_path_mzscheme_pfx=
+ AC_MSG_CHECKING(if scheme.h can be found in /usr/include/plt/)
+ if test -f /usr/include/plt/scheme.h; then
+ AC_MSG_RESULT(yes)
+ SCHEME_INC=/usr/include/plt
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(if scheme.h can be found in /usr/include/racket/)
+ if test -f /usr/include/racket/scheme.h; then
+ AC_MSG_RESULT(yes)
+ SCHEME_INC=/usr/include/racket
+ else
+ AC_MSG_RESULT(no)
+ vi_cv_path_mzscheme_pfx=
+ fi
+ fi
fi
fi
fi
@@ -586,13 +600,23 @@ if test "$enable_mzschemeinterp" = "yes"; then
elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
- elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"; then
+ MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"
+ MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.a"; then
+ MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libracket.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"; then
MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a ${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"
else
dnl Using shared objects
if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.so"; then
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme3m"
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.so"; then
+ MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket3m"
+ MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
+ elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket.so"; then
+ MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lracket -lmzgc"
else
MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc"
fi
@@ -607,10 +631,20 @@ if test "$enable_mzschemeinterp" = "yes"; then
fi
if test -d $vi_cv_path_mzscheme_pfx/lib/plt/collects; then
SCHEME_COLLECTS=lib/plt/
+ else
+ if test -d $vi_cv_path_mzscheme_pfx/lib/racket/collects; then
+ SCHEME_COLLECTS=lib/racket/
+ fi
fi
if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
- dnl need to generate bytecode for MzScheme base
MZSCHEME_EXTRA="mzscheme_base.c"
+ else
+ if test -f "${vi_cv_path_mzscheme_pfx}/${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
+ MZSCHEME_EXTRA="mzscheme_base.c"
+ fi
+ fi
+ if test "X$MZSCHEME_EXTRA" != "X" ; then
+ dnl need to generate bytecode for MzScheme base
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
fi
View
@@ -794,9 +794,16 @@ mzscheme_end(void)
#endif
}
+#if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) && defined(USE_THREAD_LOCAL)
+static __declspec(thread) void *tls_space;
+#endif
+
void
mzscheme_main(void)
{
+#if MZSCHEME_VERSION_MAJOR >= 500 && defined(WIN32) && defined(USE_THREAD_LOCAL)
+ scheme_register_tls_space(&tls_space, 0);
+#endif
#if defined(MZ_PRECISE_GC) && MZSCHEME_VERSION_MAJOR >= 400
/* use trampoline for precise GC in MzScheme >= 4.x */
scheme_main_setup(TRUE, mzscheme_env_main, 0, NULL);
View
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 49,
+/**/
48,
/**/
47,

0 comments on commit 180512e

Please sign in to comment.