summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-06-22 01:53:08 +0000
committerDRC <dcommander@users.sourceforge.net>2011-06-22 01:53:08 +0000
commiteae60994429d686576d87aff7a1ec155bddbd7db (patch)
treefad22473070282da4cecb11a3760a763b791987b
parentceb45207e9cf906c54a2eab6fd802ee9c02d7f86 (diff)
downloadtigervnc-eae60994429d686576d87aff7a1ec155bddbd7db.tar.gz
tigervnc-eae60994429d686576d87aff7a1ec155bddbd7db.zip
Integrate Xvnc build with CMake and new FLTK-based vncviewer build
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4515 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rwxr-xr-xunix/build-xorg33
1 files changed, 19 insertions, 14 deletions
diff --git a/unix/build-xorg b/unix/build-xorg
index 374a0894..ffa04e27 100755
--- a/unix/build-xorg
+++ b/unix/build-xorg
@@ -9,6 +9,8 @@ set -e
PREFIX=
MAKE="make"
XORG_VERSION=7.4
+XONLY=0
+CFGHOST=
SRCDIR=`dirname $0`/..
modules="dri2proto \
@@ -63,7 +65,7 @@ init()
tar jxf ~/.tigervnc-xorg-$XORG_VERSION/util-macros.tar.bz2
pushd util-macros-*
echo "Building macros"
- ./configure ${1+"$@"} --prefix=${PREFIX}
+ ./configure --prefix=${PREFIX}
($MAKE install)
popd
@@ -81,12 +83,6 @@ init()
popd
popd
-
- pushd $SRCDIR
- if [ ! -f ./configure ]; then
- autoreconf -fiv
- fi
- popd
}
@@ -116,9 +112,11 @@ update_modules()
build ()
{
+ if [ $XONLY -eq 0 ]; then
+
# Build VNC
echo "*** Building VNC ***"
- $SRCDIR/configure ${1+"$@"} --prefix=${PREFIX} --with-included-zlib
+ cmake -G"Unix Makefiles" ${1+"$@"} -DUSE_INCLUDED_ZLIB=1 $SRCDIR
$MAKE
# Build Xorg
@@ -144,7 +142,7 @@ build ()
CFLAGS=${CFLAGS}' -fPIC'
CXXFLAGS=${CXXFLAGS}' -fPIC'
export CFLAGS CXXFLAGS
- ./configure ${1+"$@"} --prefix="${PREFIX}" ${extraoptions} --enable-static --disable-shared
+ ./configure ${CFGHOST} --prefix="${PREFIX}" ${extraoptions} --enable-static --disable-shared
CFLAGS=${OLD_CFLAGS}
CXXFLAGS=${OLD_CXXFLAGS}
export CFLAGS CXXFLAGS
@@ -162,7 +160,7 @@ build ()
# build mesa
echo "*** Building Mesa ***"
pushd Mesa-*
- ./configure ${1+"$@"} --prefix=${PREFIX} --disable-driglx-direct --with-dri-drivers=swrast --with-driver=dri --disable-glut --without-demos
+ ./configure ${CFGHOST} --prefix=${PREFIX} --disable-driglx-direct --with-dri-drivers=swrast --with-driver=dri --disable-glut --without-demos
if [ $? -ne 0 ]; then
echo "Failed to configure Mesa."
exit
@@ -174,7 +172,7 @@ build ()
# build freetype
echo "*** Building freetype ***"
pushd freetype-*
- ./configure ${1+"$@"} --prefix=${PREFIX} --enable-static --disable-shared
+ ./configure ${CFGHOST} --prefix=${PREFIX} --enable-static --disable-shared
if [ $? -ne 0 ]; then
echo "Failed to configure freetype."
exit
@@ -184,12 +182,14 @@ build ()
popd
+ fi # XONLY
+
# build xserver
echo "*** Building xserver ***"
pushd xorg/xserver
autoreconf -fiv
XORGCFGFLAGS="--disable-xinerama --disable-xvfb --disable-xnest --disable-xorg --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive --disable-config-dbus --disable-config-hal --disable-config-udev --with-sha1=libgcrypt SHA1_LIB=-lcrypto --disable-shared --enable-static ${XORGCFGFLAGS}"
- ./configure ${1+"$@"} --prefix=${PREFIX} ${XORGCFGFLAGS}
+ ./configure ${CFGHOST} --prefix=${PREFIX} ${XORGCFGFLAGS}
if [ $? -ne 0 ]; then
echo "Failed to configure X server."
exit
@@ -217,7 +217,7 @@ usage ()
echo "Usage: $0 init [-version <7.4 | 7.5>]"
echo
echo " $0 build [-version <7.4 | 7.5>]"
- echo " [additional configure flags]"
+ echo " [additional CMake flags]"
echo
echo " $0 rebuild [additional make options]"
echo
@@ -236,6 +236,7 @@ do
case "$1" in
init) MODE=init ;;
build) MODE=build ;;
+ xbuild) MODE=build; XONLY=1 ;;
rebuild) MODE=rebuild ;;
update) MODE=update ;;
-version) XORG_VERSION=$2; shift ;;
@@ -298,6 +299,9 @@ if [ "$MODE" = "build" ]; then
echo CFLAGS = $CFLAGS
echo CXXFLAGS = $CXXFLAGS
echo LDFLAGS = $LDFLAGS
+ if [[ $CFLAGS = *-m32* ]]; then
+ CFGHOST="--host i686-pc-linux-gnu"
+ fi
if [ -f ./xorg.build/syslib/libstdc++.a ]; then
rm -f ./xorg.build/syslib/libstdc++.a
fi
@@ -352,7 +356,8 @@ export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig:${PREFIX}/share/pkgconfig"
case "$MODE" in
init) init ;;
build)
- build ${1+"$@"} CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS";
+ export CFLAGS CXXFLAGS LDFLAGS
+ build ${1+"$@"};
;;
rebuild) rebuild ${1+"$@"} ;;
update) update ;;