diff --git a/configure b/configure
index 1977e21..273c6ff 100755
--- a/configure
+++ b/configure
@@ -1188,6 +1188,7 @@
enable_osx_universal_binary
with_threads
enable_openmp
+enable_opencl
enable_largefile
enable_shared
enable_static
@@ -1909,6 +1910,7 @@
--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]
@@ -7424,13 +7426,22 @@
# 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
@@ -7460,13 +7471,13 @@
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"
@@ -7480,9 +7491,9 @@
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 :
@@ -7497,41 +7508,41 @@
-{ $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 ()
{
@@ -7544,19 +7555,19 @@
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 ()
{
@@ -7569,19 +7580,19 @@
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 ()
{
@@ -7601,23 +7612,23 @@
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 ()
{
@@ -7633,25 +7644,26 @@
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
@@ -8181,13 +8193,13 @@
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"
@@ -9378,7 +9390,7 @@
;;
*-*-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=$?
@@ -11463,11 +11475,11 @@
-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.
@@ -11802,11 +11814,11 @@
-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.
@@ -11907,11 +11919,11 @@
-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
@@ -11962,11 +11974,11 @@
-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
@@ -14332,7 +14344,7 @@
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
@@ -14428,7 +14440,7 @@
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
@@ -16384,11 +16396,11 @@
-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.
@@ -16483,11 +16495,11 @@
-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
@@ -16535,11 +16547,11 @@
-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
@@ -17947,7 +17959,7 @@
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