*-*-freebsd*)
check_threads=true
;;
+ *-*-netbsd*)
+ check_threads=true
+ ;;
*-*-*bsd*)
check_threads=false
;;
AC_CHECK_FUNCS(poll select listen bind shutdown close connect setsockopt)
AC_CHECK_FUNCS(setrlimit time ctime utime gettimeofday getrusage)
AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
-AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid)
-AC_CHECK_FUNCS(setgroups initgroups nl_langinfo epoll_wait nanosleep)
+AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid sched_yield)
+AC_CHECK_FUNCS(setgroups initgroups nl_langinfo nanosleep tzset)
AC_CHECK_FUNCS(strchr snprintf strstr strcpy strncpy memcpy memset memmove)
#ifdef SILC_DIST_SIM
;;
esac
+ # Check for threads
AC_CHECK_FUNC(pthread_create)
+
+ # Check for read/write locks
+ AC_CHECK_FUNC(pthread_rwlock_init,
+ [
+ AC_RUN_IFELSE(
+ [
+ #include <pthread.h>
+ int main()
+ {
+ pthread_rwlock_t rwlock;
+ pthread_rwlock_init(&rwlock, NULL);
+ pthread_rwlock_destroy(&rwlock);
+ return 0;
+ }
+ ],
+ [],
+ [
+ # Rwlock not defined
+ CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600"
+ ]
+ )
+ ],
+ [
+ # Rwlock not defined
+ CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600"
+ ])
+
AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
__SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
#
AM_CONDITIONAL(SILC_OS2, test xfalse = xtrue)
-#ifdef SILC_DIST_TOOLKIT
-# --with-irssi
-#
-without_irssi=true
-AC_MSG_CHECKING(whether to compile Irssi SILC Client)
-AC_ARG_WITH(irssi,
- [ --with-irssi compile with Irssi SILC Client],
- [
- AC_MSG_RESULT(yes)
- without_irssi=false
- ],
- [
- AC_MSG_RESULT(no)
- without_irssi=true
- ])
-AM_CONDITIONAL(with_irssi, test xwithout_irssi = xfalse)
-
-# --with-silcd
-#
-without_silcd=true
-AC_MSG_CHECKING(whether to compile SILC Server)
-AC_ARG_WITH(silcd,
- [ --with-silcd compile with SILC Server],
- [
- AC_MSG_RESULT(yes)
- without_silcd=false
- ],
- [
- AC_MSG_RESULT(no)
- without_silcd=true
- ])
-#endif SILC_DIST_TOOLKIT
+#ifdef SILC_DIST_SERVER
+without_silcd=false
+#endif SILC_DIST_SERVER
#ifdef SILC_DIST_CLIENT
AM_CONDITIONAL(with_irssi, true)
#endif SILC_DIST_CLIENT
#endif SILC_DIST_INCLUDES
echo ""
-#ifdef SILC_DIST_TOOLKIT
+#ifdef SILC_DIST_CLIENT
if test x$without_irssi = xtrue; then
irssi="no"
fi
-if test x$without_silcd = xtrue; then
- silcd="no"
-fi
-#endif SILC_DIST_TOOLKIT
-
-#ifdef SILC_DIST_CLIENT
echo " Compile SILC Client ...........: $irssi"
#endif SILC_DIST_CLIENT
#ifdef SILC_DIST_SERVER
+if test x$without_silcd = xtrue; then
+ silcd="no"
+fi
echo " Compile SILC Server ...........: $silcd"
#endif SILC_DIST_SERVER