Browse Source

Build system: better check for XML backend selection

Selecting the XML backend is done through the use of two options:
--with-roxml and --with-libxml2. If both are selected, we choose
libroxml ; if none is selected, we force the selection of libxml2.
The patch corrects a bug in the case where both backend are selected
and one (or both) backends are pointing to a directory (i.e.
use_roxml and/or use_libxml2 are not 'yes' but some other value).
Since we tested against 'yes', we failed to recognize a valid
user choice and we forced the selection of libxml2.
Emmanuel Deloget 12 years ago
parent
commit
d2fa9ab812
1 changed files with 10 additions and 5 deletions
  1. 10 5
      configure.ac

+ 10 - 5
configure.ac

@@ -66,11 +66,16 @@ AC_ARG_WITH(libxml2,
             [use_libxml2=$withval],
             [use_libxml2=yes])
 
-if test "x$use_roxml" = "xyes"; then
-	if test "x$use_libxml2" = "xyes"; then
-		AC_MSG_WARN([both roxml and libxml2 are selected. I choose roxml])
-		use_libxml2=no
-	fi
+if test "x$use_roxml" != "xno"; then
+    if test "x$use_libxml2" != "xno"; then
+        AC_MSG_WARN([both roxml and libxml2 are selected. I choose roxml])
+        use_libxml2=no
+    fi
+else
+    if test "x$use_libxml2" = "xno"; then
+        AC_MSG_WARN([neither roxml nor libxml2 are selected. I choose libxml2])
+        use_libxml2=yes
+    fi
 fi
 
 XML_LDFLAGS=""