summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authoranlan_cs <anlan_cs@tom.com>2021-12-30 00:17:05 -0500
committeranlan_cs <anlan_cs@tom.com>2022-01-06 07:42:36 -0500
commitfc539216ceb43f114e39cb25b34e312c28ca08ae (patch)
treed692565b361097b753b024fb86eec3c06adff384 /configure.ac
parent5086cc1c6639180fbc34da7e534a09dff6d8669a (diff)
build: add "--with-service-timeout" in configure.ac
On lower CPU with lots of static routes, it will cost more than 2 minutes. 2 minutes is the default timeout value, we can adjust it by configure: ./configure --with-service-timeout=<digit> Signed-off-by: anlan_cs <anlan_cs@tom.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c7a5f12863..0d598954cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -661,6 +661,8 @@ AC_ARG_ENABLE([ospfclient],
(this is the default if --disable-ospfapi is set)]))
AC_ARG_ENABLE([multipath],
AS_HELP_STRING([--enable-multipath=ARG], [enable multipath function, ARG must be digit]))
+AC_ARG_WITH([service_timeout],
+ AS_HELP_STRING([--with-service-timeout=ARG], [set service timeout value (2 minutes by default), ARG must be digit]))
AC_ARG_ENABLE([user],
AS_HELP_STRING([--enable-user=USER], [user to run FRR suite as (default frr)]))
AC_ARG_ENABLE([group],
@@ -932,6 +934,20 @@ AC_DEFINE_UNQUOTED([MULTIPATH_NUM], [$MPATH_NUM], [Maximum number of paths for a
AC_DEFINE_UNQUOTED([VTYSH_PAGER], ["$VTYSH_PAGER"], [What pager to use])
+
+TIMEOUT_MIN=2
+case "${with_service_timeout}" in
+ [[1-9]|[1-9][0-9]|[1-9][0-9][0-9]])
+ TIMEOUT_MIN="${with_service_timeout}"
+ ;;
+ 0|"")
+ ;;
+ *)
+ AC_MSG_FAILURE([Please specify digit for timeout ARG])
+ ;;
+esac
+AC_SUBST([TIMEOUT_MIN])
+
dnl --------------------
dnl Enable code coverage
dnl --------------------