pkgsrc/net/nocol/patches/patch-am
joerg e24209d145 Add common handling for libresolv similiar to dlopen(3) wrapping.
For now, DragonFly and FreeBSD use the libc version, it is not reentrant,
but thread-safe. NetBSD 3.0+ and Darwin 8.0+ use libresolv from base
(the BIND9 resolver), all other fall back to net/bind9. Feel free to add
your favorite platform if it has a thread-safe resolver in base.

Modify mail/libspf-alf, mail/milter-greylist, mail/spamdyke and
net/nocol accordingly. Testing on !DragonFly and feedback from tron@
2007-07-03 13:54:45 +00:00

30 lines
1 KiB
Text

$NetBSD: patch-am,v 1.3 2007/07/03 13:54:46 joerg Exp $
--- Configure.orig 2000-01-19 04:34:04.000000000 +0000
+++ Configure
@@ -167,15 +167,7 @@ export PSFLAGS
(ps $PSFLAGS) 2>&1 | egrep -i '^usage' >/dev/null 2>&1
if [ $? = 0 ]; then PSFLAGS='-ef' ; fi
-LIBRESOLV="-lresolv"
-ls /usr/lib/libresolv* >/dev/null 2>&1
-if [ $? = 1 ]; then
- ls /lib/libresolv* >/dev/null 2>&1
- if [ $? = 1 ]; then
- ls /usr/lib/libbind* >/dev/null 2>&1
- if [ $? = 1 ]; then LIBRESOLV="" ; else LIBRESOLV="-lbind" ; fi
- fi
-fi
+LIBRESOLV="${RESOLV_LDFLAGS}"
# mainly for Solaris systems
WHOAMI="/usr/ucb/whoami"
@@ -207,7 +199,7 @@ case "$OS" in
OS_LIBS="${LIBRESOLV}" # -lcompat
PING=`which ping` # can do ping -c cnt host
;;
- FREEBSD|FreeBSD\ 2*|FreeBSD\ 3*|NETBSD|NetBSD\ 1*)
+ FREEBSD|FreeBSD\ 2*|FreeBSD\ 3*|NETBSD|NetBSD\ 1*|NetBSD\ 2*|NetBSD\ 3*| NetBSD\ 4*|DragonFly*)
OS_CFLAGS="-DFREEBSD"
OS_LIBS="${LIBRESOLV} -lcrypt" # some hosts -lresolv not needed
PING=`which ping` # can do ping -c cnt host