Mesa (master): dri: Don't build libdricommon.la if we don't need it

Jon TURNEY jturney at kemper.freedesktop.org
Mon Feb 6 11:11:25 UTC 2012


Module: Mesa
Branch: master
Commit: ffc8494db556f9e95b4bcc3d3c49d7c48b4e2f41
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ffc8494db556f9e95b4bcc3d3c49d7c48b4e2f41

Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Thu Feb  2 10:39:04 2012 +0000

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.turney at 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 e859d4c..af1e914 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




More information about the mesa-commit mailing list