--- configure.in.orig	Mon Apr 30 16:23:53 2001
+++ configure.in	Mon Apr 30 16:39:21 2001
@@ -303,6 +303,10 @@
 
 saved_LIBS="$LIBS"
 
+if test "x$THREAD_LIB" = "x" ; then
+	THREAD_LIB="-lpthread"
+fi
+
 AC_DEFUN( CHECK_FOR_GL_LIB, [
     AC_MSG_CHECKING([for $GL_LIB_NAME library])
     LIBS="$saved_LIBS $TR_LIBS $GL_LDOPTS -l$GL_LIB_NAME"
@@ -313,15 +317,15 @@
 	TR_LIBS="$TR_LIBS $GL_LDOPTS -l$GL_LIB_NAME"
 
     else
-	dnl Try with -lpthread
+	dnl Try with pthreads
 
 	AC_MSG_CHECKING([for $GL_LIB_NAME library (with pthreads)])
-	LIBS="$saved_LIBS $TR_LIBS $GL_LDOPTS -l$GL_LIB_NAME -lpthread"
+	LIBS="$saved_LIBS $TR_LIBS $GL_LDOPTS -l$GL_LIB_NAME $THREAD_LIB"
 	AC_TRY_LINK( , , have_GL=yes, have_GL=no)
 	AC_MSG_RESULT([$have_GL])
 
 	if test "x$have_GL" = "xyes" ; then
-	    TR_LIBS="$TR_LIBS $GL_LDOPTS -l$GL_LIB_NAME -lpthread"
+	    TR_LIBS="$TR_LIBS $GL_LDOPTS -l$GL_LIB_NAME $THREAD_LIB"
 	fi
     fi
 ])
