From ce5d11ca33710ffdb1c5b6dd3cf50c21e191a7f4 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 18 Jul 2010 13:09:18 +0000 Subject: [PATCH] Fix build on GNU/Hurd Only require libdrm if direct rendering is actually enabled. From the Debian patch file '05_hurd-ftbfs.diff' by Samuel Thibault. --- configure.ac | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index d6d37d2..4fa0674 100644 --- a/configure.ac +++ b/configure.ac @@ -557,6 +557,13 @@ else enable_xcb=no fi +dnl Direct rendering or just indirect rendering +AC_ARG_ENABLE([driglx-direct], + [AS_HELP_STRING([--disable-driglx-direct], + [enable direct rendering in GLX and EGL for DRI @<:@default=enabled@:>@])], + [driglx_direct="$enableval"], + [driglx_direct="yes"]) + dnl dnl libGL configuration per driver dnl @@ -590,12 +597,15 @@ dri) AC_MSG_ERROR([Can't use static libraries for DRI drivers]) fi - # Check for libdrm - PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) - PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) - PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED]) - GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED" - DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" + if test x"$driglx_direct" = xyes; then + # Check for libdrm + PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) + PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) + PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED]) + GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED \ + dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED" + DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" + fi # find the DRI deps for libGL if test "$x11_pkgconfig" = yes; then @@ -678,12 +688,6 @@ AC_ARG_WITH([dri-searchpath], [DRI_DRIVER_SEARCH_DIR="$withval"], [DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}']) AC_SUBST([DRI_DRIVER_SEARCH_DIR]) -dnl Direct rendering or just indirect rendering -AC_ARG_ENABLE([driglx-direct], - [AS_HELP_STRING([--disable-driglx-direct], - [enable direct rendering in GLX and EGL for DRI @<:@default=enabled@:>@])], - [driglx_direct="$enableval"], - [driglx_direct="yes"]) dnl Which drivers to build - default is chosen by platform AC_ARG_WITH([dri-drivers], [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@], -- 1.5.4.3