llvm.org GIT mirror llvm / 5da6046
Undo pthread patch from rev. 83930 & 83823. Credit to Paul Davey. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84083 91177308-0d34-0410-b5e6-96231b3b80d8 Edward O'Callaghan 10 years ago
3 changed file(s) with 24 addition(s) and 42 deletion(s). Raw diff Collapse all Expand all
973973 dnl pthread locking functions are optional - but llvm will not be thread-safe
974974 dnl without locks.
975975 if test "$ENABLE_THREADS" -eq 1 ; then
976 AC_SEARCH_LIBS(pthread_mutex_init,pthread,
977 AC_DEFINE([HAVE_PTHREAD],[1],
978 [Have pthread]))
976 AC_CHECK_LIB(pthread, pthread_mutex_init)
979977 AC_SEARCH_LIBS(pthread_mutex_lock,pthread,
980978 AC_DEFINE([HAVE_PTHREAD_MUTEX_LOCK],[1],
981979 [Have pthread_mutex_lock]))
2803228032
2803328033
2803428034 if test "$ENABLE_THREADS" -eq 1 ; then
28035 { echo "$as_me:$LINENO: checking for library containing pthread_mutex_init" >&5
28036 echo $ECHO_N "checking for library containing pthread_mutex_init... $ECHO_C" >&6; }
28037 if test "${ac_cv_search_pthread_mutex_init+set}" = set; then
28035
28036 { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
28037 echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
28038 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
2803828039 echo $ECHO_N "(cached) $ECHO_C" >&6
2803928040 else
28040 ac_func_search_save_LIBS=$LIBS
28041 ac_check_lib_save_LIBS=$LIBS
28042 LIBS="-lpthread $LIBS"
2804128043 cat >conftest.$ac_ext <<_ACEOF
2804228044 /* confdefs.h. */
2804328045 _ACEOF
2806028062 return 0;
2806128063 }
2806228064 _ACEOF
28063 for ac_lib in '' pthread; do
28064 if test -z "$ac_lib"; then
28065 ac_res="none required"
28066 else
28067 ac_res=-l$ac_lib
28068 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28069 fi
28070 rm -f conftest.$ac_objext conftest$ac_exeext
28065 rm -f conftest.$ac_objext conftest$ac_exeext
2807128066 if { (ac_try="$ac_link"
2807228067 case "(($ac_try" in
2807328068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2810128096 ac_status=$?
2810228097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2810328098 (exit $ac_status); }; }; then
28104 ac_cv_search_pthread_mutex_init=$ac_res
28099 ac_cv_lib_pthread_pthread_mutex_init=yes
2810528100 else
2810628101 echo "$as_me: failed program was:" >&5
2810728102 sed 's/^/| /' conftest.$ac_ext >&5
2810828103
28109
28104 ac_cv_lib_pthread_pthread_mutex_init=no
2811028105 fi
2811128106
2811228107 rm -f core conftest.err conftest.$ac_objext \
28113 conftest$ac_exeext
28114 if test "${ac_cv_search_pthread_mutex_init+set}" = set; then
28115 break
28116 fi
28117 done
28118 if test "${ac_cv_search_pthread_mutex_init+set}" = set; then
28119 :
28120 else
28121 ac_cv_search_pthread_mutex_init=no
28122 fi
28123 rm conftest.$ac_ext
28124 LIBS=$ac_func_search_save_LIBS
28125 fi
28126 { echo "$as_me:$LINENO: result: $ac_cv_search_pthread_mutex_init" >&5
28127 echo "${ECHO_T}$ac_cv_search_pthread_mutex_init" >&6; }
28128 ac_res=$ac_cv_search_pthread_mutex_init
28129 if test "$ac_res" != no; then
28130 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28131
28132 cat >>confdefs.h <<\_ACEOF
28133 #define HAVE_PTHREAD 1
28134 _ACEOF
28108 conftest$ac_exeext conftest.$ac_ext
28109 LIBS=$ac_check_lib_save_LIBS
28110 fi
28111 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
28112 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
28113 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
28114 cat >>confdefs.h <<_ACEOF
28115 #define HAVE_LIBPTHREAD 1
28116 _ACEOF
28117
28118 LIBS="-lpthread $LIBS"
2813528119
2813628120 fi
2813728121
192192 /* Define to 1 if you have the `psapi' library (-lpsapi). */
193193 #undef HAVE_LIBPSAPI
194194
195 /* Define to 1 if you have the `pthread' library (-lpthread). */
196 #undef HAVE_LIBPTHREAD
197
195198 /* Define to 1 if you have the `udis86' library (-ludis86). */
196199 #undef HAVE_LIBUDIS86
197200
280283
281284 /* Define to have the %a format string */
282285 #undef HAVE_PRINTF_A
283
284 /* Have pthread */
285 #undef HAVE_PTHREAD
286286
287287 /* Have pthread_getspecific */
288288 #undef HAVE_PTHREAD_GETSPECIFIC