[cig-commits] [commit] devel, master: updates configuration script based on newest autoconf functions in m4/ (67792d9)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Nov 6 08:29:01 PST 2014
Repository : https://github.com/geodynamics/specfem3d_globe
On branches: devel,master
Link : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f
>---------------------------------------------------------------
commit 67792d9bd509cd52eef5ba5b69611a7d0d9eb1e3
Author: daniel peter <peterda at ethz.ch>
Date: Tue Aug 19 21:51:05 2014 +0200
updates configuration script based on newest autoconf functions in m4/
>---------------------------------------------------------------
67792d9bd509cd52eef5ba5b69611a7d0d9eb1e3
configure | 40 +++++++++++++++++++++++++++++++---------
configure.ac | 2 +-
m4 | 2 +-
3 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/configure b/configure
index 1885e3e..0486526 100755
--- a/configure
+++ b/configure
@@ -6824,9 +6824,9 @@ fi
if test x"$want_opencl" != xno; then :
- $as_echo "## --- ##
-## OCL ##
-## --- ##"
+ $as_echo "## ------ ##
+## OpenCL ##
+## ------ ##"
@@ -6848,8 +6848,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
OCL_CFLAGS="-I$OCL_INC"
CFLAGS="$OCL_CFLAGS $CFLAGS"
fi
- ac_fn_c_check_header_mongrel "$LINENO" "CL/cl.h" "ac_cv_header_CL_cl_h" "$ac_includes_default"
-if test "x$ac_cv_header_CL_cl_h" = xyes; then :
+ # tests for Apple Mac OsX OpenCL header file
+ case $host in
+ *apple*) HEADER_H="OpenCL/cl.h";;
+ *) HEADER_H="CL/cl.h";;
+ esac
+ as_ac_Header=`$as_echo "ac_cv_header_${HEADER_H}" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "${HEADER_H}" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
else
@@ -6860,16 +6866,32 @@ fi
if test "x$OCL_LIB" != "x"; then
- OCL_LDFLAGS="-L$OCL_LIB"
+ # tests for Apple Mac OsX which could add "-framework OpenCL"
+ case $host in
+ *apple*) OCL_LDFLAGS="$OCL_LIB";;
+ *) OCL_LDFLAGS="-L$OCL_LIB";;
+ esac
LDFLAGS="$OCL_LDFLAGS $LDFLAGS"
+ else
+ # adds default OpenCL library
+ case $host in
+ *apple*) OCL_LIBS="-framework OpenCL";;
+ *) OCL_LIBS="-lOpenCL";;
+ esac
fi
- OCL_LIBS="-lOpenCL"
+
LIBS="$OCL_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clCreateBuffer in -lOpenCL" >&5
-$as_echo_n "checking for clCreateBuffer in -lOpenCL... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clGetPlatformIDs in OpenCL" >&5
+$as_echo_n "checking for clGetPlatformIDs in OpenCL... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
+#ifdef __APPLE__
+#include <OpenCL/cl.h>
+#else
#include <CL/cl.h>
+#endif
+
#ifdef FC_DUMMY_MAIN
#ifndef FC_DUMMY_MAIN_EQ_F77
# ifdef __cplusplus
diff --git a/configure.ac b/configure.ac
index 411444f..eb809dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,7 +203,7 @@ AS_IF([test x"$want_cuda" != xno], [
])
AS_IF([test x"$want_opencl" != xno], [
- AS_BOX([OCL])
+ AS_BOX([OpenCL])
AC_ARG_VAR(OCL_CPU_FLAGS, [OpenCL CPU compiler flags])
AC_ARG_VAR(OCL_GPU_FLAGS, [OpenCL GPU compiler flags])
CIT_OPENCL_CONFIG
diff --git a/m4 b/m4
index b58c6fb..1591113 160000
--- a/m4
+++ b/m4
@@ -1 +1 @@
-Subproject commit b58c6fb1cdfc650eeca28274913dc239888a09d4
+Subproject commit 159111399fa1f1202f3ac9a18dc47a2c1efd9a54
More information about the CIG-COMMITS
mailing list