aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-08-19 13:20:15 -0400
committerNick Mathewson <nickm@torproject.org>2011-08-19 13:20:15 -0400
commit269c0b4633a5b41b2d37cf9c877fe37c4ea4a1f9 (patch)
treed162dba735401c444c9a93c705e243a3dbdaa719
parent2ad336f999781db211d92332e657398829c8799c (diff)
downloadtor-269c0b4633a5b41b2d37cf9c877fe37c4ea4a1f9.tar
tor-269c0b4633a5b41b2d37cf9c877fe37c4ea4a1f9.tar.gz
Only link ws2_32 and iphlapi on windows.
This is a tweak for the tor-fw-helper port to windows.
-rw-r--r--configure.in4
-rw-r--r--src/tools/tor-fw-helper/Makefile.am2
2 files changed, 4 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 1c45f186d..f9e98f025 100644
--- a/configure.in
+++ b/configure.in
@@ -325,6 +325,7 @@ dnl Where do you live, libevent? And how do we call you?
if test "$bwin32" = true; then
TOR_LIB_WS32=-lws2_32
+ TOR_LIB_IPHLAPI=-liphlapi
# Some of the cargo-cults recommend -lwsock32 as well, but I don't
# think it's actually necessary.
TOR_LIB_GDI=-lgdi32
@@ -334,6 +335,7 @@ else
fi
AC_SUBST(TOR_LIB_WS32)
AC_SUBST(TOR_LIB_GDI)
+AC_SUBST(TOR_LIB_IPHLAPI)
dnl We need to do this before we try our disgusting hack below.
AC_CHECK_HEADERS([sys/types.h])
@@ -559,7 +561,7 @@ dnl There are no packages for Debian or Redhat as of this patch
if test "$upnp" = "true"; then
AC_DEFINE(MINIUPNPC, 1, [Define to 1 if we are building with UPnP.])
- TOR_SEARCH_LIBRARY(libminiupnpc, $trylibminiupnpcdir, [-lminiupnpc -lws2_32 -liphlpapi],
+ TOR_SEARCH_LIBRARY(libminiupnpc, $trylibminiupnpcdir, [-lminiupnpc $TOR_LIB_WS32 $TOR_LIB_IPHLAPI],
[#include <miniupnpc/miniwget.h>
#include <miniupnpc/miniupnpc.h>
#include <miniupnpc/upnpcommands.h>],
diff --git a/src/tools/tor-fw-helper/Makefile.am b/src/tools/tor-fw-helper/Makefile.am
index 39aabc7b2..127a00002 100644
--- a/src/tools/tor-fw-helper/Makefile.am
+++ b/src/tools/tor-fw-helper/Makefile.am
@@ -25,7 +25,7 @@ endif
if MINIUPNPC
miniupnpc_ldflags = @TOR_LDFLAGS_libminiupnpc@
-miniupnpc_ldadd = -lminiupnpc -lm -liphlpapi
+miniupnpc_ldadd = -lminiupnpc -lm @TOR_LIB_IPHLAPI@
miniupnpc_cppflags = @TOR_CPPFLAGS_libminiupnpc@
else
miniupnpc_ldflags =