autotools, cmake: test Xfixes along with XInput2.h:

because we use Xfixes with XIBarrierReleasePointer
This commit is contained in:
Ozkan Sezer 2021-11-12 12:55:50 +03:00
parent c3a4a6a033
commit fa3330baec
3 changed files with 9 additions and 4 deletions

View File

@ -525,14 +525,15 @@ macro(CheckX11)
endif() endif()
endif() endif()
if(SDL_X11_XFIXES AND HAVE_XFIXES_H) # check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H)
if(HAVE_X11_SHARED AND XFIXES_LIB) if(HAVE_X11_SHARED AND XFIXES_LIB)
set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"") set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
else() else()
list(APPEND EXTRA_LIBS ${XFIXES_LIB}) list(APPEND EXTRA_LIBS ${XFIXES_LIB})
endif() endif()
set(SDL_VIDEO_DRIVER_X11_XFIXES 1) set(SDL_VIDEO_DRIVER_X11_XFIXES 1)
set(HAVE_VIDEO_X11_XFIXES TRUE) set(HAVE_X11_XFIXES TRUE)
endif() endif()
if(SDL_X11_XRANDR AND HAVE_XRANDR_H) if(SDL_X11_XRANDR AND HAVE_XRANDR_H)

4
configure vendored
View File

@ -21502,8 +21502,10 @@ fi
if test x$enable_video_x11_xfixes = xyes; then if test x$enable_video_x11_xfixes = xyes; then
definitely_enable_video_x11_xfixes=no definitely_enable_video_x11_xfixes=no
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xfixes.h" "ac_cv_header_X11_extensions_Xfixes_h" "#include <X11/Xlib.h> ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xfixes.h" "ac_cv_header_X11_extensions_Xfixes_h" "#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/extensions/XInput2.h>
" "
if test "x$ac_cv_header_X11_extensions_Xfixes_h" = xyes; then : if test "x$ac_cv_header_X11_extensions_Xfixes_h" = xyes; then :
have_xfixes_h_hdr=yes have_xfixes_h_hdr=yes

View File

@ -1974,11 +1974,13 @@ XITouchClassInfo *t;
, enable_video_x11_xfixes=yes) , enable_video_x11_xfixes=yes)
if test x$enable_video_x11_xfixes = xyes; then if test x$enable_video_x11_xfixes = xyes; then
definitely_enable_video_x11_xfixes=no definitely_enable_video_x11_xfixes=no
# check along with XInput2.h because we use Xfixes with XIBarrierReleasePointer
AC_CHECK_HEADER(X11/extensions/Xfixes.h, AC_CHECK_HEADER(X11/extensions/Xfixes.h,
have_xfixes_h_hdr=yes, have_xfixes_h_hdr=yes,
have_xfixes_h_hdr=no, have_xfixes_h_hdr=no,
[#include <X11/Xlib.h> [#include <X11/Xlib.h>
]) #include <X11/Xproto.h>
#include <X11/extensions/XInput2.h>])
if test x$have_xfixes_h_hdr = xyes; then if test x$have_xfixes_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xfixes_lib != x ; then if test x$enable_x11_shared = xyes && test x$xfixes_lib != x ; then
echo "-- dynamic libXfixes -> $xfixes_lib" echo "-- dynamic libXfixes -> $xfixes_lib"