diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/im-zmq.h | 26 | ||||
-rw-r--r-- | src/process_image.h | 6 |
2 files changed, 28 insertions, 4 deletions
diff --git a/src/im-zmq.h b/src/im-zmq.h index eb2c6068..86181347 100644 --- a/src/im-zmq.h +++ b/src/im-zmq.h @@ -36,22 +36,40 @@ #include <config.h> #endif -#include <msgpack.h> - #include "image.h" -extern struct im_zmq *im_zmq_connect(const char *zmq_address); +#if defined(HAVE_MSGPACK) && defined(HAVE_ZMQ) -extern msgpack_object *im_zmq_fetch(struct im_zmq *z); +#include <msgpack.h> + +extern struct im_zmq *im_zmq_connect(const char *zmq_address); extern void im_zmq_clean(struct im_zmq *z); extern void im_zmq_shutdown(struct im_zmq *z); +extern msgpack_object *im_zmq_fetch(struct im_zmq *z); + extern int get_peaks_msgpack(msgpack_object *obj, struct image *image, int half_pixel_shift); extern int unpack_msgpack_data(msgpack_object *obj, struct image *image); +#else /* defined(HAVE_MSGPACK) && defined(HAVE_ZMQ) */ + +static UNUSED struct im_zmq *im_zmq_connect(const char *zmq_address) { return NULL; } + +static UNUSED void im_zmq_clean(struct im_zmq *z) { return; } + +static UNUSED void im_zmq_shutdown(struct im_zmq *z) { return; } + +static UNUSED void *im_zmq_fetch(struct im_zmq *z) { return NULL; } + +static UNUSED int get_peaks_msgpack(void *obj, struct image *image, + int half_pixel_shift) { return 0; } + +static UNUSED int unpack_msgpack_data(void *obj, struct image *image) { return 1; } + +#endif /* defined(HAVE_MSGPACK) && defined(HAVE_ZMQ) */ #endif /* CRYSTFEL_ZMQ_H */ diff --git a/src/process_image.h b/src/process_image.h index 54d97f77..a606fb0e 100644 --- a/src/process_image.h +++ b/src/process_image.h @@ -37,7 +37,9 @@ struct index_args; +#ifdef HAVE_MSGPACK #include <msgpack.h> +#endif #include "integration.h" #include "im-sandbox.h" @@ -125,7 +127,11 @@ struct pattern_args { /* "Input" */ struct filename_plus_event *filename_p_e; +#ifdef HAVE_MSGPACK msgpack_object *msgpack_obj; +#else + void *msgpack_obj; +#endif }; |