[svn-commits] eliel: branch group/appdocsxml r151422 - /team/group/appdocsxml/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 21 18:22:38 CDT 2008


Author: eliel
Date: Tue Oct 21 18:22:37 2008
New Revision: 151422

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151422
Log:
Make libxml2 not a mandatory library, but warn the user if it is not installed asking
to run configure with option '--disable-xmldoc' or install libxml2 development package.

Modified:
    team/group/appdocsxml/configure
    team/group/appdocsxml/configure.ac

Modified: team/group/appdocsxml/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/configure.ac?view=diff&rev=151422&r1=151421&r2=151422
==============================================================================
--- team/group/appdocsxml/configure.ac (original)
+++ team/group/appdocsxml/configure.ac Tue Oct 21 18:22:37 2008
@@ -1249,10 +1249,27 @@
 
 AST_EXT_LIB_CHECK([LDAP], [ldap], [ldap_initialize], [ldap.h])
 
-AST_EXT_TOOL_CHECK([LIBXML2], [xml2], , ,
-[#include <libxml/tree.h>
-#include <libxml/parser.h>],
-[LIBXML_TEST_VERSION])
+AC_ARG_ENABLE([xmldoc],
+	[AS_HELP_STRING([--disable-xmldoc],
+		[Explicity disable XML documentation])],
+	[case "${enableval}" in
+		y|ye|yes) disable_xmldoc=no ;;
+		n|no)  disable_xmldoc=yes ;;
+		*) AC_MSG_ERROR(bad value ${enableval} for --disable-xmldoc)  ;;
+	esac], [disable_xmldoc=no])
+
+if test "${disable_xmldoc}" != "yes"; then
+	AST_EXT_TOOL_CHECK([LIBXML2], [xml2], , ,
+	[#include <libxml/tree.h>
+	#include <libxml/parser.h>],
+	[LIBXML_TEST_VERSION])
+	if test "${PBX_LIBXML2}" != 1; then
+		AC_MSG_NOTICE(*** XML documentation will not be available because the 'libxml2' development package is missing.)
+		AC_MSG_NOTICE(*** Please run the 'configure' script with the '--disable-xmldoc' parameter option)
+		AC_MSG_NOTICE(*** or install the 'libxml2' development package.)
+		exit 1
+	fi
+fi
 
 AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h])
 




More information about the svn-commits mailing list