Don't unnecessarily link against -lresolv and -ldl.
authorBen Pfaff <blp@nicira.com>
Mon, 21 Jul 2008 22:42:31 +0000 (15:42 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 21 Jul 2008 22:45:35 +0000 (15:45 -0700)
Eliminates warnings given by dpkg-shlibdeps when building Debian
packages.

configure.ac
controller/Makefile.am
secchan/Makefile.am
switch/Makefile.am
tests/Makefile.am
utilities/Makefile.am

index eb5f9fdd72c111295b834b5dfa541ccbcfddebe5..40fe94f5082ffae9d206781375e1e96b925362d6 100644 (file)
@@ -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"
 
index 8bc15e63738f1270b3a9bf859937bdb1b1a0bc2f..81863ff38c26cee1d7a97b91746e946dbad73bd0 100644 (file)
@@ -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
index ebe3a784478a167156c38b874ba18a1145d47142..bedb286b22b110262a8a0a93f076197c9e8a51d2 100644 (file)
@@ -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
index 640c83f55aaaea7b196c4093ee33c8a6d79046c6..164c21f3ab8cccc831716335cdf9bdc2f7ec2356 100644 (file)
@@ -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
index b542c40ba324c7812e6803d4a734c1ccaf6b488e..e63a2985c34fb5f9282ec2294f2c02d87700383d 100644 (file)
@@ -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)
 
index 01057f3b4413953c0518accef900f2c6ee1b1936..6202bdbe7e33f8eb42848941c0df876b370fbc6a 100644 (file)
@@ -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