updates
authorPekka Riikonen <priikone@silcnet.org>
Tue, 10 Jul 2001 11:03:12 +0000 (11:03 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 10 Jul 2001 11:03:12 +0000 (11:03 +0000)
acconfig.h.pre
configure.in.pre

index 1c6e64a881ed9ce75ac92d369f70c055e2a1ba96..1b0e211e4e3796ab6e93bc17457fb84cc02d7271 100644 (file)
@@ -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
index dca00154a33a90b1893c6b67ac2f13b8fdb8fd8e..1aee62d885568b401054c83d8bb42748b0dd425f 100644 (file)
@@ -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 <pthread.h>],