From: kouril Date: Mon, 28 Mar 2011 19:13:37 +0000 (+0000) Subject: Fixed building with gss libs (by Sam Hartman) X-Git-Tag: gssweb-apache-2014-09-08~30 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mod_auth_kerb.git;a=commitdiff_plain;h=e2b7ec7d38dc60fc92ab2bfb60da3b7ad934cf55 Fixed building with gss libs (by Sam Hartman) --- diff --git a/Makefile.in b/Makefile.in index e9005d8..492a4bd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ 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) diff --git a/configure.in b/configure.in index a189bf8..413b539 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,3 @@ -# 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) @@ -60,12 +59,16 @@ if test -z "$GSS_LDFLAGS"; then # 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 @@ -83,8 +86,6 @@ LDFLAGS="$GSS_LDFLAGS" 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 #include @@ -115,7 +116,7 @@ int main(int argc, char** argv) }], [ 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)