Fix configure.ac unconditionally enabling OpenCL

This commit is contained in:
James R. Barlow 2015-08-26 02:17:10 -07:00
parent 18ac7ae7ef
commit 73b0297e5e

View File

@ -221,9 +221,14 @@ case "${host_os}" in
if test $my_cv_framework_OpenCL = yes; then
have_opencl_lib=true
fi
AC_SUBST([AM_CPPFLAGS], [-DUSE_OPENCL])
OPENCL_CPPFLAGS=""
OPENCL_LDFLAGS="-framework OpenCL"
if test "$enable_opencl" = "yes"; then
if !($have_opencl_lib); then
AC_MSG_ERROR(Required OpenCL library not found!)
fi
AC_SUBST([AM_CPPFLAGS], [-DUSE_OPENCL])
OPENCL_CPPFLAGS=""
OPENCL_LDFLAGS="-framework OpenCL"
fi
;;
*)
# default