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 <[email protected]> --- bgpd/Makefile.am | 2 +- configure.ac | 11 +++++++---- zebra/Makefile.am | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index b2614f4..4659ac6 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in. AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DMULTIPATH_NUM=@MULTIPATH_NUM@ +DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 AM_CFLAGS = $(WERROR) diff --git a/configure.ac b/configure.ac index 3003e62..15d6355 100755 --- a/configure.ac +++ b/configure.ac @@ -392,11 +392,14 @@ AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config f 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}" ;; "") ;; @@ -405,7 +408,7 @@ case "${enable_multipath}" in ;; 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 diff --git a/zebra/Makefile.am b/zebra/Makefile.am index 96dc6f0..90ce7b9 100644 --- a/zebra/Makefile.am +++ b/zebra/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in. AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DMULTIPATH_NUM=@MULTIPATH_NUM@ +DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 LIBCAP = @LIBCAP@ -- 1.7.10.4 _______________________________________________ Quagga-dev mailing list [email protected] https://lists.quagga.net/mailman/listinfo/quagga-dev
