Provide GeoIP2 library version in version

Libmaxmind does not provide any version macro for link time version.
Print at least runtime version library used, if linked.
This commit is contained in:
Petr Menšík
2019-11-18 21:51:36 +01:00
committed by Mark Andrews
parent 0b7339ac6e
commit e6d7384c0d

View File

@@ -59,6 +59,10 @@
#include <json_c_version.h>
#endif /* HAVE_JSON_C */
#ifdef HAVE_GEOIP2
#include <maxminddb.h>
#endif
/*
* Defining NAMED_MAIN provides storage declarations (rather than extern)
* for variables in named/globals.h.
@@ -548,6 +552,11 @@ OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
ZLIB_VERSION);
printf("linked to zlib version: %s\n",
zlibVersion());
#endif
#if defined(HAVE_GEOIP2)
/* Unfortunately, no version define on link time */
printf("linked to maxminddb version: %s\n",
MMDB_lib_version());
#endif
printf("threads support is enabled\n\n");