From: Andrew Deason Date: Thu, 28 Mar 2013 21:42:58 +0000 (-0500) Subject: aklog: Probe for libasn1 on heimdal X-Git-Tag: openafs-stable-1_8_0pre1~1236 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=1942d2a4fc90703e64e1c97ba10d2918ba584e73 aklog: Probe for libasn1 on heimdal 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 Reviewed-by: Russ Allbery Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear --- diff --git a/configure.ac b/configure.ac index 6277815..b51ee7a 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ]) +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 diff --git a/src/aklog/Makefile.in b/src/aklog/Makefile.in index 12f1edd..e3769c5 100644 --- a/src/aklog/Makefile.in +++ b/src/aklog/Makefile.in @@ -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 \