On Thu, 2009-10-22 at 11:44 -0700, Murray S. Kucherawy wrote: > What's the current general wisdom on using the pkg-config extensions? > I presume there's a reason they've not been incorporated into basic > autoconf, so I'm keen to learn what common practices there are toward > adopting it into people's builds (or avoiding it). What I dislike on pkg-config are these: - cross-compilation does not work for you out of the box. If you want pkg-config to help you cross compile, you have to create a script in order to do that. - you can set only CFLAGS and LDFLAGS by default. No CPPFLAGS or CXXFLAGS or anything else. Although AFAIK you can add support for any variable, it is quite complicated for both sides. In other words, it does not blend well with autotools. On the other hand, custom macros are usually a disaster both for maintainers and users. Most maintainers are not autoconf experts and don't fully understand what are they doing. So they just copy and modify the macro code from another library. pkg-config is a relief in such cases. It is quite simple and easy to understand - and therefore at least not as misused as autotools. On Fri, 2009-10-23 at 18:32 -0600, John Calcote wrote: > ... > Issues like this are the reason why AC_SEARCH_LIBS was invented. > Using > AC_SEARCH_LIBS, you can specify a list of library names from most > probable to least probable in the library argument. > ... There is one big issue with AC_SEARCH_LIBS: If you use a different calling convention than cdecl (like stdcall, but I don't know, they've just told me), you will get unresolved symbols if you try to link without a proper include file (or something like that). Which means you can't rely on that macro, especially when it concerns Windows libraries. This is quite catastrophic, isn't it? What else than pkg-config would be the proper solution of this? _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf