aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-04-20 11:42:12 +0200
committerThomas White <taw@physics.org>2021-04-20 11:42:12 +0200
commitb22f6f524b52b2100818eb6b42cb984bf38a2373 (patch)
tree880394862617c69a05fc5cd73b801861ed35f70d /libcrystfel
parentbd6f2aea61668638ddd2e934ce89e3715d30307d (diff)
Build system fixes for MsgPack
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/config.h.cmake.in1
-rw-r--r--libcrystfel/config.h.in1
-rw-r--r--libcrystfel/src/image-msgpack.h9
3 files changed, 10 insertions, 1 deletions
diff --git a/libcrystfel/config.h.cmake.in b/libcrystfel/config.h.cmake.in
index 63211779..1a81ffde 100644
--- a/libcrystfel/config.h.cmake.in
+++ b/libcrystfel/config.h.cmake.in
@@ -9,6 +9,7 @@
#cmakedefine HAVE_GZBUFFER
#cmakedefine HAVE_GDKPIXBUF
#cmakedefine HAVE_LIBCCP4
+#cmakedefine HAVE_MSGPACK
#cmakedefine HAVE_FORKPTY_PTY_H
#cmakedefine HAVE_FORKPTY_UTIL_H
diff --git a/libcrystfel/config.h.in b/libcrystfel/config.h.in
index c00f559e..1cadfd02 100644
--- a/libcrystfel/config.h.in
+++ b/libcrystfel/config.h.in
@@ -7,6 +7,7 @@
#mesondefine HAVE_CURSES
#mesondefine HAVE_GZBUFFER
#mesondefine HAVE_LIBCCP4
+#mesondefine HAVE_MSGPACK
#mesondefine HAVE_FORKPTY_PTY_H
#mesondefine HAVE_FORKPTY_UTIL_H
diff --git a/libcrystfel/src/image-msgpack.h b/libcrystfel/src/image-msgpack.h
index ad05d8fe..0449c718 100644
--- a/libcrystfel/src/image-msgpack.h
+++ b/libcrystfel/src/image-msgpack.h
@@ -29,6 +29,10 @@
#ifndef IMAGE_MSGPACK_H
#define IMAGE_MSGPACK_H
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "datatemplate.h"
#if defined(HAVE_MSGPACK)
@@ -55,7 +59,8 @@ static UNUSED int image_msgpack_read(struct image *image,
void *data,
size_t data_size)
{
- return 0;
+ ERROR("MessagePack is not supported in this installation.\n");
+ return 1;
}
static UNUSED ImageFeatureList *image_msgpack_read_peaks(const DataTemplate *dtempl,
@@ -63,6 +68,7 @@ static UNUSED ImageFeatureList *image_msgpack_read_peaks(const DataTemplate *dte
size_t data_size,
int half_pixel_shift)
{
+ ERROR("MessagePack is not supported in this installation.\n");
return NULL;
}
@@ -71,6 +77,7 @@ static UNUSED double image_msgpack_get_value(const char *name,
size_t data_block_size,
char *ptype)
{
+ ERROR("MessagePack is not supported in this installation.\n");
*ptype = 'f';
return NAN;
}