Alexandre Julliard : configure: Fix the OpenCL detection for Mac OS.

Alexandre Julliard julliard at winehq.org
Fri Dec 3 09:31:39 CST 2010


Module: wine
Branch: master
Commit: fac67412123e8162fa7fba3d82e3dae6f30ed732
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fac67412123e8162fa7fba3d82e3dae6f30ed732

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec  3 14:16:55 2010 +0100

configure: Fix the OpenCL detection for Mac OS.

---

 configure    |   10 ++++++++--
 configure.ac |    7 ++++++-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 88d9b31..5abdaac 100755
--- a/configure
+++ b/configure
@@ -640,7 +640,6 @@ HALINCL
 XSLTINCL
 XML2INCL
 XML2LIBS
-LIBOPENCL
 NASLIBS
 X_EXTRA_LIBS
 X_LIBS
@@ -653,6 +652,7 @@ CROSSCC
 CROSSTEST_DISABLE
 PRELINK
 CARBONLIB
+LIBOPENCL
 FRAMEWORK_OPENAL
 COREAUDIO
 DISKARBITRATIONLIB
@@ -6541,6 +6541,12 @@ _ACEOF
 
         ac_cv_lib_openal=yes
     fi
+    if test "$ac_cv_header_OpenCL_opencl_h" = "yes"
+    then
+        LIBOPENCL="-framework OpenCL"
+
+        ac_cv_lib_OpenCL_clGetPlatformInfo=yes
+    fi
     if test "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes"
     then
         ac_save_LIBS="$LIBS"
@@ -9063,7 +9069,7 @@ Use the --without-x option if you really want this." "$LINENO" 5  ;;
 esac
 fi
 
-if test "$ac_cv_header_CL_opencl_h" = "yes" -o "$ac_cv_header_OpenCL_opencl_h" = "yes"
+if test "$ac_cv_header_CL_opencl_h" = "yes"
 then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clGetPlatformInfo in -lOpenCL" >&5
 $as_echo_n "checking for clGetPlatformInfo in -lOpenCL... " >&6; }
diff --git a/configure.ac b/configure.ac
index b0f576b..2431c7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -719,6 +719,11 @@ case $host_os in
         AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])
         ac_cv_lib_openal=yes
     fi
+    if test "$ac_cv_header_OpenCL_opencl_h" = "yes"
+    then
+        AC_SUBST(LIBOPENCL,"-framework OpenCL")
+        ac_cv_lib_OpenCL_clGetPlatformInfo=yes
+    fi
     if test "$ac_cv_header_IOKit_hid_IOHIDLib_h" = "yes"
     then
         ac_save_LIBS="$LIBS"
@@ -1102,7 +1107,7 @@ without X support, which probably isn't what you want. You will need
 to install ${notice_platform}development packages of Xlib/Xfree86 at the very least.])
 
 dnl **** Check for OpenCL ****
-if test "$ac_cv_header_CL_opencl_h" = "yes" -o "$ac_cv_header_OpenCL_opencl_h" = "yes"
+if test "$ac_cv_header_CL_opencl_h" = "yes"
 then
     AC_CHECK_LIB(OpenCL,clGetPlatformInfo,[AC_SUBST(LIBOPENCL,["-lOpenCL"])])
 fi




More information about the wine-cvs mailing list