summaryrefslogtreecommitdiffstats
path: root/unix/build-xorg
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2010-04-13 05:27:13 +0000
committerDRC <dcommander@users.sourceforge.net>2010-04-13 05:27:13 +0000
commit6b0cdcd591b016f1f3a9a6bcc84071c1faec8696 (patch)
treea3c52174626a68650f72c65200337f0ca5057cb3 /unix/build-xorg
parentc9a103cf06517944a745c003c648ef6dd2dce024 (diff)
downloadtigervnc-6b0cdcd591b016f1f3a9a6bcc84071c1faec8696.tar.gz
tigervnc-6b0cdcd591b016f1f3a9a6bcc84071c1faec8696.zip
Automatically determine appropriate source path + better support for in-tree builds
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4019 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/build-xorg')
-rwxr-xr-xunix/build-xorg27
1 files changed, 15 insertions, 12 deletions
diff --git a/unix/build-xorg b/unix/build-xorg
index a1584765..166fad75 100755
--- a/unix/build-xorg
+++ b/unix/build-xorg
@@ -6,15 +6,11 @@
set -e
-if [ "$PREFIX" = "" ]; then
- PREFIX=`pwd`/xorg.build
-fi
-export ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
-export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
+PREFIX=
MAKE="make"
STATIC=0
XORG_VERSION=
-SRCDIR=..
+SRCDIR=`dirname $0`/..
modules="dri2proto \
libpthread-stubs \
@@ -210,22 +206,17 @@ rebuild ()
usage ()
{
echo "Usage: $0 init -version <7.4 | 7.5>"
- echo " [-srcdir <source dir>]"
echo
echo " $0 build -version <7.4 | 7.5>"
- echo " [-srcdir <source dir>] [-static] [additional configure flags]"
+ echo " [-static] [additional configure flags]"
echo
echo " $0 rebuild -version <7.4 | 7.5> "
echo " [additional make options]"
echo
echo " $0 update -version <7.4 | 7.5>"
- echo " [-srcdir <source dir>]"
echo
echo "-static = build a stand-alone version of Xvnc which does not depend on"
echo " the shared X11 libraries"
- echo
- echo "-srcdir = specify the top directory of the TigerVNC source tree"
- echo " (default = ..)"
exit 1
}
@@ -252,8 +243,20 @@ fi
pushd $SRCDIR
SRCDIR=`pwd`
+echo "*** Using TigerVNC source tree at $SRCDIR ***"
popd
+if [ "`pwd`" = "$SRCDIR/unix" ]; then
+ cd $SRCDIR
+fi
+
+if [ "$PREFIX" = "" ]; then
+ PREFIX=`pwd`/xorg.build
+fi
+
+export ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
+export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
+
case "$MODE" in
init) init ;;
build) build ${1+"$@"} ;;