diff --git a/configure.ac b/configure.ac index 09cfef876..764031ecb 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,20 @@ AC_LINK_IFELSE( OPENCL_FLAGS= OPENCL_LIBS= found_opencl=0]) + +if test "$found_opencl" = 1; then +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #ifdef __APPLE_CC__ + #include + #else + #include + #endif +]], +[[return clCreateCommandQueueWithProperties(NULL, NULL, NULL, NULL); ]])], +[AC_DEFINE([HAS_OCL2], [1], [OpenCL library supports version 2.0 or later])], +[]) +fi + LIBS=$SAVED_LIBS CFLAGS=$SAVED_CFLAGS