If a user has explicitly specified --enable-rpm when running
"configure", it will now fail unless both rpm2cpio and cpio
are present on the system.
* configure.ac: Check if both rpm2cpio and cpio
exist on the system. If not, disable the option and fail the
configuration if --enable-rpm was specified explicitly.
Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com>
AC_CHECK_PROG(HAS_RPM2CPIO, rpm2cpio, yes, no)
AC_CHECK_PROG(HAS_CPIO, cpio, yes, no)
- if test x$ENABLE_RPM = xauto; then
- if test x$HAS_RPM2CPIO = xyes -a x$HAS_CPIO = xyes; then
- ENABLE_RPM=yes
+ if test x$HAS_RPM2CPIO = xyes -a x$HAS_CPIO = 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])
fi
+ ENABLE_RPM=no
fi
fi