$NetBSD: patch-ag,v 1.3 2002/01/17 16:32:05 taca Exp $

--- configure.orig	Thu Jan 17 08:37:39 2002
+++ configure
@@ -641,7 +641,7 @@
   --sbindir=DIR          system admin executables [EPREFIX/sbin]
   --libexecdir=DIR       program executables [EPREFIX/libexec]
   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --sysconfdir=DIR       read-only single-machine data [/etc]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
   --libdir=DIR           object code libraries [EPREFIX/lib]
@@ -693,6 +693,7 @@
   --with-devel            add developement options
   --with-efence           link with -lefence for malloc() debugging
   --with-csops            add CSOps standard options
+  --with-nbsdops          add NetBSD standard options
   --without-passwd        don't use passwd/shadow file for authentication
   --with-skey             enable S/Key support
   --with-opie             enable OPIE support
@@ -1086,7 +1087,6 @@
 test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man'
 test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin'
 test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin'
-test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc'
 
 # Check whether --with-otp-only or --without-otp-only was given.
 if test "${with_otp_only+set}" = set; then
@@ -1247,6 +1247,22 @@
 esac
 fi;
 
+# Check whether --with-nbsdops or --without-nbsdops was given.
+if test "${with_nbsdops+set}" = set; then
+  withval="$with_nbsdops"
+  case $with_nbsdops in
+    yes)	echo 'Adding NetBSD standard options'
+		CHECKSIA=false
+		with_ignore_dot=yes
+		with_env_editor=yes
+		with_tty_tickets=yes
+		;;
+    no)		;;
+    *)		echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops"
+		;;
+esac
+fi;
+
 # Check whether --with-passwd or --without-passwd was given.
 if test "${with_passwd+set}" = set; then
   withval="$with_passwd"
@@ -10273,7 +10289,9 @@
 	echo 'Unable to locate kerberos 5 include files, you will have to edit the Makefile and add -I/path/to/krb/includes to CPPFLAGS'
     fi
 
-    if test -f "/usr/local/lib/libkrb5.a"; then
+    if test -f "/usr/lib/libkrb5.a"; then
+	SUDO_LDFLAGS="${SUDO_LDFLAGS}";
+    elif test -f "/usr/local/lib/libkrb5.a"; then
 	SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/lib"
     elif test -f "/usr/local/kerberos/lib/libkrb5.a"; then
 	SUDO_LDFLAGS="${SUDO_LDFLAGS} -L/usr/local/kerberos/lib"
@@ -10285,7 +10303,7 @@
 	echo 'Unable to locate kerberos 5 libraries, you will have to edit the Makefile and add -L/path/to/krb/libs to SUDO_LDFLAGS'
     fi
 
-    SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lk5crypto -lcom_err"
+    SUDO_LIBS="${SUDO_LIBS} -lkrb5 -lasn1 -lcrypto -lroken -lcom_err"
     AUTH_OBJS="${AUTH_OBJS} kerb5.o"
 fi
 
