Skip to content

Commit 70d166d

Browse files
Dean M. Sands, IIIetr
authored andcommitted
Added Winsock2 library for mingw; Not tested for cygwin
1 parent 6f2a0b8 commit 70d166d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

configure.ac

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ if test x"$samedirectory" = x"no"; then
6060
fi
6161

6262
is_windows=yes;
63+
NETWORK_LIBS=""
6364
case "$host" in
6465
*-mingw*)
6566
NETWORK_HEADER="winsock2.h"
6667
REGEX_LIBS="-lregex -lpthread -no-undefined"
68+
NETWORK_LIBS="-lws2_32"
6769
native_srcdir=$(cd $srcdir; pwd -W)
6870
;;
6971
*-cygwin*)
@@ -115,7 +117,7 @@ if test x"$host" = x"$build"; then
115117
)
116118

117119
CXXFLAGS="-std=c++11 -DHTTPSERVER_COMPILATION -D_REENTRANT $LIBMICROHTTPD_CFLAGS $CXXFLAGS"
118-
LDFLAGS="$LIBMICROHTTPD_LIBS $REGEX_LIBS $LDFLAGS"
120+
LDFLAGS="$LIBMICROHTTPD_LIBS $NETWORK_LIBS $REGEX_LIBS $LDFLAGS"
119121

120122
cond_cross_compile="no"
121123
else
@@ -128,7 +130,7 @@ else
128130
)
129131

130132
CXXFLAGS="-std=c++11 -DHTTPSERVER_COMPILATION -D_REENTRANT $CXXFLAGS"
131-
LDFLAGS="$REGEX_LIBS $LDFLAGS"
133+
LDFLAGS="$NETWORK_LIBS $REGEX_LIBS $LDFLAGS"
132134

133135
cond_cross_compile="yes"
134136
fi

0 commit comments

Comments
 (0)