diff options
author | Emil Velikov <[email protected]> | 2016-11-27 00:25:28 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-19 19:44:15 +0100 |
commit | acf3d2afab0571b74c0c0d1aee0f631b33fdc7da (patch) | |
tree | a14f1e451c4f601340d0b2ab7063f72a98f1769e /configure.ac | |
parent | 8212fc95b59d0dd3cae1fe11359e0fa96d75e1bc (diff) |
configure: check once for DRI3 dependencies
Currently we are having the XCB_DRI3 dependencies duplicated,
partially.
Just do a once-off check and add all of the respective CFLAGS/LIBS
where needed.
As a nice side effect this helps us solve a couple of FIXMEs.
DRI3 is not a thing w/o X11 so disable it in such cases.
Cc: [email protected]
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index e6dcea73293..14f0c6e3c80 100644 --- a/configure.ac +++ b/configure.ac @@ -1536,15 +1536,10 @@ xdri) PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED" + if test x"$enable_dri" = xyes; then dri_modules="$dri_modules xcb-dri2 >= $XCBDRI2_REQUIRED" fi - - if test x"$enable_dri3" = xyes; then - PKG_CHECK_EXISTS([xcb >= $XCB_REQUIRED], [], AC_MSG_ERROR([DRI3 requires xcb >= $XCB_REQUIRED])) - dri3_modules="xcb xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED" - PKG_CHECK_MODULES([XCB_DRI3], [$dri3_modules]) - fi fi if test x"$dri_platform" = xapple ; then DEFINES="$DEFINES -DGLX_USE_APPLEGL" @@ -1725,6 +1720,13 @@ if test "x$enable_glx" != xno; then fi fi +if test x"$enable_dri3" = xyes; then + DEFINES="$DEFINES -DHAVE_DRI3" + + dri3_modules="x11-xcb xcb >= $XCB_REQUIRED xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED" + PKG_CHECK_MODULES([XCB_DRI3], [$dri3_modules]) +fi + AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11') AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, echo "$platforms" | grep -q 'wayland') AM_CONDITIONAL(HAVE_PLATFORM_DRM, echo "$platforms" | grep -q 'drm') @@ -1773,10 +1775,6 @@ if test "x$enable_dri" = xyes; then # Platform specific settings and drivers to build case "$host_os" in linux*) - if test "x$enable_dri3" = xyes; then - DEFINES="$DEFINES -DHAVE_DRI3" - fi - case "$host_cpu" in powerpc* | sparc*) # Build only the drivers for cards that exist on PowerPC/sparc @@ -2088,12 +2086,7 @@ if test "x$enable_xvmc" = xyes -o \ "x$enable_vdpau" = xyes -o \ "x$enable_omx" = xyes -o \ "x$enable_va" = xyes; then - if test x"$enable_dri3" = xyes; then - PKG_CHECK_MODULES([VL], [xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED - xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED]) - else - PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED]) - fi + PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED]) need_gallium_vl_winsys=yes fi AM_CONDITIONAL(NEED_GALLIUM_VL_WINSYS, test "x$need_gallium_vl_winsys" = xyes) |