-
+ 3D7A61B123D7D1724A079C211678DD85085E56F4C2229C46D9DF7A7257E83461E0F19237C90B58A17E977B19715651539317003A69FFFD06C3CC96D0EA54839Bbitcoin/src/shiva/BUILDING(0 . 0)(1 . 139)
11 Building TinyScheme
12 -------------------
13
14 The included makefile includes logic for Linux, Solaris and Win32, and can
15 readily serve as an example for other OSes, especially Unixes. There are
16 a lot of compile-time flags in TinyScheme (preprocessor defines) that can trim
17 unwanted features. See next section. 'make all' and 'make clean' function as
18 expected.
19
20 Autoconfing TinyScheme was once proposed, but the distribution would not be
21 so small anymore. There are few platform dependencies in TinyScheme, and in
22 general compiles out of the box.
23
24 Customizing
25 -----------
26
27 The following symbols are defined to default values in scheme.h.
28 Use the -D flag of cc to set to either 1 or 0.
29
30 STANDALONE
31 Define this to produce a standalone interpreter.
32
33 USE_MATH
34 Includes math routines.
35
36 USE_CHAR_CLASSIFIERS
37 Includes character classifier procedures.
38
39 USE_ASCII_NAMES
40 Enable extended character notation based on ASCII names.
41
42 USE_STRING_PORTS
43 Enables string ports.
44
45 USE_ERROR_HOOK
46 To force system errors through user-defined error handling.
47 (see "Error handling")
48
49 USE_TRACING
50 To enable use of TRACING.
51
52 USE_COLON_HOOK
53 Enable use of qualified identifiers. (see "Colon Qualifiers - Packages")
54 Defining this as 0 has the rather drastic consequence that any code using
55 packages will stop working, and will have to be modified. It should only
56 be used if you *absolutely* need to use '::' in identifiers.
57
58 USE_STRCASECMP
59 Defines stricmp as strcasecmp, for Unix.
60
61 STDIO_ADDS_CR
62 Informs TinyScheme that stdio translates "\n" to "\r\n". For DOS/Windows.
63
64 USE_DL
65 Enables dynamically loaded routines. If you define this symbol, you
66 should also include dynload.c in your compile.
67
68 USE_PLIST
69 Enables property lists (not Standard Scheme stuff). Off by default.
70
71 USE_NO_FEATURES
72 Shortcut to disable USE_MATH, USE_CHAR_CLASSIFIERS, USE_ASCII_NAMES,
73 USE_STRING_PORTS, USE_ERROR_HOOK, USE_TRACING, USE_COLON_HOOK,
74 USE_DL.
75
76 USE_SCHEME_STACK
77 Enables 'cons' stack (the alternative is a faster calling scheme, which
78 breaks continuations). Undefine it if you don't care about strict compatibility
79 but you do care about faster execution.
80
81
82 OS-X tip
83 --------
84 I don't have access to OS-X, but Brian Maher submitted the following tip:
85
86 [1] Download and install fink (I installed fink in
87 /usr/local/fink)
88 [2] Install the 'dlcompat' package using fink as such:
89 > fink install dlcompat
90 [3] Make the following changes to the
91 tinyscheme-1.32.tar.gz
92
93 diff -r tinyscheme-1.32/dynload.c
94 tinyscheme-1.32-new/dynload.c
95 24c24
96 < #define SUN_DL
97 ---
98 >
99 Only in tinyscheme-1.32-new/: dynload.o
100 Only in tinyscheme-1.32-new/: libtinyscheme.a Only in tinyscheme-1.32-new/: libtinyscheme.so diff -r tinyscheme-1.32/makefile tinyscheme-1.32-new/makefile
101 33,34c33,43
102 < LD = gcc
103 < LDFLAGS = -shared
104 ---
105 > #LD = gcc
106 > #LDFLAGS = -shared
107 > #DEBUG=-g -Wno-char-subscripts -O
108 > #SYS_LIBS= -ldl
109 > #PLATFORM_FEATURES= -DSUN_DL=1
110 >
111 > # Mac OS X
112 > CC = gcc
113 > CFLAGS = -I/usr/local/fink/include
114 > LD = gcc
115 > LDFLAGS = -L/usr/local/fink/lib
116 37c46
117 < PLATFORM_FEATURES= -DSUN_DL=1
118 ---
119 > PLATFORM_FEATURES= -DSUN_DL=1 -DOSX
120 60c69
121 < $(CC) -I. -c $(DEBUG) $(FEATURES)
122 $(DL_FLAGS) $<
123 ---
124 > $(CC) $(CFLAGS) -I. -c $(DEBUG)
125 $(FEATURES) $(DL_FLAGS) $<
126 66c75
127 < $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
128 ---
129 > $(CC) $(LDFLAGS) -o $@ $(DEBUG) $(OBJS)
130 $(SYS_LIBS)
131 Only in tinyscheme-1.32-new/: scheme
132 diff -r tinyscheme-1.32/scheme.c
133 tinyscheme-1.32-new/scheme.c
134 60,61c60,61
135 < #ifndef macintosh
136 < # include <malloc.h>
137 ---
138 > #ifdef OSX
139 > /* Do nothing */
140 62a63,65
141 > # ifndef macintosh
142 > # include <malloc.h>
143 > # else
144 77c80,81
145 < #endif /* macintosh */
146 ---
147 > # endif /* macintosh */
148 > #endif /* !OSX */
149 Only in tinyscheme-1.32-new/: scheme.o