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

SCM Repository

[diderot] Diff of /branches/pure-cfg/configure.ac
ViewVC logotype

Diff of /branches/pure-cfg/configure.ac

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

trunk/configure.ac revision 202, Tue Aug 3 13:06:03 2010 UTC branches/pure-cfg/configure.ac revision 1171, Tue May 10 14:08:35 2011 UTC
# Line 9  Line 9 
9  AC_INIT(diderot,0.1,)  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) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])
13  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)
14  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
15  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
# Line 20  Line 20 
20  sinclude(config/acx_pthread.m4)  sinclude(config/acx_pthread.m4)
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    sinclude(config/ax_check_framework.m4)
24    
25  dnl  dnl
26  dnl get host information  dnl get host information
# Line 29  Line 29 
29    
30  dnl check for standard programs  dnl check for standard programs
31  dnl  dnl
32  AC_PROG_CC_C99  AC_PROG_CC([clang gcc cc])
33  AC_PROG_CPP  AC_PROG_CPP
34  AC_PROG_INSTALL  AC_PROG_INSTALL
35  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
36    
37    dnl check for c99 support
38  dnl  dnl
39  dnl If we are on Mac OS X, check for the presence of macports and/or fink  AC_PROG_CC_C99
40    if test x"$ac_cv_prog_cc_c99" = xno ; then
41      AC_MSG_ERROR([Diderot requires c99 support])
42    fi
43    
44    dnl extra C compiler options
45  dnl  dnl
46    CFLAG_M64="-m64"
47    CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"
48    AC_SUBST(CFLAG_M64)
49    AC_SUBST(CFLAGS_BASE)
50    
51    dnl
52    dnl Look for NVIDIA's nvcc compiler
53    dnl
54    AC_MSG_NOTICE([checking for CUDA and nvcc])
55    AC_PATH_PROG(NVCC, nvcc, no, $PATH)
56    if test x"$NVCC" = xno ; then
57      AC_MSG_WARN([nvcc not found])
58      CUDA_ENABLED=false
59      NVCC=":"
60    else
61      AC_MSG_RESULT([$NVCC])
62      CUDA_ENABLED=true
63    fi
64    AC_SUBST(NVCC)
65    AC_SUBST(CUDA_ENABLED)
66    
67    dnl
68    dnl check for OpenCL support
69    dnl
70    OPENCL_LIBS="none"
71  case "$host_os" in  case "$host_os" in
72    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
73        AX_CHECK_FRAMEWORK([OpenCL], [OPENCL_LIBS="-framework OpenCL"], [])
74      ;;
75      *)
76        AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[OPENCL_LIBS="-lOpenCL"])
77      ;;
78    esac
79    if test x"$OPENCL_LIBS" = xnone ; then
80      AC_MSG_WARN([no OpenCL library found])
81      OPENCL_ENABLED=false
82    else
83      OPENCL_ENABLED=true
84      AC_SUBST(OPENCL_LIBS)
85    fi
86    AC_SUBST(OPENCL_ENABLED)
87    
88    dnl
89    dnl check for pthreads support
90    dnl
91    ACX_PTHREAD()
92    
93    dnl
94    dnl OS-specific linking issues
95    dnl
96    LD_NEEDS_RPATH=false;
97    LIBM=""
98    case "$host_os" in
99      darwin*) # On Mac OS X we check for the presence of macports and/or fink
100      if test -x /opt/local/bin/port ; then      if test -x /opt/local/bin/port ; then
101        HAS_MACPORTS=yes        HAS_MACPORTS=yes
102      else      else
# Line 50  Line 108 
108        HAS_FINK=no        HAS_FINK=no
109      fi      fi
110    ;;    ;;
111      linux*) # On Linux we include the -rpath option to pick up dynamically-loaded libraries
112        LD_NEEDS_RPATH=true
113        LIBM="-lm"
114      ;;
115  esac  esac
116    
117  if test x"$HAS_MACPORTS" = xyes ; then  if test x"$HAS_MACPORTS" = xyes ; then
# Line 60  Line 122 
122    LDPATHS=""    LDPATHS=""
123  fi  fi
124  AC_SUBST(LDPATHS)  AC_SUBST(LDPATHS)
125    AC_SUBST(LD_NEEDS_RPATH)
126    AC_SUBST(LIBM)
127    
128  dnl  dnl
129  dnl get the path to the TEEM installation  dnl get the path to the TEEM installation
# Line 156  Line 220 
220  AC_CONFIG_FILES(  AC_CONFIG_FILES(
221  dnl  dnl
222  dnl ***** Makefiles *****  dnl ***** Makefiles *****
223      Makefile
224    src/dnorm/Makefile    src/dnorm/Makefile
225    src/compiler/Makefile    src/compiler/Makefile
226      src/lib/Makefile
227      src/lib/build/Makefile
228      src/lib/build/mk/build.gmk:src/lib/build/mk/build_gmk.in
229      test/MIP/Makefile
230      test/probe/Makefile
231    dnl
232    dnl ***** CM files *****
233      src/compiler/codegen/sources.cm:src/compiler/codegen/sources_cm.in
234  dnl  dnl
235  dnl ***** SML source files *****  dnl ***** SML source files *****
236    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
237      src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
238  )  )
239    
240  dnl  dnl
# Line 170  Line 244 
244    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in    bin/install-sml-wrapper.sh:config/install-sml-wrapper_sh.in
245  ], [chmod +x bin/install-sml-wrapper.sh])  ], [chmod +x bin/install-sml-wrapper.sh])
246    
247    dnl
248    dnl generate makefiles for runtime library builds
249    dnl
250    dnl usage: MK_BUILD_DIR(<build-dir>, <target-platform>, <options>)
251    dnl
252    AC_DEFUN([MK_BUILD_DIR], [
253        if test ! -d src/lib/build/$1 ; then
254          mkdir src/lib/build/$1
255        fi
256        [sed -e 's,@BUILD_TARGET@,$1,g' \
257          -e 's,@TARGET_PLATFORM@,$2,g' \
258          -e 's,@BUILD_OPTIONS@,$3,g' \
259          src/lib/build/mk/Makefile.in \
260            > src/lib/build/$1/Makefile.in]
261        AC_CONFIG_FILES(src/lib/build/$1/Makefile)
262      ])
263    
264    MK_BUILD_DIR(rt-c-f, c-target, [float])
265    MK_BUILD_DIR(rt-c-f-debug, c-target, [float debug])
266    
267  AC_OUTPUT  AC_OUTPUT

Legend:
Removed from v.202  
changed lines
  Added in v.1171

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