21 |
sinclude(config/check_smlnj.m4) |
sinclude(config/check_smlnj.m4) |
22 |
sinclude(config/check_smlnj_heap_suffix.m4) |
sinclude(config/check_smlnj_heap_suffix.m4) |
23 |
|
|
|
|
|
24 |
dnl |
dnl |
25 |
dnl get host information |
dnl get host information |
26 |
dnl |
dnl |
28 |
|
|
29 |
dnl check for standard programs |
dnl check for standard programs |
30 |
dnl |
dnl |
|
AC_PROG_CC_C99 |
|
31 |
AC_PROG_CPP |
AC_PROG_CPP |
32 |
AC_PROG_INSTALL |
AC_PROG_INSTALL |
33 |
AC_PROG_MAKE_SET |
AC_PROG_MAKE_SET |
34 |
|
|
35 |
|
dnl check for c99 support |
36 |
|
dnl |
37 |
|
AC_PROG_CC_C99 |
38 |
|
if test x"$ac_cv_prog_cc_c99" = xno ; then |
39 |
|
AC_MSG_ERROR([Diderot requires c99 support]) |
40 |
|
fi |
41 |
|
|
42 |
|
dnl extra C compiler options |
43 |
|
dnl |
44 |
|
CFLAG_M64="-m64" |
45 |
|
CFLAGS="$CFLAGS -Wformat -Wreturn-type -Wuninitialized" |
46 |
|
AC_SUBST(CFLAG_M64) |
47 |
|
|
48 |
|
dnl |
49 |
|
dnl Look for NVIDIA's nvcc compiler |
50 |
|
dnl |
51 |
|
AC_MSG_CHECKING([for CUDA and nvcc]) |
52 |
|
AC_PATH_PROG(NVCC, nvcc, ":", $PATH) |
53 |
|
if test $NVCC = none ; then |
54 |
|
AC_MSG_WARN([nvcc not found]) |
55 |
|
else |
56 |
|
AC_MSG_RESULT([$NVCC]) |
57 |
|
fi |
58 |
|
AC_SUBST(NVCC) |
59 |
|
|
60 |
|
dnl |
61 |
|
dnl check for pthreads support |
62 |
|
dnl |
63 |
|
ACX_PTHREAD() |
64 |
|
|
65 |
dnl |
dnl |
66 |
dnl If we are on Mac OS X, check for the presence of macports and/or fink |
dnl OS-specific linking issues |
67 |
dnl |
dnl |
68 |
|
LD_NEEDS_RPATH=false; |
69 |
|
LIBM="" |
70 |
case "$host_os" in |
case "$host_os" in |
71 |
darwin*) # On Mac OS X we check for installed frameworks |
darwin*) # On Mac OS X we check for the presence of macports and/or fink |
72 |
if test -x /opt/local/bin/port ; then |
if test -x /opt/local/bin/port ; then |
73 |
HAS_MACPORTS=yes |
HAS_MACPORTS=yes |
74 |
else |
else |
80 |
HAS_FINK=no |
HAS_FINK=no |
81 |
fi |
fi |
82 |
;; |
;; |
83 |
|
linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries |
84 |
|
LD_NEEDS_RPATH=true |
85 |
|
LIBM="-lm" |
86 |
|
;; |
87 |
esac |
esac |
88 |
|
|
89 |
if test x"$HAS_MACPORTS" = xyes ; then |
if test x"$HAS_MACPORTS" = xyes ; then |
94 |
LDPATHS="" |
LDPATHS="" |
95 |
fi |
fi |
96 |
AC_SUBST(LDPATHS) |
AC_SUBST(LDPATHS) |
97 |
|
AC_SUBST(LD_NEEDS_RPATH) |
98 |
|
AC_SUBST(LIBM) |
99 |
|
|
100 |
dnl |
dnl |
101 |
dnl get the path to the TEEM installation |
dnl get the path to the TEEM installation |
195 |
Makefile |
Makefile |
196 |
src/dnorm/Makefile |
src/dnorm/Makefile |
197 |
src/compiler/Makefile |
src/compiler/Makefile |
198 |
|
src/lib/Makefile |
199 |
|
src/lib/build/Makefile |
200 |
|
src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in |
201 |
|
test/Makefile |
202 |
test/MIP/Makefile |
test/MIP/Makefile |
203 |
test/probe/Makefile |
test/probe/Makefile |
204 |
dnl |
dnl |
205 |
dnl ***** SML source files ***** |
dnl ***** SML source files ***** |
206 |
src/compiler/fields/run-dnorm.sml:src/compiler/fields/run-dnorm_sml.in |
src/compiler/fields/run-dnorm.sml:src/compiler/fields/run-dnorm_sml.in |
207 |
|
src/compiler/common/paths.sml:src/compiler/common/paths_sml.in |
208 |
) |
) |
209 |
|
|
210 |
dnl |
dnl |
214 |
bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in |
bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in |
215 |
], [chmod +x bin/install-sml-wrapper.sh]) |
], [chmod +x bin/install-sml-wrapper.sh]) |
216 |
|
|
217 |
|
dnl |
218 |
|
dnl generate makefiles for runtime library builds |
219 |
|
dnl |
220 |
|
dnl usage: MK_BUILD_DIR(<build-dir>, <target-platform>, <options>) |
221 |
|
dnl |
222 |
|
AC_DEFUN([MK_BUILD_DIR], [ |
223 |
|
if test ! -d src/lib/build/$1 ; then |
224 |
|
mkdir src/lib/build/$1 |
225 |
|
fi |
226 |
|
[sed -e 's,@BUILD_TARGET@,$1,g' \ |
227 |
|
-e 's,@TARGET_PLATFORM@,$2,g' \ |
228 |
|
-e 's,@BUILD_OPTIONS@,$3,g' \ |
229 |
|
src/lib/build/mk/Makefile.in \ |
230 |
|
> src/lib/build/$1/Makefile.in] |
231 |
|
AC_CONFIG_FILES(src/lib/build/$1/Makefile) |
232 |
|
]) |
233 |
|
|
234 |
|
MK_BUILD_DIR(rt-c-f, c-target, [float]) |
235 |
|
MK_BUILD_DIR(rt-c-f-debug, c-target, [float debug]) |
236 |
|
|
237 |
AC_OUTPUT |
AC_OUTPUT |