From: David Lamparter Date: Fri, 13 Jan 2017 14:31:04 +0000 (+0100) Subject: build: fix several ldpd XML-CLI build issues X-Git-Tag: frr-3.0-branchpoint~85^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7758fe9f6098498afc9d25fac90dc4c9ed0ecfbc;p=matthieu%2Ffrr.git build: fix several ldpd XML-CLI build issues - the location of ldp_vty_cmds.c can be either in srcdir or builddir, depending on whether a premade file from a dist tarball is used - perl libxml support is only needed if that file is absent - the actual perl script wasn't even included in the dist tarball - the include location doesn't work when srcdir != builddir Signed-off-by: David Lamparter --- diff --git a/configure.ac b/configure.ac index fcc0de1b22..297e5cea55 100755 --- a/configure.ac +++ b/configure.ac @@ -292,8 +292,6 @@ if test $ac_cv_lib_json_c_json_object_get = no; then fi fi -AX_PROG_PERL_MODULES(XML::LibXML, , AC_MSG_ERROR(XML::LibXML perl module is needed to compile)) - AC_ARG_ENABLE([dev_build], AS_HELP_STRING([--enable-dev-build], [build for development])) @@ -1163,6 +1161,14 @@ AM_CONDITIONAL(OSPFD, test "x$OSPFD" = "xospfd") if test "${enable_ldpd}" = "no";then LDPD="" else + AX_PROG_PERL_MODULES(XML::LibXML, , [ + if test -f "${srcdir}/ldpd/ldp_vty_cmds.c"; then + AC_MSG_WARN([XML::LibXML perl module not found, using pregenerated ldp_vty_cmds.c]) + else + AC_MSG_ERROR([XML::LibXML perl module not found and pregenerated ldp_vty_cmds.c missing]) + fi + ]) + LDPD="ldpd" AC_DEFINE(HAVE_LDPD, 1, ldpd) fi diff --git a/ldpd/Makefile.am b/ldpd/Makefile.am index e7da216a65..6dc7c077de 100644 --- a/ldpd/Makefile.am +++ b/ldpd/Makefile.am @@ -3,6 +3,7 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 +EXTRA_DIST= AM_CFLAGS = $(WERROR) @@ -10,6 +11,7 @@ noinst_LIBRARIES = libldp.a sbin_PROGRAMS = ldpd BUILT_SOURCES = ldp_vty_cmds.c +EXTRA_DIST += ldp_vty.xml libldp_a_SOURCES = \ accept.c address.c adjacency.c control.c hello.c init.c interface.c \ diff --git a/ldpd/ldp_vty.xml b/ldpd/ldp_vty.xml index ee5c6e4df2..9103dd0898 100644 --- a/ldpd/ldp_vty.xml +++ b/ldpd/ldp_vty.xml @@ -1,5 +1,5 @@ - +