autotools, cmake: tighten Xfixes check && explicitly test BarrierEventID

Apparently the older versions of libXi doesn't have it.  Fixes the build
break issue reported at:
4b42c05ba1 (commitcomment-61427659)
This commit is contained in:
Ozkan Sezer
2021-12-06 20:37:52 +03:00
parent a709b5b602
commit 03019c912a
4 changed files with 42 additions and 15 deletions

View File

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