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