#!/bin/sh
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# 
# T2 SDE: package/.../heimdal/parse-config
# Copyright (C) 2004 - 2005 The T2 SDE Project
# 
# More information can be found in the files COPYING and README.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- T2-COPYRIGHT-NOTE-END ---
if pkginstalled heimdal && [ $stagelevel -ge 5 ]; then
	[ -x $( pkgprefix bindir heimdal )/krb5-config ] && KRB5PREFIX="=`krb5-config --prefix`"

	#Catch alls for kerberos configs
	var_append extraconfopt " " "--with-kerberos"	#This usually supports 4 only
	#var_append extraconfopt " " "--with-krb4"	#4 Only and not recommended
	var_append extraconfopt " " "--with-krb5$KRB5PREFIX"	# From nfs-utils
	var_append extraconfopt " " "--with-krb5-includes=$( pkgprefix includedir heimdal )" # from evolution-data-server
	var_append extraconfopt " " "--with-krb5-libs=$( pkgprefix libdir heimdal )" # from evolution-data-server
	var_append extraconfopt " " "--with-kerberos5$KRB5PREFIX"	#From openssh and fetchmail
	var_append extraconfopt " " "--with-gss"	#From mutt
	var_append extraconfopt " " "--with-gssapi$KRB5PREFIX"		#From cvs
	var_append extraconfopt " " "--enable-gssapi$KRB5PREFIX"	#From cyrus-sasl2
	var_append extraconfopt " " "--with-ssl"        #from ethereal 

	if [ "$KRB5PREFIX" ]; then
		var_append extraconfopt " " "--with-gssapi-includes$KRB5PREFIX/include"	# From curl
		var_append extraconfopt " " "--with-gssapi-libs$KRB5PREFIX/lib"		# From curl
	fi
fi
