From: Ian Abbott Date: Wed, 1 Aug 2007 12:48:03 +0000 (+0000) Subject: Don't bother running 'rpm -qa' to see whether querying packages works, as X-Git-Tag: r0_7_74~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84c7b8d2527eb712242c51d9f9b8e17bbafcac79;p=comedi.git Don't bother running 'rpm -qa' to see whether querying packages works, as it's quicker just to query for specific packages. --- 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