]> source.dussan.org Git - tigervnc.git/commitdiff
Build Mesa as a shared lib so we can get swrast_dri.so, but this requires building...
authorDRC <dcommander@users.sourceforge.net>
Mon, 11 Jan 2010 01:31:21 +0000 (01:31 +0000)
committerDRC <dcommander@users.sourceforge.net>
Mon, 11 Jan 2010 01:31:21 +0000 (01:31 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3940 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/build-xorg-7.4

index 21706049ad4bdccfde20c952ecfd1cea9482df36..da33d5d07110d715ac265365d4c43837ff09033e 100755 (executable)
@@ -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