From 6e10e48b217ea7abfc0e9edc3ef6211f676e5c31 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 21 Jun 2017 14:34:19 +0200 Subject: Don't compile CBF stuff without CBFlib --- libcrystfel/src/image.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'libcrystfel') 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 #include #include + +#ifdef HAVE_CBFLIB #include +#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 ***********************************/ -- cgit v1.2.3