cross-compilation and proprietary pkg-config replacements (pcre-config, pcap-config, etc)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I'm currently in the process of adding cross-compilation support to a linux distribution, but I'm running into a lot of nasty issues.

The #1 offender are proprietary pkg-config replacements, and there are many.
They break cross-compilation by returning non-sysrooted include and library directories from the host, like -I/usr/include or -L/lib.

I'm glad to say that autoconf itself is one of the few components that properly handle cross-compilation.

It seems it's "en vogue" for libs to ship their own broken replacement rather than supplying a portable pkgconfig file...
the list is big, but these here are the most often used ones:
pcap-config, pcre-config, freetype-config, apr-1-config, glib-config, gtk-config, ncursesw5-config, libmikmod-config, etc.

(in a proper setup those are not even needed, unless they installed headers into a custom subdir in the standard include path. otherwise just returning -lmylib is the only thing that's needed.)

since it's unlikely to get any of those fixed in the next decade (or even convinced to ship .pc files instead of their NIH'd pkg-config replacement), my idea was to add support for them into autoconf itself:

Offer a m4 macro for each of them (or a generic "external config" macro), which then calls these config tools and prefixes the returned include and library paths with the sysroot path (passed to configure via --with-sysroot=).
so packagers depending on these libraries would use the provided macros
rather than hardcoding their own test.

Does this sound viable and acceptable for inclusion ?
Or is there another workaround that i missed ?

Regards,
--JS

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux