Check for libxml2 include files, not lib in code
This commit is contained in:
parent
a804e05375
commit
e55a27bcac
3 changed files with 4 additions and 8 deletions
|
|
@ -497,9 +497,9 @@ main(int argc,
|
|||
if (help)
|
||||
usage(h, argv[0]);
|
||||
|
||||
#ifndef HAVE_LIBXML2
|
||||
#ifndef HAVE_LIBXML_XMLREGEXP_H
|
||||
if (strcmp(clicon_yang_regexp(h), "libxml2")==0){
|
||||
clicon_err(OE_FATAL, 0, "CLICON_YANG_REGEXP set to libxml2, but HAVE_LIBXM2 not set (Either change CLICON_YANG_REGEXP to posix, or install libxml2?))");
|
||||
clicon_err(OE_FATAL, 0, "CLICON_YANG_REGEXP set to libxml2, but HAVE_LIBXM_XMLREGEXP_H not set (Either change CLICON_YANG_REGEXP to posix, or configure with libxml2?))");
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -447,11 +447,11 @@ main(int argc, char **argv)
|
|||
usage(h, argv[0]);
|
||||
|
||||
if (strcmp(clicon_yang_regexp(h), "libxml2")==0){
|
||||
#ifdef HAVE_LIBXML2
|
||||
#ifdef HAVE_LIBXML_XMLREGEXP_H
|
||||
/* Enable XSD libxml2 */
|
||||
cligen_regex_set(cli_cligen(h), 1);
|
||||
#else
|
||||
clicon_err(OE_FATAL, 0, "CLICON_YANG_REGEXP set to libxml2, but HAVE_LIBXM2 not set (Either change CLICON_YANG_REGEXP to posix, or install libxml2?))");
|
||||
clicon_err(OE_FATAL, 0, "CLICON_YANG_REGEXP set to libxml2, but HAVE_LIBXML_XMLREGEXP_H not set (Either change CLICON_YANG_REGEXP to posix, or configure with libxml2))");
|
||||
goto done;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,10 +49,6 @@
|
|||
#include <regex.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_LIBXML_XMLREGEXP_H
|
||||
#include <libxml/xmlregexp.h>
|
||||
#endif
|
||||
|
||||
#include <cligen/cligen.h>
|
||||
|
||||
/* clicon */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue