+
+YAZ_INIT
+
+dnl ------ Threads
+AC_ARG_ENABLE(threads, [ --disable-threads disable threads],[enable_threads=$enableval],[enable_threads=yes])
+if test "$enable_threads" = "yes"; then
+ AC_CHECK_LIB(pthread,main)
+ AC_MSG_CHECKING(for working POSIX Threads)
+ AC_TRY_LINK([#include <pthread.h>
+ int func(void *p) { return 0; }
+ ],[
+ pthread_t pthread_id;
+ int r = pthread_create (&pthread_id, 0, func, 0);],
+ thread_ok=yes,thread_ok=no)
+ if test "$thread_ok" = "yes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PTHREAD_H)
+ AC_DEFINE(_REENTRANT)
+ else
+ AC_MSG_RESULT(no)
+ fi
+fi
+dnl
+dnl ------ Look for Tcl
+dnl See if user has specified location of tclConfig.sh; otherwise
+dnl see if tclConfig.sh exists in same prefix lcoation as tclsh; otherwise
+dnl disable Tcl.