Skip to content

Commit

Permalink
configure: Don't use cross_prefix when invoking pkg-config
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
cpackham-atlnz authored and axboe committed Jan 23, 2024
1 parent 8b3190c commit 1ee0469
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1ee0469

Please sign in to comment.