Package-Name: mesa3d
Gentoo-Package: media-libs/mesa3d
Rebuild-For: ggi svgalib
Homepage: http://www.mesa3d.org/
Source: sourceforge:///mesa3d/MesaLib-(\d+.[02468]\d*(.\d+)?).tar.gz $1
More-Source-1: MesaGLUT-$1.tar.gz
More-Source-2: MesaDemos-$1.tar.gz
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
	tar xzvfp "$(SOURCE1)"
	tar xzvfp "$(SOURCE2)"
	mv Mesa-"$(VERSION)" mesa3d-"$(VERSION)"
Compile:
	-perl -pi -e 's/X11R6/X11/g' configs/*
	$(MAKE) linux-x86 OPT_FLAGS="$(GCC_OPT_FLAGS) -O3 -fno-strict-aliasing"
# Avoid problems with overwriting shared libraries, and clear out old files
	rm -rf "$(PREFIX)"/lib "$(PREFIX)"/include
	mkdir -p "$(PREFIX)"/include/GL
	mv lib "$(PREFIX)"/
	cp -pf include/GL/*.h "$(PREFIX)"/include/GL/
	rm -rf "$(PREFIX)"/{demos,redbook,samples,xdemos}
	mkdir -p "$(PREFIX)"/{demos,redbook,samples,xdemos}
	set -e ; for i in demos redbook samples xdemos ; do \
		cp -p `find progs/$$i -type f -perm +100` "$(PREFIX)"/$$i/ ; \
	done
	rm -f "$(PREFIX)"/{demos,redbook,samples,xdemos}/*.[ch]
	-strip "$(PREFIX)"/{demos,redbook,samples,xdemos}/*
	cp -p progs/demos/README progs/demos/*.[ch] progs/demos/*.dat "$(PREFIX)"/demos/
	cp -p progs/redbook/README progs/redbook/*.[ch] "$(PREFIX)"/redbook/
	cp -p progs/samples/README progs/samples/*.[ch] "$(PREFIX)"/samples/
	cp -p progs/xdemos/*.[ch] "$(PREFIX)"/xdemos/
	cp -a docs progs/images "$(PREFIX)"/
Install:
	if \! packager c nvidia-x86 && \! packager c nvidia-x86_64; then \
		$(MAKE) instinc INC=GL; \
		$(MAKE) instlib LIB=GL; \
	else \
		rm -vf "$(PREFIX)"/lib/libGL.so*; \
	fi
	$(MAKE) instlib LIB="GLU GLw OSMesa glut"
	$(MAKE) addldso
Clean:
	@set -e ; cd "$(PREFIX)"/lib ; \
	for lib in *.so.[0-9] ; do \
		reallib=`/bin/ls -l "$$lib" | sed 's/.* -> //'` ; \
		for file in $$lib.[0-9]*.[0-9]* ; do \
			if test "$$file" != "$$reallib" ; then \
				rm -fv "$$file" ; \
			fi ; \
		done ; \
	done
NoPatch: <<EOT
######## begin optimization flags patch (https://bugs.freedesktop.org/show_bug.cgi?id=2542)
### FIXME: 6.4 uses OPT_FLAGS instead, linux only
diff -ur ../mesa3d-6.2.1-orig/configs/aix configs/aix
--- ../mesa3d-6.2.1-orig/configs/aix	2004-09-14 06:00:35 +0900
+++ configs/aix	2005-02-15 14:24:29 +0900
@@ -7,9 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = xlC
+CFLAGS = -O
 
-CFLAGS = -O -DAIXV3
-CXXFLAGS = -O -DAIXV3
+MESA_CFLAGS = -DAIXV3
 MKLIB_OPTIONS =
 
 # Library names (actual file names)
diff -ur ../mesa3d-6.2.1-orig/configs/aix-gcc configs/aix-gcc
--- ../mesa3d-6.2.1-orig/configs/aix-gcc	2004-09-14 06:00:35 +0900
+++ configs/aix-gcc	2005-02-15 14:24:29 +0900
@@ -7,9 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -O2
 
-CFLAGS = -O2 -DAIXV3
-CXXFLAGS = -O2 -DAIXV3
+MESA_CFLAGS = -DAIXV3
 
 MKLIB_OPTIONS = -arch aix-gcc
 GL_LIB_DEPS = -lX11 -lXext -lm
diff -ur ../mesa3d-6.2.1-orig/configs/aix-static configs/aix-static
--- ../mesa3d-6.2.1-orig/configs/aix-static	2004-09-14 06:00:35 +0900
+++ configs/aix-static	2005-02-15 14:24:29 +0900
@@ -7,9 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = xlC
+CFLAGS = -O
 
-CFLAGS = -O -DAIXV3
-CXXFLAGS = -O -DAIXV3
+MESA_CFLAGS = -DAIXV3
 MKLIB_OPTIONS = -static
 
 # Library names (actual file names)
diff -ur ../mesa3d-6.2.1-orig/configs/beos configs/beos
--- ../mesa3d-6.2.1-orig/configs/beos	2004-09-14 06:00:35 +0900
+++ configs/beos	2005-02-15 14:26:11 +0900
@@ -32,20 +32,18 @@
 	CXX = g++
 	LD = gcc
 	
-	CFLAGS = \
+	MESA_CFLAGS = \
 		-Wall -Wno-multichar -Wno-ctor-dtor-privacy \
 		$(DEFINES)
 
-	CXXFLAGS = $(CFLAGS)
-
 	LDFLAGS += -Xlinker
 
 	ifdef DEBUG
-		CFLAGS   += -g -O0
+		CFLAGS   = -g -O0
 		LDFLAGS += -g
 		DEFINES += -DDEBUG
 	else
-		CFLAGS   += -O3
+		CFLAGS   = -O3
 	endif
 
 	GLUT_CFLAGS = -fexceptions
@@ -57,12 +55,10 @@
 	CXX = $(CC)
 	LD = mwldppc
 
-	CFLAGS = \
+	MESA_CFLAGS = \
 		-w on -requireprotos \
 		$(DEFINES)
 
-	CXXFLAGS = $(CFLAGS)
-
 	LDFLAGS += \
 		-export pragma \
 		-init _init_routine_ \
@@ -73,12 +69,12 @@
 		/boot/develop/lib/ppc/start_dyn.o 
 
 	ifdef DEBUG
-		CFLAGS   += -g -O0
-		CXXFLAGS += -g -O0
+		CFLAGS   = -g -O0
+		CXXFLAGS = -g -O0
 		LDFLAGS += -g
 	else
-		CFLAGS   += -O7
-		CXXFLAGS += -O7
+		CFLAGS   = -O7
+		CXXFLAGS = -O7
 	endif
 
 	GLUT_CFLAGS = -fexceptions
diff -ur ../mesa3d-6.2.1-orig/configs/darwin configs/darwin
--- ../mesa3d-6.2.1-orig/configs/darwin	2004-09-14 06:00:35 +0900
+++ configs/darwin	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = cc
 CXX = cc
-CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
-CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
+CFLAGS = -O3 -ffast-math -funroll-loops -fexpensive-optimizations
+MESA_CFLAGS = -I/usr/X11R6/include -fPIC -fno-common -no-cpp-precomp -dynamic -Ddarwin
 
 # Library names (actual file names)
 GL_LIB_NAME = libGL.dylib
diff -ur ../mesa3d-6.2.1-orig/configs/darwin-static configs/darwin-static
--- ../mesa3d-6.2.1-orig/configs/darwin-static	2004-09-14 06:00:35 +0900
+++ configs/darwin-static	2005-02-15 14:24:29 +0900
@@ -5,8 +5,8 @@
 CONFIG_NAME = darwin-static
 
 # Compiler and flags
-CFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
-CXXFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
+CFLAGS = -O3 -ffast-math -funroll-loops -fexpensive-optimizations
+MESA_CFLAGS = -I/usr/X11R6/include -fno-common -no-cpp-precomp -dynamic -Ddarwin
 MKLIB_OPTIONS = -static
 
 # Library names (actual file names)
diff -ur ../mesa3d-6.2.1-orig/configs/default configs/default
--- ../mesa3d-6.2.1-orig/configs/default	2004-12-06 03:25:38 +0900
+++ configs/default	2005-02-15 14:24:29 +0900
@@ -17,7 +17,9 @@
 CC = cc
 CXX = CC
 CFLAGS = -O
-CXXFLAGS = -O
+CXXFLAGS = $(CFLAGS)
+MESA_CFLAGS =
+MESA_CXXFLAGS = $(MESA_CFLAGS)
 GLU_CFLAGS = 
 
 # Misc tools and flags
diff -ur ../mesa3d-6.2.1-orig/configs/freebsd configs/freebsd
--- ../mesa3d-6.2.1-orig/configs/freebsd	2004-09-14 06:00:35 +0900
+++ configs/freebsd	2005-02-15 14:24:29 +0900
@@ -8,9 +8,9 @@
 CC = gcc
 CXX = g++
 MAKE = gmake
+CFLAGS = -O2
 
-CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
-CXXFLAGS = -O2 -fPIC -pedantic
+MESA_CFLAGS = -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
 GLUT_CFLAGS = -fexceptions
 
 APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff -ur ../mesa3d-6.2.1-orig/configs/hpux10 configs/hpux10
--- ../mesa3d-6.2.1-orig/configs/hpux10	2004-09-14 06:00:35 +0900
+++ configs/hpux10	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = cc
 CXX = aCC
+CFLAGS = +O3
 
-CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
-CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
+MESA_CFLAGS = +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
 
 APP_LIB_DEPS = -$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff -ur ../mesa3d-6.2.1-orig/configs/hpux10-gcc configs/hpux10-gcc
--- ../mesa3d-6.2.1-orig/configs/hpux10-gcc	2004-09-14 06:00:35 +0900
+++ configs/hpux10-gcc	2005-02-15 14:24:29 +0900
@@ -7,9 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -O3
 
-CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include  -DUSE_XSHM
-CXXFLAGS = -ansi -O3 -D_HPUX_SOURCE
+MESA_CFLAGS = -ansi -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include  -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 
 APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff -ur ../mesa3d-6.2.1-orig/configs/hpux10-static configs/hpux10-static
--- ../mesa3d-6.2.1-orig/configs/hpux10-static	2004-09-14 06:00:35 +0900
+++ configs/hpux10-static	2005-02-15 14:24:29 +0900
@@ -7,9 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = aCC
+CFLAGS = +O3
 
-CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
-CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
+MESA_CFLAGS = +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
 
 MKLIB_OPTIONS = -static
 
diff -ur ../mesa3d-6.2.1-orig/configs/hpux11-32-static configs/hpux11-32-static
--- ../mesa3d-6.2.1-orig/configs/hpux11-32-static	2004-09-14 06:00:35 +0900
+++ configs/hpux11-32-static	2005-02-15 14:24:29 +0900
@@ -7,10 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = aCC
+CFLAGS = +O3
 
-CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
-
-CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
+MESA_CFLAGS = +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
 
 MKLIB_OPTIONS = -static
 
diff -ur ../mesa3d-6.2.1-orig/configs/hpux11-32-static-nothreads configs/hpux11-32-static-nothreads
--- ../mesa3d-6.2.1-orig/configs/hpux11-32-static-nothreads	2004-09-14 06:00:35 +0900
+++ configs/hpux11-32-static-nothreads	2005-02-15 14:24:29 +0900
@@ -7,10 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = aCC
+CFLAGS = +O3
 
-CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
-
-CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
+MESA_CFLAGS = +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
 
 MKLIB_OPTIONS = -static
 
diff -ur ../mesa3d-6.2.1-orig/configs/hpux11-64-static configs/hpux11-64-static
--- ../mesa3d-6.2.1-orig/configs/hpux11-64-static	2004-09-14 06:00:35 +0900
+++ configs/hpux11-64-static	2005-02-15 14:24:29 +0900
@@ -7,10 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = aCC
+CFLAGS = +O3
 
-CFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
-
-CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
+MESA_CFLAGS = +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
 
 MKLIB_OPTIONS = -static
 
diff -ur ../mesa3d-6.2.1-orig/configs/hpux9 configs/hpux9
--- ../mesa3d-6.2.1-orig/configs/hpux9	2004-09-14 06:00:35 +0900
+++ configs/hpux9	2005-02-15 14:24:29 +0900
@@ -9,8 +9,8 @@
 # XXX fix this
 CXX = c++
 
-CFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
-CXXFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
+CFLAGS = +O3
+MESA_CFLAGS = +z +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
 
 APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm
 
diff -ur ../mesa3d-6.2.1-orig/configs/hpux9-gcc configs/hpux9-gcc
--- ../mesa3d-6.2.1-orig/configs/hpux9-gcc	2004-09-14 06:00:35 +0900
+++ configs/hpux9-gcc	2005-02-15 14:24:29 +0900
@@ -7,8 +7,7 @@
 # Compiler and flags
 CC = cc
 CXX = aCC
-
-CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
-CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
+CFLAGS = +O3
+MESA_CFLAGS = +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
 
 APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff -ur ../mesa3d-6.2.1-orig/configs/irix6-64 configs/irix6-64
--- ../mesa3d-6.2.1-orig/configs/irix6-64	2004-09-14 06:00:35 +0900
+++ configs/irix6-64	2005-02-15 14:24:29 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = CC
-CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM
-CXXFLAGS = -64 -O3 -ansi -woff 1174
+CFLAGS = -O3
+MESA_CFLAGS = -64 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM
+MESA_CXXFLAGS = -64 -ansi -woff 1174
 MKLIB_OPTIONS = -archopt 64
 
 GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
diff -ur ../mesa3d-6.2.1-orig/configs/irix6-64-static configs/irix6-64-static
--- ../mesa3d-6.2.1-orig/configs/irix6-64-static	2004-09-14 06:00:35 +0900
+++ configs/irix6-64-static	2005-02-15 14:24:29 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = CC
-CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM
-CXXFLAGS = -64 -O3 -ansi -woff 1174
+CFLAGS = -O3
+MESA_CFLAGS = -64 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM
+MESA_CXXFLAGS = -64 -ansi -woff 1174
 MKLIB_OPTIONS = -archopt 64 -static
 
 GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
diff -ur ../mesa3d-6.2.1-orig/configs/irix6-n32 configs/irix6-n32
--- ../mesa3d-6.2.1-orig/configs/irix6-n32	2004-09-14 06:00:35 +0900
+++ configs/irix6-n32	2005-02-15 14:24:29 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = CC
-CFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1521,1552 -DUSE_XSHM
-CXXFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1552
+CFLAGS = -O3 -mips3
+MESA_CFLAGS = -n32 -ansi -woff 1174,1521,1552 -DUSE_XSHM
+MESA_CXXFLAGS = -n32 -ansi -woff 1174,1552
 MKLIB_OPTIONS = -archopt n32
 
 GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
diff -ur ../mesa3d-6.2.1-orig/configs/irix6-n32-static configs/irix6-n32-static
--- ../mesa3d-6.2.1-orig/configs/irix6-n32-static	2004-09-14 06:00:35 +0900
+++ configs/irix6-n32-static	2005-02-15 14:24:29 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = CC
-CFLAGS = -n32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
-CXXFLAGS = -n32 -mips2 -O2 -ansi -woff 3262,3666
+CFLAGS = -O2 -mips2
+MESA_CFLAGS = -n32 -ansi -woff 1521,1552 -DUSE_XSHM
+MESA_CXXFLAGS = -n32 -ansi -woff 3262,3666
 MKLIB_OPTIONS = -archopt n32 -static
 
 GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
diff -ur ../mesa3d-6.2.1-orig/configs/irix6-o32 configs/irix6-o32
--- ../mesa3d-6.2.1-orig/configs/irix6-o32	2004-09-14 06:00:35 +0900
+++ configs/irix6-o32	2005-02-15 14:24:29 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = CC
-CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
-CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
+CFLAGS = -O2
+MESA_CFLAGS = -32 -ansi -woff 1521,1552 -DUSE_XSHM
+MESA_CXXFLAGS = -32 -ansi -woff 3262,3666
 MKLIB_OPTIONS = -archopt o32
 
 GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
diff -ur ../mesa3d-6.2.1-orig/configs/irix6-o32-static configs/irix6-o32-static
--- ../mesa3d-6.2.1-orig/configs/irix6-o32-static	2004-09-14 06:00:35 +0900
+++ configs/irix6-o32-static	2005-02-15 14:24:29 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = CC
-CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
-CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
+CFLAGS = -O2 -mips2
+MESA_CFLAGS = -32 -ansi -woff 1521,1552 -DUSE_XSHM
+MESA_CXXFLAGS = -32 -ansi -woff 3262,3666
 MKLIB_OPTIONS = -archopt o32 -static
 
 GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
diff -ur ../mesa3d-6.2.1-orig/configs/linux configs/linux
--- ../mesa3d-6.2.1-orig/configs/linux	2004-09-14 06:00:35 +0900
+++ configs/linux	2005-02-15 14:24:29 +0900
@@ -7,9 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -O3 -ffast-math
 
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+MESA_CFLAGS = -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
 GLUT_CFLAGS = -fexceptions
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-alpha configs/linux-alpha
--- ../mesa3d-6.2.1-orig/configs/linux-alpha	2004-09-14 06:06:39 +0900
+++ configs/linux-alpha	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE -DUSE_XSHM
-CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE
+CFLAGS = -O3 -mcpu=ev5
+MESA_CFLAGS = -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 
 GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
diff -ur ../mesa3d-6.2.1-orig/configs/linux-alpha-static configs/linux-alpha-static
--- ../mesa3d-6.2.1-orig/configs/linux-alpha-static	2004-09-14 06:06:36 +0900
+++ configs/linux-alpha-static	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE -DUSE_XSHM
-CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE
+CFLAGS = -O3 -mcpu=ev5
+MESA_CFLAGS = -ansi -mieee -pedantic -D_XOPEN_SOURCE -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 MKLIB_OPTIONS = -static
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-debug configs/linux-debug
--- ../mesa3d-6.2.1-orig/configs/linux-debug	2004-09-14 06:00:35 +0900
+++ configs/linux-debug	2005-02-15 14:24:29 +0900
@@ -7,10 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -g -ffast-math
 
-CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG
-
-CXXFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG
+MESA_CFLAGS = -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG
 
 GLUT_CFLAGS = -fexceptions
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-dri configs/linux-dri
--- ../mesa3d-6.2.1-orig/configs/linux-dri	2004-09-28 01:08:32 +0900
+++ configs/linux-dri	2005-02-15 14:35:48 +0900
@@ -8,19 +8,18 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -O -g -ffast-math
 
 WARN_FLAGS = -Wall
-OPT_FLAGS = -O
 SOURCE_FLAGS = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
 	-D_BSD_SOURCE -D_GNU_SOURCE
 PIC_FLAGS = -fPIC
 
-CFLAGS = -DDRI_NEW_INTERFACE_ONLY $(WARN_FLAGS) -g $(OPT_FLAGS) $(ASM_FLAGS) \
-	-std=c99 $(PIC_FLAGS) -ffast-math $(SOURCE_FLAGS) -DPTHREADS \
-	-I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
-
-CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY $(WARN_FLAGS) -g $(OPT_FLAGS) -fPIC \
+MESA_COMMON = -DDRI_NEW_INTERFACE_ONLY $(WARN_FLAGS) $(PIC_FLAGS) \
 	$(SOURCE_FLAGS)
+MESA_CFLAGS = $(MESA_COMMON) $(ASM_FLAGS) -std=c99 -DPTHREADS \
+	-I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
+MESA_CXXFLAGS = $(MESA_COMMON)
 
 ASM_SOURCES = 
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-dri-x86-64 configs/linux-dri-x86-64
--- ../mesa3d-6.2.1-orig/configs/linux-dri-x86-64	2004-09-14 06:00:35 +0900
+++ configs/linux-dri-x86-64	2005-02-15 14:24:29 +0900
@@ -8,10 +8,11 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -g -ffast-math
 
-CFLAGS = -DDRI_NEW_INTERFACE_ONLY -m64 -Wmissing-prototypes -g -std=c99  -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -D_GNU_SOURCE  -D__AMD64__ -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
-
-CXXFLAGS = -DDRI_NEW_INTERFACE_ONLY -m64 -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D__AMD64__
+MESA_COMMON = -Wall -Wmissing-prototypes -Wundef -ansi -pedantic -m64 -fPIC -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -D_GNU_SOURCE  -D__AMD64__ -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
+MESA_CFLAGS = $(MESA_COMMON) -std=c99
+MESA_CXXFLAGS = $(MESA_COMMON)
 
 #ASM_SOURCES = $(X86_SOURCES)
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-glide configs/linux-glide
--- ../mesa3d-6.2.1-orig/configs/linux-glide	2004-09-14 06:06:22 +0900
+++ configs/linux-glide	2005-02-15 14:24:29 +0900
@@ -7,9 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O3 -ffast-math
+MESA_CFLAGS = -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include
 GLUT_CFLAGS = -fexceptions
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-icc configs/linux-icc
--- ../mesa3d-6.2.1-orig/configs/linux-icc	2004-09-14 06:06:15 +0900
+++ configs/linux-icc	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = icc
 CXX = g++
-CFLAGS = -O3 -tpp6 -axK -KPIC -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
-CXXFLAGS = -O3
+CFLAGS = -O3 -tpp6 -axK
+MESA_CFLAGS = -KPIC -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
 GLUT_CFLAGS = -fexceptions
 MKLIB_OPTIONS = -arch icc
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-icc-static configs/linux-icc-static
--- ../mesa3d-6.2.1-orig/configs/linux-icc-static	2004-09-14 06:06:09 +0900
+++ configs/linux-icc-static	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = icc
 CXX = g++
-CFLAGS = -O3 -tpp6 -axK -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
-CXXFLAGS = -O3
+CFLAGS = -O3 -tpp6 -axK
+MESA_CFLAGS = -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
 GLUT_CFLAGS = -fexceptions
 MKLIB_OPTIONS = -static -arch icc
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-osmesa16 configs/linux-osmesa16
--- ../mesa3d-6.2.1-orig/configs/linux-osmesa16	2004-09-14 06:00:35 +0900
+++ configs/linux-osmesa16	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O3 -ffast-math
+MESA_CFLAGS = -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
 
 
 # Library names
diff -ur ../mesa3d-6.2.1-orig/configs/linux-osmesa16-static configs/linux-osmesa16-static
--- ../mesa3d-6.2.1-orig/configs/linux-osmesa16-static	2004-09-14 06:00:35 +0900
+++ configs/linux-osmesa16-static	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O3 -ffast-math
+CFLAGS = -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
 MKLIB_OPTIONS = -static
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-osmesa32 configs/linux-osmesa32
--- ../mesa3d-6.2.1-orig/configs/linux-osmesa32	2004-09-14 06:00:35 +0900
+++ configs/linux-osmesa32	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O3 -ffast-math
+MESA_CFLAGS = -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
 
 
 # Library names
diff -ur ../mesa3d-6.2.1-orig/configs/linux-ppc configs/linux-ppc
--- ../mesa3d-6.2.1-orig/configs/linux-ppc	2004-09-14 06:06:02 +0900
+++ configs/linux-ppc	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
-CXXFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O3 -mcpu=603 -ffast-math -funroll-loops
+MESA_CFLAGS = -ansi -pedantic -fPIC -fsigned-char -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 
 GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
diff -ur ../mesa3d-6.2.1-orig/configs/linux-ppc-static configs/linux-ppc-static
--- ../mesa3d-6.2.1-orig/configs/linux-ppc-static	2004-09-14 06:05:59 +0900
+++ configs/linux-ppc-static	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
-CXXFLAGS = -O3 -mcpu=603 -ansi -pedantic -fPIC -fsigned-char -ffast-math -funroll-loops -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O3 -mcpu=603 -ffast-math -funroll-loops
+MESA_CFLAGS = -ansi -pedantic -fPIC -fsigned-char -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 MKLIB_OPTIONS = -static
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-solo configs/linux-solo
--- ../mesa3d-6.2.1-orig/configs/linux-solo	2004-09-14 06:00:35 +0900
+++ configs/linux-solo	2005-02-15 14:24:29 +0900
@@ -7,12 +7,12 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -g -ffast-math
+CXXFLAGS = -O3
 
-CCOMMON = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE
-
-CFLAGS = $(CCOMMON) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math
-
-CXXFLAGS = $(CCOMMON) -Wall -O3 -ansi -pedantic -fPIC
+MESA_COMMON = -Wall -Wmissing-prototypes -Wundef -ansi -pedantic -fPIC -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE
+MESA_CFLAGS = $(MESA_COMMON) -std=c99
+MESA_CXXFLAGS = $(MESA_COMMON)
 
 
 ASM_SOURCES = $(X86_SOURCES)
diff -ur ../mesa3d-6.2.1-orig/configs/linux-solo-ia64 configs/linux-solo-ia64
--- ../mesa3d-6.2.1-orig/configs/linux-solo-ia64	2004-09-14 06:05:35 +0900
+++ configs/linux-solo-ia64	2005-02-15 14:24:29 +0900
@@ -7,12 +7,12 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -g -ffast-math
+CXXFLAGS = -O3
 
-CCOMMON = -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE
-
-CFLAGS = $(CCOMMON) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math
-
-CXXFLAGS = $(CCOMMON) -Wall -O3 -ansi -pedantic -fPIC
+MESA_COMMON = -Wall -Wmissing-prototypes -Wundef -ansi -pedantic -fPIC -DDRI_NEW_INTERFACE_ONLY -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE
+MESA_CFLAGS = $(MESA_COMMON) -std=c99
+MESA_CXXFLAGS = $(MESA_COMMON)
 
 
 # Library/program dependencies
diff -ur ../mesa3d-6.2.1-orig/configs/linux-sparc configs/linux-sparc
--- ../mesa3d-6.2.1-orig/configs/linux-sparc	2004-09-14 06:05:22 +0900
+++ configs/linux-sparc	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
-CXXFLAGS = -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O2 -ffast-math
+MESA_CFLAGS = -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 
 GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
diff -ur ../mesa3d-6.2.1-orig/configs/linux-sparc5 configs/linux-sparc5
--- ../mesa3d-6.2.1-orig/configs/linux-sparc5	2004-09-14 06:05:16 +0900
+++ configs/linux-sparc5	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
-CXXFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -mcpu=ultrasparc -O2 -ffast-math
+MESA_CFLAGS = -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 
 GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
diff -ur ../mesa3d-6.2.1-orig/configs/linux-static configs/linux-static
--- ../mesa3d-6.2.1-orig/configs/linux-static	2004-09-14 06:00:36 +0900
+++ configs/linux-static	2005-02-15 14:24:29 +0900
@@ -7,11 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-
-CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
-CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O3 -ffast-math
+MESA_CFLAGS = -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
 GLUT_CFLAGS = -fexceptions
-
 MKLIB_OPTIONS = -static
 
 # Library names (actual file names)
diff -ur ../mesa3d-6.2.1-orig/configs/linux-tcc configs/linux-tcc
--- ../mesa3d-6.2.1-orig/configs/linux-tcc	2004-09-14 06:05:01 +0900
+++ configs/linux-tcc	2005-02-15 14:24:29 +0900
@@ -7,12 +7,13 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
+CFLAGS = -g -ffast-math
 
 TCC_DIR=/home/progs/tcc-0.9.20
 
-CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG -DUSE_TCC -I$(TCC_DIR)
-
-CXXFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG
+MESA_COMMON = -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG
+MESA_CFLAGS = $(MESA_COMMON) -DUSE_TCC -I$(TCC_DIR)
+MESA_CXXFLAGS = $(MESA_COMMON)
 
 GLUT_CFLAGS = -fexceptions
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-ultrasparc configs/linux-ultrasparc
--- ../mesa3d-6.2.1-orig/configs/linux-ultrasparc	2004-09-14 06:04:55 +0900
+++ configs/linux-ultrasparc	2005-02-15 14:24:29 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
-CXXFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -O2 -mv8 -mtune=ultrasparc
+MESA_CFLAGS = -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 
 GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
diff -ur ../mesa3d-6.2.1-orig/configs/linux-x86 configs/linux-x86
--- ../mesa3d-6.2.1-orig/configs/linux-x86	2004-09-14 06:04:44 +0900
+++ configs/linux-x86	2005-02-15 14:24:29 +0900
@@ -7,11 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-
-CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
-
-CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
-
+CFLAGS = -O3
+MESA_CFLAGS = -Wall -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
 GLUT_CFLAGS = -fexceptions
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-x86-64 configs/linux-x86-64
--- ../mesa3d-6.2.1-orig/configs/linux-x86-64	2004-09-14 06:04:38 +0900
+++ configs/linux-x86-64	2005-02-15 14:24:29 +0900
@@ -7,11 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-
-CFLAGS = -m64 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -D__AMD64__ -I/usr/X11R6/include
-
-CXXFLAGS = -m64 -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D__AMD64__
-
+CFLAGS = -O3
+MESA_CFLAGS = -m64 -Wall -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -D__AMD64__ -I/usr/X11R6/include
 GLUT_CFLAGS = -fexceptions
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-x86-64-static configs/linux-x86-64-static
--- ../mesa3d-6.2.1-orig/configs/linux-x86-64-static	2004-09-14 06:00:36 +0900
+++ configs/linux-x86-64-static	2005-02-15 14:24:29 +0900
@@ -7,13 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-
-CFLAGS = -m64 -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -D__AMD64__ -I/usr/X11R6/include
-
-CXXFLAGS = -m64 -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D__AMD64__
-
+CFLAGS = -O3
+MESA_CFLAGS = -m64 -Wall -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -D__AMD64__ -I/usr/X11R6/include
 GLUT_CFLAGS = -fexceptions
-
 MKLIB_OPTIONS = -static
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-x86-debug configs/linux-x86-debug
--- ../mesa3d-6.2.1-orig/configs/linux-x86-debug	2004-09-14 06:00:36 +0900
+++ configs/linux-x86-debug	2005-02-15 14:24:29 +0900
@@ -4,7 +4,4 @@
 include $(TOP)/configs/linux-x86
 
 CONFIG_NAME = linux-x86-debug
-
-CFLAGS = -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
-
-CXXFLAGS = -Wall -g -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+CFLAGS = -g
diff -ur ../mesa3d-6.2.1-orig/configs/linux-x86-glide configs/linux-x86-glide
--- ../mesa3d-6.2.1-orig/configs/linux-x86-glide	2004-09-14 06:04:20 +0900
+++ configs/linux-x86-glide	2005-02-15 14:24:29 +0900
@@ -7,11 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-
-CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include
-
-CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
-
+CFLAGS = -O3
+MESA_CFLAGS = -Wall -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include
 GLUT_CFLAGS = -fexceptions
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/linux-x86-static configs/linux-x86-static
--- ../mesa3d-6.2.1-orig/configs/linux-x86-static	2004-09-14 06:00:36 +0900
+++ configs/linux-x86-static	2005-02-15 14:24:29 +0900
@@ -7,13 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-
-CFLAGS = -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
-
-CXXFLAGS = -Wall -O3 -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
-
+CFLAGS = -O3
+MESA_CFLAGS = -Wall -ansi -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
 GLUT_CFLAGS = -fexceptions
-
 MKLIB_OPTIONS = -static
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/netbsd configs/netbsd
--- ../mesa3d-6.2.1-orig/configs/netbsd	2004-09-14 06:00:36 +0900
+++ configs/netbsd	2005-02-15 14:24:30 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O2 -fPIC -DUSE_XSHM -I/usr/X11R6/include -DHZ=100
-CXXFLAGS = -O2 -fPIC
+CFLAGS = -O2
+MESA_CFLAGS = -fPIC -DUSE_XSHM -I/usr/X11R6/include -DHZ=100
 GLUT_CFLAGS = -fexceptions
 APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
 
diff -ur ../mesa3d-6.2.1-orig/configs/openbsd configs/openbsd
--- ../mesa3d-6.2.1-orig/configs/openbsd	2004-09-14 06:00:36 +0900
+++ configs/openbsd	2005-02-15 14:24:30 +0900
@@ -7,8 +7,8 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O2 -fPIC -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
-CXXFLAGS = -O2 -fPIC -I/usr/X11R6/include -DHZ=100
+CFLAGS = -O2
+MESA_CFLAGS = -fPIC -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
 
 GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm
 OSMESA_LIB_DEPS = -lm
diff -ur ../mesa3d-6.2.1-orig/configs/osf1 configs/osf1
--- ../mesa3d-6.2.1-orig/configs/osf1	2004-11-16 01:55:43 +0900
+++ configs/osf1	2005-02-15 14:24:30 +0900
@@ -7,8 +7,10 @@
 # Compiler and flags
 CC = cc
 CXX = cxx
-CFLAGS = -O0 -std1 -ieee_with_no_inexact -DUSE_XSHM
-CXXFLAGS = -O2 -std ansi -ieee
+CFLAGS = -O0
+CXXFLAGS = -O2
+MESA_CFLAGS = -std1 -ieee_with_no_inexact -DUSE_XSHM
+MESA_CXXFLAGS = -std ansi -ieee
 
 GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
 GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
diff -ur ../mesa3d-6.2.1-orig/configs/osf1~ configs/osf1~
--- ../mesa3d-6.2.1-orig/configs/osf1~	2004-09-14 06:00:36 +0900
+++ configs/osf1~	2004-11-16 01:55:43 +0900
@@ -13,6 +13,4 @@
 GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
 GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
 GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
-APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lXext -lXmu -lXi -lm
-
-
+APP_LIB_DEPS = -L$(LIB_DIR) -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
diff -ur ../mesa3d-6.2.1-orig/configs/solaris-x86 configs/solaris-x86
--- ../mesa3d-6.2.1-orig/configs/solaris-x86	2004-09-14 06:00:36 +0900
+++ configs/solaris-x86	2005-02-15 14:24:30 +0900
@@ -6,7 +6,9 @@
 
 # Compiler and flags
 CC = cc
-CFLAGS = -Xa -xO3 -xpentium -KPIC -I/usr/openwin/include -DUSE_XSHM
+CFLAGS = -xO3 -xpentium
+CXXFLAGS = -xO3 -xpentium
+MESA_CFLAGS = -Xa -KPIC -I/usr/openwin/include -DUSE_XSHM
 MKLIB_OPTIONS = -static
 
 APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
diff -ur ../mesa3d-6.2.1-orig/configs/solaris-x86-gcc configs/solaris-x86-gcc
--- ../mesa3d-6.2.1-orig/configs/solaris-x86-gcc	2004-09-14 06:00:36 +0900
+++ configs/solaris-x86-gcc	2005-02-15 14:24:30 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM
-CXXFLAGS = -O3 -m486 -fPIC
+CFLAGS = -O3 -m486
+CXXFLAGS = -O3 -m486
+MESA_CFLAGS = -fPIC -I/usr/openwin/include -DUSE_XSHM
 GLUT_CFLAGS = -fexceptions
 MKLIB_OPTIONS = -static
 
diff -ur ../mesa3d-6.2.1-orig/configs/sunos4 configs/sunos4
--- ../mesa3d-6.2.1-orig/configs/sunos4	2004-09-14 06:00:36 +0900
+++ configs/sunos4	2005-02-15 14:24:30 +0900
@@ -6,7 +6,9 @@
 
 # Compiler and flags
 CC = acc
-CFLAGS = -Kpic -O -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4
+CFLAGS = -O
+CXXFLAGS = -O
+MESA_CFLAGS = -Kpic -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4
 APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/lib/X11R5 -lX11 -lXext -lXmu -lXi -lm
 
 
diff -ur ../mesa3d-6.2.1-orig/configs/sunos4-gcc configs/sunos4-gcc
--- ../mesa3d-6.2.1-orig/configs/sunos4-gcc	2004-09-14 06:00:36 +0900
+++ configs/sunos4-gcc	2005-02-15 14:24:30 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -fPIC -O3 -I/usr/openwin/include -I/usr/include/X11R5 -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4
-CXXFLAGS = -fPIC -O3 -I/usr/openwin/include -DSUNOS4
+CFLAGS = -O3
+CXXFLAGS = -O3
+MESA_CFLAGS = -fPIC -I/usr/openwin/include -I/usr/include/X11R5 -DUSE_XSHM -DSUNOS4
 GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
 
 APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
diff -ur ../mesa3d-6.2.1-orig/configs/sunos4-static configs/sunos4-static
--- ../mesa3d-6.2.1-orig/configs/sunos4-static	2004-09-14 06:00:36 +0900
+++ configs/sunos4-static	2005-02-15 14:24:30 +0900
@@ -6,7 +6,9 @@
 
 # Compiler and flags
 CC = acc
-CFLAGS = -O -DUSE_XSHM -DSUNOS4
+CFLAGS = -O
+CXXFLAGS = -O
+MESA_CFLAGS = -DUSE_XSHM -DSUNOS4
 MKLIB_OPTIONS = -static
 
 # Library names (actual file names)
diff -ur ../mesa3d-6.2.1-orig/configs/sunos5 configs/sunos5
--- ../mesa3d-6.2.1-orig/configs/sunos5	2004-09-14 06:00:36 +0900
+++ configs/sunos5	2005-02-15 14:24:30 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = c++
-CFLAGS = -KPIC -Xa -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM
-CXXFLAGS = -KPIC -Xa -O -I/usr/openwin/include -I/usr/dt/include
+CFLAGS = -O
+CXXFLAGS = -O
+MESA_CFLAGS = -KPIC -Xa -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM
 GLUT_CFLAGS = -DSOLARIS_2_4_BUG
 
 GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm
diff -ur ../mesa3d-6.2.1-orig/configs/sunos5-gcc configs/sunos5-gcc
--- ../mesa3d-6.2.1-orig/configs/sunos5-gcc	2004-09-14 06:00:36 +0900
+++ configs/sunos5-gcc	2005-02-15 14:24:30 +0900
@@ -9,8 +9,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -O3 -I/usr/openwin/include -fPIC -fomit-frame-pointer -D_REENTRANT -DUSE_XSHM -DUSE_SPARC_ASM
-CXXFLAGS = -O3 -I/usr/openwin/include -fPIC -fomit-frame-pointer -D_REENTRANT -DUSE_SPARC_ASM
+CFLAGS = -O3 -fomit-frame-pointer
+CXXFLAGS = -O3 -fomit-frame-pointer
+MESA_CFLAGS = -I/usr/openwin/include -fPIC -D_REENTRANT -DUSE_XSHM -DUSE_SPARC_ASM
 GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
 
 GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
diff -ur ../mesa3d-6.2.1-orig/configs/sunos5-smp configs/sunos5-smp
--- ../mesa3d-6.2.1-orig/configs/sunos5-smp	2004-09-14 06:00:36 +0900
+++ configs/sunos5-smp	2005-02-15 14:24:30 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = cc
 CXX = c++
-CFLAGS = -KPIC -Xa -native -fast -xO5 -xlibmil -xsafe=mem -xdepend -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DSOLARIS_2_4_BUG
-CXXFLAGS = -KPIC -Xa -native -fast -xO5 -xlibmil -xsafe=mem -xdepend -I/usr/openwin/include -I/usr/dt/include
+CFLAGS = -xO5
+CXXFLAGS = -xO5
+MESA_CFLAGS = -KPIC -Xa -native -fast -xlibmil -xsafe=mem -xdepend -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DSOLARIS_2_4_BUG
 GLUT_CFLAGS = -DSOLARIS_2_4_BUG
 
 GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
diff -ur ../mesa3d-6.2.1-orig/configs/ultrix-gcc configs/ultrix-gcc
--- ../mesa3d-6.2.1-orig/configs/ultrix-gcc	2004-09-14 06:00:36 +0900
+++ configs/ultrix-gcc	2005-02-15 14:24:30 +0900
@@ -7,8 +7,9 @@
 # Compiler and flags
 CC = gcc
 CXX = g++
-CFLAGS = -pedantic -O2
-CXXFLAGS = -pedantic -O2
+CFLAGS = -O2
+CXXFLAGS = -O2
+MESA_CFLAGS = -pedantic
 GLUT_CFLAGS = -fexceptions
 MKLIB_OPTIONS = -static
 
diff -ur ../mesa3d-6.2.1-orig/progs/beos/Makefile progs/beos/Makefile
--- ../mesa3d-6.2.1-orig/progs/beos/Makefile	2004-08-15 23:06:01 +0900
+++ progs/beos/Makefile	2005-02-15 14:24:30 +0900
@@ -30,4 +30,4 @@
 	$(LD) GLInfo.o $(INCLUDES) $(LDFLAGS) -o $@
 
 .cpp.o:
-	$(CC) -c $< $(INCLUDES) $(CFLAGS) -o $@
+	$(CC) -c $< $(INCLUDES) $(MESA_CXXFLAGS) $(CXXFLAGS) -o $@
diff -ur ../mesa3d-6.2.1-orig/progs/demos/Makefile progs/demos/Makefile
--- ../mesa3d-6.2.1-orig/progs/demos/Makefile	2004-10-24 02:00:52 +0900
+++ progs/demos/Makefile	2005-02-15 14:37:34 +0900
@@ -67,7 +67,7 @@
 
 # make executable from .c file:
 .c: $(LIB_DEP)
-	$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
+	$(CC) -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
 
 
 ##### TARGETS #####
@@ -89,9 +89,9 @@
 
 # special case: need the -lOSMesa library:
 osdemo: osdemo.c
-	$(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
+	$(CC) -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
 
 # another special case: need the -lOSMesa32 library:
 osdemo32: osdemo32.c
-	$(CC) -I$(INCDIR) $(CFLAGS) osdemo32.c $(OSMESA32_LIBS) -o $@
+	$(CC) -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) osdemo32.c $(OSMESA32_LIBS) -o $@
 
diff -ur ../mesa3d-6.2.1-orig/progs/demos/Makefile.cygnus progs/demos/Makefile.cygnus
--- ../mesa3d-6.2.1-orig/progs/demos/Makefile.cygnus	2003-06-05 09:50:19 +0900
+++ progs/demos/Makefile.cygnus	2005-02-15 14:24:30 +0900
@@ -65,7 +65,7 @@
 .SUFFIXES: .c
 
 .c: $(LIB_DEP)
-	$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
+	$(CC) -I$(INCDIR) -I../util $(MESA_CFLAGS) $(CFLAGS) $< $(GL_LIBS) -o $@
 
 
 ##### TARGETS #####
diff -ur ../mesa3d-6.2.1-orig/progs/redbook/Makefile progs/redbook/Makefile
--- ../mesa3d-6.2.1-orig/progs/redbook/Makefile	2004-03-27 08:58:08 +0900
+++ progs/redbook/Makefile	2005-02-15 14:24:30 +0900
@@ -24,7 +24,7 @@
 .SUFFIXES: .c
 
 .c: $(LIB_DEP)
-	$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
+	$(CC) -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
 
 
 
diff -ur ../mesa3d-6.2.1-orig/progs/samples/Makefile progs/samples/Makefile
--- ../mesa3d-6.2.1-orig/progs/samples/Makefile	2004-08-25 23:51:18 +0900
+++ progs/samples/Makefile	2005-02-15 14:24:30 +0900
@@ -18,7 +18,7 @@
 .SUFFIXES: .c
 
 .c: $(LIB_DEP)
-	$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
+	$(CC) -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
 
 
 
diff -ur ../mesa3d-6.2.1-orig/progs/xdemos/Makefile progs/xdemos/Makefile
--- ../mesa3d-6.2.1-orig/progs/xdemos/Makefile	2004-03-27 08:58:08 +0900
+++ progs/xdemos/Makefile	2005-02-15 14:24:30 +0900
@@ -33,7 +33,7 @@
 .SUFFIXES: .c
 
 .c: $(LIB_DEP)
-	$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
+	$(CC) -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
 
 
 ##### TARGETS #####
@@ -54,21 +54,21 @@
 	$(CC) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
 
 pbinfo.o: pbinfo.c pbutil.h
-	$(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbinfo.c
+	$(CC) -c -I. -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) pbinfo.c
 
 pbdemo.o: pbdemo.c pbutil.h
-	$(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbdemo.c
+	$(CC) -c -I. -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) pbdemo.c
 
 pbutil.o: pbutil.c pbutil.h
-	$(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbutil.c
+	$(CC) -c -I. -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) pbutil.c
 
 
 xrotfontdemo: xrotfontdemo.o xuserotfont.o
 	$(CC) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
 
 xuserotfont.o: xuserotfont.c xuserotfont.h
-	$(CC) -c -I. -I$(INCDIR) $(CFLAGS) xuserotfont.c
+	$(CC) -c -I. -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) xuserotfont.c
 
 xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
-	$(CC) -c -I. -I$(INCDIR) $(CFLAGS) xrotfontdemo.c
+	$(CC) -c -I. -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) xrotfontdemo.c
 
diff -ur ../mesa3d-6.2.1-orig/src/glu/mesa/Makefile src/glu/mesa/Makefile
--- ../mesa3d-6.2.1-orig/src/glu/mesa/Makefile	2004-08-16 16:46:28 +0900
+++ src/glu/mesa/Makefile	2005-02-15 14:24:30 +0900
@@ -28,7 +28,7 @@
 ##### RULES #####
 
 .c.o:
-	$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
+	$(CC) -c $(INCLUDES) $(MESA_CFLAGS) $(CFLAGS) $< -o $@
 
 ##### TARGETS #####
 
diff -ur ../mesa3d-6.2.1-orig/src/glu/sgi/Makefile src/glu/sgi/Makefile
--- ../mesa3d-6.2.1-orig/src/glu/sgi/Makefile	2004-08-16 16:46:28 +0900
+++ src/glu/sgi/Makefile	2005-02-15 14:24:30 +0900
@@ -115,10 +115,10 @@
 ##### RULES #####
 
 .c.o:
-	$(CC) -c $(INCDIRS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
+	$(CC) -c $(INCDIRS) $(MESA_CFLAGS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
 
 .cc.o:
-	$(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
+	$(CXX) -c $(INCDIRS) $(MESA_CXXFLAGS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
 
 
 ##### TARGETS #####
diff -ur ../mesa3d-6.2.1-orig/src/glut/beos/Makefile src/glut/beos/Makefile
--- ../mesa3d-6.2.1-orig/src/glut/beos/Makefile	2004-08-16 17:46:38 +0900
+++ src/glut/beos/Makefile	2005-02-15 14:24:30 +0900
@@ -67,10 +67,10 @@
 # Rules
 
 .cpp.o:
-	$(CC) -c $< $(INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) -o $@
+	$(CC) -c $< $(INCLUDES) $(MESA_CXXFLAGS) $(GLUT_CFLAGS) $(CXXFLAGS) -o $@
 
 .c.o:
-	$(CC) -c $< $(INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) -o $@
+	$(CC) -c $< $(INCLUDES) $(MESA_CFLAGS) $(GLUT_CFLAGS) $(CFLAGS) -o $@
 
 
 # ---- TARGETS
diff -ur ../mesa3d-6.2.1-orig/src/glut/glx/Makefile src/glut/glx/Makefile
--- ../mesa3d-6.2.1-orig/src/glut/glx/Makefile	2004-12-06 03:00:20 +0900
+++ src/glut/glx/Makefile	2005-02-15 14:24:30 +0900
@@ -79,7 +79,7 @@
 ##### RULES #####
 
 .c.o:
-	$(CC) -c -I$(TOP)/include $(CFLAGS) $(GLUT_CFLAGS) $<
+	$(CC) -c -I$(TOP)/include $(MESA_CFLAGS) $(GLUT_CFLAGS) $(CFLAGS) $<
 
 
 
diff -ur ../mesa3d-6.2.1-orig/src/glut/glx/Makefile.cygnus src/glut/glx/Makefile.cygnus
--- ../mesa3d-6.2.1-orig/src/glut/glx/Makefile.cygnus	1999-09-16 00:11:24 +0900
+++ src/glut/glx/Makefile.cygnus	2005-02-15 14:24:30 +0900
@@ -77,7 +77,7 @@
 ##### RULES #####
 
 .c.o:
-	$(CC) -c -I$(INCDIR) $(CFLAGS) $<
+	$(CC) -c -I$(INCDIR) $(MESA_CFLAGS) $(CFLAGS) $<
 
 
 
diff -ur ../mesa3d-6.2.1-orig/src/glut/glx/Makefile.sgi src/glut/glx/Makefile.sgi
--- ../mesa3d-6.2.1-orig/src/glut/glx/Makefile.sgi	1999-08-19 23:00:02 +0900
+++ src/glut/glx/Makefile.sgi	2005-02-15 14:24:30 +0900
@@ -107,7 +107,7 @@
 
 # avoid warnings when compiling lex generated code
 strokegen.o : strokegen.c
-	$(CC) $(CFLAGS) -woff 726,825,635,818,819,820,824,831,835,822,821,1167,1498,1116,1136,1174,1196,803 -c -MDupdate Makedepend strokegen.c
+	$(CC) $(MESA_CFLAGS) $(CFLAGS) -woff 726,825,635,818,819,820,824,831,835,822,821,1167,1498,1116,1136,1174,1196,803 -c -MDupdate Makedepend strokegen.c
 
 strokelex.c : strokelex.l
 	$(LEX) strokelex.l
@@ -115,7 +115,7 @@
 
 # avoid warnings when compiling lex generated code
 strokelex.o : strokelex.c
-	$(CC) $(CFLAGS) -woff 831,825,817,835,702,819,635,824,822,1167,1498,1110,1196,1174,803 -c -MDupdate Makedepend strokelex.c
+	$(CC) $(MESA_CFLAGS) $(CFLAGS) -woff 831,825,817,835,702,819,635,824,822,1167,1498,1110,1196,1174,803 -c -MDupdate Makedepend strokelex.c
 
 strokegen : strokegen.o strokelex.o
 	$(CC) -o $@ $(LDFLAGS) strokegen.o strokelex.o -ll
@@ -176,7 +176,7 @@
 
 dstr: dstr.c glut_util.o glut_glxext.o
 	$(RM) $@
-	$(CC) -g -o $@ $(CFLAGS) -DTEST dstr.c glut_util.o glut_glxext.o -lGLU -lGL -lXext -lX11 -lm
+	$(CC) -g -o $@ $(MESA_CFLAGS) $(CFLAGS) -DTEST dstr.c glut_util.o glut_glxext.o -lGLU -lGL -lXext -lX11 -lm
 
 ./glut.h : glut.h
 ./glutint.h : glutint.h
diff -ur ../mesa3d-6.2.1-orig/src/glw/Makefile src/glw/Makefile
--- ../mesa3d-6.2.1-orig/src/glw/Makefile	2004-06-26 07:51:39 +0900
+++ src/glw/Makefile	2005-02-15 14:24:30 +0900
@@ -17,7 +17,7 @@
 ##### RULES #####
 
 .c.o:
-	$(CC) -c $(INCDIRS) $(CFLAGS) $<
+	$(CC) -c $(INCDIRS) $(MESA_CFLAGS) $(CFLAGS) $<
 
 
 
diff -ur ../mesa3d-6.2.1-orig/src/mesa/Makefile src/mesa/Makefile
--- ../mesa3d-6.2.1-orig/src/mesa/Makefile	2004-10-04 23:44:50 +0900
+++ src/mesa/Makefile	2005-02-15 14:24:30 +0900
@@ -12,10 +12,10 @@
 
 
 .c.o:
-	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+	$(CC) -c $(INCLUDE_DIRS) $(MESA_CFLAGS) $(CFLAGS) $< -o $@
 
 .S.o:
-	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+	$(CC) -c $(INCLUDE_DIRS) $(MESA_CFLAGS) $< -o $@
 
 
 # Figure out what to make here
diff -ur ../mesa3d-6.2.1-orig/src/mesa/drivers/beos/Makefile src/mesa/drivers/beos/Makefile
--- ../mesa3d-6.2.1-orig/src/mesa/drivers/beos/Makefile	2004-08-14 23:22:35 +0900
+++ src/mesa/drivers/beos/Makefile	2005-02-15 14:24:30 +0900
@@ -158,13 +158,13 @@
 # Rules
 
 .c.o:
-	$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
+	$(CC) $(INCLUDES) $(MESA_CFLAGS) $(CFLAGS) -c $< -o $@
 
 .cpp.o:
-	$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
+	$(CC) $(INCLUDES) $(MESA_CXXFLAGS) $(CXXFLAGS) -c $< -o $@
 
 .S.o:
-	$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
+	$(CC) $(INCLUDES) $(MESA_CFLAGS) -c $< -o $@
 
 
 default: depend $(LIB_DIR) $(LIB_DIR)/$(GL_LIB_NAME)
diff -ur ../mesa3d-6.2.1-orig/src/mesa/x86/Makefile src/mesa/x86/Makefile
--- ../mesa3d-6.2.1-orig/src/mesa/x86/Makefile	2004-10-24 01:59:47 +0900
+++ src/mesa/x86/Makefile	2005-02-15 14:24:30 +0900
@@ -21,7 +21,7 @@
 
 # need some special rules here, unfortunately
 matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes.c
-	$(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes
+	$(CC) $(INCLUDE_DIRS) $(MESA_CFLAGS) $(CFLAGS) gen_matypes.c -o gen_matypes
 	./gen_matypes > matypes.h
 
 common_x86_asm.o: matypes.h
######## end optimization flags patch
EOT

/pkg/mesa3d/
/usr/include/GL
/usr/lib/libGL.*
/usr/lib/libGLU.*
/usr/lib/libGLw.*
/usr/lib/libOSMesa.*
/usr/lib/libglut.*
