summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in58
1 files changed, 58 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index ffd5acd..41fcfc5 100644
--- a/configure.in
+++ b/configure.in
@@ -194,6 +194,64 @@ dnl Look for OpenSSL
AC_CHECK_HEADER([openssl/opensslv.h], [],
[AC_MSG_ERROR([We require OpenSSL; try --with-openssl])])
+dnl Look for Kerberos 5 for GSSAPI
+AC_ARG_WITH(gssapi,
+ APR_HELP_STRING([--with-gssapi=PATH],[build with GSSAPI support; needs krb5-config in PATH/bin (eg. /usr/lib/mit)]),
+[
+ if test "$withval" = "yes"; then
+ AC_MSG_ERROR([--with-gssapi requires a path])
+ else
+ gssapi_prefix=$withval/
+
+ if test "x$gssapi_prefix" != "x" -a ! -d "$gssapi_prefix"; then
+ AC_MSG_ERROR('--with-gssapi requires a path to a directory')
+ fi
+ AC_MSG_CHECKING([for krb5-config])
+ if test -x "$gssapi_prefix/bin/krb5-config"; then
+ krb5conf=$gssapi_prefix/bin/krb5-config
+ AC_MSG_RESULT([$krb5conf])
+ AC_MSG_CHECKING([for gssapi support in krb5-config])
+ if "$krb5conf" | grep gssapi > /dev/null; then
+ AC_MSG_RESULT([yes])
+ GSSAPI_confopts=gssapi
+ else
+ AC_MSG_RESULT([no])
+ GSSAPI_confopts=
+ fi
+ GSSAPI_cflags=`"$krb5conf" --cflags $GSSAPI_confopts`
+ GSSAPI_libs=`"$krb5conf" --libs $GSSAPI_confopts`
+ if test -z "$GSSAPI_confopts"; then
+ case "${host_os}" in
+ solaris*)
+ GSSAPI_cflags="$GSSAPI_cflags -I/usr/include/gssapi"
+ GSSAPI_libs="$GSSAPI_libs -lgss"
+ ;;
+ esac
+ fi
+ APR_ADDTO(CFLAGS, "$GSSAPI_cflags")
+ APR_ADDTO(CFLAGS, [-DSERF_HAVE_GSSAPI])
+ APR_ADDTO(LDFLAGS, "$GSSAPI_libs")
+ AC_MSG_CHECKING([if gssapi works])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
+#include <gssapi.h>
+int main()
+{gss_init_sec_context(NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL);}]])],
+ lib_gssapi="yes", lib_gssapi="no")
+ if test "$lib_gssapi" = "yes"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([cannot find GSSAPI (Kerberos)])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_WARN([--with-gssapi specified but krb5-config not found])
+ fi
+
+ fi
+])
+
+
dnl CuTest requires libm on Solaris
AC_SEARCH_LIBS(fabs, m)