diff --git a/include/villas/config.h.in b/include/villas/config.h.in index cf552bb6f..d62812107 100644 --- a/include/villas/config.h.in +++ b/include/villas/config.h.in @@ -70,11 +70,18 @@ extern "C"{ #cmakedefine WITH_API #cmakedefine WITH_HOOKS #cmakedefine WITH_IO -#cmakedefine WITH_CONFIG /* OS Headers */ #cmakedefine HAS_EVENTFD +#cmakedefine HAS_SEMAPHORE + +#cmakedefine LIBWEBSOCKETS_FOUND +#cmakedefine HDF5_FOUND +#cmakedefine PROTOBUF_FOUND +#cmakedefine LIBNL3_ROUTE_FOUND +#cmakedefine LIBCONFIG_FOUND + #ifdef __cplusplus } #endif diff --git a/include/villas/nodes/socket.h b/include/villas/nodes/socket.h index 6cccdf848..ad2ed1372 100644 --- a/include/villas/nodes/socket.h +++ b/include/villas/nodes/socket.h @@ -40,13 +40,13 @@ #include #include -#ifdef WITH_LIBNL_ROUTE_30 +#ifdef LIBNL3_ROUTE_FOUND #include #include #include #define WITH_NETEM -#endif /* WITH_LIBNL_ROUTE_30 */ +#endif /* LIBNL3_ROUTE_FOUND */ #include diff --git a/lib/config_helper.c b/lib/config_helper.c index 320e759f1..2e3cb8f1a 100644 --- a/lib/config_helper.c +++ b/lib/config_helper.c @@ -26,7 +26,7 @@ #include #include -#ifdef WITH_CONFIG +#ifdef LIBCONFIG_FOUND static int json_to_config_type(int type) { @@ -143,7 +143,7 @@ int json_to_config(json_t *json, config_setting_t *parent) return 0; } -#endif /* WITH_CONFIG */ +#endif /* LIBCONFIG_FOUND */ void json_object_extend_key_value(json_t *obj, const char *key, const char *value) { diff --git a/lib/super_node.c b/lib/super_node.c index 705b8cab7..7f00521f2 100644 --- a/lib/super_node.c +++ b/lib/super_node.c @@ -103,7 +103,7 @@ int super_node_parse_uri(struct super_node *sn, const char *uri) /* Parse config */ sn->cfg = json_loadf(f, 0, &err); if (sn->cfg == NULL) { -#ifdef WITH_CONFIG +#ifdef LIBCONFIG_FOUND int ret; config_t cfg; @@ -150,7 +150,7 @@ int super_node_parse_uri(struct super_node *sn, const char *uri) config_destroy(&cfg); #else jerror(&err, "Failed to parse configuration file"); -#endif /* WITH_CONFIG */ +#endif /* LIBCONFIG_FOUND */ } /* Close configuration file */ diff --git a/lib/web.c b/lib/web.c index a9b3d9030..106dc4e34 100644 --- a/lib/web.c +++ b/lib/web.c @@ -58,14 +58,14 @@ lws_callback_function websocket_protocol_cb; .rx_buffer_size = 0 }, #endif /* WITH_API */ -#ifdef WITH_NODE_WEBSOCKET +#ifdef LIBWEBSOCKETS_FOUND { .name = "live", .callback = websocket_protocol_cb, .per_session_data_size = sizeof(struct websocket_connection), .rx_buffer_size = 0 }, -#endif /* WITH_NODE_WEBSOCKET */ +#endif /* LIBWEBSOCKETS_FOUND */ #if 0 /* not supported yet */ { .name = "log", diff --git a/src/pipe.c b/src/pipe.c index ee27df078..7b387645e 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -341,13 +341,13 @@ check: if (optarg == endptr) if (!node) error("Node '%s' does not exist!", nodestr); -#ifdef WITH_NODE_WEBSOCKET +#ifdef LIBWEBSOCKETS_FOUND /* Only start web subsystem if villas-pipe is used with a websocket node */ if (node->_vt->start == websocket_start) { web_start(&sn.web); api_start(&sn.api); } -#endif /* WITH_NODE_WEBSOCKET */ +#endif /* LIBWEBSOCKETS_FOUND */ if (reverse) node_reverse(node); diff --git a/tests/unit/config_json.c b/tests/unit/config_json.c index fff947dd4..274e653ff 100644 --- a/tests/unit/config_json.c +++ b/tests/unit/config_json.c @@ -22,7 +22,7 @@ #include -#ifdef WITH_LIBCONFIG +#ifdef LIBCONFIG_FOUND #include #include @@ -117,4 +117,4 @@ Test(utils, json_to_config) json_decref(json); } -#endif +#endif /* LIBCONFIG_FOUND */ diff --git a/tests/unit/io.c b/tests/unit/io.c index 4abdc57a2..cf8d5e162 100644 --- a/tests/unit/io.c +++ b/tests/unit/io.c @@ -39,10 +39,10 @@ #define NUM_VALUES 10 static char formats[][32] = { -#ifdef WITH_FORMAT_HDF5 +#ifdef LIBHDF5_FOUND "hdf5", #endif -#ifdef WITH_FORMAT_PROTOBUF +#ifdef LIBPROTOBUF_FOUND "protobuf", #endif "raw.int8",