diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-09-02 17:48:26 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-09-02 17:48:26 +0000 |
commit | e47c93982215f78d67a8c79f904c9a897f195d57 (patch) | |
tree | 5169206dbc0c59168829742307ed86842320a1b2 /acinclude.m4 | |
parent | a0bbe25eef78808a54d014b8c9b7a4c01ac02d4d (diff) | |
download | curl-e47c93982215f78d67a8c79f904c9a897f195d57.tar.gz |
extended CURL_CHECK_PKGCONFIG to check for a host-specific version of the
pkg-config first before the "normal" one (if cross-compiling)
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index b14ae38a2..18f4d8202 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3195,13 +3195,23 @@ dnl ------------------------ dnl search for the pkg-config tool (if not cross-compiling). Set the PKGCONFIG dnl variable to hold the path to it, or 'no' if not found/present. dnl -dnl If pkg-config is present, check that it has info about the $module or return -dnl "no" anyway! +dnl If pkg-config is present, check that it has info about the $module or +dnl return "no" anyway! dnl AC_DEFUN([CURL_CHECK_PKGCONFIG], [ - AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin) + PKGCONFIG="no" + + if test x$cross_compiling = xyes; then + dnl see if there's a pkg-specific for this host setup + AC_PATH_PROG( PKGCONFIG, ${host}-pkg-config, no, + $PATH:/usr/bin:/usr/local/bin) + fi + + if test x$PKGCONFIG = xno; then + AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin) + fi if test x$PKGCONFIG != xno; then AC_MSG_CHECKING([for $1 options with pkg-config]) |