On 27/01/2012 20:20, Matt Turner wrote:
> On Fri, Jan 27, 2012 at 8:11 PM, Jon TURNEY wrote:
>> On 27/01/2012 08:03, Eric Anholt wrote:
>>> On Thu, 26 Jan 2012 16:32:24 -0800 (PST), matts...@kemper.freedesktop.org 
>>> (Matt Turner) wrote:
>>>> Module: Mesa
>>>> Branch: master
>>>> Commit: 80aa78142d12b21dd7d4f0edc786af98a159a80f
>>>> URL:    
>>>> http://cgit.freedesktop.org/mesa/mesa/commit/?id=80aa78142d12b21dd7d4f0edc786af98a159a80f
>>>>
>>>> Author: Matt Turner <matts...@gmail.com>
>>>> Date:   Thu Jan 26 19:31:12 2012 -0500
>>>>
>>>> dri: make sure to build libdricommon.la
>>>
>>> Ouch.  Sorry about this, folks, I built with a dirty tree and didn't
>>> notice that the rebase off of the drirc changes wasn't good enough.
>>
>> This commit breaks the ability to build when ./configured -with-driver=dri
>> --disable-driglx-direct --with-dri-drivers=swrast for platforms which don't
>> have DRM (See [1]), as it tries to build libdricommon.la even if we aren't
>> building a dri driver which requires it.
>>
>> Attached is a patch which fixes this, although I'm not sure if that's the 
>> best
>> way of solving this problem (it might make more sense to conditionalize on
>> DRI_DIRS containing something other than swrast if all dri drivers are going
>> to use libdricommon)

Attached is a patch which fixes this the other way, which I think is probably
better.

> and it looks like swrast is still broken anyway. It should have
> ../common/utils.c ../common/drisw_util.c in its sources.

I can't see a problem?  These are included in SWRAST_C_FILES via
SWRAST_COMMON_FILES
>From 97438ef51aaed032ced49f9ab2568a57969176df Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.tur...@dronecode.org.uk>
Date: Thu, 2 Feb 2012 10:39:04 +0000
Subject: [PATCH] dri: Don't build libdricommon.la if we don't need it

Refine 80aa78142d12b21dd7d4f0edc786af98a159a80f "dri: make sure to build 
libdricommon.la"
so we don't build libdricommon if we aren't building a dri driver which needs 
it (i.e.
if we are just building swrast)

In particular, this restores the ability to build the swrast dri driver without 
having to
have a xf86drm.h

Signed-off-by: Jon TURNEY <jon.tur...@dronecode.org.uk>
---
 configure.ac                     |    6 +++++-
 src/mesa/drivers/dri/Makefile.am |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index f7c0814..7af8319 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1240,11 +1240,14 @@ if test "x$enable_dri" = xyes; then
        LIBS="$save_LIBS"
     fi
 
-    # libdrm is required for all except swrast
+    # if we are building any dri driver other than swrast ...
     if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast; then
+        # ... libdrm is required
         if test "x$have_libdrm" != xyes; then
             AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
         fi
+        # ... and build dricommon
+        HAVE_COMMON_DRI=yes
     fi
 
     # put all the necessary libs together
@@ -1309,6 +1312,7 @@ AM_CONDITIONAL(HAVE_NOUVEAU_DRI, test x$HAVE_NOUVEAU_DRI 
= xyes)
 AM_CONDITIONAL(HAVE_R200_DRI, test x$HAVE_R200_DRI = xyes)
 AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
 AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
+AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes)
 
 dnl
 dnl OSMesa configuration
diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
index 8b93582..48d3685 100644
--- a/src/mesa/drivers/dri/Makefile.am
+++ b/src/mesa/drivers/dri/Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = common
+SUBDIRS =
+
+if HAVE_COMMON_DRI
+SUBDIRS+=common
+endif
 
 if HAVE_I915_DRI
 SUBDIRS+=i915
-- 
1.7.5.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to