Alfred M. Szmidt wrote: > > pkg-config tries to solve an important problem, but it does so in the > > wrong way. pkg-config checks for an exact library name, > > PKG_CHECK_MODULES does not check for a library name at all, > but for the name of the .pc file. This gives the administrator > one extra level of indirection. > > The .pc file specifies the library name, so my point stands. A user > cannot modify the .pc files, so it makes it hard to modify that file > for a user without setting PKG_CONFIG_PATH or similar, in which case > you are back to square one with CFLAGS/LDFLAGS which are far more > flexible. I don't understand what is wrong with setting PKG_CONFIG_PATH. Is your argument merely that pkg-config is less well known than the traditional methods, and therefore broken? Setting PKG_CONFIG_PATH is no more difficult than setting CFLAGS. In fact, it strikes me that using pkg-config is more flexible than using CFLAGS/LDFLAGS, since the user can set PKG_CONFIG_PATH to gain complete control of the contents of the .pc files and could then make FOO_CFLAGS and FOO_LIBS be always empty, and could then control the configury with CFLAGS/LDFLAGS if so desired. If the maintainer uses pkg-config, the user can do everything that can be done with a traditional setup, but the converse is not true--therefore packages using pkg-config are more flexible. The only drawback is that if the user tweaks the .pc files in this way and the package maintainer merely invokes PKG_CHECK_MODULES and does not perform any additional tests to check the api, then the build will fail. > pkg-config is simply broken in far to many ways. I've only seen one way in which pkg-config is deficient, and that is that PKG_CHECK_MODULES does not actually check that the library as specified in the .pc file exists and can be succesfully linked against. Rather, the user is assumed to be competent. In that sense, it is very much in keeping with the autoconf philosophy. In what ways, other than "not being in step with the autoconf philosophy" is pkg-config actually broken? It seems that if PKG_CHECK_MODULES were simply expanded to invoke AC_LINK_IFELSE to check that the contents of the .pc files are valid, then there would be no issue at all. -- William Pursell _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf