summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-04 11:24:57 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-08 13:00:52 -0700
commit701e9e9afb88bdc68c84a4611adc533400a3df36 (patch)
tree84c543027ef122f1cc0421411e9249d386267be6 /configure.ac
parent1d11822601fd24a396b354fa616b04ed3df8b4ef (diff)
downloadxorg-lib-libX11-701e9e9afb88bdc68c84a4611adc533400a3df36.tar.gz
Use same pthread-stubs as libxcb
Avoid conflicts when libX11 calls libxcb and gets its pthread functions overriding our ancient stubs. v2: Keep linking with real threads libraries when thread safety constructor is enabled. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 31fe60b3..3cf7f602 100644
--- a/configure.ac
+++ b/configure.ac
@@ -243,13 +243,16 @@ AC_SUBST(XTHREADLIB)
AC_SUBST(XTHREAD_CFLAGS)
if test "x$USE_THREAD_SAFETY_CONSTRUCTOR" = "xyes"; then
- USE_THREAD_LIBS="$XTHREADLIB"
+ USE_THREAD_LIBS="$XTHREADLIB"
+else
+ # This should be kept in sync with libxcb
+ case $host_os in
+ linux*|darwin*|solaris*) ;;
+ *) X11_REQUIRES="$X11_REQUIRES pthread-stubs" ;;
+ esac
fi
AC_SUBST(USE_THREAD_LIBS)
-AC_CHECK_LIB(c, pthread_self, [thrstubs="no"], [thrstubs="yes"], [$USE_THREAD_LIBS])
-AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes)
-
AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
#
@@ -443,7 +446,6 @@ echo " Loadable xcursor library support: "$XLIB_LOADABLE_XCURSOR
echo " Threading support: "$xthreads
echo " Use Threads safe API: "$mtsafeapi
echo " Use thread safety constructor: "$USE_THREAD_SAFETY_CONSTRUCTOR
-echo " Threads stubs in libX11: "$thrstubs
echo " XCMS: "$XCMS
echo " Internationalization support: "$XLOCALE
echo " XF86BigFont support: "$XF86BIGFONT