This will bo tracking also enabled in mesa if it is enabled in libdrm tough 
pkg-config.

Signed-off-by: Pauli Nieminen <[email protected]>
---
 configure.ac                      |   14 ++++++++++++++
 libdrm/radeon/Makefile.am         |    1 +
 libdrm/radeon/libdrm_radeon.pc.in |    3 ++-
 3 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index b59b16d..56b1f53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,11 @@ AC_ARG_ENABLE(radeon-experimental-api,
              [Enable support for radeon's KMS API (default: disabled)]),
              [RADEON=$enableval], [RADEON=no])
 
+AC_ARG_ENABLE(radeon-track-bos,
+                         AS_HELP_STRING([--enable-radeon-track-bos],
+                         [Enable debugging of buffer object ussage in radeon 
(default:disabled)]),
+                         [RADEON_TRACK_BO=$enableval], [RADEON_TRACK_BO=no])
+
 dnl ===========================================================================
 dnl check compiler flags
 AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
@@ -136,6 +141,15 @@ fi
 AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
 
 AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" = xyes])
+AM_CONDITIONAL(HAVE_RADEON_TRACK_BO, [test "x$RADEON_TRACK_BO" = xyes])
+
+
+if test "x$RADEON_TRACK_BO" = xyes; then
+       RADEON_TRACK_BO_DEFINE="-DRADEON_TRACK_BO=1"
+else
+       RADEON_TRACK_BO_DEFINE=
+fi
+AC_SUBST(RADEON_TRACK_BO_DEFINE)
 
 PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
 if test "x$HAVE_CAIRO" = xyes; then
diff --git a/libdrm/radeon/Makefile.am b/libdrm/radeon/Makefile.am
index 2892267..46b8575 100644
--- a/libdrm/radeon/Makefile.am
+++ b/libdrm/radeon/Makefile.am
@@ -27,6 +27,7 @@ AM_CFLAGS = \
        $(CWARNFLAGS) \
        -I$(top_srcdir)/libdrm \
        -I$(top_srcdir)/libdrm/radeon \
+       $(RADEON_TRACK_BO_DEFINE) \
        $(PTHREADSTUBS_CFLAGS) \
        -I$(top_srcdir)/shared-core
 
diff --git a/libdrm/radeon/libdrm_radeon.pc.in 
b/libdrm/radeon/libdrm_radeon.pc.in
index 3306844..e84ac1d 100644
--- a/libdrm/radeon/libdrm_radeon.pc.in
+++ b/libdrm/radeon/libdrm_radeon.pc.in
@@ -2,9 +2,10 @@ pref...@prefix@
 exec_pref...@exec_prefix@
 libd...@libdir@
 included...@includedir@
+track_deb...@radeon_track_bo_define@
 
 Name: libdrm_radeon
 Description: Userspace interface to kernel DRM services for radeon
 Version: 1.0.1
 Libs: -L${libdir} -ldrm_radeon
-Cflags: -I${includedir} -I${includedir}/drm
+Cflags: -I${includedir} -I${includedir}/drm ${track_debug}
-- 
1.6.3.3


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to