--- cyrus-sasl-2.1.15/configure	2003-07-16 01:42:27.000000000 +1000
+++ cyrus-sasl-2.1.15-patched/configure	2003-07-21 13:43:49.000000000 +1000
@@ -1518,7 +1518,7 @@
     CFLAGS="-Wall ${CFLAGS}"
   GCC_VERSION=`$CC -v 2>&1 | sed -n -e '/version/s/.*version \([0-9]\)\..*/\1/p'`
   if test "$GCC_VERSION" != "3"; then
-    CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
+    CPPFLAGS="${CPPFLAGS}"
   fi
 else
   CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
@@ -1526,7 +1526,7 @@
 
   # this is CMU ADD LIBPATH
   if test "$andrew_runpath_switch" = "none" ; then
-	LDFLAGS="-L"/usr/local/lib" ${LDFLAGS}"
+	LDFLAGS="${LDFLAGS}"
   else
 	LDFLAGS="-L"/usr/local/lib" $andrew_runpath_switch"/usr/local/lib" ${LDFLAGS}"
   fi
@@ -1951,6 +1951,7 @@
 
 target=$save_target
 
+ac_cv_can_build_shared="yes"
 if test "$ac_cv_can_build_shared" = no; then
 	enable_shared=no
 	enable_static=yes
@@ -3708,16 +3709,16 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   
-	  ac_safe=`echo "security/pam_appl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for security/pam_appl.h""... $ac_c" 1>&6
-echo "configure:3714: checking for security/pam_appl.h" >&5
+	  ac_safe=`echo "pam/pam_appl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for pam/pam_appl.h""... $ac_c" 1>&6
+echo "configure:3714: checking for pam/pam_appl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 #line 3719 "configure"
 #include "confdefs.h"
-#include <security/pam_appl.h>
+#include <pam/pam_appl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 { (eval echo configure:3724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

--- cyrus-sasl-2.1.15/Makefile.in	2003-07-16 01:42:28.000000000 +1000
+++ cyrus-sasl-2.1.15-patched/Makefile.in	2003-07-21 13:46:39.000000000 +1000
@@ -196,7 +196,7 @@
 @SAMPLE_FALSE@SAM = 
 @JAVA_TRUE@JAV = java
 @JAVA_FALSE@JAV = 
-@MACOSX_TRUE@INSTALLOSX = install-exec-local-osx
+#@MACOSX_TRUE@INSTALLOSX = install-exec-local-osx
 @MACOSX_FALSE@INSTALLOSX = 
 
 SUBDIRS = include sasldb plugins lib utils doc man $(PWC) $(SAM) $(JAV) $(SAD)
@@ -507,13 +507,6 @@
 	  echo "* the library should use."; \
 	  echo "********************************************************"; \
 	fi
-install-exec-local-osx:
-	$(mkinstalldirs) $(framedir)/Versions/A/Headers
-	$(mkinstalldirs) $(framedir)/Versions/A/Resources
-	cd $(framedir)/Versions ; ln -fs A Current
-	cd $(framedir) ; ln -fs Versions/A/Headers .
-	cd $(framedir) ; ln -fs Versions/A/Resources .
-	$(INSTALL_DATA) $(srcdir)/config/Info.plist $(framedir)/Versions/A/Resources
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

--- cyrus-sasl-2.1.15/include/Makefile.in	2003-07-16 01:42:28.000000000 +1000
+++ cyrus-sasl-2.1.15-patched/include/Makefile.in	2003-07-21 13:47:32.000000000 +1000
@@ -198,9 +198,9 @@
 
 makemd5_SOURCES = makemd5.c
 
-@MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
-@MACOSX_TRUE@frameheaderdir = $(framedir)/Versions/A/Headers
-@MACOSX_TRUE@frameheader_DATA = $(saslinclude_HEADERS)
+#@MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
+#@MACOSX_TRUE@frameheaderdir = $(framedir)/Versions/A/Headers
+#@MACOSX_TRUE@frameheader_DATA = $(saslinclude_HEADERS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = ../config.h
 CONFIG_CLEAN_FILES = 

--- cyrus-sasl-2.1.15/lib/Makefile.in	2003-07-16 01:42:28.000000000 +1000
+++ cyrus-sasl-2.1.15-patched/lib/Makefile.in	2003-07-21 13:49:24.000000000 +1000
@@ -209,7 +209,7 @@
 libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
 libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET)
 
-@MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
+#@MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = ../config.h
 CONFIG_CLEAN_FILES = 
@@ -464,10 +464,10 @@
 	rm -f plugin_common.o
 	ln -s $(top_builddir)/plugins/plugin_common.o plugin_common.o
 @MACOSX_TRUE@install-exec-hook:
-@MACOSX_TRUE@	$(mkinstalldirs) $(framedir)/Versions/A
-@MACOSX_TRUE@	ln -fs $(libdir)/libsasl2.dylib $(framedir)/Versions/A/SASL2
-@MACOSX_TRUE@	cd $(framedir) ; ln -fs Versions/A/SASL2 .
-@MACOSX_FALSE@install-exec-hook:
+#@MACOSX_TRUE@	$(mkinstalldirs) $(framedir)/Versions/A
+#@MACOSX_TRUE@	ln -fs $(libdir)/libsasl2.dylib $(framedir)/Versions/A/SASL2
+#@MACOSX_TRUE@	cd $(framedir) ; ln -fs Versions/A/SASL2 .
+#@MACOSX_FALSE@install-exec-hook:
 
 libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
 	@echo adding static plugins and dependencies

--- cyrus-sasl-2.1.15/saslauthd/configure	2003-07-16 01:42:30.000000000 +1000
+++ cyrus-sasl-2.1.15-patched/saslauthd/configure	2003-07-21 13:51:41.000000000 +1000
@@ -4351,16 +4351,16 @@
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   
-	  ac_safe=`echo "security/pam_appl.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for security/pam_appl.h""... $ac_c" 1>&6
-echo "configure:4357: checking for security/pam_appl.h" >&5
+	  ac_safe=`echo "pam/pam_appl.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for pam/pam_appl.h""... $ac_c" 1>&6
+echo "configure:4357: checking for pam/pam_appl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 #line 4362 "configure"
 #include "confdefs.h"
-#include <security/pam_appl.h>
+#include <pam/pam_appl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 { (eval echo configure:4367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }

--- cyrus-sasl-2.1.15/saslauthd/auth_pam.c	2003-06-01 03:00:24.000000000 +1000
+++ cyrus-sasl-2.1.15-patched/saslauthd/auth_pam.c	2003-07-21 13:52:17.000000000 +1000
@@ -50,7 +50,7 @@
 
 # include <string.h>
 # include <syslog.h>
-# include <security/pam_appl.h>
+# include <pam/pam_appl.h>
 
 # include "auth_pam.h"
 /* END PUBLIC DEPENDENCIES */

--- cyrus-sasl-2.1.15/utils/Makefile.in	2003-07-16 01:42:28.000000000 +1000
+++ cyrus-sasl-2.1.15-patched/utils/Makefile.in	2003-07-21 13:54:10.000000000 +1000
@@ -199,9 +199,9 @@
 @NO_SASL_DB_MANS_TRUE@man_MANS = 
 @NO_SASL_DB_MANS_FALSE@man_MANS = saslpasswd2.8 sasldblistusers2.8
 
-saslpasswd2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
+saslpasswd2_LDADD = $(all_sasl_libs) ../sasldb/libsasldb.la
 saslpasswd2_SOURCES = saslpasswd.c
-sasldblistusers2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
+sasldblistusers2_LDADD = $(all_sasl_libs) ../sasldb/libsasldb.la
 sasldblistusers2_SOURCES = sasldblistusers.c
 dbconverter_2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
 

--- cyrus-sasl-2.1.15/plugins/kerberos4.c	2003-07-02 03:50:41.000000000 +1000
+++ cyrus-sasl-2.1.15-patched/plugins/kerberos4.c	2003-07-21 14:21:09.000000000 +1000
@@ -48,13 +48,7 @@
 #include <string.h>
 #include <krb.h>
 
-#ifdef WITH_DES
-# ifdef WITH_SSL_DES
-#  include <openssl/des.h>
-# else
-#  include <des.h>
-# endif /* WITH_SSL_DES */
-#endif /* WITH_DES */
+#include <kerberosIV/des.h>
 
 #ifdef WIN32
 # include <winsock.h>

--- cyrus-sasl-2.1.15/saslauthd/auth_krb4.h	2001-12-04 13:06:54.000000000 +1100
+++ cyrus-sasl-2.1.15-patched/saslauthd/auth_krb4.h	2003-07-21 15:30:43.000000000 +1000
@@ -27,3 +27,5 @@
 
 char *auth_krb4(const char *, const char *, const char *, const char *);
 int auth_krb4_init(void);
+
+#define           KRB_TICKET_GRANTING_TICKET      "krbtgt"
