diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-12-09 08:24:44 -0500 |
---|---|---|
committer | Paul Jakma <paul.jakma@hpe.com> | 2016-02-26 14:11:47 +0000 |
commit | d18396369ff85517cd4b0b7abe96f6f706710dc7 (patch) | |
tree | 748597138dba3b393808782c8767fdf886b603f4 | |
parent | 693da6096a28eef5eadeea699771265987b3ec0c (diff) | |
download | quagga-d18396369ff85517cd4b0b7abe96f6f706710dc7.tar.bz2 quagga-d18396369ff85517cd4b0b7abe96f6f706710dc7.tar.xz |
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>
-rw-r--r-- | bgpd/Makefile.am | 2 | ||||
-rwxr-xr-x | configure.ac | 11 | ||||
-rw-r--r-- | zebra/Makefile.am | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index 7da4dd87..d2775f39 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 b4d934b6..7aaacb96 100755 --- a/configure.ac +++ b/configure.ac @@ -379,11 +379,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}" ;; "") ;; @@ -392,7 +395,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 96dc6f03..90ce7b97 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@ |