From: DRC Date: Mon, 11 Jan 2010 01:31:21 +0000 (+0000) Subject: Build Mesa as a shared lib so we can get swrast_dri.so, but this requires building... X-Git-Tag: v1.0.90~356 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c48abf15c701e8fce2b02f6a1b3686da80c21956;p=tigervnc.git Build Mesa as a shared lib so we can get swrast_dri.so, but this requires building Xorg modules with -fPIC so they can be linked successfully into Mesa shared lib. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3940 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/unix/build-xorg-7.4 b/unix/build-xorg-7.4 index 21706049..da33d5d0 100755 --- a/unix/build-xorg-7.4 +++ b/unix/build-xorg-7.4 @@ -129,8 +129,18 @@ build () fi if [ $STATIC = 1 ]; then extraoptions="${extraoptions} --enable-static --disable-shared" + OLD_CFLAGS=${CFLAGS} + OLD_CXXFLAGS=${CXXFLAGS} + CFLAGS=${CFLAGS}' -fPIC' + CXXFLAGS=${CXXFLAGS}' -fPIC' + export CFLAGS CXXFLAGS fi ./configure ${1+"$@"} --prefix="${PREFIX}" ${extraoptions} + if [ $STATIC = 1 ]; then + CFLAGS=${OLD_CFLAGS} + CXXFLAGS=${OLD_CXXFLAGS} + export CFLAGS CXXFLAGS + fi echo ====================== echo building ${module} echo ====================== @@ -146,19 +156,13 @@ build () # build mesa echo "*** Building Mesa ***" pushd Mesa-* - MESACFGFLAGS='--with-driver=xlib --disable-glut --without-demos' - if [ $STATIC = 1 ]; then - MESACFGFLAGS=${MESACFGFLAGS}' --enable-static --disable-shared' - fi - ./configure ${1+"$@"} --prefix=${PREFIX} ${MESACFGFLAGS} + ./configure ${1+"$@"} --prefix=${PREFIX} --with-driver=dri --disable-glut --without-demos if [ $? -ne 0 ]; then echo "Failed to configure Mesa." exit fi ($MAKE) make install - cd src/mesa/drivers/dri/ - make install popd # build freetype