APXS = @APXS@
GSS_CPPFLAGS = @GSS_CPPFLAGS@
-GSS_LDFLAGS = @GSS_LDFLAGS@
+GSS_LDFLAGS = @GSS_LDFLAGS@ @LIBS@
SPNEGO_SRCS = @SPNEGO_SRCS@
CPPFLAGS = -I. -Ispnegokrb5 $(GSS_CPPFLAGS) $(DEFS)
-# Process this file with autoconf to produce a configure script.
AC_REVISION($Revision$)
AC_PREREQ(2.57)
AC_INIT(mod_auth_gssapi, 0.1, modauthkerb-developers@lists.sourceforge.net)
# XXX think about lib64, etc
TMP_GSS_LDFLAGS="-L $with_gss/lib"
fi
-
- LIBS="$LIBS $TMP_GSS_LDFLAGS"
- AC_CHECK_LIB(gssapi, gss_accept_sec_context, [ GSS_LDFLAGS="$TMP_GSS_LDFLAGS" ])
- LIBS="$ac_save_LIBS"
fi
-if test -z "$GSS_LDFLAGS"; then
+LIBS="$LIBS $TMP_GSS_LDFLAGS"
+AC_CHECK_LIB(
+ [gssapi_krb5], gss_accept_sec_context,
+ [found_gssapi=yes
+ LIBS="-lgssapi_krb5 $LIBS"],
+ [AC_CHECK_LIB(gssapi, gss_accept_sec_context, [ found_gssapi=yes
+ LIBS="$LIBS -lgssapi"],
+ [LIBS="$ac_save_LIBS"])])
+if test -z "$found_gssapi"; then
AC_MSG_ERROR([failed to find a GSS-API library])
fi
if test -n "$with_gss"; then
LDFLAGS="$LDFLAGS -Wl,-rpath -Wl,$with_gss/lib"
fi
-#XXX schovat nebo dat primo do LDFLAGS:
-LIBS=-lgssapi
AC_TRY_RUN([
#include <string.h>
#include <gssapi.h>
}],
[ if test $? -eq 0; then
AC_MSG_RESULT(yes)
- AC_DEFINE(GSSAPI_SUPPORTS_SPNEGO)
+ AC_DEFINE(GSSAPI_SUPPORTS_SPNEGO,1,[GSS-API implementation has its own SPNEGO])
gssapi_supports_spnego=yes
else
AC_MSG_RESULT(no)