build: build: make mgmtd test client build conditional

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2024-01-30 14:53:31 -05:00 committed by Christian Hopps
parent 1e884ba12f
commit ecc88c52ba
2 changed files with 11 additions and 1 deletions

View file

@ -701,6 +701,8 @@ AC_ARG_ENABLE([mgmtd],
AS_HELP_STRING([--disable-mgmtd], [do not build mgmtd]))
AC_ARG_ENABLE([mgmtd_local_validations],
AS_HELP_STRING([--enable-mgmtd-local-validations], [dev: unimplemented local validation]))
AC_ARG_ENABLE([mgmtd_test_be_client],
AS_HELP_STRING([--enable-mgmtd-test-be-client], [build test backend client]))
AC_ARG_ENABLE([ripd],
AS_HELP_STRING([--disable-ripd], [do not build ripd]))
AC_ARG_ENABLE([ripngd],
@ -1811,6 +1813,10 @@ AS_IF([test "$enable_mgmtd" != "no"], [
])
])
AS_IF([test "$enable_mgmtd_test_be_client" = "yes"], [
AC_DEFINE([HAVE_MGMTD_TESTC], [1], [mgmtd_testc])
])
AS_IF([test "$enable_ripd" != "no"], [
AC_DEFINE([HAVE_RIPD], [1], [ripd])
])
@ -2772,6 +2778,7 @@ AM_CONDITIONAL([VTYSH], [test "$VTYSH" = "vtysh"])
AM_CONDITIONAL([ZEBRA], [test "$enable_zebra" != "no"])
AM_CONDITIONAL([BGPD], [test "$enable_bgpd" != "no"])
AM_CONDITIONAL([MGMTD], [test "$enable_mgmtd" != "no"])
AM_CONDITIONAL([MGMTD_TESTC], [test "$enable_mgmtd_test_be_client" = "yes"])
AM_CONDITIONAL([RIPD], [test "$enable_ripd" != "no"])
AM_CONDITIONAL([OSPFD], [test "$enable_ospfd" != "no"])
AM_CONDITIONAL([LDPD], [test "$enable_ldpd" != "no"])

View file

@ -48,10 +48,13 @@ noinst_HEADERS += \
zebra/zebra_cli.h \
# end
sbin_PROGRAMS += mgmtd/mgmtd mgmtd/mgmtd_testc
sbin_PROGRAMS += mgmtd/mgmtd
if MGMTD_TESTC
sbin_PROGRAMS += mgmtd/mgmtd_testc
mgmtd_mgmtd_testc_SOURCES = mgmtd/mgmt_testc.c
mgmtd_mgmtd_testc_LDADD = lib/libfrr.la
endif
mgmtd_mgmtd_SOURCES = \
mgmtd/mgmt_main.c \