-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfigure.ac
351 lines (318 loc) · 9.6 KB
/
configure.ac
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
dnl configure.ac for Chaos(CafeOBJ)
dnl apply autoconf to this file for producing a configure script.
dnl
dnl Copyright (c) 2000-2018, Toshimi Sawada. All rights reserved.
dnl Copyright (c) 2014-2024, Norbert Preining. All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions
dnl are met:
dnl
dnl * Redistributions of source code must retain the above copyright
dnl notice, this list of conditions and the following disclaimer.
dnl
dnl * Redistributions in binary form must reproduce the above
dnl copyright notice, this list of conditions and the following
dnl disclaimer in the documentation and/or other materials
dnl provided with the distribution.
dnl
dnl THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
dnl OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
dnl ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
dnl DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
dnl GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
dnl WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dnl
AC_INIT([CafeOBJ],[1.6], [], [cafeobj], [http://www.cafeobj.org/])
AC_CONFIG_SRCDIR([make-cafeobj.lisp.in])
AC_PREREQ(2.6)
VMINOR=.2
VMEMO=PigNose0.99
PATCHLEVEL=
AC_SUBST(VMINOR)
AC_SUBST(VMEMO)
AC_SUBST(PATCHLEVEL)
AC_ARG_PROGRAM
AC_PROG_INSTALL
dnl allow for specifying different names for cmd line interpreter
dnl
dnl disable currently not supported interpreter
dnl but make them available on request!
AC_ARG_WITH(sbcl,
[AS_HELP_STRING([--with-sbcl=<cmd>],
[specify the SBCL interpreter @<:@default: sbcl@:>@])],
sbcl_interp=$withval,sbcl_interp=sbcl)
sbcl_dump=cafeobj.sbcl
AC_ARG_WITH(acl,
[AS_HELP_STRING([--with-acl=<cmd>],
[specify the ACL interpreter @<:@default: alisp@:>@])],
acl_interp=$withval,acl_interp=alisp)
acl_dump=cafeobj.acl
dnl this is the dump file name generated for ACL standalone
acl_standalone_dump=CafeOBJ
AC_ARG_WITH(clisp,
[AS_HELP_STRING([--with-clisp=<cmd>],
[specify the CLISP interpreter @<:@default: clisp@:>@])],
clisp_interp=$withval,clisp_interp=clisp)
clisp_dump=cafeobj.mem
dnl AC_ARG_WITH(ccl32,
dnl [AS_HELP_STRING([--with-ccl32=<cmd>],
dnl [specify the CCL(32) interpreter @<:@default: ccl@:>@])],
dnl ccl32_interp=$withval,ccl32_interp=ccl)
ccl32_interp=ccl
ccl32_dump=cafeobj.img
dnl AC_ARG_WITH(ccl64,
dnl [AS_HELP_STRING([--with-ccl64=<cmd>],
dnl [specify the CCL64 interpreter @<:@default: ccl64@:>@])],
dnl ccl64_interp=$withval,ccl64_interp=ccl64)
ccl64_interp=ccl64
ccl64_dump=cafeobj.img
dnl AC_ARG_WITH(gcl,
dnl [AS_HELP_STRING([--with-gcl=<cmd>],
dnl [specify the GCL interpreter @<:@default: gcl@:>@])],
dnl gcl_interp=$withval,gcl_interp=gcl)
gcl_interp=gcl
gcl_dump=cafeobj.exe
dnl AC_ARG_WITH(cmu,
dnl [AS_HELP_STRING([--with-cmu=<cmd>],
dnl [specify the CMU interpreter @<:@default: lisp@:>@])],
dnl cmu_interp=$withval,cmu_interp=lisp)
cmu_interp=lisp
cmu_dump=cafeobj.core
AC_PATH_PROG(gcl_path,gcl)
AC_PATH_PROG(cmu_path,$cmu_interp)
AC_PATH_PROG(sbcl_path,$sbcl_interp)
AC_PATH_PROG(acl_path,$acl_interp)
AC_PATH_PROG(clisp_path,$clisp_interp)
AC_PATH_PROG(ccl32_path,$ccl32_interp)
AC_PATH_PROG(ccl64_path,$ccl64_interp)
AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
AC_ARG_WITH(lisp,
[AS_HELP_STRING([--with-lisp=all|<interp>@<:@,<interp>@:>@],
[specify a list of lisp interpreters from "acl", "sbcl", or "clisp". Alternatively "all" can be specified to select all available.])],
lisp=$withval)
if test "x$lisp" = "x"
then
# no lisp specified, select one by default
# we disable the currently not building ones!!!
if test -n "$acl_path" ; then lisp=acl ;
elif test -n "$sbcl_path" ; then lisp=sbcl ;
elif test -n "$clisp_path" ; then lisp=clisp ;
# elif test -n "$gcl_path" ; then lisp=gcl ;
# elif test -n "$cmu_path" ; then lisp=cmu ;
# elif test -n "$ccl32_path" ; then lisp=ccl ;
# elif test -n "$ccl64_path" ; then lisp=ccl64 ;
else
AC_MSG_ERROR([no supported lisp interpreter found])
fi
fi
dnl support building for all interpreters
do_all=0
if test "x$lisp" = "xall"
then
do_all=1
# this is the preferred order of interpreters!!
# if nothing is specified, the first one found will be used!
#lisp=acl,sbcl,clisp,gcl,cmu,ccl,ccl64
# use only currently supported ones
lisp=acl-standalone,acl,sbcl,clisp
fi
dnl convert comma serparated list to space separated list
lisp=$(echo $lisp | sed -e 's/,/ /g')
goodlisp=
firstchoice=
for i in $lisp
do
case "x$i" in
xcmu|xcmu-pc)
if test -z "$cmu_path"
then
test $do_all = 1 || \
AC_MSG_ERROR([selected lisp interpreter $i is not available])
else
goodlisp="$goodlisp $i"
if test "x$firstchoice" = x
then
firstchoice=$i
fi
fi
;;
xsbcl)
if test -z "$sbcl_path"
then
test $do_all = 1 || \
AC_MSG_ERROR([selected lisp interpreter $i is not available])
else
goodlisp="$goodlisp $i"
if test "x$firstchoice" = x
then
firstchoice=$i
fi
fi
;;
xacl|xacl-standalone)
if test -z "$acl_path"
then
test $do_all = 1 || \
AC_MSG_ERROR([selected lisp interpreter $i is not available])
else
goodlisp="$goodlisp $i"
if test "x$firstchoice" = x
then
firstchoice=$i
fi
fi
;;
xclisp)
if test -z "$clisp_path"
then
test $do_all = 1 || \
AC_MSG_ERROR([selected lisp interpreter $i is not available])
else
goodlisp="$goodlisp $i"
if test "x$firstchoice" = x
then
firstchoice=$i
fi
fi
;;
xccl)
if test -z "$ccl32_path"
then
test $do_all = 1 || \
AC_MSG_ERROR([selected lisp interpreter $i is not available])
else
goodlisp="$goodlisp $i"
if test "x$firstchoice" = x
then
firstchoice=$i
fi
fi
;;
xccl64)
if test -z "$ccl64_path"
then
test $do_all = 1 || \
AC_MSG_ERROR([selected lisp interpreter $i is not available])
else
goodlisp="$goodlisp $i"
if test "x$firstchoice" = x
then
firstchoice=$i
fi
fi
;;
xgcl)
if test -z "$gcl_path"
then
test $do_all = 1 || \
AC_MSG_ERROR([selected lisp interpreter $i is not available])
else
goodlisp="$goodlisp $i"
if test "x$firstchoice" = x
then
firstchoice=$i
fi
fi
;;
*)
AC_MSG_ERROR([unknown lisp interpreter $i])
;;
esac
done
lisp="$goodlisp"
if test -z "$lisp"
then
AC_MSG_ERROR([no usable lisp interpreter])
fi
AC_MSG_NOTICE([Building for the following lisp interpreters: $lisp])
dnl check for emacs and lispdir
AM_PATH_LISPDIR
AC_SUBST(lisp)
AC_SUBST(firstchoice)
AC_SUBST(acl_interp)
AC_SUBST(sbcl_interp)
AC_SUBST(clisp_interp)
AC_SUBST(cmu_interp)
AC_SUBST(ccl32_interp)
AC_SUBST(ccl64_interp)
AC_SUBST(gcl_interp)
AC_SUBST(acl_dump)
AC_SUBST(acl_standalone_dump)
AC_SUBST(sbcl_dump)
AC_SUBST(clisp_dump)
AC_SUBST(cmu_dump)
AC_SUBST(ccl32_dump)
AC_SUBST(ccl64_dump)
AC_SUBST(gcl_dump)
# test for 64/32 bit
AC_CHECK_SIZEOF([long])
AS_IF([test "$ac_cv_sizeof_long" -eq 8],
[AC_SUBST([OSBIT],64)], [AC_SUBST([OSBIT],32)])
AC_ARG_ENABLE([rebuild_doc],
[AS_HELP_STRING([--enable-rebuild-doc],
[Enable the rebuilding of documentation (not implemented) @<:@default=no@:>@])],
[enable_rebuild_doc="${enableval}"],
[enable_rebuild_doc=no])
if test x"$enable_rebuild_doc" = x"yes"
then
dnl check for documentation building programs
AC_CHECK_PROG(xelatex_avail, [xelatex], [yes], [no])
AC_CHECK_PROG(bibtex_avail, [bibtex], [yes], [no])
AC_CHECK_PROG(pandoc_avail, [pandoc], [yes], [no])
AC_CHECK_PROG(pdflatex_avail, [pdflatex], [yes], [no])
if test $xelatex_avail = no \
-o $bibtex_avail = no \
-o $pandoc_avail = no \
-o $pdflatex_avail = no
then
AC_MSG_NOTICE([Not all TeX related programs are found, disabling rebuild of documentation.])
enable_rebuild_doc=no
fi
fi
AC_SUBST(enable_rebuild_doc)
AC_ARG_ENABLE(traditional_layout,
[AS_HELP_STRING([--enable-traditional-layout],
[Enable traditional layout @<:@default=no@:>@])],
[enable_traditional_layout="${enableval}"],
[enable_traditional_layout=no])
AC_SUBST(enable_traditional_layout)
AC_ARG_ENABLE(windows,
[AS_HELP_STRING([--enable-windows],
[Prepare for Windows building])],
[enable_windows="${enableval}"],
[enable_windows=no])
AC_SUBST(enable_windows)
AC_ARG_ENABLE(wine,
[AS_HELP_STRING([--enable-wine],
[Prepare for Windows building with Wine])],
[enable_wine="${enableval}"],
[enable_wine=no])
AC_SUBST(enable_wine)
AC_ARG_ENABLE(distribution,
[AS_HELP_STRING([--enable-distribution],
[Configure for binary distribution])],
[enable_distribution="${enableval}"],
[enable_distribution=no])
AC_SUBST(enable_distribution)
AC_CONFIG_FILES([
Makefile
make-cafeobj.lisp
version.lisp
xbin/cafeobj.in
doc/refman/Makefile
doc/manual/Makefile
doc/RefCard/Makefile
doc/PigNose/Makefile
doc/citp-manual/Makefile
doc/namespace/Makefile
doc/etc/Makefile
doc/search/Makefile
])
AC_OUTPUT()