How to solve configure checking
Nowdays I'm just trying to build libsamperate from sourc开发者_StackOverflowe using MSYS on Windows, but i meet a configure checking problem I've installed FFTW & libsndfile before, their include files lib files and pkg-config files are all in the right place, but when I use sh ./configure
to generate makefile for libsamprate the output always mentions
checking for pkg-config... no
checking for SNDFILE... no
I also set the PKG_CONFIG_PATH(usr/local/lib/pkgconfig) and tried many times but the result seems the same
Does anyone knows anything about this?
As mentioned in comments, your environment is not set up to run the pkg-config executable. There are many problems associated with pkg-config, and it has become increasingly popular to suggest that the correct solution is to stop using it completely. Unfortunately, if you are trying to install a package that does use pkg-config, you are not in a position to use that solution. The closest you can get is to set PKG_CONFIG to 'true' or ':' in your environment. This causes pkg-config to emit no output but always return true when it is run, so you need to specify locations of libraries and headers via the standard mechanisms (LDFLAGS, etc.).
pkg-config is great in that it allows a user (someone installing the package) to be ignorant of the standard flags. The problem with pkg-config is that it allows the users to be ignorant.
As a package maintainer, you should stop using pkg-config. As a user, you should either set PKG_CONFIG=: in your environment or in a config.site, or get in the habit of invoking configure with PKG_CONFIG=: as an argument. (If you are using packages that rely on ancient autoconf in which you cannot pass such flags as an argument, I'm not sure what the appropriate action is, but suggesting that the package maintainer upgrade is probably not a bad idea.)
精彩评论