Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/configure.ac
ViewVC logotype

Diff of /branches/vis15/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/configure.ac revision 204, Tue Aug 3 16:41:03 2010 UTC branches/vis15/configure.ac revision 3914, Wed May 25 15:47:42 2016 UTC
# Line 1  Line 1 
1  dnl Process this file with autoconf to produce a configure script.  dnl Process this file with autoconf to produce a configure script.
2  dnl  dnl
3  dnl COPYRIGHT (c) 2010 The Diderot Project  dnl This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4    dnl
5    dnl COPYRIGHT (c) 2016 The University of Chicago
6  dnl All rights reserved.  dnl All rights reserved.
7  dnl  dnl
8    
9  dnl NOTE: MANTICORE_DIST_VERSION is an M4 variable defined in config/aclocal.m4  AC_INIT(diderot,1.0,)
 dnl  
 AC_INIT(diderot,0.1,)  
10    
11  AC_PREREQ(2.60)  AC_PREREQ(2.60)
12  AC_COPYRIGHT([[COPYRIGHT (c) 2010 The Diderot Project]])  AC_COPYRIGHT([[COPYRIGHT (c) 2016 The University of Chicago]])
13  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)  AC_CONFIG_SRCDIR(src/compiler/options/ctl.sml)
14  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
15  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
16    
17  dnl  dnl
18    dnl set the following to the name of the branch
19    dnl
20    BRANCH="master"
21    AC_SUBST(BRANCH)
22    
23    dnl
24  dnl include additional macros  dnl include additional macros
25  dnl  dnl
26  sinclude(config/acx_pthread.m4)  sinclude(config/acx_pthread.m4)
27  sinclude(config/check_smlnj.m4)  sinclude(config/check_smlnj.m4)
28  sinclude(config/check_smlnj_heap_suffix.m4)  sinclude(config/check_smlnj_heap_suffix.m4)
29    sinclude(config/ax_check_framework.m4)
30    sinclude(config/ax_cxx_compile_stdcxx.m4)
31    
32  dnl  dnl
33  dnl get host information  dnl get host information
# Line 29  Line 36 
36    
37  dnl check for standard programs  dnl check for standard programs
38  dnl  dnl
 AC_PROG_CC_C99  
39  AC_PROG_CPP  AC_PROG_CPP
40    AC_PROG_CXX([clang++ g++ c++])
41    AX_CXX_COMPILE_STDCXX(11,[],[mandatory])
42  AC_PROG_INSTALL  AC_PROG_INSTALL
43  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
44    
45    dnl FIXME: this works for now, but we should probably switch to libtool
46    dnl
47    AC_PATH_PROG(LD, [ld], [none])
48    if test x$LD = xnone ; then
49      AC_MSG_ERROR([cannot find ld command])
50    fi
51    AC_SUBST(LD)
52    
53    dnl extra compiler options
54    dnl
55    CXXFLAGS_BASE="$CXXFLAGS -Wformat -Wreturn-type -Wuninitialized"
56    
57    AC_ARG_ENABLE([32-bit],
58      AC_HELP_STRING([--enable-32-bit], [configure Diderot to produce 32-bit executables]),
59      [CXXFLAG_Mxx="-m32"],
60      [CXXFLAG_Mxx="-m64"])
61    if test x"$CXX" != "xclang++" ; then
62      CXXFLAGS_BASE="$CXXFLAGS_BASE -fno-implicit-templates"
63    fi
64    
65    CXXFLAGS="$CXXFLAG_Mxx $CXXFLAGS_BASE"
66    AC_SUBST(CXXFLAG_Mxx)
67    AC_SUBST(CXXFLAGS_BASE)
68    
69    dnl
70    dnl check for <stdbool.h>, which we use in the C API
71    dnl
72    AC_HEADER_STDBOOL
73    
74  dnl  dnl
75  dnl If we are on Mac OS X, check for the presence of macports and/or fink  dnl check for pthreads support
76  dnl  dnl
77    ACX_PTHREAD
78    
79    dnl
80    dnl Look for NVIDIA's nvcc compiler
81    dnl
82    AC_MSG_NOTICE([checking for CUDA and nvcc])
83    AC_PATH_PROG(NVCC, nvcc, no, $PATH)
84    if test x"$NVCC" = xno ; then
85      AC_MSG_WARN([nvcc not found])
86      CUDA_ENABLED=false
87      NVCC=":"
88    else
89      AC_MSG_RESULT([$NVCC])
90      CUDA_ENABLED=true
91    fi
92    AC_SUBST(NVCC)
93    AC_SUBST(CUDA_ENABLED)
94    
95    dnl
96    dnl check for OpenCL support
97    dnl
98    LIBS_CL="none"
99  case "$host_os" in  case "$host_os" in
100    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
101        AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
102      ;;
103      *)
104        AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
105      ;;
106    esac
107    if test x"$LIBS_CL" = xnone ; then
108      AC_MSG_WARN([no OpenCL library found])
109      CL_ENABLED=false
110      CL_VERSION=0
111    else
112      CL_ENABLED=true
113      CPPFLAGS_CL=""
114      CL_HEADER=""
115      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; CL_HEADER="$ac_header"; break], [HAVE_CL_H="no"])
116      if test x"$HAVE_CL_H" = xno ; then
117        # check for AMD's SDK
118        AC_MSG_CHECKING([for cl.h in AMD's SDK])
119        if test -d /opt/AMDAPP/include/CL ; then
120          HAVE_CL_H="yes"
121          CL_HEADER="/opt/AMDAPP/include/CL/cl.h"
122          AC_DEFINE([HAVE_CL_CL_H])
123          CPPFLAGS_CL="-I/opt/AMDAPP/include"
124        fi
125        AC_MSG_RESULT([$HAVE_CL_H])
126      fi
127      if test x"$HAVE_CL_H" = xno ; then
128        # check for NVIDIA's SDK
129        AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
130        CUDA_HOME=none
131        for CUDA in cuda cuda-7.0 cuda-6.5 cuda-6.0 ; do
132          if test -d /usr/local/$CUDA/include/CL ; then
133            CUDA_HOME=/usr/local/$CUDA
134            break
135          fi
136        done
137        if test x"$CUDA_HOME" != xnone ; then
138          HAVE_CL_H="yes"
139          CL_HEADER="$CUDA_HOME/include/CL/cl.h"
140          AC_DEFINE([HAVE_CL_CL_H])
141          CPPFLAGS_CL="-I$CUDA_HOME/include"
142        fi
143        AC_MSG_RESULT([$HAVE_CL_H])
144      fi
145      if test x"$HAVE_CL_H" = xno ; then
146        AC_MSG_WARN([no cl.h found])
147        CL_ENABLED=false
148        CL_VERSION=0
149        SIZEOF_CL_INT=0
150        SIZEOF_CL_LONG=0
151        SIZEOF_CL_FLOAT=0
152        SIZEOF_CL_DOUBLE=0
153      else
154        # check the cl.h header for which version of OpenCL is supported
155        AC_LANG([C])
156        save_CPPFLAGS=$CPPFLAGS
157        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
158        AC_LINK_IFELSE([AC_LANG_PROGRAM([[
159    #include <stdio.h>
160    # ifdef HAVE_CL_CL_H
161    #   include <CL/cl.h>
162    # elif defined(HAVE_OPENCL_CL_H)
163    #   include <OpenCL/cl.h>
164    # else
165    #   error no cl.h
166    # endif]],
167    [[#if defined(CL_VERSION_1_2)
168      printf("120\n");
169    #elif defined(CL_VERSION_1_1)
170      printf("110\n");
171    #elif defined(CL_VERSION_1_0)
172      printf("100\n");
173    #else
174      printf("0\n");
175    #endif
176          ]])],
177          [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
178    dnl
179    dnl check to see how we access the host-side vector types.  For OpenCL 1.1,
180    dnl the specification specifies the behavior, but it was unspecified in 1.0.
181    dnl
182        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
183    #include "$CL_HEADER"
184    ]],
185          [[cl_float4 x; x[0] = 0.0;]])],
186          [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
187    dnl
188    dnl not arrays, so try the OpenCL 1.1 structure representation
189    dnl
190          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
191    #include "$CL_HEADER"
192    ]],
193          [[cl_float4 x; x.s[0] = 0.0;]])],
194          [AC_DEFINE([CL_HOST_VECTORS_ARE_STRUCTS],[1],[host vector types are structs])],
195          [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
196      # restore saved CPPFLAGS
197        CPPFLAGS=$save_CPPFLAGS
198      # substitutions
199        AC_SUBST(LIBS_CL)
200        AC_SUBST(CPPFLAGS_CL)
201      #
202      # determine the sizes of the host-side OpenCL types
203      AC_CHECK_SIZEOF([cl_int], [], [#include "$CL_HEADER"])
204      SIZEOF_CL_INT=$ac_cv_sizeof_cl_int
205      AC_CHECK_SIZEOF([cl_long], [], [#include "$CL_HEADER"])
206      SIZEOF_CL_LONG=$ac_cv_sizeof_cl_long
207      AC_CHECK_SIZEOF([cl_float], [], [#include "$CL_HEADER"])
208      SIZEOF_CL_FLOAT=$ac_cv_sizeof_cl_float
209      AC_CHECK_SIZEOF([cl_double], [], [#include "$CL_HEADER"])
210      SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
211      fi
212    fi
213    AC_SUBST(CL_ENABLED)
214    AC_SUBST(CL_VERSION)
215    AC_DEFINE_UNQUOTED(DIDEROT_CL_VERSION,[$CL_VERSION],[version of OpenCL supported by system])
216    
217    AC_SUBST(SIZEOF_CL_INT)
218    AC_SUBST(SIZEOF_CL_LONG)
219    AC_SUBST(SIZEOF_CL_FLOAT)
220    AC_SUBST(SIZEOF_CL_DOUBLE)
221    
222    dnl
223    dnl check for various library routines etc.
224    dnl
225    AC_CHECK_FUNCS(posix_memalign)
226    if test x"$ac_cv_func_posix_memalign" != xyes ; then
227      AC_CHECK_FUNCS(memalign)
228      if test x"$ac_cv_func_posix_memalign" != xyes ; then
229        AC_CHECK_FUNCS(valloc)
230      fi
231    fi
232    
233    AC_CHECK_FUNCS(mach_absolute_time)
234    AC_CHECK_TYPES([struct timespec])
235    AC_CHECK_FUNCS(pthread_barrier_init)
236    
237    dnl
238    dnl check for clock_gettime.  On Linux, this requires librt.
239    dnl
240    save_LIBS=$LIBS
241    LIBS="-lrt $LIBS"
242    AC_MSG_CHECKING([for clock_gettime])
243    AC_LINK_IFELSE(
244      [AC_LANG_PROGRAM(
245        [[#include <time.h>]],
246        [[struct timespec t; clock_gettime(CLOCK_REALTIME, &t); ]])],
247      [ ac_cv_func_clock_gettime=yes;
248        AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [is clock_gettime available?])],
249      [ac_cv_func_clock_gettime=no])
250    AC_MSG_RESULT($ac_cv_func_clock_gettime)
251    if test "$ac_cv_func_clock_gettime" = "no" ; then
252      LIBS=$save_LIBS
253    fi
254    
255    AC_CHECK_FUNCS(pthread_getcpuclockid)
256    AC_CHECK_FUNCS(sigtimedwait nanosleep)
257    
258    dnl
259    dnl check for sched_setaffinity
260    dnl
261    AC_CHECK_FUNCS(sched_setaffinity)
262    
263    dnl
264    dnl check for pthread_setaffinity_np
265    dnl
266    save_LIBS=$LIBS
267    save_CFLAGS=$CFLAGS
268    LIBS="$PTHREAD_LIBS $LIBS"
269    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
270    AC_MSG_CHECKING([for pthread_setaffinity_np])
271    AC_LINK_IFELSE(
272      [AC_LANG_PROGRAM(
273        [[#include <pthread.h>]],
274        [[cpu_set_t s; pthread_setaffinity_np(pthread_self(), sizeof(s), &s); ]])],
275      [ ac_cv_func_pthread_setaffinity_np=yes;
276        AC_DEFINE(HAVE_PTHREAD_SETAFFINITY_NP, [1], [is pthread_setaffinity_np available?])],
277      [ac_cv_func_pthread_setaffinity_np=no])
278    AC_MSG_RESULT($ac_cv_func_pthread_setaffinity_np)
279    LIBS=$save_LIBS
280    CFLAGS=$save_CFLAGS
281    
282    dnl
283    dnl check for Linux NUMA support (libnuma)
284    dnl
285    AC_CHECK_LIB(numa,numa_available)
286    if test "$ac_cv_lib_numa_numa_available" = "yes" ; then
287      PTHREAD_LIBS="$PTHREAD_LIBS -lnuma"
288    fi
289    
290    dnl check for /proc/cpuinfo
291    dnl
292    AC_CHECK_FILES(/proc/cpuinfo)
293    
294    dnl
295    dnl OS-specific linking issues
296    dnl
297    LD_NEEDS_RPATH=false;
298    LIBM=""
299    case "$host_os" in
300      darwin*) # On Mac OS X we check for the presence of macports and/or fink
301      if test -x /opt/local/bin/port ; then      if test -x /opt/local/bin/port ; then
302        HAS_MACPORTS=yes        HAS_MACPORTS=yes
303      else      else
# Line 50  Line 309 
309        HAS_FINK=no        HAS_FINK=no
310      fi      fi
311    ;;    ;;
312      linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries
313        LD_NEEDS_RPATH=true
314        LIBM="-lm"
315      ;;
316  esac  esac
317    
318  if test x"$HAS_MACPORTS" = xyes ; then  if test x"$HAS_MACPORTS" = xyes ; then
# Line 60  Line 323 
323    LDPATHS=""    LDPATHS=""
324  fi  fi
325  AC_SUBST(LDPATHS)  AC_SUBST(LDPATHS)
326    AC_SUBST(LD_NEEDS_RPATH)
327    AC_SUBST(LIBM)
328    
329  dnl  dnl
330  dnl get the path to the TEEM installation  dnl get the path to the TEEM installation.  We need this to build the Diderot
331    dnl runtime code and we use the path when searching for teem in the Diderot
332    dnl compiler.
333  dnl  dnl
334  AC_ARG_WITH(teem,  AC_ARG_WITH(teem,
335    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),
# Line 77  Line 344 
344    esac    esac
345    if test -x $ac_cv_use_teem ; then    if test -x $ac_cv_use_teem ; then
346      TEEM_DIR=$ac_cv_use_teem      TEEM_DIR=$ac_cv_use_teem
347      AC_MSG_RESULT([ okay])      # check that TEEM_DIR actually points to something that looks like teem
348        if test -f $TEEM_DIR/include/teem/nrrd.h ; then
349          AC_MSG_RESULT([yes])
350        else
351          TEEM_DIR=none
352          AC_MSG_RESULT([no])
353        fi
354    else    else
355      TEEM_DIR=none      TEEM_DIR=none
356      AC_MSG_RESULT([ invalid])      AC_MSG_RESULT([no])
357    fi    fi
358  fi  fi
359  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
360    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
361    fi
362    dnl
363    dnl check that unu supports the dnorm command
364    dnl
365    if test x"$TEEM_DIR" != xnone ; then
366      AC_MSG_CHECKING([that \"unu dnorm\" works])
367      if test -x $TEEM_DIR/bin/unu ; then
368        $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null
369        if test $? -eq 0 ; then
370          AC_MSG_RESULT([yes])
371        else
372          AC_MSG_ERROR([\"unu dnorm\" is not supported; please update your teem installation])
373        fi
374      else
375        AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])
376      fi
377  fi  fi
378  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
379    
380  dnl ******************** SML/NJ configuration ********************  dnl ******************** SML/NJ configuration ********************
381  dnl  dnl
382    dnl We support building with both SML/NJ (the default) or MLton.
383    dnl
384    
385    dnl first check for --with-mlton=path flag
386    dnl
387    AC_ARG_WITH([mlton],
388      [AS_HELP_STRING([--with-mlton=<path-to-mlton>],
389        [use the MLton Standard ML compiler to build Diderot])],
390      [with_mlton=yes],[with_mlton=no])
391    if test x"$with_mlton" = xyes ; then
392      if test x"$ac_cv_path_with_mlton" = x ; then
393        # look for mlton in the PATH
394        AC_PATH_PROGS(with_mlton, mlton, no)
395        if test x"$MLTON" = xno ; then
396          AC_MSG_ERROR([unable to find mlton executable; please specify the path])
397        fi
398      else
399        with_mlton=$ac_cv_path_with_mlton
400        case $with_mlton in
401          /*) ;;
402          *) AC_MSG_ERROR([please specify absolute path for mlton executable]) ;;
403        esac
404        if test ! -x $with_mlton ; then
405          AC_MSG_ERROR([invalid path for mlton; $with_mlton is not executable])
406        fi
407      fi
408    fi
409    
410    if test x"$with_mlton" = xno ; then
411      # we are using SML/NJ
412      #
413    
414  dnl check that we have a compatible version of SML/NJ  dnl check that we have a compatible version of SML/NJ
415  dnl  dnl
416  CHECK_SMLNJ([AC_MSG_ERROR([unable to find SML/NJ installation; check your PATH or set SMLNJ_CMD])])  CHECK_SMLNJ([AC_MSG_ERROR([unable to find SML/NJ installation; check your PATH or set SMLNJ_CMD])])
417  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
418    -o $SMLNJ_MINOR_VERSION -lt 72      -o $SMLNJ_MINOR_VERSION -lt 79
419  then  then
420    AC_MSG_ERROR([installation requires SML/NJ version 110.72+])      AC_MSG_ERROR([installation requires SML/NJ version 110.79+ (available from smlnj.org)])
421  fi  fi
 AC_SUBST(SMLNJ_VERSION)  
422    
423  dnl determine the heap-image suffix  dnl determine the heap-image suffix
424  dnl  dnl
# Line 127  Line 446 
446    AC_MSG_ERROR([ml-build not found])    AC_MSG_ERROR([ml-build not found])
447  fi  fi
448  AC_SUBST(ML_BUILD)  AC_SUBST(ML_BUILD)
449      SML=smlnj
450    
451    else
452      # we are using MLton
453      MLTON=$with_mlton
454      AC_SUBST(MLTON)
455      SML=mlton
456    fi
457    AC_SUBST(SML)
458    
459    dnl ******************** Documentation tools ********************
460    
461    dnl check for doxygen
462    dnl
463    AC_ARG_WITH([doxygen],
464      [AS_HELP_STRING([--with-doxygen=<path>], [specify location of doxygen executable])],
465      [DOXYGEN=$with_doxygen],
466      [DOXYGEN=none])
467    if test x$DOXYGEN = xnone ; then
468      # see if we can find doxygen in the user's path
469      AC_PATH_PROG(DOXYGEN, [doxygen], [none])
470    fi
471    if test x$with_doxygen = xyes -o x$with_doxygen = xno ; then
472      AC_MSG_ERROR([--with-doxygen option must specify directory argument])
473    elif test x$DOXYGEN != xnone -a ! -x $DOXYGEN ; then
474      AC_MSG_ERROR([doxygen not found at $DOXYGEN])
475    elif test x$DOXYGEN != xnone ; then
476    dnl
477    dnl verify that $DOXYGEN is an absolute path
478    dnl
479      case $DOXYGEN in
480        /*) ;;
481        *) AC_MSG_ERROR([--with-doxygen path must be absolute]) ;;
482      esac
483    fi
484    if test $DOXYGEN = xnone ; then
485      DOXYGEN=:
486    fi
487    AC_SUBST(DOXYGEN)
488    
489    dnl check for asciidoc and related tools
490    dnl
491    AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
492    AC_PATH_PROGS([A2X], [a2x], [none])
493    AC_PATH_PROGS([HIGHLIGHTER], [pygmentize], [none])
494    AC_PATH_PROGS([DBLATEX], [dblatex], [none])
495    
496    dnl
497    dnl get the path to the asciidoc cofiguration files
498    dnl
499    if test x"$ASCIIDOC" != xnone ; then
500      AC_MSG_CHECKING([path to asciidoc configuration files])
501      ASCIIDOC_CONF_DIR=`$ASCIIDOC -v /dev/null 2>&1 | head -n 1 | sed 's|.*reading: \(.*\)/asciidoc.conf|\1|'`
502      AC_MSG_RESULT([$ASCIIDOC_CONF_DIR])
503    fi
504    AC_SUBST(ASCIIDOC)
505    AC_SUBST(A2X)
506    AC_SUBST(ASCIIDOC_CONF_DIR)
507    AC_SUBST(HIGHLIGHTER)
508    AC_SUBST(DBLATEX)
509    
510    
511  dnl ******************** Paths ********************  dnl ******************** Paths ********************
512    
# Line 150  Line 530 
530  AC_SUBST(INSTALL_SMLNJ_WRAPPER)  AC_SUBST(INSTALL_SMLNJ_WRAPPER)
531    
532  dnl  dnl
533    dnl ******************** C compiler properties ********************
534    dnl
535    
536    dnl
537    dnl run the compiler tests in 64-bit mode
538    dnl
539    save_CFLAGS=$CFLAGS
540    CFLAGS="$CFLAGS $CFLAG_MXX"
541    
542    dnl
543    dnl check for gcc builtin atomic operations
544    dnl
545    AC_MSG_CHECKING([for builtin atomic operations])
546    AC_LINK_IFELSE(
547       [AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);])],
548       AC_MSG_RESULT(yes)
549       AC_DEFINE(
550        [HAVE_BUILTIN_ATOMIC_OPS], 1,
551        [Define to 1 if gcc compiler provides atomic operations.]),
552       AC_MSG_RESULT(no))
553    
554    AC_C_BIGENDIAN
555    
556    #
557    # determine the sizes of the standard C types
558    AC_CHECK_SIZEOF([int])
559    SIZEOF_C_INT=$ac_cv_sizeof_int
560    AC_CHECK_SIZEOF([long])
561    SIZEOF_C_LONG=$ac_cv_sizeof_long
562    AC_CHECK_SIZEOF([float])
563    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
564    AC_CHECK_SIZEOF([double])
565    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
566    
567    AC_SUBST(SIZEOF_C_INT)
568    AC_SUBST(SIZEOF_C_LONG)
569    AC_SUBST(SIZEOF_C_FLOAT)
570    AC_SUBST(SIZEOF_C_DOUBLE)
571    
572    dnl
573    dnl restore CFLAGS
574    dnl
575    CFLAGS=$save_CFLAGS
576    
577    dnl
578    dnl ******************** config.h stuff ********************
579    dnl
580    
581    AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/lib/include"], [path for Diderot header files])
582    
583    AH_TOP([
584    /*
585     * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
586     *
587     * COPYRIGHT (c) 2016 The University of Chicago * All rights reserved.
588     */
589    
590    #ifndef _DIDEROT_CONFIG_H_
591    #define _DIDEROT_CONFIG_H_
592    
593    ])
594    AH_BOTTOM([
595    
596    #endif /* !_DIDEROT_CONFIG_H_ */
597    ])
598    
599    dnl
600  dnl ******************** write output ********************  dnl ******************** write output ********************
601  dnl  dnl
602    
603    dnl The compiler Makefile depends on which SML system we are
604    dnl using.
605    if test x"$SML" = xmlton ; then
606      COMPILER_MAKEFILE_IN=":src/compiler/Makefile_mlton.in"
607    else
608      COMPILER_MAKEFILE_IN=""
609    fi
610    
611  AC_CONFIG_FILES(  AC_CONFIG_FILES(
612  dnl  dnl
613  dnl ***** Makefiles *****  dnl ***** Makefiles *****
614    src/dnorm/Makefile    Makefile
615    src/compiler/Makefile  dnl  doc/Makefile
616    test/MIP/Makefile  dnl  doc/man/Makefile
617    dnl  src/clinfo/Makefile
618      src/compiler/Makefile"$COMPILER_MAKEFILE_IN"
619    dnl  src/lib/build/Makefile
620    dnl  src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in
621    dnl  test/MIP/Makefile
622    dnl  test/probe/Makefile
623    dnl  test/iso2d-polyline/Makefile
624    dnl  test/vr-lite-cam/Makefile
625    dnl  test/hlic/Makefile
626  dnl  dnl
627  dnl ***** SML source files *****  dnl ***** SML source files *****
628    src/compiler/fields/run-dnorm.sml:src/compiler/fields/run-dnorm_sml.in    src/compiler/nrrd/run-dnorm.sml:src/compiler/nrrd/run-dnorm_sml.in
629      src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
630      src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
631      src/compiler/options/version.sml:src/compiler/options/version_sml.in
632  )  )
633    
634    #AC_CONFIG_HEADERS(src/compiler/c-util/fragments/config.in:config/config_h.in)
635    AC_CONFIG_HEADERS(src/lib/include/diderot/config.h:config/config_h.in)
636    
637  dnl  dnl
638  dnl shell scripts  dnl shell scripts
639  dnl  dnl
640  AC_CONFIG_FILES([  AC_CONFIG_FILES([
641    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
642  ], [chmod +x bin/install-sml-wrapper.sh])  ], [chmod +x bin/install-sml-wrapper.sh])
643    AC_CONFIG_FILES([
644      src/compiler/gen/fragments/mkfrags.sh:src/compiler/gen/fragments/mkfrags_sh.in
645    ], [chmod +x src/compiler/gen/fragments/mkfrags.sh])
646    AC_CONFIG_FILES([
647      src/compiler/gen/fragments/mkmk.sh:src/compiler/gen/fragments/mkmk_sh.in
648    ], [chmod +x src/compiler/gen/fragments/mkmk.sh])
649    # AC_CONFIG_FILES([
650    #   rtest/scripts/run.sh:rtest/scripts/run_sh.in
651    # ], [chmod +x rtest/scripts/run.sh])
652    # AC_CONFIG_FILES([
653    #   rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
654    # ], [chmod +x rtest/scripts/run-one.sh])
655    #
656    # more regression tests; should merge with rtest at some point
657    #
658    # AC_CONFIG_FILES([
659    #   rtest2/scripts/run.sh:rtest2/scripts/run_sh.in
660    # ], [chmod +x rtest2/scripts/run.sh])
661    # AC_CONFIG_FILES([
662    #   rtest2/scripts/run-one.sh:rtest2/scripts/run-one_sh.in
663    # ], [chmod +x rtest2/scripts/run-one.sh])
664    
665    dnl
666    dnl generate makefiles for runtime library builds
667    dnl
668    dnl usage: MK_BUILD_DIR(<build-dir>, <target-platform>, <options>)
669    dnl
670    AC_DEFUN([MK_BUILD_DIR], [
671        if test ! -d src/lib/build/$1 ; then
672          mkdir src/lib/build/$1
673        fi
674        [sed -e 's,@BUILD_TARGET@,$1,g' \
675          -e 's,@TARGET_PLATFORM@,$2,g' \
676          -e 's,@BUILD_OPTIONS@,$3,g' \
677          src/lib/build/mk/Makefile.in \
678            > src/lib/build/$1/Makefile.in]
679        AC_CONFIG_FILES(src/lib/build/$1/Makefile)
680      ])
681    
682    #MK_BUILD_DIR(rt-seq-f, c, [float])
683    #MK_BUILD_DIR(rt-seq-d, c, [double])
684    #MK_BUILD_DIR(rt-seq-f-debug, c, [float debug])
685    #MK_BUILD_DIR(rt-seq-d-debug, c, [double debug])
686    #MK_BUILD_DIR(rt-par-f, parallel, [parallel float])
687    #MK_BUILD_DIR(rt-par-d, parallel, [parallel double])
688    #MK_BUILD_DIR(rt-par-f-debug, parallel, [parallel float debug])
689    #MK_BUILD_DIR(rt-par-d-debug, parallel, [parallel double debug])
690    
691    #if test x"$CL_ENABLED" = xtrue ; then
692    #  MK_BUILD_DIR(rt-cl-f, cl, [float])
693    #  MK_BUILD_DIR(rt-cl-d, cl, [double])
694    #  MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
695    #  MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])
696    #fi
697    
698  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.204  
changed lines
  Added in v.3914

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0