$NetBSD: patch-aa,v 1.28 2014/09/14 16:43:44 wiz Exp $

builtin krb5-config in platforms such as solaris do not support
the gssapi option, and need an explicit -lgss

--- configure.orig	2014-09-04 20:42:23.000000000 +0000
+++ configure
@@ -3640,6 +3640,7 @@ $as_echo "$as_me: $xc_bad_var_msg librar
         ;;
     esac
   done
+  xc_bad_var_cflags=no
   if test $xc_bad_var_cflags = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS: $CFLAGS" >&5
 $as_echo "$as_me: using CFLAGS: $CFLAGS" >&6;}
@@ -16618,7 +16619,7 @@ squeeze() {
 
 
       #
-  if test "$compiler_id" != "unknown"; then
+  if false; then
     #
     if test "$compiler_id" = "GNU_C" ||
       test "$compiler_id" = "CLANG"; then
@@ -21039,7 +21040,12 @@ $as_echo "yes" >&6; }
      if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
         GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
      elif test -f "$GSSAPI_ROOT/bin/krb5-config"; then
-        GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
+		if $GSSAPI_ROOT/bin/krb5-config --cflags gssapi 2>&1 |	\
+			   grep "Unknown option" > /dev/null ; then
+			GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags`
+		else
+			GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
+		fi
      elif test "$GSSAPI_ROOT" != "yes"; then
         GSSAPI_INCS="-I$GSSAPI_ROOT/include"
      fi
@@ -21212,7 +21218,7 @@ $as_echo "#define HAVE_GSSAPI 1" >>confd
         LIBS="-lgss $LIBS"
         ;;
      *)
-        LIBS="-lgssapi $LIBS"
+        LIBS="-lgssapi -lkrb5 $LIBS"
         ;;
      esac
   fi
