]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Link with -lws2_32 on Windows
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 28 Jan 2015 22:15:07 +0000 (23:15 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 28 Jan 2015 22:15:07 +0000 (23:15 +0100)
configure.ac

index 2cf2939266f0a2c644d87e32282b3cc4e09f057f..9e655889488cdc0f2b9f63197e922e649c6930a2 100644 (file)
@@ -11,6 +11,7 @@ AC_CANONICAL_HOST
 
 case $host in
     *mingw32* | *cygwin* | *wince* | *mingwce*)
+        windows_os=yes
         AC_DEFINE(_WIN32_WINNT,0x0600, Windows Vista or newer is required)
         ;;
 esac
@@ -122,6 +123,11 @@ else
     extra_ldflags="-lz"
 fi
 
+dnl Linking on Windows needs ws2_32
+if test x${windows_os} = xyes; then
+    extra_ldflags="$extra_ldflags -lws2_32"
+fi
+
 AC_C_BIGENDIAN
 
 AC_C_INLINE