diff options
author | Max Kellermann <max@duempel.org> | 2011-10-09 17:02:20 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-10-09 17:03:44 +0200 |
commit | 78e1704122620ef747b47b7cefc55e43f8444e8e (patch) | |
tree | 2fe619f3c1250c4285b26edb34f53d9ef120e0bd /configure.ac | |
parent | b9e99575cec8740a9db548e0b4dd4662dfa273de (diff) |
configure.ac: detect syslog() with AC_SEARCH_LIBS
One call to AC_SEARCH_LIBS replaces AC_CHECK_FUNCS and AC_CHECK_LIB.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 84f36f8fe..10663a81b 100644 --- a/configure.ac +++ b/configure.ac @@ -112,15 +112,10 @@ fi dnl --------------------------------------------------------------------------- dnl Header/Library Checks dnl --------------------------------------------------------------------------- -AC_CHECK_FUNCS(daemon fork syslog) -if test $ac_cv_func_syslog = no; then - # syslog is not in the default libraries. See if it's in some other. - for lib in bsd socket inet; do - AC_CHECK_LIB($lib, syslog, - [AC_DEFINE(HAVE_SYSLOG) - LIBS="$LIBS -l$lib"; break]) - done -fi +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",) |