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.
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.35post])
12 AC_CONFIG_SRCDIR([src/macsys.lisp])
13 AM_INIT_AUTOMAKE([-Wno-portability])
19 dnl Don't use AC_EXEEXT as that requires a C compiler
38 AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
43 dnl n.b. clisp_default_name is hardcoded in "with" message
44 clisp_default_name=clisp
46 [ --enable-clisp Use clisp],
47 [case "${enableval}" in
49 lisps_enabled="${lisps_enabled} clisp"
52 *) AC_MSG_ERROR(bad value ${enableval} for --enable-clisp) ;;
57 [ --with-clisp=<prog> Use clisp executable <prog> (default clisp)],
59 lisps_enabled="${lisps_enabled} clisp"
61 if test "$withval" = "yes"; then
62 CLISP_NAME="${clisp_default_name}"
66 [CLISP_NAME=${clisp_default_name}])
67 if test x"${win32}" = x"true" ; then
68 CLISP_RUNTIME="lisp.exe"
70 CLISP_RUNTIME="lisp.run"
72 AC_ARG_WITH(clisp-runtime,
73 [ --with-clisp-runtime=<path> Use clisp runtime <path> (default
74 *lib-directory*/base/lisp.run on unix,
75 *lib-directory*\\lisp.exe on windows) ],
77 lisps_enabled="${lisps_enabled} clisp"
78 CLISP_RUNTIME_PATH="$withval"
79 CLISP_RUNTIME=`basename ${CLISP_RUNTIME_PATH}`],
81 AC_ARG_ENABLE(clisp-exec,
82 [ --enable-clisp-exec Create a maxima executable image using CLISP.
83 No check is made if the version of
84 CLISP supports executable images],
85 [case "${enableval}" in
88 lisps_enabled="${lisps_enabled} clisp"
90 no) clisp_exec=false ;;
91 *) AC_MSG_ERROR(bad value ${enableval} for --enable-clisp-exec) ;;
93 CLISP_EXEC=${clisp_exec}],
96 if test x"${clisp}" = xtrue ; then
97 if test `echo "$CLISP_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
98 if test -x "$CLISP_NAME" ; then
104 AC_CHECK_PROG(clisp_found,$CLISP_NAME,true,false)
106 if test x"${clisp_found}" = xfalse ; then
107 AC_MSG_WARN(clisp executable ${CLISP_NAME} not found in PATH)
112 dnl See if git exists. If it does, update VERSION to include a git tag
113 AC_CHECK_PROG(git_found, git, true, false)
114 if test x"${git_found}" = xtrue; then
115 # Test to see if git describe works (discarding any output). If
116 # it works, use it. Otherwise, keep existing value of VERSION.
117 # (git describe fails if git is executed in a non-Git directory, e.g.,
118 # an unpacked tarball. Since the exit codes of git describe are undocumented,
119 # we cannot distinguish that from a missing annotated tag.
120 # Play it safe by refusing to change VERSION.)
121 if git describe > /dev/null 2>&1; then
122 VERSION="`git describe --dirty`"
123 # When building RPMs, hyphens in the version are not allowed, so
124 # replace them with underscores.
125 VERSION=`echo $VERSION | sed 's;-;_;g'`
129 dnl Parses the version number for the manual
130 manual_version=`echo $VERSION | sed 's+branch_++; s+_base++; s+_dirty++; s+_+.+g'`
131 AC_SUBST(manual_version)
133 dnl n.b. cmucl_default_name is hardcoded in "with" message
134 cmucl_default_name=lisp
137 [ --enable-cmucl Use CMUCL],
138 [case "${enableval}" in
140 lisps_enabled="${lisps_enabled} cmucl"
141 explicit_lisp=true ;;
143 *) AC_MSG_ERROR(bad value ${enableval} for --enable-cmucl) ;;
148 [ --with-cmucl=<prog> Use CMUCL executable <prog> (default lisp)],
150 lisps_enabled="${lisps_enabled} cmucl"
152 if test "$withval" = "yes"; then
153 CMUCL_NAME="${cmucl_default_name}"
155 CMUCL_NAME="$withval"
157 [CMUCL_NAME=${cmucl_default_name}])
158 AC_ARG_WITH(cmucl-runtime,
159 [ --with-cmucl-runtime=<path> Use CMUCL runtime <path> (default
160 *cmucl-lib*/../bin/lisp)],
162 lisps_enabled="${lisps_enabled} cmucl"
163 CMUCL_RUNTIME_PATH="$withval"
164 CMUCL_RUNTIME=`basename ${CMUCL_RUNTIME_PATH}`],
166 AC_ARG_ENABLE(cmucl-exec,
167 [ --enable-cmucl-exec Create a maxima executable image using CMUCL.
168 No check is made if the version of
169 CMUCL supports executable images],
170 [case "${enableval}" in
173 lisps_enabled="${lisps_enabled} cmucl"
174 explicit_lisp=true ;;
175 no) cmucl_exec=false ;;
176 *) AC_MSG_ERROR(bad value ${enableval} for --enable-cmucl-exec) ;;
178 CMUCL_EXEC=${cmucl_exec}],
181 if test x"${cmucl}" = xtrue ; then
182 if test `echo "$CMUCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
183 if test -x "$CMUCL_NAME" ; then
189 AC_CHECK_PROG(cmucl_found,$CMUCL_NAME,true,false)
191 AC_CHECK_PROG(cmucl_found,$CMUCL_NAME,true,false)
192 if test x"${cmucl_found}" = xfalse ; then
193 AC_MSG_WARN(cmucl executable ${CMUCL_NAME} not found in PATH)
197 dnl n.b. scl_default_name is hardcoded in "with" message
201 [ --enable-scl Use SCL],
202 [case "${enableval}" in
204 lisps_enabled="${lisps_enabled} scl"
205 explicit_lisp=true ;;
207 *) AC_MSG_ERROR(bad value ${enableval} for --enable-scl) ;;
212 [ --with-scl=<prog> Use SCL executable <prog> (default scl)],
214 lisps_enabled="${lisps_enabled} scl"
216 if test "$withval" = "yes"; then
217 SCL_NAME="${scl_default_name}"
221 [SCL_NAME=${scl_default_name}])
222 AC_ARG_WITH(scl-runtime,
223 [ --with-scl-runtime=<path> Use SCL runtime <path> (default
224 file://library/../bin/lisp)],
226 lisps_enabled="${lisps_enabled} scl"
227 SCL_RUNTIME_PATH="$withval"
228 SCL_RUNTIME=`basename ${SCL_RUNTIME_PATH}`],
230 if test x"${scl}" = xtrue ; then
231 if test `echo "$SCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
232 if test -x "$SCL_NAME" ; then
238 AC_CHECK_PROG(scl_found,$SCL_NAME,true,false)
240 AC_CHECK_PROG(scl_found,$SCL_NAME,true,false)
241 if test x"${scl_found}" = xfalse ; then
242 AC_MSG_WARN(scl executable ${SCL_NAME} not found in PATH)
246 dnl n.b. sbcl_default_name is hardcoded in "with" message
247 sbcl_default_name=sbcl
249 [ --enable-sbcl Use SBCL],
250 [case "${enableval}" in
252 lisps_enabled="${lisps_enabled} sbcl"
253 explicit_lisp=true ;;
255 *) AC_MSG_ERROR(bad value ${enableval} for --enable-sbcl) ;;
260 [ --with-sbcl=<prog> Use SBCL executable <prog> (default sbcl)],
262 lisps_enabled="${lisps_enabled} sbcl"
264 if test "$withval" = "yes"; then
265 SBCL_NAME="${sbcl_default_name}"
269 [SBCL_NAME="${sbcl_default_name}"])
270 AC_ARG_ENABLE(sbcl-exec,
271 [ --enable-sbcl-exec Create a maxima executable image using SBCL.
272 No check is made if the version of
273 SBCL supports executable images],
274 [case "${enableval}" in
277 lisps_enabled="${lisps_enabled} sbcl"
278 explicit_lisp=true ;;
279 no) sbcl_exec=false ;;
280 *) AC_MSG_ERROR(bad value ${enableval} for --enable-sbcl-exec) ;;
282 SBCL_EXEC=${sbcl_exec}],
285 if test x"${sbcl}" = xtrue ; then
286 if test `echo "$SBCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
287 if test -x "$SBCL_NAME" ; then
293 AC_CHECK_PROG(sbcl_found,"$SBCL_NAME",true,false)
295 AC_CHECK_PROG(sbcl_found,"$SBCL_NAME",true,false)
296 if test x"${sbcl_found}" = xfalse ; then
297 AC_MSG_WARN(sbcl executable "${SBCL_NAME}" not found in PATH)
301 dnl n.b. acl_default_name is hardcoded in "with" message
302 acl_default_name=lisp
304 [ --enable-acl Use ACL],
305 [case "${enableval}" in
307 lisps_enabled="${lisps_enabled} acl"
308 explicit_lisp=true ;;
310 *) AC_MSG_ERROR(bad value ${enableval} for --enable-acl) ;;
315 [ --with-acl=<prog> Use ACL executable <prog> (default lisp)],
317 lisps_enabled="${lisps_enabled} acl"
319 if test "$withval" = "yes"; then
320 ACL_NAME="${acl_default_name}"
324 [ACL_NAME=${acl_default_name}])
325 if test x"${acl}" = xtrue ; then
326 if test `echo "$ACL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
327 if test -x "$ACL_NAME" ; then
333 AC_CHECK_PROG(acl_found,$ACL_NAME,true,false)
335 AC_CHECK_PROG(acl_found,$ACL_NAME,true,false)
336 if test x"${acl_found}" = xfalse ; then
337 AC_MSG_WARN(acl executable ${ACL_NAME} not found in PATH)
341 dnl n.b. gcl_default_name is hardcoded in "with" message
344 [ --enable-gcl Use GCL],
345 [case "${enableval}" in
347 lisps_enabled="${lisps_enabled} gcl"
350 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gcl) ;;
354 [ --with-gcl=<prog> Use GCL executable <prog> (default gcl)],
356 lisps_enabled="${lisps_enabled} gcl"
358 if test "$withval" = "yes"; then
359 GCL_NAME="${gcl_default_name}"
363 [GCL_NAME=${gcl_default_name}])
364 if test x"${gcl}" = xtrue ; then
365 if test `echo "$GCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
366 if test -x "$GCL_NAME" ; then
372 AC_CHECK_PROG(gcl_found,$GCL_NAME,true,false)
374 if test x"${gcl_found}" = xfalse ; then
375 AC_MSG_WARN(gcl executable ${GCL_NAME} not found in PATH)
379 dnl n.b. openmcl_default_name is hardcoded in "with" message
380 openmcl_default_name=openmcl
381 AC_ARG_ENABLE(openmcl,
382 [ --enable-openmcl Use OpenMCL],
383 [case "${enableval}" in
385 lisps_enabled="${lisps_enabled} openmcl"
388 *) AC_MSG_ERROR(bad value ${enableval} for --enable-openmcl) ;;
392 [ --with-openmcl=<prog> Use OpenMCL executable <prog> (default openmcl)],
394 lisps_enabled="${lisps_enabled} openmcl"
396 if test "$withval" = "yes"; then
397 OPENMCL_NAME="${openmcl_default_name}"
399 OPENMCL_NAME="$withval"
401 [OPENMCL_NAME=${openmcl_default_name}])
402 AC_ARG_ENABLE(openmcl-exec,
403 [ --enable-openmcl-exec Create a maxima executable image using OPENMCL.
404 No check is made if the version of
405 OPENMCL supports executable images],
406 [case "${enableval}" in
407 yes) openmcl_exec=true
409 lisps_enabled="${lisps_enabled} openmcl"
411 no) openmcl_exec=false ;;
412 *) AC_MSG_ERROR(bad value ${enableval} for --enable-openmcl-exec) ;;
414 OPENMCL_EXEC=${openmcl_exec}],
418 dnl Define ccl as an alias (essentially) for openmcl
420 [ --enable-ccl Use CCL (Clozure Common Lisp)],
421 [case "${enableval}" in
423 lisps_enabled="${lisps_enabled} openmcl"
426 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ccl) ;;
430 [ --with-ccl=<prog> Use OpenMCL executable <prog> (default ccl)],
432 lisps_enabled="${lisps_enabled} openmcl"
434 if test "$withval" = "yes"; then
435 OPENMCL_NAME="${openmcl_default_name}"
437 OPENMCL_NAME="$withval"
439 [OPENMCL_NAME=${openmcl_default_name}])
440 AC_ARG_ENABLE(ccl-exec,
441 [ --enable-ccl-exec Create a maxima executable image using CCL.
442 No check is made if the version of
443 CCL supports executable images],
444 [case "${enableval}" in
445 yes) openmcl_exec=true
447 lisps_enabled="${lisps_enabled} openmcl"
449 no) openmcl_exec=false ;;
450 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ccl-exec) ;;
452 OPENMCL_EXEC=${openmcl_exec}],
456 if test x"${openmcl}" = xtrue ; then
457 if test `echo "$OPENMCL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
458 if test -x "$OPENMCL_NAME" ; then
464 AC_CHECK_PROG(openmcl_found,$OPENMCL_NAME,true,false)
466 if test x"${openmcl_found}" = xfalse ; then
467 AC_MSG_WARN(openmcl executable ${OPENMCL_NAME} not found in PATH)
471 dnl n.b. ecl_default_name is hardcoded in "with" message
474 [ --enable-ecl Use ECL],
475 [case "${enableval}" in
477 lisps_enabled="${lisps_enabled} ecl"
480 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ecl) ;;
484 [ --with-ecl=<prog> Use ECL executable <prog> (default ecl)],
486 lisps_enabled="${lisps_enabled} ecl"
488 if test "$withval" = "yes"; then
489 ECL_NAME="${ecl_default_name}"
493 [ECL_NAME=${ecl_default_name}])
494 if test x"${ecl}" = xtrue ; then
495 if test `echo "$ECL_NAME" | sed 's/\(.\).*/\1/'` = "/" ; then
496 if test -x "$ECL_NAME" ; then
502 AC_CHECK_PROG(ecl_found,$ECL_NAME,true,false)
504 if test x"${ecl_found}" = xfalse ; then
505 AC_MSG_WARN(ecl executable ${ECL_NAME} not found in PATH)
510 AC_ARG_ENABLE(gettext,
511 [ --enable-gettext Locale support],
512 [case "${enableval}" in
513 yes) enable_gettext=true ;;
514 no) enable_gettext=false ;;
515 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gettext) ;;
517 [enable_gettext=false])
520 AM_CONDITIONAL(ENABLE_GETTEXT, test x$enable_gettext = xtrue)
523 AC_ARG_ENABLE(lang-de,
524 [ --enable-lang-de German language support],
525 [case "${enableval}" in
528 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-de) ;;
532 AM_CONDITIONAL(LANG_DE, test x$lang_de = xtrue)
534 AC_ARG_ENABLE(lang-de-utf8,
535 [ --enable-lang-de-utf8 German language support (UTF-8)],
536 [case "${enableval}" in
537 yes) lang_de_utf8=true ;;
538 no) lang_de_utf8=false ;;
539 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-de-utf8) ;;
541 [lang_de_utf8=false])
543 AM_CONDITIONAL(LANG_DE_UTF8, test x$lang_de_utf8 = xtrue)
545 AC_ARG_ENABLE(lang-es,
546 [ --enable-lang-es Spanish language support],
547 [case "${enableval}" in
550 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-es) ;;
555 AM_CONDITIONAL(LANG_ES, test x$lang_es = xtrue)
557 AC_ARG_ENABLE(lang-es-utf8,
558 [ --enable-lang-es-utf8 Spanish language support (UTF-8)],
559 [case "${enableval}" in
560 yes) lang_es_utf8=true ;;
561 no) lang_es_utf8=false ;;
562 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-es-utf8) ;;
564 [lang_es_utf8=false])
566 AM_CONDITIONAL(LANG_ES_UTF8, test x$lang_es_utf8 = xtrue)
568 AC_ARG_ENABLE(lang-pt,
569 [ --enable-lang-pt Portuguese language support],
570 [case "${enableval}" in
573 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-pt) ;;
578 AM_CONDITIONAL(LANG_PT, test x$lang_pt = xtrue)
580 AC_ARG_ENABLE(lang-pt-utf8,
581 [ --enable-lang-pt-utf8 Portuguese language support (UTF-8)],
582 [case "${enableval}" in
583 yes) lang_pt_utf8=true ;;
584 no) lang_pt_utf8=false ;;
585 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-pt-utf8) ;;
587 [lang_pt_utf8=false])
589 AM_CONDITIONAL(LANG_PT_UTF8, test x$lang_pt_utf8 = xtrue)
591 AC_ARG_ENABLE(lang-pt_BR,
592 [ --enable-lang-pt_BR Brazilian Portuguese language support],
593 [case "${enableval}" in
594 yes) lang_pt_br=true ;;
595 no) lang_pt_br=false ;;
596 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-pt_BR) ;;
601 AM_CONDITIONAL(LANG_PT_BR, test x$lang_pt_br = xtrue)
603 AC_ARG_ENABLE(lang-pt_BR-utf8,
604 [ --enable-lang-pt_BR-utf8 Brazilian Portuguese language support (UTF-8)],
605 [case "${enableval}" in
606 yes) lang_pt_br_utf8=true ;;
607 no) lang_pt_br_utf8=false ;;
608 *) AC_MSG_ERROR(bad value ${enableval} for --enable-lang-pt_BR-utf8) ;;
610 [lang_pt_br_utf8=false])
612 AM_CONDITIONAL(LANG_PT_BR_UTF8, test x$lang_pt_br_utf8 = xtrue)
614 AC_ARG_ENABLE(recode,
615 [ --enable-recode Use recode for charset conversion],
616 [case "${enableval}" in
617 yes) use_recode=true ;;
618 no) use_recode=false ;;
619 *) AC_MSG_ERROR(bad value ${enableval} for --enable-recode) ;;
623 dnl iconv and/or recode
624 AC_CHECK_PROG(iconv_found,iconv,true,false)
625 AC_CHECK_PROG(recode_found,recode,true,false)
627 if test x"${use_recode}" = xtrue ; then
628 if test x"${recode_found}" = xfalse ; then
629 AC_MSG_ERROR(No recode found)
631 elif test x"${iconv_found}" = xfalse ; then
637 AM_CONDITIONAL(USE_RECODE, test x$use_recode = xtrue)
639 dnl Optionally build the windows CHM help files
640 dnl default to false as requires win32 and Microsoft HTML Help Workshop
642 [ --enable-chm Build Windows CHM help files],
643 [case "${enableval}" in
646 *) AC_MSG_ERROR(bad value ${enableval} for --enable-chm) ;;
649 AM_CONDITIONAL(CHM, test x$chm = xtrue)
650 dnl hhc is the HTML Help Compiler for CHM documentation
651 hhc_default_name=hhc$EXEEXT
653 [ --with-hhc=<prog> Use HTML Help Compiler executable <prog> (default hhc)],
655 if test "$withval" = "yes"; then
656 HHC="${hhc_default_name}"
660 [HHC="${hhc_default_name}"])
662 # Check that hhc exists, using AC_CHECK_PROG
663 if test x$chm = xtrue; then
664 if test -x "${HHC}"; then
665 # HHC was a path to the executable, and it existed, which is
666 # great! We still say something to the caller, since this is
667 # probably less confusing.
668 AC_MSG_CHECKING([for hhc])
671 AC_CHECK_PROG(hhc_found, ${HHC}, yes)
672 if test x"${hhc_found}" != x"yes"; then
673 AC_MSG_ERROR([HTML Help Compiler executable ${HHC} not found])
678 dnl Optionally build xmaxima.exe under windows
679 dnl default to false as additional software
680 AC_ARG_ENABLE(xmaxima_exe,
681 [ --enable-xmaxima-exe Build Windows xmaxima.exe for installer],
682 [case "${enableval}" in
683 yes) xmaxima_exe=true ;;
684 no) xmaxima_exe=false ;;
685 *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmaxima-exe) ;;
688 AM_CONDITIONAL(XMAXIMA_EXE, test x$xmaxima_exe = xtrue)
690 dnl Optionally build xmaxima.exe under windows
691 dnl default to false as additional software
692 AC_ARG_ENABLE(winkill_exe,
693 [ --enable-winkill Build Windows winkill.exe and winkill_lib.dll for installer],
694 [case "${enableval}" in
695 yes) winkill_exe=true ;;
696 no) winkill_exe=false ;;
697 *) AC_MSG_ERROR(bad value ${enableval} for --enable-winkill-exe) ;;
700 AM_CONDITIONAL(WINKILL_EXE, test x$winkill_exe = xtrue)
702 dnl Tools for building xmaxima.exe on windows
703 dnl Hard code the filenames for now. Can over-ride on make command line
705 if test x${xmaxima_exe} = xtrue ; then
706 GCCVER=`gcc -dumpversion`
707 dnl http://tclkits.rkeene.org/fossil/wiki?name=Downloads
708 dnl and http://www.tcl.tk/starkits/
709 TCLKITSH=/c/programs/star/tclkitsh-8.6.3-win32-ix86.exe
710 TCLKIT_RUNTIME=/c/programs/star/tclkit-8.6.3-win32-ix86.exe
711 SDXKIT=/c/programs/star/sdx.kit
712 IMGKIT=/c/programs/star/img.kit
717 AC_SUBST(TCLKIT_RUNTIME)
720 AM_CONDITIONAL(GCC331, test x${GCCVER} = x3.3.1)
722 if test x"${explicit_lisp}" = xfalse ; then
723 dnl See if any of the lisps can be found
724 AC_CHECK_PROG(clisp_found,${clisp_default_name},true,false)
725 AC_CHECK_PROG(gcl_found,${gcl_default_name},true,false)
726 AC_CHECK_PROG(cmucl_found,$CMUCL_NAME,true,false)
727 AC_CHECK_PROG(scl_found,$SCL_NAME,true,false)
728 AC_CHECK_PROG(sbcl_found,$SBCL_NAME,true,false)
729 AC_CHECK_PROG(acl_found,$ACL_NAME,true,false)
730 AC_CHECK_PROG(openmcl_found,$OPENMCL_NAME,true,false)
731 AC_CHECK_PROG(ecl_found,$ECL_NAME,true,false)
733 if test x"${clisp_found}" = xtrue ; then
735 lisps_enabled="${lisps_enabled} clisp"
736 elif test x"${gcl_found}" = xtrue ; then
738 lisps_enabled="${lisps_enabled} gcl"
739 elif test x"${cmucl_found}" = xtrue ; then
741 lisps_enabled="${lisps_enabled} cmucl"
742 elif test x"${scl_found}" = xtrue ; then
744 lisps_enabled="${lisps_enabled} scl"
745 elif test x"${sbcl_found}" = xtrue ; then
747 lisps_enabled="${lisps_enabled} sbcl"
748 elif test x"${acl_found}" = xtrue ; then
750 lisps_enabled="${lisps_enabled} acl"
751 elif test x"${ecl_found}" = xtrue ; then
753 lisps_enabled="${lisps_enabled} ecl"
755 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)
759 AM_CONDITIONAL(CLISP, test x$clisp = xtrue)
760 AM_CONDITIONAL(CLISP_EXEC, test x$clisp_exec = xtrue)
761 AM_CONDITIONAL(GCL, test x$gcl = xtrue)
762 AM_CONDITIONAL(CMUCL, test x$cmucl = xtrue)
763 AM_CONDITIONAL(CMUCL_EXEC, test x${cmucl_exec} = xtrue)
764 AM_CONDITIONAL(SCL, test x$scl = xtrue)
765 AM_CONDITIONAL(SBCL, test x$sbcl = xtrue)
766 AM_CONDITIONAL(SBCL_EXEC, test x$sbcl_exec = xtrue)
767 AM_CONDITIONAL(ACL, test x$acl = xtrue)
768 AM_CONDITIONAL(OPENMCL, test x$openmcl = xtrue)
769 AM_CONDITIONAL(OPENMCL_EXEC, test x${openmcl_exec} = xtrue)
770 AM_CONDITIONAL(ECL, test x$ecl = xtrue)
772 if test x"${clisp}" = xtrue; then
773 if test x"${CLISP_RUNTIME_PATH}" = x"" ; then
774 if test x"${mingw}" = xtrue ; then
775 CLISP_RUNTIME_PATH=`${CLISP_NAME} -norc -q -x "(format nil \"~a${CLISP_RUNTIME}\" (namestring *lib-directory*))"|sed 's/\"\\(.*\\)\"/\\1/'`
777 CLISP_RUNTIME_PATH=`${CLISP_NAME} -norc -q -x "(format nil \"~abase/${CLISP_RUNTIME}\" (namestring *lib-directory*))"|sed 's/\"\\(.*\\)\"/\\1/'`
780 if test -x ${CLISP_RUNTIME_PATH} ; then
781 echo "clisp runtime is \"${CLISP_RUNTIME_PATH}\""
783 AC_MSG_ERROR(clisp runtime \"${CLISP_RUNTIME_PATH}\" is not an executable)
785 CLISP_RUNTIME=`basename ${CLISP_RUNTIME_PATH}`
788 if test x"${cmucl}" = xtrue; then
789 if test x"${CMUCL_RUNTIME_PATH}" = x"" ; then
790 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)'`
792 if test -x "${CMUCL_RUNTIME_PATH}" ; then
793 echo "cmucl runtime is \"${CMUCL_RUNTIME_PATH}\""
795 dnl last chance: find CMUCL_NAME in path. Use it if it doesn't appear to
796 dnl be a shell script.
797 cmucl_path=`type -p "${CMUCL_NAME}"`
798 if test x"`grep -c '#!.*bin.*sh.*' ${cmucl_path}`" = x"0" ; then
799 CMUCL_RUNTIME_PATH="${cmucl_path}"
801 AC_MSG_ERROR([Unable to determine CMUCL runtime path.
802 The best guess for CMUCL runtime, \"${CMUCL_RUNTIME_PATH}\", is not
803 an executable. Use the argument
804 --with-cmucl-runtime=<path>
805 to set the actual CMUCL executable. If the CMUCL lisp command is a shell
806 script the CMUCL executable is the program exec'd by that shell script.])
809 CMUCL_RUNTIME=`basename ${CMUCL_RUNTIME_PATH}`
811 dnl cmucl final check
812 result=`"${CMUCL_RUNTIME_PATH}" -quiet -eval '(format t "MAXIMA_CMUCL_TEST_SUCCESS%")(quit)'`
814 if test ! x"${retval}" = x"0" ; then
815 AC_MSG_ERROR(unable to run cmucl runtime = "${CMUCL_RUNTIME_PATH}".
816 Please specify the full path of the cmucl runtime using the
817 --with-cmucl-runtime=<path>
820 count=`echo "${result}" | grep -c "MAXIMA_CMUCL_TEST_SUCCESS"`
821 if test ! "${count}" = "1" ; then
822 AC_MSG_ERROR(an error occured while checking cmucl runtime)
826 if test x"${scl}" = xtrue; then
827 if test x"${SCL_RUNTIME_PATH}" = x"" ; then
828 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))'`
830 if test -x "${SCL_RUNTIME_PATH}" ; then
831 echo "scl runtime is \"${SCL_RUNTIME_PATH}\""
833 dnl last chance: find SCL_NAME in path. Use it if it doesn't appear to
834 dnl be a shell script.
835 scl_path=`type -p "${SCL_NAME}"`
836 if test x"`grep -c '#!.*bin.*sh.*' ${scl_path}`" = x"0" ; then
837 SCL_RUNTIME_PATH="${scl_path}"
839 AC_MSG_ERROR([Unable to determine SCL runtime path.
840 The best guess for SCL runtime, \"${SCL_RUNTIME_PATH}\", is not
841 an executable. Use the argument
842 --with-scl-runtime=<path>
843 to set the actual SCL executable. If the SCL lisp command is a shell
844 script the SCL executable is the program exec'd by that shell script.])
847 SCL_RUNTIME=`basename ${SCL_RUNTIME_PATH}`
850 if test x"${gcl}" = xtrue; then
851 result=`"${GCL_NAME}" -batch -eval '#+ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_SUCCESS~%") #-ansi-cl (format t "MAXIMA_GCL_ANSI_TEST_FAILURE~%")' -eval '(bye)'`
853 if test ! x"${retval}" = x"0" ; then
854 AC_MSG_ERROR(unable to run gcl executable \"${GCL_NAME}\".)
856 count=`echo "${result}" | grep -c "MAXIMA_GCL_ANSI_TEST_SUCCESS"`
857 if test ! "${count}" = "1" ; then
858 AC_MSG_ERROR([The gcl executable \"${GCL_NAME}\" was not compiled with
859 the --enable-ansi flag, which is required for Maxima.
860 The gcl ANSI-CL check returned
865 AC_ARG_ENABLE(gcl-alt-link,
866 [ --enable-gcl-alt-link Use GCL's alternate linking mechanism],
867 [case "${enableval}" in
868 yes) gcl_alt_link=true ;;
869 no) gcl_alt_link=false ;;
870 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gcl-alt-link) ;;
872 [gcl_alt_link=false])
874 AM_CONDITIONAL(GCL_ALT_LINK, test x$gcl_alt_link = xtrue)
876 AC_ARG_WITH(default-lisp,
877 [ --with-default-lisp=<lisp> Set default lisp implementation to <lisp>],
878 [case "${withval}" in
880 if test x"${clisp}" = xtrue ; then
883 AC_MSG_ERROR(clisp not enabled)
887 if test x"${cmucl}" = xtrue ; then
890 AC_MSG_ERROR(cmucl not enabled)
894 if test x"${scl}" = xtrue ; then
897 AC_MSG_ERROR(scl not enabled)
901 if test x"${sbcl}" = xtrue ; then
904 AC_MSG_ERROR(sbcl not enabled)
908 if test x"${gcl}" = xtrue ; then
911 AC_MSG_ERROR(gcl not enabled)
915 if test x"${acl}" = xtrue ; then
918 AC_MSG_ERROR(acl not enabled)
922 if test x"${openmcl}" = xtrue ; then
925 AC_MSG_ERROR(openmcl not enabled)
929 if test x"${ecl}" = xtrue ; then
932 AC_MSG_ERROR(ecl not enabled)
936 AC_MSG_ERROR(Unknown argument ${DEFAULTLISP} to --with-default-lisp)
939 [if test x"${clisp}" = xtrue ; then
941 elif test x"${cmucl}" = xtrue ; then
943 elif test x"${scl}" = xtrue ; then
945 elif test x"${sbcl}" = xtrue ; then
947 elif test x"${gcl}" = xtrue ; then
949 elif test x"${acl}" = xtrue ; then
951 elif test x"${openmcl}" = xtrue ; then
953 elif test x"${ecl}" = xtrue ; then
956 AC_MSG_ERROR(Internal error. No lisp enabled. Please contact maintainer.)
960 AC_SUBST(CLISP_RUNTIME)
961 AC_SUBST(CLISP_RUNTIME_PATH)
963 AC_SUBST(CMUCL_RUNTIME)
964 AC_SUBST(CMUCL_RUNTIME_PATH)
967 AC_SUBST(SCL_RUNTIME)
968 AC_SUBST(SCL_RUNTIME_PATH)
972 AC_SUBST(OPENMCL_NAME)
974 AC_SUBST(DEFAULTLISP)
976 AC_SUBST(lisps_enabled)
978 AC_ARG_WITH(posix-shell,
979 [ --with-posix-shell=<path> Use <shell> for maxima script (default /bin/sh)],
980 [posix_shell_list="${withval}"],
981 [posix_shell_list="/bin/sh /bin/bash /usr/bin/bash /usr/local/bin/bash"])
984 [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
990 AC_MSG_CHECKING(POSIX shell to see that it contains getopts)
991 cat <<EOF > conftest-posix-shell.sh
994 echo "result is \$result"
998 for shell in $posix_shell_list
1000 if test -z "$POSIX_SHELL" ; then
1001 echo "trying $shell"
1002 $shell conftest-posix-shell.sh -a > /dev/null 2>&1
1003 if test "$?" = "0" ; then
1004 POSIX_SHELL="$shell"
1008 rm -f conftest-posix-shell.sh
1009 if test -n "$POSIX_SHELL" ; then
1010 AC_MSG_RESULT(POSIX shell is $POSIX_SHELL)
1012 AC_MSG_WARN(Could not find a shell that supports getopts.
1013 The maxima wrapper script will be unusable. The shell may be specified
1014 with --with-posix-shell=</path/to/shell>)
1016 AC_SUBST(POSIX_SHELL)
1018 if test x"${prefix}" = xNONE ; then
1019 tmp_prefix="/usr/local"
1021 tmp_prefix="${prefix}"
1023 if test x"${exec_prefix}" = xNONE ; then
1024 tmp_exec_prefix="${tmp_prefix}"
1026 tmp_exec_prefix="${exec_prefix}"
1028 expanded_top_srcdir="`(cd \"$top_srcdir\" 1>/dev/null 2>/dev/null; pwd)`"
1029 expanded_exec_prefix="${tmp_exec_prefix}"
1030 expanded_libdir="`eval \"exec_prefix=\\\"${tmp_exec_prefix}\\\";echo ${libdir}\"`"
1031 expanded_libexecdir="`eval \"exec_prefix=\\\"${tmp_exec_prefix}\\\";echo ${libexecdir}\"`"
1032 expanded_datadir="`eval \"prefix=\\\"${tmp_prefix}\\\";datarootdir=\\\"${datarootdir}\\\";echo ${datadir}\"`"
1033 expanded_infodir="`eval \"prefix=\\\"${tmp_prefix}\\\";datarootdir=\\\"${datarootdir}\\\";echo ${infodir}\"`"
1036 dnl Find all the directories in share, but remove the share directory
1037 dnl itself and all CVS directories (if any) and fortran directories.
1038 dnl Remove the leading "share" part of the path, and add double-quotes
1041 #default_sharedirs=`find share -type d | sort | egrep -v 'share$|CVS|/fortran' | sed 's;share/\(.*\); "\1" \\\\;' | sed '$s;\\\\;;'`
1042 default_sharedirs=`find share -type d | sort | egrep -v 'share$|CVS|/fortran' | sed 's;share/\(.*\);"\1";' | tr '\n' ' '`
1044 AC_SUBST(expanded_top_srcdir)
1045 AC_SUBST(expanded_exec_prefix)
1046 AC_SUBST(expanded_libdir)
1047 AC_SUBST(expanded_libexecdir)
1048 AC_SUBST(expanded_datadir)
1049 AC_SUBST(expanded_infodir)
1050 default_layout_autotools="true"
1051 AC_SUBST(default_layout_autotools)
1053 AC_SUBST(default_sharedirs)
1055 dnl Look for grep that can handle long lines and -e.
1060 # Configure these files and make them executable
1061 AC_CONFIG_FILES([maxima-local], chmod +x maxima-local)
1062 AC_CONFIG_FILES([xmaxima-local], chmod +x xmaxima-local)
1064 # Convert maxima.bat to DOS line ending
1065 # sed-3.02 in old mingw distribution doesn't support -i or \r
1066 # dos2unix may not be present, but perl is required elsewhere
1067 # perl -i interferes with binmode so need to use a temporary file
1068 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))
1070 AC_OUTPUT(Makefile maxima.spec maxima.iss \
1071 admin/Makefile src/Makefile src/maxima src/rmaxima src/autoconf-variables.lisp \
1072 src/share-subdirs.lisp \
1073 lisp-utils/Makefile tests/Makefile doc/Makefile \
1074 doc/emaxima/Makefile doc/info/Makefile doc/info/include-maxima.texi \
1075 doc/info/de/Makefile \
1076 doc/info/de.utf8/Makefile doc/info/es/Makefile doc/info/es.utf8/Makefile \
1077 doc/info/pt/Makefile doc/info/pt.utf8/Makefile \
1078 doc/info/pt/include-maxima.texi \
1079 doc/info/pt_BR/Makefile doc/info/pt_BR.utf8/Makefile \
1080 doc/intromax/Makefile doc/man/Makefile doc/man/maxima.1 doc/man/ru/maxima.1 \
1081 doc/share/Makefile interfaces/Makefile interfaces/emacs/Makefile \
1082 interfaces/emacs/emaxima/Makefile interfaces/emacs/imaxima/Makefile \
1083 interfaces/emacs/misc/Makefile interfaces/xmaxima/Makefile \
1084 interfaces/xmaxima/autoconf-variables.tcl interfaces/xmaxima/Tkmaxima/Header.tcl \
1085 interfaces/xmaxima/doc/Makefile interfaces/xmaxima/doc/figures/Makefile \
1086 interfaces/xmaxima/msgs/Makefile interfaces/xmaxima/win32/Makefile \
1087 plotting/mgnuplot share/Makefile demo/Makefile plotting/Makefile locale/Makefile \
1088 share/contrib/Makefile share/contrib/integration/Makefile \
1089 share/draw/Makefile share/logic/Makefile doc/info/es/include-maxima.texi \
1094 if test x"${clisp}" = xtrue ; then
1095 echo "clisp enabled. Executable name: \"${CLISP_NAME}\""
1096 echo "clisp runtime is \"${CLISP_RUNTIME_PATH}\""
1098 if test x"${clisp_exec}" = xtrue ; then
1099 echo "clisp executable image enabled for maxima."
1101 if test x"${cmucl}" = xtrue ; then
1102 echo "CMUCL enabled. Executable name: \"${CMUCL_NAME}\""
1103 echo "cmucl runtime is \"${CMUCL_RUNTIME_PATH}\""
1105 if test x"${cmucl_exec}" = xtrue; then
1106 echo "CMUCL executable image enabled for maxima."
1108 if test x"${scl}" = xtrue ; then
1109 echo "SCL enabled. Executable name: \"${SCL_NAME}\""
1110 echo "SCL runtime is \"${SCL_RUNTIME_PATH}\""
1112 if test x"${sbcl}" = xtrue ; then
1113 echo "SBCL enabled. Executable name: \"${SBCL_NAME}\""
1115 if test x"${sbcl_exec}" = xtrue ; then
1116 echo "sbcl executable image enabled for maxima."
1118 if test x"${gcl}" = xtrue ; then
1119 echo "GCL enabled. Executable name: \"${GCL_NAME}\""
1120 if test x"${gcl_alt_link}" = xtrue ; then
1121 echo " GCL alternative linking method enabled."
1124 if test x"${acl}" = xtrue ; then
1125 echo "ACL enabled. Executable name: \"${ACL_NAME}\""
1127 if test x"${openmcl}" = xtrue ; then
1128 echo "OpenMCL enabled. Executable name: \"${OPENMCL_NAME}\""
1130 if test x"${openmcl_exec}" = xtrue ; then
1131 echo "OpenMCL executable image enabled for maxima."
1133 if test x"${ecl}" = xtrue ; then
1134 echo "ECL enabled. Executable name: \"${ECL_NAME}\""
1136 echo "default lisp: $DEFAULTLISP"
1137 echo "wish executable name: \"${WISH}\""
1139 if test x"${chm}" = xtrue ; then
1140 echo "CHM help files enabled"
1141 echo " HHC: \"${HHC}\""
1143 if test x"${xmaxima_exe}" = xtrue ; then
1144 echo "Windows xmaxima.exe enabled"
1145 echo " GCC version GCCVER: ${GCCVER}"
1146 echo " TCLKITSH: ${TCLKITSH}"
1147 if ! test -f "${TCLKITSH}" ; then
1148 AC_MSG_WARN(*** TCLKITSH ${TCLKITSH} not found)
1149 xmaxima_exe_prerequisite=notfound
1151 echo " TCLKIT_RUNTIME: ${TCLKIT_RUNTIME}"
1152 if ! test -f "${TCLKIT_RUNTIME}" ; then
1153 AC_MSG_WARN(*** TCLKIT_RUNTIME ${TCLKIT_RUNTIME} not found)
1154 xmaxima_exe_prerequisite=notfound
1156 echo " SDXKIT: ${SDXKIT}"
1157 if ! test -f "${SDXKIT}" ; then
1158 AC_MSG_WARN(*** SDXKIT ${SDXKIT} not found)
1159 xmaxima_exe_prerequisite=notfound
1161 echo " IMGKIT: ${IMGKIT}"
1162 if ! test -f "${IMGKIT}" ; then
1163 AC_MSG_WARN(*** IMGKIT ${IMGKIT} not found)
1164 xmaxima_exe_prerequisite=notfound
1166 if test x${xmaxima_exe_prerequisite} = xnotfound ; then
1167 AC_MSG_WARN([A prerequisite for xmaxima.exe not found. The missing components can be defined on the make command line.])