$NetBSD: patch-aa,v 1.45 2010/02/19 10:17:33 martti Exp $

--- configure.orig	2009-09-26 09:31:15.000000000 +0300
+++ configure	2010-02-19 12:06:28.000000000 +0200
@@ -5997,6 +5997,9 @@
 fi
 
 
+# pkgsrc handles any rpath settings this package needs
+need_dash_r=
+
 # Allow user to specify flags
 
 # Check whether --with-cflags was given.
@@ -6142,6 +6145,7 @@
 	maillock.h \
 	ndir.h \
 	net/if_tun.h \
+	net/tun/if_tun.h \
 	netdb.h \
 	netgroup.h \
 	pam/pam_appl.h \
@@ -7965,6 +7969,36 @@
 		;;
 	esac
 	;;
+*-*-interix3)
+        cat >>confdefs.h <<\_ACEOF
+#define HAVE_INTERIX 1
+_ACEOF
+
+        cat >>confdefs.h <<\_ACEOF
+#define DISABLE_FD_PASSING 1
+_ACEOF
+
+        cat >>confdefs.h <<\_ACEOF
+#define DISABLE_SHADOW 1
+_ACEOF
+
+        cat >>confdefs.h <<\_ACEOF
+#define IP_TOS_IS_BROKEN 1
+_ACEOF
+
+        cat >>confdefs.h <<\_ACEOF
+#define MISSING_HOWMANY 1
+_ACEOF
+
+        cat >>confdefs.h <<\_ACEOF
+#define NO_IPPORT_RESERVED_CONCEPT 1
+_ACEOF
+
+        cat >>confdefs.h <<\_ACEOF
+#define USE_PIPES 1
+_ACEOF
+
+       ;;
 *-*-irix5*)
 	PATH="$PATH:/usr/etc"
 
@@ -8537,7 +8571,7 @@
 _ACEOF
 
 	;;
-*-*-freebsd*)
+*-*-freebsd*|*-*-dragonfly*)
 	check_for_libcrypt_later=1
 
 cat >>confdefs.h <<\_ACEOF
@@ -30831,14 +30865,21 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 if test -z "$conf_utmpx_location"; then
 	if test x"$system_utmpx_path" = x"no" ; then
-		cat >>confdefs.h <<\_ACEOF
+		for f in /var/run/utmpx; do
+			if test -f $f ; then
+				conf_utmpx_location=$f
+			fi
+		done
+		if test -z "$conf_utmpx_location"; then
+			cat >>confdefs.h <<\_ACEOF
 #define DISABLE_UTMPX 1
 _ACEOF
+		fi
 
 	fi
-else
-
-cat >>confdefs.h <<_ACEOF
+fi
+if test -n "$conf_utmpx_location"; then
+	cat >>confdefs.h <<_ACEOF
 #define CONF_UTMPX_FILE "$conf_utmpx_location"
 _ACEOF
 
@@ -30903,14 +30944,20 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 if test -z "$conf_wtmpx_location"; then
 	if test x"$system_wtmpx_path" = x"no" ; then
-		cat >>confdefs.h <<\_ACEOF
+		for f in /var/log/wtmpx; do
+			if test -f $f ; then
+				conf_wtmpx_location=$f
+			fi
+		done
+		if test -z "$conf_wtmpx_location"; then
+			cat >>confdefs.h <<\_ACEOF
 #define DISABLE_WTMPX 1
 _ACEOF
-
+		fi
 	fi
-else
-
-cat >>confdefs.h <<_ACEOF
+fi
+if test -n "$conf_wtmpx_location"; then
+	cat >>confdefs.h <<_ACEOF
 #define CONF_WTMPX_FILE "$conf_wtmpx_location"
 _ACEOF
 
@@ -32200,7 +32247,7 @@
 echo "                     User binaries: $B"
 echo "                   System binaries: $C"
 echo "               Configuration files: $D"
-echo "                   Askpass program: $E"
+echo "                   Askpass program: ${ASKPASS_PROGRAM}"
 echo "                      Manual pages: $F"
 echo "                          PID file: $G"
 echo "  Privilege separation chroot path: $H"
