attempts to fix recursive mutex initialized detection under RedHat 7.1 (new glibc)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
30
configure.in
30
configure.in
@@ -587,9 +587,29 @@ if test "$USE_BEOS" = 1; then
|
|||||||
INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS be"
|
INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS be"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Linux: test for libc5/glibc2: glibc2 has gettext() included
|
dnl check for glibc version
|
||||||
if test "$USE_LINUX" = 1; then
|
if test "$USE_LINUX" = 1; then
|
||||||
AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2))
|
AC_CACHE_CHECK([for glibc version], wx_lib_glibc21,
|
||||||
|
AC_TRY_COMPILE([#include <features.h>],
|
||||||
|
[
|
||||||
|
#if !__GLIBC_PREREQ(2, 1)
|
||||||
|
#error not glibc2.1
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(2.1 or later),
|
||||||
|
wx_lib_glibc21=yes
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(less than 2.1),
|
||||||
|
wx_lib_glibc21=no
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$wx_lib_glibc21" = "yes"; then
|
||||||
|
AC_DEFINE(wxHAVE_GLIBC2))
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
@@ -3054,6 +3074,12 @@ if test "$wxUSE_THREADS" = "yes" ; then
|
|||||||
dnl defined, we do it by directly assigned
|
dnl defined, we do it by directly assigned
|
||||||
dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
|
dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
|
||||||
|
|
||||||
|
dnl we need to define _XOPEN_SOURCE=500 to get PTHREAD_MUTEX_RECURSIVE
|
||||||
|
dnl with glibc 2.1+, it probably shouldn't hurt elsewhere?
|
||||||
|
if test "x$wx_lib_glibc21" = "xyes"; then
|
||||||
|
CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
|
AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
|
||||||
[
|
[
|
||||||
AC_TRY_COMPILE([#include <pthread.h>],
|
AC_TRY_COMPILE([#include <pthread.h>],
|
||||||
|
Reference in New Issue
Block a user