$NetBSD: patch-am,v 1.5 2012/09/09 19:49:45 dholland Exp $

- use pkgsrc to handle -lresolv config
- recognize NetBSD correctly
- recognize DragonFly

--- 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*|DragonFly*)
 		OS_CFLAGS="-DFREEBSD"
 		OS_LIBS="${LIBRESOLV} -lcrypt" # some hosts -lresolv not needed
 		PING=`which ping`     # can do ping -c cnt host