configure.ac: detect syslog() with AC_SEARCH_LIBS
One call to AC_SEARCH_LIBS replaces AC_CHECK_FUNCS and AC_CHECK_LIB.
This commit is contained in:
parent
b9e99575ce
commit
78e1704122
13
configure.ac
13
configure.ac
@ -112,15 +112,10 @@ fi
|
|||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl Header/Library Checks
|
dnl Header/Library Checks
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
AC_CHECK_FUNCS(daemon fork syslog)
|
AC_CHECK_FUNCS(daemon fork)
|
||||||
if test $ac_cv_func_syslog = no; then
|
|
||||||
# syslog is not in the default libraries. See if it's in some other.
|
AC_SEARCH_LIBS([syslog], [bsd socket inet],
|
||||||
for lib in bsd socket inet; do
|
[AC_DEFINE(HAVE_SYSLOG, 1, [Define if syslog() is available])])
|
||||||
AC_CHECK_LIB($lib, syslog,
|
|
||||||
[AC_DEFINE(HAVE_SYSLOG)
|
|
||||||
LIBS="$LIBS -l$lib"; break])
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",)
|
AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",)
|
||||||
AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",)
|
AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",)
|
||||||
|
Loading…
Reference in New Issue
Block a user