#!/bin/sh # This script wraps build-xorg-7.4 to enable building a version of TigerVNC # which is compatible across Linux distributions. It is identical to # build-compat-linux, except that it adds the necessary arguments to cross- # compile a 32-bit version of TigerVNC on a 64-bit system. set -e if [ "$1" = "" ]; then echo USAGE: $0 init \| build \| update exit 0 fi SCRIPTDIR=`dirname $0` pushd $SCRIPTDIR/../unix if [ ! -d ./xorg.build/syslib ]; then mkdir -p ./xorg.build/syslib fi CFLAGS='-m32 -O3 -static-libgcc' CXXFLAGS=$CFLAGS LDFLAGS=$CFLAGS' -L'`pwd`'/xorg.build/syslib' export CFLAGS export CXXFLAGS export LDFLAGS if [ -f ./xorg.build/syslib/libstdc++.a ]; then rm -f ./xorg.build/syslib/libstdc++.a fi ln -fs `gcc $CFLAGS -print-file-name=libstdc++.a` ./xorg.build/syslib if [ -f ./xorg.build/syslib/libcrypto.a ]; then rm -f ./xorg.build/syslib/libcrypto.a fi if [ -f ./xorg.build/syslib/libz.a ]; then rm -f ./xorg.build/syslib/libz.a fi ln -fs /usr/lib/libcrypto.a ./xorg.build/syslib ln -fs /usr/lib/libz.a ./xorg.build/syslib . build-xorg-7.4 $1 -static --host i686-pc-linux-gnu popd