aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r--libcrystfel/src/image.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 4e1a8b86..1baa33bc 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -32,7 +32,10 @@
#include <math.h>
#include <stdio.h>
#include <hdf5.h>
+
+#ifdef HAVE_CBFLIB
#include <cbflib/cbf.h>
+#endif
#include "image.h"
#include "utils.h"
@@ -391,6 +394,7 @@ void add_imagefile_field(struct imagefile_field_list *copyme, const char *name)
/******************************* CBF files ************************************/
+#ifdef HAVE_CBFLIB
static char *cbf_strerr(int e)
{
@@ -825,6 +829,24 @@ static int read_cbf_simple(struct imagefile *f, struct image *image)
return 0;
}
+#else /* HAVE_CBFLIB */
+
+static int read_cbf_simple(struct imagefile *f, struct image *image)
+{
+ ERROR("This version of CrystFEL was compiled without CBF support.\n");
+ return 1;
+}
+
+
+static int read_cbf(struct imagefile *f, struct image *image)
+{
+ ERROR("This version of CrystFEL was compiled without CBF support.\n");
+ return 1;
+}
+
+
+#endif /* HAVE_CBFLIB */
+
/****************************** Image files ***********************************/