Mesa (master): mesa: AC_SUBST the talloc libs/cflags so the ./ configure results are saved.
Eric Anholt
anholt at kemper.freedesktop.org
Mon Aug 23 00:41:28 UTC 2010
Module: Mesa
Branch: master
Commit: 639cdd3782c40c422c33c907949376c735d9340c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=639cdd3782c40c422c33c907949376c735d9340c
Author: Eric Anholt <eric at anholt.net>
Date: Sun Aug 22 17:34:18 2010 -0700
mesa: AC_SUBST the talloc libs/cflags so the ./configure results are saved.
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
---
configs/autoconf.in | 3 +++
configs/default | 5 ++++-
configure.ac | 2 ++
src/glsl/Makefile | 3 ++-
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/configs/autoconf.in b/configs/autoconf.in
index c7611a6..305a3a4 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -34,6 +34,9 @@ LLVM_LIBS = @LLVM_LIBS@
GLW_CFLAGS = @GLW_CFLAGS@
GLUT_CFLAGS = @GLUT_CFLAGS@
+TALLOC_LIBS = @TALLOC_LIBS@
+TALLOC_FLAGS = @TALLOC_CFLAGS@
+
# dlopen
DLOPEN_LIBS = @DLOPEN_LIBS@
diff --git a/configs/default b/configs/default
index cdfa811..0435796 100644
--- a/configs/default
+++ b/configs/default
@@ -82,6 +82,9 @@ GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)*
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 =
@@ -116,7 +119,7 @@ EGL_CLIENT_APIS = $(GL_LIB)
# 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
diff --git a/configure.ac b/configure.ac
index 3d86dec..b2c6b52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -464,6 +464,8 @@ xxlib|xdri|xosmesa)
esac
PKG_CHECK_MODULES([TALLOC], [talloc])
+AC_SUBST([TALLOC_LIBS])
+AC_SUBST([TALLOC_CFLAGS])
dnl
dnl Driver specific build directories
diff --git a/src/glsl/Makefile b/src/glsl/Makefile
index 1d200b4..fef3891 100644
--- a/src/glsl/Makefile
+++ b/src/glsl/Makefile
@@ -75,7 +75,7 @@ CXX_SOURCES = \
LIBS = \
$(TOP)/src/glsl/libglsl.a \
- $(shell pkg-config --libs talloc)
+ $(TALLOC_LIBS)
APPS = glsl_compiler glcpp/glcpp
@@ -104,6 +104,7 @@ OBJECTS = \
$(CXX_SOURCES:.cpp=.o)
INCLUDES = \
+ $(TALLOC_CFLAGS) \
-I. \
-I../mesa \
-I../mapi \
More information about the mesa-commit
mailing list