aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-09 16:18:47 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:19 +0100
commite33dac04453ee0b759af5560dd4758f6cfc7eb67 (patch)
tree3bc200d9f58766fe7f54f52a0c990d0c26836668
parent46ead5b4294bd3b9fed14f89a2c178ac9876d7ce (diff)
Fix OpenCL check
-rwxr-xr-xconfigure40
-rw-r--r--configure.ac40
2 files changed, 44 insertions, 36 deletions
diff --git a/configure b/configure
index 3c4bb53c..1b502c5e 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/configure.ac b/configure.ac
index c2266a2b..e35a7dda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
])