build: Rework how MULTIPATH_NUM is delivered to build
Changes made here:
1) MULTIPATH_NUM will never be 0. If user specifies --enable-multipath=0
then this translates to MULTIPATH_NUM being set to 64 inside of the build
system.
2) Move MULTIPATH_NUM from a Makefile construct to a config.h construct.
3) Allowed MULTIPATH_NUM to be a number > 99 but < 1000
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/configure.ac b/configure.ac
index b4d934b..7aaacb9 100755
--- a/configure.ac
+++ b/configure.ac
@@ -379,11 +379,14 @@
enable_logfile_mask=${enable_logfile_mask:-0600}
AC_DEFINE_UNQUOTED(LOGFILE_MASK, ${enable_logfile_mask}, Mask for log files)
-MULTIPATH_NUM=1
+MPATH_NUM=1
case "${enable_multipath}" in
- [[0-9]|[1-9][0-9]])
- MULTIPATH_NUM="${enable_multipath}"
+ 0)
+ MPATH_NUM=64
+ ;;
+ [[1-9]|[1-9][0-9]|[1-9][0-9][0-9]])
+ MPATH_NUM="${enable_multipath}"
;;
"")
;;
@@ -392,7 +395,7 @@
;;
esac
-AC_SUBST(MULTIPATH_NUM)
+AC_DEFINE_UNQUOTED(MULTIPATH_NUM, $MPATH_NUM, Maximum number of paths for a route)
dnl -----------------------------------
dnl Add extra version string to package