aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3161731..004fc63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,9 +17,24 @@ AC_CONFIG_FILES([
Makefile
])
+dnl See if we have pkgconfig for rpm, resort to old behavior if not
+PKG_CHECK_MODULES([RPM], [rpm], [
+ AC_DEFINE_UNQUOTED([HAVE_RPM],1,[Define if RPM backend is available])
+ CPPFLAGS="$RPM_CFLAGS $CPPFLAGS"
+ LDFLAGS="$RPM_LIBS $LDFLAGS"
+ ], [
+ AC_PATH_PROG(RPM_PATH,rpm,none)
+ if test "$RPM_PATH" = "none"; then
+ AC_MSG_ERROR([RPM executable was not found in your system])
+ else
+ AC_DEFINE_UNQUOTED([HAVE_RPM],1,[Define if RPM backend is available])
+ fi
+ ]
+)
+
AC_CHECK_LIB([rpmio], [rpmLoadMacroFile])
AC_HEADER_STDC
-AC_CHECK_HEADERS([string.h rpm/rpmmacro.h rpm/rpmlib.h])
+AC_CHECK_HEADERS([string.h rpm/rpmmacro.h rpm/rpmlib.h rpm/rpmio.h rpm/rpmtag.h])
CANONTARGETCPU=${target_cpu}