From 92a5fb679f1464734e6700b817d93240200e3664 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Juho=20V=C3=A4h=C3=A4-Herttua?= Date: Sat, 19 May 2012 13:25:29 +0300 Subject: [PATCH] Add checks for required libraries --- configure.ac | 5 ++++- src/lib/Makefile.am | 4 ++++ src/lib/dnssd.c | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) 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" -- 2.34.1