1 dnl Based on the one from the Boinc project by Reinhard
3 AC_DEFUN([AX_CHECK_KRB5],
4 [AC_MSG_CHECKING(for Kerberos)
8 AC_HELP_STRING([--with-krb5],
9 [Use krb5 (in specified installation directory)]),
10 [check_krb5_dir="$withval"],
12 for dir in $check_krb5_dir /usr /usr/local ; do
14 if test -f "$dir/include/krb5.h"; then
17 krb5_CFLAGS="-I$krb5dir/include";
20 if test -f "$dir/include/krb5.h"; then
23 krb5_CFLAGS="-I$krb5dir/include/";
27 AC_MSG_RESULT($found_krb5)
28 if test x_$found_krb5 != x_yes; then
30 ----------------------------------------------------------------------
31 Cannot find krb5 libraries.
33 Please install MIT or Heimdal or specify installation directory with
35 ----------------------------------------------------------------------
38 printf "Kerberos found in $krb5dir\n";
39 krb5_LIBS="-lgssapi_krb5 -lkrb5";
40 krb5_LDFLAGS="-L$krb5dir/lib";
42 AC_SUBST(KRB5_LDFLAGS)