From ef2b61aa1b77ed11fbe887692f4472bdb228f573 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Mon, 1 May 2017 21:48:17 +0300 Subject: [PATCH] configure: Check gfio test result via return value (not printf) Test code compiled by compile_prog() mostly return 0 on success whether binaries are executed or not. This one actually runs and the result can be checked without printf. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index b49ffc1e..0cb4e388 100755 --- a/configure +++ b/configure @@ -1243,7 +1243,7 @@ int main(void) gdk_threads_enter(); gdk_threads_leave(); - printf("%d", GTK_CHECK_VERSION(2, 18, 0)); + return GTK_CHECK_VERSION(2, 18, 0) ? 0 : 1; /* 0 on success */ } EOF GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0) @@ -1259,8 +1259,8 @@ if test "$?" != "0" ; then exit 1 fi if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then - r=$($TMPE) - if test "$r" != "0" ; then + $TMPE + if test "$?" = "0" ; then gfio="yes" GFIO_LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" -- 2.25.1