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

SCM Repository

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

Diff of /branches/vis12/configure.ac

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

revision 2110, Mon Dec 17 16:54:31 2012 UTC revision 2111, Mon Dec 17 16:55:33 2012 UTC
# Line 128  Line 128 
128  else  else
129    CL_ENABLED=true    CL_ENABLED=true
130    CPPFLAGS_CL=""    CPPFLAGS_CL=""
131    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; break], [HAVE_CL_H="no"])    CL_HEADER=""
132      AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h], [HAVE_CL_H="yes"; CL_HEADER="$ac_header"; break], [HAVE_CL_H="no"])
133    if test x"$HAVE_CL_H" = xno ; then    if test x"$HAVE_CL_H" = xno ; then
134      # check for AMD's SDK      # check for AMD's SDK
135      AC_MSG_CHECKING([for cl.h in AMD's SDK])      AC_MSG_CHECKING([for cl.h in AMD's SDK])
136      if test -d /opt/AMDAPP/include/CL ; then      if test -d /opt/AMDAPP/include/CL ; then
137        HAVE_CL_H="yes"        HAVE_CL_H="yes"
138          CL_HEADER="/opt/AMDAPP/include/CL/cl.h"
139        AC_DEFINE([HAVE_CL_CL_H])        AC_DEFINE([HAVE_CL_CL_H])
140        CPPFLAGS_CL="-I/opt/AMDAPP/include"        CPPFLAGS_CL="-I/opt/AMDAPP/include"
141      fi      fi
# Line 143  Line 145 
145      AC_MSG_WARN([no cl.h found])      AC_MSG_WARN([no cl.h found])
146      CL_ENABLED=false      CL_ENABLED=false
147      CL_VERSION=0      CL_VERSION=0
148        SIZEOF_CL_INT=0
149        SIZEOF_CL_LONG=0
150        SIZEOF_CL_FLOAT=0
151        SIZEOF_CL_DOUBLE=0
152    else    else
153      # check the cl.h header for which version of OpenCL is supported      # check the cl.h header for which version of OpenCL is supported
154      AC_LANG([C])      AC_LANG([C])
# Line 171  Line 177 
177  dnl the specification specifies the behavior, but it was unspecified in 1.0.  dnl the specification specifies the behavior, but it was unspecified in 1.0.
178  dnl  dnl
179      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
180  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
181  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
182        [[cl_float4 x; x[0] = 0.0;]])],        [[cl_float4 x; x[0] = 0.0;]])],
183        [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],        [AC_DEFINE([CL_HOST_VECTORS_ARE_ARRAYS],[1],[host vector types are arrays])],
184  dnl  dnl
185  dnl not arrays, so try the OpenCL 1.1 structure representation  dnl not arrays, so try the OpenCL 1.1 structure representation
186  dnl  dnl
187        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
188  # ifdef HAVE_CL_CL_H  #include "$CL_HEADER"
189  #   include <CL/cl.h>  ]],
 # elif defined(HAVE_OPENCL_CL_H)  
 #   include <OpenCL/cl.h>  
 # else  
 #   error no cl.h  
 # endif]],  
190        [[cl_float4 x; x.s[0] = 0.0;]])],        [[cl_float4 x; x.s[0] = 0.0;]])],
191        [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])],
192        [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])        [AC_MSG_ERROR([unable to figure out host types for OpenCL vectors])])])
# Line 199  Line 195 
195    # substitutions    # substitutions
196      AC_SUBST(LIBS_CL)      AC_SUBST(LIBS_CL)
197      AC_SUBST(CPPFLAGS_CL)      AC_SUBST(CPPFLAGS_CL)
198      #
199      # determine the sizes of the host-side OpenCL types
200      AC_CHECK_SIZEOF([cl_int], [], [#include "$CL_HEADER"])
201      SIZEOF_CL_INT=$ac_cv_sizeof_cl_int
202      AC_CHECK_SIZEOF([cl_long], [], [#include "$CL_HEADER"])
203      SIZEOF_CL_LONG=$ac_cv_sizeof_cl_long
204      AC_CHECK_SIZEOF([cl_float], [], [#include "$CL_HEADER"])
205      SIZEOF_CL_FLOAT=$ac_cv_sizeof_cl_float
206      AC_CHECK_SIZEOF([cl_double], [], [#include "$CL_HEADER"])
207      SIZEOF_CL_DOUBLE=$ac_cv_sizeof_cl_double
208    fi    fi
209  fi  fi
210  AC_SUBST(CL_ENABLED)  AC_SUBST(CL_ENABLED)
211  AC_SUBST(CL_VERSION)  AC_SUBST(CL_VERSION)
212    
213    AC_SUBST(SIZEOF_CL_INT)
214    AC_SUBST(SIZEOF_CL_LONG)
215    AC_SUBST(SIZEOF_CL_FLOAT)
216    AC_SUBST(SIZEOF_CL_DOUBLE)
217    
218  dnl  dnl
219  dnl check for various library routines etc.  dnl check for various library routines etc.
220  dnl  dnl
# Line 429  Line 440 
440    
441  AC_C_BIGENDIAN  AC_C_BIGENDIAN
442    
443    #
444    # determine the sizes of the standard C types
445    AC_CHECK_SIZEOF([int])
446    SIZEOF_C_INT=$ac_cv_sizeof_int
447    AC_CHECK_SIZEOF([long])
448    SIZEOF_C_LONG=$ac_cv_sizeof_long
449    AC_CHECK_SIZEOF([float])
450    SIZEOF_C_FLOAT=$ac_cv_sizeof_float
451    AC_CHECK_SIZEOF([double])
452    SIZEOF_C_DOUBLE=$ac_cv_sizeof_double
453    
454    AC_SUBST(SIZEOF_C_INT)
455    AC_SUBST(SIZEOF_C_LONG)
456    AC_SUBST(SIZEOF_C_FLOAT)
457    AC_SUBST(SIZEOF_C_DOUBLE)
458    
459  dnl  dnl
460  dnl restore CFLAGS  dnl restore CFLAGS
461  dnl  dnl
# Line 484  Line 511 
511  dnl ***** SML source files *****  dnl ***** SML source files *****
512    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
513    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in    src/compiler/common/paths.sml:src/compiler/common/paths_sml.in
514      src/compiler/common/size-of.sml:src/compiler/common/size-of_sml.in
515  )  )
516    
517  AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in)  AC_CONFIG_HEADERS(src/include/Diderot/config.h:config/config_h.in)

Legend:
Removed from v.2110  
changed lines
  Added in v.2111

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