30 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
31 #include <SDL_image.h>
32 #include <SDL_mixer.h>
35 PRAGMACLANG5(GCC diagnostic ignored
"-Wzero-as-null-pointer-constant")
46 #include <curl/curl.h>
49 #include <libxml/globals.h>
54 #define dumpCompiledSdlVersion(text, prefix) \
55 logger->log(" " text ": %d.%d.%d", \
56 prefix##_MAJOR_VERSION, \
57 prefix##_MINOR_VERSION, \
60 #define sdlVersionJoin(prefix) \
61 prefix##_MAJOR_VERSION, \
62 prefix##_MINOR_VERSION, \
66 const SDL_version *
const version)
68 if (version !=
nullptr)
79 const char *
const buildVersion,
80 const char *
const linkedVersion)
82 if (strcmp(buildVersion, linkedVersion) != 0)
85 "%s: compiled and linked versions not same: %s vs %s",
96 const SDL_version *
const linkedVersion)
98 const std::string buildVersionStr =
strprintf(
"%d.%d.%d",
102 const std::string linkedVersionStr =
strprintf(
"%d.%d.%d",
103 linkedVersion->major,
104 linkedVersion->minor,
105 linkedVersion->patch);
106 if (buildVersionStr != linkedVersionStr)
109 "%s: compiled and linked versions not same: %s vs %s",
111 buildVersionStr.c_str(),
112 linkedVersionStr.c_str());
122 LIBXML_DOTTED_VERSION,
123 LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA);
126 logger->
log(
" libcurl: %s", LIBCURL_VERSION);
127 logger->
log(
" libpng: %s", PNG_LIBPNG_VER_STRING);
136 #if ZLIB_VERNUM >= 0x1020
139 #ifdef LIBXML_TEST_VERSION
143 const char **xmlVersion = __xmlParserVersion();
144 if (xmlVersion !=
nullptr)
145 logger->
log(
" libxml2: %s", *xmlVersion);
148 SDL_version sdlVersion;
149 sdlVersion.major = 0;
150 sdlVersion.minor = 0;
151 sdlVersion.patch = 0;
152 SDL_GetVersion(&sdlVersion);
164 if (xmlVersion !=
nullptr)
167 LIBXML_VERSION_STRING LIBXML_VERSION_EXTRA,
179 SDLNet_Linked_Version());
182 IMG_Linked_Version());
185 Mix_Linked_Version());
188 TTF_Linked_Version());
void log(const char *const log_text,...)
void assertLog(const char *const log_text,...)
#define dumpCompiledSdlVersion(text, prefix)
static void compareSDLVersions(char *libName, int major, int minor, int patch, SDL_version *linkedVersion)
static void compareVersions(char *libName, char *buildVersion, char *linkedVersion)
static void dumpLinkedSdlVersion(char *text, SDL_version *version)
#define sdlVersionJoin(prefix)
#define PRAGMACLANG5(str)
#define PRAGMACLANG6GCC(str)
std::string strprintf(const char *const format,...)