From 4d7977d636d52e6445bb7bbb4dd8e2b648020b6e Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 21 Jul 2008 15:42:31 -0700 Subject: [PATCH] Don't unnecessarily link against -lresolv and -ldl. Eliminates warnings given by dpkg-shlibdeps when building Debian packages. --- configure.ac | 5 +++-- controller/Makefile.am | 2 +- secchan/Makefile.am | 2 +- switch/Makefile.am | 2 +- tests/Makefile.am | 2 +- utilities/Makefile.am | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index eb5f9fdd..40fe94f5 100644 --- a/configure.ac +++ b/configure.ac @@ -109,8 +109,9 @@ if test "$HAVE_OPENSSL" = yes; then fi AC_CHECK_LIB([socket], [connect]) -AC_CHECK_LIB([resolv], [gethostbyname]) -AC_CHECK_LIB([dl], [dladdr]) +AC_SEARCH_LIBS([gethostbyname], [resolv], [RESOLVER_LIBS=-lresolv]) +AC_CHECK_LIB([dl], [dladdr], [FAULT_LIBS=-ldl]) +AC_SUBST([FAULT_LIBS]) CFLAGS="$CFLAGS -Wall -Wno-sign-compare" diff --git a/controller/Makefile.am b/controller/Makefile.am index 8bc15e63..81863ff3 100644 --- a/controller/Makefile.am +++ b/controller/Makefile.am @@ -5,7 +5,7 @@ man_MANS = controller.8 DISTCLEANFILES = controller.8 controller_SOURCES = controller.c -controller_LDADD = ../lib/libopenflow.a $(SSL_LIBS) +controller_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) EXTRA_DIST = controller.8.in controller.8: controller.8.in Makefile diff --git a/secchan/Makefile.am b/secchan/Makefile.am index ebe3a784..bedb286b 100644 --- a/secchan/Makefile.am +++ b/secchan/Makefile.am @@ -9,7 +9,7 @@ man_MANS = endif secchan_SOURCES = secchan.c -secchan_LDADD = ../lib/libopenflow.a $(SSL_LIBS) +secchan_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) EXTRA_DIST = secchan.8.in DISTCLEANFILES = secchan.8 diff --git a/switch/Makefile.am b/switch/Makefile.am index 640c83f5..164c21f3 100644 --- a/switch/Makefile.am +++ b/switch/Makefile.am @@ -17,7 +17,7 @@ switch_SOURCES = \ table-hash.c \ table-linear.c -switch_LDADD = ../lib/libopenflow.a $(SSL_LIBS) +switch_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) EXTRA_DIST = switch.8.in DISTCLEANFILES = switch.8 diff --git a/tests/Makefile.am b/tests/Makefile.am index b542c40b..e63a2985 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -13,5 +13,5 @@ test_type_props_SOURCES = test-type-props.c check_PROGRAMS += test-dhcp-client test_dhcp_client_SOURCES = test-dhcp-client.c -test_dhcp_client_LDADD = ../lib/libopenflow.a +test_dhcp_client_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) diff --git a/utilities/Makefile.am b/utilities/Makefile.am index 01057f3b..6202bdbe 100644 --- a/utilities/Makefile.am +++ b/utilities/Makefile.am @@ -11,7 +11,7 @@ dist_man_MANS = vlogconf.8 dpctl.8 man_MANS = ofp-pki.8 dpctl_SOURCES = dpctl.c -dpctl_LDADD = ../lib/libopenflow.a $(SSL_LIBS) +dpctl_LDADD = ../lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) vlogconf_SOURCES = vlogconf.c vlogconf_LDADD = ../lib/libopenflow.a -- 2.30.2