<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6877">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Build System: Fix --disable-xmldoc option.<br><br>The configure option to disable XML documentation does not currently<br>work.  This patch makes it effective, but also causes an ABI change by<br>removing the ast_xmldoc_* symbols.<br><br>ASTERISK-26639 #close<br><br>Change-Id: Ifac562340c09f80c83e0203de098fcac93bf8c44<br>---<br>M configure<br>M configure.ac<br>M include/asterisk/autoconfig.h.in<br>M include/asterisk/xml.h<br>M main/config_options.c<br>M main/manager.c<br>6 files changed, 12 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/6877/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 588fbfd..173b169 100755<br>--- a/configure<br>+++ b/configure<br>@@ -14671,6 +14671,9 @@<br> <br> if test "${disable_xmldoc}" != "yes"; then<br> <br>+$as_echo "#define AST_XML_DOCS 1" >>confdefs.h<br>+<br>+<br> if test "x${PBX_LIBXSLT}" != "x1" -a "${USE_LIBXSLT}" != "no"; then<br>    pbxlibdir=""<br>    # if --with-LIBXSLT=DIR has been specified, use it.<br>diff --git a/configure.ac b/configure.ac<br>index c729b94..1ec5541 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -696,6 +696,7 @@<br>   esac], [disable_xmldoc=no])<br> <br> if test "${disable_xmldoc}" != "yes"; then<br>+        AC_DEFINE([AST_XML_DOCS], 1, [Define to enable XML documentation.])<br>         AST_EXT_LIB_CHECK([LIBXSLT], [xslt], [xsltLoadStylesheetPI], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])<br>         AST_EXT_LIB_CHECK([LIBXSLT_CLEANUP], [xslt], [xsltCleanupGlobals], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])<br> <br>diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in<br>index f85ad8d..5865c0a 100644<br>--- a/include/asterisk/autoconfig.h.in<br>+++ b/include/asterisk/autoconfig.h.in<br>@@ -9,6 +9,9 @@<br> /* Define to 1 if internal poll should be used. */<br> #undef AST_POLL_COMPAT<br> <br>+/* Define to enable XML documentation. */<br>+#undef AST_XML_DOCS<br>+<br> /* Define to 1 if your system's implementation of mutexes supports comparison<br>    of a mutex to its initializer. */<br> #undef CAN_COMPARE_MUTEX_TO_INIT_VALUE<br>diff --git a/include/asterisk/xml.h b/include/asterisk/xml.h<br>index 063e8c0..ab7b630 100644<br>--- a/include/asterisk/xml.h<br>+++ b/include/asterisk/xml.h<br>@@ -246,10 +246,5 @@<br>  */<br> struct ast_xml_xpath_results *ast_xml_query(struct ast_xml_doc *doc, const char *xpath_str);<br> <br>-/* Features using ast_xml_ */<br>-#ifdef HAVE_LIBXML2<br>-#define AST_XML_DOCS<br>-#endif<br>-<br> #endif /* _ASTERISK_XML_H */<br> <br>diff --git a/main/config_options.c b/main/config_options.c<br>index 8eacbda..3c0959e 100644<br>--- a/main/config_options.c<br>+++ b/main/config_options.c<br>@@ -80,7 +80,6 @@<br> <br> #ifdef AST_XML_DOCS<br> static struct ao2_container *xmldocs;<br>-#endif /* AST_XML_DOCS */<br> <br> /*! \brief Value of the aco_option_type enum as strings */<br> static char *aco_option_type_string[] = {<br>@@ -98,6 +97,7 @@<br>  "Unsigned Integer",   /* OPT_UINT_T, */<br>     "Boolean",                    /* OPT_YESNO_T, */<br> };<br>+#endif /* AST_XML_DOCS */<br> <br> void *aco_pending_config(struct aco_info *info)<br> {<br>diff --git a/main/manager.c b/main/manager.c<br>index 5c0b318..079dab7 100644<br>--- a/main/manager.c<br>+++ b/main/manager.c<br>@@ -1653,8 +1653,10 @@<br> /*! \brief list of hooks registered */<br> static AST_RWLIST_HEAD_STATIC(manager_hooks, manager_custom_hook);<br> <br>+#ifdef AST_XML_DOCS<br> /*! \brief A container of event documentation nodes */<br> static AO2_GLOBAL_OBJ_STATIC(event_docs);<br>+#endif<br> <br> static int __attribute__((format(printf, 9, 0))) __manager_event_sessions(<br>    struct ao2_container *sessions,<br>@@ -2305,7 +2307,9 @@<br>        return ret;<br> }<br> <br>+#ifdef AST_XML_DOCS<br> static void print_event_instance(struct ast_cli_args *a, struct ast_xml_doc_item *instance);<br>+#endif<br> <br> static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)<br> {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6877">change 6877</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6877"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ifac562340c09f80c83e0203de098fcac93bf8c44 </div>
<div style="display:none"> Gerrit-Change-Number: 6877 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>