From f9ee806a0ec9c7f87470c381c5d08da75e823b2f Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 10 Jul 2001 11:03:12 +0000 Subject: [PATCH] updates --- acconfig.h.pre | 4 +--- configure.in.pre | 12 ++++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/acconfig.h.pre b/acconfig.h.pre index 1c6e64a8..1b0e211e 100644 --- a/acconfig.h.pre +++ b/acconfig.h.pre @@ -12,6 +12,7 @@ /* Multi-thread support */ #undef SILC_THREADS +#undef SILC_HAVE_PTHREAD /* Default paths */ #undef SILC_ETCDIR @@ -71,9 +72,6 @@ #undef Rfclose #undef Rgethostbyname -/* POSIX thread checking */ -#undef SILC_HAVE_PTHREAD - /* Native WIN32 compilation (-mno-cygwin GCC option) under cygwin, though the code compiles with any native WIN32 compiler. */ #undef SILC_WIN32 diff --git a/configure.in.pre b/configure.in.pre index dca00154..1aee62d8 100644 --- a/configure.in.pre +++ b/configure.in.pre @@ -563,15 +563,20 @@ esac ], CFLAGS="-O2 -g $CFLAGS" # # Pthread checking # -AC_CHECK_HEADERS(pthread.h, [ AC_DEFINE(SILC_HAVE_PTHREAD) ], +want_threads=false +AC_CHECK_HEADERS(pthread.h, + [ AC_DEFINE(SILC_HAVE_PTHREAD) + want_threads=true ], [ if test -f /usr/pkg/include/pthread.h ; then AC_DEFINE(SILC_HAVE_PTHREAD) AC_MSG_RESULT(Found pthread.h in /usr/pkg/include/) CFLAGS="$CFLAGS -I/usr/pkg/include" + want_threads=true elif test -f /usr/contrib/include/pthread.h ; then AC_DEFINE(SILC_HAVE_PTHREAD) AC_MSG_RESULT(Found pthread.h in /usr/contrib/include/) CFLAGS="$CFLAGS -I/usr/contrib/include" + want_threads=true fi ]) @@ -579,17 +584,16 @@ AC_ARG_ENABLE(threads, [ --disable-threads Do not compile with multi-thread support], [ case "${enableval}" in yes) - AC_DEFINE(SILC_THREADS) want_threads=true ;; *) want_threads=false ;; -esac ], AC_DEFINE(SILC_THREADS) - want_threads=true) +esac ]) AM_CONDITIONAL(SILC_THREADS, test x$want_threads = xtrue) if test x$want_threads = xtrue; then + AC_DEFINE(SILC_THREADS) TMP_LIBS="$LIBS" LIBS="-lpthread" AC_TRY_LINK([#include ], -- 2.24.0