--- a/configs/autoconf.in 2011-03-29 19:05:39.397719687 +0300 +++ b/configs/autoconf.in 2011-03-29 19:07:57.918429856 +0300 @@ -26,6 +26,8 @@ EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ RADEON_CFLAGS = @RADEON_CFLAGS@ RADEON_LDFLAGS = @RADEON_LDFLAGS@ +NOUVEAU_CFLAGS = @NOUVEAU_CFLAGS@ +NOUVEAU_LIBS = @NOUVEAU_LIBS@ INTEL_LIBS = @INTEL_LIBS@ INTEL_CFLAGS = @INTEL_CFLAGS@ X11_LIBS = @X11_LIBS@ --- a/configs/linux-dri 2011-03-29 19:05:39.455720823 +0300 +++ b/configs/linux-dri 2011-03-29 19:11:17.990342183 +0300 @@ -63,11 +63,16 @@ GALLIUM_TARGET_DIRS = GALLIUM_STATE_TRACKERS_DIRS = egl -DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \ +DRI_DIRS = i810 i915 i965 mach64 mga nouveau r128 r200 r300 radeon \ savage sis tdfx unichrome swrast -INTEL_LIBS = `pkg-config --libs libdrm_intel` -INTEL_CFLAGS = `pkg-config --cflags libdrm_intel` +INTEL_LIBS = $(shell pkg-config --libs libdrm_intel) +INTEL_CFLAGS = $(shell pkg-config --cflags libdrm_intel) -RADEON_LIBS = `pkg-config --libs libdrm_radeon` -RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon` +NOUVEAU_LIBS = $(shell shell pkg-config libdrm_nouveau --libs) +NOUVEAU_CFLAGS = $(shell shell pkg-config libdrm_nouveau --cflags) + +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) --- a/configure.ac 2011-03-29 19:05:39.693725480 +0300 +++ b/configure.ac 2011-03-29 19:07:57.990431264 +0300 @@ -20,6 +20,7 @@ dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.24 LIBDRM_RADEON_REQUIRED=2.4.24 +LIBDRM_NOUVEAU_REQUIRED=0.6 LIBDRM_INTEL_REQUIRED=2.4.24 DRI2PROTO_REQUIRED=2.1 GLPROTO_REQUIRED=1.4.11 @@ -963,7 +964,7 @@ # the new interface. i810 are missing because there is no # x86-64 system where they could *ever* be used. if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \ + DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \ savage tdfx unichrome swrast" fi ;; @@ -991,8 +992,8 @@ fi if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ - unichrome savage sis swrast" + DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \ + tdfx unichrome savage sis swrast" fi ;; gnu*) @@ -1010,7 +1011,7 @@ # default drivers if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \ + DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \ savage sis tdfx unichrome swrast" fi @@ -1046,6 +1047,12 @@ ;; esac +case $DRI_DIRS in +*nouveau*) + PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED]) + ;; +esac + case $DRI_DIRS in *radeon*|*r200*|*r300*|*r600*) if test "x$HAVE_LIBDRM_RADEON" = xyes; then --- a/src/mesa/drivers/dri/i915/Makefile 2011-03-29 19:05:50.151930139 +0300 +++ b/src/mesa/drivers/dri/i915/Makefile 2011-03-29 19:07:58.048432399 +0300 @@ -60,11 +60,11 @@ $(shell pkg-config libdrm --atleast-version=2.3.1 \ && echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP") +include ../Makefile.template + INCLUDES += $(INTEL_CFLAGS) DRI_LIB_DEPS += $(INTEL_LIBS) -include ../Makefile.template - intel_decode.o: ../intel/intel_decode.c intel_tex_layout.o: ../intel/intel_tex_layout.c --- a/src/mesa/drivers/dri/i965/Makefile 2011-03-29 19:05:50.244931958 +0300 +++ b/src/mesa/drivers/dri/i965/Makefile 2011-03-29 19:07:58.106433534 +0300 @@ -115,10 +115,10 @@ DRIVER_DEFINES = -I../intel +include ../Makefile.template + INCLUDES += $(INTEL_CFLAGS) DRI_LIB_DEPS += $(INTEL_LIBS) -include ../Makefile.template - intel_decode.o: ../intel/intel_decode.c intel_tex_layout.o: ../intel/intel_tex_layout.c --- a/src/mesa/drivers/dri/nouveau/Makefile 2011-03-29 19:05:51.065948023 +0300 +++ b/src/mesa/drivers/dri/nouveau/Makefile 2011-03-29 19:07:58.173434843 +0300 @@ -3,9 +3,6 @@ TOP = ../../../../.. include $(TOP)/configs/current -CFLAGS += $(shell pkg-config libdrm libdrm_nouveau --cflags) -DRI_LIB_DEPS += $(shell pkg-config libdrm_nouveau --libs) - LIBNAME = nouveau_vieux_dri.so DRIVER_SOURCES = \ @@ -51,7 +48,9 @@ ASM_SOURCES = - include ../Makefile.template +INCLUDES += $(NOUVEAU_CFLAGS) +DRI_LIB_DEPS += $(NOUVEAU_LIBS) + symlinks: --- a/src/mesa/drivers/dri/r200/Makefile 2011-03-29 19:05:51.442955401 +0300 +++ b/src/mesa/drivers/dri/r200/Makefile 2011-03-29 19:07:58.231435978 +0300 @@ -3,8 +3,6 @@ TOP = ../../../../.. include $(TOP)/configs/current -CFLAGS += $(RADEON_CFLAGS) - LIBNAME = r200_dri.so ifeq ($(RADEON_LDFLAGS),) @@ -55,12 +53,13 @@ DRIVER_DEFINES = -DRADEON_R200 -DRI_LIB_DEPS += $(RADEON_LDFLAGS) - ##### TARGETS ##### include ../Makefile.template +INCLUDES += $(RADEON_CFLAGS) +DRI_LIB_DEPS += $(RADEON_LDFLAGS) + #INCLUDES += -I../radeon/server --- a/src/mesa/drivers/dri/r300/Makefile 2011-03-29 19:05:51.762961663 +0300 +++ b/src/mesa/drivers/dri/r300/Makefile 2011-03-29 19:07:58.293437191 +0300 @@ -3,8 +3,6 @@ TOP = ../../../../.. include $(TOP)/configs/current -CFLAGS += $(RADEON_CFLAGS) - LIBNAME = r300_dri.so ifeq ($(RADEON_LDFLAGS),) @@ -64,8 +62,6 @@ DRIVER_DEFINES = -DRADEON_R300 # -DRADEON_BO_TRACK \ -DRI_LIB_DEPS += $(RADEON_LDFLAGS) - SUBDIRS = compiler EXTRA_MODULES = compiler/libr300compiler.a @@ -75,3 +71,5 @@ include ../Makefile.template +INCLUDES += $(RADEON_CFLAGS) +DRI_LIB_DEPS += $(RADEON_LDFLAGS) --- a/src/mesa/drivers/dri/radeon/Makefile 2011-03-29 19:05:52.678979587 +0300 +++ b/src/mesa/drivers/dri/radeon/Makefile 2011-03-29 19:07:58.344438188 +0300 @@ -4,8 +4,6 @@ TOP = ../../../../.. include $(TOP)/configs/current -CFLAGS += $(RADEON_CFLAGS) - LIBNAME = radeon_dri.so ifeq ($(RADEON_LDFLAGS),) @@ -53,9 +51,9 @@ DRIVER_DEFINES = -DRADEON_R100 -DRI_LIB_DEPS += $(RADEON_LDFLAGS) - X86_SOURCES = include ../Makefile.template +INCLUDES += $(RADEON_CFLAGS) +DRI_LIB_DEPS += $(RADEON_LDFLAGS)