From: Tomohiro Kusumi Date: Mon, 1 May 2017 18:48:17 +0000 (+0300) Subject: configure: Check gfio test result via return value (not printf) X-Git-Tag: fio-2.20~14 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=ef2b61aa1b77ed11fbe887692f4472bdb228f573 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 --- 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"