]> granicus.if.org Git - libtirpc/commitdiff
Switch to use standard GSSAPI by default
authorSimo Sorce <simo@redhat.com>
Tue, 26 Mar 2013 15:13:05 +0000 (11:13 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 26 Mar 2013 15:13:05 +0000 (11:13 -0400)
Make libgssglue configurable still but disabled by default.
There is no reason to use libgssglue anymore, and modern gssapi
supports all needed features for libtirpc and its dependencies.

Signed-off-by: Steve Dickson <steved@redhat.com>
configure.ac
src/Makefile.am

index 40dce963b47ceddf98bc6524303e3ea929c85f3b..4a4adbad6465d5375edb2621aec835f812ab5bc8 100644 (file)
@@ -5,15 +5,30 @@ AC_CONFIG_SRCDIR([src/auth_des.c])
 AC_CONFIG_MACRO_DIR([m4])
 
 AC_ARG_ENABLE(gss,[  --enable-gss            Turn on gss api], [case "${enableval}" in
-        yes) gss=true ; AC_CHECK_LIB([gssapi],[gss_init_sec_context]) ;;
+        yes) gss=true ;;
         no)  gss=false ;;
         *) AC_MSG_ERROR(bad value ${enableval} for --enable-gss) ;;
       esac],[gss=false])
 AM_CONDITIONAL(GSS, test x$gss = xtrue)
+AC_ARG_WITH(gssglue,
+               [  --with-gssglue        Use libgssglue],
+                [case "${enableval}" in
+                 yes) gssglue=true ;;
+                 no)  gssglue=false ;;
+                 *) AC_MSG_ERROR(bad value ${enableval} for --with-gssglue) ;;
+                 esac],
+               [gssglue=false])
+AM_CONDITIONAL(USEGSSGLUE, test x$gssglue = xtrue)
 if test x$gss = xtrue; then
-       AC_DEFINE(HAVE_LIBGSSAPI, 1, [])
-       PKG_CHECK_MODULES(GSSGLUE, libgssglue, [],
-       AC_MSG_ERROR([Unable to locate information required to use libgssglue.]))
+       if test x$gssglue = xtrue; then
+               PKG_CHECK_MODULES(GSSAPI, libgssglue, [],
+               AC_MSG_ERROR([Unable to locate information required to use libgssglue.]))
+       else
+               GSSAPI_CFLAGS=`krb5-config --cflags gssapi`
+               GSSAPI_LIBS=`krb5-config --libs gssapi`
+               AC_SUBST([GSSAPI_CFLAGS])
+               AC_SUBST([GSSAPI_LIBS])
+       fi
 fi
 AC_ARG_ENABLE(ipv6,
        [AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support @<:@default=no@:>@])],
index 66350f5f74a948bd461a95d43ee67c660f0106cb..2dd7768bbb04f3fa482530820f18d10371bf1597 100644 (file)
@@ -58,8 +58,8 @@ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_ref
 ## Secure-RPC
 if GSS
     libtirpc_la_SOURCES += auth_gss.c authgss_prot.c svc_auth_gss.c
-    libtirpc_la_LDFLAGS += $(GSSGLUE_LIBS)
-    libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSGLUE_CFLAGS)
+    libtirpc_la_LDFLAGS += $(GSSAPI_LIBS)
+    libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
 endif
 
 ## libtirpc_a_SOURCES += key_call.c key_prot_xdr.c getpublickey.c