Enable build for FreeBSD (part 1/2)

Adopted from Michael Beer -- GH pull-request #232 with minor changes:

*   rebased on master,
*   removed trailing whitespace,
*   don't explicitly change saved configuration defaults (wscript)
*   moved sys/wait (WNOHANG) to header include
*   separate changes in GUI and lib
This commit is contained in:
Robin Gareus 2016-06-26 16:43:07 +02:00
parent e37b250d4d
commit 86763cba90
10 changed files with 26 additions and 7 deletions

View file

@ -568,6 +568,9 @@ int main() { return 0; }''',
if opt.stl_debug:
cxx_flags.append("-D_GLIBCXX_DEBUG")
if re.search ("freebsd", sys.platform) != None:
linker_flags.append('-lexecinfo')
if conf.env['DEBUG_RT_ALLOC']:
compiler_flags.append('-DDEBUG_RT_ALLOC')
linker_flags.append('-ldl')
@ -940,7 +943,10 @@ def configure(conf):
# executing a test program is n/a when cross-compiling
if Options.options.dist_target != 'mingw':
if Options.options.dist_target != 'msvc':
conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
if re.search ("freebsd", sys.platform) != None:
conf.check_cc(function_name='dlopen', header_name='dlfcn.h', uselib_store='DL')
else:
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,