# Process this file with autoconf to produce a configure script.
AC_REVISION($Revision$)
AC_PREREQ(2.57)
-AC_INIT(mod_auth_kerb, 0.5-rc6, modauthkerb-developers@lists.sourceforge.net)
+AC_INIT(mod_auth_kerb, 5.0-rc7, modauthkerb-developers@lists.sourceforge.net)
AC_CONFIG_SRCDIR([src/mod_auth_kerb.c])
AC_CONFIG_HEADER([config.h])
AC_TRY_COMPILE([#include <krb5.h>],
[ char *tmp = heimdal_version; ],
[ AC_MSG_RESULT(yes)
- AC_DEFINE(HEIMDAL) ]
- have_heimdal=yes,
+ AC_DEFINE(HEIMDAL)
+ have_heimdal=yes ],
[ AC_MSG_RESULT(no) ])
CFLAGS="$ac_save_CFLAGS"
- if test -n "$have_heimdal"; then
- SPNEGO_SRCS="\
+# If SPNEGO is supported by the gssapi libraries, we shouln't build our support.
+# SPNEGO is supported as of Heimdal 0.7, don't know about MIT.
+ gssapi_supports_spnego=""
+ AC_MSG_CHECKING(whether the GSSAPI libraries support SPNEGO)
+ # Invent some better test
+ if test "$have_heimdal" = yes; then
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$KRB5_CPPFLAGS"
+ AC_TRY_COMPILE([#include <gssapi.h>],
+ [ gss_OID oid = GSS_SPNEGO_MECHANISM; ],
+ [ AC_MSG_RESULT(yes)
+ AC_DEFINE(GSSAPI_SUPPORTS_SPNEGO)
+ gssapi_supports_spnego=yes ],
+ [ AC_MSG_RESULT(no) ])
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ if test -z "$gssapi_supports_spnego"; then
+ if test -n "$have_heimdal"; then SPNEGO_SRCS="\
spnegokrb5/asn1_MechType.c \
spnegokrb5/asn1_MechTypeList.c \
spnegokrb5/asn1_ContextFlags.c \
spnegokrb5/encapsulate.c \
spnegokrb5/decapsulate.c \
spnegokrb5/external.c"
- else
- SPNEGO_SRCS="\
+ else SPNEGO_SRCS="\
spnegokrb5/asn1_MechType.c \
spnegokrb5/asn1_MechTypeList.c \
spnegokrb5/asn1_ContextFlags.c \
spnegokrb5/encapsulate.c \
spnegokrb5/decapsulate.c \
spnegokrb5/external.c"
+ fi
fi
fi
fi
AC_PATH_PROG([APXS], [apxs], [], [$with_apache/bin:$with_apache/sbin:$PATH])
if test -z "$APXS"; then
- AC_MSG_ERROR([failed to find apache apxs executable])
+ AC_PATH_PROG([APXS], [apxs2], [], [$with_apache/bin:$with_apache/sbin:$PATH])
+ if test -z "$APXS"; then
+ AC_MSG_ERROR([failed to find apache apxs executable])
+ fi
fi
AC_SUBST(APXS)