diff --git a/m4/ost_pthread.m4 b/m4/ost_pthread.m4 index 624f134..d9ee454 100644 --- a/m4/ost_pthread.m4 +++ b/m4/ost_pthread.m4 @@ -181,16 +181,28 @@ AC_DEFUN([OST_LIB_PTHREAD], # ]) # fi ost_cv_thread_library=none - AC_CHECK_LIB(pthread, pthread_self, - ost_cv_thread_library=pthread, - AC_CHECK_LIB(c_r, pthread_self, - ost_cv_thread_library=c_r, - AC_CHECK_LIB(pthread, pthread_kill, - ost_cv_thread_library=pthread, - AC_CHECK_LIB(pthreads, pthread_self, - ost_cv_thread_library=pthreads, - AC_CHECK_LIB(thread, pthread_self, - ost_cv_thread_library=thread))))) + AC_CHECK_LIB([pthread], [pthread_self], + [ost_cv_thread_library=pthread]) + + if test $ost_cv_thread_library = none ; then + AC_CHECK_LIB([c_r], [pthread_self], + [ost_cv_thread_library=c_r]) + fi + + if test $ost_cv_thread_library = none ; then + AC_CHECK_LIB([pthread], [pthread_kill], + [ost_cv_thread_library=pthread]) + fi + + if test $ost_cv_thread_library = none ; then + AC_CHECK_LIB([pthreads], [pthread_self], + [ost_cv_thread_library=pthreads]) + fi + + if test $ost_cv_thread_library = none ; then + AC_CHECK_LIB([thread], [pthread_self], + [ost_cv_thread_library=thread]) + fi if test $ost_cv_thread_library = none ; then AC_CHECK_LIB(gthreads, pthread_self,[