DRC | adadd9d | 2010-01-08 11:17:36 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # This script wraps build-xorg-7.4 to enable building a version of TigerVNC |
| 3 | # which is compatible across Linux distributions. |
| 4 | |
| 5 | set -e |
| 6 | |
| 7 | if [ "$1" = "" ]; then |
| 8 | echo USAGE: $0 init \| build \| update |
| 9 | exit 0 |
| 10 | fi |
| 11 | |
| 12 | SCRIPTDIR=`dirname $0` |
| 13 | pushd $SCRIPTDIR/../unix |
| 14 | if [ ! -d ./xorg.build/lib ]; then |
| 15 | mkdir -p ./xorg.build/lib |
| 16 | fi |
| 17 | CFLAGS='-O3 -static-libgcc' |
| 18 | CXXFLAGS=$CFLAGS |
| 19 | LDFLAGS=$CFLAGS' -L'`pwd`'/xorg.build/lib' |
| 20 | export CFLAGS |
| 21 | export CXXFLAGS |
| 22 | export LDFLAGS |
| 23 | if [ -f ./xorg.build/lib/libstdc++.a ]; then |
| 24 | rm -f ./xorg.build/lib/libstdc++.a |
| 25 | fi |
| 26 | ln -fs `gcc $CFLAGS -print-file-name=libstdc++.a` ./xorg.build/lib |
| 27 | if [ -f ./xorg.build/lib/libcrypto.a ]; then |
| 28 | rm -f ./xorg.build/lib/libcrypto.a |
| 29 | fi |
| 30 | if [ "`uname -m`" = "x86_64" ]; then |
| 31 | ln -fs /usr/lib64/libcrypto.a ./xorg.build/lib |
| 32 | else |
| 33 | ln -fs /usr/lib/libcrypto.a ./xorg.build/lib |
| 34 | fi |
| 35 | . build-xorg-7.4 $1 -static |
| 36 | popd |