Fixes a lisp syntax error.
[maxima.git] / configure.ac
blob4845f831e29438d314ef70e4d4dfd05178a31b4d
1 dnl Process this file with autoconf to produce a configure script.
3 dnl If git is available, the version number here is not used.  
4 dnl Instead, git is used to derive the version based on the closest
5 dnl annotated branch tag.
6 dnl
7 dnl Note: during Lisp-based builds (see INSTALL.lisp) the version
8 dnl number is read from the following AC_INIT line.  It's sensitive to
9 dnl whitespace so when updating the version number only make changes
10 dnl within the second pair of square brackets.
11 AC_INIT([maxima], [5.37post])
12 AC_CONFIG_SRCDIR([src/macsys.lisp])
13 AM_INIT_AUTOMAKE([-Wno-portability])
15 AM_PATH_LISPDIR
17 AC_CANONICAL_HOST
19 dnl If we were using a C compiler, EXEEXT would get defined
20 dnl automatically. But we aren't, so we have to define it ourselves.
21 dnl Still to do: Add Win64 support here, if this is needed.
22 case "$host" in
23         *mingw*)
24                 win32=true
25                 win64=false
26                 mingw=true
27                 EXEEXT=.exe
28                 CLISPEXT=${EXEEXT}
29                 ;;
30         *cygwin*)
31                 win32=false
32                 win64=false
33                 mingw=false
34                 EXEEXT=.exe
35                 CLISPEXT=${EXEEXT}
36                 ;;
37         *)
38                 win32=false
39                 win64=false
40                 mingw=false
41                 EXEEXT=
42                 CLISPEXT=.run
43 esac
44 AC_SUBST(EXEEXT)
45 AC_SUBST(win32)
46 AC_SUBST(win64)
47 AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
48 AM_CONDITIONAL(WIN64, test x$win64 = xtrue)
50 dnl To make life more confusing, the automake test machinery (which we
51 dnl use in ./tests) needs the am__EXEEXT conditional. This would have
52 dnl normally been expanded (via something we've copied from Automake's
53 dnl init.m4 into our aclocal.m4) as Automake computed EXEEXT, but it
54 dnl didn't so we have to drop this in ourselves.
55 AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
57 explicit_lisp=false
58 lisps_enabled=""
60 dnl n.b. clisp_default_name is hardcoded in "with" message
61 clisp_default_name=clisp
62 AC_ARG_ENABLE(clisp,
63         [  --enable-clisp               Use clisp],
64         [case "${enableval}" in
65                 yes) clisp=true 
66                      lisps_enabled="${lisps_enabled} clisp"
67                      explicit_lisp=true ;;
68                 no)  clisp=false ;;
69                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-clisp) ;;
70         esac
71         explicit_lisp=true],
72         [clisp=false])
73 AC_ARG_WITH(clisp,
74         [  --with-clisp=<prog>          Use clisp executable <prog> (default clisp)],
75         [clisp=true
76         lisps_enabled="${lisps_enabled} clisp"
77         explicit_lisp=true
78         if test "$withval" = "yes"; then
79                 CLISP_NAME="${clisp_default_name}"
80         else
81                 CLISP_NAME="$withval"
82         fi],
83         [CLISP_NAME=${clisp_default_name}])
84         CLISP_RUNTIME="lisp${CLISPEXT}"
85 AC_ARG_WITH(clisp-runtime,
86         [  --with-clisp-runtime=<path>  Use clisp runtime <path> (default
87                                   *lib-directory*/base/lisp.run on unix,
88                                   *lib-directory*\\lisp.exe on windows) ],
89         [clisp=true
90         lisps_enabled="${lisps_enabled} clisp"
91         CLISP_RUNTIME_PATH="$withval"
92         CLISP_RUNTIME=`basename ${CLISP_RUNTIME_PATH}`],
93         [])
94 AC_ARG_ENABLE(clisp-exec,
95         [  --enable-clisp-exec          Create a maxima executable image using CLISP.
96                                 No check is made if the version of 
97                                 CLISP supports executable images],
98         [case "${enableval}" in
99             yes) clisp_exec=true 
100                  clisp=true 
101                  lisps_enabled="${lisps_enabled} clisp"
102                  explicit_lisp=true ;;
103             no) clisp_exec=false ;;
104             *) AC_MSG_ERROR(bad value ${enableval} for --enable-clisp-exec) ;;
105          esac
106          CLISP_EXEC=${clisp_exec}],
107         [clisp_exec=false
108          CLISP_EXEC=false])
109 if test x"${clisp}" = xtrue ; then
110         if test `echo "$CLISP_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
111                 if test -x "$CLISP_NAME" ; then
112                         clisp_found=true
113                 else
114                         clisp_found=false
115                 fi
116         else
117                 AC_CHECK_PROG(clisp_found,$CLISP_NAME,true,false)
118         fi
119         if test x"${clisp_found}" = xfalse ; then
120                 AC_MSG_WARN(clisp executable ${CLISP_NAME} not found in PATH)
121         fi         
125 dnl See if git exists.  If it does, update VERSION to include a git tag
126 AC_CHECK_PROG(git_found, git, true, false)
127 if test x"${git_found}" = xtrue; then
128     # Test to see if git describe works (discarding any output).  If
129     # it works, use it.  Otherwise, keep existing value of VERSION.
130     # (git describe fails if git is executed in a non-Git directory, e.g.,
131     # an unpacked tarball. Since the exit codes of git describe are undocumented,
132     # we cannot distinguish that from a missing annotated tag.
133     # Play it safe by refusing to change VERSION.)
134     if git describe > /dev/null 2>&1; then
135         VERSION="`git describe --dirty`"
136         # When building RPMs, hyphens in the version are not allowed, so
137         # replace them with underscores.
138         VERSION=`echo $VERSION | sed 's;-;_;g'`
139     fi
142 dnl Parses the version number for the manual
143 manual_version=`echo $VERSION | sed 's+branch_++; s+_base++; s+_dirty++; s+_+.+g'`
144 AC_SUBST(manual_version)
146 dnl n.b. cmucl_default_name is hardcoded in "with" message
147 cmucl_default_name=lisp
148 CMUCL_RUNTIME=lisp
149 AC_ARG_ENABLE(cmucl,
150         [  --enable-cmucl               Use CMUCL],
151         [case "${enableval}" in
152                 yes) cmucl=true 
153                      lisps_enabled="${lisps_enabled} cmucl"
154                      explicit_lisp=true ;;
155                 no)  cmucl=false ;;
156                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-cmucl) ;;
157         esac
158         explicit_lisp=true],
159         [cmucl=false])
160 AC_ARG_WITH(cmucl,
161         [  --with-cmucl=<prog>          Use CMUCL executable <prog> (default lisp)],
162         [cmucl=true
163         lisps_enabled="${lisps_enabled} cmucl"
164         explicit_lisp=true
165         if test "$withval" = "yes"; then
166                 CMUCL_NAME="${cmucl_default_name}"
167         else
168                 CMUCL_NAME="$withval"
169         fi],
170         [CMUCL_NAME=${cmucl_default_name}])
171 AC_ARG_WITH(cmucl-runtime,
172         [  --with-cmucl-runtime=<path>  Use CMUCL runtime <path> (default
173                                   *cmucl-lib*/../bin/lisp)],
174         [cmucl=true
175         lisps_enabled="${lisps_enabled} cmucl"
176         CMUCL_RUNTIME_PATH="$withval"
177         CMUCL_RUNTIME=`basename ${CMUCL_RUNTIME_PATH}`],
178         [])
179 AC_ARG_ENABLE(cmucl-exec,
180         [  --enable-cmucl-exec          Create a maxima executable image using CMUCL.
181                                 No check is made if the version of 
182                                 CMUCL supports executable images],
183         [case "${enableval}" in
184             yes) cmucl_exec=true
185                  cmucl=true 
186                  lisps_enabled="${lisps_enabled} cmucl"
187                  explicit_lisp=true ;;
188             no) cmucl_exec=false ;;
189             *) AC_MSG_ERROR(bad value ${enableval} for --enable-cmucl-exec) ;;
190          esac
191          CMUCL_EXEC=${cmucl_exec}],
192         [cmucl_exec=false
193          CMUCL_EXEC=false])
194 if test x"${cmucl}" = xtrue ; then
195         if test `echo "$CMUCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
196                 if test -x "$CMUCL_NAME" ; then
197                         cmucl_found=true
198                 else
199                         cmucl_found=false
200                 fi
201         else
202                 AC_CHECK_PROG(cmucl_found,$CMUCL_NAME,true,false)
203         fi
204         AC_CHECK_PROG(cmucl_found,$CMUCL_NAME,true,false)
205         if test x"${cmucl_found}" = xfalse ; then
206                 AC_MSG_WARN(cmucl executable ${CMUCL_NAME} not found in PATH)
207         fi
210 dnl n.b. scl_default_name is hardcoded in "with" message
211 scl_default_name=scl
212 SCL_RUNTIME=lisp
213 AC_ARG_ENABLE(scl,
214         [  --enable-scl                 Use SCL],
215         [case "${enableval}" in
216                 yes) scl=true 
217                      lisps_enabled="${lisps_enabled} scl"
218                      explicit_lisp=true ;;
219                 no)  scl=false ;;
220                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-scl) ;;
221         esac
222         explicit_lisp=true],
223         [scl=false])
224 AC_ARG_WITH(scl,
225         [  --with-scl=<prog>            Use SCL executable <prog> (default scl)],
226         [scl=true
227         lisps_enabled="${lisps_enabled} scl"
228         explicit_lisp=true
229         if test "$withval" = "yes"; then
230                 SCL_NAME="${scl_default_name}"
231         else
232                 SCL_NAME="$withval"
233         fi],
234         [SCL_NAME=${scl_default_name}])
235 AC_ARG_WITH(scl-runtime,
236         [  --with-scl-runtime=<path>    Use SCL runtime <path> (default
237                                   file://library/../bin/lisp)],
238         [scl=true
239         lisps_enabled="${lisps_enabled} scl"
240         SCL_RUNTIME_PATH="$withval"
241         SCL_RUNTIME=`basename ${SCL_RUNTIME_PATH}`],
242         [])
243 if test x"${scl}" = xtrue ; then
244         if test `echo "$SCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
245                 if test -x "$SCL_NAME" ; then
246                         scl_found=true
247                 else
248                         scl_found=false
249                 fi
250         else
251                 AC_CHECK_PROG(scl_found,$SCL_NAME,true,false)
252         fi
253         AC_CHECK_PROG(scl_found,$SCL_NAME,true,false)
254         if test x"${scl_found}" = xfalse ; then
255                 AC_MSG_WARN(scl executable ${SCL_NAME} not found in PATH)
256         fi
259 dnl n.b. sbcl_default_name is hardcoded in "with" message
260 sbcl_default_name=sbcl
261 AC_ARG_ENABLE(sbcl,
262         [  --enable-sbcl                Use SBCL],
263         [case "${enableval}" in
264                 yes) sbcl=true 
265                      lisps_enabled="${lisps_enabled} sbcl"
266                      explicit_lisp=true ;;
267                 no)  sbcl=false ;;
268                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-sbcl) ;;
269         esac
270         explicit_lisp=true],
271         [sbcl=false])
272 AC_ARG_WITH(sbcl,
273         [  --with-sbcl=<prog>           Use SBCL executable <prog> (default sbcl)],
274         [sbcl=true
275         lisps_enabled="${lisps_enabled} sbcl"
276         explicit_lisp=true
277         if test "$withval" = "yes"; then
278                 SBCL_NAME="${sbcl_default_name}"
279         else
280                 SBCL_NAME="$withval"
281         fi],
282         [SBCL_NAME="${sbcl_default_name}"])
283 AC_ARG_ENABLE(sbcl-exec,
284         [  --enable-sbcl-exec           Create a maxima executable image using SBCL.
285                                 No check is made if the version of 
286                                 SBCL supports executable images],
287         [case "${enableval}" in
288             yes) sbcl_exec=true 
289                  sbcl=true 
290                  lisps_enabled="${lisps_enabled} sbcl"
291                  explicit_lisp=true ;;
292             no) sbcl_exec=false ;;
293             *) AC_MSG_ERROR(bad value ${enableval} for --enable-sbcl-exec) ;;
294          esac
295          SBCL_EXEC=${sbcl_exec}],
296         [sbcl_exec=false
297          SBCL_EXEC=false])
298 if test x"${sbcl}" = xtrue ; then
299         if test `echo "$SBCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
300                 if test -x "$SBCL_NAME" ; then
301                         sbcl_found=true
302                 else
303                         sbcl_found=false
304                 fi
305         else
306                 AC_CHECK_PROG(sbcl_found,"$SBCL_NAME",true,false)
307         fi
308         AC_CHECK_PROG(sbcl_found,"$SBCL_NAME",true,false)
309         if test x"${sbcl_found}" = xfalse ; then
310                 AC_MSG_WARN(sbcl executable "${SBCL_NAME}" not found in PATH)
311         fi
313         
314 dnl n.b. acl_default_name is hardcoded in "with" message
315 acl_default_name=lisp
316 AC_ARG_ENABLE(acl,
317         [  --enable-acl                 Use ACL],
318         [case "${enableval}" in
319                 yes) acl=true 
320                      lisps_enabled="${lisps_enabled} acl"
321                      explicit_lisp=true ;;
322                 no)  acl=false ;;
323                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-acl) ;;
324         esac
325         explicit_lisp=true],
326         [acl=false])
327 AC_ARG_WITH(acl,
328         [  --with-acl=<prog>            Use ACL executable <prog> (default lisp)],
329         [acl=true
330         lisps_enabled="${lisps_enabled} acl"
331         explicit_lisp=true
332         if test "$withval" = "yes"; then
333                 ACL_NAME="${acl_default_name}"
334         else
335                 ACL_NAME="$withval"
336         fi],
337         [ACL_NAME=${acl_default_name}])
338 if test x"${acl}" = xtrue ; then
339         if test `echo "$ACL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
340                 if test -x "$ACL_NAME" ; then
341                         acl_found=true
342                 else
343                         acl_found=false
344                 fi
345         else
346                 AC_CHECK_PROG(acl_found,$ACL_NAME,true,false)
347         fi
348         AC_CHECK_PROG(acl_found,$ACL_NAME,true,false)
349         if test x"${acl_found}" = xfalse ; then
350                 AC_MSG_WARN(acl executable ${ACL_NAME} not found in PATH)
351         fi
354 dnl n.b. gcl_default_name is hardcoded in "with" message
355 gcl_default_name=gcl
356 AC_ARG_ENABLE(gcl,
357         [  --enable-gcl                 Use GCL],
358         [case "${enableval}" in
359                 yes) gcl=true 
360                      lisps_enabled="${lisps_enabled} gcl"
361                      explicit_lisp=true;;
362                 no)  gcl=false ;;
363                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gcl) ;;
364         esac],
365         [gcl=false])
366 AC_ARG_WITH(gcl,
367         [  --with-gcl=<prog>            Use GCL executable <prog> (default gcl)],
368         [gcl=true
369         lisps_enabled="${lisps_enabled} gcl"
370         explicit_lisp=true
371         if test "$withval" = "yes"; then
372                 GCL_NAME="${gcl_default_name}"
373         else
374                 GCL_NAME="$withval"
375         fi],
376         [GCL_NAME=${gcl_default_name}])
377 if test x"${gcl}" = xtrue ; then
378         if test `echo "$GCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
379                 if test -x "$GCL_NAME" ; then
380                         gcl_found=true
381                 else
382                         gcl_found=false
383                 fi
384         else
385                 AC_CHECK_PROG(gcl_found,$GCL_NAME,true,false)
386         fi
387         if test x"${gcl_found}" = xfalse ; then
388                 AC_MSG_WARN(gcl executable ${GCL_NAME} not found in PATH)
389         fi
392 dnl n.b. openmcl_default_name is hardcoded in "with" message
393 openmcl_default_name=openmcl
394 AC_ARG_ENABLE(openmcl,
395         [  --enable-openmcl             Use OpenMCL],
396         [case "${enableval}" in
397                 yes) openmcl=true 
398                      lisps_enabled="${lisps_enabled} openmcl"
399                      explicit_lisp=true;;
400                 no)  openmcl=false ;;
401                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-openmcl) ;;
402         esac],
403         [openmcl=false])
404 AC_ARG_WITH(openmcl,
405         [  --with-openmcl=<prog>        Use OpenMCL executable <prog> (default openmcl)],
406         [openmcl=true
407         lisps_enabled="${lisps_enabled} openmcl"
408         explicit_lisp=true
409         if test "$withval" = "yes"; then
410                 OPENMCL_NAME="${openmcl_default_name}"
411         else
412                 OPENMCL_NAME="$withval"
413         fi],
414         [OPENMCL_NAME=${openmcl_default_name}])
415 AC_ARG_ENABLE(openmcl-exec,
416         [  --enable-openmcl-exec        Create a maxima executable image using OPENMCL.
417                                 No check is made if the version of 
418                                 OPENMCL supports executable images],
419         [case "${enableval}" in
420             yes) openmcl_exec=true
421                  openmcl=true 
422                  lisps_enabled="${lisps_enabled} openmcl"
423                  explicit_lisp=true;;
424             no) openmcl_exec=false ;;
425             *) AC_MSG_ERROR(bad value ${enableval} for --enable-openmcl-exec) ;;
426          esac
427          OPENMCL_EXEC=${openmcl_exec}],
428         [openmcl_exec=false
429          OPENMCL_EXEC=false])
431 dnl Define ccl as an alias (essentially) for openmcl
432 AC_ARG_ENABLE(ccl,
433         [  --enable-ccl                 Use CCL (Clozure Common Lisp)],
434         [case "${enableval}" in
435                 yes) openmcl=true 
436                      lisps_enabled="${lisps_enabled} openmcl"
437                      explicit_lisp=true;;
438                 no)  openmcl=false ;;
439                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ccl) ;;
440         esac],
441         [openmcl=false])
442 AC_ARG_WITH(ccl,
443         [  --with-ccl=<prog>            Use OpenMCL executable <prog> (default ccl)],
444         [openmcl=true
445         lisps_enabled="${lisps_enabled} openmcl"
446         explicit_lisp=true
447         if test "$withval" = "yes"; then
448                 OPENMCL_NAME="${openmcl_default_name}"
449         else
450                 OPENMCL_NAME="$withval"
451         fi],
452         [OPENMCL_NAME=${openmcl_default_name}])
453 AC_ARG_ENABLE(ccl-exec,
454         [  --enable-ccl-exec            Create a maxima executable image using CCL.
455                                 No check is made if the version of 
456                                 CCL supports executable images],
457         [case "${enableval}" in
458             yes) openmcl_exec=true
459                  openmcl=true 
460                  lisps_enabled="${lisps_enabled} openmcl"
461                  explicit_lisp=true;;
462             no) openmcl_exec=false ;;
463             *) AC_MSG_ERROR(bad value ${enableval} for --enable-ccl-exec) ;;
464          esac
465          OPENMCL_EXEC=${openmcl_exec}],
466         [openmcl_exec=false
467          OPENMCL_EXEC=false])
469 if test x"${openmcl}" = xtrue ; then
470         if test `echo "$OPENMCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
471                 if test -x "$OPENMCL_NAME" ; then
472                         openmcl_found=true
473                 else
474                         openmcl_found=false
475                 fi
476         else
477                 AC_CHECK_PROG(openmcl_found,$OPENMCL_NAME,true,false)
478         fi
479         if test x"${openmcl_found}" = xfalse ; then
480                 AC_MSG_WARN(openmcl executable ${OPENMCL_NAME} not found in PATH)
481         fi
484 dnl n.b. ecl_default_name is hardcoded in "with" message
485 ecl_default_name=ecl
486 AC_ARG_ENABLE(ecl,
487         [  --enable-ecl                 Use ECL],
488         [case "${enableval}" in
489                 yes) ecl=true 
490                      lisps_enabled="${lisps_enabled} ecl"
491                      explicit_lisp=true;;
492                 no)  ecl=false ;;
493                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ecl) ;;
494         esac],
495         [ecl=false])
496 AC_ARG_WITH(ecl,
497         [  --with-ecl=<prog>            Use ECL executable <prog> (default ecl)],
498         [ecl=true
499         lisps_enabled="${lisps_enabled} ecl"
500         explicit_lisp=true
501         if test "$withval" = "yes"; then
502                 ECL_NAME="${ecl_default_name}"
503         else
504                 ECL_NAME="$withval"
505         fi],
506         [ECL_NAME=${ecl_default_name}])
507 if test x"${ecl}" = xtrue ; then
508         if test `echo "$ECL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
509                 if test -x "$ECL_NAME" ; then
510                         ecl_found=true
511                 else
512                         ecl_found=false
513                 fi
514         else
515                 AC_CHECK_PROG(ecl_found,$ECL_NAME,true,false)
516         fi
517         if test x"${ecl_found}" = xfalse ; then
518                 AC_MSG_WARN(ecl executable ${ECL_NAME} not found in PATH)
519         fi
522 dnl xgettext
523 AC_ARG_ENABLE(gettext,
524         [  --enable-gettext             Locale support],
525         [case "${enableval}" in
526                yes) enable_gettext=true  ;;
527                no)  enable_gettext=false ;;
528                *) AC_MSG_ERROR(bad value ${enableval} for --enable-gettext) ;;
529          esac],
530          [enable_gettext=false])
533 AM_CONDITIONAL(ENABLE_GETTEXT, test x$enable_gettext = xtrue)
535 dnl languages
536 AC_ARG_ENABLE(lang-de,
537         [  --enable-lang-de             German language support],
538         [case "${enableval}" in
539                 yes) lang_de=true  ;;
540                 no)  lang_de=false ;;
541                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-de) ;;
542         esac],
543         [lang_de=false])
545 AM_CONDITIONAL(LANG_DE, test x$lang_de = xtrue)
547 AC_ARG_ENABLE(lang-de-utf8,
548         [  --enable-lang-de-utf8        German language support (UTF-8)],
549         [case "${enableval}" in
550                 yes) lang_de_utf8=true  ;;
551                 no)  lang_de_utf8=false ;;
552                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-de-utf8) ;;
553         esac],
554         [lang_de_utf8=false])
556 AM_CONDITIONAL(LANG_DE_UTF8, test x$lang_de_utf8 = xtrue)
558 AC_ARG_ENABLE(lang-es,
559         [  --enable-lang-es             Spanish language support],
560         [case "${enableval}" in
561                 yes) lang_es=true  ;;
562                 no)  lang_es=false ;;
563                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-es) ;;
564         esac],
565         [lang_es=false])
567 AC_SUBST(lang_es)
568 AM_CONDITIONAL(LANG_ES, test x$lang_es = xtrue)
570 AC_ARG_ENABLE(lang-es-utf8,
571         [  --enable-lang-es-utf8        Spanish language support (UTF-8)],
572         [case "${enableval}" in
573                 yes) lang_es_utf8=true  ;;
574                 no)  lang_es_utf8=false ;;
575                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-es-utf8) ;;
576         esac],
577         [lang_es_utf8=false])
579 AM_CONDITIONAL(LANG_ES_UTF8, test x$lang_es_utf8 = xtrue)
581 AC_ARG_ENABLE(lang-pt,
582         [  --enable-lang-pt             Portuguese language support],
583         [case "${enableval}" in
584                 yes) lang_pt=true  ;;
585                 no)  lang_pt=false ;;
586                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-pt) ;;
587         esac],
588         [lang_pt=false])
590 AC_SUBST(lang_pt)
591 AM_CONDITIONAL(LANG_PT, test x$lang_pt = xtrue)
593 AC_ARG_ENABLE(lang-pt-utf8,
594         [  --enable-lang-pt-utf8        Portuguese language support (UTF-8)],
595         [case "${enableval}" in
596                 yes) lang_pt_utf8=true  ;;
597                 no)  lang_pt_utf8=false ;;
598                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-pt-utf8) ;;
599         esac],
600         [lang_pt_utf8=false])
602 AM_CONDITIONAL(LANG_PT_UTF8, test x$lang_pt_utf8 = xtrue)
604 AC_ARG_ENABLE(lang-pt_BR,
605         [  --enable-lang-pt_BR          Brazilian Portuguese language support],
606         [case "${enableval}" in
607                 yes) lang_pt_br=true  ;;
608                 no)  lang_pt_br=false ;;
609                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-pt_BR) ;;
610         esac],
611         [lang_pt_br=false])
613 AC_SUBST(lang_pt_br)
614 AM_CONDITIONAL(LANG_PT_BR, test x$lang_pt_br = xtrue)
616 AC_ARG_ENABLE(lang-pt_BR-utf8,
617         [  --enable-lang-pt_BR-utf8     Brazilian Portuguese language support (UTF-8)],
618         [case "${enableval}" in
619                 yes) lang_pt_br_utf8=true  ;;
620                 no)  lang_pt_br_utf8=false ;;
621                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-pt_BR-utf8) ;;
622         esac],
623         [lang_pt_br_utf8=false])
625 AM_CONDITIONAL(LANG_PT_BR_UTF8, test x$lang_pt_br_utf8 = xtrue)
627 AC_ARG_ENABLE(recode,
628         [  --enable-recode              Use recode for charset conversion],
629         [case "${enableval}" in
630                 yes) use_recode=true  ;;
631                 no)  use_recode=false ;;
632                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-recode) ;;
633         esac],
634         [use_recode=false])
636 dnl iconv and/or recode
637 AC_CHECK_PROG(iconv_found,iconv,true,false)
638 AC_CHECK_PROG(recode_found,recode,true,false)
640 if test x"${use_recode}" = xtrue ; then
641     if test x"${recode_found}" = xfalse ; then
642         AC_MSG_ERROR(No recode found)
643     fi
644 elif test x"${iconv_found}" = xfalse ; then
645     use_recode=true 
646 else
647     use_recode=false
650 AM_CONDITIONAL(USE_RECODE, test x$use_recode = xtrue)
652 dnl Optionally build the windows CHM help files
653 dnl default to false as requires win32 and Microsoft HTML Help Workshop
654 AC_ARG_ENABLE(chm,
655   [  --enable-chm                 Build Windows CHM help files],
656   [case "${enableval}" in
657                 yes) chm=true ;;
658                 no)  chm=false ;;
659                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-chm) ;;
660    esac],
661    [chm=false])
662 AM_CONDITIONAL(CHM, test x$chm = xtrue)
663 dnl hhc is the HTML Help Compiler for CHM documentation
664 hhc_default_name=hhc$EXEEXT
665 AC_ARG_WITH(hhc,
666         [  --with-hhc=<prog>            Use HTML Help Compiler executable <prog> (default hhc)],
667         [hhc=true
668         if test "$withval" = "yes"; then
669                 HHC="${hhc_default_name}"
670         else
671                 HHC="$withval"
672         fi],
673         [HHC="${hhc_default_name}"])
675 # Check that hhc exists, using AC_CHECK_PROG
676 if test x$chm = xtrue; then
677   if test -x "${HHC}"; then
678     # HHC was a path to the executable, and it existed, which is
679     # great! We still say something to the caller, since this is
680     # probably less confusing.
681     AC_MSG_CHECKING([for hhc])
682     AC_MSG_RESULT([yes])
683   else
684     AC_CHECK_PROG(hhc_found, ${HHC}, yes)
685     if test x"${hhc_found}" != x"yes"; then
686       AC_MSG_ERROR([HTML Help Compiler executable ${HHC} not found])
687     fi
688   fi
691 dnl Optionally build xmaxima.exe under windows
692 dnl default to false as additional software
693 AC_ARG_ENABLE(xmaxima_exe,
694   [  --enable-xmaxima-exe         Build Windows xmaxima.exe for installer],
695   [case "${enableval}" in
696                 yes) xmaxima_exe=true ;;
697                 no)  xmaxima_exe=false ;;
698                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmaxima-exe) ;;
699    esac],
700    [xmaxima_exe=false])
701 AM_CONDITIONAL(XMAXIMA_EXE, test x$xmaxima_exe = xtrue)
703 dnl Optionally build xmaxima.exe under windows
704 dnl default to false as additional software
705 AC_ARG_ENABLE(winkill_exe,
706   [  --enable-winkill             Build Windows winkill.exe and winkill_lib.dll for installer],
707   [case "${enableval}" in
708                 yes) winkill_exe=true ;;
709                 no)  winkill_exe=false ;;
710                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-winkill-exe) ;;
711    esac],
712    [winkill_exe=false])
713 AM_CONDITIONAL(WINKILL_EXE, test x$winkill_exe = xtrue)
715 dnl Should we build a win64 installer?
716 AC_ARG_ENABLE(win64-installer,
717   [  --enable-win64-installer     Build a 64bit installer on Windows],
718   [case "${enableval}" in
719                 yes) win64_installer=true ;;
720                 no) win64_installer=false ;;
721                 *) AC_MSG_ERROR(bad valu ${enableval} for --enable-win64-installer) ;;
722   esac],
723   [win64_installer=false])
724 AM_CONDITIONAL(WIN64_INSTALLER, test x$win64_installer = xtrue)
725 AC_SUBST(win64_installer)
727 dnl Enable use of MathJax in the html documentation.  This just loads
728 dnl MathJax in each html file.  The texi files need to put the
729 dnl appropriate @html/@end html text to generate the equations for MathJax.
730 AC_ARG_ENABLE(mathjax,
731   [  --enable-mathjax             Enable MathJax support for html manual],
732   [case "${enableval}" in
733       yes) mathjax=true
734            mathjax_enable='@set mathjax true'
735            mathjax_script="<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>"
737       no)  mathjax=false
738            mathjax_enable='@clear mathjax'
739            mathjax_script="";;
740       *) AC_MSG_ERROR(bad value ${enableval} for --enable-mathjax) ;;
741    esac],
742   [mathjax=false])
743 AM_CONDITIONAL(MATHJAX, test x$mathjax = xtrue)
744 AC_SUBST(mathjax_script)
745 AC_SUBST(mathjax_enable)
747 dnl Tools for building xmaxima.exe on windows
748 dnl Hard code the filenames for now.  Can over-ride on make command line
749 GCCVER=undefined
750 if test x${xmaxima_exe} = xtrue ; then
751   GCCVER=`gcc -dumpversion`
752   dnl http://tclkits.rkeene.org/fossil/wiki?name=Downloads
753   dnl and http://www.tcl.tk/starkits/
754   TCLKITSH=/c/programs/star/tclkitsh-8.6.3-win32-ix86.exe
755   TCLKIT_RUNTIME=/c/programs/star/tclkit-8.6.3-win32-ix86.exe
756   SDXKIT=/c/programs/star/sdx.kit
757   IMGKIT=/c/programs/star/img.kit
760 AC_SUBST(GCCVER)
761 AC_SUBST(TCLKITSH)
762 AC_SUBST(TCLKIT_RUNTIME)
763 AC_SUBST(SDXKIT)
764 AC_SUBST(IMGKIT)
765 AM_CONDITIONAL(GCC331, test x${GCCVER} = x3.3.1)
767 if test x"${explicit_lisp}" = xfalse ; then
768         dnl See if any of the lisps can be found
769         AC_CHECK_PROG(clisp_found,${clisp_default_name},true,false)
770         AC_CHECK_PROG(gcl_found,${gcl_default_name},true,false)
771         AC_CHECK_PROG(cmucl_found,$CMUCL_NAME,true,false)
772         AC_CHECK_PROG(scl_found,$SCL_NAME,true,false)
773         AC_CHECK_PROG(sbcl_found,$SBCL_NAME,true,false)
774         AC_CHECK_PROG(acl_found,$ACL_NAME,true,false)
775         AC_CHECK_PROG(openmcl_found,$OPENMCL_NAME,true,false)
776         AC_CHECK_PROG(ecl_found,$ECL_NAME,true,false)
778         if test x"${clisp_found}" = xtrue ; then
779                 clisp=true
780                 lisps_enabled="${lisps_enabled} clisp"
781         elif test x"${gcl_found}" = xtrue ; then
782                 gcl=true
783                 lisps_enabled="${lisps_enabled} gcl"
784         elif test x"${cmucl_found}" = xtrue ; then
785                 cmucl=true
786                 lisps_enabled="${lisps_enabled} cmucl"
787         elif test x"${scl_found}" = xtrue ; then
788                 scl=true
789                 lisps_enabled="${lisps_enabled} scl"
790         elif test x"${sbcl_found}" = xtrue ; then
791                 sbcl=true
792                 lisps_enabled="${lisps_enabled} sbcl"
793         elif test x"${acl_found}" = xtrue ; then
794                 acl=true
795                 lisps_enabled="${lisps_enabled} acl"
796         elif test x"${ecl_found}" = xtrue ; then
797                 ecl=true
798                 lisps_enabled="${lisps_enabled} ecl"
799         else
800                 AC_MSG_ERROR(No lisp implementation specified and none of the default executables [${clisp_default_name}(clisp),${gcl_default_name}(GCL),${cmucl_default_name}(CMUCL),${scl_default_name}(SCL),${sbcl_default_name}(SBCL),${acl_default_name}(ACL),${openmcl_default_name}(OpenMCL),${ecl_default_name}(ECL)] were found in PATH)
801         fi
804 AM_CONDITIONAL(CLISP, test x$clisp = xtrue)
805 AM_CONDITIONAL(CLISP_EXEC, test x$clisp_exec = xtrue)
806 AM_CONDITIONAL(GCL, test x$gcl = xtrue)
807 AM_CONDITIONAL(CMUCL, test x$cmucl = xtrue)
808 AM_CONDITIONAL(CMUCL_EXEC, test x${cmucl_exec} = xtrue)
809 AM_CONDITIONAL(SCL, test x$scl = xtrue)
810 AM_CONDITIONAL(SBCL, test x$sbcl = xtrue)
811 AM_CONDITIONAL(SBCL_EXEC, test x$sbcl_exec = xtrue)
812 AM_CONDITIONAL(ACL, test x$acl = xtrue)
813 AM_CONDITIONAL(OPENMCL, test x$openmcl = xtrue)
814 AM_CONDITIONAL(OPENMCL_EXEC, test x${openmcl_exec} = xtrue)
815 AM_CONDITIONAL(ECL, test x$ecl = xtrue)
817 if test x"${clisp}" = xtrue; then
818     if test x"${CLISP_RUNTIME_PATH}" = x"" ; then
819         if test x"${mingw}" = xtrue ; then
820             CLISP_RUNTIME_PATH=`${CLISP_NAME} -norc -q -x "(format nil \"~a${CLISP_RUNTIME}\" (namestring *lib-directory*))"|sed 's/\"\\(.*\\)\"/\\1/'`
821         else
822             CLISP_RUNTIME_PATH=`${CLISP_NAME} -norc -q -x "(format nil \"~abase/${CLISP_RUNTIME}\" (namestring *lib-directory*))"|sed 's/\"\\(.*\\)\"/\\1/'`
823         fi
824     fi
825     if test -x ${CLISP_RUNTIME_PATH} ; then
826         echo "clisp runtime is \"${CLISP_RUNTIME_PATH}\""
827     else
828         AC_MSG_ERROR(clisp runtime \"${CLISP_RUNTIME_PATH}\" is not an executable)
829     fi
830     CLISP_RUNTIME=`basename ${CLISP_RUNTIME_PATH}`
833 if test x"${cmucl}" = xtrue; then
834     if test x"${CMUCL_RUNTIME_PATH}" = x"" ; then
835         CMUCL_RUNTIME_PATH=`${CMUCL_NAME} -noinit -nositeinit -quiet -batch -eval '#-cmu18 (progn (setf (search-list "cmuclbin:") (append (lisp::parse-unix-search-path lisp::*cmucl-lib*) (mapcar (function (lambda (p) (concatenate (quote string) p "../bin/"))) (lisp::parse-unix-search-path lisp::*cmucl-lib*))))(enumerate-search-list (s "cmuclbin:lisp") (when (probe-file s) (format t "~A~%" s) (quit)))) #+cmu18 (format t "~a/../bin/lisp~%" common-lisp::*cmucl-lib*)(quit)'`
836     fi
837     if test -x "${CMUCL_RUNTIME_PATH}" ; then
838         echo "cmucl runtime is \"${CMUCL_RUNTIME_PATH}\""
839     else
840 dnl last chance: find CMUCL_NAME in path. Use it if it doesn't appear to
841 dnl be a shell script.
842         cmucl_path=`type -p "${CMUCL_NAME}"`
843         if test x"`grep -c '#!.*bin.*sh.*' ${cmucl_path}`" = x"0" ; then
844                 CMUCL_RUNTIME_PATH="${cmucl_path}"
845         else
846                 AC_MSG_ERROR([Unable to determine CMUCL runtime path.
847 The best guess for CMUCL runtime, \"${CMUCL_RUNTIME_PATH}\", is not
848 an executable. Use the argument
849    --with-cmucl-runtime=<path>
850 to set the actual CMUCL executable. If the CMUCL lisp command is a shell
851 script the CMUCL executable is the program exec'd by that shell script.])
852         fi
853     fi
854     CMUCL_RUNTIME=`basename ${CMUCL_RUNTIME_PATH}`
856 dnl cmucl final check
857    result=`"${CMUCL_RUNTIME_PATH}" -quiet -eval '(format t "MAXIMA_CMUCL_TEST_SUCCESS%")(quit)'`
858    retval=$?
859    if test ! x"${retval}" = x"0" ; then
860       AC_MSG_ERROR(unable to run cmucl runtime = "${CMUCL_RUNTIME_PATH}". 
861 Please specify the full path of the cmucl runtime using the 
862     --with-cmucl-runtime=<path>
863 flag.)
864    fi
865    count=`echo "${result}" | grep -c "MAXIMA_CMUCL_TEST_SUCCESS"`
866    if test ! "${count}" = "1" ; then
867       AC_MSG_ERROR(an error occured while checking cmucl runtime)
868    fi
871 if test x"${scl}" = xtrue; then
872     if test x"${SCL_RUNTIME_PATH}" = x"" ; then
873         SCL_RUNTIME_PATH=`${SCL_NAME} -noinit -nositeinit -quiet -batch -eval '(progn (enumerate-pathname-translations (pathname "file://library/../bin/lisp") (when (probe-file pathname) (format t "~A~%" (unix-namestring pathname)))) (quit))'`
874     fi
875     if test -x "${SCL_RUNTIME_PATH}" ; then
876         echo "scl runtime is \"${SCL_RUNTIME_PATH}\""
877     else
878 dnl last chance: find SCL_NAME in path. Use it if it doesn't appear to
879 dnl be a shell script.
880         scl_path=`type -p "${SCL_NAME}"`
881         if test x"`grep -c '#!.*bin.*sh.*' ${scl_path}`" = x"0" ; then
882                 SCL_RUNTIME_PATH="${scl_path}"
883         else
884                 AC_MSG_ERROR([Unable to determine SCL runtime path.
885 The best guess for SCL runtime, \"${SCL_RUNTIME_PATH}\", is not
886 an executable. Use the argument
887    --with-scl-runtime=<path>
888 to set the actual SCL executable. If the SCL lisp command is a shell
889 script the SCL executable is the program exec'd by that shell script.])
890         fi
891     fi
892     SCL_RUNTIME=`basename ${SCL_RUNTIME_PATH}`
895 if test x"${gcl}" = xtrue; then
896    result=`"${GCL_NAME}" -batch -eval '#+ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_SUCCESS~%") #-ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_FAILURE~%")' -eval '(si::bye)'`
897    retval=$?
898    if test ! x"${retval}" = x"0" ; then
899       AC_MSG_ERROR(unable to run gcl executable \"${GCL_NAME}\".)
900    fi
901    count=`echo "${result}" | grep -c "MAXIMA_GCL_ANSI_TEST_SUCCESS"`
902    if test ! "${count}" = "1" ; then
903       AC_MSG_ERROR([The gcl executable \"${GCL_NAME}\" was not compiled with
904 the --enable-ansi flag, which is required for Maxima.
905 The gcl ANSI-CL check returned
906 \"${result}\".])
907    fi
910 AC_ARG_ENABLE(gcl-alt-link,
911         [  --enable-gcl-alt-link        Use GCL's alternate linking mechanism],
912         [case "${enableval}" in
913                 yes) gcl_alt_link=true ;;
914                 no)  gcl_alt_link=false ;;
915                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gcl-alt-link) ;;
916         esac],
917         [gcl_alt_link=false])
919 AM_CONDITIONAL(GCL_ALT_LINK, test x$gcl_alt_link = xtrue)
921 AC_ARG_WITH(default-lisp,
922         [  --with-default-lisp=<lisp>   Set default lisp implementation to <lisp>],
923         [case "${withval}" in
924                 clisp)
925                         if test x"${clisp}" = xtrue ; then
926                                 DEFAULTLISP=clisp
927                         else
928                                 AC_MSG_ERROR(clisp not enabled)
929                         fi
930                         ;;
931                 cmucl)
932                         if test x"${cmucl}" = xtrue ; then
933                                 DEFAULTLISP=cmucl
934                         else
935                                 AC_MSG_ERROR(cmucl not enabled)
936                         fi
937                         ;;
938                 scl)
939                         if test x"${scl}" = xtrue ; then
940                                 DEFAULTLISP=scl
941                         else
942                                 AC_MSG_ERROR(scl not enabled)
943                         fi
944                         ;;
945                 sbcl)
946                         if test x"${sbcl}" = xtrue ; then
947                                 DEFAULTLISP=sbcl
948                         else
949                                 AC_MSG_ERROR(sbcl not enabled)
950                         fi
951                         ;;
952                 gcl)
953                         if test x"${gcl}" = xtrue ; then
954                                 DEFAULTLISP=gcl
955                         else
956                                 AC_MSG_ERROR(gcl not enabled)
957                         fi
958                         ;;      
959                 acl)
960                         if test x"${acl}" = xtrue ; then
961                                 DEFAULTLISP=acl
962                         else
963                                 AC_MSG_ERROR(acl not enabled)
964                         fi
965                         ;;      
966                 openmcl)
967                         if test x"${openmcl}" = xtrue ; then
968                                 DEFAULTLISP=openmcl
969                         else
970                                 AC_MSG_ERROR(openmcl not enabled)
971                         fi
972                         ;;              
973                 ecl)
974                         if test x"${ecl}" = xtrue ; then
975                                 DEFAULTLISP=ecl
976                         else
977                                 AC_MSG_ERROR(ecl not enabled)
978                         fi
979                         ;;              
980                 *) 
981                         AC_MSG_ERROR(Unknown argument ${DEFAULTLISP} to --with-default-lisp) 
982                         ;;
983         esac],
984         [if test x"${clisp}" = xtrue ; then
985                 DEFAULTLISP=clisp
986         elif test x"${cmucl}" = xtrue ; then
987                 DEFAULTLISP=cmucl
988         elif test x"${scl}" = xtrue ; then
989                 DEFAULTLISP=scl
990         elif test x"${sbcl}" = xtrue ; then
991                 DEFAULTLISP=sbcl
992         elif test x"${gcl}" = xtrue ; then
993                 DEFAULTLISP=gcl
994         elif test x"${acl}" = xtrue ; then
995                 DEFAULTLISP=acl
996         elif test x"${openmcl}" = xtrue ; then
997                 DEFAULTLISP=openmcl
998         elif test x"${ecl}" = xtrue ; then
999                 DEFAULTLISP=ecl
1000         else
1001                 AC_MSG_ERROR(Internal error. No lisp enabled. Please contact maintainer.)
1002         fi])
1004 AC_SUBST(CLISP_NAME)
1005 AC_SUBST(CLISP_RUNTIME)
1006 AC_SUBST(CLISP_RUNTIME_PATH)
1007 AC_SUBST(CMUCL_NAME)
1008 AC_SUBST(CMUCL_RUNTIME)
1009 AC_SUBST(CMUCL_RUNTIME_PATH)
1010 AC_SUBST(CMUCL_EXEC)
1011 AC_SUBST(SCL_NAME)
1012 AC_SUBST(SCL_RUNTIME)
1013 AC_SUBST(SCL_RUNTIME_PATH)
1014 AC_SUBST(SBCL_NAME)
1015 AC_SUBST(GCL_NAME)
1016 AC_SUBST(ACL_NAME)
1017 AC_SUBST(OPENMCL_NAME)
1018 AC_SUBST(ECL_NAME)
1019 AC_SUBST(DEFAULTLISP)
1020 AC_SUBST(HHC)
1021 AC_SUBST(lisps_enabled)
1023 AC_ARG_WITH(posix-shell,
1024         [  --with-posix-shell=<path>    Use <shell> for maxima script (default /bin/sh)],
1025         [posix_shell_list="${withval}"],
1026         [posix_shell_list="/bin/sh /bin/bash /usr/bin/bash /usr/local/bin/bash"])
1028 AC_ARG_WITH(wish,
1029         [  --with-wish=<prog>           Use <prog> for Tk wish shell (default wish)],
1030         [WISH="${withval}"],
1031         [WISH="wish"])
1032 AC_SUBST(WISH)
1035 AC_MSG_CHECKING(POSIX shell to see that it contains getopts)
1036 cat <<EOF > conftest-posix-shell.sh
1037 getopts "ab:" opt
1038 result="\$?"
1039 echo "result is \$result"
1040 exit "\$result"
1042 POSIX_SHELL=""
1043 for shell in $posix_shell_list
1045         if test -z "$POSIX_SHELL" ; then
1046                 echo "trying $shell"
1047                 $shell conftest-posix-shell.sh -a > /dev/null 2>&1
1048                 if test "$?" = "0" ; then
1049                         POSIX_SHELL="$shell"
1050                 fi
1051         fi
1052 done
1053 rm -f conftest-posix-shell.sh
1054 if test -n "$POSIX_SHELL" ; then
1055         AC_MSG_RESULT(POSIX shell is $POSIX_SHELL)
1056 else
1057         AC_MSG_WARN(Could not find a shell that supports getopts. 
1058 The maxima wrapper script will be unusable. The shell may be specified
1059 with --with-posix-shell=</path/to/shell>)
1061 AC_SUBST(POSIX_SHELL)
1063 if test x"${prefix}" = xNONE ; then
1064         tmp_prefix="/usr/local"
1065 else
1066         tmp_prefix="${prefix}"
1068 if test x"${exec_prefix}" = xNONE ; then
1069         tmp_exec_prefix="${tmp_prefix}"
1070 else
1071         tmp_exec_prefix="${exec_prefix}"
1073 expanded_top_srcdir="$(cd "$top_srcdir" 1>/dev/null 2>/dev/null; pwd)"
1074 expanded_exec_prefix="${tmp_exec_prefix}"
1075 expanded_libdir="$(eval "exec_prefix=\"${tmp_exec_prefix}\";echo ${libdir}")"
1076 expanded_libexecdir="$(eval "exec_prefix=\"${tmp_exec_prefix}\";echo ${libexecdir}")"
1077 expanded_datadir="$(eval "prefix=\"${tmp_prefix}\";datarootdir=\"${datarootdir}\";echo ${datadir}")"
1078 expanded_infodir="$(eval "prefix=\"${tmp_prefix}\";datarootdir=\"${datarootdir}\";echo ${infodir}")"
1081 dnl Find all the directories in share, but remove the share directory
1082 dnl itself and all CVS directories (if any) and fortran directories.
1083 dnl Remove the leading "share" part of the path, and add double-quotes
1084 dnl around it.
1086 #default_sharedirs=`find share -type d | sort | egrep -v 'share$|CVS|/fortran' | sed 's;share/\(.*\);        "\1" \\\\;' | sed '$s;\\\\;;'`
1087 default_sharedirs=`find share -type d | sort | egrep -v 'share$|CVS|/fortran' | sed 's;share/\(.*\);"\1";' | tr '\n' ' '`
1089 AC_SUBST(expanded_top_srcdir)
1090 AC_SUBST(expanded_exec_prefix)
1091 AC_SUBST(expanded_libdir)
1092 AC_SUBST(expanded_libexecdir)
1093 AC_SUBST(expanded_datadir)
1094 AC_SUBST(expanded_infodir)
1095 default_layout_autotools="true"
1096 AC_SUBST(default_layout_autotools)
1097 AC_SUBST(LDFLAGS)
1098 AC_SUBST(default_sharedirs)
1100 dnl Look for grep that can handle long lines and -e.
1101 AC_PROG_EGREP
1102 AC_SUBST(EGREP)
1103 AC_PATH_PROG([CAT],[cat])
1104 AC_PROG_SED
1105 AC_PROG_AWK
1106 AM_PATH_PYTHON
1108 # Configure these files and make them executable
1109 AC_CONFIG_FILES([maxima-local], chmod +x maxima-local)
1110 AC_CONFIG_FILES([xmaxima-local], chmod +x xmaxima-local)
1112 # Convert maxima.bat to DOS line ending
1113 # sed-3.02 in old mingw distribution doesn't support -i or \r
1114 # dos2unix may not be present, but perl is required elsewhere
1115 # perl -i interferes with binmode so need to use a temporary file
1116 AC_CONFIG_FILES([src/maxima.bat], (perl -ne 'BEGIN{binmode(STDOUT,":crlf")};' -e 'print' < src/maxima.bat > src/maxima.bat.tmp; mv src/maxima.bat.tmp src/maxima.bat))
1118 AC_OUTPUT(Makefile maxima.spec maxima.iss \
1119 admin/Makefile src/Makefile src/maxima src/rmaxima src/autoconf-variables.lisp \
1120 src/share-subdirs.lisp \
1121 lisp-utils/Makefile tests/Makefile doc/Makefile \
1122 crosscompile-windows/Makefile crosscompile-windows/wxwidgets/Makefile \
1123 doc/emaxima/Makefile doc/info/Makefile doc/info/include-maxima.texi \
1124 doc/info/texi2html.init \
1125 doc/info/figures/Makefile \
1126 doc/info/de/Makefile \
1127 doc/info/de.utf8/Makefile doc/info/es/Makefile doc/info/es.utf8/Makefile \
1128 doc/info/pt/Makefile doc/info/pt.utf8/Makefile \
1129 doc/info/pt/include-maxima.texi \
1130 doc/info/pt_BR/Makefile doc/info/pt_BR.utf8/Makefile \
1131 doc/intromax/Makefile doc/man/Makefile doc/man/maxima.1 doc/man/ru/maxima.1 \
1132 doc/share/Makefile interfaces/Makefile interfaces/emacs/Makefile \
1133 interfaces/emacs/emaxima/Makefile interfaces/emacs/imaxima/Makefile \
1134 interfaces/emacs/misc/Makefile interfaces/xmaxima/Makefile \
1135 interfaces/xmaxima/autoconf-variables.tcl interfaces/xmaxima/Tkmaxima/Header.tcl \
1136 interfaces/xmaxima/doc/Makefile interfaces/xmaxima/doc/figures/Makefile \
1137 interfaces/xmaxima/msgs/Makefile interfaces/xmaxima/win32/Makefile \
1138 plotting/mgnuplot share/Makefile demo/Makefile plotting/Makefile locale/Makefile \
1139 share/contrib/Makefile share/contrib/integration/Makefile \
1140 share/contrib/maxima-odesolve/Makefile \
1141 share/draw/Makefile share/logic/Makefile  doc/info/es/include-maxima.texi \
1142 src/lisp)
1144 echo
1145 echo "Summary:"
1146 if test x"${clisp}" = xtrue ; then
1147         echo "clisp enabled. Executable name: \"${CLISP_NAME}\""
1148         echo "clisp runtime is \"${CLISP_RUNTIME_PATH}\""
1150 if test x"${clisp_exec}" = xtrue ; then
1151    echo "clisp executable image enabled for maxima."
1153 if test x"${cmucl}" = xtrue ; then
1154         echo "CMUCL enabled. Executable name: \"${CMUCL_NAME}\""
1155         echo "cmucl runtime is \"${CMUCL_RUNTIME_PATH}\""
1157 if test x"${cmucl_exec}" = xtrue; then
1158         echo "CMUCL executable image enabled for maxima."
1160 if test x"${scl}" = xtrue ; then
1161         echo "SCL enabled. Executable name: \"${SCL_NAME}\""
1162         echo "SCL runtime is \"${SCL_RUNTIME_PATH}\""
1164 if test x"${sbcl}" = xtrue ; then
1165         echo "SBCL enabled. Executable name: \"${SBCL_NAME}\""
1167 if test x"${sbcl_exec}" = xtrue ; then
1168    echo "sbcl executable image enabled for maxima."
1170 if test x"${gcl}" = xtrue ; then
1171         echo "GCL enabled. Executable name: \"${GCL_NAME}\""
1172         if test x"${gcl_alt_link}" = xtrue ; then
1173                 echo "    GCL alternative linking method enabled."
1174         fi
1176 if test x"${acl}" = xtrue ; then
1177         echo "ACL enabled. Executable name: \"${ACL_NAME}\""
1179 if test x"${openmcl}" = xtrue ; then
1180         echo "OpenMCL enabled. Executable name: \"${OPENMCL_NAME}\""
1182 if test x"${openmcl_exec}" = xtrue ; then
1183    echo "OpenMCL executable image enabled for maxima."
1185 if test x"${ecl}" = xtrue ; then
1186         echo "ECL enabled. Executable name: \"${ECL_NAME}\""
1188 echo "default lisp: $DEFAULTLISP"
1189 echo "wish executable name: \"${WISH}\""
1191 if test x"${chm}" = xtrue ; then
1192   echo "CHM help files enabled"
1193   echo "  HHC: \"${HHC}\""
1195 if test x"${xmaxima_exe}" = xtrue ; then
1196    echo "Windows xmaxima.exe enabled"
1197    echo "  GCC version GCCVER: ${GCCVER}"
1198    echo "  TCLKITSH: ${TCLKITSH}"
1199    if ! test -f "${TCLKITSH}" ; then
1200      AC_MSG_WARN(*** TCLKITSH ${TCLKITSH} not found)
1201      xmaxima_exe_prerequisite=notfound
1202    fi
1203    echo "  TCLKIT_RUNTIME: ${TCLKIT_RUNTIME}"
1204    if ! test -f "${TCLKIT_RUNTIME}" ; then
1205      AC_MSG_WARN(*** TCLKIT_RUNTIME ${TCLKIT_RUNTIME} not found)
1206      xmaxima_exe_prerequisite=notfound
1207    fi
1208    echo "  SDXKIT: ${SDXKIT}"
1209    if ! test -f "${SDXKIT}" ; then
1210      AC_MSG_WARN(*** SDXKIT ${SDXKIT} not found)
1211      xmaxima_exe_prerequisite=notfound
1212    fi
1213    echo "  IMGKIT: ${IMGKIT}"
1214    if ! test -f "${IMGKIT}" ; then
1215      AC_MSG_WARN(*** IMGKIT ${IMGKIT} not found)
1216      xmaxima_exe_prerequisite=notfound
1217    fi
1218    if test x${xmaxima_exe_prerequisite} = xnotfound ; then
1219      AC_MSG_WARN([A prerequisite for xmaxima.exe not found.  The missing components can be defined on the make command line.])
1220    fi