]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Rename ENABLE_LIBXML2 to WITH_LIBXML2
authorMichael Schroeder <mls@suse.de>
Tue, 28 Feb 2017 13:59:11 +0000 (14:59 +0100)
committerMichael Schroeder <mls@suse.de>
Tue, 28 Feb 2017 13:59:11 +0000 (14:59 +0100)
Like with the autotools. Enable is for enabling features.

CMakeLists.txt
ext/solv_xmlparser.c

index 0da4da6d0c7e1cb380822eab4e0b8dd1e27d9b52..bcdeee648f2aa5d70a780fd100481e6868137764 100644 (file)
@@ -32,7 +32,7 @@ OPTION (MULTI_SEMANTICS "Build with support for multiple distribution types?" OF
 OPTION (ENABLE_LZMA_COMPRESSION "Build with lzma/xz compression support?" OFF)
 OPTION (ENABLE_BZIP2_COMPRESSION "Build with bzip2 compression support?" OFF)
 
-OPTION (ENABLE_LIBXML2 "Build with libxml2 instead of libexpat?" OFF)
+OPTION (WITH_LIBXML2  "Build with libxml2 instead of libexpat?" OFF)
 
 #IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4)
 #ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERISION} GREATER 2.4)
@@ -161,13 +161,13 @@ SET (ENABLE_LZMA_COMPRESSION ON)
 ENDIF (ENABLE_ARCHREPO)
 
 IF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO)
-IF (ENABLE_LIBXML2)
+IF (WITH_LIBXML2 )
 FIND_PACKAGE (LibXml2 REQUIRED)
 INCLUDE_DIRECTORIES (${LIBXML2_INCLUDE_DIR})
-ELSE(ENABLE_LIBXML2)
+ELSE(WITH_LIBXML2 )
 FIND_PACKAGE (EXPAT REQUIRED)
 INCLUDE_DIRECTORIES (${EXPAT_INCLUDE_DIRS})
-ENDIF (ENABLE_LIBXML2)
+ENDIF (WITH_LIBXML2 )
 ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO)
 
 IF (ENABLE_ZLIB_COMPRESSION)
@@ -265,7 +265,7 @@ ENDIF (${CMAKE_MAJOR_VERSION} GREATER 2)
 
 # should create config.h with #cmakedefine instead...
 FOREACH (VAR HAVE_STRCHRNUL HAVE_FOPENCOOKIE HAVE_FUNOPEN WORDS_BIGENDIAN
-  HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS ENABLE_LIBXML2)
+  HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS WITH_LIBXML2 )
   IF(${VAR})
     ADD_DEFINITIONS (-D${VAR}=1)
     SET (SWIG_FLAGS ${SWIG_FLAGS} -D${VAR})
@@ -374,11 +374,11 @@ set (CMAKE_C_FLAGS_DEBUG     "${CMAKE_C_FLAGS} -g3 -O0")
 # set system libraries
 SET (SYSTEM_LIBRARIES "")
 IF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO)
-IF (ENABLE_LIBXML2)
+IF (WITH_LIBXML2 )
 SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${LIBXML2_LIBRARIES})
-ELSE (ENABLE_LIBXML2)
+ELSE (WITH_LIBXML2 )
 SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${EXPAT_LIBRARY})
-ENDIF (ENABLE_LIBXML2)
+ENDIF (WITH_LIBXML2 )
 
 ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO)
 IF (ENABLE_ZLIB_COMPRESSION)
index d80e6c5fbeb944dd36a0262161120ff5000800cd..170520ff3901c4abf0c380875addd964d722eb8a 100644 (file)
@@ -14,7 +14,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef ENABLE_LIBXML2
+#ifdef WITH_LIBXML2
 #include <libxml/parser.h>
 #else
 #include <expat.h>
@@ -36,7 +36,7 @@ add_contentspace(struct solv_xmlparser *xmlp, int l)
 }
 
 
-#ifdef ENABLE_LIBXML2
+#ifdef WITH_LIBXML2
 static void
 character_data(void *userData, const xmlChar *s, int len)
 #else
@@ -53,7 +53,7 @@ character_data(void *userData, const XML_Char *s, int len)
   xmlp->lcontent += len; 
 }
 
-#ifdef ENABLE_LIBXML2
+#ifdef WITH_LIBXML2
 static void
 start_element(void *userData, const xmlChar *name, const xmlChar **atts)
 #else
@@ -91,7 +91,7 @@ start_element(void *userData, const char *name, const char **atts)
   xmlp->state = el->tostate;
   xmlp->docontent = el->docontent;
   xmlp->lcontent = 0;
-#ifdef ENABLE_LIBXML2
+#ifdef WITH_LIBXML2
   if (!atts)
     {
       static const char *nullattr;
@@ -102,7 +102,7 @@ start_element(void *userData, const char *name, const char **atts)
     xmlp->startelement(xmlp, xmlp->state, el->element, (const char **)atts);
 }
 
-#ifdef ENABLE_LIBXML2
+#ifdef WITH_LIBXML2
 static void
 end_element(void *userData, const xmlChar *name)
 #else
@@ -180,7 +180,7 @@ solv_xmlparser_free(struct solv_xmlparser *xmlp)
   xmlp->content = solv_free(xmlp->content);
 }
 
-#ifdef ENABLE_LIBXML2
+#ifdef WITH_LIBXML2
 
 static inline int
 create_parser(struct solv_xmlparser *xmlp)