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"
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
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
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
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)
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