From 7539aacc36f7e2112d38a935c9518e2a852e2745 Mon Sep 17 00:00:00 2001 From: Renato Botelho do Couto Date: Thu, 6 Jul 2023 14:51:48 +0000 Subject: [PATCH] configure.ac: Implement --with-restconf-netns It is used to define default restconf network namespace. If not specified it's set to "default" --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index def549cc..57a16557 100644 --- a/configure.ac +++ b/configure.ac @@ -231,6 +231,17 @@ AC_CHECK_HEADERS(cligen/cligen.h,, AC_MSG_ERROR([CLIgen missing. Try: git clone AC_CHECK_LIB(cligen, cligen_init,, AC_MSG_ERROR([CLIgen missing. Try: git clone https://github.com/clicon/cligen.git])) +AC_ARG_WITH([restconf-netns], + AS_HELP_STRING([--with-restconf-netns=NAMESPACE],[Define default restconf network namespace to NAMESPACE]), + [restconf_netns="$withval"], + [restconf_netns="default"]) + +if test -z "$restconf_netns"; then + AC_MSG_ERROR([restconf-netns cannot be empty]) +fi + +AC_DEFINE_UNQUOTED([RESTCONF_NETNS_DEFAULT], "$restconf_netns", [Default restconf network namespace]) + # This is for restconf. There are three options: # --without-restconf No restconf support # --with-restconf=fcgi FCGI interface for separate web reverse proxy like nginx