aklog: Probe for libasn1 on heimdal
authorAndrew Deason <adeason@sinenomine.net>
Thu, 28 Mar 2013 21:42:58 +0000 (16:42 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Mon, 8 Apr 2013 17:03:15 +0000 (10:03 -0700)
aklog uses encode_EncTicketPart and some other encode_* ASN.1 routines
when we're building against heimdal. Our krb5 autoconf logic from
c-rra-util is not guaranteed to include libasn1 in KRB5_LIBS, since
it's not required for functions in the krb5 API. So, specifically test
for it.

Related issue reported by Måns Nilsson.

Change-Id: I5d1ab07ec481e48710bafcdc53fe58f529cc6dde
Reviewed-on: http://gerrit.openafs.org/9693
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

configure.ac
src/aklog/Makefile.in

index 6277815..b51ee7a 100644 (file)
@@ -83,9 +83,17 @@ AS_IF([test x"$KRB5_LIBS" != x],
      AC_CHECK_HEADERS([kerberosV/heim_err.h])
      AC_CHECK_MEMBERS([krb5_creds.keyblock, krb5_creds.keyblock.enctype, krb5_creds.session,
                        krb5_prompt.type], , , [#include <krb5.h>])
+dnl If we have krb5_creds.session, we are using heimdal
+dnl If we're using heimdal, aklog needs libasn1 for encode_EncTicketPart and a
+dnl few other functions. But just aklog; not any of the other stuff that uses
+dnl krb5.
+     AS_IF([test x"$ac_cv_member_krb5_creds_session" = xyes],
+           [AC_CHECK_LIB([asn1], [encode_EncTicketPart],
+                       [AKLOG_KRB5_LIBS="-lasn1"])])
      RRA_LIB_KRB5_RESTORE])
 AC_SUBST([BUILD_KRB5])
 AC_SUBST([MAKE_KRB5])
+AC_SUBST([AKLOG_KRB5_LIBS])
 
 dnl Probe for GSSAPI
 RRA_LIB_GSSAPI
index 12f1edd..e3769c5 100644 (file)
@@ -9,7 +9,7 @@ include @TOP_OBJDIR@/src/config/Makefile.pthread
 
 MODULE_CFLAGS=@KRB5_CPPFLAGS@ -DALLOW_REGISTER
 
-AKLIBS= ${LIBS} $(LDFLAGS_krb5) $(LIB_krb5)
+AKLIBS= ${LIBS} $(LDFLAGS_krb5) $(LIB_krb5) @AKLOG_KRB5_LIBS@
 AFSLIBS= ${TOP_LIBDIR}/libafshcrypto.a \
         $(top_builddir)/src/ptserver/liboafs_prot.la \
         $(top_builddir)/src/rxkad/liboafs_rxkad.la \