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)
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"
])
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