135 |
break |
break |
136 |
fi |
fi |
137 |
done |
done |
138 |
if test x"$CUDA" != xnone ; then |
if test x"$CUDA_HOME" != xnone ; then |
139 |
HAVE_CL_H="yes" |
HAVE_CL_H="yes" |
140 |
CL_HEADER="$CUDA_HOME/include/CL/cl.h" |
CL_HEADER="$CUDA_HOME/include/CL/cl.h" |
141 |
AC_DEFINE([HAVE_CL_CL_H]) |
AC_DEFINE([HAVE_CL_CL_H]) |
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 x"$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 |
578 |
dnl |
dnl |
579 |
dnl ******************** config.h stuff ******************** |
dnl ******************** config.h stuff ******************** |
580 |
dnl |
dnl |
581 |
|
dnl We generate the header info as a fragment that then gets directly included in the |
582 |
AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/include"], [path for Diderot header files]) |
dnl C/C++ code produced by the compiler |
583 |
|
dnl |
584 |
|
|
585 |
AH_TOP([ |
AH_TOP([ |
586 |
/* |
/******************** BEGIN CONFIGURATION ********************/ |
|
* This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu) |
|
|
* |
|
|
* COPYRIGHT (c) 2015 The University of Chicago * All rights reserved. |
|
|
*/ |
|
|
|
|
|
#ifndef _DIDEROT_CONFIG_H_ |
|
|
#define _DIDEROT_CONFIG_H_ |
|
|
|
|
587 |
]) |
]) |
588 |
AH_BOTTOM([ |
AH_BOTTOM([ |
589 |
|
/******************** END CONFIGURATION ********************/ |
|
#ifdef NDEBUG |
|
|
#define STATIC_INLINE static inline |
|
|
#else |
|
|
#define STATIC_INLINE static |
|
|
#endif |
|
|
|
|
|
#endif /* !_DIDEROT_CONFIG_H_ */ |
|
590 |
]) |
]) |
591 |
|
|
592 |
dnl |
dnl |
593 |
dnl ******************** write output ******************** |
dnl ******************** write output ******************** |
594 |
dnl |
dnl |
595 |
|
|
596 |
|
dnl The compiler Makefile depends on which SML system we are |
597 |
|
dnl using. |
598 |
|
if test x"$SML" = xmlton ; then |
599 |
|
COMPILER_MAKEFILE_IN=":src/compiler/Makefile_mlton.in" |
600 |
|
else |
601 |
|
COMPILER_MAKEFILE_IN="" |
602 |
|
fi |
603 |
|
|
604 |
AC_CONFIG_FILES( |
AC_CONFIG_FILES( |
605 |
dnl |
dnl |
606 |
dnl ***** Makefiles ***** |
dnl ***** Makefiles ***** |
608 |
dnl doc/Makefile |
dnl doc/Makefile |
609 |
dnl doc/man/Makefile |
dnl doc/man/Makefile |
610 |
dnl src/clinfo/Makefile |
dnl src/clinfo/Makefile |
611 |
src/compiler/Makefile |
src/compiler/Makefile"$COMPILER_MAKEFILE_IN" |
612 |
dnl src/lib/build/Makefile |
dnl src/lib/build/Makefile |
613 |
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 |
614 |
dnl test/MIP/Makefile |
dnl test/MIP/Makefile |
618 |
dnl test/hlic/Makefile |
dnl test/hlic/Makefile |
619 |
dnl |
dnl |
620 |
dnl ***** SML source files ***** |
dnl ***** SML source files ***** |
621 |
dnl src/compiler/nrrd/run-dnorm.sml:src/compiler/nrrd/run-dnorm_sml.in |
src/compiler/nrrd/run-dnorm.sml:src/compiler/nrrd/run-dnorm_sml.in |
622 |
src/compiler/common/paths.sml:src/compiler/common/paths_sml.in |
src/compiler/common/paths.sml:src/compiler/common/paths_sml.in |
623 |
src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in |
src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in |
624 |
src/compiler/options/version.sml:src/compiler/options/version_sml.in |
src/compiler/options/version.sml:src/compiler/options/version_sml.in |
625 |
) |
) |
626 |
|
|
627 |
AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in) |
AC_CONFIG_HEADERS(src/compiler/c-util/fragments/config.in:config/config_h.in) |
628 |
|
|
629 |
dnl |
dnl |
630 |
dnl shell scripts |
dnl shell scripts |
632 |
AC_CONFIG_FILES([ |
AC_CONFIG_FILES([ |
633 |
bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in |
bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in |
634 |
], [chmod +x bin/install-sml-wrapper.sh]) |
], [chmod +x bin/install-sml-wrapper.sh]) |
635 |
# AC_CONFIG_FILES([ |
AC_CONFIG_FILES([ |
636 |
# src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in |
src/compiler/gen/fragments/mkfrags.sh:src/compiler/gen/fragments/mkfrags_sh.in |
637 |
# ], [chmod +x src/compiler/gen/file2str/file2str.sh]) |
], [chmod +x src/compiler/gen/fragments/mkfrags.sh]) |
638 |
|
AC_CONFIG_FILES([ |
639 |
|
src/compiler/gen/fragments/mkmk.sh:src/compiler/gen/fragments/mkmk_sh.in |
640 |
|
], [chmod +x src/compiler/gen/fragments/mkmk.sh]) |
641 |
# AC_CONFIG_FILES([ |
# AC_CONFIG_FILES([ |
642 |
# rtest/scripts/run.sh:rtest/scripts/run_sh.in |
# rtest/scripts/run.sh:rtest/scripts/run_sh.in |
643 |
# ], [chmod +x rtest/scripts/run.sh]) |
# ], [chmod +x rtest/scripts/run.sh]) |
671 |
AC_CONFIG_FILES(src/lib/build/$1/Makefile) |
AC_CONFIG_FILES(src/lib/build/$1/Makefile) |
672 |
]) |
]) |
673 |
|
|
674 |
#MK_BUILD_DIR(rt-c-f, c, [float]) |
#MK_BUILD_DIR(rt-seq-f, c, [float]) |
675 |
#MK_BUILD_DIR(rt-c-d, c, [double]) |
#MK_BUILD_DIR(rt-seq-d, c, [double]) |
676 |
#MK_BUILD_DIR(rt-c-f-debug, c, [float debug]) |
#MK_BUILD_DIR(rt-seq-f-debug, c, [float debug]) |
677 |
#MK_BUILD_DIR(rt-c-d-debug, c, [double debug]) |
#MK_BUILD_DIR(rt-seq-d-debug, c, [double debug]) |
678 |
#MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float]) |
#MK_BUILD_DIR(rt-par-f, parallel, [parallel float]) |
679 |
#MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double]) |
#MK_BUILD_DIR(rt-par-d, parallel, [parallel double]) |
680 |
#MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug]) |
#MK_BUILD_DIR(rt-par-f-debug, parallel, [parallel float debug]) |
681 |
#MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug]) |
#MK_BUILD_DIR(rt-par-d-debug, parallel, [parallel double debug]) |
682 |
|
|
683 |
#if test x"$CL_ENABLED" = xtrue ; then |
#if test x"$CL_ENABLED" = xtrue ; then |
684 |
# MK_BUILD_DIR(rt-cl-f, cl, [float]) |
# MK_BUILD_DIR(rt-cl-f, cl, [float]) |