summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-12 07:19:13 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-12 07:19:13 +0000
commit9e4f701e91b64ef5be97ff9d70b1f36f896a92d4 (patch)
treebd62a282eb2d1e01df7cddadaf60bf2d9e19360c /autoconf
parent46c53054d0af0a99edf98309ff11affe92a17f19 (diff)
downloadllvm-9e4f701e91b64ef5be97ff9d70b1f36f896a92d4.tar.gz
llvm-9e4f701e91b64ef5be97ff9d70b1f36f896a92d4.tar.bz2
llvm-9e4f701e91b64ef5be97ff9d70b1f36f896a92d4.tar.xz
In support of PR418:
Make sure that -lpthread gets added to LIBS variable which puts it at the end of the tools' link commands, if libpthread.a is found. Add a test for pthread.h so we can use #ifdef HAVE_PTHREAD_H git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index da583cac4d..1c3bc1372c 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -417,6 +417,7 @@ dnl===-----------------------------------------------------------------------===
dnl libelf is for sparc only; we can ignore it if we don't have it
AC_CHECK_LIB(elf, elf_begin)
+
dnl lt_dlopen may be required for plugin support.
AC_SEARCH_LIBS(lt_dlopen,ltdl,AC_DEFINE([HAVE_LT_DLOPEN],[1],
[Define if lt_dlopen() is available on this platform]),
@@ -434,6 +435,7 @@ AC_SEARCH_LIBS(mallinfo,malloc,AC_DEFINE([HAVE_MALLINFO],[1],
dnl pthread locking functions are optional - but llvm will not be thread-safe
dnl without locks.
+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]))
@@ -456,7 +458,8 @@ AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h inttypes.h limits.h link.h])
-AC_CHECK_HEADERS([malloc.h signal.h stdint.h unistd.h utime.h windows.h])
+AC_CHECK_HEADERS([malloc.h pthread.h signal.h stdint.h unistd.h utime.h])
+AC_CHECK_HEADERS([windows.h])
AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h sys/types.h])
AC_CHECK_HEADERS([rw/stdex/hash_map.h rw/stdex/hash_set.h])