[PATCH] Make krb5-config suppress CFLAGS output and omit extra libraries when called with --libs
rra at stanford.edu
Mon Sep 26 12:03:49 EDT 2011
Greg Hudson <ghudson at mit.edu> writes:
> This is more complicated. First, is do_deps an established convention?
> pkg-config uses the --static flag to decide whether to output dependency
> libraries (on the theory that you need them for static linking but not
> shared linking).
curl-config uses --static-libs as the flag to get this information.
I think at this point including all the internal dependencies is only
needed for static linking. I'm not certain that's true across all of the
stranger platforms (like HP-UX or AIX), but I suspect it is. I would
therefore omit all the internal dependencies except to the degree that one
is supporting static linking.
> Third, the provided patch only omits external dependencies, not internal
> ones (or com_err). An app using only GSSAPI functions should depend
> only on libgssapi_krb5, not on libkrb5 and libk5crypto. However, it's
> likely that apps have come to expect the current behavior--especially as
> we don't appear to properly support things like "krb5-config --libs
> gssapi krb5". So, this problem may be intractable.
I think you should go ahead and break clients that use krb5-config --libs
gssapi and then expect to have Kerberos symbols available. The interface
is pretty clearly defined ("GSSAPI application with Kerberos 5 bindings"),
and clients should be running both krb5-config --libs gssapi and
krb5-config --libs krb5 and combining them. (That's what my applications
that need both already do.) There may be some build system breakage for
people who did the wrong thing, but it's a lot cleaner as an interface.
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the krbdev