I had used pkg-config from the Makefile because I didn't want to screw
around with the non-autoconf build, but that doesn't work because the
PKG_CONFIG_PATH or TALLOC_LIBS/TALLOC_CFLAGS that people set at
configure time needs to be respected and may not be present at build
time.
Bug #29585
GLW_CFLAGS = @GLW_CFLAGS@
GLUT_CFLAGS = @GLUT_CFLAGS@
+TALLOC_LIBS = @TALLOC_LIBS@
+TALLOC_FLAGS = @TALLOC_CFLAGS@
+
# dlopen
DLOPEN_LIBS = @DLOPEN_LIBS@
GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
VG_LIB_GLOB = $(VG_LIB_NAME)*
+TALLOC_LIBS = `pkg-config --libs talloc`
+TALLOC_CFLAGS = `pkg-config --cflags talloc`
+
# Optional assembly language optimization files for libGL
MESA_ASM_SOURCES =
# Library dependencies
#EXTRA_LIB_PATH ?=
-GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread -ltalloc -lstdc++
+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread $(TALLOC_LIBS) -lstdc++
EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
esac
PKG_CHECK_MODULES([TALLOC], [talloc])
+AC_SUBST([TALLOC_LIBS])
+AC_SUBST([TALLOC_CFLAGS])
dnl
dnl Driver specific build directories
LIBS = \
$(TOP)/src/glsl/libglsl.a \
- $(shell pkg-config --libs talloc)
+ $(TALLOC_LIBS)
APPS = glsl_compiler glcpp/glcpp
$(CXX_SOURCES:.cpp=.o)
INCLUDES = \
+ $(TALLOC_CFLAGS) \
-I. \
-I../mesa \
-I../mapi \