+
+ dnl this might cause the errno symbol to be
+ dnl replaced with a function to get a thread specific errno.
+ dnl check to see if everything needs to be compiled
+ dnl with the thread libraries
+ AC_CACHE_CHECK([for thread specific errno],
+ [ol_cv_errno_thread_specific], [
+ AC_TRY_LINK([
+#include <errno.h>
+ ], [
+int x = errno;
+ ],
+ [ol_cv_errno_thread_specific=yes],
+ [ol_cv_errno_thread_specific=no])
+ ])
+
+ if test $ol_cv_errno_thread_specific != yes ; then
+ LIBS="$LTHREAD_LIBS $LIBS"
+ LTHREAD_LIBS=""
+ fi
+fi