pkg-config doesn't need to have a cross prefixed version. It can be pointed at alternate sysroots with environment variables like PKG_CONFIG_SYSROOT_DIR. The configure script was already inconsistent with using `pkg-config` in some places and `${cross_prefix}pkg-config` in others. Make check_min_lib_version() and the gtk checks consistent with the rest by dropping the `${cross_prefix}` usage with pkg-config. Signed-off-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx> --- Notes: I ran into an issue cross-compiling fio where it couldn't find libxnvme in my cross sysroot. pkg-config shouldn't need to have a target tuple prefix and I see that the configure script was already inconsistent with using it hence this patch which resolves the build issue for me. configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 742cb7c5..cba0ce5f 100755 --- a/configure +++ b/configure @@ -155,11 +155,11 @@ output_sym() { check_min_lib_version() { _feature=$3 - if "${cross_prefix}"pkg-config --atleast-version="$2" "$1" > /dev/null 2>&1; then + if pkg-config --atleast-version="$2" "$1" > /dev/null 2>&1; then return 0 fi : "${_feature:=${1}}" - if "${cross_prefix}"pkg-config --version > /dev/null 2>&1; then + if pkg-config --version > /dev/null 2>&1; then if test "$(eval echo \"\$$_feature\")" = "yes" ; then feature_not_found "$_feature" "$1 >= $2" fi @@ -1627,14 +1627,14 @@ int main(void) return GTK_CHECK_VERSION(2, 18, 0) ? 0 : 1; /* 0 on success */ } EOF -GTK_CFLAGS=$(${cross_prefix}pkg-config --cflags gtk+-2.0 gthread-2.0) +GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0) ORG_LDFLAGS=$LDFLAGS LDFLAGS=$(echo $LDFLAGS | sed s/"-static"//g) if test "$?" != "0" ; then echo "configure: gtk and gthread not found" exit 1 fi -GTK_LIBS=$(${cross_prefix}pkg-config --libs gtk+-2.0 gthread-2.0) +GTK_LIBS=$(pkg-config --libs gtk+-2.0 gthread-2.0) if test "$?" != "0" ; then echo "configure: gtk and gthread not found" exit 1 -- 2.43.0