---
 configure.ac  | 7 +++++++
 libupnp.pc.in | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 35c060cc..76f48486 100644
--- a/configure.ac
+++ b/configure.ac
@@ -509,6 +509,13 @@ AX_PTHREAD(
 CC="$PTHREAD_CC"
 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
 LIBS="$PTHREAD_LIBS $LIBS"
+
+# WIN32 specific
+if test "$ac_cv_win32" = "yes"; then
+WIN32_LIBS="-liphlpapi -lws2_32"
+fi
+AC_SUBST(WIN32_LIBS)
+
 #
 # Determine if pthread_rwlock_t is available
 #
diff --git a/libupnp.pc.in b/libupnp.pc.in
index 8c6fc22f..ccdaf871 100644
--- a/libupnp.pc.in
+++ b/libupnp.pc.in
@@ -6,7 +6,7 @@ includedir=@includedir@
 Name: libupnp
 Description: Linux SDK for UPnP Devices
 Version: @VERSION@
-Libs: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ -L${libdir} -lupnp -lixml
+Libs: -L${libdir} -lupnp -lixml @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ @WIN32_LIBS@
 Libs.private: @OPENSSL_LIBS@
 Cflags: @PTHREAD_CFLAGS@ -I${includedir}/upnp
