[GRASS-SVN] r55958 - in grass/trunk: . raster/r.sun

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 23 14:37:31 PDT 2013


Author: hamish
Date: 2013-04-23 14:37:31 -0700 (Tue, 23 Apr 2013)
New Revision: 55958

Modified:
   grass/trunk/configure.in
   grass/trunk/raster/r.sun/main.c
Log:
OpenCL on Mac uses a different header.. (#1446)

Modified: grass/trunk/configure.in
===================================================================
--- grass/trunk/configure.in	2013-04-23 14:58:16 UTC (rev 55957)
+++ grass/trunk/configure.in	2013-04-23 21:37:31 UTC (rev 55958)
@@ -1765,8 +1765,13 @@
 # With OpenCL includes directory
 
 LOC_CHECK_INC_PATH(opencl,OpenCL,OCLINCPATH)
-LOC_CHECK_INCLUDES(CL/cl.h,OpenCL,$OCLINCPATH)
 
+if test -n "$MACOSX_APP" ; then
+    LOC_CHECK_INCLUDES(OpenCL/opencl.h,OpenCL,$OCLINCPATH)
+else
+    LOC_CHECK_INCLUDES(CL/cl.h,OpenCL,$OCLINCPATH)
+fi
+
 # With OpenCL library directory
 
 LOC_CHECK_LIB_PATH(OpenCL,OpenCL,OCLLIBPATH)

Modified: grass/trunk/raster/r.sun/main.c
===================================================================
--- grass/trunk/raster/r.sun/main.c	2013-04-23 14:58:16 UTC (rev 55957)
+++ grass/trunk/raster/r.sun/main.c	2013-04-23 21:37:31 UTC (rev 55958)
@@ -34,7 +34,11 @@
 #include <stdlib.h>
 #include <math.h>
 #ifdef USE_OPENCL
-#include <CL/cl.h>
+  #ifdef __APPLE__
+    #include <OpenCL/opencl.h>
+  #else
+    #include <CL/cl.h>
+  #endif
 #endif
 
 #include <grass/gis.h>



More information about the grass-commit mailing list