make sure we build, even if libxml2 could not be found.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 09 Mar 2009 19:40:29 +0100
changeset 4274 6b73669bb592
parent 4273 fb4423206618
child 4275 bd3eab705407
make sure we build, even if libxml2 could not be found.
src/contrib/config-store.cc
--- a/src/contrib/config-store.cc	Wed Mar 04 16:55:25 2009 +0100
+++ b/src/contrib/config-store.cc	Mon Mar 09 19:40:29 2009 +0100
@@ -1,11 +1,14 @@
 #include "config-store.h"
-#include "xml-config.h"
 #include "raw-text-config.h"
 #include "ns3/string.h"
 #include "ns3/log.h"
 #include "ns3/simulator.h"
 #include "ns3/enum.h"
 #include "ns3/attribute-list.h"
+#include "ns3/contrib-config.h"
+#ifdef HAVE_LIBXML2
+#include "xml-config.h"
+#endif
 
 #include <string>
 #include <fstream>
@@ -58,6 +61,7 @@
 {
   ObjectBase::ConstructSelf (AttributeList ());
 
+#ifdef HAVE_LIBXML2
   if (m_fileFormat == ConfigStore::XML)
     {
       if (m_mode == ConfigStore::SAVE)
@@ -73,7 +77,9 @@
 	  m_file = new NoneFileConfig ();
 	}
     }
-  else if (m_fileFormat == ConfigStore::RAW_TEXT)
+  else 
+#endif /* HAVE_LIBXML2 */
+  if (m_fileFormat == ConfigStore::RAW_TEXT)
     {
       if (m_mode == ConfigStore::SAVE)
 	{