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 4127, Thu Jun 30 22:58:39 2016 UTC revision 4884, Mon Jan 2 18:46:26 2017 UTC
# Line 6  Line 6 
6  dnl All rights reserved.  dnl All rights reserved.
7  dnl  dnl
8    
9  AC_INIT(diderot,1.0,)  AC_INIT(diderot,2.0,)
10    
11  AC_PREREQ(2.60)  AC_PREREQ(2.60)
12  AC_COPYRIGHT([[COPYRIGHT (c) 2016 The University of Chicago]])  AC_COPYRIGHT([[COPYRIGHT (c) 2016 The University of Chicago]])
# 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
24  dnl include additional macros  dnl include additional macros
25  dnl  dnl
26    sinclude(config/ax_check_compile_flag.m4)
27    sinclude(config/ax_gcc_x86_cpuid.m4)
28    sinclude(config/ax_gcc_x86_avx_xgetbv.m4)
29    sinclude(config/ax_ext.m4)
30  sinclude(config/acx_pthread.m4)  sinclude(config/acx_pthread.m4)
31  sinclude(config/check_smlnj.m4)  sinclude(config/check_smlnj.m4)
32  sinclude(config/check_smlnj_heap_suffix.m4)  sinclude(config/check_smlnj_heap_suffix.m4)
# Line 71  Line 75 
75    
76  dnl extra compiler options  dnl extra compiler options
77  dnl  dnl
78  CXXFLAGS_BASE="$CXXFLAGS -Wreturn-type -Wuninitialized"  CXXFLAGS_BASE="-Wreturn-type -Wuninitialized"
79    
80    dnl check for SIMD support
81    dnl
82    AX_EXT
83    
84  AC_ARG_ENABLE([32-bit],  AC_ARG_ENABLE([32-bit],
85    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]),
86    [CXXFLAG_Mxx="-m32"],    [CXXFLAG_Mxx="-m32"],
87    [CXXFLAG_Mxx="-m64"])    [CXXFLAG_Mxx="-m64"])
 if test x"$CXX" != "xclang++" ; then  
   CXXFLAGS_BASE="$CXXFLAGS_BASE -fno-implicit-templates"  
 fi  
88    
89  CXXFLAGS="$CXXFLAG_Mxx $CXXFLAGS_BASE"  CXXFLAGS="$CXXFLAG_Mxx $CXXFLAGS_BASE"
90  AC_SUBST(CXXFLAG_Mxx)  AC_SUBST(CXXFLAG_Mxx)
# Line 132  Line 137 
137  AC_HEADER_STDBOOL  AC_HEADER_STDBOOL
138    
139  dnl  dnl
140    dnl the C boolean type to use in generated library headers
141    dnl
142    if test x"$ac_cv_header_stdbool_h" = xyes ; then
143      BOOLTY="bool"
144    elif test "x$ac_cv_type__Bool" = xyes; then
145      BOOLTY="_Bool"
146    else
147      BOOLTY="int"
148    fi
149    AC_SUBST(BOOLTY)
150    
151    dnl
152  dnl check for pthreads support  dnl check for pthreads support
153  dnl  dnl
154  ACX_PTHREAD  ACX_PTHREAD
# Line 208  Line 225 
225  dnl  dnl
226  AC_CHECK_FILES(/proc/cpuinfo)  AC_CHECK_FILES(/proc/cpuinfo)
227    
228    dnl check for getcpu and/or sched_getcpu
229    dnl
230    hasGetCPU=no;
231    AC_CHECK_HEADERS([linux/getcpu.h])
232    if test "x$ac_cv_header_linux_getcpu_h" = xyes; then
233      AC_CHECK_FUNCS([getcpu])
234      hasGetCPU=yes;
235    else
236      # getcpu is usually called using syscall
237      #
238      AC_MSG_CHECKING([SYS_getcpu])
239      AC_RUN_IFELSE([AC_LANG_SOURCE([[
240        #define _GNU_SOURCE
241        #include <unistd.h>
242        #include <sys/syscall.h>
243        int main () {
244          unsigned cpu, node;
245          return syscall (SYS_getcpu, &cpu, &node, 0);
246        }
247        ]])],[hasGetCPU=yes],[])
248      AC_MSG_RESULT([$hasGetCPU])
249      if test x"$hasGetCPU" = xyes ; then
250        AC_DEFINE([HAVE_SYS_GETCPU],[1],[Define if SYS_getcpu is defined in <sys/syscall.h>])
251      fi
252    fi
253    if test x"$hasGetCPU" != xyes ; then
254    AC_CHECK_FUNCS([sched_getcpu])
255    fi
256    
257  dnl  dnl
258  dnl OS-specific linking issues  dnl OS-specific linking issues
259  dnl  dnl
# Line 243  Line 289 
289  AC_SUBST(LD_NEEDS_RPATH)  AC_SUBST(LD_NEEDS_RPATH)
290  AC_SUBST(LIBM)  AC_SUBST(LIBM)
291    
292    #################### Logging configuration ####################
293    
294    LOGGING_ENABLED=false
295    AC_ARG_ENABLE([event-logging],
296      AC_HELP_STRING([--enable-event-logging], [include event-logging support for parallel target]),
297      [LOGGING_ENABLED=true],
298      [LOGGING_ENABLED=false])
299    
300    AC_SUBST(LOGGING_ENABLED)
301    
302    #################### end Logging configuration ####################
303    
304  #################### CUDA configuration ####################  #################### CUDA configuration ####################
305    
306    AC_ARG_ENABLE([cuda],
307      AC_HELP_STRING([--enable-cuda], [include support for targeting CUDA]))
308    
309    if test "${enable_cuda+set}" = set ; then
310  dnl  dnl
311  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
312  dnl  dnl
# Line 258  Line 320 
320    AC_MSG_RESULT([$NVCC])    AC_MSG_RESULT([$NVCC])
321    CUDA_ENABLED=true    CUDA_ENABLED=true
322  fi  fi
323    else
324      NVCC=":"
325      CUDA_ENABLED=false
326    fi
327  AC_SUBST(NVCC)  AC_SUBST(NVCC)
328  AC_SUBST(CUDA_ENABLED)  AC_SUBST(CUDA_ENABLED)
329    
# Line 265  Line 331 
331    
332  #################### OpenCL configuration ####################  #################### OpenCL configuration ####################
333    
334    AC_ARG_ENABLE([opencl],
335      AC_HELP_STRING([--enable-opencl], [include support for targeting OpenCL]))
336    
337    if test "${enable_opencl+set}" = set ; then
338    
339  dnl  dnl
340  dnl check for OpenCL support  dnl check for OpenCL support
341  dnl  dnl
# Line 383  Line 454 
454    SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double    SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
455    fi    fi
456  fi  fi
457    else
458      CL_ENABLED=false
459      CL_VERSION="0"
460      SIZEOF_CL_INT="0"
461      SIZEOF_CL_LONG="0"
462      SIZEOF_CL_FLOAT="0"
463      SIZEOF_CL_DOUBLE="0"
464    fi
465    
466  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
467  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
468  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 396  Line 476 
476    
477  #################### Teem configuration ####################  #################### Teem configuration ####################
478    
 dnl  
479  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
480  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
481  dnl compiler.  dnl compiler.
482  dnl  dnl
483    
484    dnl the path can be specified using "--with-teem=..." too
485    dnl
486  AC_ARG_WITH(teem,  AC_ARG_WITH(teem,
487    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),    AC_HELP_STRING([--with-teem=<path>], [specify path to teem installation]),
488    [ac_cv_use_teem=$withval], [ac_cv_use_teem=no])    [ac_cv_use_teem=$withval], [ac_cv_use_teem=no])
489    
490  if test x"$ac_cv_use_teem" = xno ; then  if test x"$ac_cv_use_teem" = xno ; then
491    dnl search for Teem in some standard places
492    dnl
493      AC_MSG_CHECKING([for teem])
494    TEEM_DIR=none    TEEM_DIR=none
495      POSSIBLE_TEEM_DIRS="/usr/local/teem /usr/local"
496      for dir in $POSSIBLE_TEEM_DIRS ; do
497        if test -f $dir/include/teem/nrrd.h ; then
498          TEEM_DIR=$dir
499          AC_MSG_RESULT([$TEEM_DIR])
500          break
501        fi
502      done
503      if test $TEEM_DIR = none ; then
504    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])    AC_MSG_ERROR([unable to find teem; use --with-teem option to specify location])
505      fi
506  else  else
507    AC_MSG_CHECKING([path to teem ($ac_cv_use_teem)])    AC_MSG_CHECKING([path to teem ($ac_cv_use_teem)])
508    case $ac_cv_use_teem in    case $ac_cv_use_teem in
# Line 431  Line 527 
527    AC_MSG_ERROR([unable to find teem])    AC_MSG_ERROR([unable to find teem])
528  fi  fi
529  dnl  dnl
530  dnl check that unu supports the dnorm command  dnl check that teem supports the nrrdMetaDataNormalize function
531  dnl  dnl
532  if test x"$TEEM_DIR" != xnone ; then  save_LDFLAGS=$LDFLAGS
533    AC_MSG_CHECKING([that \"unu dnorm\" works])  save_LIBS=$LIBS
534    if test -x $TEEM_DIR/bin/unu ; then  LDFLAGS="$LDFLAGS -L$TEEM_DIR/lib"
535      $TEEM_DIR/bin/unu dnorm > /dev/null 2> /dev/null  LIBS="$LIBS -lteem -lm"
536      if test $? -eq 0 ; then  AC_CHECK_FUNCS([nrrdMetaDataNormalize])
537        AC_MSG_RESULT([yes])  LDFLAGS=$save_LDFLAGS
538      else  LIBS=$save_LIBS
539        AC_MSG_ERROR([\"unu dnorm\" is not supported; please update your teem installation])  
540      fi  if test "x$ac_cv_func_nrrdMetaDataNormalize" != xyes; then
541    else    AC_MSG_ERROR(["please update your teem installation"])
     AC_MSG_ERROR([unable to find unu executable in $TEEM_DIR/bin"])  
   fi  
542  fi  fi
543    
544  AC_SUBST(TEEM_DIR)  AC_SUBST(TEEM_DIR)
545    
546  #################### end Teem configuration ####################  #################### end Teem configuration ####################
# Line 487  Line 582 
582    
583    dnl check that we have a compatible version of SML/NJ    dnl check that we have a compatible version of SML/NJ
584    dnl    dnl
585    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; please add it to your PATH or set SML_CMD])])
586    if test $SMLNJ_MAJOR_VERSION -lt 110 \    if test $SMLNJ_MAJOR_VERSION -lt 110 \
587      -o $SMLNJ_MINOR_VERSION -lt 79      -o $SMLNJ_MINOR_VERSION -lt 80
588    then    then
589      AC_MSG_ERROR([installation requires SML/NJ version 110.79+ (available from smlnj.org)])      AC_MSG_ERROR([installation requires SML/NJ version 110.80+ (available from smlnj.org)])
590    fi    fi
591    
592    dnl determine the heap-image suffix    dnl determine the heap-image suffix
# Line 501  Line 596 
596    
597    dnl look for ml-makedepend    dnl look for ml-makedepend
598    dnl    dnl
   AC_MSG_CHECKING([for ml-makedepend])  
599    tmpPATH="$SMLNJ_PATH:$PATH"    tmpPATH="$SMLNJ_PATH:$PATH"
600    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  
601    AC_SUBST(ML_MAKEDEPEND)    AC_SUBST(ML_MAKEDEPEND)
602    
603    dnl    dnl
# Line 537  Line 626 
626  fi  fi
627  AC_SUBST(SML)  AC_SUBST(SML)
628    
629  #################### SML configuration ####################  #################### end SML configuration ####################
630    
631  #################### Documentation tools configuration ####################  #################### Documentation tools configuration ####################
632    
# Line 634  Line 723 
723    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"
724    src/lib/build/Makefile    src/lib/build/Makefile
725    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
 dnl  test/MIP/Makefile  
 dnl  test/probe/Makefile  
 dnl  test/iso2d-polyline/Makefile  
 dnl  test/vr-lite-cam/Makefile  
 dnl  test/hlic/Makefile  
726  dnl  dnl
727  dnl ***** SML source files *****  dnl ***** SML source files *****
728    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
# Line 661  Line 745 
745  AC_CONFIG_FILES([  AC_CONFIG_FILES([
746    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
747  ], [chmod +x src/compiler/gen/fragments/mkmk.sh])  ], [chmod +x src/compiler/gen/fragments/mkmk.sh])
748  AC_CONFIG_FILES([  
749    src/tests/rtest/scripts/run.sh:src/tests/rtest/scripts/run_sh.in  dnl
750  ], [chmod +x src/tests/rtest/scripts/run.sh])  dnl additional files for logging tools
751  AC_CONFIG_FILES([  dnl
752    src/tests/rtest/scripts/run-one.sh:src/tests/rtest/scripts/run-one_sh.in  if test x"$LOGGING_ENABLED" = xtrue ; then
753  ], [chmod +x src/tests/rtest/scripts/run-one.sh])    AC_CONFIG_FILES(
754  #      src/logging/gen/Makefile
755  # more regression tests; should merge with rtest at some point      src/logging/log-analyze/Makefile
756  #      src/logging/log-dump/Makefile
757  # AC_CONFIG_FILES([      src/logging/gen/main.sml:src/logging/gen/main_sml.in
758  #   rtest2/scripts/run.sh:rtest2/scripts/run_sh.in      src/logging/lib/default-log-paths.hxx:src/logging/lib/default-log-paths_hxx.in
759  # ], [chmod +x rtest2/scripts/run.sh])    )
760  # AC_CONFIG_FILES([  fi
 #   rtest2/scripts/run-one.sh:rtest2/scripts/run-one_sh.in  
 # ], [chmod +x rtest2/scripts/run-one.sh])  
761    
762  dnl  dnl
763  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds
# Line 697  Line 779 
779    ])    ])
780    
781  MK_BUILD_DIR(rt-seq, sequential, [])  MK_BUILD_DIR(rt-seq, sequential, [])
782  MK_BUILD_DIR(rt-seq-debug, sequential, [debug])  MK_BUILD_DIR(rt-seq-debug, sequentiagetcpul, [debug])
783  MK_BUILD_DIR(rt-par, parallel, [parallel])  MK_BUILD_DIR(rt-par, parallel, [parallel])
784  MK_BUILD_DIR(rt-par-debug, parallel, [parallel debug])  MK_BUILD_DIR(rt-par-debug, parallel, [parallel debug])
785    
786    if test x"$LOGGING_ENABLED" = xtrue ; then
787      MK_BUILD_DIR(rt-par-log, parallel, [parallel logging])
788    fi
789    
790  #if test x"$CL_ENABLED" = xtrue ; then  #if test x"$CL_ENABLED" = xtrue ; then
791  #  MK_BUILD_DIR(rt-cl-f, opencl, [float])  #  MK_BUILD_DIR(rt-cl-f, opencl, [float])
792  #  MK_BUILD_DIR(rt-cl-d, opencl, [double])  #  MK_BUILD_DIR(rt-cl-d, opencl, [double])

Legend:
Removed from v.4127  
changed lines
  Added in v.4884

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