aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorSteven Murdoch <Steven.Murdoch@cl.cam.ac.uk>2011-11-30 19:37:17 +0000
committerSteven Murdoch <Steven Murdoch@cl.cam.ac.uk>2011-11-30 19:46:38 +0000
commit5dbfb1b3e0efc95be34ba7d69852511c9bac1f4b (patch)
tree482852e387aafd10e7e6695db513ae96af69a4ea /configure.in
parentb5a306e82c684bdd30b832fdfd9e2b55c06b54ae (diff)
downloadtor-5dbfb1b3e0efc95be34ba7d69852511c9bac1f4b.tar
tor-5dbfb1b3e0efc95be34ba7d69852511c9bac1f4b.tar.gz
Support NAT-PMP on Windows
- Link in libws32 and libiphlpapi, needed for libnatpmp (both in ./configure and when compiling tor-fw-helper-natpmp.c) - Define STATICLIB under Windows, to allow tor-fw-helper-natpmp.c to link - Don't include arpa/inet.h which isn't present in Mingw32 and doesn't appear to be needed on either Windows or MacOS X
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 64d9d6db7..0de15b4b5 100644
--- a/configure.in
+++ b/configure.in
@@ -548,9 +548,12 @@ dnl There are no packages for Debian or Redhat as of this patch
if test "$natpmp" = "true"; then
AC_DEFINE(NAT_PMP, 1, [Define to 1 if we are building with nat-pmp.])
- TOR_SEARCH_LIBRARY(libnatpmp, $trylibnatpmpdir, [-lnatpmp],
- [#include <natpmp.h>],
+ TOR_SEARCH_LIBRARY(libnatpmp, $trylibnatpmpdir, [-lnatpmp $TOR_LIB_WS32 $TOR_LIB_IPHLPAPI],
[#include <natpmp.h>],
+ [#ifdef MS_WINDOWS
+ #define STATICLIB
+ #endif
+ #include <natpmp.h>],
[ int r;
natpmp_t natpmp;
natpmpresp_t response;