summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configs/default1
-rw-r--r--configs/freebsd-dri4
-rw-r--r--configs/linux-dri16
-rw-r--r--configs/linux-dri-xcb10
-rw-r--r--configs/linux-egl4
-rw-r--r--configs/linux-llvm2
-rw-r--r--src/egl/wayland/wayland-drm/Makefile4
-rw-r--r--src/gallium/state_trackers/dri/drm/Makefile2
-rw-r--r--src/gallium/state_trackers/egl/Makefile6
-rw-r--r--src/gallium/state_trackers/va/Makefile2
-rw-r--r--src/gallium/state_trackers/vdpau/Makefile2
-rw-r--r--src/gallium/state_trackers/xorg/Makefile8
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/Makefile2
-rw-r--r--src/gallium/targets/Makefile.xorg2
-rw-r--r--src/gallium/targets/dri-nouveau/Makefile2
-rw-r--r--src/gallium/targets/va-r300/Makefile2
-rw-r--r--src/gallium/targets/va-r600/Makefile2
-rw-r--r--src/gallium/targets/vdpau-r300/Makefile2
-rw-r--r--src/gallium/targets/vdpau-r600/Makefile2
-rw-r--r--src/gallium/targets/xorg-i915/Makefile2
-rw-r--r--src/gallium/targets/xorg-i965/Makefile2
-rw-r--r--src/gallium/targets/xorg-nouveau/Makefile4
-rw-r--r--src/gallium/targets/xorg-r300/Makefile2
-rw-r--r--src/gallium/targets/xorg-r600/Makefile2
-rw-r--r--src/gallium/targets/xvmc-nouveau/Makefile2
-rw-r--r--src/gallium/targets/xvmc-r300/Makefile2
-rw-r--r--src/gallium/targets/xvmc-r600/Makefile2
-rw-r--r--src/gallium/winsys/g3dvl/dri/Makefile2
-rw-r--r--src/gallium/winsys/i915/drm/Makefile4
-rw-r--r--src/gallium/winsys/i965/drm/Makefile4
-rw-r--r--src/gallium/winsys/nouveau/drm/Makefile4
-rw-r--r--src/gallium/winsys/radeon/drm/Makefile2
-rw-r--r--src/gallium/winsys/svga/drm/Makefile4
-rw-r--r--src/mesa/drivers/dri/i915/Makefile2
34 files changed, 58 insertions, 57 deletions
diff --git a/configs/default b/configs/default
index 43666110b39..2b1bf9bef3d 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 c4169b81d4e..9e810c4b8f8 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 26c73ccf019..a3e9baba2f2 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 a845f71d231..6968bebe450 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 216bcbab321..2c8bfdd6f59 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 ef6c7bb105a..259d8ac7a2e 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 bc010b6d9cb..42222a9872c 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 c717b2bdeb5..695dc0c294c 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 876f196cf6b..f65a9151873 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 d5b3ec3caf2..775e4db216d 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 c1fd0eb7d0e..0aeadc0b5b0 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 7a44d28017b..d42ea5416dc 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 126dc6d58f1..c4680995c66 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 025f7426f85..9269375e851 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 eb1ee859a00..dacb85ced82 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 c4b8fe770b8..3e0797b65a0 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 3aee430000d..bab18fea2ac 100644
--- a/src/gallium/targets/va-r600/Makefile
+++ b/src/gallium/targets/va-r600/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/vdpau-r300/Makefile b/src/gallium/targets/vdpau-r300/Makefile
index fd4110b7855..95988bdc652 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 17805e326c3..466e80eadf9 100644
--- a/src/gallium/targets/vdpau-r600/Makefile
+++ b/src/gallium/targets/vdpau-r600/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.vdpau
diff --git a/src/gallium/targets/xorg-i915/Makefile b/src/gallium/targets/xorg-i915/Makefile
index 865240404ca..28f88736531 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 494dce41c8a..36df276cb71 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 755969cae27..cb4ae497594 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 195ab817ad0..26cc5590d7d 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 08d5635e633..3c0cc83711c 100644
--- a/src/gallium/targets/xorg-r600/Makefile
+++ b/src/gallium/targets/xorg-r600/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/xvmc-nouveau/Makefile b/src/gallium/targets/xvmc-nouveau/Makefile
index e1aadbf4259..cc1886415c1 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 a427fe1a3cb..43bc9abc4d7 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 7be866510d6..d8638bf7f84 100644
--- a/src/gallium/targets/xvmc-r600/Makefile
+++ b/src/gallium/targets/xvmc-r600/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/winsys/g3dvl/dri/Makefile b/src/gallium/winsys/g3dvl/dri/Makefile
index b270e780fec..572571da9c2 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 37307ca8a4b..ebe3ded7ac2 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 46f98d7a24a..830007ed478 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 74a3c6a0d70..ed748ac9fd6 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 68b9efebfa4..517360e4364 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 a378900f408..02ea91bf334 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 e2e5382b782..b7da46bc3b6 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)