log: support syslog()

Allow logging to syslog if log_file is configured to "syslog".
This commit is contained in:
Max Kellermann
2008-12-28 19:48:53 +01:00
parent c6cb611065
commit c01aa53e6a
5 changed files with 124 additions and 6 deletions

View File

@@ -54,6 +54,21 @@ if test -z "$prefix" || test "x$prefix" = xNONE; then
fi
dnl
dnl libc features
dnl
AC_CHECK_FUNCS(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
dnl
dnl build options
dnl