Subject: Re: Autodetecting MIT vs Heimdal kerberos
To: Johan Danielsson <joda@pdc.kth.se>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-security
Date: 11/14/2001 13:54:47
On 14 Nov 2001, Johan Danielsson wrote:

> Bill Studenmund <wrstuden@netbsd.org> writes:
>
> > Does anyone know of a good way to, in a configure script, autodetect
> > if we have MIT or Heimdal kerberos?
>
> if krb5-config --version | grep -qsi heimdal; then echo heimdal; fi
>
> Works with Heimdal 0.3d and newer (about a year old).

Does not seem to work with the Heimdal in NetBSD 1.5.

A person on the Postgres lists suggested this code fragment (I think it
needs an #include <stdio.h>):

#1/bin/sh

A=`tempfile`
B=${A}.c

cat >$A.c <<EOF
#include <krb5.h>

int main( int argc, char** argv )
{
  printf("%s\n",heimdal_version);
}

EOF

gcc -lkrb5 -o $A $B
exec $A
rm $A $B


as a way to tell. :-)

Take care,

Bill