[llvm-commits] [llvm] r84083 - in /llvm/trunk: autoconf/configure.ac configure include/llvm/Config/config.h.in
Edward O'Callaghan
eocallaghan at auroraux.org
Wed Oct 14 04:12:33 PDT 2009
Author: evocallaghan
Date: Wed Oct 14 06:12:33 2009
New Revision: 84083
URL: http://llvm.org/viewvc/llvm-project?rev=84083&view=rev
Log:
Undo pthread patch from rev. 83930 & 83823. Credit to Paul Davey.
Modified:
llvm/trunk/autoconf/configure.ac
llvm/trunk/configure
llvm/trunk/include/llvm/Config/config.h.in
Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=84083&r1=84082&r2=84083&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Wed Oct 14 06:12:33 2009
@@ -974,9 +974,7 @@
dnl pthread locking functions are optional - but llvm will not be thread-safe
dnl without locks.
if test "$ENABLE_THREADS" -eq 1 ; then
- AC_SEARCH_LIBS(pthread_mutex_init,pthread,
- AC_DEFINE([HAVE_PTHREAD],[1],
- [Have pthread]))
+ AC_CHECK_LIB(pthread, pthread_mutex_init)
AC_SEARCH_LIBS(pthread_mutex_lock,pthread,
AC_DEFINE([HAVE_PTHREAD_MUTEX_LOCK],[1],
[Have pthread_mutex_lock]))
Modified: llvm/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=84083&r1=84082&r2=84083&view=diff
==============================================================================
--- llvm/trunk/configure (original)
+++ llvm/trunk/configure Wed Oct 14 06:12:33 2009
@@ -28033,12 +28033,14 @@
if test "$ENABLE_THREADS" -eq 1 ; then
- { echo "$as_me:$LINENO: checking for library containing pthread_mutex_init" >&5
-echo $ECHO_N "checking for library containing pthread_mutex_init... $ECHO_C" >&6; }
-if test "${ac_cv_search_pthread_mutex_init+set}" = set; then
+
+{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
+echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
+if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_func_search_save_LIBS=$LIBS
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -28061,14 +28063,7 @@
return 0;
}
_ACEOF
-for ac_lib in '' pthread; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -28102,38 +28097,27 @@
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_search_pthread_mutex_init=$ac_res
+ ac_cv_lib_pthread_pthread_mutex_init=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
+ ac_cv_lib_pthread_pthread_mutex_init=no
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if test "${ac_cv_search_pthread_mutex_init+set}" = set; then
- break
-fi
-done
-if test "${ac_cv_search_pthread_mutex_init+set}" = set; then
- :
-else
- ac_cv_search_pthread_mutex_init=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_pthread_mutex_init" >&5
-echo "${ECHO_T}$ac_cv_search_pthread_mutex_init" >&6; }
-ac_res=$ac_cv_search_pthread_mutex_init
-if test "$ac_res" != no; then
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTHREAD 1
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
+if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
_ACEOF
+ LIBS="-lpthread $LIBS"
+
fi
{ echo "$as_me:$LINENO: checking for library containing pthread_mutex_lock" >&5
Modified: llvm/trunk/include/llvm/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=84083&r1=84082&r2=84083&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.in (original)
+++ llvm/trunk/include/llvm/Config/config.h.in Wed Oct 14 06:12:33 2009
@@ -193,6 +193,9 @@
/* Define to 1 if you have the `psapi' library (-lpsapi). */
#undef HAVE_LIBPSAPI
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#undef HAVE_LIBPTHREAD
+
/* Define to 1 if you have the `udis86' library (-ludis86). */
#undef HAVE_LIBUDIS86
@@ -282,9 +285,6 @@
/* Define to have the %a format string */
#undef HAVE_PRINTF_A
-/* Have pthread */
-#undef HAVE_PTHREAD
-
/* Have pthread_getspecific */
#undef HAVE_PTHREAD_GETSPECIFIC
More information about the llvm-commits
mailing list