-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure
executable file
·228 lines (199 loc) · 5.75 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#!/bin/sh
# Last modified: 2022-07-04
# Set scmxlate to the pathname of scmxlate/scmxlate.scm
# on your system, if you know it. Otherwise let
# this script figure it out.
scmxlate=
# Modify searchpathforscmxlate if you think a
# different set of directories should be
# searched for scmxlate/scmxlate.scm.
searchpathforscmxlate=".. ../.. ../../.. $HOME /usr/local /opt"
findscmxlate() {
test "$scmxlate" && return
echo Trying to find scmxlate/scmxlate.scm on your machine.
echo This may take a while.
for f in $searchpathforscmxlate
do
scmxlate=`find $f -name scmxlate.scm -print|sed 1q`
if test "$scmxlate"
then echo Found $scmxlate
return
fi
#test "$scmxlate" && return
done
echo Couldn\'t find scmxlate/scmxlate.scm on your machine.
echo Trying to get it off the Internet.
git clone https://github.com/ds26gte/scmxlate
scmxlate=scmxlate/scmxlate.scm
test "$scmxlate" && return
echo Unable to get scmxlate off the Internet.
echo scmxlate is available at
echo https://github.com/ds26gte/scmxlate
echo You may want to get and install scmxlate manually,
echo then try configure again.
exit
}
adieu() {
if test -f my-tex2page
then
mv my-tex2page tex2page
chmod +x tex2page
echo tex2page has been successfully configured for $dialect.
echo You may put it in your PATH.
else
echo configure "$@" failed!
fi
}
makeit() {
case "$dialect" in
abcl|allegro|clasp|clisp|clozure|cmucl|ecl|mkcl|sbcl|sbcl-compiled)
:;;
#bigloo|chez|chibi|chicken|gambit|gauche|guile|mitscheme|petite|plt|scm|sxm)
chez|chicken|gambit|gauche|guile|petite|plt)
findscmxlate;;
*)
echo Dialect $dialect not supported!
exit;;
esac
#echo Ignore questions on console.
case "$dialect" in
sbcl-compiled)
sbcl --eval '(require :sb-executable)' \
--eval '(sb-executable:make-executable "my-tex2page"
(list (compile-file "tex2page.lisp")))' \
--eval '(sb-ext:quit)'
rm tex2page.fasl;;
abcl|allegro|clasp|clisp|clozure|cmucl|ecl|mkcl|sbcl)
echo \":\"\; export LISP=$dialect > my-tex2page
cat tex2page.lisp >> my-tex2page;;
bigloo)
echo bigloo|bigloo -eval '(load "'$scmxlate'")';;
chez)
echo chez|scheme $scmxlate;;
chibi)
echo chibi|chibi-scheme -e '(load "$scmxlate")';;
chicken)
echo chicken|csi $scmxlate;;
gambit)
echo gambit|gsi $scmxlate;;
gauche)
echo gauche|gosh -l $scmxlate;;
guile)
echo guile|guile -l $scmxlate;;
mitscheme)
echo mitscheme|scheme -load $scmxlate;;
petite)
echo petite|petite $scmxlate;;
plt)
echo If you are not a PLT developer, you probably shouldn\'t
echo be needing to do this.
echo plt|racket -f $scmxlate;;
scm)
echo scm|scm -f $scmxlate;;
scsh)
echo scsh|scsh -s $scmxlate;;
sxm)
echo sxm|sxi $scmxlate;;
*)
echo This had better be 0xdeadc0de.
exit;;
esac
}
echodialectsuggestions() {
test "`which abcl 2>/dev/null|grep -v ' '`" &&\
abclpresent=yes
test "`which scheme 2>/dev/null|grep -v ' '`" &&\
chezpresent=yes
test "`which clasp 2>/dev/null|grep -v ' '`" &&\
clasppresent=yes
test "`which clisp 2>/dev/null|grep -v ' '`" &&\
clisppresent=yes
test "`which csi 2>/dev/null|grep -v ' '`" &&\
chickenpresent=yes
test "`which ccl 2>/dev/null|grep -v ' '`" &&\
clozurepresent=yes
test "`which lisp 2>/dev/null|grep -v ' '`" &&\
cmuclpresent=yes
test "`which ecl 2>/dev/null|grep -v ' '`" &&\
eclpresent=yes
test "`which gsi 2>/dev/null|grep -v ' '`" &&\
gambitpresent=yes
test "`which gosh 2>/dev/null|grep -v ' '`" &&\
gauchepresent=yes
test "`which guile 2>/dev/null|grep -v ' '`" &&\
guilepresent=yes
test "`which mkcl 2>/dev/null|grep -v ' '`" &&\
mkclpresent=yes
test "`which petite 2>/dev/null|grep -v ' '`" &&\
petitepresent=yes
test "`which racket 2>/dev/null|grep -v ' '`" &&\
racketpresent=yes
test "`which sbcl 2>/dev/null|grep -v ' '`" &&\
sbclpresent=yes
echo
echo Note: The following look promising on your system:
echo
echo Common Lisps:
echo
test "$abclpresent" &&\
echo \ \ ./configure --dialect=abcl
test "$clasppresent" &&\
echo \ \ ./configure --dialect=clasp
test "$clisppresent" &&\
echo \ \ ./configure --dialect=clisp
test "$clozurepresent" &&\
echo \ \ ./configure --dialect=clozure
test "$cmuclpresent" &&\
echo \ \ ./configure --dialect=cmucl
test "$eclpresent" &&\
echo \ \ ./configure --dialect=ecl
test "$mkclpresent" &&\
echo \ \ ./configure --dialect=mkcl
test "$sbclpresent" &&\
echo \ \ ./configure --dialect=sbcl &&\
echo \ \ ./configure --dialect=sbcl-compiled
echo
echo Schemes:
echo
test "$chezpresent" &&\
echo \ \ ./configure --dialect=chez
test "$chickenpresent" &&\
echo \ \ ./configure --dialect=chicken
test "$gambitpresent" &&\
echo \ \ ./configure --dialect=gambit
test "$gauchepresent" &&\
echo \ \ ./configure --dialect=gauche
test "$guilepresent" &&\
echo \ \ ./configure --dialect=guile
test "$petitepresent" &&\
echo \ \ ./configure --dialect=petite
test "$racketpresent" &&\
echo \ \ ./configure --dialect=racket
}
echohelp() {
echo List of dialects supported:
echo
cat dialects/dialects-supported.scm | grep -v "^ *;"
echo
echo If your dialect D is listed above, type
echo \ \ ./configure --dialect=D
echodialectsuggestions
exit
}
rm -f tex2page
rm -f my-tex2page
if test 1 -eq `echo $1|grep "^--dialect="|sed 1q|wc -l`
then
dialect=`echo $1|sed 's/--dialect=//'`
if test "$dialect" = "racket"
then
cp -p tex2page.rkt my-tex2page
elif test "$dialect" = "guile" -a -f ./dialects/make-guile-version
then
./dialects/make-guile-version
else
makeit
fi
adieu
else echohelp
fi