summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2020-06-12 19:08:29 -0400
committerMike Frysinger <vapier@gentoo.org>2020-06-12 19:08:29 -0400
commite9a21197ecb9f2f63290320e9152f71b54af48ea (patch)
treeffa2d16640e71fea0bff1620edea36b22ced803f
parentb94dd4b77002a0635118551df5fbfa600f6badc2 (diff)
downloadswig-e9a21197ecb9f2f63290320e9152f71b54af48ea.tar.gz
configure: use AC_PATH_TOOL for pkg-config
AC_CHECK_PROGS will find the tool using exactly the name given: it only searches for "pkg-config". When doing native builds, this is generally fine. However, when cross-compiling, this is not ideal as `pkg-config` is often configured for the build system, not the system we want to cross-compile for. Switch to using the AC_PATH_TOOL tool instead. This will look for "pkg-config" with a $host- prefix first before falling back to the plain "pkg-config". When doing native builds, things should still behave the same, but now things work better out of the box when we cross-compile. For example, `./configure --host=aarch64-linux-gnu` will first look for "aarch64-linux-gnu-pkg-config" before falling back to the plain "pkg-config".
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d61ecbf42..726a3bac2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -459,7 +459,7 @@ else
alllang_default=yes
fi
-AC_CHECK_PROGS([PKG_CONFIG], [pkg-config])
+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
#--------------------------------------------------------------------
# Look for Tcl