* Regexp improvements

* Added check for libxml in configure';
  * Added clixon_util_regexp utility function
* Yang state get improvements
  * Integrated state and config into same tree on retrieval, not separate trees
  * Added cli functions `cli_show_config_state()` and `cli_show_auto_state()` for showing combined config and state info.
  * Added integrated state in the main example: `interface/oper-state`.
  * Added performance tests for getting state, see [test/test_perf_state.sh].
This commit is contained in:
Olof hagsand 2019-05-20 16:03:29 +02:00
parent c17784cfe9
commit bc54f2d04c
26 changed files with 895 additions and 185 deletions

48
configure vendored
View file

@ -4417,6 +4417,54 @@ _ACEOF
fi
# This is for Libxml2 code which we can use for XSD regexp
# AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h])
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlRegexpCompile in -lxml2" >&5
$as_echo_n "checking for xmlRegexpCompile in -lxml2... " >&6; }
if ${ac_cv_lib_xml2_xmlRegexpCompile+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char xmlRegexpCompile ();
int
main ()
{
return xmlRegexpCompile ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_xml2_xmlRegexpCompile=yes
else
ac_cv_lib_xml2_xmlRegexpCompile=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlRegexpCompile" >&5
$as_echo "$ac_cv_lib_xml2_xmlRegexpCompile" >&6; }
if test "x$ac_cv_lib_xml2_xmlRegexpCompile" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBXML2 1
_ACEOF
LIBS="-lxml2 $LIBS"
fi
for ac_func in inet_aton sigaction sigvec strlcpy strsep strndup alphasort versionsort
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`