From: Ivo Timmermans Date: Thu, 19 Oct 2000 20:39:04 +0000 (+0000) Subject: Add check for the syslog function X-Git-Tag: release-1.0.3~93 X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=95f4e8620ef8e2cdec1cc3b2ccb8cc8e3ce94e40 Add check for the syslog function --- diff --git a/configure.in b/configure.in index 0d54bd51..7f66487e 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -dnl $Id: configure.in,v 1.15 2000/10/18 20:12:06 zarq Exp $ +dnl $Id: configure.in,v 1.16 2000/10/19 20:39:04 zarq Exp $ AC_INIT(src/tincd.c) AM_INIT_AUTOMAKE(tinc, 1.0pre3) @@ -52,6 +52,26 @@ jm_FUNC_REALLOC AM_GNU_GETTEXT +dnl Support for SunOS + +AC_CHECK_FUNC(socket, [], [ + AC_CHECK_LIB(socket, connect) +]) +AC_CHECK_FUNC(gethostbyname, [], [ + AC_CHECK_LIB(nsl, gethostbyname) +]) + + +dnl From the autoconf manual +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 $lib"; break]) + done +fi + AC_CHECK_LIB(dl, dlopen, [ LIBS="$LIBS -ldl" ]) @@ -71,16 +91,6 @@ else fi -dnl Support for SunOS - -AC_CHECK_FUNC(socket, [], [ - AC_CHECK_LIB(socket, connect) -]) -AC_CHECK_FUNC(gethostbyname, [], [ - AC_CHECK_LIB(nsl, gethostbyname) -]) - - dnl Check for TUN/TAP support in the kernel tinc_TUNTAP