[asterisk-commits] eliel: branch group/appdocsxml r137304 - in /team/group/appdocsxml: ./ includ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 12 14:53:44 CDT 2008


Author: eliel
Date: Tue Aug 12 14:53:44 2008
New Revision: 137304

URL: http://svn.digium.com/view/asterisk?view=rev&rev=137304
Log:
Make libxml2 not a required parameter to compile asterisk.
Also make asterisk compile if we don't have libxml2 installed. Notice that we won't have XML
documentation.
XML_DOCUMENTATION will be enabled only if an AST_XML implementation is available.
Remove not needed CFLAGS and LIBS in Makefile (old code when using mxml).


Modified:
    team/group/appdocsxml/Makefile
    team/group/appdocsxml/configure
    team/group/appdocsxml/configure.ac
    team/group/appdocsxml/include/asterisk/autoconfig.h.in
    team/group/appdocsxml/include/asterisk/xml.h

Modified: team/group/appdocsxml/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/Makefile?view=diff&rev=137304&r1=137303&r2=137304
==============================================================================
--- team/group/appdocsxml/Makefile (original)
+++ team/group/appdocsxml/Makefile Tue Aug 12 14:53:44 2008
@@ -302,10 +302,6 @@
 MOD_SUBDIRS_EMBED_LDFLAGS:=$(MOD_SUBDIRS:%=%-embed-ldflags)
 MOD_SUBDIRS_EMBED_LIBS:=$(MOD_SUBDIRS:%=%-embed-libs)
 MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
-
-# if use xml documentation?
-  ASTCFLAGS+=-DXML_DOCUMENTATION
-  LIBS+=-lmxml
 
 ifneq ($(findstring darwin,$(OSARCH)),)
   ASTCFLAGS+=-D__Darwin__

Modified: team/group/appdocsxml/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/configure.ac?view=diff&rev=137304&r1=137303&r2=137304
==============================================================================
--- team/group/appdocsxml/configure.ac (original)
+++ team/group/appdocsxml/configure.ac Tue Aug 12 14:53:44 2008
@@ -1237,10 +1237,6 @@
 #include <libxml/parser.h>],
 [LIBXML_TEST_VERSION])
 
-if test "${PBX_LIBXML2}" = 0; then
-  AC_MSG_ERROR( *** Please install libxml2 development package.  It is required to build Asterisk!)
-fi
-
 AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
 
 if test "${PBX_MISDN}" = 1; then

Modified: team/group/appdocsxml/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/include/asterisk/autoconfig.h.in?view=diff&rev=137304&r1=137303&r2=137304
==============================================================================
--- team/group/appdocsxml/include/asterisk/autoconfig.h.in (original)
+++ team/group/appdocsxml/include/asterisk/autoconfig.h.in Tue Aug 12 14:53:44 2008
@@ -1191,6 +1191,9 @@
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
 
 /* Define like PROTOTYPES; this can be used by system headers. */
 #undef __PROTOTYPES

Modified: team/group/appdocsxml/include/asterisk/xml.h
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/include/asterisk/xml.h?view=diff&rev=137304&r1=137303&r2=137304
==============================================================================
--- team/group/appdocsxml/include/asterisk/xml.h (original)
+++ team/group/appdocsxml/include/asterisk/xml.h Tue Aug 12 14:53:44 2008
@@ -17,7 +17,12 @@
 #ifndef _ASTERISK_XML_H
 #define _ASTERISK_XML_H
 
-#ifdef HAVE_LIBXML2
+/* 
+ * Implementation specific code. 
+ */
+#if defined(HAVE_LIBXML2) && !defined(AST_XML_IMPLEMENTATION)
+/* AST_XML_IMPLEMENTATION must be defined if an XML implementation is available. */
+#define AST_XML_IMPLEMENTATION
 /* libxml2 specific definitions */
 
 #include <libxml/parser.h>
@@ -35,8 +40,11 @@
 #define AST_XML_PARENT	parent
 #define AST_XML_NAME	name
 
-#endif /* HAVE_LIBXML2 */
+#endif /* defined(HAVE_LIBXML2) && !defined(AST_XML_IMPLEMENTATION) */
 
+
+/* Compile this if we have a working XML implementation. */
+#ifdef AST_XML_IMPLEMENTATION
 #define AST_XML_DESCEND 0
 #define AST_XML_NO_DESCEND 1
 
@@ -114,5 +122,10 @@
  */
 char *ast_xml_get_text(ast_xml_node *node);
 
+/* Features using ast_xml_ */
+#define XML_DOCUMENTATION
+
+#endif /* AST_XML_IMPLEMENTATION */
+
 #endif /* _ASTERISK_XML_H */
 




More information about the asterisk-commits mailing list