[OpenAFS-devel] Check For GSSAPI In Configure: Advice Sought
Antoine Verheijen
antoine.verheijen@ualberta.ca
Tue, 26 Apr 2011 14:43:13 -0600
On Wed, Apr 20, 2011 at 10:42:45PM -0700, Russ Allbery wrote:
> Antoine Verheijen <antoine.verheijen@ualberta.ca> writes:
>
> > Hi, all. I'm looking for a quick bit of advice.
>
> > First, the problem: OpenBSD has built-in Heimdal support but, in their
> > infinite "wisdom", the developers elected to remove all trace of the
> > roken library which they deemed unnecessary. As a result, the configure
> > check for GSSAPI (via gssapi.m4) fails, even though -lgssapi exists,
> > because the check hard-codes -lroken in its library list.
>
> Thanks for the report! We should use the same technique that was used to
> solve the same problem in the krb5 library check for consistency, I
> think. There, I probed for roken first, similar to your option 1, since
> that fits the model used for all other optional dependency libraries. I
> can see the appeal in option two, but it requires fiddling with internal
> Autoconf cache variables, and I don't trust that to continue working in
> later versions since it's not part of the documented Autoconf interface.
Thanks a lot for the response, Russ. I don't disagree with any of this.
I was torn on the approach to use, particularly after Simon pointed out that
this is part of a larger project. That's primarily why I elected to send
this email as opposed to simply revamping my previous patch attempt.
>
> I'm on vacation at the moment so can't easily work on this, but I'll add a
> fix to rra-c-util (which is upstream for this file) as soon as I get back.
Sound great! No big hurry. I can work-around locally until it is changed.
Based on this, I'll abandon my patch devoted to this and will await your
mods. Many thanks.
>
> > --- a/src/cf/gssapi.m4
> > +++ b/src/cf/gssapi.m4
> > @@ -77,8 +77,11 @@ AC_DEFUN([_RRA_LIB_GSSAPI_MANUAL],
> > AC_SEARCH_LIBS([crypt], [crypt])
> > rra_gssapi_extra="$LIBS"
> > LIBS="$rra_gssapi_save_LIBS"
> > + AC_CHECK_LIB([roken], [ct_memcmp],
> > + [rra_gssapi_libroken=-lroken],
> > + [rra_gssapi_libroken=])
> > AC_CHECK_LIB([gssapi], [gss_import_name],
> > - [GSSAPI_LIBS="-lgssapi -lkrb5 -lasn1 -lroken -lcrypto -lcom_err"
> > + [GSSAPI_LIBS="-lgssapi -lkrb5 -lasn1 $rra_gssapi_libroken -lcrypto -lcom_err"
> > GSSAPI_LIBS="$GSSAPI_LIBS $rra_gssapi_extra"],
> > [AC_CHECK_LIB([krb5support], [krb5int_getspecific],
> > [rra_gssapi_extra="-lkrb5support $rra_gssapi_extra"],
> > @@ -101,7 +104,7 @@ AC_DEFUN([_RRA_LIB_GSSAPI_MANUAL],
> > [GSSAPI_LIBS="-lgss"],
> > [AC_MSG_ERROR([cannot find usable GSS-API library])])],
> > [$rra_gssapi_extra])],
> > - [-lkrb5 -lasn1 -lroken -lcrypto -lcom_err $rra_gssapi_extra])
> > + [-lkrb5 -lasn1 $rra_gssapi_libroken -lcrypto -lcom_err $rra_gssapi_extra])
> > RRA_LIB_GSSAPI_RESTORE])
>
> This is the right basic idea for how I'd fix this, except libroken can be
> added to rra_gssapi_extra (that's what it's for) and hence the probe
> should be done before setting rra_gssapi_extra and can be simpler. The
> krb5 probe uses:
>
> AC_SEARCH_LIBS([rk_simple_execve], [roken])
>
> before setting rra_gssapi_extra, and then the remaining changes aren't
> required.
>
> libroken thankfully doesn't ever depend on libcrypto or libcom_err, so one
> doesn't have to be careful about preserving that part of the library
> ordering.
I wasn't aware of this (since I didn't have a libroken handy). Good to know.
It definitely makes it simpler.
>
> --
> Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
Thanks again. :-)
------------------------------------------------------------------------
Antoine Verheijen Email: antoine.verheijen@ualberta.ca
AICT (formerly CNS) Phone: (780) 492-9312
University of Alberta Fax: (780) 492-1729