configure: fix cross pkg-config detection
authorColin Watson <cjwatson@ubuntu.com>
Fri, 7 Dec 2012 11:07:54 +0000 (12:07 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 8 Dec 2012 21:10:02 +0000 (22:10 +0100)
commitc07a6f3ff36c85ce1daec34c16dea8ab95ec4c78
tree0979416ba1e76dc4c8a0974c379fe1efd63353b7
parentd021f2e8a0067fc769652f27afec9024c0d02b3d
configure: fix cross pkg-config detection

When cross-compiling, CURL_CHECK_PKGCONFIG was checking for the cross
pkg-config using ${host}-pkg-config.

The gold standard for doing this correctly is pkg-config's own macro,
PKG_PROG_PKG_CONFIG.  However, on the assumption that you have a good
reason not to use that directly (reduced dependencies for maintainer
builds?), the behaviour of cURL's version should at least match.
PKG_PROG_PKG_CONFIG uses AC_PATH_TOOL, which ultimately ends up trying
${host_alias}-pkg-config; this is not quite the same as what cURL does,
and may differ because ${host} has been run through config.sub.  For
instance, when cross-building to the armhf architecture on Ubuntu,
${host_alias} is arm-linux-gnueabihf while ${host} is
arm-unknown-linux-gnueabihf.  This may also have been the cause of the
problem reported at http://curl.haxx.se/mail/lib-2012-04/0224.html.

AC_PATH_TOOL is significantly simpler than cURL's current code, and
dates back to well before the current minimum of Autoconf 2.57, so let's
use it instead.
acinclude.m4