enable_osx_universal_binary
with_threads
enable_openmp
+enable_opencl
enable_largefile
enable_shared
enable_static
--enable-osx-universal-binary
build universal binary on OS X [[default=no]]
--disable-openmp do not use OpenMP
+ --disable-opencl do not use OpenCL
--disable-largefile omit support for large files
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
# Enable support for OpenCL
-ac_ext=c
+# Check whether --enable-opencl was given.
+if test "${enable_opencl+set}" = set; then :
+ enableval=$enable_opencl; disable_opencl=$enableval
+else
+ disable_opencl='yes'
+fi
+
+
+if test "$disable_opencl" = 'yes'; then
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5
$as_echo_n "checking whether we are using the Microsoft C compiler... " >&6; }
if test "${ax_cv_c_compiler_ms+set}" = set; then :
$as_echo_n "(cached) " >&6
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_ms" >&5
$as_echo "$ax_cv_c_compiler_ms" >&6; }
-if test X$ax_compiler_ms = Xno; then :
+ if test X$ax_compiler_ms = Xno; then :
CL_CFLAGS="${PTHREAD_CFLAGS}"; CL_LIBS="${PTHREAD_LIBS} -lm"
fi
-ax_save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
-for ac_header in CL/cl.h OpenCL/cl.h
+ ax_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
+ for ac_header in CL/cl.h OpenCL/cl.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
done
-CPPFLAGS=$ax_save_CPPFLAGS
+ CPPFLAGS=$ax_save_CPPFLAGS
-for ac_header in windows.h
+ for ac_header in windows.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
if test "x$ac_cv_header_windows_h" = x""yes; then :
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenCL library" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenCL library" >&5
$as_echo_n "checking for OpenCL library... " >&6; }
if test "${ax_cv_check_cl_libcl+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ax_cv_check_cl_libcl=no
-case $host_cpu in
- x86_64) ax_check_cl_libdir=lib64 ;;
- *) ax_check_cl_libdir=lib ;;
-esac
-ax_save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
-ax_save_LIBS=$LIBS
-LIBS=""
-ax_check_libs="-lOpenCL -lCL -lclparser"
-for ax_lib in $ax_check_libs; do
- if test X$ax_compiler_ms = Xyes; then :
+ case $host_cpu in
+ x86_64) ax_check_cl_libdir=lib64 ;;
+ *) ax_check_cl_libdir=lib ;;
+ esac
+ ax_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
+ ax_save_LIBS=$LIBS
+ LIBS=""
+ ax_check_libs="-lOpenCL -lCL -lclparser"
+ for ax_lib in $ax_check_libs; do
+ if test X$ax_compiler_ms = Xyes; then :
ax_try_lib=`echo $ax_lib | $SED -e 's/^-l//' -e 's/$/.lib/'`
else
ax_try_lib=$ax_lib
fi
- LIBS="$ax_try_lib $CL_LIBS $ax_save_LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ LIBS="$ax_try_lib $CL_LIBS $ax_save_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
-# include <windows.h>
-# endif
-# ifdef HAVE_CL_CL_H
-# include <CL/cl.h>
-# elif defined(HAVE_OPENCL_CL_H)
-# include <OpenCL/cl.h>
-# else
-# error no CL.h
-# endif
+ # if defined(HAVE_WINDOWS_H) && defined(_WIN32)
+ # include <windows.h>
+ # endif
+ # ifdef HAVE_CL_CL_H
+ # include <CL/cl.h>
+ # elif defined(HAVE_OPENCL_CL_H)
+ # include <OpenCL/cl.h>
+ # else
+ # error no CL.h
+ # endif
int
main ()
{
ax_cv_check_cl_libcl=$ax_try_lib; break
else
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"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
-# include <windows.h>
-# endif
-# ifdef HAVE_CL_CL_H
-# include <CL/cl.h>
-# elif defined(HAVE_OPENCL_CL_H)
-# include <OpenCL/cl.h>
-# else
-# error no CL.h
-# endif
+ # if defined(HAVE_WINDOWS_H) && defined(_WIN32)
+ # include <windows.h>
+ # endif
+ # ifdef HAVE_CL_CL_H
+ # include <CL/cl.h>
+ # elif defined(HAVE_OPENCL_CL_H)
+ # include <OpenCL/cl.h>
+ # else
+ # error no CL.h
+ # endif
int
main ()
{
ax_cv_check_cl_libcl="$ax_try_lib $ax_check_cl_nvidia_flags"; break
else
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"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
-# include <windows.h>
-# endif
-# ifdef HAVE_CL_CL_H
-# include <CL/cl.h>
-# elif defined(HAVE_OPENCL_CL_H)
-# include <OpenCL/cl.h>
-# else
-# error no CL.h
-# endif
+ # if defined(HAVE_WINDOWS_H) && defined(_WIN32)
+ # include <windows.h>
+ # endif
+ # ifdef HAVE_CL_CL_H
+ # include <CL/cl.h>
+ # elif defined(HAVE_OPENCL_CL_H)
+ # include <OpenCL/cl.h>
+ # else
+ # error no CL.h
+ # endif
int
main ()
{
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-done
+ done
-if test "X$ax_cv_check_cl_libcl" = Xno -a X$no_x = Xyes; then :
+ if test "X$ax_cv_check_cl_libcl" = Xno -a X$no_x = Xyes; then :
LIBS='-framework OpenCL'
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
-# include <windows.h>
-# endif
-# ifdef HAVE_CL_CL_H
-# include <CL/cl.h>
-# elif defined(HAVE_OPENCL_CL_H)
-# include <OpenCL/cl.h>
-# else
-# error no CL.h
-# endif
+ # if defined(HAVE_WINDOWS_H) && defined(_WIN32)
+ # include <windows.h>
+ # endif
+ # ifdef HAVE_CL_CL_H
+ # include <CL/cl.h>
+ # elif defined(HAVE_OPENCL_CL_H)
+ # include <OpenCL/cl.h>
+ # else
+ # error no CL.h
+ # endif
int
main ()
{
conftest$ac_exeext conftest.$ac_ext
fi
-LIBS=$ax_save_LIBS
-CPPFLAGS=$ax_save_CPPFLAGS
+ LIBS=$ax_save_LIBS
+ CPPFLAGS=$ax_save_CPPFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cl_libcl" >&5
$as_echo "$ax_cv_check_cl_libcl" >&6; }
-if test "X$ax_cv_check_cl_libcl" = Xno; then :
+ if test "X$ax_cv_check_cl_libcl" = Xno; then :
no_cl=yes; CL_CFLAGS=""; CL_LIBS=""
else
CL_LIBS="$ax_cv_check_cl_libcl $CL_LIBS";
$as_echo "#define _OPENCL 1" >>confdefs.h
fi
-ac_ext=c
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+fi
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:8184: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:8196: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:8187: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:8199: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:8190: output\"" >&5)
+ (eval echo "\"\$as_me:8202: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 9381 "configure"' > conftest.$ac_ext
+ echo '#line 9393 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11466: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11478: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11470: \$? = $ac_status" >&5
+ echo "$as_me:11482: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11805: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11817: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11809: \$? = $ac_status" >&5
+ echo "$as_me:11821: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11910: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11922: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11914: \$? = $ac_status" >&5
+ echo "$as_me:11926: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11965: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11977: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11969: \$? = $ac_status" >&5
+ echo "$as_me:11981: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 14335 "configure"
+#line 14347 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 14431 "configure"
+#line 14443 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16387: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16399: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16391: \$? = $ac_status" >&5
+ echo "$as_me:16403: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16486: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16498: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16490: \$? = $ac_status" >&5
+ echo "$as_me:16502: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16538: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16550: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16542: \$? = $ac_status" >&5
+ echo "$as_me:16554: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17950 "configure"
+#line 17962 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
AC_REQUIRE([AC_PROG_SED])dnl
AC_REQUIRE([ACX_PTHREAD])dnl
-AC_LANG_PUSH([C])
-AX_LANG_COMPILER_MS
-AS_IF([test X$ax_compiler_ms = Xno],
- [CL_CFLAGS="${PTHREAD_CFLAGS}"; CL_LIBS="${PTHREAD_LIBS} -lm"])
-
-ax_save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
-AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])
-CPPFLAGS=$ax_save_CPPFLAGS
-
-AC_CHECK_HEADERS([windows.h])
-
-m4_define([AX_CHECK_CL_PROGRAM],
- [AC_LANG_PROGRAM([[
-# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
-# include <windows.h>
-# endif
-# ifdef HAVE_CL_CL_H
-# include <CL/cl.h>
-# elif defined(HAVE_OPENCL_CL_H)
-# include <OpenCL/cl.h>
-# else
-# error no CL.h
-# endif]],
- [[clCreateContextFromType(0,0,0,0,0)]])])
-
-AC_CACHE_CHECK([for OpenCL library], [ax_cv_check_cl_libcl],
-[ax_cv_check_cl_libcl=no
-case $host_cpu in
- x86_64) ax_check_cl_libdir=lib64 ;;
- *) ax_check_cl_libdir=lib ;;
-esac
-ax_save_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
-ax_save_LIBS=$LIBS
-LIBS=""
-ax_check_libs="-lOpenCL -lCL -lclparser"
-for ax_lib in $ax_check_libs; do
- AS_IF([test X$ax_compiler_ms = Xyes],
- [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],
- [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],
- [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],
- [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],
- [ax_cv_check_cl_libcl=$LIBS])])
-
-LIBS=$ax_save_LIBS
-CPPFLAGS=$ax_save_CPPFLAGS])
-
-AS_IF([test "X$ax_cv_check_cl_libcl" = Xno],
- [no_cl=yes; CL_CFLAGS=""; CL_LIBS=""],
- [CL_LIBS="$ax_cv_check_cl_libcl $CL_LIBS"; AC_DEFINE([_OPENCL], [1],
- [Define this for the OpenCL Accelerator])])
-AC_LANG_POP([C])
+AC_ARG_ENABLE([opencl],
+ [AC_HELP_STRING([--disable-opencl],
+ [do not use OpenCL])],
+ [disable_opencl=$enableval],
+ [disable_opencl='yes'])
+if test "$disable_opencl" = 'yes'; then
+ AC_LANG_PUSH([$1])
+ AX_LANG_COMPILER_MS
+ AS_IF([test X$ax_compiler_ms = Xno],
+ [CL_CFLAGS="${PTHREAD_CFLAGS}"; CL_LIBS="${PTHREAD_LIBS} -lm"])
+
+ ax_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])
+ CPPFLAGS=$ax_save_CPPFLAGS
+
+ AC_CHECK_HEADERS([windows.h])
+
+ m4_define([AX_CHECK_CL_PROGRAM],
+ [AC_LANG_PROGRAM([[
+ # if defined(HAVE_WINDOWS_H) && defined(_WIN32)
+ # include <windows.h>
+ # endif
+ # ifdef HAVE_CL_CL_H
+ # include <CL/cl.h>
+ # elif defined(HAVE_OPENCL_CL_H)
+ # include <OpenCL/cl.h>
+ # else
+ # error no CL.h
+ # endif]],
+ [[clCreateContextFromType(0,0,0,0,0)]])])
+
+ AC_CACHE_CHECK([for OpenCL library], [ax_cv_check_cl_libcl],
+ [ax_cv_check_cl_libcl=no
+ case $host_cpu in
+ x86_64) ax_check_cl_libdir=lib64 ;;
+ *) ax_check_cl_libdir=lib ;;
+ esac
+ ax_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
+ ax_save_LIBS=$LIBS
+ LIBS=""
+ ax_check_libs="-lOpenCL -lCL -lclparser"
+ for ax_lib in $ax_check_libs; do
+ AS_IF([test X$ax_compiler_ms = Xyes],
+ [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],
+ [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],
+ [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],
+ [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],
+ [ax_cv_check_cl_libcl=$LIBS])])
+
+ LIBS=$ax_save_LIBS
+ CPPFLAGS=$ax_save_CPPFLAGS])
+
+ AS_IF([test "X$ax_cv_check_cl_libcl" = Xno],
+ [no_cl=yes; CL_CFLAGS=""; CL_LIBS=""],
+ [CL_LIBS="$ax_cv_check_cl_libcl $CL_LIBS"; AC_DEFINE([_OPENCL], [1],
+ [Define this for the OpenCL Accelerator])])
+ AC_LANG_POP([$1])
+fi
+
AC_SUBST([CL_CFLAGS])
AC_SUBST([CL_LIBS])
])dnl