wpa_supplicant pkg-config patch

Henrik Brix Andersen brix
Tue Nov 30 02:25:58 PST 2004

On Mon, 2004-11-29 at 22:07 -0800, Jouni Malinen wrote:
> Thanks! I have not been using pkg-config much, but based on what I can
> see, it does not seem to handle cross compilation cases, nor cases where
> there are more than one version of the library installed, easily. Both
> of these cases are quite common for wpa_supplicant.

Actually, it does. If you have installed one version of the library in,
say, /usr/local/ and another in /usr, all you have to do to compile
against the one in /usr/local is call:

        PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ make

That will pull in the CFLAGS and LDFLAGS (LIBS) from the *.pc files
found in /usr/local/lib/pkgconfig/

How does the current Makefile handle cross-compilation?

> Or would this be the way to handle cross compilation or multiple
> versions with pkg-config? Sounds somewhat complex if I need to end up
> writing one set of .pc files for each target system (of which there are
> dozen or so)..

The *.pc files are automatically generated at compilation time - so if
installing a library to two different locations, there will
automatically be two different *.pc files with different CFLAGS, etc.

> I would still prefer to be able to easily set these paths and library
> selection in the Makefile, .config, and make command line. Having
> pkg-config as the default should be ok, but I would like to first verify
> that some of the not-so-simple cross compilation setups do not suffer
> too much with this kind of change.

Of course. An option for the long run could be to port wpa_supplicant to
use the auto* tools (./configure; make; make install). That would ease
cross-compilation, multiple library versions etc a great deal.

Henrik Brix Andersen <brix at gentoo.org>
Gentoo Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20041130/66d54cde/attachment.pgp 

More information about the Hostap mailing list