From 410459318056fd1ddbdf5b03c53e677a66f7c929 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 9 Oct 2011 17:09:29 +0200 Subject: configure.ac: use AC_SEARCH_LIBS for socket, gethostbyname, exp AC_SEARCH_LIBS allows the function to be present in libc. --- configure.ac | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 10663a81b..0d9693093 100644 --- a/configure.ac +++ b/configure.ac @@ -117,12 +117,13 @@ AC_CHECK_FUNCS(daemon fork) AC_SEARCH_LIBS([syslog], [bsd socket inet], [AC_DEFINE(HAVE_SYSLOG, 1, [Define if syslog() is available])]) -AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",) -AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",) +AC_SEARCH_LIBS([socket], [socket]) +AC_SEARCH_LIBS([gethostbyname], [nsl]) AC_CHECK_FUNCS(pipe2 accept4) -AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",) +AC_SEARCH_LIBS([exp], [m],, + [AC_MSG_ERROR([exp() not found])]) AC_CHECK_HEADERS(locale.h) AC_CHECK_HEADERS(valgrind/memcheck.h) -- cgit v1.2.3