1
0
mirror of https://github.com/openSUSE/libsolv.git synced 2026-02-05 12:45:46 +01:00

check for rpm/db.h header file

This commit is contained in:
Michael Schroeder
2012-10-19 14:44:01 +02:00
parent 6afa7f074f
commit dd3f9bb02e
2 changed files with 6 additions and 3 deletions

View File

@@ -135,6 +135,7 @@ MESSAGE (STATUS "Enabling multi dist support")
ADD_DEFINITIONS (-DMULTI_SEMANTICS)
ENDIF (MULTI_SEMANTICS)
INCLUDE (CheckIncludeFile)
IF (ENABLE_RPMDB)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
@@ -160,6 +161,7 @@ IF (ENABLE_RPMDB)
SET (RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY})
ENDIF (DB_LIBRARY)
ENDIF (RPM5 OR FEDORA)
CHECK_INCLUDE_FILE(rpm/db.h HAVE_RPM_DB_H)
ENDIF (ENABLE_RPMDB)
INCLUDE (CheckFunctionExists)
@@ -172,6 +174,7 @@ TEST_BIG_ENDIAN (WORDS_BIGENDIAN)
# should create config.h with #cmakedefine instead...
FOREACH (VAR HAVE_STRCHRNUL HAVE_FOPENCOOKIE HAVE_FUNOPEN WORDS_BIGENDIAN
HAVE_RPM_DB_H
ENABLE_RPMDB ENABLE_RPMDB_PUBKEY ENABLE_RPMMD ENABLE_SUSEREPO ENABLE_COMPS
ENABLE_HELIXREPO ENABLE_MDKREPO ENABLE_ARCHREPO ENABLE_DEBIAN
ENABLE_LZMA_COMPRESSION ENABLE_BZIP2_COMPRESSION)

View File

@@ -32,10 +32,10 @@
#include <rpm/rpmdb.h>
#ifndef DB_CREATE
# ifdef FEDORA
# include <db.h>
# else
# if defined(SUSE) || defined(HAVE_RPM_DB_H)
# include <rpm/db.h>
# else
# include <db.h>
# endif
#endif