From 3742aeea4c6b0b18491cc80f940be28dfd301492 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Sun, 4 Sep 2011 22:54:24 +0200 Subject: [PATCH] resolve mingw32 build problem --- wscript | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index aab08b2383..06b4cfb63a 100644 --- a/wscript +++ b/wscript @@ -492,8 +492,11 @@ def configure(conf): if sys.platform.startswith("win32"): conf.env.append_value('LIB', 'psapi') - conf.env.append_value('LIB', 'ws2_32') conf.env.append_value('LIB', 'winmm') + # This enforces ws2_32 to be linked after crypto, otherwise the linker + # will run into undefined references from libcrypto.a + if not Options.options.use_openssl: + conf.env.append_value('LIB', 'ws2_32') conf.env.append_value('CPPFLAGS', '-Wno-unused-parameter'); conf.env.append_value('CPPFLAGS', '-D_FORTIFY_SOURCE=2');