diff options
author | Thomas White <taw@physics.org> | 2010-02-09 17:24:16 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-02-17 10:33:13 +0100 |
commit | 0f6ebe5649902dea9456c6598bc28e694c422336 (patch) | |
tree | 3ce031ca3c8ecf4fb132fa90aeae7373e0d5b0b6 /configure.ac | |
parent | 89bd4cc23c5ac40dd0060d362f663819a5f4ae22 (diff) |
Use OpenCL for much faster diffraction calculation
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 13 insertions, 2 deletions
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) |