diff options
author | Thomas White <taw@physics.org> | 2017-06-21 14:34:19 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-06-21 14:34:19 +0200 |
commit | 6e10e48b217ea7abfc0e9edc3ef6211f676e5c31 (patch) | |
tree | 8d72d480dd6241058076744e9e5839682b8e3611 /libcrystfel/src/image.c | |
parent | af43cdaa8e9d53b71f7ca0dfc0f16040c96fef7c (diff) |
Don't compile CBF stuff without CBFlib
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 22 |
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 ***********************************/ |