From f4a82fb26bdf239a42d7b81e955289395f4a0831 Mon Sep 17 00:00:00 2001 From: Ben51Degrees Date: Thu, 13 Jun 2019 16:51:59 +0100 Subject: [PATCH] BUILD/MINOR: 51d: Updated build registration output to indicate thatif the library is a dummy one or not. When built with the dummy 51Degrees library for testing, the output will include "(dummy library)" to ensure it is clear that this is this is not the API. --- contrib/51d/src/pattern/51Degrees.h | 4 ++++ contrib/51d/src/trie/51Degrees.h | 4 ++++ src/51d.c | 15 ++++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/contrib/51d/src/pattern/51Degrees.h b/contrib/51d/src/pattern/51Degrees.h index 6a646a69f..9aaf9498e 100644 --- a/contrib/51d/src/pattern/51Degrees.h +++ b/contrib/51d/src/pattern/51Degrees.h @@ -24,6 +24,10 @@ #define FIFTYONEDEGREES_H_PATTERN_INCLUDED #endif +#ifndef FIFTYONEDEGREES_DUMMY_LIB +#define FIFTYONEDEGREES_DUMMY_LIB +#endif + #include typedef enum e_fiftyoneDegrees_MatchMethod { diff --git a/contrib/51d/src/trie/51Degrees.h b/contrib/51d/src/trie/51Degrees.h index a5f0868c4..bedcfd7b3 100644 --- a/contrib/51d/src/trie/51Degrees.h +++ b/contrib/51d/src/trie/51Degrees.h @@ -24,6 +24,10 @@ #define FIFTYONEDEGREES_H_TRIE_INCLUDED #endif +#ifndef FIFTYONEDEGREES_DUMMY_LIB +#define FIFTYONEDEGREES_DUMMY_LIB +#endif + #include typedef enum e_fiftyoneDegrees_DataSetInitStatus { diff --git a/src/51d.c b/src/51d.c index bf4065802..344be41be 100644 --- a/src/51d.c +++ b/src/51d.c @@ -827,4 +827,17 @@ INITCALL1(STG_REGISTER, sample_register_convs, &conv_kws); REGISTER_POST_CHECK(init_51degrees); REGISTER_POST_DEINIT(deinit_51degrees); -REGISTER_BUILD_OPTS("Built with 51Degrees support."); + +#if defined(FIFTYONEDEGREES_H_PATTERN_INCLUDED) +#ifndef FIFTYONEDEGREES_DUMMY_LIB + REGISTER_BUILD_OPTS("Built with 51Degrees Pattern support."); +#else + REGISTER_BUILD_OPTS("Built with 51Degrees Pattern support (dummy library)."); +#endif +#elif defined(FIFTYONEDEGREES_H_TRIE_INCLUDED) +#ifndef FIFTYONEDEGREES_DUMMY_LIB + REGISTER_BUILD_OPTS("Built with 51Degrees Trie support."); +#else + REGISTER_BUILD_OPTS("Built with 51Degrees Trie support (dummy library)."); +#endif +#endif \ No newline at end of file