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

branches/vis12/configure.ac revision 2747, Wed Oct 1 21:08:57 2014 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) 2014 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  AC_INIT(diderot,0.1,)  AC_INIT(diderot,1.0,)
10    
11  AC_PREREQ(2.60)  AC_PREREQ(2.60)
12  AC_COPYRIGHT([[COPYRIGHT (c) 2014 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])  AC_COPYRIGHT([[COPYRIGHT (c) 2016 The University of Chicago]])
13  AC_CONFIG_SRCDIR(src/compiler/driver/main.sml)  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)  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 27  Line 36 
36    
37  dnl check for standard programs  dnl check for standard programs
38  dnl  dnl
 AC_PROG_CC([clang gcc cc])  
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    
# Line 40  Line 50 
50  fi  fi
51  AC_SUBST(LD)  AC_SUBST(LD)
52    
53  dnl check for c99 support  dnl extra compiler options
54  dnl  dnl
55  AC_PROG_CC_C99  CXXFLAGS_BASE="$CXXFLAGS -Wformat -Wreturn-type -Wuninitialized"
 if test x"$ac_cv_prog_cc_c99" = xno ; then  
   AC_MSG_ERROR([Diderot requires c99 support])  
 fi  
56    
57  AC_ARG_ENABLE([32-bit],  AC_ARG_ENABLE([32-bit],
58    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]),
59    [CFLAG_MXX="-m32"],    [CXXFLAG_Mxx="-m32"],
60    [CFLAG_MXX="-m64"])    [CXXFLAG_Mxx="-m64"])
61    if test x"$CXX" != "xclang++" ; then
62      CXXFLAGS_BASE="$CXXFLAGS_BASE -fno-implicit-templates"
63    fi
64    
65  dnl extra C compiler options  CXXFLAGS="$CXXFLAG_Mxx $CXXFLAGS_BASE"
66  dnl  AC_SUBST(CXXFLAG_Mxx)
67  CFLAGS=""  AC_SUBST(CXXFLAGS_BASE)
 CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"  
 AC_SUBST(CFLAG_MXX)  
 AC_SUBST(CFLAGS_BASE)  
68    
69  dnl  dnl
70  dnl standard headers  dnl check for <stdbool.h>, which we use in the C API
71  dnl  dnl
72  AC_HEADER_STDBOOL  AC_HEADER_STDBOOL
73    
# Line 120  Line 127 
127    if test x"$HAVE_CL_H" = xno ; then    if test x"$HAVE_CL_H" = xno ; then
128      # check for NVIDIA's SDK      # check for NVIDIA's SDK
129      AC_MSG_CHECKING([for NVIDIA's SDK cl.h])      AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
130      if test -d /usr/local/cuda/include/CL ; then      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"        HAVE_CL_H="yes"
139          CL_HEADER="$CUDA_HOME/include/CL/cl.h"
140        AC_DEFINE([HAVE_CL_CL_H])        AC_DEFINE([HAVE_CL_CL_H])
141        CPPFLAGS_CL="-I/usr/local/cuda/include"        CPPFLAGS_CL="-I$CUDA_HOME/include"
142      fi      fi
143      AC_MSG_RESULT([$HAVE_CL_H])      AC_MSG_RESULT([$HAVE_CL_H])
144    fi    fi
# Line 149  Line 164 
164  # else  # else
165  #   error no cl.h  #   error no cl.h
166  # endif]],  # endif]],
167  [[#if defined(CL_VERSION_1_1)  [[#if defined(CL_VERSION_1_2)
168    printf("11000\n");    printf("120\n");
169    #elif defined(CL_VERSION_1_1)
170      printf("110\n");
171  #elif defined(CL_VERSION_1_0)  #elif defined(CL_VERSION_1_0)
172    printf("10000\n");    printf("100\n");
173  #else  #else
174    printf("0\n");    printf("0\n");
175  #endif  #endif
# Line 195  Line 212 
212  fi  fi
213  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
214  AC_SUBST(CL_VERSION)  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)  AC_SUBST(SIZEOF_CL_INT)
218  AC_SUBST(SIZEOF_CL_LONG)  AC_SUBST(SIZEOF_CL_LONG)
# Line 361  Line 379 
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 77      -o $SMLNJ_MINOR_VERSION -lt 79
419  then  then
420    AC_MSG_ERROR([installation requires SML/NJ version 110.77+ (available from smlnj.org)])      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 398  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 ********************  dnl ******************** Documentation tools ********************
460    
461  dnl check for doxygen  dnl check for doxygen
462  dnl  dnl
463  AC_ARG_WITH([doxygen],  AC_ARG_WITH([doxygen],
464    [AS_HELP_STRING([--with-doxygen=PATH], [specify location of doxygen executable])],    [AS_HELP_STRING([--with-doxygen=<path>], [specify location of doxygen executable])],
465    [DOXYGEN=$with_doxygen],    [DOXYGEN=$with_doxygen],
466    [DOXYGEN=none])    [DOXYGEN=none])
467  if test x$DOXYGEN = xnone ; then  if test x$DOXYGEN = xnone ; then
# Line 521  Line 578 
578  dnl ******************** config.h stuff ********************  dnl ******************** config.h stuff ********************
579  dnl  dnl
580    
581  AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/include"], [path for Diderot header files])  AC_DEFINE_UNQUOTED(DIDEROT_INCLUDE_PATH,["$DIDEROT_SRCDIR/lib/include"], [path for Diderot header files])
582    
583  AH_TOP([  AH_TOP([
584  /*  /*
585   * COPYRIGHT (c) 2014 Diderot project. (http://diderot-language.cs.uchicago.edu)   * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
586   * All rights reserved.   *
587     * COPYRIGHT (c) 2016 The University of Chicago * All rights reserved.
588   */   */
589    
590  #ifndef _DIDEROT_CONFIG_H_  #ifndef _DIDEROT_CONFIG_H_
# Line 535  Line 593 
593  ])  ])
594  AH_BOTTOM([  AH_BOTTOM([
595    
 #ifdef NDEBUG  
 #define STATIC_INLINE   static inline  
 #else  
 #define STATIC_INLINE   static  
 #endif  
   
596  #endif /* !_DIDEROT_CONFIG_H_ */  #endif /* !_DIDEROT_CONFIG_H_ */
597  ])  ])
598    
# Line 548  Line 600 
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    Makefile    Makefile
615    doc/Makefile  dnl  doc/Makefile
616    doc/man/Makefile  dnl  doc/man/Makefile
617    src/clinfo/Makefile  dnl  src/clinfo/Makefile
618    src/compiler/Makefile    src/compiler/Makefile"$COMPILER_MAKEFILE_IN"
619    src/lib/build/Makefile  dnl  src/lib/build/Makefile
620    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
621    test/MIP/Makefile  dnl  test/MIP/Makefile
622    test/probe/Makefile  dnl  test/probe/Makefile
623    test/iso2d-polyline/Makefile  dnl  test/iso2d-polyline/Makefile
624    test/vr-lite-cam/Makefile  dnl  test/vr-lite-cam/Makefile
625    test/hlic/Makefile  dnl  test/hlic/Makefile
626  dnl  dnl
627  dnl ***** SML source files *****  dnl ***** SML source files *****
628    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
629    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    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    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/include/Diderot/config.h:config/config_h.in)  #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
# Line 579  Line 641 
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([  AC_CONFIG_FILES([
644    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
645  ], [chmod +x src/compiler/gen/file2str/file2str.sh])  ], [chmod +x src/compiler/gen/fragments/mkfrags.sh])
646  AC_CONFIG_FILES([  AC_CONFIG_FILES([
647    rtest/scripts/run.sh:rtest/scripts/run_sh.in    src/compiler/gen/fragments/mkmk.sh:src/compiler/gen/fragments/mkmk_sh.in
648  ], [chmod +x rtest/scripts/run.sh])  ], [chmod +x src/compiler/gen/fragments/mkmk.sh])
649  AC_CONFIG_FILES([  # AC_CONFIG_FILES([
650    rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in  #   rtest/scripts/run.sh:rtest/scripts/run_sh.in
651  ], [chmod +x rtest/scripts/run-one.sh])  # ], [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  dnl
666  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds
# Line 605  Line 679 
679      AC_CONFIG_FILES(src/lib/build/$1/Makefile)      AC_CONFIG_FILES(src/lib/build/$1/Makefile)
680    ])    ])
681    
682  MK_BUILD_DIR(rt-c-f, c, [float])  #MK_BUILD_DIR(rt-seq-f, c, [float])
683  MK_BUILD_DIR(rt-c-d, c, [double])  #MK_BUILD_DIR(rt-seq-d, c, [double])
684  MK_BUILD_DIR(rt-c-f-debug, c, [float debug])  #MK_BUILD_DIR(rt-seq-f-debug, c, [float debug])
685  MK_BUILD_DIR(rt-c-d-debug, c, [double debug])  #MK_BUILD_DIR(rt-seq-d-debug, c, [double debug])
686  MK_BUILD_DIR(rt-c-f-par, parallel, [parallel float])  #MK_BUILD_DIR(rt-par-f, parallel, [parallel float])
687  MK_BUILD_DIR(rt-c-d-par, parallel, [parallel double])  #MK_BUILD_DIR(rt-par-d, parallel, [parallel double])
688  MK_BUILD_DIR(rt-c-f-par-debug, parallel, [parallel float debug])  #MK_BUILD_DIR(rt-par-f-debug, parallel, [parallel float debug])
689  MK_BUILD_DIR(rt-c-d-par-debug, parallel, [parallel double debug])  #MK_BUILD_DIR(rt-par-d-debug, parallel, [parallel double debug])
690    
691  if test x"$CL_ENABLED" = xtrue ; then  #if test x"$CL_ENABLED" = xtrue ; then
692    MK_BUILD_DIR(rt-cl-f, cl, [float])  #  MK_BUILD_DIR(rt-cl-f, cl, [float])
693    MK_BUILD_DIR(rt-cl-d, cl, [double])  #  MK_BUILD_DIR(rt-cl-d, cl, [double])
694    MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])  #  MK_BUILD_DIR(rt-cl-f-debug, cl, [float debug])
695    MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])  #  MK_BUILD_DIR(rt-cl-d-debug, cl, [double debug])
696  fi  #fi
697    
698  AC_OUTPUT  AC_OUTPUT

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

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