From 0f6ebe5649902dea9456c6598bc28e694c422336 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 9 Feb 2010 17:24:16 +0100 Subject: Use OpenCL for much faster diffraction calculation --- configure.ac | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 49a90a8a..fe58ccbd 100644 --- a/configure.ac +++ b/configure.ac @@ -30,13 +30,24 @@ AC_ARG_WITH(gsl, GSL_LIBS="-L$withval/lib -lgsl -lgslcblas"], [GSL_LIBS="-lgsl -lgslcblas"]) +AC_MSG_CHECKING([whether to use OpenCL]) +AC_ARG_ENABLE(opencl, +[AS_HELP_STRING([--enable-opencl], [Enable the use of OpenCL])], +[OPENCL_CFLAGS="" + OPENCL_LIBS="-lOpenCL" + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_OPENCL], [1], [Define to 1 if OpenCL is available]) + have_opencl=true], +[AC_MSG_RESULT([no])]) + havegtk=false AM_PATH_GTK_2_0(2.0.0, havegtk=true, AC_MSG_WARN([GTK not found. hdfsee will not be built.])) AM_CONDITIONAL([HAVE_GTK], test x$havegtk = xtrue) +AM_CONDITIONAL([HAVE_OPENCL], test x$have_opencl = xtrue) -CFLAGS="$CFLAGS $HDF5_CFLAGS $GTK_CFLAGS $GSL_CFLAGS" -LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS -lgthread-2.0 -lutil" +CFLAGS="$CFLAGS $HDF5_CFLAGS $GTK_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS" +LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS $OPENCL_LIBS -lgthread-2.0 -lutil" AC_OUTPUT(Makefile src/Makefile data/Makefile) -- cgit v1.2.3