aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-06-23 11:05:18 +0200
committerThomas White <taw@physics.org>2017-06-23 11:05:18 +0200
commit80c6061730c2a6a02b9eea77140026ff6b822856 (patch)
tree25ced5cd90ad0e010866609d82fd583265895e46
parent197b95dd465656cde886496b77a49c0e849bd43a (diff)
Accept either cbf/cbf.h or cbflib/cbf.h
You get cbflib/cbf.h if you install CBFlib from source, and cbf/cbf.h if using the package manager in Fedora, probably other systems as well. We definitely don't want to include the cbf or cbflib folder in the include path, because CBFlib may bring its own HDF5 headers, which we don't want to touch with a bargepole.
-rw-r--r--configure.ac1
-rw-r--r--libcrystfel/src/image.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d02fff2a..f424fdce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,7 @@ AS_IF([test "x$enable_cbf" = "xyes"],
CBF_LIBS="-lcbf"
])
])
+ AC_CHECK_HEADERS([cbflib/cbf.h cbf/cbf.h])
], [
AC_MSG_RESULT([no])
])
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 1baa33bc..aad5017c 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -27,6 +27,8 @@
*
*/
+#include <config.h>
+
#include <stdlib.h>
#include <assert.h>
#include <math.h>
@@ -34,8 +36,13 @@
#include <hdf5.h>
#ifdef HAVE_CBFLIB
+#ifdef HAVE_CBFLIB_CBF_H
#include <cbflib/cbf.h>
#endif
+#ifdef HAVE_CBF_CBF_H
+#include <cbf/cbf.h>
+#endif
+#endif
#include "image.h"
#include "utils.h"