|
Packit |
fd8b60 |
dnl Copyright (C) 2005 by the Massachusetts Institute of Technology.
|
|
Packit |
fd8b60 |
dnl All rights reserved.
|
|
Packit |
fd8b60 |
dnl
|
|
Packit |
fd8b60 |
dnl Export of this software from the United States of America may
|
|
Packit |
fd8b60 |
dnl require a specific license from the United States Government.
|
|
Packit |
fd8b60 |
dnl It is the responsibility of any person or organization contemplating
|
|
Packit |
fd8b60 |
dnl export to obtain such a license before exporting.
|
|
Packit |
fd8b60 |
dnl
|
|
Packit |
fd8b60 |
dnl WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
|
|
Packit |
fd8b60 |
dnl distribute this software and its documentation for any purpose and
|
|
Packit |
fd8b60 |
dnl without fee is hereby granted, provided that the above copyright
|
|
Packit |
fd8b60 |
dnl notice appear in all copies and that both that copyright notice and
|
|
Packit |
fd8b60 |
dnl this permission notice appear in supporting documentation, and that
|
|
Packit |
fd8b60 |
dnl the name of M.I.T. not be used in advertising or publicity pertaining
|
|
Packit |
fd8b60 |
dnl to distribution of the software without specific, written prior
|
|
Packit |
fd8b60 |
dnl permission. Furthermore if you modify this software you must label
|
|
Packit |
fd8b60 |
dnl your software as modified software and not distribute it in such a
|
|
Packit |
fd8b60 |
dnl fashion that it might be confused with the original M.I.T. software.
|
|
Packit |
fd8b60 |
dnl M.I.T. makes no representations about the suitability of
|
|
Packit |
fd8b60 |
dnl this software for any purpose. It is provided "as is" without express
|
|
Packit |
fd8b60 |
dnl or implied warranty.
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
dnl AC_CHECK_KRB5
|
|
Packit |
fd8b60 |
dnl
|
|
Packit |
fd8b60 |
dnl Check for krb5-config; update CPPFLAGS and LDFLAGS accordingly.
|
|
Packit |
fd8b60 |
dnl
|
|
Packit |
fd8b60 |
AC_DEFUN([AC_CHECK_KRB5],
|
|
Packit |
fd8b60 |
[AC_ARG_WITH([kerberos5],
|
|
Packit |
fd8b60 |
[ --with-kerberos5=PATH Enable Kerberos 5 support],
|
|
Packit |
fd8b60 |
[if test "x$withval" != "xno"; then
|
|
Packit |
fd8b60 |
if test "x$withval" = "xyes"; then
|
|
Packit |
fd8b60 |
KRB5ROOT=/usr/local
|
|
Packit |
fd8b60 |
else
|
|
Packit |
fd8b60 |
KRB5ROOT=${withval}
|
|
Packit |
fd8b60 |
fi
|
|
Packit |
fd8b60 |
AC_MSG_CHECKING([for krb5-config])
|
|
Packit |
fd8b60 |
if test -x "$KRB5ROOT/bin/krb5-config"; then
|
|
Packit |
fd8b60 |
KRB5CONF=$KRB5ROOT/bin/krb5-config
|
|
Packit |
fd8b60 |
AC_MSG_RESULT([$KRB5CONF])
|
|
Packit |
fd8b60 |
AC_MSG_CHECKING([for gssapi support in krb5-config])
|
|
Packit |
fd8b60 |
if "$KRB5CONF" | grep gssapi > /dev/null; then
|
|
Packit |
fd8b60 |
AC_MSG_RESULT([yes])
|
|
Packit |
fd8b60 |
k5confopts=gssapi
|
|
Packit |
fd8b60 |
else
|
|
Packit |
fd8b60 |
AC_MSG_RESULT([no])
|
|
Packit |
fd8b60 |
k5confopts=
|
|
Packit |
fd8b60 |
fi
|
|
Packit |
fd8b60 |
K5CFLAGS=`"$KRB5CONF" --cflags $k5confopts`
|
|
Packit |
fd8b60 |
CPPFLAGS="$CPPFLAGS $K5CFLAGS"
|
|
Packit |
fd8b60 |
|
|
Packit |
fd8b60 |
K5LIBS=`"$KRB5CONF" --libs $k5confopts`
|
|
Packit |
fd8b60 |
LIBS="$LIBS $K5LIBS"
|
|
Packit |
fd8b60 |
else
|
|
Packit |
fd8b60 |
AC_MSG_RESULT([no])
|
|
Packit |
fd8b60 |
AC_MSG_WARN([--with-kerberos5 specified but krb5-config not found])
|
|
Packit |
fd8b60 |
fi
|
|
Packit |
fd8b60 |
fi])
|
|
Packit |
fd8b60 |
])
|