Skip to content

Commit 73b0297

Browse files
author
James R. Barlow
committed
Fix configure.ac unconditionally enabling OpenCL
1 parent 18ac7ae commit 73b0297

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

configure.ac

+8-3
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,14 @@ case "${host_os}" in
221221
if test $my_cv_framework_OpenCL = yes; then
222222
have_opencl_lib=true
223223
fi
224-
AC_SUBST([AM_CPPFLAGS], [-DUSE_OPENCL])
225-
OPENCL_CPPFLAGS=""
226-
OPENCL_LDFLAGS="-framework OpenCL"
224+
if test "$enable_opencl" = "yes"; then
225+
if !($have_opencl_lib); then
226+
AC_MSG_ERROR(Required OpenCL library not found!)
227+
fi
228+
AC_SUBST([AM_CPPFLAGS], [-DUSE_OPENCL])
229+
OPENCL_CPPFLAGS=""
230+
OPENCL_LDFLAGS="-framework OpenCL"
231+
fi
227232
;;
228233
*)
229234
# default

0 commit comments

Comments
 (0)