summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2008-04-26 12:34:11 +0300
committerGeorge Sapountzis <gsap7@yahoo.gr>2008-05-05 18:14:52 +0300
commit2ed0f7278e389ecc0cf568518799a9a8f33b1365 (patch)
tree6da3d05a379c49854ca477a49bda9fe415302bcf
parent2fa2dd3908c783663ca421134cde82e9b6a38a0d (diff)
glcore: Set all external variables in configuration
based on patch by Dan Nicholson <dbn.lists@gmail.com>
-rw-r--r--configs/autoconf.in1
-rw-r--r--configs/default3
-rw-r--r--configure.ac16
-rw-r--r--src/mesa/drivers/xorg/Makefile8
4 files changed, 20 insertions, 8 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in
index 07fe055cbb..c7a395455b 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -79,6 +79,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \
APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
# GLcore dependencies
+XORG_CFLAGS = @XORG_CFLAGS@
GLCORE_LIB_DEPS = $(EXTRA_LIB_PATH) @GLCORE_LIB_DEPS@
# DRI dependencies
diff --git a/configs/default b/configs/default
index 9705d6b78c..cbdb3b2ada 100644
--- a/configs/default
+++ b/configs/default
@@ -80,6 +80,9 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm
+# GLcore dependencies
+XORG_CFLAGS = `pkg-config --cflags xorg-server`
+GLCORE_LIB_DEPS = -lm -lpthread
# Installation directories (for make install)
diff --git a/configure.ac b/configure.ac
index 672bab85c1..1e9a7981f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -381,7 +381,6 @@ xlib)
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
fi
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
- GLCORE_LIB_DEPS=""
# if static, move the external libraries to the programs
# and empty the libraries for libGL
@@ -413,16 +412,13 @@ dri)
# need DRM libs, -lpthread, etc.
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
- GLCORE_LIB_DEPS="-lm -lpthread $DLOPEN_LIBS"
;;
osmesa)
# No libGL for osmesa
GL_LIB_DEPS=""
- GLCORE_LIB_DEPS=""
;;
esac
AC_SUBST(GL_LIB_DEPS)
-AC_SUBST(GLCORE_LIB_DEPS)
dnl
dnl More X11 setup
@@ -642,6 +638,18 @@ AC_SUBST(OSMESA_LIB_DEPS)
AC_SUBST(OSMESA_MESA_DEPS)
dnl
+dnl GLcore configuration
+dnl
+# delay pkg-config checks until `make glcore' run
+XORG_CFLAGS='`pkg-config --cflags xorg-server`'
+GLCORE_LIB_DEPS='-lm -lpthread'
+if test "$mesa_driver" = dri; then
+ GLCORE_LIB_DEPS="$GLCORE_LIB_DEPS $DLOPEN_LIBS"
+fi
+AC_SUBST(XORG_CFLAGS)
+AC_SUBST(GLCORE_LIB_DEPS)
+
+dnl
dnl GLU configuration
dnl
AC_ARG_ENABLE(glu,
diff --git a/src/mesa/drivers/xorg/Makefile b/src/mesa/drivers/xorg/Makefile
index a1b417447b..437bdf0ce6 100644
--- a/src/mesa/drivers/xorg/Makefile
+++ b/src/mesa/drivers/xorg/Makefile
@@ -32,7 +32,7 @@ C_SOURCES = \
MESA_MODULES = $(TOP)/src/mesa/libmesa.a
C_SOURCES += ../common/driverfuncs.c
-ifeq ("${DRIVER_DIRS}", "dri")
+ifeq ($(WINDOW_SYSTEM),dri)
C_SOURCES += ../dri/common/utils.c
endif
@@ -46,12 +46,12 @@ INCLUDES = \
-I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
- `pkg-config --cflags xorg-server`
+ $(XORG_CFLAGS)
-ifeq ("${DRIVER_DIRS}", "dri")
+ifeq ($(WINDOW_SYSTEM),dri)
INCLUDES += \
-I$(TOP)/src/mesa/drivers/dri/common \
- `pkg-config --cflags libdrm`
+ $(LIBDRM_CFLAGS)
endif
# undef 'USE_XSHM' to make it explicit that 'XFree86Server' takes precedence