diff --git a/.gitignore b/.gitignore
index 033e6e10bde..c128ba86092 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.o
*.so
*.sw[a-z]
+*.pc
*~
depend
depend.bak
diff --git a/Makefile b/Makefile
index 9a6557571c5..ef607f4944c 100644
--- a/Makefile
+++ b/Makefile
@@ -66,6 +66,8 @@ aix-64 \
aix-64-static \
aix-gcc \
aix-static \
+bluegene-osmesa \
+bluegene-xlc-osmesa \
beos \
darwin \
darwin-static \
@@ -151,8 +153,9 @@ sunos5-v8 \
sunos5-v8-static \
sunos5-v9 \
sunos5-v9-static \
+sunos5-v9-cc-g++ \
ultrix-gcc:
- @ if [ -e configs/current ] ; then \
+ @ if test -f configs/current || test -L configs/current ; then \
echo "Please run 'make realclean' before changing configs" ; \
exit 1 ; \
fi
@@ -209,6 +212,7 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/Makefile* \
$(DIRECTORY)/src/mesa/sources \
$(DIRECTORY)/src/mesa/descrip.mms \
+ $(DIRECTORY)/src/mesa/gl.pc.in \
$(DIRECTORY)/src/mesa/depend \
$(DIRECTORY)/src/mesa/main/*.[chS] \
$(DIRECTORY)/src/mesa/main/descrip.mms \
@@ -316,6 +320,7 @@ DRI_FILES = \
SGI_GLU_FILES = \
$(DIRECTORY)/src/glu/Makefile \
$(DIRECTORY)/src/glu/descrip.mms \
+ $(DIRECTORY)/src/glu/glu.pc.in \
$(DIRECTORY)/src/glu/sgi/Makefile \
$(DIRECTORY)/src/glu/sgi/Makefile.mgw \
$(DIRECTORY)/src/glu/sgi/Makefile.win \
@@ -392,6 +397,7 @@ GLUT_FILES = \
$(DIRECTORY)/include/GL/glutf90.h \
$(DIRECTORY)/src/glut/glx/Makefile* \
$(DIRECTORY)/src/glut/glx/depend \
+ $(DIRECTORY)/src/glut/glx/glut.pc.in \
$(DIRECTORY)/src/glut/glx/*def \
$(DIRECTORY)/src/glut/glx/descrip.mms \
$(DIRECTORY)/src/glut/glx/mms_depend \
@@ -414,6 +420,7 @@ DEPEND_FILES = \
$(TOP)/src/mesa/depend \
$(TOP)/src/glx/x11/depend \
$(TOP)/src/glw/depend \
+ $(TOP)/src/glw/glw.pc.in \
$(TOP)/src/glut/glx/depend \
$(TOP)/src/glu/sgi/depend
diff --git a/bin/mklib b/bin/mklib
index 8ee8d8ce49d..2bfd1b9e049 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -34,6 +34,7 @@ MINOR=0
PATCH=""
DEPS=""
LINK=""
+LDFLAGS=""
CPLUSPLUS=0
STATIC=0
DLOPEN=0
@@ -63,6 +64,7 @@ do
echo ' -LDIR search in DIR for library dependencies'
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
echo ' Not observed on all systems at this time.'
+ echo ' -ldflags OPT specify any additional linker flags in OPT'
echo ' -cplusplus link with C++ runtime'
echo ' -static make a static library (default is dynamic/shared)'
echo ' -dlopen make a shared library suitable for dynamic loading'
@@ -94,6 +96,10 @@ do
shift 1;
LINK=$1
;;
+ '-ldflags')
+ shift 1;
+ LDFLAGS=$1
+ ;;
-l*)
DEPS="$DEPS $1"
;;
@@ -215,7 +221,7 @@ case $ARCH in
rm -f ${LIBNAME}
# make lib
- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
# finish up
FINAL_LIBS="${LIBNAME}"
elif [ $STATIC = 1 ] ; then
@@ -273,7 +279,7 @@ case $ARCH in
rm -f ${LIBNAME}.so
# make lib
- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
@@ -345,10 +351,10 @@ case $ARCH in
#echo "mklib: linker is" ${LINK} ${OPTS}
if [ $NOPREFIX = 1 ] ; then
rm -f ${LIBNAME}
- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
- ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
fi
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
@@ -372,7 +378,7 @@ case $ARCH in
echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
OPTS="-shared"
rm -f ${LIBNAME}
- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
elif [ $STATIC = 1 ] ; then
STLIB="lib${LIBNAME}.a"
@@ -386,7 +392,7 @@ case $ARCH in
OPTS="-shared -Wl,-soname,${SHLIB}"
echo "mklib: Making FreeBSD shared library: " ${SHLIB}
rm -f ${SHLIB}
- ${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
ln -sf ${SHLIB} "lib${LIBNAME}.so"
FINAL_LIBS="${SHLIB} lib${LIBNAME}.so"
fi
@@ -444,7 +450,7 @@ case $ARCH in
fi
echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
fi
;;
@@ -520,9 +526,9 @@ case $ARCH in
# On AIX a shared library is linked differently when
# you want to dlopen the file
if [ $DLOPEN = "1" ] ; then
- cc -G ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ cc -G ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
- cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
+ cc ${OPTS} ${LDFLAGS} -o ${OFILE} ${OBJECTS} ${DEPS}
ar ${X64} -r ${LIBNAME} ${OFILE}
fi
@@ -604,7 +610,7 @@ case $ARCH in
fi
echo "mklib: Making Darwin shared library: " ${LIBNAME}
- ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME} ${LINKNAME}
FINAL_LIBS="${LIBNAME} ${LINKNAME}"
fi
@@ -681,7 +687,7 @@ case $ARCH in
rm -f ${LIBNAME}.so.${MAJOR}
rm -f ${LIBNAME}.so
# make lib
- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
@@ -753,7 +759,7 @@ case $ARCH in
rm -f ${LIBNAME}.a
# make lib
- ${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
# finish up
diff --git a/configs/bluegene-osmesa b/configs/bluegene-osmesa
new file mode 100644
index 00000000000..02c69e6c67e
--- /dev/null
+++ b/configs/bluegene-osmesa
@@ -0,0 +1,29 @@
+# Configuration for building only libOSMesa on BlueGene, no Xlib driver
+# This doesn't really have a lot of dependencies, so it should be usable
+# on other (gcc-based) systems too.
+# It uses static linking and disables multithreading.
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = bluegene-osmesa
+
+# Compiler and flags
+CC = /bgl/BlueLight/ppcfloor/blrts-gnu/bin/powerpc-bgl-blrts-gnu-gcc
+CXX = /bgl/BlueLight/ppcfloor/blrts-gnu/bin/powerpc-bgl-blrts-gnu-g++
+CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURC
+
+MKLIB_OPTIONS = -static
+
+OSMESA_LIB_NAME = libOSMesa.a
+
+# Directories
+SRC_DIRS = mesa glu
+DRIVER_DIRS = osmesa
+PROGRAM_DIRS = osdemos
+
+
+# Dependencies
+OSMESA_LIB_DEPS = -lm
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
+APP_LIB_DEPS = -lOSMesa -lGLU -lm
diff --git a/configs/bluegene-xlc-osmesa b/configs/bluegene-xlc-osmesa
new file mode 100644
index 00000000000..b0c762de91c
--- /dev/null
+++ b/configs/bluegene-xlc-osmesa
@@ -0,0 +1,29 @@
+# Configuration for building only libOSMesa on BlueGene using the IBM xlc compiler
+# This doesn't really have a lot of dependencies, so it should be usable
+# on similar systems too.
+# It uses static linking and disables multithreading.
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = bluegene-osmesa
+
+# Compiler and flags
+CC = /opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlc
+CXX = /opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlC
+CFLAGS = -O3 -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+CXXFLAGS = -O3 -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+
+MKLIB_OPTIONS = -static
+
+OSMESA_LIB_NAME = libOSMesa.a
+
+# Directories
+SRC_DIRS = mesa glu
+DRIVER_DIRS = osmesa
+PROGRAM_DIRS = osdemos
+
+
+# Dependencies
+OSMESA_LIB_DEPS = -lm
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
+APP_LIB_DEPS = -lOSMesa -lGLU -lm
diff --git a/configs/default b/configs/default
index a7de3f813d6..620445f6846 100644
--- a/configs/default
+++ b/configs/default
@@ -20,6 +20,7 @@ CC = cc
CXX = CC
CFLAGS = -O
CXXFLAGS = -O
+LDFLAGS =
GLU_CFLAGS =
# Misc tools and flags
diff --git a/configs/freebsd b/configs/freebsd
index db7dd3b78a0..34440eb3239 100644
--- a/configs/freebsd
+++ b/configs/freebsd
@@ -13,9 +13,9 @@ OPT_FLAGS = -O2
PIC_FLAGS = -fPIC
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
- -DHZ=100 -DHAVE_POSIX_MEMALIGN
+ -DHZ=100
-X11_INCLUDES = -I/usr/X11R6/include
+X11_INCLUDES = -I/usr/local/include
CFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) -ffast-math -pedantic
@@ -23,5 +23,5 @@ CXXFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES)
GLUT_CFLAGS = -fexceptions
-EXTRA_LIB_PATH = -L/usr/X11R6/lib
+EXTRA_LIB_PATH = -L/usr/local/lib
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index 402883d1de0..9750017c231 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -9,13 +9,13 @@ CONFIG_NAME = freebsd-dri
CC = gcc
CXX = g++
WARN_FLAGS = -Wall
-OPT_FLAGS = -O
+OPT_FLAGS = -O -g
EXPAT_INCLUDES = -I/usr/local/include
X11_INCLUDES = -I/usr/X11R6/include
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
- -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
+ -DHAVE_ALIAS
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -Wundef -ffast-math \
$(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
diff --git a/configs/linux-dri b/configs/linux-dri
index 5f945a73f1a..afa2d8ca346 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -66,5 +66,5 @@ WINDOW_SYSTEM=dri
# gamma are missing because they have not been converted to use the new
# interface.
-DRI_DIRS = i810 i915tex i915 i965 mach64 mga r128 r200 r300 radeon s3v \
+DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
savage sis tdfx trident unichrome ffb
diff --git a/configs/sunos5-v9-cc-g++ b/configs/sunos5-v9-cc-g++
new file mode 100644
index 00000000000..37b775cc08e
--- /dev/null
+++ b/configs/sunos5-v9-cc-g++
@@ -0,0 +1,32 @@
+# Configuration for SunOS 5, SPARC V9 and cc/g++ (for C and C++ sources)
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = sunos5-v9-cc-g++
+
+MKLIB_OPTIONS = -cplusplus
+
+LIB_DIR = lib64
+
+# Compiler and flags
+CC = cc
+CXX = g++
+
+CXX_WARN_FLAGS = -Wall
+CXX_PIC_FLAGS = -fPIC
+CXX_OPT_FLAGS = -O3 -m64 -mcpu=ultrasparc -mv8plus -mvis -g -fomit-frame-pointer -pipe
+CXX_ARCH_FLAGS = -m64
+
+
+CXXFLAGS = $(CXX_WARN_FLAGS) $(CXX_OPT_FLAGS) $(CXX_PIC_FLAGS) $(CXX_ARCH_FLAGS) $(DEFINES) \
+ -I/usr/openwin/include
+
+CFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DPTHREADS
+#CXXFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS
+GLUT_CFLAGS = -DSOLARIS_2_4_BUG
+
+GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm -lpthread
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCstd -lCrun
+GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
+GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
diff --git a/docs/README.MINGW32 b/docs/README.MINGW32
index 138dd43eacc..9477b2bd318 100644
--- a/docs/README.MINGW32
+++ b/docs/README.MINGW32
@@ -91,9 +91,11 @@ Running the Build:
-*******************This section is added by Heromyth*****************************
-Updated on 2007-7-21, by Heromyth
-The Mesa bug database is now hosted on
-freedesktop.org
-instead of SourceForge.
+The Mesa bug database is hosted on
+freedesktop.org.
+The old bug database on SourceForge is no longer used.
@@ -26,16 +26,20 @@ Please follow these bug reporting guidelines:
-Bug reports will automatically be forwarded to the Mesa developer's mailing
-list.
+Bug reports will automatically be forwarded by bugzilla to the Mesa
+developer's mailing list.
diff --git a/docs/fbdev-dri.html b/docs/fbdev-dri.html
index c7f59bb0c2f..0d9e52cee47 100644
--- a/docs/fbdev-dri.html
+++ b/docs/fbdev-dri.html
@@ -28,6 +28,12 @@ Xlib interfaces allowing some degree of application portability between
the X and X-less environments.
+Some of the files needed for building this configuration are not included
+in the normal Mesa releases so you'll need to get the latest sources
+sources from the git repository.
+
-DRM kernel modules and header files from the
-DRI project.
-
-If you don't already have the DRM file, you can get the sources from
-CVS by doing:
-
-See the
-DRI Building Instructions for the steps to build the DRM modules. Mesa
-6.5 requires at least libdrm 2.0.1 or greater.
+For Mesa 7.0.2
+DRM version 2.3 is required.
-You can verify that the DRM files have been properly installed by
-running
+You can download and install a
+tarball release or get the code from git with:
+ You'll need this if you get any errors about _GLXvop_BindTexImageEXT
-being undefined.
-
-Download/install the
-glproto
-module from X.org git, or grab the
-glxproto.h file and put it in the
-Mesa/include/GL/ directory.
- Visit
-XFree86
-or
+Relatively recent
-X.org
-for more information.
-Bug Database
-
2. Compilation
diff --git a/docs/install.html b/docs/install.html
index 804dee59b5a..4cd0d4c9dcc 100644
--- a/docs/install.html
+++ b/docs/install.html
@@ -57,50 +57,31 @@ the DRI hardware drivers.
-cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri co drm
-
-pkg-config --modversion libdrm
-
+To check if you already have it, run:
+
+pkg-config --modversion libdrm
+
+git clone git://anongit.freedesktop.org/git/mesa/drm
+
+Then revert to the drm-2.3.0 tag with:
+
+git-reset --hard drm-2.3.0
+make install.
But first, check the Mesa/configs/default file and examine the values
of the INSTALL_DIR and DRI_DRIVER_INSTALL_DIR variables.
-Change them if needed, then run make install
+Change them if needed, then run make install.
+
+The variable
+DESTDIR may also be used to install the contents to a temporary
+staging directory.
+This can be useful for package management.
+For example: make install DESTDIR=/somepath/
@@ -298,6 +287,26 @@ This is a handy way to compare multiple OpenGL implementations.
+
+Running make install will install package configuration files
+for the pkg-config utility.
+
+When compiling your OpenGL application you can use pkg-config to determine +the proper compiler and linker flags. +
+ ++For example, compiling and linking a GLUT application can be done with: +
++ gcc `pkg-config --cflags --libs glut` mydemo.c -o mydemo ++ +
-Component Location Primary Author License
-----------------------------------------------------------------------------
-Main Mesa code src/mesa/ Brian Paul Mesa (MIT)
+Component Location License
+------------------------------------------------------------------
+Main Mesa code src/mesa/ Mesa (MIT)
-Device drivers src/mesa/drivers/* See drivers See drivers
+Device drivers src/mesa/drivers/* MIT, generally
-Ext headers include/GL/glext.h SGI SGI Free B
+Ext headers include/GL/glext.h Khronos
include/GL/glxext.h
-GLUT src/glut/ Mark Kilgard Mark's copyright
+GLUT src/glut/ Mark Kilgard's copyright
-Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL
+SGI GLU library src/glu/sgi/ SGI Free B
-SGI GLU library src/glu/sgi/ SGI SGI Free B
+demo programs progs/demos/ see source files
-demo programs progs/demos/ various see source files
+X demos progs/xdemos/ see source files
-X demos progs/xdemos/ Brian Paul see source files
+SGI demos progs/samples/ SGI license
-SGI demos progs/samples/ SGI SGI copyright
-
-RedBook demos progs/redbook/ SGI SGI copyright
+RedBook demos progs/redbook/ SGI license
++In general, consult the source files for license terms. +
+ +