diff --git a/Makefile.in b/Makefile.in
index 72cd619..861404b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -278,8 +278,8 @@
$(top_srcdir)/m4/ac_func_fseeko.m4 \
$(top_srcdir)/m4/ac_prog_perl_version.m4 \
$(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/argz.m4 \
- $(top_srcdir)/m4/ax_check_cl.m4 \
$(top_srcdir)/m4/ax_lang_compiler_ms.m4 \
+ $(top_srcdir)/m4/ax_opencl.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/m4/cxx_have_bool.m4 \
$(top_srcdir)/m4/cxx_have_lstring.m4 \
@@ -2620,7 +2620,7 @@
ac_prog_perl_version.m4 \
acx_pthread.m4 \
argz.m4 \
- ax_check_cl.m4 \
+ ax_opencl.m4 \
ax_lang_compiler_ms.m4 \
ax_prefix_config_h.m4 \
cxx_have_bool.m4 \
diff --git a/configure.ac b/configure.ac
index 87a95b0..ab8c7bf 100755
--- a/configure.ac
+++ b/configure.ac
@@ -386,7 +386,7 @@
AC_SUBST(OPENMP_CFLAGS)
# Enable support for OpenCL
-AX_CHECK_CL([C])
+AX_OPENCL([C])
CFLAGS="$CL_CFLAGS $CFLAGS"
LIBS="$CL_LIBS $LIBS"
AC_SUBST(CL_CFLAGS)
diff --git a/m4/Makefile.am b/m4/Makefile.am
index c023aa8..4a36678 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -20,7 +20,7 @@
ac_prog_perl_version.m4 \
acx_pthread.m4 \
argz.m4 \
- ax_check_cl.m4 \
+ ax_opencl.m4 \
ax_lang_compiler_ms.m4 \
ax_prefix_config_h.m4 \
cxx_have_bool.m4 \
diff --git a/m4/ax_check_cl.m4 b/m4/ax_opencl.m4
similarity index 84%
rename from m4/ax_check_cl.m4
rename to m4/ax_opencl.m4
index a1f2cbb..2100942 100644
--- a/m4/ax_check_cl.m4
+++ b/m4/ax_opencl.m4
@@ -1,15 +1,15 @@
# -*- mode: autoconf -*-
#
-# AX_CHECK_CL
+# AX_OPENCL
#
-# Check for an OpenCL implementation. If CL is found, the required compiler
-# and linker flags are included in the output variables "CL_CFLAGS" and
-# "CL_LIBS", respectively. If no usable CL implementation is found, "no_cl"
-# is set to "yes".
+# Check for an OpenCL implementation. If CL is found, _OPENCL is defined and
+# the required compiler and linker flags are included in the output variables
+# "CL_CFLAGS" and "CL_LIBS", respectively. If no usable CL implementation is
+# found, "no_cl" is set to "yes".
#
-# If the header "CL/OpenCL.h" is found, "HAVE_CL_OPENCL_H" is defined. If the header
-# "OpenCL/OpenCL.h" is found, HAVE_OPENCL_OPENCL_H is defined. These preprocessor
-# definitions may not be mutually exclusive.
+# If the header "CL/OpenCL.h" is found, "HAVE_CL_OPENCL_H" is defined. If the
+# header "OpenCL/OpenCL.h" is found, HAVE_OPENCL_OPENCL_H is defined. These
+# preprocessor definitions may not be mutually exclusive.
#
# Based on AX_CHECK_GL, version: 2.4 author: Braden McDaniel
# <braden@endoframe.com>
@@ -34,7 +34,7 @@
# the Macro. You need not follow the terms of the GNU General Public
# License when using or distributing such scripts.
#
-AC_DEFUN([AX_CHECK_CL],
+AC_DEFUN([AX_OPENCL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_PROG_SED])dnl
AC_REQUIRE([ACX_PTHREAD])dnl
@@ -58,7 +58,7 @@
AC_CHECK_HEADERS([windows.h])
- m4_define([AX_CHECK_CL_PROGRAM],
+ m4_define([AX_OPENCL_PROGRAM],
[AC_LANG_PROGRAM([[
# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
# include <windows.h>
@@ -88,19 +88,19 @@
[ax_try_lib=`echo $ax_lib | $SED -e 's/^-l//' -e 's/$/.lib/'`],
[ax_try_lib=$ax_lib])
LIBS="$ax_try_lib $CL_LIBS $ax_save_LIBS"
- AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
+ AC_LINK_IFELSE([AX_OPENCL_PROGRAM],
[ax_cv_check_cl_libcl=$ax_try_lib; break],
[ax_check_cl_nvidia_flags="-L/usr/$ax_check_cl_libdir/nvidia" LIBS="$ax_try_lib $ax_check_cl_nvidia_flags $CL_LIBS $ax_save_LIBS"
- AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
+ AC_LINK_IFELSE([AX_OPENCL_PROGRAM],
[ax_cv_check_cl_libcl="$ax_try_lib $ax_check_cl_nvidia_flags"; break],
[ax_check_cl_dylib_flag='-framework OpenCL -L/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries' LIBS="$ax_try_lib $ax_check_cl_dylib_flag $CL_LIBS $ax_save_LIBS"
- AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
+ AC_LINK_IFELSE([AX_OPENCL_PROGRAM],
[ax_cv_check_cl_libcl="$ax_try_lib $ax_check_cl_dylib_flag"; break])])])
done
AS_IF([test "X$ax_cv_check_cl_libcl" = Xno -a X$no_x = Xyes],
[LIBS='-framework OpenCL'
- AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
+ AC_LINK_IFELSE([AX_OPENCL_PROGRAM],
[ax_cv_check_cl_libcl=$LIBS])])
LIBS=$ax_save_LIBS