From: Ben51Degrees Date: Thu, 13 Jun 2019 15:51:59 +0000 (+0100) Subject: BUILD/MINOR: 51d: Updated build registration output to indicate thatif the library... X-Git-Tag: v2.0.0~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4a82fb26bdf239a42d7b81e955289395f4a0831;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/contrib/51d/src/pattern/51Degrees.h b/contrib/51d/src/pattern/51Degrees.h index 6a646a69fc..9aaf9498ea 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 a5f0868c4c..bedcfd7b34 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 bf4065802c..344be41be1 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