Mesa (master): egl_dri2: Use pkg-config cflags and libs from configure output

Kristian Høgsberg krh at kemper.freedesktop.org
Fri Feb 5 18:56:49 UTC 2010


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

Author: Kristian Høgsberg <krh at bitplanet.net>
Date:   Fri Feb  5 13:55:32 2010 -0500

egl_dri2: Use pkg-config cflags and libs from configure output

Running pkg-config in Makefiles is bad form, since it doesn't respect the
PKG_CONFIG_PATH value set at ./configure time.

---

 configs/autoconf.in           |    3 +++
 configure.ac                  |    4 ++--
 src/egl/drivers/dri2/Makefile |    5 ++---
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/configs/autoconf.in b/configs/autoconf.in
index b0024ec..3063787 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -153,3 +153,6 @@ GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@
 GLW_PC_CFLAGS = @GLW_PC_CFLAGS@
 OSMESA_PC_REQ = @OSMESA_PC_REQ@
 OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
+
+EGL_DRI2_CFLAGS = @EGL_DRI2_CFLAGS@
+EGL_DRI2_LIBS = @EGL_DRI2_LIBS@
diff --git a/configure.ac b/configure.ac
index af5a5fd..b6c6535 100644
--- a/configure.ac
+++ b/configure.ac
@@ -918,8 +918,8 @@ if test "x$enable_egl" = xyes; then
         fi
 
         # build egl_dri2 when xcb-dri2 is available
-        PKG_CHECK_EXISTS([x11-xcb xcb-dri2 xcb-xfixes],
-			 [have_xcb_dri2=yes],[have_xcb_dri2=no])
+        PKG_CHECK_MODULES([EGL_DRI2], [x11-xcb xcb-dri2 xcb-xfixes libdrm],
+			  [have_xcb_dri2=yes],[have_xcb_dri2=no])
         if test "$have_xcb_dri2" = yes; then
             EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS dri2"
         fi
diff --git a/src/egl/drivers/dri2/Makefile b/src/egl/drivers/dri2/Makefile
index 95f9574..129e67b 100644
--- a/src/egl/drivers/dri2/Makefile
+++ b/src/egl/drivers/dri2/Makefile
@@ -11,9 +11,8 @@ EGL_INCLUDES = \
 	-I$(TOP)/src/egl/main \
 	-I$(TOP)/src/mesa \
 	-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
-	$(shell pkg-config --cflags xcb-dri2 xcb-xfixes x11-xcb libdrm)
+	$(EGL_DRI2_CFLAGS)
 
-EGL_CFLAGS =
-EGL_LIBS = $(shell pkg-config --libs xcb-dri2 xcb-xfixes x11-xcb libdrm)
+EGL_LIBS = $(EGL_DRI2_LIBS)
 
 include ../Makefile.template




More information about the mesa-commit mailing list