diff options
author | Dave Airlie <[email protected]> | 2018-03-14 06:06:00 +1000 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-03-16 13:19:45 -0400 |
commit | 7aeef2d4efdc809a698e9b983c8be8e4ccb27134 (patch) | |
tree | 600be5aa6efe62480995686d8c740ec6f58bbba7 /configure.ac | |
parent | f099c3aef1635f05f295969d296375fe9983a53a (diff) |
dri3: allow building against older xcb (v3)
I'm not sure everyone wants to be updating their dri3 in a forced
march setting, this allows a nicer approach, esp when you want
to build on distro that aren't brand new.
I'm sure there are plenty of ways this patch could be cleaner,
and I've also not built it against an updated dri3.
For meson I've just left it alone, since if you are using meson
you probably don't mind xcb updates, and if you are using meson
you can fix this better than me.
v3: just don't put a version in for dri3/present without
modifiers, should allow building with 1.11 as well
(feel free to supply meson followups)
Signed-off-by: Dave Airlie <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 8ec5b26b6dc..d1c8bb82dae 100644 --- a/configure.ac +++ b/configure.ac @@ -92,9 +92,9 @@ WAYLAND_REQUIRED=1.11 WAYLAND_PROTOCOLS_REQUIRED=1.8 XCB_REQUIRED=1.9.3 XCBDRI2_REQUIRED=1.8 -XCBDRI3_REQUIRED=1.13 +XCBDRI3_MODIFIERS_REQUIRED=1.13 XCBGLX_REQUIRED=1.8.1 -XCBPRESENT_REQUIRED=1.13 +XCBPRESENT_MODIFIERS_REQUIRED=1.13 XDAMAGE_REQUIRED=1.1 XSHMFENCE_REQUIRED=1.1 XVMC_REQUIRED=1.0.6 @@ -1850,8 +1850,14 @@ fi if test x"$enable_dri3" = xyes; then DEFINES="$DEFINES -DHAVE_DRI3" - dri3_modules="x11-xcb xcb >= $XCB_REQUIRED xcb-dri3 >= $XCBDRI3_REQUIRED xcb-xfixes xcb-present >= $XCBPRESENT_REQUIRED xcb-sync xshmfence >= $XSHMFENCE_REQUIRED" + dri3_modules="x11-xcb xcb >= $XCB_REQUIRED xcb-dri3 xcb-xfixes xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED" PKG_CHECK_MODULES([XCB_DRI3], [$dri3_modules]) + dri3_modifier_modules="xcb-dri3 >= $XCBDRI3_MODIFIERS_REQUIRED xcb-present >= $XCBPRESENT_MODIFIERS_REQUIRES" + PKG_CHECK_MODULES([XCB_DRI3_MODIFIERS], [$dri3_modifier_modules], [have_dri3_modifiers=yes], [have_dri3_modifiers=no]) + + if test "x$have_dri3_modifiers" == xyes; then + DEFINES="$DEFINES -DHAVE_DRI3_MODIFIERS" + fi fi AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11') |