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

revision 1217, Sat May 14 06:14:31 2011 UTC revision 1222, Sat May 14 16:58:46 2011 UTC
# Line 49  Line 49 
49  AC_SUBST(CFLAGS_BASE)  AC_SUBST(CFLAGS_BASE)
50    
51  dnl  dnl
52    dnl check for pthreads support
53    dnl
54    ACX_PTHREAD()
55    
56    dnl
57  dnl Look for NVIDIA's nvcc compiler  dnl Look for NVIDIA's nvcc compiler
58  dnl  dnl
59  AC_MSG_NOTICE([checking for CUDA and nvcc])  AC_MSG_NOTICE([checking for CUDA and nvcc])
# Line 67  Line 72 
72  dnl  dnl
73  dnl check for OpenCL support  dnl check for OpenCL support
74  dnl  dnl
75  OPENCL_LIBS="none"  CL_LIBS="none"
76  case "$host_os" in  case "$host_os" in
77    darwin*) # On Mac OS X we check for installed frameworks    darwin*) # On Mac OS X we check for installed frameworks
78      AX_CHECK_FRAMEWORK([OpenCL], [OPENCL_LIBS="-framework OpenCL"], [])      AX_CHECK_FRAMEWORK([OpenCL], [CL_LIBS="-framework OpenCL"], [])
79    ;;    ;;
80    *)    *)
81      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[OPENCL_LIBS="-lOpenCL"])      AC_CHECK_LIB([OpenCL],[clGetPlatformIDs],[CL_LIBS="-lOpenCL"])
82    ;;    ;;
83  esac  esac
84  if test x"$OPENCL_LIBS" = xnone ; then  if test x"$CL_LIBS" = xnone ; then
85    AC_MSG_WARN([no OpenCL library found])    AC_MSG_WARN([no OpenCL library found])
86    OPENCL_ENABLED=false    CL_ENABLED=false
87      CL_VERSION=0
88  else  else
89    OPENCL_ENABLED=true    CL_ENABLED=true
90    AC_SUBST(OPENCL_LIBS)    AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])
91      # check the cl.h header for which version of OpenCL is supported
92      AC_LANG([C])
93      AC_LINK_IFELSE([AC_LANG_PROGRAM([[
94    #include <stdio.h>
95    # ifdef HAVE_CL_CL_H
96    #   include <CL/cl.h>
97    # elif defined(HAVE_OPENCL_CL_H)
98    #   include <OpenCL/cl.h>
99    # else
100    #   error no cl.h
101    # endif]],
102    [[#if defined(CL_VERSION_1_1)
103      printf("11000\n");
104    #elif defined(CL_VERSION_1_0)
105      printf("10000\n");
106    #else
107      printf("0\n");
108    #endif
109        ]])],
110        [CL_VERSION=`./conftest$EXEEXT`], [CL_VERSION=0])
111      # substitutions
112      AC_SUBST(CL_LIBS)
113  fi  fi
114  AC_SUBST(OPENCL_ENABLED)  AC_SUBST(CL_ENABLED)
115    AC_SUBST(CL_VERSION)
 dnl  
 dnl check for pthreads support  
 dnl  
 ACX_PTHREAD()  
116    
117  dnl  dnl
118  dnl check for various library routines etc.  dnl check for various library routines etc.

Legend:
Removed from v.1217  
changed lines
  Added in v.1222

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