From f2aa11550e29bb3ff0fe59d06794aa53ec023d69 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 13 Nov 1998 04:28:56 +0000 Subject: [PATCH] Pthread library check. Autoconf uses same cache variable based upon library and function, but not secondary libraries. Must use different functions in such cases. --- configure | 20 ++++++++++---------- configure.in | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 916ffa6009..228c960759 100755 --- a/configure +++ b/configure @@ -2926,9 +2926,9 @@ echo "$ac_t""$ol_cv_thread_flag" 1>&6 if test $ol_link_threads = no ; then save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:2931: checking for pthread_create in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` + echo $ac_n "checking for pthread_join in -lpthread""... $ac_c" 1>&6 +echo "configure:2931: checking for pthread_join in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_join | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2940,10 +2940,10 @@ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then @@ -2977,9 +2977,9 @@ fi if test $ol_link_threads = no ; then save_LIBS="$LIBS" - echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:2982: checking for pthread_create in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` + echo $ac_n "checking for pthread_join in -lpthreads""... $ac_c" 1>&6 +echo "configure:2982: checking for pthread_join in -lpthreads" >&5 +ac_lib_var=`echo pthreads'_'pthread_join | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2991,10 +2991,10 @@ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then diff --git a/configure.in b/configure.in index 5069437409..0f8893581c 100644 --- a/configure.in +++ b/configure.in @@ -394,7 +394,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then if test $ol_link_threads = no ; then dnl try DEC Threads -lpthread -lexc save_LIBS="$LIBS" - AC_CHECK_LIB(pthread, pthread_create, [ + AC_CHECK_LIB(pthread, pthread_join, [ ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lpthread -lexc" if test $ol_with_preemptive = auto ; then @@ -407,7 +407,7 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then if test $ol_link_threads = no ; then dnl try DEC Threads -lpthreads -lmach -lexc -lc_r save_LIBS="$LIBS" - AC_CHECK_LIB(pthreads, pthread_create, [ + AC_CHECK_LIB(pthreads, pthread_join, [ ol_link_threads=posix LTHREAD_LIBS="$LTHREAD_LIBS -lpthreads -lmach -lexc -lc_r" if test $ol_with_preemptive = auto ; then -- 2.39.5