+ if Options.options.dist_target == 'mingw':
+ Options.options.fpu_optimization = False
+ conf.env.append_value('CFLAGS', '-DPLATFORM_WINDOWS')
+ conf.env.append_value('CFLAGS', '-DCOMPILER_MINGW')
+ conf.env.append_value('CXXFLAGS', '-DPLATFORM_WINDOWS')
+ conf.env.append_value('CXXFLAGS', '-DCOMPILER_MINGW')
+ conf.env.append_value('LIB', 'pthreadGC2')
+ # needed for at least libsmf
+ conf.check_cc(function_name='htonl', header_name='winsock2.h', lib='ws2_32')
+ conf.env.append_value('LIB', 'ws2_32')
+ # needed for mingw64 packages, not harmful on normal mingw build
+ conf.env.append_value('LIB', 'intl')
+ conf.check_cc(function_name='regcomp', header_name='regex.h',
+ lib='regex', uselib_store="REGEX", define_name='HAVE_REGEX_H')
+ # TODO put this only where it is needed
+ conf.env.append_value('LIB', 'regex')
+
+ if Options.options.dist_target != 'mingw':
+ conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
+
+ conf.check_cxx(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
+ execute = "1",
+ mandatory = True,
+ msg = 'Checking for boost library >= 1.39',
+ okmsg = 'ok',
+ errmsg = 'too old\nPlease install boost version 1.39 or higher.')