Fix configure.ac for OS X and -framework

This commit is contained in:
James R. Barlow 2015-08-26 00:10:56 -07:00
parent f331a57b8e
commit 71f747f668

View File

@ -212,15 +212,19 @@ m4_define([MY_CHECK_FRAMEWORK],
)
have_opencl_lib=false
if test $host_os != Darwin; then
AC_CHECK_LIB(OpenCL, clGetPlatformIDs, have_opencl_lib=true, have_opencl_lib=false)
else
case "${host_os}" in
*darwin* | *-macos10*)
echo "checking for OpenCL framework"
MY_CHECK_FRAMEWORK([OpenCL])
if test $my_cv_framework_OpenCL = yes; then
have_opencl_lib=true
fi
fi
;;
*)
# default
AC_CHECK_LIB(OpenCL, clGetPlatformIDs, have_opencl_lib=true, have_opencl_lib=false)
;;
esac
if test "$enable_opencl" = "yes"; then
if !($have_opencl); then