aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-02 18:40:28 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:16 +0100
commitc708b2162f76a228235983f183f6250dc68522c4 (patch)
tree223e0f62003f7529f073ba35001c1ec4712f668c /configure.ac
parent356b10b53e51d1ec695d9b6a09bd9fab6b46a0f3 (diff)
Fix GPU code for new geometry, and tidy up some detector stuff (needs debugging)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 29 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index f7eac7e6..3674d190 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,28 +53,49 @@ AS_IF([test "x$enable_gsl_fudge" == "xyes"],
AC_MSG_RESULT([no])
])
-AC_ARG_ENABLE(opencl, AS_HELP_STRING([--enable-opencl], [Enable the use of OpenCL]))
+
+AC_ARG_WITH(opencl, AS_HELP_STRING([--with-opencl], [Use OpenCL]))
AC_MSG_CHECKING([whether to use OpenCL])
-AS_IF([test "x$enable_opencl" == "xyes"],
+AS_IF([test "x$with_opencl" == "xyes"],
[
AC_MSG_RESULT([yes])
- AC_CHECK_HEADERS([/System/Library/Frameworks/OpenCL.framework/Headers/cl.h],
+
+ AC_MSG_CHECKING([cl.h])
+ AS_IF([test -f /System/Library/Frameworks/OpenCL.framework/Headers/cl.h],
[
+ 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],
[
- OPENCL_CFLAGS="-I/usr/include/CL"
+ 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])
])
AM_CONDITIONAL([HAVE_OPENCL], test x$have_opencl = 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])
+])
AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [Disable GTK+/GLib]))
havegtk=false