DRC | 2c0ea90 | 2010-04-16 07:33:41 +0000 | [diff] [blame^] | 1 | ******************************************************************************* |
| 2 | ** Building TigerVNC |
| 3 | ******************************************************************************* |
| 4 | |
| 5 | |
| 6 | ================== |
| 7 | Build Requirements |
| 8 | ================== |
| 9 | |
| 10 | -- autoconf 2.57 or later |
| 11 | |
| 12 | -- automake 1.7 or later |
| 13 | |
| 14 | -- libtool 1.4 or later |
| 15 | |
| 16 | -- NASM |
| 17 | * 0.98 or later is required for a 32-bit build |
| 18 | * NASM 2.05 or later is required for a 64-bit build |
| 19 | * NASM 2.07 or later is required for a 64-bit build on OS/X (10.6 "Snow |
| 20 | Leopard" or later.) This can be obtained from MacPorts |
| 21 | (http://www.macports.org/). |
| 22 | |
| 23 | The NASM 2.05 RPMs do not work on older Linux systems, such as Enterprise |
| 24 | Linux 4. On such systems, you can easily build and install NASM 2.05 |
| 25 | from the source RPM by executing the following as root: |
| 26 | |
| 27 | ARCH=`uname -m` |
| 28 | wget http://www.nasm.us/pub/nasm/releasebuilds/2.05.01/nasm-2.05.01-1.src.rpm |
| 29 | rpmbuild --rebuild nasm-2.05.01-1.src.rpm |
| 30 | rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-2.05.01-1.$ARCH.rpm |
| 31 | |
| 32 | NOTE: NASM build will fail if texinfo is not installed. |
| 33 | |
| 34 | -- GCC v4.1 or later recommended for best performance |
| 35 | |
| 36 | -- X11 development kit |
| 37 | |
| 38 | -- If building Xvnc: |
| 39 | * Python v2.3 or later |
| 40 | * zlib v1.2 or later |
| 41 | * OpenSSL v0.9.7 or later |
| 42 | |
| 43 | |
| 44 | ================= |
| 45 | Building TigerVNC |
| 46 | ================= |
| 47 | |
| 48 | The following procedure will build the TigerVNC viewer on Linux and Unix |
| 49 | systems. On 64-bit systems, this may build a 32-bit version of TigerVNC, |
| 50 | depending on the default compiler configuration for your system. See below for |
| 51 | specific build instructions for 64-bit systems. |
| 52 | |
| 53 | cd tigervnc |
| 54 | autoreconf -fiv |
| 55 | sh ./configure [additional configure flags] |
| 56 | make |
| 57 | |
| 58 | NOTE: Running autoreconf is only necessary if building TigerVNC from the SVN |
| 59 | repository. |
| 60 | |
| 61 | Building the TigerVNC server (Xvnc) is a bit trickier. On newer systems, such |
| 62 | as Fedora, Xvnc is typically built to use the X11 shared libraries provided |
| 63 | with the system. This requires a system with Xorg 7.4 or later, however. |
| 64 | Systems with older versions of Xorg must build a "legacy-friendly" version of |
| 65 | the TigerVNC server. This is accomplished by downloading and building the |
| 66 | more recent Xorg modules in a local directory and then building Xvnc such that |
| 67 | it links against the local build of these libraries, not the X11 libraries |
| 68 | installed on the system. The "build-xorg" script in the TigerVNC source |
| 69 | distribution automates this process. |
| 70 | |
| 71 | The following procedure will build both the TigerVNC viewer and a |
| 72 | "legacy-friendly" version of the TigerVNC server: |
| 73 | |
| 74 | cd tigervnc |
| 75 | unix/build-xorg init -version 7.4 |
| 76 | unix/build-xorg build -version 7.4 [-static] [additional configure flags] |
| 77 | |
| 78 | Passing an argument of "-static" to the build command line will generate a |
| 79 | version of Xvnc that has no external dependencies on the X11 shared libraries |
| 80 | or any other distribution-specific shared libraries. This version of Xvnc |
| 81 | should be transportable across multiple O/S distributions. The legacy-friendly |
| 82 | build should work on RedHat Enterprise 4, its contemporaries, and later |
| 83 | systems. It probably will not work on older systems. It has not been tested |
| 84 | on non-Linux systems (yet). |
| 85 | |
| 86 | build-xorg can also be used to rebuild just the TigerVNC server and viewer, |
| 87 | once the X11 modules and other dependencies have been built the first time. |
| 88 | This is convenient for testing changes that just apply to the TigerVNC source |
| 89 | code. To accomplish this, run: |
| 90 | |
| 91 | unix/build-xorg rebuild [additional make flags] |
| 92 | |
| 93 | For instance, |
| 94 | |
| 95 | unix/build-xorg rebuild clean |
| 96 | |
| 97 | will clean both the Xvnc and vncviewer builds without destroying any of the |
| 98 | build configuration or module dependencies. |
| 99 | |
| 100 | |
| 101 | ================================== |
| 102 | Build Recipes for Specific Systems |
| 103 | ================================== |
| 104 | |
| 105 | |
| 106 | 32-bit Build on 64-bit Linux |
| 107 | ---------------------------- |
| 108 | |
| 109 | Add |
| 110 | |
| 111 | --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' |
| 112 | |
| 113 | to the configure and build command lines. |
| 114 | |
| 115 | |
| 116 | 64-bit Build on 64-bit OS/X |
| 117 | --------------------------- |
| 118 | |
| 119 | Add |
| 120 | |
| 121 | --host x86_64-apple-darwin10.0.0 NASM=/opt/local/bin/nasm |
| 122 | |
| 123 | to the configure command line. NASM 2.07 or later from MacPorts must be |
| 124 | installed. |
| 125 | |
| 126 | |
| 127 | 32-bit Build on 64-bit OS/X |
| 128 | --------------------------- |
| 129 | |
| 130 | Add |
| 131 | |
| 132 | CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32 |
| 133 | |
| 134 | to the configure command line. |
| 135 | |
| 136 | |
| 137 | 32-bit Backward-Compatible Build on 64-bit OS/X |
| 138 | ----------------------------------------------- |
| 139 | |
| 140 | Add |
| 141 | |
| 142 | CC=gcc-4.0 CXX=g++-4.0 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 143 | -mmacosx-version-min=10.4 -O3 -m32' \ |
| 144 | CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 145 | -mmacosx-version-min=10.4 -O3 -m32' \ |
| 146 | LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \ |
| 147 | -mmacosx-version-min=10.4 -m32' |
| 148 | |
| 149 | to the configure command line. The OS X 10.4 SDK must be installed. |
| 150 | |
| 151 | |
| 152 | ******************************************************************************* |
| 153 | ** Creating Release Packages |
| 154 | ******************************************************************************* |
| 155 | |
| 156 | The following commands can be used to create various types of release packages: |
| 157 | |
| 158 | make dmg |
| 159 | |
| 160 | Create Macintosh package/disk image. This requires the PackageMaker |
| 161 | application, which must be installed in /Developer/Applications/Utilities. |
| 162 | |
| 163 | make udmg |
| 164 | |
| 165 | On 64-bit OS X (10.6 "Snow Leopard" or later), this creates a version of the |
| 166 | Macintosh package/disk image which contains universal i386/x86-64 binaries. |
| 167 | The 32-bit fork of these binaries is backward compatible with OS X 10.4 and |
| 168 | later, whereas the 64-bit fork is compatible with OS X 10.6 and later. OS X |
| 169 | 10.4 compatibility SDK required. |