Improve linker check for Winsock library name.
authorMartin Storsjö <martin@martin.st>
Tue, 14 Jul 2009 14:02:09 +0000 (14:02 +0000)
committerDiego Biurrun <diego@biurrun.de>
Tue, 14 Jul 2009 14:02:09 +0000 (14:02 +0000)
On Windows CE, the Winsock library name is ws2, not ws2_32.
patch by Martin Storsjö, martin martin st

Originally committed as revision 19431 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure

index 5a914fb..a700220 100755 (executable)
--- a/configure
+++ b/configure
@@ -2216,9 +2216,11 @@ if enabled network; then
     if check_header arpa/inet.h ; then
         check_func closesocket
     elif check_header winsock2.h ; then
-        network_extralibs="-lws2_32"
+        check_func_headers winsock2.h closesocket -lws2 && \
+            network_extralibs="-lws2" || \
+        { check_func_headers winsock2.h closesocket -lws2_32 && \
+            network_extralibs="-lws2_32"; }
         check_type ws2tcpip.h socklen_t
-        check_func_headers winsock2.h closesocket
     else
         disable network
     fi