egl_dri2: Use pkg-config cflags and libs from configure output
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 5 Feb 2010 18:55:32 +0000 (13:55 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 5 Feb 2010 18:55:45 +0000 (13:55 -0500)
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
configure.ac
src/egl/drivers/dri2/Makefile

index b0024ec689960728cfab240c9a58cdcd7d3fdbf7..30637877f3b37ddcd614ba496da1f689f7534c71 100644 (file)
@@ -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@
index af5a5fdc4b73698e6323ed3213f353995ea6a954..b6c6535fc6e547bcc3f7adbce9707247aa779529 100644 (file)
@@ -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
index 95f957453110caf0222d91c10bfd369349f60726..129e67b8c6643a6aa7e5424618ec7781e092a044 100644 (file)
@@ -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