From: Juho Vähä-Herttua Date: Sat, 19 May 2012 10:25:29 +0000 (+0300) Subject: Add checks for required libraries X-Git-Tag: upstream/0.9.0~4^2~50 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=92a5fb679f1464734e6700b817d93240200e3664;p=deb_shairplay.git Add checks for required libraries --- diff --git a/configure.ac b/configure.ac index 7fcb650..4822373 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 30d1c5a..03d7020 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -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 diff --git a/src/lib/dnssd.c b/src/lib/dnssd.c index 53f238c..ebdf192 100644 --- a/src/lib/dnssd.c +++ b/src/lib/dnssd.c @@ -17,6 +17,8 @@ #include #include +#include "config.h" + #include "dnssd.h" #include "dnssdint.h" #include "global.h"