aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure25
-rw-r--r--configure.ac12
-rw-r--r--src/cell.c9
4 files changed, 49 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in
index 0f412281..80cbca26 100644
--- a/config.h.in
+++ b/config.h.in
@@ -9,6 +9,9 @@
/* Define to 1 when the gnulib module strnlen should be tested. */
#undef GNULIB_TEST_STRNLEN
+/* Define to 1 if the GSL fudge is needed */
+#undef GSL_FUDGE
+
/* Define to 1 if you have the <bp-sym.h> header file. */
#undef HAVE_BP_SYM_H
diff --git a/configure b/configure
index b1d27330..28a70f28 100755
--- a/configure
+++ b/configure
@@ -807,6 +807,7 @@ enable_option_checking
enable_dependency_tracking
enable_silent_rules
with_hdf5
+enable_gsl_fudge
enable_opencl
enable_gtk
enable_gtktest
@@ -1460,6 +1461,8 @@ Optional Features:
--enable-dependency-tracking do not reject slow dependency extractors
--enable-silent-rules less verbose build output (undo: `make V=1')
--disable-silent-rules verbose build output (undo: `make V=0')
+ --enable-gsl-fudge Use this option if you get lots of linker errors
+ concerning GSL and CBLAS
--enable-opencl Enable the use of OpenCL
--disable-gtk Disable GTK+/GLib
--disable-gtktest do not try to compile and run a test GTK+ program
@@ -6405,6 +6408,28 @@ $as_echo "yes" >&6; }
fi
+# Check whether --enable-gsl-fudge was given.
+if test "${enable_gsl_fudge+set}" = set; then :
+ enableval=$enable_gsl_fudge;
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the GSL CBLAS fudge" >&5
+$as_echo_n "checking whether to use the GSL CBLAS fudge... " >&6; }
+if test "x$enable_gsl_fudge" == "xyes"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define GSL_FUDGE 1" >>confdefs.h
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
# Check whether --enable-opencl was given.
if test "${enable_opencl+set}" = set; then :
enableval=$enable_opencl;
diff --git a/configure.ac b/configure.ac
index 9503acfa..32eba669 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,18 @@ PKG_CHECK_MODULES([GSL], [gsl], [],
])
+AC_ARG_ENABLE(gsl-fudge, AS_HELP_STRING([--enable-gsl-fudge],
+ [Use this option if you get lots of linker errors concerning GSL and CBLAS]))
+AC_MSG_CHECKING([whether to use the GSL CBLAS fudge])
+AS_IF([test "x$enable_gsl_fudge" == "xyes"],
+[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([GSL_FUDGE], [1], [Define to 1 if the GSL fudge is needed])
+],
+[
+ AC_MSG_RESULT([no])
+])
+
AC_ARG_ENABLE(opencl, AS_HELP_STRING([--enable-opencl], [Enable the use of OpenCL]))
AC_MSG_CHECKING([whether to use OpenCL])
AS_IF([test "x$enable_opencl" == "xyes"],
diff --git a/src/cell.c b/src/cell.c
index 826b003e..f155b5e0 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -916,3 +916,12 @@ UnitCell *load_cell_from_pdb(const char *filename)
return cell;
}
+
+
+#ifdef GSL_FUDGE
+/* Force the linker to bring in CBLAS to make GSL happy */
+void fudge_gslcblas()
+{
+ STATUS("%p\n", cblas_sgemm);
+}
+#endif