mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Look for pthreads functionality in libc.
If there is no libpthread, look for pthreads functionality in libc before failing to configure pthreads. This is necessary on at least the Android platform. Reported by Mike Hommey.
This commit is contained in:
parent
6508bc6931
commit
39006f9907
1 changed files with 4 additions and 1 deletions
|
|
@ -746,8 +746,11 @@ dnl ============================================================================
|
|||
dnl Configure pthreads.
|
||||
|
||||
AC_CHECK_HEADERS([pthread.h], , [AC_MSG_ERROR([pthread.h is missing])])
|
||||
dnl Some systems may embed pthreads functionality in libc; check for libpthread
|
||||
dnl first, but try libc too before failing.
|
||||
AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS -lpthread"],
|
||||
[AC_MSG_ERROR([libpthread is missing])])
|
||||
[AC_SEARCH_LIBS([pthread_create], , ,
|
||||
AC_MSG_ERROR([libpthread is missing]))])
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue