Commit e33dac04 authored by Thomas White's avatar Thomas White
Browse files

Fix OpenCL check

parent 46ead5b4
......@@ -6484,31 +6484,37 @@ $as_echo "/System/Library/Frameworks/OpenCL.framework/Headers/cl.h" >&6; }
OPENCL_CFLAGS="-I/System/Library/Frameworks/OpenCL.framework/Headers"
OPENCL_LIBS="-framework OpenCL"
fi
if test -f /usr/local/cuda/cuda/include/CL/cl.h; then :
else
if test -f /usr/local/cuda/cuda/include/CL/cl.h; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/local/cuda/cuda/include/CL/cl.h" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/local/cuda/cuda/include/CL/cl.h" >&5
$as_echo "/usr/local/cuda/cuda/include/CL/cl.h" >&6; }
OPENCL_CFLAGS="-I/usr/local/cuda/cuda/include"
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
OPENCL_CFLAGS="-I/usr/local/cuda/cuda/include"
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
fi
if test -f /usr/local/cuda/include/CL/cl.h; then :
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/local/cuda/include/CL/cl.h" >&5
if test -f /usr/local/cuda/include/CL/cl.h; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/local/cuda/include/CL/cl.h" >&5
$as_echo "/usr/local/cuda/include/CL/cl.h" >&6; }
OPENCL_CFLAGS="-I/usr/local/cuda/include"
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
OPENCL_CFLAGS="-I/usr/local/cuda/include"
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, assuming /usr/include/CL/cl.h" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, assuming /usr/include/CL/cl.h" >&5
$as_echo "not found, assuming /usr/include/CL/cl.h" >&6; }
OPENCL_CFLAGS=""
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
OPENCL_CFLAGS=""
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
fi
fi
fi
......@@ -6522,7 +6528,7 @@ else
$as_echo "no" >&6; }
fi
if test "x$cl_cl_h" = "xtrue"; then :
if test x$cl_cl_h = xtrue; then :
$as_echo "#define HAVE_CL_CL_H 1" >>confdefs.h
......
......@@ -63,32 +63,34 @@ AS_IF([test "x$with_opencl" == "xyes"],
AC_MSG_RESULT([/System/Library/Frameworks/OpenCL.framework/Headers/cl.h])
OPENCL_CFLAGS="-I/System/Library/Frameworks/OpenCL.framework/Headers"
OPENCL_LIBS="-framework OpenCL"
])
AS_IF([test -f /usr/local/cuda/cuda/include/CL/cl.h],
[
AC_MSG_RESULT([/usr/local/cuda/cuda/include/CL/cl.h])
OPENCL_CFLAGS="-I/usr/local/cuda/cuda/include"
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
])
AS_IF([test -f /usr/local/cuda/include/CL/cl.h],
[
AC_MSG_RESULT([/usr/local/cuda/include/CL/cl.h])
OPENCL_CFLAGS="-I/usr/local/cuda/include"
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
], [
AC_MSG_RESULT([not found, assuming /usr/include/CL/cl.h])
OPENCL_CFLAGS=""
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
AS_IF([test -f /usr/local/cuda/cuda/include/CL/cl.h],
[
AC_MSG_RESULT([/usr/local/cuda/cuda/include/CL/cl.h])
OPENCL_CFLAGS="-I/usr/local/cuda/cuda/include"
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
], [
AS_IF([test -f /usr/local/cuda/include/CL/cl.h],
[
AC_MSG_RESULT([/usr/local/cuda/include/CL/cl.h])
OPENCL_CFLAGS="-I/usr/local/cuda/include"
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
], [
AC_MSG_RESULT([not found, assuming /usr/include/CL/cl.h])
OPENCL_CFLAGS=""
OPENCL_LIBS="-lOpenCL"
cl_cl_h=true
])
])
])
AC_DEFINE([HAVE_OPENCL], [1], [Define to 1 if OpenCL is available])
have_opencl=true
], [
AC_MSG_RESULT([no])
])
AS_IF([test "x$cl_cl_h" = "xtrue"],
AS_IF([test x$cl_cl_h = xtrue],
[
AC_DEFINE([HAVE_CL_CL_H], [1], [Define to 1 if CL/cl.h should be used])
])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment