From 1ee0469f6d180a98d31196bea787f37269ff9cdd Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 24 Jan 2024 09:26:36 +1300 Subject: [PATCH] configure: Don't use cross_prefix when invoking pkg-config 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 Link: https://lore.kernel.org/r/20240123202636.179467-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Jens Axboe --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f86fcf77..dea8d07d 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 @@ -1631,14 +1631,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.25.1