mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-05 06:28:02 +02:00
If thread-safety-constructor is enabled, link against pthreads not stubs
Only really makes a difference if pthreads is not in libc. Fixes: #162 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
bfe5d2dd98
commit
1f8fd7ff1c
2 changed files with 9 additions and 3 deletions
11
configure.ac
11
configure.ac
|
|
@ -222,9 +222,6 @@ xyes)
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_LIB(c, pthread_self, [thrstubs="no"], [thrstubs="yes"])
|
||||
AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes)
|
||||
|
||||
# XXX incomplete, please fill this in
|
||||
if test x$xthreads = xyes ; then
|
||||
case $host_os in
|
||||
|
|
@ -245,6 +242,14 @@ fi
|
|||
AC_SUBST(XTHREADLIB)
|
||||
AC_SUBST(XTHREAD_CFLAGS)
|
||||
|
||||
if test "x$USE_THREAD_SAFETY_CONSTRUCTOR" = "xyes"; then
|
||||
USE_THREAD_LIBS="$XTHREADLIB"
|
||||
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])], )
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ libX11_la_LIBADD = \
|
|||
$(USE_I18N_LIBS) \
|
||||
$(USE_XCMS_LIBS) \
|
||||
$(USE_XKB_LIBS) \
|
||||
$(USE_THREAD_LIBS) \
|
||||
$(X11_LIBS)
|
||||
|
||||
preprocess: $(patsubst %.c,%.ii,$(libX11_la_SOURCES))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue