X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=configure.ad;h=3282af2a73ff404fba88d54880310afb6a6fc13c;hb=664ce664330ac8edf9aae688bf279f7b6fedcc17;hp=221edd9a8455308878883966850b32f2e9da8715;hpb=fc83b6ccbcbd697a3afc82cf3d9f4053f0bbadb1;p=silc.git diff --git a/configure.ad b/configure.ad index 221edd9a..3282af2a 100644 --- a/configure.ad +++ b/configure.ad @@ -4,7 +4,7 @@ # Author: Pekka Riikonen # # Copyright (C) 2000 - 2007 Pekka Riikonen -# +s# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. @@ -36,6 +36,9 @@ case "$target" in *-*-freebsd*) check_threads=true ;; + *-*-netbsd*) + check_threads=true + ;; *-*-*bsd*) check_threads=false ;; @@ -178,8 +181,8 @@ AC_CHECK_FUNCS(gethostname gethostbyaddr getservbyname getservbyport) 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 @@ -1121,7 +1124,35 @@ if test x$has_threads = xtrue; then ;; esac + # Check for threads AC_CHECK_FUNC(pthread_create) + + # Check for read/write locks + AC_CHECK_FUNC(pthread_rwlock_init, + [ + AC_RUN_IFELSE( + [ + #include + 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" @@ -1156,38 +1187,9 @@ AM_CONDITIONAL(SILC_BEOS, test xfalse = xtrue) # 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 @@ -1312,20 +1314,17 @@ echo " include directory .............: $s_includedir" #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