<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18126">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">xml.c, config,c: Add stylesheets and variable list string parsing<br><br>Added functions to open, close, and apply XML Stylesheets<br>to XML documents. Although the presence of libxslt was already<br>being checked by configure, it was only happening if xmldoc was<br>enabled. Now it's checked regardless.<br><br>Added ability to parse a string consisting of comma separated<br>name/value pairs into an ast_variable list. The reverse of<br>ast_variable_list_join().<br><br>Change-Id: I1e1d149be22165a1fb8e88e2903a36bba1a6cf2e<br>---<br>M build_tools/menuselect-deps.in<br>M configure<br>M configure.ac<br>M include/asterisk/autoconfig.h.in<br>M include/asterisk/config.h<br>M include/asterisk/xml.h<br>M main/config.c<br>M main/xml.c<br>M tests/test_config.c<br>9 files changed, 667 insertions(+), 263 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/26/18126/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in</span><br><span>index 161c67b..f66d7bd 100644</span><br><span>--- a/build_tools/menuselect-deps.in</span><br><span>+++ b/build_tools/menuselect-deps.in</span><br><span>@@ -32,6 +32,7 @@</span><br><span> LDAP=@PBX_LDAP@</span><br><span> LIBEDIT=@PBX_LIBEDIT@</span><br><span> LIBXML2=@PBX_LIBXML2@</span><br><span style="color: hsl(120, 100%, 40%);">+LIBXSLT=@PBX_LIBXSLT@</span><br><span> XMLSTARLET=@PBX_XMLSTARLET@</span><br><span> BASH=@PBX_BASH@</span><br><span> LUA=@PBX_LUA@</span><br><span>diff --git a/configure b/configure</span><br><span>index ae2ebdc..833c9a9 100755</span><br><span>--- a/configure</span><br><span>+++ b/configure</span><br><span>@@ -706,6 +706,7 @@</span><br><span> LIBOBJS</span><br><span> PERMANENT_DLOPEN</span><br><span> DISABLE_XMLDOC</span><br><span style="color: hsl(120, 100%, 40%);">+CONFIG_LIBXSLT</span><br><span> CONFIG_LIBXML2</span><br><span> JANSSON_LIBS</span><br><span> JANSSON_CFLAGS</span><br><span>@@ -9398,8 +9399,8 @@</span><br><span> if test "x${PBX_OPENSSL}" != "x1" -a "${USE_OPENSSL}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl >= 1.1.0" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for openssl >= 1.1.0... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for OPENSSL... " >&6; }</span><br><span> </span><br><span> if test -n "$OPENSSL_CFLAGS"; then</span><br><span> pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"</span><br><span>@@ -9439,7 +9440,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -9460,7 +9461,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_OPENSSL=0</span><br><span>@@ -9489,8 +9490,8 @@</span><br><span> if test "x${PBX_OPENSSL}" != "x1" -a "${USE_OPENSSL}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl11" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for openssl11... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for OPENSSL... " >&6; }</span><br><span> </span><br><span> if test -n "$OPENSSL_CFLAGS"; then</span><br><span> pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"</span><br><span>@@ -9530,7 +9531,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -9551,7 +9552,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_OPENSSL=0</span><br><span>@@ -9585,8 +9586,8 @@</span><br><span> if test "x${PBX_OPENSSL}" != "x1" -a "${USE_OPENSSL}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for openssl... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for OPENSSL... " >&6; }</span><br><span> </span><br><span> if test -n "$OPENSSL_CFLAGS"; then</span><br><span> pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"</span><br><span>@@ -9626,7 +9627,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -9647,7 +9648,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_OPENSSL=0</span><br><span>@@ -14063,8 +14064,8 @@</span><br><span> if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libedit" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for libedit... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEDIT" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for LIBEDIT... " >&6; }</span><br><span> </span><br><span> if test -n "$LIBEDIT_CFLAGS"; then</span><br><span> pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS"</span><br><span>@@ -14104,7 +14105,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -14125,7 +14126,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_LIBEDIT=0</span><br><span>@@ -14523,8 +14524,8 @@</span><br><span> if test "x${PBX_JANSSON}" != "x1" -a "${USE_JANSSON}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jansson >= 2.11" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for jansson >= 2.11... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JANSSON" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for JANSSON... " >&6; }</span><br><span> </span><br><span> if test -n "$JANSSON_CFLAGS"; then</span><br><span> pkg_cv_JANSSON_CFLAGS="$JANSSON_CFLAGS"</span><br><span>@@ -14564,7 +14565,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -14585,7 +14586,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_JANSSON=0</span><br><span>@@ -14988,6 +14989,245 @@</span><br><span> fi</span><br><span> </span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if test "x${PBX_LIBXSLT}" != "x1" -a "${USE_LIBXSLT}" != "no"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ PBX_LIBXSLT=0</span><br><span style="color: hsl(120, 100%, 40%);">+ if test -n "$ac_tool_prefix"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ # Extract the first word of "${ac_tool_prefix}xslt-config", so it can be a program name with args.</span><br><span style="color: hsl(120, 100%, 40%);">+set dummy ${ac_tool_prefix}xslt-config; ac_word=$2</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for $ac_word... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+if ${ac_cv_path_CONFIG_LIBXSLT+:} false; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ $as_echo_n "(cached) " >&6</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ case $CONFIG_LIBXSLT in</span><br><span style="color: hsl(120, 100%, 40%);">+ [\\/]* | ?:[\\/]*)</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_cv_path_CONFIG_LIBXSLT="$CONFIG_LIBXSLT" # Let the user override the test with a path.</span><br><span style="color: hsl(120, 100%, 40%);">+ ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ *)</span><br><span style="color: hsl(120, 100%, 40%);">+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR</span><br><span style="color: hsl(120, 100%, 40%);">+as_dummy="${LIBXSLT_DIR}/bin:$PATH"</span><br><span style="color: hsl(120, 100%, 40%);">+for as_dir in $as_dummy</span><br><span style="color: hsl(120, 100%, 40%);">+do</span><br><span style="color: hsl(120, 100%, 40%);">+ IFS=$as_save_IFS</span><br><span style="color: hsl(120, 100%, 40%);">+ test -z "$as_dir" && as_dir=.</span><br><span style="color: hsl(120, 100%, 40%);">+ for ac_exec_ext in '' $ac_executable_extensions; do</span><br><span style="color: hsl(120, 100%, 40%);">+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_cv_path_CONFIG_LIBXSLT="$as_dir/$ac_word$ac_exec_ext"</span><br><span style="color: hsl(120, 100%, 40%);">+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ break 2</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+done</span><br><span style="color: hsl(120, 100%, 40%);">+ done</span><br><span style="color: hsl(120, 100%, 40%);">+IFS=$as_save_IFS</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ;;</span><br><span style="color: hsl(120, 100%, 40%);">+esac</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+CONFIG_LIBXSLT=$ac_cv_path_CONFIG_LIBXSLT</span><br><span style="color: hsl(120, 100%, 40%);">+if test -n "$CONFIG_LIBXSLT"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_LIBXSLT" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "$CONFIG_LIBXSLT" >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "no" >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+if test -z "$ac_cv_path_CONFIG_LIBXSLT"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_pt_CONFIG_LIBXSLT=$CONFIG_LIBXSLT</span><br><span style="color: hsl(120, 100%, 40%);">+ # Extract the first word of "xslt-config", so it can be a program name with args.</span><br><span style="color: hsl(120, 100%, 40%);">+set dummy xslt-config; ac_word=$2</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for $ac_word... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+if ${ac_cv_path_ac_pt_CONFIG_LIBXSLT+:} false; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ $as_echo_n "(cached) " >&6</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ case $ac_pt_CONFIG_LIBXSLT in</span><br><span style="color: hsl(120, 100%, 40%);">+ [\\/]* | ?:[\\/]*)</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_cv_path_ac_pt_CONFIG_LIBXSLT="$ac_pt_CONFIG_LIBXSLT" # Let the user override the test with a path.</span><br><span style="color: hsl(120, 100%, 40%);">+ ;;</span><br><span style="color: hsl(120, 100%, 40%);">+ *)</span><br><span style="color: hsl(120, 100%, 40%);">+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR</span><br><span style="color: hsl(120, 100%, 40%);">+as_dummy="${LIBXSLT_DIR}/bin:$PATH"</span><br><span style="color: hsl(120, 100%, 40%);">+for as_dir in $as_dummy</span><br><span style="color: hsl(120, 100%, 40%);">+do</span><br><span style="color: hsl(120, 100%, 40%);">+ IFS=$as_save_IFS</span><br><span style="color: hsl(120, 100%, 40%);">+ test -z "$as_dir" && as_dir=.</span><br><span style="color: hsl(120, 100%, 40%);">+ for ac_exec_ext in '' $ac_executable_extensions; do</span><br><span style="color: hsl(120, 100%, 40%);">+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_cv_path_ac_pt_CONFIG_LIBXSLT="$as_dir/$ac_word$ac_exec_ext"</span><br><span style="color: hsl(120, 100%, 40%);">+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ break 2</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+done</span><br><span style="color: hsl(120, 100%, 40%);">+ done</span><br><span style="color: hsl(120, 100%, 40%);">+IFS=$as_save_IFS</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ;;</span><br><span style="color: hsl(120, 100%, 40%);">+esac</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+ac_pt_CONFIG_LIBXSLT=$ac_cv_path_ac_pt_CONFIG_LIBXSLT</span><br><span style="color: hsl(120, 100%, 40%);">+if test -n "$ac_pt_CONFIG_LIBXSLT"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_LIBXSLT" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "$ac_pt_CONFIG_LIBXSLT" >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "no" >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "x$ac_pt_CONFIG_LIBXSLT" = x; then</span><br><span style="color: hsl(120, 100%, 40%);">+ CONFIG_LIBXSLT="No"</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ case $cross_compiling:$ac_tool_warned in</span><br><span style="color: hsl(120, 100%, 40%);">+yes:)</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}</span><br><span style="color: hsl(120, 100%, 40%);">+ac_tool_warned=yes ;;</span><br><span style="color: hsl(120, 100%, 40%);">+esac</span><br><span style="color: hsl(120, 100%, 40%);">+ CONFIG_LIBXSLT=$ac_pt_CONFIG_LIBXSLT</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ CONFIG_LIBXSLT="$ac_cv_path_CONFIG_LIBXSLT"</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if test ! "x${CONFIG_LIBXSLT}" = xNo; then</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_INCLUDE=$(${CONFIG_LIBXSLT} --cflags)</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_INCLUDE=$(echo ${LIBXSLT_INCLUDE} | $SED -e "s|-I|-I${LIBXSLT_DIR}|g" -e "s|-std=c99||g")</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_LIB=$(${CONFIG_LIBXSLT} --libs)</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_LIB=$(echo ${LIBXSLT_LIB} | $SED -e "s|-L|-L${LIBXSLT_DIR}|g")</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ saved_cppflags="${CPPFLAGS}"</span><br><span style="color: hsl(120, 100%, 40%);">+ CPPFLAGS="${CPPFLAGS} ${LIBXSLT_INCLUDE}"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ saved_libs="${LIBS}"</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBS=${LIBXSLT_LIB}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext</span><br><span style="color: hsl(120, 100%, 40%);">+/* end confdefs.h. */</span><br><span style="color: hsl(120, 100%, 40%);">+ #include <libxslt/xslt.h></span><br><span style="color: hsl(120, 100%, 40%);">+int</span><br><span style="color: hsl(120, 100%, 40%);">+main ()</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltInit();</span><br><span style="color: hsl(120, 100%, 40%);">+ ;</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+_ACEOF</span><br><span style="color: hsl(120, 100%, 40%);">+if ac_fn_c_try_link "$LINENO"; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ PBX_LIBXSLT=1</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "#define HAVE_LIBXSLT 1" >>confdefs.h</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+rm -f core conftest.err conftest.$ac_objext \</span><br><span style="color: hsl(120, 100%, 40%);">+ conftest$ac_exeext conftest.$ac_ext</span><br><span style="color: hsl(120, 100%, 40%);">+ CPPFLAGS="${saved_cppflags}"</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBS="${saved_libs}"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+if test "x${PBX_LIBXSLT_CLEANUP}" != "x1" -a "${USE_LIBXSLT_CLEANUP}" != "no"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ pbxlibdir=""</span><br><span style="color: hsl(120, 100%, 40%);">+ # if --with-LIBXSLT_CLEANUP=DIR has been specified, use it.</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "x${LIBXSLT_CLEANUP_DIR}" != "x"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ if test -d ${LIBXSLT_CLEANUP_DIR}/lib; then</span><br><span style="color: hsl(120, 100%, 40%);">+ pbxlibdir="-L${LIBXSLT_CLEANUP_DIR}/lib"</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ pbxlibdir="-L${LIBXSLT_CLEANUP_DIR}"</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"</span><br><span style="color: hsl(120, 100%, 40%);">+ CFLAGS="${CFLAGS} ${LIBXML2_INCLUDE}"</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ $as_echo_n "(cached) " >&6</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_check_lib_save_LIBS=$LIBS</span><br><span style="color: hsl(120, 100%, 40%);">+LIBS="-lxslt ${pbxlibdir} ${LIBXML2_LIB} $LIBS"</span><br><span style="color: hsl(120, 100%, 40%);">+cat confdefs.h - <<_ACEOF >conftest.$ac_ext</span><br><span style="color: hsl(120, 100%, 40%);">+/* end confdefs.h. */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* Override any GCC internal prototype to avoid an error.</span><br><span style="color: hsl(120, 100%, 40%);">+ Use char because int might match the return type of a GCC</span><br><span style="color: hsl(120, 100%, 40%);">+ builtin and then its argument prototype would still apply. */</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef __cplusplus</span><br><span style="color: hsl(120, 100%, 40%);">+extern "C"</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+char xsltCleanupGlobals ();</span><br><span style="color: hsl(120, 100%, 40%);">+int</span><br><span style="color: hsl(120, 100%, 40%);">+main ()</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+return xsltCleanupGlobals ();</span><br><span style="color: hsl(120, 100%, 40%);">+ ;</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+_ACEOF</span><br><span style="color: hsl(120, 100%, 40%);">+if ac_fn_c_try_link "$LINENO"; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_cv_lib_xslt_xsltCleanupGlobals=yes</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_cv_lib_xslt_xsltCleanupGlobals=no</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+rm -f core conftest.err conftest.$ac_objext \</span><br><span style="color: hsl(120, 100%, 40%);">+ conftest$ac_exeext conftest.$ac_ext</span><br><span style="color: hsl(120, 100%, 40%);">+LIBS=$ac_check_lib_save_LIBS</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_LIBXSLT_CLEANUP_FOUND=yes</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_LIBXSLT_CLEANUP_FOUND=no</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # now check for the header.</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "${AST_LIBXSLT_CLEANUP_FOUND}" = "yes"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_CLEANUP_LIB="${pbxlibdir} -lxslt ${LIBXML2_LIB}"</span><br><span style="color: hsl(120, 100%, 40%);">+ # if --with-LIBXSLT_CLEANUP=DIR has been specified, use it.</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "x${LIBXSLT_CLEANUP_DIR}" != "x"; then</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_CLEANUP_INCLUDE="-I${LIBXSLT_CLEANUP_DIR}/include"</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_CLEANUP_INCLUDE="${LIBXSLT_CLEANUP_INCLUDE} ${LIBXML2_INCLUDE}"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # check for the header</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"</span><br><span style="color: hsl(120, 100%, 40%);">+ CPPFLAGS="${CPPFLAGS} ${LIBXSLT_CLEANUP_INCLUDE}"</span><br><span style="color: hsl(120, 100%, 40%);">+ ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xsltInternals.h" "ac_cv_header_libxslt_xsltInternals_h" "$ac_includes_default"</span><br><span style="color: hsl(120, 100%, 40%);">+if test "x$ac_cv_header_libxslt_xsltInternals_h" = xyes; then :</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_CLEANUP_HEADER_FOUND=1</span><br><span style="color: hsl(120, 100%, 40%);">+else</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_CLEANUP_HEADER_FOUND=0</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if test "x${LIBXSLT_CLEANUP_HEADER_FOUND}" = "x0" ; then</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_CLEANUP_LIB=""</span><br><span style="color: hsl(120, 100%, 40%);">+ LIBXSLT_CLEANUP_INCLUDE=""</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ PBX_LIBXSLT_CLEANUP=1</span><br><span style="color: hsl(120, 100%, 40%);">+ cat >>confdefs.h <<_ACEOF</span><br><span style="color: hsl(120, 100%, 40%);">+#define HAVE_LIBXSLT_CLEANUP 1</span><br><span style="color: hsl(120, 100%, 40%);">+_ACEOF</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if test "x${PBX_URIPARSER}" != "x1" -a "${USE_URIPARSER}" != "no"; then</span><br><span> pbxlibdir=""</span><br><span> # if --with-URIPARSER=DIR has been specified, use it.</span><br><span>@@ -15103,198 +15343,6 @@</span><br><span> $as_echo "#define AST_XML_DOCS 1" >>confdefs.h</span><br><span> </span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-if test "x${PBX_LIBXSLT}" != "x1" -a "${USE_LIBXSLT}" != "no"; then</span><br><span style="color: hsl(0, 100%, 40%);">- pbxlibdir=""</span><br><span style="color: hsl(0, 100%, 40%);">- # if --with-LIBXSLT=DIR has been specified, use it.</span><br><span style="color: hsl(0, 100%, 40%);">- if test "x${LIBXSLT_DIR}" != "x"; then</span><br><span style="color: hsl(0, 100%, 40%);">- if test -d ${LIBXSLT_DIR}/lib; then</span><br><span style="color: hsl(0, 100%, 40%);">- pbxlibdir="-L${LIBXSLT_DIR}/lib"</span><br><span style="color: hsl(0, 100%, 40%);">- else</span><br><span style="color: hsl(0, 100%, 40%);">- pbxlibdir="-L${LIBXSLT_DIR}"</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- ast_ext_lib_check_save_CFLAGS="${CFLAGS}"</span><br><span style="color: hsl(0, 100%, 40%);">- CFLAGS="${CFLAGS} ${LIBXML2_INCLUDE}"</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltLoadStylesheetPI in -lxslt" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for xsltLoadStylesheetPI in -lxslt... " >&6; }</span><br><span style="color: hsl(0, 100%, 40%);">-if ${ac_cv_lib_xslt_xsltLoadStylesheetPI+:} false; then :</span><br><span style="color: hsl(0, 100%, 40%);">- $as_echo_n "(cached) " >&6</span><br><span style="color: hsl(0, 100%, 40%);">-else</span><br><span style="color: hsl(0, 100%, 40%);">- ac_check_lib_save_LIBS=$LIBS</span><br><span style="color: hsl(0, 100%, 40%);">-LIBS="-lxslt ${pbxlibdir} ${LIBXML2_LIB} $LIBS"</span><br><span style="color: hsl(0, 100%, 40%);">-cat confdefs.h - <<_ACEOF >conftest.$ac_ext</span><br><span style="color: hsl(0, 100%, 40%);">-/* end confdefs.h. */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/* Override any GCC internal prototype to avoid an error.</span><br><span style="color: hsl(0, 100%, 40%);">- Use char because int might match the return type of a GCC</span><br><span style="color: hsl(0, 100%, 40%);">- builtin and then its argument prototype would still apply. */</span><br><span style="color: hsl(0, 100%, 40%);">-#ifdef __cplusplus</span><br><span style="color: hsl(0, 100%, 40%);">-extern "C"</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(0, 100%, 40%);">-char xsltLoadStylesheetPI ();</span><br><span style="color: hsl(0, 100%, 40%);">-int</span><br><span style="color: hsl(0, 100%, 40%);">-main ()</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-return xsltLoadStylesheetPI ();</span><br><span style="color: hsl(0, 100%, 40%);">- ;</span><br><span style="color: hsl(0, 100%, 40%);">- return 0;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-_ACEOF</span><br><span style="color: hsl(0, 100%, 40%);">-if ac_fn_c_try_link "$LINENO"; then :</span><br><span style="color: hsl(0, 100%, 40%);">- ac_cv_lib_xslt_xsltLoadStylesheetPI=yes</span><br><span style="color: hsl(0, 100%, 40%);">-else</span><br><span style="color: hsl(0, 100%, 40%);">- ac_cv_lib_xslt_xsltLoadStylesheetPI=no</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-rm -f core conftest.err conftest.$ac_objext \</span><br><span style="color: hsl(0, 100%, 40%);">- conftest$ac_exeext conftest.$ac_ext</span><br><span style="color: hsl(0, 100%, 40%);">-LIBS=$ac_check_lib_save_LIBS</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltLoadStylesheetPI" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo "$ac_cv_lib_xslt_xsltLoadStylesheetPI" >&6; }</span><br><span style="color: hsl(0, 100%, 40%);">-if test "x$ac_cv_lib_xslt_xsltLoadStylesheetPI" = xyes; then :</span><br><span style="color: hsl(0, 100%, 40%);">- AST_LIBXSLT_FOUND=yes</span><br><span style="color: hsl(0, 100%, 40%);">-else</span><br><span style="color: hsl(0, 100%, 40%);">- AST_LIBXSLT_FOUND=no</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- CFLAGS="${ast_ext_lib_check_save_CFLAGS}"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- # now check for the header.</span><br><span style="color: hsl(0, 100%, 40%);">- if test "${AST_LIBXSLT_FOUND}" = "yes"; then</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_LIB="${pbxlibdir} -lxslt ${LIBXML2_LIB}"</span><br><span style="color: hsl(0, 100%, 40%);">- # if --with-LIBXSLT=DIR has been specified, use it.</span><br><span style="color: hsl(0, 100%, 40%);">- if test "x${LIBXSLT_DIR}" != "x"; then</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_INCLUDE="-I${LIBXSLT_DIR}/include"</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_INCLUDE="${LIBXSLT_INCLUDE} ${LIBXML2_INCLUDE}"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- # check for the header</span><br><span style="color: hsl(0, 100%, 40%);">- ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"</span><br><span style="color: hsl(0, 100%, 40%);">- CPPFLAGS="${CPPFLAGS} ${LIBXSLT_INCLUDE}"</span><br><span style="color: hsl(0, 100%, 40%);">- ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xsltInternals.h" "ac_cv_header_libxslt_xsltInternals_h" "$ac_includes_default"</span><br><span style="color: hsl(0, 100%, 40%);">-if test "x$ac_cv_header_libxslt_xsltInternals_h" = xyes; then :</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_HEADER_FOUND=1</span><br><span style="color: hsl(0, 100%, 40%);">-else</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_HEADER_FOUND=0</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- if test "x${LIBXSLT_HEADER_FOUND}" = "x0" ; then</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_LIB=""</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_INCLUDE=""</span><br><span style="color: hsl(0, 100%, 40%);">- else</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- PBX_LIBXSLT=1</span><br><span style="color: hsl(0, 100%, 40%);">- cat >>confdefs.h <<_ACEOF</span><br><span style="color: hsl(0, 100%, 40%);">-#define HAVE_LIBXSLT 1</span><br><span style="color: hsl(0, 100%, 40%);">-_ACEOF</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-if test "x${PBX_LIBXSLT_CLEANUP}" != "x1" -a "${USE_LIBXSLT_CLEANUP}" != "no"; then</span><br><span style="color: hsl(0, 100%, 40%);">- pbxlibdir=""</span><br><span style="color: hsl(0, 100%, 40%);">- # if --with-LIBXSLT_CLEANUP=DIR has been specified, use it.</span><br><span style="color: hsl(0, 100%, 40%);">- if test "x${LIBXSLT_CLEANUP_DIR}" != "x"; then</span><br><span style="color: hsl(0, 100%, 40%);">- if test -d ${LIBXSLT_CLEANUP_DIR}/lib; then</span><br><span style="color: hsl(0, 100%, 40%);">- pbxlibdir="-L${LIBXSLT_CLEANUP_DIR}/lib"</span><br><span style="color: hsl(0, 100%, 40%);">- else</span><br><span style="color: hsl(0, 100%, 40%);">- pbxlibdir="-L${LIBXSLT_CLEANUP_DIR}"</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- ast_ext_lib_check_save_CFLAGS="${CFLAGS}"</span><br><span style="color: hsl(0, 100%, 40%);">- CFLAGS="${CFLAGS} ${LIBXML2_INCLUDE}"</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }</span><br><span style="color: hsl(0, 100%, 40%);">-if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :</span><br><span style="color: hsl(0, 100%, 40%);">- $as_echo_n "(cached) " >&6</span><br><span style="color: hsl(0, 100%, 40%);">-else</span><br><span style="color: hsl(0, 100%, 40%);">- ac_check_lib_save_LIBS=$LIBS</span><br><span style="color: hsl(0, 100%, 40%);">-LIBS="-lxslt ${pbxlibdir} ${LIBXML2_LIB} $LIBS"</span><br><span style="color: hsl(0, 100%, 40%);">-cat confdefs.h - <<_ACEOF >conftest.$ac_ext</span><br><span style="color: hsl(0, 100%, 40%);">-/* end confdefs.h. */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/* Override any GCC internal prototype to avoid an error.</span><br><span style="color: hsl(0, 100%, 40%);">- Use char because int might match the return type of a GCC</span><br><span style="color: hsl(0, 100%, 40%);">- builtin and then its argument prototype would still apply. */</span><br><span style="color: hsl(0, 100%, 40%);">-#ifdef __cplusplus</span><br><span style="color: hsl(0, 100%, 40%);">-extern "C"</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(0, 100%, 40%);">-char xsltCleanupGlobals ();</span><br><span style="color: hsl(0, 100%, 40%);">-int</span><br><span style="color: hsl(0, 100%, 40%);">-main ()</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-return xsltCleanupGlobals ();</span><br><span style="color: hsl(0, 100%, 40%);">- ;</span><br><span style="color: hsl(0, 100%, 40%);">- return 0;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-_ACEOF</span><br><span style="color: hsl(0, 100%, 40%);">-if ac_fn_c_try_link "$LINENO"; then :</span><br><span style="color: hsl(0, 100%, 40%);">- ac_cv_lib_xslt_xsltCleanupGlobals=yes</span><br><span style="color: hsl(0, 100%, 40%);">-else</span><br><span style="color: hsl(0, 100%, 40%);">- ac_cv_lib_xslt_xsltCleanupGlobals=no</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-rm -f core conftest.err conftest.$ac_objext \</span><br><span style="color: hsl(0, 100%, 40%);">- conftest$ac_exeext conftest.$ac_ext</span><br><span style="color: hsl(0, 100%, 40%);">-LIBS=$ac_check_lib_save_LIBS</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }</span><br><span style="color: hsl(0, 100%, 40%);">-if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :</span><br><span style="color: hsl(0, 100%, 40%);">- AST_LIBXSLT_CLEANUP_FOUND=yes</span><br><span style="color: hsl(0, 100%, 40%);">-else</span><br><span style="color: hsl(0, 100%, 40%);">- AST_LIBXSLT_CLEANUP_FOUND=no</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- CFLAGS="${ast_ext_lib_check_save_CFLAGS}"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- # now check for the header.</span><br><span style="color: hsl(0, 100%, 40%);">- if test "${AST_LIBXSLT_CLEANUP_FOUND}" = "yes"; then</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_CLEANUP_LIB="${pbxlibdir} -lxslt ${LIBXML2_LIB}"</span><br><span style="color: hsl(0, 100%, 40%);">- # if --with-LIBXSLT_CLEANUP=DIR has been specified, use it.</span><br><span style="color: hsl(0, 100%, 40%);">- if test "x${LIBXSLT_CLEANUP_DIR}" != "x"; then</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_CLEANUP_INCLUDE="-I${LIBXSLT_CLEANUP_DIR}/include"</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_CLEANUP_INCLUDE="${LIBXSLT_CLEANUP_INCLUDE} ${LIBXML2_INCLUDE}"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- # check for the header</span><br><span style="color: hsl(0, 100%, 40%);">- ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"</span><br><span style="color: hsl(0, 100%, 40%);">- CPPFLAGS="${CPPFLAGS} ${LIBXSLT_CLEANUP_INCLUDE}"</span><br><span style="color: hsl(0, 100%, 40%);">- ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xsltInternals.h" "ac_cv_header_libxslt_xsltInternals_h" "$ac_includes_default"</span><br><span style="color: hsl(0, 100%, 40%);">-if test "x$ac_cv_header_libxslt_xsltInternals_h" = xyes; then :</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_CLEANUP_HEADER_FOUND=1</span><br><span style="color: hsl(0, 100%, 40%);">-else</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_CLEANUP_HEADER_FOUND=0</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- if test "x${LIBXSLT_CLEANUP_HEADER_FOUND}" = "x0" ; then</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_CLEANUP_LIB=""</span><br><span style="color: hsl(0, 100%, 40%);">- LIBXSLT_CLEANUP_INCLUDE=""</span><br><span style="color: hsl(0, 100%, 40%);">- else</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- PBX_LIBXSLT_CLEANUP=1</span><br><span style="color: hsl(0, 100%, 40%);">- cat >>confdefs.h <<_ACEOF</span><br><span style="color: hsl(0, 100%, 40%);">-#define HAVE_LIBXSLT_CLEANUP 1</span><br><span style="color: hsl(0, 100%, 40%);">-_ACEOF</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">- fi</span><br><span style="color: hsl(0, 100%, 40%);">-fi</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> fi</span><br><span> </span><br><span> # Check whether --enable-permanent-dlopen was given.</span><br><span>@@ -15380,7 +15428,7 @@</span><br><span> We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span> since some C++ compilers masquerading as C compilers</span><br><span> incorrectly reject 9223372036854775807. */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span> && LARGE_OFF_T % 2147483647 == 1)</span><br><span> ? 1 : -1];</span><br><span>@@ -15426,7 +15474,7 @@</span><br><span> We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span> since some C++ compilers masquerading as C compilers</span><br><span> incorrectly reject 9223372036854775807. */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span> && LARGE_OFF_T % 2147483647 == 1)</span><br><span> ? 1 : -1];</span><br><span>@@ -15450,7 +15498,7 @@</span><br><span> We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span> since some C++ compilers masquerading as C compilers</span><br><span> incorrectly reject 9223372036854775807. */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span> && LARGE_OFF_T % 2147483647 == 1)</span><br><span> ? 1 : -1];</span><br><span>@@ -15495,7 +15543,7 @@</span><br><span> We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span> since some C++ compilers masquerading as C compilers</span><br><span> incorrectly reject 9223372036854775807. */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span> && LARGE_OFF_T % 2147483647 == 1)</span><br><span> ? 1 : -1];</span><br><span>@@ -15519,7 +15567,7 @@</span><br><span> We can't simply define LARGE_OFF_T to be 9223372036854775807,</span><br><span> since some C++ compilers masquerading as C compilers</span><br><span> incorrectly reject 9223372036854775807. */</span><br><span style="color: hsl(0, 100%, 40%);">-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))</span><br><span style="color: hsl(120, 100%, 40%);">+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))</span><br><span> int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721</span><br><span> && LARGE_OFF_T % 2147483647 == 1)</span><br><span> ? 1 : -1];</span><br><span>@@ -16819,8 +16867,6 @@</span><br><span> if (*(data + i) != *(data3 + i))</span><br><span> return 14;</span><br><span> close (fd);</span><br><span style="color: hsl(0, 100%, 40%);">- free (data);</span><br><span style="color: hsl(0, 100%, 40%);">- free (data3);</span><br><span> return 0;</span><br><span> }</span><br><span> _ACEOF</span><br><span>@@ -21247,8 +21293,8 @@</span><br><span> if test "x${PBX_ILBC}" != "x1" -a "${USE_ILBC}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libilbc" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for libilbc... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ILBC" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for ILBC... " >&6; }</span><br><span> </span><br><span> if test -n "$ILBC_CFLAGS"; then</span><br><span> pkg_cv_ILBC_CFLAGS="$ILBC_CFLAGS"</span><br><span>@@ -21288,7 +21334,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -21309,7 +21355,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_ILBC=0</span><br><span>@@ -23968,8 +24014,8 @@</span><br><span> if test "x${PBX_NETSNMP}" != "x1" -a "${USE_NETSNMP}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for netsnmp-agent" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for netsnmp-agent... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NETSNMP" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for NETSNMP... " >&6; }</span><br><span> </span><br><span> if test -n "$NETSNMP_CFLAGS"; then</span><br><span> pkg_cv_NETSNMP_CFLAGS="$NETSNMP_CFLAGS"</span><br><span>@@ -24009,7 +24055,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -24030,7 +24076,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_NETSNMP=0</span><br><span>@@ -25576,8 +25622,8 @@</span><br><span> if test "x${PBX_PJPROJECT}" != "x1" -a "${USE_PJPROJECT}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpjproject" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for libpjproject... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PJPROJECT" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for PJPROJECT... " >&6; }</span><br><span> </span><br><span> if test -n "$PJPROJECT_CFLAGS"; then</span><br><span> pkg_cv_PJPROJECT_CFLAGS="$PJPROJECT_CFLAGS"</span><br><span>@@ -25617,7 +25663,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -25638,7 +25684,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_PJPROJECT=0</span><br><span>@@ -26749,8 +26795,8 @@</span><br><span> if test "x${PBX_PYTHONDEV}" != "x1" -a "${USE_PYTHONDEV}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python-2.7" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for python-2.7... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHONDEV" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for PYTHONDEV... " >&6; }</span><br><span> </span><br><span> if test -n "$PYTHONDEV_CFLAGS"; then</span><br><span> pkg_cv_PYTHONDEV_CFLAGS="$PYTHONDEV_CFLAGS"</span><br><span>@@ -26790,7 +26836,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -26811,7 +26857,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_PYTHONDEV=0</span><br><span>@@ -26837,8 +26883,8 @@</span><br><span> if test "x${PBX_PYTHONDEV}" != "x1" -a "${USE_PYTHONDEV}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python2" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for python2... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHONDEV" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for PYTHONDEV... " >&6; }</span><br><span> </span><br><span> if test -n "$PYTHONDEV_CFLAGS"; then</span><br><span> pkg_cv_PYTHONDEV_CFLAGS="$PYTHONDEV_CFLAGS"</span><br><span>@@ -26878,7 +26924,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -26899,7 +26945,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_PYTHONDEV=0</span><br><span>@@ -26925,8 +26971,8 @@</span><br><span> if test "x${PBX_PYTHONDEV}" != "x1" -a "${USE_PYTHONDEV}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for python... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHONDEV" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for PYTHONDEV... " >&6; }</span><br><span> </span><br><span> if test -n "$PYTHONDEV_CFLAGS"; then</span><br><span> pkg_cv_PYTHONDEV_CFLAGS="$PYTHONDEV_CFLAGS"</span><br><span>@@ -26966,7 +27012,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -26987,7 +27033,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_PYTHONDEV=0</span><br><span>@@ -27121,8 +27167,8 @@</span><br><span> if test "x${PBX_PORTAUDIO}" != "x1" -a "${USE_PORTAUDIO}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for portaudio-2.0" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for portaudio-2.0... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PORTAUDIO" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for PORTAUDIO... " >&6; }</span><br><span> </span><br><span> if test -n "$PORTAUDIO_CFLAGS"; then</span><br><span> pkg_cv_PORTAUDIO_CFLAGS="$PORTAUDIO_CFLAGS"</span><br><span>@@ -27162,7 +27208,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -27183,7 +27229,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_PORTAUDIO=0</span><br><span>@@ -33132,8 +33178,8 @@</span><br><span> if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gmime-$ver" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for gmime-$ver... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMIME" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for GMIME... " >&6; }</span><br><span> </span><br><span> if test -n "$GMIME_CFLAGS"; then</span><br><span> pkg_cv_GMIME_CFLAGS="$GMIME_CFLAGS"</span><br><span>@@ -33173,7 +33219,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -33194,7 +33240,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_GMIME=0</span><br><span>@@ -34569,8 +34615,8 @@</span><br><span> if test "x${PBX_GTK2}" != "x1" -a "${USE_GTK2}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for gtk+-2.0... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for GTK2... " >&6; }</span><br><span> </span><br><span> if test -n "$GTK2_CFLAGS"; then</span><br><span> pkg_cv_GTK2_CFLAGS="$GTK2_CFLAGS"</span><br><span>@@ -34610,7 +34656,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -34631,7 +34677,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_GTK2=0</span><br><span>@@ -34680,8 +34726,8 @@</span><br><span> if test "x${PBX_SYSTEMD}" != "x1" -a "${USE_SYSTEMD}" != "no"; then</span><br><span> </span><br><span> pkg_failed=no</span><br><span style="color: hsl(0, 100%, 40%);">-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5</span><br><span style="color: hsl(0, 100%, 40%);">-$as_echo_n "checking for libsystemd... " >&6; }</span><br><span style="color: hsl(120, 100%, 40%);">+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+$as_echo_n "checking for SYSTEMD... " >&6; }</span><br><span> </span><br><span> if test -n "$SYSTEMD_CFLAGS"; then</span><br><span> pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"</span><br><span>@@ -34721,7 +34767,7 @@</span><br><span> </span><br><span> </span><br><span> if test $pkg_failed = yes; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then</span><br><span>@@ -34742,7 +34788,7 @@</span><br><span> </span><br><span> </span><br><span> elif test $pkg_failed = untried; then</span><br><span style="color: hsl(0, 100%, 40%);">- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span style="color: hsl(120, 100%, 40%);">+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5</span><br><span> $as_echo "no" >&6; }</span><br><span> </span><br><span> PBX_SYSTEMD=0</span><br><span>diff --git a/configure.ac b/configure.ac</span><br><span>index efbf306..535efa8 100644</span><br><span>--- a/configure.ac</span><br><span>+++ b/configure.ac</span><br><span>@@ -753,6 +753,12 @@</span><br><span> exit 1</span><br><span> fi</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+AST_EXT_TOOL_CHECK([LIBXSLT], [xslt-config], , ,</span><br><span style="color: hsl(120, 100%, 40%);">+ [#include <libxslt/xslt.h>],</span><br><span style="color: hsl(120, 100%, 40%);">+ [xsltInit()])</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AST_EXT_LIB_CHECK([LIBXSLT_CLEANUP], [xslt], [xsltCleanupGlobals], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> AST_EXT_LIB_CHECK([URIPARSER], [uriparser], [uriParseUriA], [uriparser/Uri.h])</span><br><span> </span><br><span> # Another mandatory item (unless it's explicitly disabled)</span><br><span>@@ -768,8 +774,6 @@</span><br><span> AC_SUBST([DISABLE_XMLDOC])</span><br><span> if test "${DISABLE_XMLDOC}" != "yes"; then</span><br><span> AC_DEFINE([AST_XML_DOCS], 1, [Define to enable XML documentation.])</span><br><span style="color: hsl(0, 100%, 40%);">- AST_EXT_LIB_CHECK([LIBXSLT], [xslt], [xsltLoadStylesheetPI], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])</span><br><span style="color: hsl(0, 100%, 40%);">- AST_EXT_LIB_CHECK([LIBXSLT_CLEANUP], [xslt], [xsltCleanupGlobals], [libxslt/xsltInternals.h], [${LIBXML2_LIB}], [${LIBXML2_INCLUDE}])</span><br><span> </span><br><span> fi</span><br><span> </span><br><span>diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in</span><br><span>index 1ff4ae7..3debcc8 100644</span><br><span>--- a/include/asterisk/autoconfig.h.in</span><br><span>+++ b/include/asterisk/autoconfig.h.in</span><br><span>@@ -444,7 +444,7 @@</span><br><span> /* Define if your system has the LIBXML2 libraries. */</span><br><span> #undef HAVE_LIBXML2</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* Define to 1 if you have the LibXSLT library. */</span><br><span style="color: hsl(120, 100%, 40%);">+/* Define if your system has the LIBXSLT libraries. */</span><br><span> #undef HAVE_LIBXSLT</span><br><span> </span><br><span> /* Define to 1 if LIBXSLT has the LibXSLT Library Cleanup Function feature. */</span><br><span>diff --git a/include/asterisk/config.h b/include/asterisk/config.h</span><br><span>index f4f6c9d..afac229 100644</span><br><span>--- a/include/asterisk/config.h</span><br><span>+++ b/include/asterisk/config.h</span><br><span>@@ -1006,6 +1006,23 @@</span><br><span> const char *name_value_separator, const char *quote_char, struct ast_str **str);</span><br><span> </span><br><span> /*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Parse a string into an ast_variable list. The reverse of ast_variable_list_join</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param input The name-value pair string to parse.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param item_separator The string used to separate the list items.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Only the first character in the string will be used.</span><br><span style="color: hsl(120, 100%, 40%);">+ * If NULL, "," will be used.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param name_value_separator The string used to separate each item's name and value.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Only the first character in the string will be used.</span><br><span style="color: hsl(120, 100%, 40%);">+ * If NULL, "=" will be used.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval A pointer to a list of ast_variables.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval NULL if there was an error or no variables could be parsed.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_variable *ast_variable_list_from_string(const char *input, const char *item_separator,</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *name_value_separator);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span> * \brief Update variable value within a config</span><br><span> *</span><br><span> * \param category Category element within the config</span><br><span>diff --git a/include/asterisk/xml.h b/include/asterisk/xml.h</span><br><span>index 13af3c6..9d43560 100644</span><br><span>--- a/include/asterisk/xml.h</span><br><span>+++ b/include/asterisk/xml.h</span><br><span>@@ -21,9 +21,12 @@</span><br><span> * \brief Asterisk XML abstraction layer</span><br><span> */</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#include "asterisk/vector.h"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> struct ast_xml_node;</span><br><span> struct ast_xml_doc;</span><br><span> struct ast_xml_xpath_results;</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xslt_doc;</span><br><span> </span><br><span> /*!</span><br><span> * \brief Initialize the XML library implementation.</span><br><span>@@ -184,6 +187,19 @@</span><br><span> */</span><br><span> struct ast_xml_node *ast_xml_find_element(struct ast_xml_node *root_node, const char *name, const char *attrname, const char *attrvalue);</span><br><span> struct ast_xml_ns *ast_xml_find_namespace(struct ast_xml_doc *doc, struct ast_xml_node *node, const char *ns_name);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Get the prefix of a namespace.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param ns The namespace</span><br><span style="color: hsl(120, 100%, 40%);">+ * \return The prefix of the namespace.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+const char *ast_xml_get_ns_prefix(struct ast_xml_ns *ns);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Get the href of a namespace.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param ns The namespace</span><br><span style="color: hsl(120, 100%, 40%);">+ * \return The href of the namespace.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span> const char *ast_xml_get_ns_href(struct ast_xml_ns *ns);</span><br><span> </span><br><span> /*!</span><br><span>@@ -260,6 +276,15 @@</span><br><span> struct ast_xml_node *ast_xml_xpath_get_first_result(struct ast_xml_xpath_results *results);</span><br><span> </span><br><span> /*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Return a specific result node of an XPath query</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param results The XPath results object to get the result from</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param n The index of the result to get</span><br><span style="color: hsl(120, 100%, 40%);">+ * \return The nth result in the XPath object on success</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval NULL on error</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xml_node *ast_xml_xpath_get_result(struct ast_xml_xpath_results *results, int n);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span> * \brief Execute an XPath query on an XML document</span><br><span> * \param doc XML document to query</span><br><span> * \param xpath_str The XPath query string to execute on the document</span><br><span>@@ -270,4 +295,80 @@</span><br><span> */</span><br><span> struct ast_xml_xpath_results *ast_xml_query(struct ast_xml_doc *doc, const char *xpath_str);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Namespace definition</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xml_namespace_def {</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *prefix;</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *href;</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AST_VECTOR(ast_xml_namespace_def_vector, struct ast_xml_namespace_def);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Execute an XPath query on an XML document with namespaces</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param doc XML document to query</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param xpath_str The XPath query string to execute on the document</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param namespaces A vector of ast_xml_namespace structures (not pointers)</span><br><span style="color: hsl(120, 100%, 40%);">+ * \return An object containing the results of the XPath query on success</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval NULL on failure</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xml_xpath_results *ast_xml_query_with_namespaces(struct ast_xml_doc *doc, const char *xpath_str,</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_xml_namespace_def_vector *namespaces);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef HAVE_LIBXSLT</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*! \brief Open an XSLT document that resides in memory.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param buffer The address where the stylesheet is stored</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param size The number of bytes in the stylesheet</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \return The stylesheet document. Must be closed with ast_xslt_close().</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xslt_doc *ast_xslt_read_memory(char *buffer, size_t size);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Open an XSLT document.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param filename stylesheet path.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \return The stylesheet document. Must be closed with ast_xslt_close().</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xslt_doc *ast_xslt_open(char *filename);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Close a stylesheet document and free its resources.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param xslt XSLT stylesheet to close</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+void ast_xslt_close(struct ast_xslt_doc *xslt);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Apply an XSLT stylesheet to an XML document</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param xslt XSLT stylesheet to apply.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param xml XML document the stylesheet will be applied to.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param params An array of name value pairs to pass as parameters</span><br><span style="color: hsl(120, 100%, 40%);">+ * The array must terminate with a NULL sentinel.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Example: { "name1", "value1", "name2", "value2", NULL }</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \return A pointer to the result document which must be freed with ast_xml_close()</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xml_doc *ast_xslt_apply(struct ast_xslt_doc *xslt, struct ast_xml_doc *doc, const char **params);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Save the results of applying a stylesheet to a string</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param buffer[out] A pointer to a char * to receive the address of the result string.</span><br><span style="color: hsl(120, 100%, 40%);">+ * The buffer must be freed with ast_xml_free_text().</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param length[out] A pointer to an int to receive the result string length.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param result The result document from ast_xslt_apply.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param xslt The stylesheet that was applied.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \return 0 on success, any other value on failure.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+int ast_xslt_save_result_to_string(char **buffer, int *length, struct ast_xml_doc *result,</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_xslt_doc *xslt);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* HAVE_LIBXSLT */</span><br><span> #endif /* _ASTERISK_XML_H */</span><br><span>diff --git a/main/config.c b/main/config.c</span><br><span>index 92a24de..122e7aa 100644</span><br><span>--- a/main/config.c</span><br><span>+++ b/main/config.c</span><br><span>@@ -722,6 +722,39 @@</span><br><span> return local_str;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_variable *ast_variable_list_from_string(const char *input, const char *item_separator,</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *name_value_separator)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ char item_sep;</span><br><span style="color: hsl(120, 100%, 40%);">+ char nv_sep;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_variable *new_list = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_variable *new_var = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ char *item_string;</span><br><span style="color: hsl(120, 100%, 40%);">+ char *item;</span><br><span style="color: hsl(120, 100%, 40%);">+ char *item_name;</span><br><span style="color: hsl(120, 100%, 40%);">+ char *item_value;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_strlen_zero(input)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ item_sep = ast_strlen_zero(item_separator) ? ',' : item_separator[0];</span><br><span style="color: hsl(120, 100%, 40%);">+ nv_sep = ast_strlen_zero(name_value_separator) ? '=' : name_value_separator[0];</span><br><span style="color: hsl(120, 100%, 40%);">+ item_string = ast_strip(ast_strdupa(input));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ while ((item = ast_strsep(&item_string, item_sep, AST_STRSEP_ALL))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ item_name = ast_strsep(&item, nv_sep, AST_STRSEP_ALL);</span><br><span style="color: hsl(120, 100%, 40%);">+ item_value = ast_strsep(&item, nv_sep, AST_STRSEP_ALL);</span><br><span style="color: hsl(120, 100%, 40%);">+ new_var = ast_variable_new(item_name, item_value, "");</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!new_var) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_variables_destroy(new_list);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_variable_list_append(&new_list, new_var);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ return new_list;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> const char *ast_config_option(struct ast_config *cfg, const char *cat, const char *var)</span><br><span> {</span><br><span> const char *tmp;</span><br><span>diff --git a/main/xml.c b/main/xml.c</span><br><span>index 88c9edf..987f125 100644</span><br><span>--- a/main/xml.c</span><br><span>+++ b/main/xml.c</span><br><span>@@ -36,25 +36,33 @@</span><br><span> #include <libxml/tree.h></span><br><span> #include <libxml/xinclude.h></span><br><span> #include <libxml/xpath.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <libxml/xpathInternals.h></span><br><span> /* libxml2 ast_xml implementation. */</span><br><span> #ifdef HAVE_LIBXSLT</span><br><span> #include <libxslt/xsltInternals.h></span><br><span> #include <libxslt/transform.h></span><br><span style="color: hsl(120, 100%, 40%);">+ #include <libxslt/xsltutils.h></span><br><span> #endif /* HAVE_LIBXSLT */</span><br><span> </span><br><span> </span><br><span> int ast_xml_init(void)</span><br><span> {</span><br><span> LIBXML_TEST_VERSION</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef HAVE_LIBXSLT</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltInit();</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> return 0;</span><br><span> }</span><br><span> </span><br><span> int ast_xml_finish(void)</span><br><span> {</span><br><span> xmlCleanupParser();</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef HAVE_LIBXSLT</span><br><span> #ifdef HAVE_LIBXSLT_CLEANUP</span><br><span> xsltCleanupGlobals();</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltUninit();</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> #endif</span><br><span> </span><br><span> return 0;</span><br><span>@@ -68,6 +76,8 @@</span><br><span> return NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ xmlSubstituteEntitiesDefault(1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> doc = xmlReadFile(filename, NULL, XML_PARSE_RECOVER);</span><br><span> if (!doc) {</span><br><span> return NULL;</span><br><span>@@ -309,6 +319,11 @@</span><br><span> return (struct ast_xml_ns *) ns;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+const char *ast_xml_get_ns_prefix(struct ast_xml_ns *ns)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ return (const char *) ((xmlNsPtr) ns)->prefix;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> const char *ast_xml_get_ns_href(struct ast_xml_ns *ns)</span><br><span> {</span><br><span> return (const char *) ((xmlNsPtr) ns)->href;</span><br><span>@@ -376,13 +391,24 @@</span><br><span> return (struct ast_xml_node *) ((xmlXPathObjectPtr) results)->nodesetval->nodeTab[0];</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xml_node *ast_xml_xpath_get_result(struct ast_xml_xpath_results *results, int i)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ return (struct ast_xml_node *) ((xmlXPathObjectPtr) results)->nodesetval->nodeTab[i];</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> void ast_xml_xpath_results_free(struct ast_xml_xpath_results *results)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!results) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> xmlXPathFreeObject((xmlXPathObjectPtr) results);</span><br><span> }</span><br><span> </span><br><span> int ast_xml_xpath_num_results(struct ast_xml_xpath_results *results)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!results) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> return ((xmlXPathObjectPtr) results)->nodesetval->nodeNr;</span><br><span> }</span><br><span> </span><br><span>@@ -408,4 +434,149 @@</span><br><span> return (struct ast_xml_xpath_results *) result;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xml_xpath_results *ast_xml_query_with_namespaces(struct ast_xml_doc *doc, const char *xpath_str,</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_xml_namespace_def_vector *namespaces)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlXPathContextPtr context;</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlXPathObjectPtr result;</span><br><span style="color: hsl(120, 100%, 40%);">+ int i;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!(context = xmlXPathNewContext((xmlDoc *) doc))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "Could not create XPath context!\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ for (i = 0; i < AST_VECTOR_SIZE(namespaces); i++) {</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_xml_namespace_def ns = AST_VECTOR_GET(namespaces, i);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (xmlXPathRegisterNs(context, (xmlChar *)ns.prefix,</span><br><span style="color: hsl(120, 100%, 40%);">+ (xmlChar *)ns.href) != 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlXPathFreeContext(context);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "Could not register namespace %s:%s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ ns.prefix, ns.href);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ result = xmlXPathEvalExpression((xmlChar *) xpath_str, context);</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlXPathFreeContext(context);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!result) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "Error for query: %s\n", xpath_str);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ if (xmlXPathNodeSetIsEmpty(result->nodesetval)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlXPathFreeObject(result);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(5, "No results for query: %s\n", xpath_str);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ return (struct ast_xml_xpath_results *) result;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#ifdef HAVE_LIBXSLT</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xslt_doc *ast_xslt_open(char *filename)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltStylesheet *xslt;</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlDoc *xml;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlSubstituteEntitiesDefault(1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ xml = xmlReadFile(filename, NULL, XML_PARSE_RECOVER);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!xml) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (xmlXIncludeProcess(xml) < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlFreeDoc(xml);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlXPathOrderDocElems(xml);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!(xslt = xsltParseStylesheetDoc(xml))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlFreeDoc(xml);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return (struct ast_xslt_doc *) xslt;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xslt_doc *ast_xslt_read_memory(char *buffer, size_t size)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltStylesheet *xslt;</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlDoc *doc;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!buffer) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlSubstituteEntitiesDefault(1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!(doc = xmlParseMemory(buffer, (int) size))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (xmlXIncludeProcess(doc) < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlFreeDoc(doc);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!(xslt = xsltParseStylesheetDoc(doc))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlFreeDoc(doc);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return (struct ast_xslt_doc *) xslt;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void ast_xslt_close(struct ast_xslt_doc *axslt)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!axslt) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltFreeStylesheet((xsltStylesheet *) axslt);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+struct ast_xml_doc *ast_xslt_apply(struct ast_xslt_doc *axslt, struct ast_xml_doc *axml, const char **params)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltStylesheet *xslt = (xsltStylesheet *)axslt;</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlDoc *xml = (xmlDoc *)axml;</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltTransformContextPtr ctxt;</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlNs *ns;</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlDoc *res;</span><br><span style="color: hsl(120, 100%, 40%);">+ int options = XSLT_PARSE_OPTIONS;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /*</span><br><span style="color: hsl(120, 100%, 40%);">+ * Normally we could just call xsltApplyStylesheet() without creating</span><br><span style="color: hsl(120, 100%, 40%);">+ * our own transform context but we need to pass parameters to it</span><br><span style="color: hsl(120, 100%, 40%);">+ * that have namespace prefixes and that's not supported. Instead</span><br><span style="color: hsl(120, 100%, 40%);">+ * we have to create a transform context, iterate over the namespace</span><br><span style="color: hsl(120, 100%, 40%);">+ * declarations in the stylesheet (not the incoming xml document),</span><br><span style="color: hsl(120, 100%, 40%);">+ * and add them to the transform context's xpath context.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * The alternative would be to pass the parameters with namespaces</span><br><span style="color: hsl(120, 100%, 40%);">+ * as text strings but that's not intuitive and results in much</span><br><span style="color: hsl(120, 100%, 40%);">+ * slower performance than adding the namespaces here.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+ ctxt = xsltNewTransformContext(xslt, xml);</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltSetCtxtParseOptions(ctxt, options);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ for (ns = xslt->doc->children->nsDef; ns; ns = ns->next) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (xmlXPathRegisterNs(ctxt->xpathCtxt, ns->prefix, ns->href) != 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ xmlXPathFreeContext(ctxt->xpathCtxt);</span><br><span style="color: hsl(120, 100%, 40%);">+ xsltFreeTransformContext(ctxt);</span><br><span style="color: hsl(120, 100%, 40%);">+ return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ res = xsltApplyStylesheetUser(xslt, xml, params, NULL, NULL, ctxt);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return (struct ast_xml_doc *)res;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+int ast_xslt_save_result_to_string(char **buffer, int *length, struct ast_xml_doc *result,</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_xslt_doc *axslt)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ return xsltSaveResultToString((xmlChar **)buffer, length, (xmlDoc *)result, (xsltStylesheet *)axslt);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* defined(HAVE_LIBXSLT) */</span><br><span> #endif /* defined(HAVE_LIBXML2) */</span><br><span>diff --git a/tests/test_config.c b/tests/test_config.c</span><br><span>index 5b44b44..1a0ddaf 100644</span><br><span>--- a/tests/test_config.c</span><br><span>+++ b/tests/test_config.c</span><br><span>@@ -1943,6 +1943,35 @@</span><br><span> </span><br><span> return AST_TEST_PASS;</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AST_TEST_DEFINE(variable_list_from_string)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ RAII_VAR(struct ast_variable *, list, NULL, ast_variables_destroy);</span><br><span style="color: hsl(120, 100%, 40%);">+ RAII_VAR(struct ast_str *, str, NULL, ast_free);</span><br><span style="color: hsl(120, 100%, 40%);">+ char *parse_string;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ switch (cmd) {</span><br><span style="color: hsl(120, 100%, 40%);">+ case TEST_INIT:</span><br><span style="color: hsl(120, 100%, 40%);">+ info->name = "variable_list_from_string";</span><br><span style="color: hsl(120, 100%, 40%);">+ info->category = "/main/config/";</span><br><span style="color: hsl(120, 100%, 40%);">+ info->summary = "Test parsing a string into a variable list";</span><br><span style="color: hsl(120, 100%, 40%);">+ info->description = info->summary;</span><br><span style="color: hsl(120, 100%, 40%);">+ return AST_TEST_NOT_RUN;</span><br><span style="color: hsl(120, 100%, 40%);">+ case TEST_EXECUTE:</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ parse_string = "abc = 'def', ghi = 'j,kl', mno='pq=r', stu = 'vwx=\"yz\", ABC = \"DEF\"'";</span><br><span style="color: hsl(120, 100%, 40%);">+ list = ast_variable_list_from_string(parse_string, ",", "=");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate(test, list != NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+ str = ast_variable_list_join(list, "|", "^", "@", NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_test_validate(test,</span><br><span style="color: hsl(120, 100%, 40%);">+ strcmp(ast_str_buffer(str), "abc^@def@|ghi^@j,kl@|mno^@pq=r@|stu^@vwx=\"yz\", ABC = \"DEF\"@") == 0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return AST_TEST_PASS;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static int unload_module(void)</span><br><span> {</span><br><span> AST_TEST_UNREGISTER(config_save);</span><br><span>@@ -1956,6 +1985,7 @@</span><br><span> AST_TEST_UNREGISTER(config_dialplan_function);</span><br><span> AST_TEST_UNREGISTER(variable_lists_match);</span><br><span> AST_TEST_UNREGISTER(variable_list_join_replace);</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_TEST_UNREGISTER(variable_list_from_string);</span><br><span> return 0;</span><br><span> }</span><br><span> </span><br><span>@@ -1972,6 +2002,7 @@</span><br><span> AST_TEST_REGISTER(config_dialplan_function);</span><br><span> AST_TEST_REGISTER(variable_lists_match);</span><br><span> AST_TEST_REGISTER(variable_list_join_replace);</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_TEST_REGISTER(variable_list_from_string);</span><br><span> return AST_MODULE_LOAD_SUCCESS;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18126">change 18126</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/18126"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I1e1d149be22165a1fb8e88e2903a36bba1a6cf2e </div>
<div style="display:none"> Gerrit-Change-Number: 18126 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>