aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2008-10-17 10:13:03 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2008-10-17 10:13:03 +0000
commitf4cdb41af3fd8ffd4ac28a9483e6c2a93166863f (patch)
tree10dc064e7fad00fb9ac0123d4ea47d50c6d0011c /configure.ac
parent1f5cf0f13c29bcc7f743c46f16ea71a8e3b34b30 (diff)
downloadrpm-setup-f4cdb41af3fd8ffd4ac28a9483e6c2a93166863f.tar
rpm-setup-f4cdb41af3fd8ffd4ac28a9483e6c2a93166863f.tar.gz
rpm-setup-f4cdb41af3fd8ffd4ac28a9483e6c2a93166863f.tar.bz2
rpm-setup-f4cdb41af3fd8ffd4ac28a9483e6c2a93166863f.tar.xz
rpm-setup-f4cdb41af3fd8ffd4ac28a9483e6c2a93166863f.zip
* pick up c, cpp & ld flags from pkg-config (needed by rpm5)
* check for rpmio.h & rpmtag.h (needed by rpm5)
Diffstat (limited to 'configure.ac')
-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}