On Monday, 20 November 2017 11:07 AM, Sam Hartman wrote:
> Why do you want to replace krb5-config with pkg-config?
> [...]
> Are there advantages/simplicities in coding that led you to that
> approach?  I'd like to understand so I can evaluate.

As Ben pointed out, pkgconfig has been replacing the -config 
interfaces for some time, so I generally consider the -config
scripts to be deprecated or legacy at best. Also, the output
of these scripts can be unreliable or even entirely incorrect
(e.g. when cross-compiling).

I wrote the script using pkg-config because I wanted to
see if pkg-config-crosswrapper could solve the 
cross-compiling issue. That said, I think the script I posted
above is simpler than calling arch-specific config files
from a krb5-config wrapper. But that's not saying
my solution is any better.

> i'm a bit concerned that getting the behavior of all the different
> --libs options for the different types of Kerberos apps will be a bit
> fiddly.

There are several pkg-config files in /usr/lib/<triplet>/pkgconfig/mit-krb5
that may be useful. However, to use them, you must either set 
PKG_CONFIG_LIBDIR to the pkgconfig/mit-krb5 directory, or move 
the files into the main pkgconfig directory.

Unfortunately, this latter option would conflict with the 
pkgconfig files from heimdal-dev. Of course, this only matters if users
install both package variants. Is this likely?

The MIT pkgconfig files could potentially be prefixed with mit-, like 
mit-krb5.pc and mit-krb5-gssapi.pc already are. Since it seems that
most, if not all, developers still use krb5-config(.mit), this may be a better 
option.

Hugh

Reply via email to