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 1839, Fri Apr 13 23:13:16 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 99  Line 99 
99  dnl  dnl
100  dnl check for OpenCL support  dnl check for OpenCL support
101  dnl  dnl
102  CL_LIBS="none"  LIBS_CL="none"
103  case "$host_os" in  case "$host_os" in
104    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
105      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [LIBS_CL="-framework OpenCL"], [])
106    ;;    ;;
107    *)    *)
108      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[LIBS_CL="-lOpenCL"])
109    ;;    ;;
110  esac  esac
111  if test x"$CL_LIBS" = xnone ; then  if test x"$LIBS_CL" = xnone ; then
112    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
113    CL_ENABLED=false    CL_ENABLED=false
114    CL_VERSION=0    CL_VERSION=0
115  else  else
116    CL_ENABLED=true    CL_ENABLED=true
117    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])    CPPFLAGS_CL=""
118      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"], [HAVE_CL_H="no"])
119      if test x"$HAVE_CL_H" = xno ; then
120        # check for AMD's SDK
121        AC_MSG_CHECKING([for cl.h in AMD's SDK])
122        if test -d /opt/AMDAPP/include/CL ; then
123          HAVE_CL_H="yes"
124          AC_DEFINE([HAVE_CL_CL_H])
125          CPPFLAGS_CL="-I/opt/AMDAPP/include"
126        fi
127        AC_MSG_RESULT([$HAVE_CL_H])
128      fi
129      if test x"$HAVE_CL_H" = xno ; then
130        AC_MSG_WARN([no cl.h found])
131        CL_ENABLED=false
132        CL_VERSION=0
133      else
134    # check the cl.h header for which version of OpenCL is supported    # check the cl.h header for which version of OpenCL is supported
135    AC_LANG([C])    AC_LANG([C])
136        save_CPPFLAGS=$CPPFLAGS
137        CPPFLAGS="$CPPFLAGS_CL $CPPFLAGS"
138    AC_LINK_IFELSE([AC_LANG_PROGRAM([[    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
139  #include <stdio.h>  #include <stdio.h>
140  # ifdef HAVE_CL_CL_H  # ifdef HAVE_CL_CL_H
# Line 163  Line 181 
181      [[cl_float4 x; x.s[0] = 0.0;]])],      [[cl_float4 x; x.s[0] = 0.0;]])],
182      [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])],
183      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])      [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
184      # restore saved CPPFLAGS
185        CPPFLAGS=$save_CPPFLAGS
186    # substitutions    # substitutions
187    AC_SUBST(CL_LIBS)      AC_SUBST(LIBS_CL)
188        AC_SUBST(CPPFLAGS_CL)
189      fi
190  fi  fi
191  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
192  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
# Line 453  Line 475 
475  AC_CONFIG_FILES([  AC_CONFIG_FILES([
476    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
477  ], [chmod +x src/compiler/gen/file2str/file2str.sh])  ], [chmod +x src/compiler/gen/file2str/file2str.sh])
478    AC_CONFIG_FILES([
479      rtest/scripts/run.sh:rtest/scripts/run_sh.in
480    ], [chmod +x rtest/scripts/run.sh])
481    AC_CONFIG_FILES([
482      rtest/scripts/run-one.sh:rtest/scripts/run-one_sh.in
483    ], [chmod +x rtest/scripts/run-one.sh])
484    
485  dnl  dnl
486  dnl generate makefiles for runtime library builds  dnl generate makefiles for runtime library builds

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

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