--- a/configs/autoconf.in 2011-03-25 10:14:07.173551270 +0200 +++ b/configs/autoconf.in 2011-03-25 10:15:11.984179981 +0200 @@ -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-25 10:14:07.177551310 +0200 +++ b/configs/linux-dri 2011-03-25 10:15:11.987180010 +0200 @@ -63,11 +63,14 @@ 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` -RADEON_LIBS = `pkg-config --libs libdrm_radeon` +NOUVEAU_LIBS = `shell pkg-config libdrm_nouveau --libs` +NOUVEAU_CFLAGS = `shell pkg-config libdrm_nouveau --cflags` + +RADEON_LDFLAGS = `pkg-config --libs libdrm_radeon` RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon` --- a/configure 2011-03-24 23:58:20.000000000 +0200 +++ b/configure 2011-03-25 00:00:13.000000000 +0200 @@ -666,6 +666,8 @@ OSMESA_LIB RADEON_LDFLAGS RADEON_CFLAGS +NOUVEAU_LIBS +NOUVEAU_CFLAGS INTEL_LIBS INTEL_CFLAGS DRI_LIB_DEPS @@ -926,6 +928,8 @@ LIBDRM_RADEON_LIBS INTEL_CFLAGS INTEL_LIBS +NOUVEAU_CFLAGS +NOUVEAU_LIBS XCB_DRI2_CFLAGS XCB_DRI2_LIBS LIBUDEV_CFLAGS @@ -1703,6 +1707,10 @@ INTEL_CFLAGS C compiler flags for INTEL, overriding pkg-config INTEL_LIBS linker flags for INTEL, overriding pkg-config + NOUVEAU_CFLAGS + C compiler flags for NOUVEAU, overriding pkg-config + NOUVEAU_LIBS + linker flags for NOUVEAU, overriding pkg-config XCB_DRI2_CFLAGS C compiler flags for XCB_DRI2, overriding pkg-config XCB_DRI2_LIBS @@ -2658,6 +2666,7 @@ 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 @@ -7665,7 +7674,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 ;; @@ -7693,8 +7702,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*) @@ -7712,7 +7721,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 @@ -7887,6 +7896,100 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +fi + ;; +esac + +case $DRI_DIRS in +*nouveau*) + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NOUVEAU" >&5 +$as_echo_n "checking for NOUVEAU... " >&6; } + +if test -n "$NOUVEAU_CFLAGS"; then + pkg_cv_NOUVEAU_CFLAGS="$NOUVEAU_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_nouveau >= \$LIBDRM_NOUVEAU_REQUIRED\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NOUVEAU_CFLAGS=`$PKG_CONFIG --cflags "libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$NOUVEAU_LIBS"; then + pkg_cv_NOUVEAU_LIBS="$NOUVEAU_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_nouveau >= \$LIBDRM_NOUVEAU_REQUIRED\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NOUVEAU_LIBS=`$PKG_CONFIG --libs "libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED" 2>&1` + else + NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$NOUVEAU_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED) were not met: + +$NOUVEAU_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables NOUVEAU_CFLAGS +and NOUVEAU_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables NOUVEAU_CFLAGS +and NOUVEAU_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + NOUVEAU_CFLAGS=$pkg_cv_NOUVEAU_CFLAGS + NOUVEAU_LIBS=$pkg_cv_NOUVEAU_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi ;; esac --- a/configure.ac 2011-03-25 10:14:07.211551639 +0200 +++ b/configure.ac 2011-03-25 10:15:12.013180263 +0200 @@ -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-25 10:14:11.473592975 +0200 +++ b/src/mesa/drivers/dri/i915/Makefile 2011-03-25 10:15:50.592554650 +0200 @@ -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-25 10:14:11.510593333 +0200 +++ b/src/mesa/drivers/dri/i965/Makefile 2011-03-25 10:16:03.350678481 +0200 @@ -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-25 10:14:12.147599512 +0200 +++ b/src/mesa/drivers/dri/nouveau/Makefile 2011-03-25 10:15:39.311445164 +0200 @@ -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-25 10:14:12.233600346 +0200 +++ b/src/mesa/drivers/dri/r200/Makefile 2011-03-25 10:18:00.818819173 +0200 @@ -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-25 10:14:12.292600919 +0200 +++ b/src/mesa/drivers/dri/r300/Makefile 2011-03-25 10:17:38.465602036 +0200 @@ -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-25 10:14:12.490602838 +0200 +++ b/src/mesa/drivers/dri/radeon/Makefile 2011-03-25 10:18:34.154143053 +0200 @@ -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)