This commit bypasses the link check in case a shared library is to be
used in conjunction with one of the quagga daemons. This is the case of
zero ma library that may or not be available on some systems. Adding
-Wl,-unresolved-symbols=ignore-in-shared-libs to the linker flags
permits compiling without having to install zmq.
It also adapts vtysh scripting, as the capnproto and zeromq may be needed,
the compilation flags is added.

Signed-off-by: Philippe Guibert <philippe.guib...@6wind.com>
---
 bgpd/Makefile.am        | 2 +-
 isisd/Makefile.am       | 2 +-
 ospf6d/Makefile.am      | 2 +-
 ospfclient/Makefile.am  | 2 +-
 ospfd/Makefile.am       | 2 +-
 pimd/Makefile.am        | 2 +-
 ripd/Makefile.am        | 2 +-
 ripngd/Makefile.am      | 2 +-
 vtysh/Makefile.am       | 2 +-
 vtysh/extract.pl.in     | 2 +-
 watchquagga/Makefile.am | 2 +-
 zebra/Makefile.am       | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am
index fe1be32edb37..d5be054f9555 100644
--- a/bgpd/Makefile.am
+++ b/bgpd/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib 
-I$(top_builddir)/lib
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 noinst_LIBRARIES = libbgp.a
 sbin_PROGRAMS = bgpd
diff --git a/isisd/Makefile.am b/isisd/Makefile.am
index bfe2e947793b..f254cc140b8a 100644
--- a/isisd/Makefile.am
+++ b/isisd/Makefile.am
@@ -6,7 +6,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 LIBS = @LIBS@ 
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 noinst_LIBRARIES = libisis.a
 sbin_PROGRAMS = isisd 
diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am
index 75f22572723f..1ce403cf447a 100644
--- a/ospf6d/Makefile.am
+++ b/ospf6d/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib 
-I$(top_builddir)/lib
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 noinst_LIBRARIES = libospf6.a
 sbin_PROGRAMS = ospf6d
diff --git a/ospfclient/Makefile.am b/ospfclient/Makefile.am
index 1fca431a1017..1b04ed1d80ae 100644
--- a/ospfclient/Makefile.am
+++ b/ospfclient/Makefile.am
@@ -1,7 +1,7 @@
 ## Automake.am for OSPF API client
 
 AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 lib_LTLIBRARIES = libospfapiclient.la
 libospfapiclient_la_LDFLAGS = -version-info 0:0:0
diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am
index f586d73434da..85d8445c6c02 100644
--- a/ospfd/Makefile.am
+++ b/ospfd/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
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) 
 DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
diff --git a/pimd/Makefile.am b/pimd/Makefile.am
index f57c4c254391..a91bd28e480c 100644
--- a/pimd/Makefile.am
+++ b/pimd/Makefile.am
@@ -39,7 +39,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" $(PIM_DEFS)
 INSTALL_SDATA=@INSTALL@ -m 600
 LIBS = @LIBS@
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 noinst_LIBRARIES = libpim.a
 sbin_PROGRAMS = pimd 
diff --git a/ripd/Makefile.am b/ripd/Makefile.am
index 571a4993dd5a..5fd09d13a7d0 100644
--- a/ripd/Makefile.am
+++ b/ripd/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib 
-I$(top_builddir)/lib
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 noinst_LIBRARIES = librip.a
 sbin_PROGRAMS = ripd
diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am
index df0f7d377ec2..1ed8879a3bd9 100644
--- a/ripngd/Makefile.am
+++ b/ripngd/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib 
-I$(top_builddir)/lib
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 noinst_LIBRARIES = libripng.a
 sbin_PROGRAMS = ripngd
diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am
index e44cd49f597b..8c2476c75fbd 100644
--- a/vtysh/Makefile.am
+++ b/vtysh/Makefile.am
@@ -5,7 +5,7 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 
 LIBS = @LIBS@ @CURSES@ @LIBPAM@
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 bin_PROGRAMS = vtysh
 
diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in
index 54c6f969b690..52b0b67c6f9b 100755
--- a/vtysh/extract.pl.in
+++ b/vtysh/extract.pl.in
@@ -71,7 +71,7 @@ my $cli_stomp = 0;
 foreach (@ARGV) {
     $file = $_;
 
-    open (FH, "@CPP@ -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 
-I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib 
-I@top_builddir@/lib -I@top_srcdir@/isisd/topology @CPPFLAGS@ $file |");
+    open (FH, "@CPP@ -DHAVE_CONFIG_H -DVTYSH_EXTRACT_PL -DHAVE_IPV6 
-I@top_builddir@ -I@srcdir@/ -I@srcdir@/.. -I@top_srcdir@/lib 
-I@top_builddir@/lib -I@top_srcdir@/isisd/topology @CPPFLAGS@ @ZEROMQ_CFLAGS@ 
@CAPN_C_CFLAGS@ $file |");
     local $/; undef $/;
     $line = <FH>;
     close (FH);
diff --git a/watchquagga/Makefile.am b/watchquagga/Makefile.am
index 1f05f26cedd6..724f6ff473fc 100644
--- a/watchquagga/Makefile.am
+++ b/watchquagga/Makefile.am
@@ -3,7 +3,7 @@
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
 DEFS = @DEFS@ -DSTATEDIR=\"$(localstatedir)/\"
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 sbin_PROGRAMS = watchquagga
 
diff --git a/zebra/Makefile.am b/zebra/Makefile.am
index b23f9f1b9ec9..f85a1569e77a 100644
--- a/zebra/Makefile.am
+++ b/zebra/Makefile.am
@@ -30,7 +30,7 @@ if DEV_BUILD
 dev_srcs = zebra_fpm_dt.c
 endif
 
-AM_CFLAGS = $(WERROR)
+AM_CFLAGS = $(WERROR) -Wl,-unresolved-symbols=ignore-in-shared-libs
 
 sbin_PROGRAMS = zebra
 
-- 
2.1.4


_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to