Mangled Mesa
VisIt must mangle Mesa to ensure its symbols do not end up conflicting with the system's OpenGL library. For Mesa-7.5, the script below compiles a sw-only offscreen Mesa with mangled symbols. This build strategy/mechanism/script is now integrated into trunk versions of build_visit, as of r7999.
#!/bin/sh
PF=${HOME}/sw/mesa-git
if test "x$@" != "x" ; then
PF="$@"
fi
echo "Configuring mesa with prefix: ${PF}"
sleep 3
rm -r ${PF}/lib
autoreconf -vi
./configure \
CFLAGS="-g -DUSE_MGL_NAMESPACE" \
CXXFLAGS="-g -DUSE_MGL_NAMESPACE" \
--prefix=${PF} \
--without-demos \
--with-driver=osmesa \
--disable-gallium \
--disable-egl || exit 1
make clean
if test `uname` = "Darwin" ; then
sed -i bak "s,GL_LIB = GL,GL_LIB=MesaGL,g" configs/autoconf \
|| exit 1
sed -i bak "s,GLU_LIB = GLU,GLU_LIB=MesaGLU,g" configs/autoconf \
|| exit 1
else
sed -i "s,GL_LIB = GL,GL_LIB=MesaGL,g" configs/autoconf \
|| exit 1
sed -i "s,GLU_LIB = GLU,GLU_LIB=MesaGLU,g" configs/autoconf \
|| exit 1
fi
make || exit 1
make install
rm -f ${PF}/include/GL/gl*ew.h