Add checks for required libraries
authorJuho Vähä-Herttua <juhovh@iki.fi>
Sat, 19 May 2012 10:25:29 +0000 (13:25 +0300)
committerJuho Vähä-Herttua <juhovh@iki.fi>
Thu, 31 May 2012 19:04:23 +0000 (22:04 +0300)
configure.ac
src/lib/Makefile.am
src/lib/dnssd.c

index 7fcb650b4f9480454b9325ee9702da6dcd21bc6a..482237321d526bbdfa37f512498dc018dadaf738 100644 (file)
@@ -13,6 +13,8 @@ AC_PROG_CC
 AC_PROG_LIBTOOL
 
 # Checks for libraries.
+LT_LIB_DLLOAD
+LT_LIB_M
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -20,7 +22,8 @@ AC_HEADER_STDC
 # Checks for typedefs, structures, and compiler characteristics.
 
 # Checks for library functions.
-
+AC_CHECK_LIB([socket],[connect])
+AC_CHECK_LIB([pthread],[pthread_create])
 
 
 # Custom check for os, similar to webkit
index 30d1c5a776a579eac1f9d18fd2ea71aed90691bd..03d702097daf6f1be2936d1a68c460b8fd1a02b0 100644 (file)
@@ -8,6 +8,10 @@ libshairplay_la_SOURCES = base64.c base64.h digest.c digest.h dnssd.c dnssdint.h
 # This library depends on 3rd party libraries
 libshairplay_la_LIBADD = crypto/libcrypto.la alac/libalac.la
 libshairplay_la_LDFLAGS = -version-info 0:0:0
+
+libshairplay_la_LIBADD += $(LIBADD_DLOPEN)
+libshairplay_la_LIBADD += $(LIBM)
+
 if OS_WIN32
 libshairplay_la_LDFLAGS += -no-undefined -lws2_32 -lwinmm
 endif
index 53f238cfc331a3eea7fa168a99beebdaae0c5a15..ebdf1926b9bc6c287bba7d08472cd7b0ecf19621 100644 (file)
@@ -17,6 +17,8 @@
 #include <stdio.h>
 #include <assert.h>
 
+#include "config.h"
+
 #include "dnssd.h"
 #include "dnssdint.h"
 #include "global.h"