From 7a30d7950a2f75cf683ec6b11a893a1dcd9ab02c Mon Sep 17 00:00:00 2001 From: Robert Hogan Date: Sun, 20 Feb 2011 20:10:01 +0000 Subject: wip --- configure.in | 16 +++++++++++++++- test/test_torsocks.c | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 3366420..1dc63b3 100644 --- a/configure.in +++ b/configure.in @@ -521,6 +521,8 @@ LIBS=${SIMPLELIBS} AC_SEARCH_LIBS(dlopen, [dl]) AC_SEARCH_LIBS(res_query, [resolv]) +TESTLDFLAGS="$LDFLAGS" + dnl Linker checks for Mac OSX, which uses DYLD_INSERT_LIBRARIES dnl instead of LD_PRELOAD case "$host_os" in @@ -575,6 +577,16 @@ case $host in *-*-freebsd*) AC_DEFINE(FREEBSD, 1, "Define to handle FreeBSD") ;; +*-*-darwin*) + dnl Needed to compile tests. + dnl See https://bugs.g10code.com/gnupg/issue1292: + dnl "On OS X (at least in 10.6 and I believe starting at 10.3) the DNS resolution + dnl services fail to compile. This is a result of the addition of BIND9 compatible + dnl resolution libraries on OS X that are being picked up by the configure script + dnl instead of -lresolv causing the tests for useable resolution services to fail + dnl thus disabling features like pka auto lookup." + LIBS="-lresolv $LIBS" + ;; esac AC_SUBST(SHLIB_EXT) @@ -615,5 +627,7 @@ AC_ENABLE_STATIC AC_CONFIG_FILES([src/usewithtor src/torsocks src/torsocks.conf.5 src/torsocks.8 src/usewithtor.1 src/torsocks.1]) -AC_OUTPUT(Makefile src/Makefile test/Makefile) +AC_OUTPUT(Makefile src/Makefile) +LDFLAGS="$TESTLDFLAGS" +AC_OUTPUT(test/Makefile) diff --git a/test/test_torsocks.c b/test/test_torsocks.c index 98e8664..60d78c8 100644 --- a/test/test_torsocks.c +++ b/test/test_torsocks.c @@ -38,7 +38,7 @@ #endif #include #if defined(__APPLE__) || defined(__darwin__) -#include +#include #endif #include #include -- cgit v1.2.1