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

SCM Repository

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

Diff of /branches/charisee/configure.ac

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

revision 1671, Sun Dec 4 10:56:10 2011 UTC revision 1990, Fri Aug 3 18:09:06 2012 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 COPYRIGHT (c) 2012 The Diderot Project
4  dnl All rights reserved.  dnl All rights reserved.
5  dnl  dnl
6    
7  AC_INIT(diderot,0.1,)  AC_INIT(diderot,0.1,)
8    
9  AC_PREREQ(2.60)  AC_PREREQ(2.60)
10  AC_COPYRIGHT([[COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])  AC_COPYRIGHT([[COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu)]])
11  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)  AC_CONFIG_SRCDIR(src/dnorm/dnorm.c)
12  AC_CONFIG_AUX_DIR(config)  AC_CONFIG_AUX_DIR(config)
13  AC_CONFIG_MACRO_DIR(config)  AC_CONFIG_MACRO_DIR(config)
# Line 32  Line 32 
32  AC_PROG_INSTALL  AC_PROG_INSTALL
33  AC_PROG_MAKE_SET  AC_PROG_MAKE_SET
34    
35    dnl FIXME: this works for now, but we should probably switch to libtool
36    dnl
37    AC_PATH_PROG(LD, [ld], [none])
38    if test x$LD = xnone ; then
39      AC_MSG_ERROR([cannot find ld command])
40    fi
41    AC_SUBST(LD)
42    
43  dnl check for c99 support  dnl check for c99 support
44  dnl  dnl
45  AC_PROG_CC_C99  AC_PROG_CC_C99
# Line 39  Line 47 
47    AC_MSG_ERROR([Diderot requires c99 support])    AC_MSG_ERROR([Diderot requires c99 support])
48  fi  fi
49    
50    AC_ARG_ENABLE([32-bit],
51      AC_HELP_STRING([--enable-32-bit], [configure Diderot to produce 32-bit executables]),
52      [CFLAG_MXX="-m32"],
53      [CFLAG_MXX="-m64"])
54    
55  dnl extra C compiler options  dnl extra C compiler options
56  dnl  dnl
57  CFLAGS=""  CFLAGS=""
 CFLAG_M64="-m64"  
58  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"  CFLAGS_BASE="-Wformat -Wreturn-type -Wuninitialized"
59  AC_SUBST(CFLAG_M64)  AC_SUBST(CFLAG_MXX)
60  AC_SUBST(CFLAGS_BASE)  AC_SUBST(CFLAGS_BASE)
61    
62  dnl  dnl
# Line 99  Line 111 
111  dnl  dnl
112  dnl check for OpenCL support  dnl check for OpenCL support
113  dnl  dnl
114  CL_LIBS="none"  LIBS_CL="none"
115  case "$host_os" in  case "$host_os" in
116    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
117      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
118    ;;    ;;
119    *)    *)
120      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
121    ;;    ;;
122  esac  esac
123  if test x"$CL_LIBS" = xnone ; then  if test x"$LIBS_CL" = xnone ; then
124    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
125    CL_ENABLED=false    CL_ENABLED=false
126    CL_VERSION=0    CL_VERSION=0
127  else  else
128    CL_ENABLED=true    CL_ENABLED=true
129    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])    CPPFLAGS_CL=""
130      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; break], [HAVE_CL_H="no"])
131      if test x"$HAVE_CL_H" = xno ; then
132        # check for AMD's SDK
133        AC_MSG_CHECKING([for AMD's SDK cl.h])
134        if test -d /opt/AMDAPP/include/CL ; then
135          HAVE_CL_H="yes"
136          AC_DEFINE([HAVE_CL_CL_H])
137          CPPFLAGS_CL="-I/opt/AMDAPP/include"
138        fi
139        AC_MSG_RESULT([$HAVE_CL_H])
140      fi
141      if test x"$HAVE_CL_H" = xno ; then
142        # check for NVIDIA's SDK
143        AC_MSG_CHECKING([for NVIDIA's SDK cl.h])
144        if test -d /usr/local/cuda/include/CL ; then
145          HAVE_CL_H="yes"
146          AC_DEFINE([HAVE_CL_CL_H])
147          CPPFLAGS_CL="-I/usr/local/cuda/include"
148        fi
149        AC_MSG_RESULT([$HAVE_CL_H])
150      fi
151      if test x"$HAVE_CL_H" = xno ; then
152        AC_MSG_WARN([no cl.h found])
153        CL_ENABLED=false
154        CL_VERSION=0
155      else
156    # check the cl.h header for which version of OpenCL is supported    # check the cl.h header for which version of OpenCL is supported
157    AC_LANG([C])    AC_LANG([C])
158        save_CPPFLAGS=$CPPFLAGS
159        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
160    AC_LINK_IFELSE([AC_LANG_PROGRAM([[    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
161  #include <stdio.h>  #include <stdio.h>
162  # ifdef HAVE_CL_CL_H  # ifdef HAVE_CL_CL_H
# Line 163  Line 203 
203      [[cl_float4 x; x.s[0] = 0.0;]])],      [[cl_float4 x; x.s[0] = 0.0;]])],
204      [AC_DEFINE([CL_HOST_VECTORS_ARE_STRUCTS],[1],[host vector types are structs])],      [AC_DEFINE([CL_HOST_VECTORS_ARE_STRUCTS],[1],[host vector types are structs])],
205      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
206      # restore saved CPPFLAGS
207        CPPFLAGS=$save_CPPFLAGS
208    # substitutions    # substitutions
209    AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
210        AC_SUBST(CPPFLAGS_CL)
211      fi
212  fi  fi
213  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
214  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
# Line 316  Line 360 
360  dnl  dnl
361  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])])
362  if test $SMLNJ_MAJOR_VERSION -lt 110 \  if test $SMLNJ_MAJOR_VERSION -lt 110 \
363    -o $SMLNJ_MINOR_VERSION -lt 73    -o $SMLNJ_MINOR_VERSION -lt 74
364  then  then
365    AC_MSG_ERROR([installation requires SML/NJ version 110.73+])    AC_MSG_ERROR([installation requires SML/NJ version 110.74+])
366  fi  fi
367  AC_SUBST(SMLNJ_VERSION)  AC_SUBST(SMLNJ_VERSION)
368    
# Line 378  Line 422 
422  dnl run the compiler tests in 64-bit mode  dnl run the compiler tests in 64-bit mode
423  dnl  dnl
424  save_CFLAGS=$CFLAGS  save_CFLAGS=$CFLAGS
425  CFLAGS="$CFLAGS $CFLAG_M64"  CFLAGS="$CFLAGS $CFLAG_MXX"
426    
427  dnl  dnl
428  dnl check for gcc builtin atomic operations  dnl check for gcc builtin atomic operations
# Line 453  Line 497 
497  AC_CONFIG_FILES([  AC_CONFIG_FILES([
498    src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in    src/compiler/gen/file2str/file2str.sh:src/compiler/gen/file2str/file2str_sh.in
499  ], [chmod +x src/compiler/gen/file2str/file2str.sh])  ], [chmod +x src/compiler/gen/file2str/file2str.sh])
500    AC_CONFIG_FILES([
501      rtest/scripts/run.sh:rtest/scripts/run_sh.in
502    ], [chmod +x rtest/scripts/run.sh])
503    AC_CONFIG_FILES([
504      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
505    ], [chmod +x rtest/scripts/run-one.sh])
506    
507  dnl  dnl
508  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds

Legend:
Removed from v.1671  
changed lines
  Added in v.1990

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