From 84c7b8d2527eb712242c51d9f9b8e17bbafcac79 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 1 Aug 2007 12:48:03 +0000 Subject: [PATCH] Don't bother running 'rpm -qa' to see whether querying packages works, as it's quicker just to query for specific packages. --- m4/as-linux.m4 | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/m4/as-linux.m4 b/m4/as-linux.m4 index de6e0986..7da43d88 100644 --- a/m4/as-linux.m4 +++ b/m4/as-linux.m4 @@ -212,21 +212,11 @@ AC_DEFUN([AS_LINUX_RPM_TARGET], dnl we want to build for using rpm AC_PATH_PROG(RPM, rpm, yes, no) if test "x$RPM" != "xno" ; then - AC_MSG_CHECKING([if rpm can be used to query packages]) - if rpm -qa >/dev/null 2>/dev/null ; then - rpm_check=yes + if rpm -q kernel-$RELEASE > /dev/null + then + LINUX_RPM_TARGET=`rpm -q --queryformat %{arch} kernel-$RELEASE` else - rpm_check=no - fi - AC_MSG_RESULT($rpm_check) - - if test "x$rpm_check" = yes ; then - if rpm -q kernel-$RELEASE > /dev/null - then - LINUX_RPM_TARGET=`rpm -q --queryformat %{arch} kernel-$RELEASE` - else - AC_MSG_NOTICE([Cannot guess target arch, consider setting it using --with-rpm-target]) - fi + AC_MSG_NOTICE([Cannot guess target arch, consider setting it using --with-rpm-target]) fi fi fi -- 2.26.2