Detect the presence of 'rpm' as it's now needed by abipkgdiff

If the rpm program is not installed, then we disable tests that
require it.

	* configure.ac: Detect that the 'rpm' is present. Otherwise,
	disable rpm support.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2018-03-29 13:28:29 +02:00
parent 2939397c13
commit 7642dc1586

View File

@ -214,12 +214,13 @@ dnl Check for the rpm2cpio and cpio programs
if test x$ENABLE_RPM = xyes -o x$ENABLE_RPM = xauto; then
AC_CHECK_PROG(HAS_RPM2CPIO, rpm2cpio, yes, no)
AC_CHECK_PROG(HAS_CPIO, cpio, yes, no)
AC_CHECK_PROG(HAS_RPM, rpm, yes, no)
if test x$HAS_RPM2CPIO = xyes -a x$HAS_CPIO = xyes; then
if test x$HAS_RPM2CPIO = xyes -a x$HAS_CPIO = xyes -a x$HAS_RPM = xyes; then
ENABLE_RPM=yes
else
if test x$ENABLE_RPM = xyes; then
AC_MSG_ERROR([rpm support in abipkgdiff needs both 'rpm2cpio' and 'cpio' programs to be installed])
AC_MSG_ERROR([rpm support in abipkgdiff needs 'rpm2cpio', 'cpio' and 'rpm' programs to be installed])
fi
ENABLE_RPM=no
fi