380 |
|
|
381 |
dnl ******************** SML/NJ configuration ******************** |
dnl ******************** SML/NJ configuration ******************** |
382 |
dnl |
dnl |
383 |
|
dnl We support building with both SML/NJ (the default) or MLton. |
384 |
|
dnl |
385 |
|
|
386 |
|
dnl first check for --with-mlton=path flag |
387 |
|
dnl |
388 |
|
AC_ARG_WITH([mlton], |
389 |
|
[AS_HELP_STRING([--with-mlton=<path-to-mlton>], |
390 |
|
[use the MLton Standard ML compiler to build Diderot])], |
391 |
|
[with_mlton=yes],[with_mlton=no]) |
392 |
|
if test x"$with_mlton" = xyes ; then |
393 |
|
if test x"$ac_cv_path_with_mlton" = x ; then |
394 |
|
# look for mlton in the PATH |
395 |
|
AC_PATH_PROGS(with_mlton, mlton, no) |
396 |
|
if test x"$MLTON" = xno ; then |
397 |
|
AC_MSG_ERROR([unable to find mlton executable; please specify the path]) |
398 |
|
fi |
399 |
|
else |
400 |
|
with_mlton=$ac_cv_path_with_mlton |
401 |
|
case $with_mlton in |
402 |
|
/*) ;; |
403 |
|
*) AC_MSG_ERROR([please specify absolute path for mlton executable]) ;; |
404 |
|
esac |
405 |
|
if test ! -x $with_mlton ; then |
406 |
|
AC_MSG_ERROR([invalid path for mlton; $with_mlton is not executable]) |
407 |
|
fi |
408 |
|
fi |
409 |
|
fi |
410 |
|
|
411 |
|
if test $with_mlton = xno ; then |
412 |
|
# we are using SML/NJ |
413 |
|
# |
414 |
|
|
415 |
dnl check that we have a compatible version of SML/NJ |
dnl check that we have a compatible version of SML/NJ |
416 |
dnl |
dnl |
420 |
then |
then |
421 |
AC_MSG_ERROR([installation requires SML/NJ version 110.79+ (available from smlnj.org)]) |
AC_MSG_ERROR([installation requires SML/NJ version 110.79+ (available from smlnj.org)]) |
422 |
fi |
fi |
|
AC_SUBST(SMLNJ_VERSION) |
|
423 |
|
|
424 |
dnl determine the heap-image suffix |
dnl determine the heap-image suffix |
425 |
dnl |
dnl |
447 |
AC_MSG_ERROR([ml-build not found]) |
AC_MSG_ERROR([ml-build not found]) |
448 |
fi |
fi |
449 |
AC_SUBST(ML_BUILD) |
AC_SUBST(ML_BUILD) |
450 |
|
SML=smlnj |
451 |
|
|
452 |
|
else |
453 |
|
# we are using MLton |
454 |
|
MLTON=$with_mlton |
455 |
|
AC_SUBST(MLTON) |
456 |
|
SML=mlton |
457 |
|
fi |
458 |
|
AC_SUBST(SML) |
459 |
|
|
460 |
dnl ******************** Documentation tools ******************** |
dnl ******************** Documentation tools ******************** |
461 |
|
|
462 |
dnl check for doxygen |
dnl check for doxygen |
463 |
dnl |
dnl |
464 |
AC_ARG_WITH([doxygen], |
AC_ARG_WITH([doxygen], |
465 |
[AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])], |
[AS_HELP_STRING([--with-doxygen=<path>], [specify location of doxygen executable])], |
466 |
[DOXYGEN=$with_doxygen], |
[DOXYGEN=$with_doxygen], |
467 |
[DOXYGEN=none]) |
[DOXYGEN=none]) |
468 |
if test x$DOXYGEN = xnone ; then |
if test x$DOXYGEN = xnone ; then |
607 |
dnl ******************** write output ******************** |
dnl ******************** write output ******************** |
608 |
dnl |
dnl |
609 |
|
|
610 |
|
dnl The compiler Makefile depends on which SML system we are |
611 |
|
dnl using. |
612 |
|
AC_MSG_NOTICE([using $SML]) |
613 |
|
if test x"$SML" = xmlton ; then |
614 |
|
COMPILER_MAKEFILE_IN=":src/compiler/Makefile_mlton.in" |
615 |
|
else |
616 |
|
COMPILER_MAKEFILE_IN="" |
617 |
|
fi |
618 |
|
|
619 |
AC_CONFIG_FILES( |
AC_CONFIG_FILES( |
620 |
dnl |
dnl |
621 |
dnl ***** Makefiles ***** |
dnl ***** Makefiles ***** |
623 |
dnl doc/Makefile |
dnl doc/Makefile |
624 |
dnl doc/man/Makefile |
dnl doc/man/Makefile |
625 |
dnl src/clinfo/Makefile |
dnl src/clinfo/Makefile |
626 |
src/compiler/Makefile |
src/compiler/Makefile"$COMPILER_MAKEFILE_IN" |
627 |
dnl src/lib/build/Makefile |
dnl src/lib/build/Makefile |
628 |
dnl src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in |
dnl src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in |
629 |
dnl test/MIP/Makefile |
dnl test/MIP/Makefile |