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

revision 3914, Wed May 25 15:47:42 2016 UTC revision 4422, Wed Aug 17 16:03:13 2016 UTC
# Line 17  Line 17 
17  dnl  dnl
18  dnl set the following to the name of the branch  dnl set the following to the name of the branch
19  dnl  dnl
20  BRANCH="master"  BRANCH="vis15"
21  AC_SUBST(BRANCH)  AC_SUBST(BRANCH)
22    
23  dnl  dnl
# Line 34  Line 34 
34  dnl  dnl
35  AC_CANONICAL_HOST  AC_CANONICAL_HOST
36    
37    #################### Paths configuration ####################
38    
39    DIDEROT_ROOT=`pwd`
40    DIDEROT_DOCDIR=$DIDEROT_ROOT/doc
41    DIDEROT_SRCDIR=$DIDEROT_ROOT/src
42    DIDEROT_LIBDIR=$DIDEROT_ROOT/lib
43    DIDEROT_BINDIR=$DIDEROT_ROOT/bin
44    DIDEROT_MKDIR=$DIDEROT_ROOT/mk
45    
46    AC_SUBST(DIDEROT_ROOT)
47    AC_SUBST(DIDEROT_DOCDIR)
48    AC_SUBST(DIDEROT_SRCDIR)
49    AC_SUBST(DIDEROT_LIBDIR)
50    AC_SUBST(DIDEROT_BINDIR)
51    AC_SUBST(DIDEROT_MKDIR)
52    
53    #################### end Paths configuration ####################
54    
55  dnl check for standard programs  dnl check for standard programs
56  dnl  dnl
57  AC_PROG_CPP  AC_PROG_CPP
58    AC_PROG_CC([clang gcc cc])
59  AC_PROG_CXX([clang++ g++ c++])  AC_PROG_CXX([clang++ g++ c++])
60  AX_CXX_COMPILE_STDCXX(11,[],[mandatory])  AX_CXX_COMPILE_STDCXX(11,[],[mandatory])
61  AC_PROG_INSTALL  AC_PROG_INSTALL
# Line 52  Line 71 
71    
72  dnl extra compiler options  dnl extra compiler options
73  dnl  dnl
74  CXXFLAGS_BASE="$CXXFLAGS -Wformat -Wreturn-type -Wuninitialized"  CXXFLAGS_BASE="-Wreturn-type -Wuninitialized"
75    
76  AC_ARG_ENABLE([32-bit],  AC_ARG_ENABLE([32-bit],
77    AC_HELP_STRING([--enable-32-bit], [configure Diderot to produce 32-bit executables]),    AC_HELP_STRING([--enable-32-bit], [configure Diderot to produce 32-bit executables]),
78    [CXXFLAG_Mxx="-m32"],    [CXXFLAG_Mxx="-m32"],
79    [CXXFLAG_Mxx="-m64"])    [CXXFLAG_Mxx="-m64"])
 if test x"$CXX" != "xclang++" ; then  
   CXXFLAGS_BASE="$CXXFLAGS_BASE -fno-implicit-templates"  
 fi  
80    
81  CXXFLAGS="$CXXFLAG_Mxx $CXXFLAGS_BASE"  CXXFLAGS="$CXXFLAG_Mxx $CXXFLAGS_BASE"
82  AC_SUBST(CXXFLAG_Mxx)  AC_SUBST(CXXFLAG_Mxx)
83  AC_SUBST(CXXFLAGS_BASE)  AC_SUBST(CXXFLAGS_BASE)
84    
85  dnl  dnl
86    dnl run the compiler tests in 64-bit mode
87    dnl
88    save_CFLAGS=$CFLAGS
89    CFLAGS="$CFLAGS $CFLAG_MXX"
90    
91    dnl
92    dnl check for gcc builtin atomic operations
93    dnl
94    AC_MSG_CHECKING([for builtin atomic operations])
95    AC_LINK_IFELSE(
96       [AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);])],
97       AC_MSG_RESULT(yes)
98       AC_DEFINE(
99        [HAVE_BUILTIN_ATOMIC_OPS], 1,
100        [Define to 1 if gcc compiler provides atomic operations.]),
101       AC_MSG_RESULT(no))
102    
103    AC_C_BIGENDIAN
104    
105    #
106    # determine the sizes of the standard C types
107    AC_CHECK_SIZEOF([int])
108    SIZEOF_C_INT=$ac_cv_sizeof_int
109    AC_CHECK_SIZEOF([long])
110    SIZEOF_C_LONG=$ac_cv_sizeof_long
111    AC_CHECK_SIZEOF([float])
112    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
113    AC_CHECK_SIZEOF([double])
114    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
115    
116    AC_SUBST(SIZEOF_C_INT)
117    AC_SUBST(SIZEOF_C_LONG)
118    AC_SUBST(SIZEOF_C_FLOAT)
119    AC_SUBST(SIZEOF_C_DOUBLE)
120    
121    dnl
122    dnl restore CFLAGS
123    dnl
124    CFLAGS=$save_CFLAGS
125    
126    dnl
127  dnl check for <stdbool.h>, which we use in the C API  dnl check for <stdbool.h>, which we use in the C API
128  dnl  dnl
129  AC_HEADER_STDBOOL  AC_HEADER_STDBOOL
130    
131  dnl  dnl
132    dnl the C boolean type to use in generated library headers
133    dnl
134    if test x"$ac_cv_header_stdbool_h" = xyes ; then
135      BOOLTY="bool"
136    elif test "x$ac_cv_type__Bool" = xyes; then
137      BOOLTY="_Bool"
138    else
139      BOOLTY="int"
140    fi
141    AC_SUBST(BOOLTY)
142    
143    dnl
144  dnl check for pthreads support  dnl check for pthreads support
145  dnl  dnl
146  ACX_PTHREAD  ACX_PTHREAD
147    
148  dnl  dnl
149    dnl check for various library routines etc.
150    dnl
151    AC_CHECK_FUNCS(posix_memalign)
152    if test x"$ac_cv_func_posix_memalign" != xyes ; then
153      AC_CHECK_FUNCS(memalign)
154      if test x"$ac_cv_func_posix_memalign" != xyes ; then
155        AC_CHECK_FUNCS(valloc)
156      fi
157    fi
158    
159    AC_CHECK_FUNCS(mach_absolute_time)
160    AC_CHECK_TYPES([struct timespec])
161    AC_CHECK_FUNCS(pthread_barrier_init)
162    
163    dnl
164    dnl check for clock_gettime.  On Linux, this requires librt.
165    dnl
166    save_LIBS=$LIBS
167    LIBS="-lrt $LIBS"
168    AC_MSG_CHECKING([for clock_gettime])
169    AC_LINK_IFELSE(
170      [AC_LANG_PROGRAM(
171        [[#include <time.h>]],
172        [[struct timespec t; clock_gettime(CLOCK_REALTIME, &t); ]])],
173      [ ac_cv_func_clock_gettime=yes;
174        AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [is clock_gettime available?])],
175      [ac_cv_func_clock_gettime=no])
176    AC_MSG_RESULT($ac_cv_func_clock_gettime)
177    if test "$ac_cv_func_clock_gettime" = "no" ; then
178      LIBS=$save_LIBS
179    fi
180    
181    AC_CHECK_FUNCS(pthread_getcpuclockid)
182    AC_CHECK_FUNCS(sigtimedwait nanosleep)
183    
184    dnl
185    dnl check for sched_setaffinity
186    dnl
187    AC_CHECK_FUNCS(sched_setaffinity)
188    
189    dnl
190    dnl check for pthread_setaffinity_np
191    dnl
192    save_LIBS=$LIBS
193    save_CFLAGS=$CFLAGS
194    LIBS="$PTHREAD_LIBS $LIBS"
195    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
196    AC_MSG_CHECKING([for pthread_setaffinity_np])
197    AC_LINK_IFELSE(
198      [AC_LANG_PROGRAM(
199        [[#include <pthread.h>]],
200        [[cpu_set_t s; pthread_setaffinity_np(pthread_self(), sizeof(s), &s); ]])],
201      [ ac_cv_func_pthread_setaffinity_np=yes;
202        AC_DEFINE(HAVE_PTHREAD_SETAFFINITY_NP, [1], [is pthread_setaffinity_np available?])],
203      [ac_cv_func_pthread_setaffinity_np=no])
204    AC_MSG_RESULT($ac_cv_func_pthread_setaffinity_np)
205    LIBS=$save_LIBS
206    CFLAGS=$save_CFLAGS
207    
208    dnl
209    dnl check for Linux NUMA support (libnuma)
210    dnl
211    AC_CHECK_LIB(numa,numa_available)
212    if test "$ac_cv_lib_numa_numa_available" = "yes" ; then
213      PTHREAD_LIBS="$PTHREAD_LIBS -lnuma"
214    fi
215    
216    dnl check for /proc/cpuinfo
217    dnl
218    AC_CHECK_FILES(/proc/cpuinfo)
219    
220    dnl
221    dnl OS-specific linking issues
222    dnl
223    LD_NEEDS_RPATH=false;
224    LIBM=""
225    case "$host_os" in
226      darwin*) # On Mac OS X we check for the presence of macports and/or fink
227        if test -x /opt/local/bin/port ; then
228          HAS_MACPORTS=yes
229        else
230          HAS_MACPORTS=no
231        fi
232        if test -x /sw/bin/fink ; then
233          HAS_FINK=yes
234        else
235          HAS_FINK=no
236        fi
237      ;;
238      linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries
239        LD_NEEDS_RPATH=true
240        LIBM="-lm"
241      ;;
242    esac
243    
244    if test x"$HAS_MACPORTS" = xyes ; then
245      LDPATHS="-L/opt/local/lib"
246    elif test x"$HAS_FINK" = xyes ; then
247      LDPATHS="-L/sw/lib"
248    else
249      LDPATHS=""
250    fi
251    AC_SUBST(LDPATHS)
252    AC_SUBST(LD_NEEDS_RPATH)
253    AC_SUBST(LIBM)
254    
255    #################### CUDA configuration ####################
256    
257    AC_ARG_ENABLE([cuda],
258      AC_HELP_STRING([--enable-cuda], [include support for targeting CUDA]))
259    
260    if test "${enable_cuda+set}" = set ; then
261    dnl
262  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
263  dnl  dnl
264  AC_MSG_NOTICE([checking for CUDA and nvcc])  AC_MSG_NOTICE([checking for CUDA and nvcc])
# Line 89  Line 271 
271    AC_MSG_RESULT([$NVCC])    AC_MSG_RESULT([$NVCC])
272    CUDA_ENABLED=true    CUDA_ENABLED=true
273  fi  fi
274    else
275      NVCC=":"
276      CUDA_ENABLED=false
277    fi
278  AC_SUBST(NVCC)  AC_SUBST(NVCC)
279  AC_SUBST(CUDA_ENABLED)  AC_SUBST(CUDA_ENABLED)
280    
281    #################### end CUDA configuration ####################
282    
283    #################### OpenCL configuration ####################
284    
285    AC_ARG_ENABLE([opencl],
286      AC_HELP_STRING([--enable-opencl], [include support for targeting OpenCL]))
287    
288    if test "${enable_opencl+set}" = set ; then
289    
290  dnl  dnl
291  dnl check for OpenCL support  dnl check for OpenCL support
292  dnl  dnl
# Line 210  Line 405 
405    SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double    SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
406    fi    fi
407  fi  fi
408    else
409      CL_ENABLED=false
410      CL_VERSION="0"
411      SIZEOF_CL_INT="0"
412      SIZEOF_CL_LONG="0"
413      SIZEOF_CL_FLOAT="0"
414      SIZEOF_CL_DOUBLE="0"
415    fi
416    
417  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
418  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
419  AC_DEFINE_UNQUOTED(DIDEROT_CL_VERSION,[$CL_VERSION],[version of OpenCL supported by system])  AC_DEFINE_UNQUOTED(DIDEROT_CL_VERSION,[$CL_VERSION],[version of OpenCL supported by system])
# Line 219  Line 423 
423  AC_SUBST(SIZEOF_CL_FLOAT)  AC_SUBST(SIZEOF_CL_FLOAT)
424  AC_SUBST(SIZEOF_CL_DOUBLE)  AC_SUBST(SIZEOF_CL_DOUBLE)
425    
426  dnl  #################### end OpenCL configuration ####################
 dnl check for various library routines etc.  
 dnl  
 AC_CHECK_FUNCS(posix_memalign)  
 if test x"$ac_cv_func_posix_memalign" != xyes ; then  
   AC_CHECK_FUNCS(memalign)  
   if test x"$ac_cv_func_posix_memalign" != xyes ; then  
     AC_CHECK_FUNCS(valloc)  
   fi  
 fi  
427    
428  AC_CHECK_FUNCS(mach_absolute_time)  #################### Teem configuration ####################
 AC_CHECK_TYPES([struct timespec])  
 AC_CHECK_FUNCS(pthread_barrier_init)  
429    
 dnl  
 dnl check for clock_gettime.  On Linux, this requires librt.  
 dnl  
 save_LIBS=$LIBS  
 LIBS="-lrt $LIBS"  
 AC_MSG_CHECKING([for clock_gettime])  
 AC_LINK_IFELSE(  
   [AC_LANG_PROGRAM(  
     [[#include <time.h>]],  
     [[struct timespec t; clock_gettime(CLOCK_REALTIME, &t); ]])],  
   [ ac_cv_func_clock_gettime=yes;  
     AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [is clock_gettime available?])],  
   [ac_cv_func_clock_gettime=no])  
 AC_MSG_RESULT($ac_cv_func_clock_gettime)  
 if test "$ac_cv_func_clock_gettime" = "no" ; then  
   LIBS=$save_LIBS  
 fi  
   
 AC_CHECK_FUNCS(pthread_getcpuclockid)  
 AC_CHECK_FUNCS(sigtimedwait nanosleep)  
   
 dnl  
 dnl check for sched_setaffinity  
 dnl  
 AC_CHECK_FUNCS(sched_setaffinity)  
   
 dnl  
 dnl check for pthread_setaffinity_np  
 dnl  
 save_LIBS=$LIBS  
 save_CFLAGS=$CFLAGS  
 LIBS="$PTHREAD_LIBS $LIBS"  
 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"  
 AC_MSG_CHECKING([for pthread_setaffinity_np])  
 AC_LINK_IFELSE(  
   [AC_LANG_PROGRAM(  
     [[#include <pthread.h>]],  
     [[cpu_set_t s; pthread_setaffinity_np(pthread_self(), sizeof(s), &s); ]])],  
   [ ac_cv_func_pthread_setaffinity_np=yes;  
     AC_DEFINE(HAVE_PTHREAD_SETAFFINITY_NP, [1], [is pthread_setaffinity_np available?])],  
   [ac_cv_func_pthread_setaffinity_np=no])  
 AC_MSG_RESULT($ac_cv_func_pthread_setaffinity_np)  
 LIBS=$save_LIBS  
 CFLAGS=$save_CFLAGS  
   
 dnl  
 dnl check for Linux NUMA support (libnuma)  
 dnl  
 AC_CHECK_LIB(numa,numa_available)  
 if test "$ac_cv_lib_numa_numa_available" = "yes" ; then  
   PTHREAD_LIBS="$PTHREAD_LIBS -lnuma"  
 fi  
   
 dnl check for /proc/cpuinfo  
 dnl  
 AC_CHECK_FILES(/proc/cpuinfo)  
   
 dnl  
 dnl OS-specific linking issues  
 dnl  
 LD_NEEDS_RPATH=false;  
 LIBM=""  
 case "$host_os" in  
   darwin*) # On Mac OS X we check for the presence of macports and/or fink  
     if test -x /opt/local/bin/port ; then  
       HAS_MACPORTS=yes  
     else  
       HAS_MACPORTS=no  
     fi  
     if test -x /sw/bin/fink ; then  
       HAS_FINK=yes  
     else  
       HAS_FINK=no  
     fi  
   ;;  
   linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries  
     LD_NEEDS_RPATH=true  
     LIBM="-lm"  
   ;;  
 esac  
   
 if test x"$HAS_MACPORTS" = xyes ; then  
   LDPATHS="-L/opt/local/lib"  
 elif test x"$HAS_FINK" = xyes ; then  
   LDPATHS="-L/sw/lib"  
 else  
   LDPATHS=""  
 fi  
 AC_SUBST(LDPATHS)  
 AC_SUBST(LD_NEEDS_RPATH)  
 AC_SUBST(LIBM)  
   
 dnl  
430  dnl get the path to the TEEM installation.  We need this to build the Diderot  dnl get the path to the TEEM installation.  We need this to build the Diderot
431  dnl runtime code and we use the path when searching for teem in the Diderot  dnl runtime code and we use the path when searching for teem in the Diderot
432  dnl compiler.  dnl compiler.
433  dnl  dnl
434    
435    dnl the path can be specified using "--with-teem=..." too
436    dnl
437  AC_ARG_WITH(teem,  AC_ARG_WITH(teem,
438    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),
439    [ac_cv_use_teem=$withval], [ac_cv_use_teem=no])    [ac_cv_use_teem=$withval], [ac_cv_use_teem=no])
440    
441  if test x"$ac_cv_use_teem" = xno ; then  if test x"$ac_cv_use_teem" = xno ; then
442    dnl search for Teem in some standard places
443    dnl
444      AC_MSG_CHECKING([for teem])
445    TEEM_DIR=none    TEEM_DIR=none
446      POSSIBLE_TEEM_DIRS="/usr/local/teem /usr/local"
447      for dir in $POSSIBLE_TEEM_DIRS ; do
448        if test -f $dir/include/teem/nrrd.h ; then
449          TEEM_DIR=$dir
450          AC_MSG_RESULT([$TEEM_DIR])
451          break
452        fi
453      done
454      if test $TEEM_DIR = none ; then
455        AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
456      fi
457  else  else
458    AC_MSG_CHECKING([path to teem ($ac_cv_use_teem)])    AC_MSG_CHECKING([path to teem ($ac_cv_use_teem)])
459    case $ac_cv_use_teem in    case $ac_cv_use_teem in
# Line 349  Line 467 
467        AC_MSG_RESULT([yes])        AC_MSG_RESULT([yes])
468      else      else
469        TEEM_DIR=none        TEEM_DIR=none
470        AC_MSG_RESULT([no])        AC_MSG_RESULT([invalid path to teem])
471      fi      fi
472    else    else
473      TEEM_DIR=none      TEEM_DIR=none
474      AC_MSG_RESULT([no])      AC_MSG_RESULT([invalid path to teem])
475    fi    fi
476  fi  fi
477  if test x"$TEEM_DIR" = xnone ; then  if test x"$TEEM_DIR" = xnone ; then
478    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])    AC_MSG_ERROR([unable to find teem])
479  fi  fi
480  dnl  dnl
481  dnl check that unu supports the dnorm command  dnl check that unu supports the dnorm command
482  dnl  dnl
 if test x"$TEEM_DIR" != xnone ; then  
483    AC_MSG_CHECKING([that \"unu dnorm\" works])    AC_MSG_CHECKING([that \"unu dnorm\" works])
484    if test -x $TEEM_DIR/bin/unu ; then    if test -x $TEEM_DIR/bin/unu ; then
485      $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null      $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null
# Line 374  Line 491 
491    else    else
492      AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])      AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])
493    fi    fi
494  fi  
495  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
496    
497  dnl ******************** SML/NJ configuration ********************  #################### end Teem configuration ####################
498    
499    #################### SML configuration ####################
500    
501  dnl  dnl
502  dnl We support building with both SML/NJ (the default) or MLton.  dnl We support building with both SML/NJ (the default) or MLton.
503  dnl  dnl
# Line 427  Line 547 
547    
548    dnl look for ml-makedepend    dnl look for ml-makedepend
549    dnl    dnl
   AC_MSG_CHECKING([for ml-makedepend])  
550    tmpPATH="$SMLNJ_PATH:$PATH"    tmpPATH="$SMLNJ_PATH:$PATH"
551    AC_PATH_PROG(ML_MAKEDEPEND, ml-makedepend, ":", $tmpPATH)    AC_PATH_PROG(ML_MAKEDEPEND, ml-makedepend, ":", $tmpPATH)
   if test $ML_MAKEDEPEND = none ; then  
     AC_MSG_ERROR([ml-makedepend not found])  
   else  
     AC_MSG_RESULT([$ML_MAKEDEPEND])  
   fi  
552    AC_SUBST(ML_MAKEDEPEND)    AC_SUBST(ML_MAKEDEPEND)
553    
554    dnl    dnl
# Line 448  Line 562 
562    AC_SUBST(ML_BUILD)    AC_SUBST(ML_BUILD)
563    SML=smlnj    SML=smlnj
564    
565      HEAP_IMAGE_DIR=$DIDEROT_BINDIR/.heap
566      INSTALL_SMLNJ_WRAPPER=$DIDEROT_BINDIR/install-sml-wrapper.sh
567      AC_SUBST(HEAP_IMAGE_DIR)
568      AC_SUBST(INSTALL_SMLNJ_WRAPPER)
569    
570  else  else
571    
572    # we are using MLton    # we are using MLton
573    MLTON=$with_mlton    MLTON=$with_mlton
574    AC_SUBST(MLTON)    AC_SUBST(MLTON)
575    SML=mlton    SML=mlton
576    
577  fi  fi
578  AC_SUBST(SML)  AC_SUBST(SML)
579    
580  dnl ******************** Documentation tools ********************  #################### end SML configuration ####################
581    
582    #################### Documentation tools configuration ####################
583    
584  dnl check for doxygen  dnl check for doxygen
585  dnl  dnl
# Line 507  Line 630 
630  AC_SUBST(HIGHLIGHTER)  AC_SUBST(HIGHLIGHTER)
631  AC_SUBST(DBLATEX)  AC_SUBST(DBLATEX)
632    
633    #################### end Documentation tools configuration ####################
634    
635  dnl ******************** Paths ********************  #################### config.h ####################
   
 DIDEROT_ROOT=`pwd`  
 DIDEROT_DOCDIR=$DIDEROT_ROOT/doc  
 DIDEROT_SRCDIR=$DIDEROT_ROOT/src  
 DIDEROT_LIBDIR=$DIDEROT_ROOT/lib  
 DIDEROT_BINDIR=$DIDEROT_ROOT/bin  
 DIDEROT_MKDIR=$DIDEROT_ROOT/mk  
   
 HEAP_IMAGE_DIR=$DIDEROT_BINDIR/.heap  
 INSTALL_SMLNJ_WRAPPER=$DIDEROT_BINDIR/install-sml-wrapper.sh  
   
 AC_SUBST(DIDEROT_ROOT)  
 AC_SUBST(DIDEROT_DOCDIR)  
 AC_SUBST(DIDEROT_SRCDIR)  
 AC_SUBST(DIDEROT_LIBDIR)  
 AC_SUBST(DIDEROT_BINDIR)  
 AC_SUBST(DIDEROT_MKDIR)  
 AC_SUBST(HEAP_IMAGE_DIR)  
 AC_SUBST(INSTALL_SMLNJ_WRAPPER)  
   
 dnl  
 dnl ******************** C compiler properties ********************  
 dnl  
   
 dnl  
 dnl run the compiler tests in 64-bit mode  
 dnl  
 save_CFLAGS=$CFLAGS  
 CFLAGS="$CFLAGS $CFLAG_MXX"  
   
 dnl  
 dnl check for gcc builtin atomic operations  
 dnl  
 AC_MSG_CHECKING([for builtin atomic operations])  
 AC_LINK_IFELSE(  
    [AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);])],  
    AC_MSG_RESULT(yes)  
    AC_DEFINE(  
     [HAVE_BUILTIN_ATOMIC_OPS], 1,  
     [Define to 1 if gcc compiler provides atomic operations.]),  
    AC_MSG_RESULT(no))  
   
 AC_C_BIGENDIAN  
   
 #  
 # determine the sizes of the standard C types  
 AC_CHECK_SIZEOF([int])  
 SIZEOF_C_INT=$ac_cv_sizeof_int  
 AC_CHECK_SIZEOF([long])  
 SIZEOF_C_LONG=$ac_cv_sizeof_long  
 AC_CHECK_SIZEOF([float])  
 SIZEOF_C_FLOAT=$ac_cv_sizeof_float  
 AC_CHECK_SIZEOF([double])  
 SIZEOF_C_DOUBLE=$ac_cv_sizeof_double  
   
 AC_SUBST(SIZEOF_C_INT)  
 AC_SUBST(SIZEOF_C_LONG)  
 AC_SUBST(SIZEOF_C_FLOAT)  
 AC_SUBST(SIZEOF_C_DOUBLE)  
   
 dnl  
 dnl restore CFLAGS  
 dnl  
 CFLAGS=$save_CFLAGS  
   
 dnl  
 dnl ******************** config.h stuff ********************  
 dnl  
636    
637  AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/lib/include"], [path for Diderot header files])  AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/lib/include"], [path for Diderot header files])
638    
# Line 596  Line 652 
652  #endif /* !_DIDEROT_CONFIG_H_ */  #endif /* !_DIDEROT_CONFIG_H_ */
653  ])  ])
654    
655  dnl  #################### end config.h ####################
656  dnl ******************** write output ********************  
657  dnl  #################### write output ####################
658    
659  dnl The compiler Makefile depends on which SML system we are  dnl The compiler Makefile depends on which SML system we are
660  dnl using.  dnl using.
# Line 616  Line 672 
672  dnl  doc/man/Makefile  dnl  doc/man/Makefile
673  dnl  src/clinfo/Makefile  dnl  src/clinfo/Makefile
674    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"
675  dnl  src/lib/build/Makefile    src/lib/build/Makefile
676  dnl  src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in    src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in
677  dnl  test/MIP/Makefile  dnl  test/MIP/Makefile
678  dnl  test/probe/Makefile  dnl  test/probe/Makefile
679  dnl  test/iso2d-polyline/Makefile  dnl  test/iso2d-polyline/Makefile
# Line 631  Line 687 
687    src/compiler/options/version.sml:src/compiler/options/version_sml.in    src/compiler/options/version.sml:src/compiler/options/version_sml.in
688  )  )
689    
 #AC_CONFIG_HEADERS(src/compiler/c-util/fragments/config.in:config/config_h.in)  
690  AC_CONFIG_HEADERS(src/lib/include/diderot/config.h:config/config_h.in)  AC_CONFIG_HEADERS(src/lib/include/diderot/config.h:config/config_h.in)
691    
692  dnl  dnl
# Line 646  Line 701 
701  AC_CONFIG_FILES([  AC_CONFIG_FILES([
702    src/compiler/gen/fragments/mkmk.sh:src/compiler/gen/fragments/mkmk_sh.in    src/compiler/gen/fragments/mkmk.sh:src/compiler/gen/fragments/mkmk_sh.in
703  ], [chmod +x src/compiler/gen/fragments/mkmk.sh])  ], [chmod +x src/compiler/gen/fragments/mkmk.sh])
704  # AC_CONFIG_FILES([  AC_CONFIG_FILES([
705  #   rtest/scripts/run.sh:rtest/scripts/run_sh.in    src/tests/rtest/scripts/run.sh:src/tests/rtest/scripts/run_sh.in
706  # ], [chmod +x rtest/scripts/run.sh])  ], [chmod +x src/tests/rtest/scripts/run.sh])
707  # AC_CONFIG_FILES([  AC_CONFIG_FILES([
708  #   rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in    src/tests/rtest/scripts/run-one.sh:src/tests/rtest/scripts/run-one_sh.in
709  # ], [chmod +x rtest/scripts/run-one.sh])  ], [chmod +x src/tests/rtest/scripts/run-one.sh])
710  #  #
711  # more regression tests; should merge with rtest at some point  # more regression tests; should merge with rtest at some point
712  #  #
# Line 667  Line 722 
722  dnl  dnl
723  dnl usage: MK_BUILD_DIR(<build-dir>, <target-platform>, <options>)  dnl usage: MK_BUILD_DIR(<build-dir>, <target-platform>, <options>)
724  dnl  dnl
725    dnl where the options are taken from [debug, parallel]
726    dnl
727  AC_DEFUN([MK_BUILD_DIR], [  AC_DEFUN([MK_BUILD_DIR], [
728      if test ! -d src/lib/build/$1 ; then      if test ! -d src/lib/build/$1 ; then
729        mkdir src/lib/build/$1        mkdir src/lib/build/$1
# Line 679  Line 736 
736      AC_CONFIG_FILES(src/lib/build/$1/Makefile)      AC_CONFIG_FILES(src/lib/build/$1/Makefile)
737    ])    ])
738    
739  #MK_BUILD_DIR(rt-seq-f, c, [float])  MK_BUILD_DIR(rt-seq, sequential, [])
740  #MK_BUILD_DIR(rt-seq-d, c, [double])  MK_BUILD_DIR(rt-seq-debug, sequential, [debug])
741  #MK_BUILD_DIR(rt-seq-f-debug, c, [float debug])  MK_BUILD_DIR(rt-par, parallel, [parallel])
742  #MK_BUILD_DIR(rt-seq-d-debug, c, [double debug])  MK_BUILD_DIR(rt-par-debug, parallel, [parallel debug])
 #MK_BUILD_DIR(rt-par-f, parallel, [parallel float])  
 #MK_BUILD_DIR(rt-par-d, parallel, [parallel double])  
 #MK_BUILD_DIR(rt-par-f-debug, parallel, [parallel float debug])  
 #MK_BUILD_DIR(rt-par-d-debug, parallel, [parallel double debug])  
743    
744  #if test x"$CL_ENABLED" = xtrue ; then  #if test x"$CL_ENABLED" = xtrue ; then
745  #  MK_BUILD_DIR(rt-cl-f, cl, [float])  #  MK_BUILD_DIR(rt-cl-f, opencl, [float])
746  #  MK_BUILD_DIR(rt-cl-d, cl, [double])  #  MK_BUILD_DIR(rt-cl-d, opencl, [double])
747  #  MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])  #  MK_BUILD_DIR(rt-cl-f-debug, opencl, [float debug])
748  #  MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])  #  MK_BUILD_DIR(rt-cl-d-debug, opencl, [double debug])
749  #fi  #fi
750    
751  AC_OUTPUT  AC_OUTPUT
752    
753    #################### end write output ####################

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

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