[Mesa-dev] [PATCH] configure: replace pkg-config calls $(PKG_CONFIG) in the makefiles.

Stéphane Marchesin marcheu at chromium.org
Mon Oct 3 15:20:45 PDT 2011


Us poor souls who cross compile mesa want to be able to specify which pkg-config to pick, or at least just change one place.
---
 configs/default                               |    1 +
 configs/freebsd-dri                           |    4 ++--
 configs/linux-dri                             |   16 ++++++++--------
 configs/linux-dri-xcb                         |   10 +++++-----
 configs/linux-egl                             |    4 ++--
 configs/linux-llvm                            |    2 +-
 src/egl/wayland/wayland-drm/Makefile          |    4 ++--
 src/gallium/state_trackers/dri/drm/Makefile   |    2 +-
 src/gallium/state_trackers/egl/Makefile       |    6 +++---
 src/gallium/state_trackers/va/Makefile        |    2 +-
 src/gallium/state_trackers/vdpau/Makefile     |    2 +-
 src/gallium/state_trackers/xorg/Makefile      |    8 ++++----
 src/gallium/state_trackers/xorg/xvmc/Makefile |    2 +-
 src/gallium/targets/Makefile.xorg             |    2 +-
 src/gallium/targets/dri-nouveau/Makefile      |    2 +-
 src/gallium/targets/va-r300/Makefile          |    2 +-
 src/gallium/targets/va-r600/Makefile          |    2 +-
 src/gallium/targets/vdpau-r300/Makefile       |    2 +-
 src/gallium/targets/vdpau-r600/Makefile       |    2 +-
 src/gallium/targets/xorg-i915/Makefile        |    2 +-
 src/gallium/targets/xorg-i965/Makefile        |    2 +-
 src/gallium/targets/xorg-nouveau/Makefile     |    4 ++--
 src/gallium/targets/xorg-r300/Makefile        |    2 +-
 src/gallium/targets/xorg-r600/Makefile        |    2 +-
 src/gallium/targets/xvmc-nouveau/Makefile     |    2 +-
 src/gallium/targets/xvmc-r300/Makefile        |    2 +-
 src/gallium/targets/xvmc-r600/Makefile        |    2 +-
 src/gallium/winsys/g3dvl/dri/Makefile         |    2 +-
 src/gallium/winsys/i915/drm/Makefile          |    4 ++--
 src/gallium/winsys/i965/drm/Makefile          |    4 ++--
 src/gallium/winsys/nouveau/drm/Makefile       |    4 ++--
 src/gallium/winsys/radeon/drm/Makefile        |    2 +-
 src/gallium/winsys/svga/drm/Makefile          |    4 ++--
 src/mesa/drivers/dri/i915/Makefile            |    2 +-
 34 files changed, 58 insertions(+), 57 deletions(-)

diff --git a/configs/default b/configs/default
index 4366611..2b1bf9b 100644
--- a/configs/default
+++ b/configs/default
@@ -40,6 +40,7 @@ MKDEP_OPTIONS = -fdepend
 MAKE = make
 FLEX = flex
 BISON = bison
+PKG_CONFIG = pkg-config
 
 # Use MINSTALL for installing libraries, INSTALL for everything else
 MINSTALL = $(SHELL) $(TOP)/bin/minstall
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index c4169b8..9e810c4 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -32,8 +32,8 @@ MESA_ASM_SOURCES =
 # Library/program dependencies
 MESA_MODULES  = $(TOP)/src/mesa/libmesa.a
 
-LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
-LIBDRM_LIB = `pkg-config --libs libdrm`
+LIBDRM_CFLAGS = `$(PKG_CONFIG) --cflags libdrm`
+LIBDRM_LIB = `$(PKG_CONFIG) --libs libdrm`
 DRI_LIB_DEPS = $(MESA_MODULES) -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
 GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
 	-lm -pthread $(LIBDRM_LIB)
diff --git a/configs/linux-dri b/configs/linux-dri
index 26c73cc..a3e9bab 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -44,8 +44,8 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib
 
 MESA_MODULES  = $(TOP)/src/mesa/libmesa.a
 
-LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
-LIBDRM_LIB = $(shell pkg-config --libs libdrm)
+LIBDRM_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm)
+LIBDRM_LIB = $(shell $(PKG_CONFIG) --libs libdrm)
 DRI_LIB_DEPS  = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
 GL_LIB_DEPS   = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
 		-lm -lpthread -ldl $(LIBDRM_LIB)
@@ -64,13 +64,13 @@ GALLIUM_STATE_TRACKERS_DIRS = egl
 
 DRI_DIRS = i915 i965 nouveau r200 r300 r600 radeon swrast
 
-INTEL_LIBS = $(shell pkg-config --libs libdrm_intel)
-INTEL_CFLAGS = $(shell pkg-config --cflags libdrm_intel)
+INTEL_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_intel)
+INTEL_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_intel)
 
-NOUVEAU_LIBS = $(shell pkg-config --libs libdrm_nouveau)
-NOUVEAU_CFLAGS = $(shell pkg-config --cflags libdrm_nouveau)
+NOUVEAU_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_nouveau)
+NOUVEAU_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_nouveau)
 
-LIBDRM_RADEON_LIBS = $(shell pkg-config --libs libdrm_radeon)
-LIBDRM_RADEON_CFLAGS = $(shell pkg-config --cflags libdrm_radeon)
+LIBDRM_RADEON_LIBS = $(shell $(PKG_CONFIG) --libs libdrm_radeon)
+LIBDRM_RADEON_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm_radeon)
 RADEON_CFLAGS = "-DHAVE_LIBDRM_RADEON=1 $(LIBDRM_RADEON_CFLAGS)"
 RADEON_LDFLAGS = $(LIBDRM_RADEON_LIBS)
diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb
index a845f71..6968beb 100644
--- a/configs/linux-dri-xcb
+++ b/configs/linux-dri-xcb
@@ -25,7 +25,7 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
 	-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
         -DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN
 
-X11_INCLUDES = $(shell pkg-config --cflags-only-I x11) $(shell pkg-config --cflags-only-I xcb) $(shell pkg-config --cflags-only-I x11-xcb) $(shell pkg-config --cflags-only-I xcb-glx)
+X11_INCLUDES = $(shell $(PKG_CONFIG) --cflags-only-I x11) $(shell $(PKG_CONFIG) --cflags-only-I xcb) $(shell $(PKG_CONFIG) --cflags-only-I x11-xcb) $(shell $(PKG_CONFIG) --cflags-only-I xcb-glx)
 
 CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
 	$(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math 
@@ -39,15 +39,15 @@ CXXFLAGS += -fno-strict-aliasing
 MESA_ASM_SOURCES = 
 
 # Library/program dependencies
-EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11)
+EXTRA_LIB_PATH=$(shell $(PKG_CONFIG) --libs-only-L x11)
 
 MESA_MODULES  = $(TOP)/src/mesa/libmesa.a
 
-LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
-LIBDRM_LIB = $(shell pkg-config --libs libdrm)
+LIBDRM_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm)
+LIBDRM_LIB = $(shell $(PKG_CONFIG) --libs libdrm)
 DRI_LIB_DEPS  = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
 GL_LIB_DEPS   = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
-                $(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
+                $(LIBDRM_LIB) $(shell $(PKG_CONFIG) --libs xcb) $(shell $(PKG_CONFIG) --libs x11-xcb) $(shell $(PKG_CONFIG) --libs xcb-glx)
 
 SRC_DIRS = glx gallium mesa glu
 
diff --git a/configs/linux-egl b/configs/linux-egl
index 216bcba..2c8bfdd 100644
--- a/configs/linux-egl
+++ b/configs/linux-egl
@@ -40,8 +40,8 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib
 
 MESA_MODULES  = $(TOP)/src/mesa/libmesa.a
 
-LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
-LIBDRM_LIB = $(shell pkg-config --libs libdrm)
+LIBDRM_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm)
+LIBDRM_LIB = $(shell $(PKG_CONFIG) --libs libdrm)
 DRI_LIB_DEPS  = $(MESA_MODULES) $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
 GL_LIB_DEPS   = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
 		-lm -lpthread -ldl \
diff --git a/configs/linux-llvm b/configs/linux-llvm
index ef6c7bb..259d8ac 100644
--- a/configs/linux-llvm
+++ b/configs/linux-llvm
@@ -44,4 +44,4 @@ LD = g++
 GL_LIB_DEPS = $(LLVM_LDFLAGS) $(LLVM_LIBS) $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -lstdc++
 
 # to allow the NV drivers to compile
-LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
+LIBDRM_CFLAGS = $(shell $(PKG_CONFIG) --cflags libdrm)
diff --git a/src/egl/wayland/wayland-drm/Makefile b/src/egl/wayland/wayland-drm/Makefile
index bc010b6..42222a9 100644
--- a/src/egl/wayland/wayland-drm/Makefile
+++ b/src/egl/wayland/wayland-drm/Makefile
@@ -16,8 +16,8 @@ wayland_drm_INCLUDES = \
 		-I$(TOP)/include
 
 # Generate protocol sources
-prefix=$(shell pkg-config --variable=prefix wayland-server)
-exec_prefx=$(shell pkg-config --variable=exec_prefix wayland-server)
+prefix=$(shell $(PKG_CONFIG) --variable=prefix wayland-server)
+exec_prefx=$(shell $(PKG_CONFIG) --variable=exec_prefix wayland-server)
 wayland_protocoldir = $(PWD)/protocol
 wayland_scanner=$(exec_prefix)/bin/wayland-scanner
 
diff --git a/src/gallium/state_trackers/dri/drm/Makefile b/src/gallium/state_trackers/dri/drm/Makefile
index c717b2b..695dc0c 100644
--- a/src/gallium/state_trackers/dri/drm/Makefile
+++ b/src/gallium/state_trackers/dri/drm/Makefile
@@ -10,7 +10,7 @@ LIBRARY_INCLUDES = \
 	-I$(TOP)/src/gallium/state_trackers/dri/common \
 	-I$(TOP)/src/mesa/drivers/dri/common \
 	-I$(TOP)/src/mesa/main \
-         $(shell pkg-config --cflags-only-I libdrm)
+         $(shell $(PKG_CONFIG) --cflags-only-I libdrm)
 
 
 C_SOURCES = \
diff --git a/src/gallium/state_trackers/egl/Makefile b/src/gallium/state_trackers/egl/Makefile
index 876f196..f65a915 100644
--- a/src/gallium/state_trackers/egl/Makefile
+++ b/src/gallium/state_trackers/egl/Makefile
@@ -18,7 +18,7 @@ x11_INCLUDES = \
 	-I$(TOP)/src/mapi \
 	-I$(TOP)/src/mesa \
 	$(X11_CFLAGS) \
-	$(shell pkg-config --cflags-only-I libdrm dri2proto)
+	$(shell $(PKG_CONFIG) --cflags-only-I libdrm dri2proto)
 
 x11_SOURCES = $(wildcard x11/*.c) \
 	      $(TOP)/src/glx/dri2.c
@@ -28,12 +28,12 @@ wayland_INCLUDES = \
 	-I$(TOP)/src/gallium/winsys \
 	-I$(TOP)/src/egl/wayland/wayland-egl \
 	-I$(TOP)/src/egl/wayland/wayland-drm \
-	$(shell pkg-config --cflags-only-I libdrm wayland-client)
+	$(shell $(PKG_CONFIG) --cflags-only-I libdrm wayland-client)
 
 wayland_SOURCES = $(wildcard wayland/*.c)
 wayland_OBJECTS = $(wayland_SOURCES:.c=.o)
 
-drm_INCLUDES = -I$(TOP)/src/gallium/winsys $(shell pkg-config --cflags-only-I libdrm) \
+drm_INCLUDES = -I$(TOP)/src/gallium/winsys $(shell $(PKG_CONFIG) --cflags-only-I libdrm)
 	       -I$(TOP)/src/gbm/main -I$(TOP)/src/gallium/state_trackers/gbm
 drm_SOURCES = $(wildcard drm/*.c)
 drm_OBJECTS = $(drm_SOURCES:.c=.o)
diff --git a/src/gallium/state_trackers/va/Makefile b/src/gallium/state_trackers/va/Makefile
index d5b3ec3..775e4db 100644
--- a/src/gallium/state_trackers/va/Makefile
+++ b/src/gallium/state_trackers/va/Makefile
@@ -8,7 +8,7 @@ VA_MINOR = 3
 LIBRARY_DEFINES = -DVER_MAJOR=$(VA_MAJOR) -DVER_MINOR=$(VA_MINOR) $(STATE_TRACKER_DEFINES)
 
 LIBRARY_INCLUDES = \
-	$(shell pkg-config --cflags-only-I libva) \
+	$(shell $(PKG_CONFIG) --cflags-only-I libva) \
 	-I$(TOP)/src/gallium/winsys/g3dvl
 
 C_SOURCES = htab.c \
diff --git a/src/gallium/state_trackers/vdpau/Makefile b/src/gallium/state_trackers/vdpau/Makefile
index c1fd0eb..0aeadc0 100644
--- a/src/gallium/state_trackers/vdpau/Makefile
+++ b/src/gallium/state_trackers/vdpau/Makefile
@@ -8,7 +8,7 @@ VDPAU_MINOR = 0
 LIBRARY_DEFINES = -DVER_MAJOR=$(VDPAU_MAJOR) -DVER_MINOR=$(VDPAU_MINOR) $(STATE_TRACKER_DEFINES)
 
 LIBRARY_INCLUDES = \
-	$(shell pkg-config --cflags-only-I vdpau) \
+	$(shell $(PKG_CONFIG) --cflags-only-I vdpau) \
 	-I$(TOP)/src/gallium/winsys/g3dvl
 
 C_SOURCES = htab.c \
diff --git a/src/gallium/state_trackers/xorg/Makefile b/src/gallium/state_trackers/xorg/Makefile
index 7a44d28..d42ea54 100644
--- a/src/gallium/state_trackers/xorg/Makefile
+++ b/src/gallium/state_trackers/xorg/Makefile
@@ -5,12 +5,12 @@ LIBNAME = xorgtracker
 
 LIBRARY_INCLUDES = \
 	-DHAVE_CONFIG_H \
-	$(shell pkg-config xextproto --atleast-version=7.0.99.1 \
+	$(shell $(PKG_CONFIG) xextproto --atleast-version=7.0.99.1 \
 				&& echo "-DHAVE_XEXTPROTO_71") \
-	$(shell pkg-config libkms --atleast-version=1.0 \
+	$(shell $(PKG_CONFIG) libkms --atleast-version=1.0 \
 				&& echo "-DHAVE_LIBKMS") \
-	$(shell pkg-config libkms --silence-errors --cflags-only-I) \
-	$(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto dri2proto) \
+	$(shell $(PKG_CONFIG) libkms --silence-errors --cflags-only-I) \
+	$(shell $(PKG_CONFIG) --cflags-only-I pixman-1 xorg-server libdrm xproto dri2proto) \
 	-I$(TOP)/src/gallium/include \
 	-I$(TOP)/src/gallium/auxiliary \
 	-I$(TOP)/include \
diff --git a/src/gallium/state_trackers/xorg/xvmc/Makefile b/src/gallium/state_trackers/xorg/xvmc/Makefile
index 126dc6d..c468099 100644
--- a/src/gallium/state_trackers/xorg/xvmc/Makefile
+++ b/src/gallium/state_trackers/xorg/xvmc/Makefile
@@ -4,7 +4,7 @@ include $(TOP)/configs/current
 LIBNAME = xvmctracker
 
 LIBRARY_INCLUDES = \
-	$(shell pkg-config --cflags-only-I xvmc) \
+	$(shell $(PKG_CONFIG) --cflags-only-I xvmc) \
 	-I$(TOP)/src/gallium/winsys/g3dvl
 
 C_SOURCES = block.c \
diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg
index 025f742..9269375 100644
--- a/src/gallium/targets/Makefile.xorg
+++ b/src/gallium/targets/Makefile.xorg
@@ -19,7 +19,7 @@ OBJECTS = $(C_SOURCES:.c=.o) \
 	$(ASM_SOURCES:.S=.o)
 
 INCLUDES = \
-	$(shell pkg-config --cflags-only-I pixman-1 xorg-server libdrm xproto) \
+	$(shell $(PKG_CONFIG) --cflags-only-I pixman-1 xorg-server libdrm xproto) \
 	-I$(TOP)/src/gallium/include \
 	-I$(TOP)/src/gallium/drivers \
 	-I$(TOP)/src/gallium/auxiliary \
diff --git a/src/gallium/targets/dri-nouveau/Makefile b/src/gallium/targets/dri-nouveau/Makefile
index eb1ee85..dacb85c 100644
--- a/src/gallium/targets/dri-nouveau/Makefile
+++ b/src/gallium/targets/dri-nouveau/Makefile
@@ -23,6 +23,6 @@ DRIVER_DEFINES = \
 
 include ../Makefile.dri
 
-DRI_LIB_DEPS += $(shell pkg-config libdrm_nouveau --libs)
+DRI_LIB_DEPS += $(shell $(PKG_CONFIG) libdrm_nouveau --libs)
 
 symlinks:
diff --git a/src/gallium/targets/va-r300/Makefile b/src/gallium/targets/va-r300/Makefile
index c4b8fe7..3e0797b 100644
--- a/src/gallium/targets/va-r300/Makefile
+++ b/src/gallium/targets/va-r300/Makefile
@@ -19,7 +19,7 @@ C_SOURCES = \
 	$(COMMON_GALLIUM_SOURCES) \
 	$(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell pkg-config libdrm --libs) -lXfixes
+DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes
 
 include ../Makefile.va
 
diff --git a/src/gallium/targets/va-r600/Makefile b/src/gallium/targets/va-r600/Makefile
index d09a3aa..dc4aff6 100644
--- a/src/gallium/targets/va-r600/Makefile
+++ b/src/gallium/targets/va-r600/Makefile
@@ -20,7 +20,7 @@ C_SOURCES = \
 	$(COMMON_GALLIUM_SOURCES) \
 	$(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell pkg-config libdrm --libs) -lXfixes
+DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes
 
 include ../Makefile.va
 
diff --git a/src/gallium/targets/vdpau-r300/Makefile b/src/gallium/targets/vdpau-r300/Makefile
index fd4110b..95988bd 100644
--- a/src/gallium/targets/vdpau-r300/Makefile
+++ b/src/gallium/targets/vdpau-r300/Makefile
@@ -20,7 +20,7 @@ C_SOURCES = \
 	$(COMMON_GALLIUM_SOURCES) \
 	$(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell pkg-config libdrm --libs) -lXfixes
+DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes
 
 include ../Makefile.vdpau
 
diff --git a/src/gallium/targets/vdpau-r600/Makefile b/src/gallium/targets/vdpau-r600/Makefile
index c2d95af..24af3a6 100644
--- a/src/gallium/targets/vdpau-r600/Makefile
+++ b/src/gallium/targets/vdpau-r600/Makefile
@@ -16,7 +16,7 @@ C_SOURCES = \
 	$(COMMON_GALLIUM_SOURCES) \
 	$(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell pkg-config libdrm --libs) -lXfixes
+DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes
 
 include ../Makefile.vdpau
 
diff --git a/src/gallium/targets/xorg-i915/Makefile b/src/gallium/targets/xorg-i915/Makefile
index 8652404..28f8873 100644
--- a/src/gallium/targets/xorg-i915/Makefile
+++ b/src/gallium/targets/xorg-i915/Makefile
@@ -19,6 +19,6 @@ DRIVER_PIPES = \
 	$(TOP)/src/gallium/drivers/rbug/librbug.a
 
 DRIVER_LINKS = \
-	$(shell pkg-config --libs libdrm libdrm_intel)
+	$(shell $(PKG_CONFIG) --libs libdrm libdrm_intel)
 
 include ../Makefile.xorg
diff --git a/src/gallium/targets/xorg-i965/Makefile b/src/gallium/targets/xorg-i965/Makefile
index 494dce4..36df276 100644
--- a/src/gallium/targets/xorg-i965/Makefile
+++ b/src/gallium/targets/xorg-i965/Makefile
@@ -21,6 +21,6 @@ DRIVER_PIPES = \
 	$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a
 
 DRIVER_LINKS = \
-	$(shell pkg-config --libs libdrm libdrm_intel)
+	$(shell $(PKG_CONFIG) --libs libdrm libdrm_intel)
 
 include ../Makefile.xorg
diff --git a/src/gallium/targets/xorg-nouveau/Makefile b/src/gallium/targets/xorg-nouveau/Makefile
index 755969c..cb4ae49 100644
--- a/src/gallium/targets/xorg-nouveau/Makefile
+++ b/src/gallium/targets/xorg-nouveau/Makefile
@@ -21,9 +21,9 @@ DRIVER_PIPES = \
 	$(TOP)/src/gallium/drivers/rbug/librbug.a
 
 DRIVER_LINKS = \
-	$(shell pkg-config --libs libdrm libdrm_nouveau)
+	$(shell $(PKG_CONFIG) --libs libdrm libdrm_nouveau)
 
 DRIVER_INCLUDES = \
-	$(shell pkg-config --cflags-only-I libdrm libdrm_nouveau xf86driproto)
+	$(shell $(PKG_CONFIG) --cflags-only-I libdrm libdrm_nouveau xf86driproto)
 
 include ../Makefile.xorg
diff --git a/src/gallium/targets/xorg-r300/Makefile b/src/gallium/targets/xorg-r300/Makefile
index 195ab81..26cc559 100644
--- a/src/gallium/targets/xorg-r300/Makefile
+++ b/src/gallium/targets/xorg-r300/Makefile
@@ -19,6 +19,6 @@ DRIVER_PIPES = \
 	$(TOP)/src/gallium/drivers/rbug/librbug.a
 
 DRIVER_LINKS = \
-	$(shell pkg-config --libs libdrm)
+	$(shell $(PKG_CONFIG) --libs libdrm)
 
 include ../Makefile.xorg
diff --git a/src/gallium/targets/xorg-r600/Makefile b/src/gallium/targets/xorg-r600/Makefile
index 4577ba6..35971e0 100644
--- a/src/gallium/targets/xorg-r600/Makefile
+++ b/src/gallium/targets/xorg-r600/Makefile
@@ -20,6 +20,6 @@ DRIVER_PIPES = \
 	$(TOP)/src/gallium/drivers/rbug/librbug.a
 
 DRIVER_LINKS = \
-	$(shell pkg-config --libs libdrm)
+	$(shell $(PKG_CONFIG) --libs libdrm)
 
 include ../Makefile.xorg
diff --git a/src/gallium/targets/xvmc-nouveau/Makefile b/src/gallium/targets/xvmc-nouveau/Makefile
index e1aadbf..cc18864 100644
--- a/src/gallium/targets/xvmc-nouveau/Makefile
+++ b/src/gallium/targets/xvmc-nouveau/Makefile
@@ -19,7 +19,7 @@ C_SOURCES = \
 	$(COMMON_GALLIUM_SOURCES) \
 	$(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell pkg-config libdrm_nouveau --libs) -lXfixes
+DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm_nouveau --libs) -lXfixes
 
 include ../Makefile.xvmc
 
diff --git a/src/gallium/targets/xvmc-r300/Makefile b/src/gallium/targets/xvmc-r300/Makefile
index a427fe1..43bc9ab 100644
--- a/src/gallium/targets/xvmc-r300/Makefile
+++ b/src/gallium/targets/xvmc-r300/Makefile
@@ -15,7 +15,7 @@ C_SOURCES = \
 	$(COMMON_GALLIUM_SOURCES) \
 	$(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell pkg-config libdrm --libs) -lXfixes
+DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes
 
 include ../Makefile.xvmc
 
diff --git a/src/gallium/targets/xvmc-r600/Makefile b/src/gallium/targets/xvmc-r600/Makefile
index a10a42d..47616a7 100644
--- a/src/gallium/targets/xvmc-r600/Makefile
+++ b/src/gallium/targets/xvmc-r600/Makefile
@@ -16,7 +16,7 @@ C_SOURCES = \
 	$(COMMON_GALLIUM_SOURCES) \
 	$(DRIVER_SOURCES)
 
-DRIVER_LIBS = $(shell pkg-config libdrm --libs) -lXfixes
+DRIVER_LIBS = $(shell $(PKG_CONFIG) libdrm --libs) -lXfixes
 
 include ../Makefile.xvmc
 
diff --git a/src/gallium/winsys/g3dvl/dri/Makefile b/src/gallium/winsys/g3dvl/dri/Makefile
index b270e78..572571d 100644
--- a/src/gallium/winsys/g3dvl/dri/Makefile
+++ b/src/gallium/winsys/g3dvl/dri/Makefile
@@ -4,7 +4,7 @@ include $(TOP)/configs/current
 LIBNAME = vldri
 
 LIBRARY_INCLUDES = -I$(TOP)/src/gallium/winsys/g3dvl \
-                   $(shell pkg-config libdrm --cflags-only-I)
+                   $(shell $(PKG_CONFIG) libdrm --cflags-only-I)
 
 C_SOURCES = \
 	driclient.c \
diff --git a/src/gallium/winsys/i915/drm/Makefile b/src/gallium/winsys/i915/drm/Makefile
index 37307ca..ebe3ded 100644
--- a/src/gallium/winsys/i915/drm/Makefile
+++ b/src/gallium/winsys/i915/drm/Makefile
@@ -6,8 +6,8 @@ LIBNAME = i915drm
 # get C_SOURCES
 include Makefile.sources
 
-LIBRARY_INCLUDES = $(shell pkg-config libdrm --cflags-only-I)
+LIBRARY_INCLUDES = $(shell $(PKG_CONFIG) libdrm --cflags-only-I)
 
-LIBRARY_DEFINES = $(shell pkg-config libdrm --cflags-only-other)
+LIBRARY_DEFINES = $(shell $(PKG_CONFIG) libdrm --cflags-only-other)
 
 include ../../../Makefile.template
diff --git a/src/gallium/winsys/i965/drm/Makefile b/src/gallium/winsys/i965/drm/Makefile
index 46f98d7..830007e 100644
--- a/src/gallium/winsys/i965/drm/Makefile
+++ b/src/gallium/winsys/i965/drm/Makefile
@@ -7,8 +7,8 @@ C_SOURCES = \
 	i965_drm_buffer.c \
 	i965_drm_winsys.c
 
-LIBRARY_INCLUDES = $(shell pkg-config libdrm --cflags-only-I)
+LIBRARY_INCLUDES = $(shell $(PKG_CONFIG) libdrm --cflags-only-I)
 
-LIBRARY_DEFINES = $(shell pkg-config libdrm --cflags-only-other)
+LIBRARY_DEFINES = $(shell $(PKG_CONFIG) --cflags-only-other)
 
 include ../../../Makefile.template
diff --git a/src/gallium/winsys/nouveau/drm/Makefile b/src/gallium/winsys/nouveau/drm/Makefile
index 74a3c6a..ed748ac 100644
--- a/src/gallium/winsys/nouveau/drm/Makefile
+++ b/src/gallium/winsys/nouveau/drm/Makefile
@@ -5,7 +5,7 @@ LIBNAME = nouveaudrm
 
 C_SOURCES = nouveau_drm_winsys.c
 
-LIBRARY_INCLUDES = $(shell pkg-config libdrm libdrm_nouveau --cflags-only-I)
-LIBRARY_DEFINES = $(shell pkg-config libdrm libdrm_nouveau --cflags-only-other)
+LIBRARY_INCLUDES = $(shell $(PKG_CONFIG) libdrm libdrm_nouveau --cflags-only-I)
+LIBRARY_DEFINES = $(shell $(PKG_CONFIG) libdrm libdrm_nouveau --cflags-only-other)
 
 include ../../../Makefile.template
diff --git a/src/gallium/winsys/radeon/drm/Makefile b/src/gallium/winsys/radeon/drm/Makefile
index 68b9efe..517360e 100644
--- a/src/gallium/winsys/radeon/drm/Makefile
+++ b/src/gallium/winsys/radeon/drm/Makefile
@@ -8,7 +8,7 @@ LIBNAME = radeonwinsys
 include Makefile.sources
 
 LIBRARY_INCLUDES = -I$(TOP)/include \
-		   $(shell pkg-config libdrm --cflags-only-I)
+		   $(shell $(PKG_CONFIG) libdrm --cflags-only-I)
 
 include ../../../Makefile.template
 
diff --git a/src/gallium/winsys/svga/drm/Makefile b/src/gallium/winsys/svga/drm/Makefile
index a378900..02ea91b 100644
--- a/src/gallium/winsys/svga/drm/Makefile
+++ b/src/gallium/winsys/svga/drm/Makefile
@@ -9,11 +9,11 @@ include Makefile.sources
 LIBRARY_INCLUDES = \
        -I$(TOP)/src/gallium/drivers/svga \
        -I$(TOP)/src/gallium/drivers/svga/include \
-       $(shell pkg-config libdrm --cflags-only-I)
+       $(shell $(PKG_CONFIG) libdrm --cflags-only-I)
 
 LIBRARY_DEFINES = \
        -std=gnu99 -fvisibility=hidden \
        -DHAVE_STDINT_H -D_FILE_OFFSET_BITS=64 \
-       $(shell pkg-config libdrm --cflags-only-other)
+       $(shell $(PKG_CONFIG) libdrm --cflags-only-other)
 
 include ../../../Makefile.template
diff --git a/src/mesa/drivers/dri/i915/Makefile b/src/mesa/drivers/dri/i915/Makefile
index e2e5382..b7da46b 100644
--- a/src/mesa/drivers/dri/i915/Makefile
+++ b/src/mesa/drivers/dri/i915/Makefile
@@ -16,7 +16,7 @@ C_SOURCES = \
 ASM_SOURCES = 
 
 DRIVER_DEFINES = $(addprefix -I$(TOP)/, $(i915_INCLUDES)) -DI915 \
-	$(shell pkg-config libdrm --atleast-version=2.3.1 \
+	$(shell $(PKG_CONFIG) libdrm --atleast-version=2.3.1 \
 				&& echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP")
 
 INCLUDES += $(INTEL_CFLAGS)
-- 
1.7.5.3.367.ga9930



More information about the mesa-dev mailing list