check rpm
not building docs (need oxygen)

8/19/2010 - created by Qing He <qing.he@intel.com>
1/24/2011 - Disable Fedora/Debian checking/settings by Mark Hatle <mark.hatle@windriver.com>

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,22 +35,15 @@
 FIND_PACKAGE(Check REQUIRED)
 FIND_PACKAGE(ZLIB REQUIRED)
 
-IF ( FEDORA )
-MESSAGE(STATUS "Building for Fedora")
-ADD_DEFINITIONS( -DFEDORA )
-ENDIF ( FEDORA)
-
-IF ( DEBIAN )
-MESSAGE(STATUS "Building for Debian")
-ADD_DEFINITIONS( -DDEBIAN -DDEBIAN_SEMANTICS)
-ENDIF ( DEBIAN )
-
 IF ( MULTI_SEMANTICS )
 MESSAGE(STATUS "Enabling multi dist support")
 ADD_DEFINITIONS( -DMULTI_SEMANTICS)
 ENDIF ( MULTI_SEMANTICS )
 
-IF ( NOT DEBIAN )
+FIND_PACKAGE(PkgConfig REQUIRED)
+PKG_CHECK_MODULES(RPM REQUIRED rpm)
+INCLUDE_DIRECTORIES( ${RPM_INCLUDE_DIRS} )
+
 FIND_LIBRARY(RPMDB_LIBRARY NAMES rpmdb)
 IF ( NOT RPMDB_LIBRARY )
 FIND_LIBRARY(RPMDB_LIBRARY NAMES rpm)
@@ -59,13 +52,14 @@
 IF ( RPMIO_LIBRARY )
 SET( RPMDB_LIBRARY ${RPMIO_LIBRARY} ${RPMDB_LIBRARY} )
 ENDIF ( RPMIO_LIBRARY )
-IF ( FEDORA )
+FIND_LIBRARY(RPMMISC_LIBRARY NAMES rpmmisc)
+IF ( RPMMISC_LIBRARY )
+SET( RPMDB_LIBRARY ${RPMMISC_LIBRARY} ${RPMDB_LIBRARY} )
+ENDIF ( RPMMISC_LIBRARY )
 FIND_LIBRARY(DB_LIBRARY NAMES db)
 IF ( DB_LIBRARY )
 SET( RPMDB_LIBRARY ${DB_LIBRARY} ${RPMDB_LIBRARY} )
 ENDIF ( DB_LIBRARY )
-ENDIF ( FEDORA )
-ENDIF ( NOT DEBIAN )
 
 SET( PACKAGE "satsolver" )
 SET( VERSION "${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}.${LIBSATSOLVER_PATCH}" )
@@ -159,22 +153,7 @@
 ADD_SUBDIRECTORY(applayer)
 ADD_SUBDIRECTORY(tests)
 ADD_SUBDIRECTORY(examples)
-ADD_SUBDIRECTORY(doc)
-
-FIND_PACKAGE(SWIG)
-
-IF ( SWIG_FOUND )
-  ADD_SUBDIRECTORY(bindings)
-ELSE ( SWIG_FOUND )
- # for older version of swig/cmake
- FIND_PROGRAM(SWIG_EXECUTABLE
-   NAMES swig-1.3 swig
-  PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin
- )
- IF ( SWIG_EXECUTABLE )
-  ADD_SUBDIRECTORY(bindings)
- ENDIF ( SWIG_EXECUTABLE )
-ENDIF ( SWIG_FOUND )
+#ADD_SUBDIRECTORY(doc)
 
 MESSAGE(STATUS "version: ${VERSION}")
 
