$NetBSD: patch-configure,v 1.1.4.1 2013/12/05 09:52:53 tron Exp $

Various fixes regarding portability

--- configure.orig	2013-11-08 01:41:15.000000000 +0000
+++ configure
@@ -6159,6 +6159,9 @@ if test "${with_rpath+set}" = set; then 
 fi
 
 
+# pkgsrc handles any rpath settings this package needs
+need_dash_r=
+
 # Allow user to specify flags
 
 # Check whether --with-cflags was given.
@@ -6243,6 +6246,7 @@ for ac_header in  \
 	maillock.h \
 	ndir.h \
 	net/if_tun.h \
+	net/tun/if_tun.h \
 	netdb.h \
 	netgroup.h \
 	pam/pam_appl.h \
@@ -6978,6 +6982,36 @@ $as_echo "#define HAVE_SECUREWARE 1" >>c
 		;;
 	esac
 	;;
+*-*-interix*)
+        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"
 
@@ -7179,7 +7213,7 @@ fi
 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
 
 	;;
-*-*-freebsd*)
+*-*-freebsd*|*-*-dragonfly*)
 	check_for_libcrypt_later=1
 
 $as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
@@ -17406,12 +17440,18 @@ fi
 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
-		$as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
-
+		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
+			$as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
+		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
 
@@ -18816,7 +18856,7 @@ echo "OpenSSH has been configured with t
 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"
