blob: 4dc844125dc8fe973af4dc2c83a0f9c7893d8a02 [file] [log] [blame]
DRC2c0ea902010-04-16 07:33:41 +00001*******************************************************************************
2** Building TigerVNC
3*******************************************************************************
4
5
6==================
7Build 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
DRCef5e17f2010-09-30 18:53:42 +000019 * NASM 2.07 or later is required for a 64-bit build on OS X. This can be
DRC896a96c2010-07-08 07:12:09 +000020 obtained from MacPorts (http://www.macports.org/).
DRC2c0ea902010-04-16 07:33:41 +000021
22 The NASM 2.05 RPMs do not work on older Linux systems, such as Enterprise
23 Linux 4. On such systems, you can easily build and install NASM 2.05
24 from the source RPM by executing the following as root:
25
26 ARCH=`uname -m`
27 wget http://www.nasm.us/pub/nasm/releasebuilds/2.05.01/nasm-2.05.01-1.src.rpm
28 rpmbuild --rebuild nasm-2.05.01-1.src.rpm
29 rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-2.05.01-1.$ARCH.rpm
30
31 NOTE: NASM build will fail if texinfo is not installed.
32
33-- GCC v4.1 or later recommended for best performance
34
35-- X11 development kit
36
37-- If building Xvnc:
38 * Python v2.3 or later
39 * zlib v1.2 or later
40 * OpenSSL v0.9.7 or later
41
42
43=================
44Building TigerVNC
45=================
46
47The following procedure will build the TigerVNC viewer on Linux and Unix
48systems. On 64-bit systems, this may build a 32-bit version of TigerVNC,
49depending on the default compiler configuration for your system. See below for
50specific build instructions for 64-bit systems.
51
52 cd tigervnc
53 autoreconf -fiv
54 sh ./configure [additional configure flags]
55 make
56
57NOTE: Running autoreconf is only necessary if building TigerVNC from the SVN
58repository.
59
60Building the TigerVNC server (Xvnc) is a bit trickier. On newer systems, such
61as Fedora, Xvnc is typically built to use the X11 shared libraries provided
62with the system. This requires a system with Xorg 7.4 or later, however.
63Systems with older versions of Xorg must build a "legacy-friendly" version of
64the TigerVNC server. This is accomplished by downloading and building the
65more recent Xorg modules in a local directory and then building Xvnc such that
66it links against the local build of these libraries, not the X11 libraries
67installed on the system. The "build-xorg" script in the TigerVNC source
68distribution automates this process.
69
70The following procedure will build both the TigerVNC viewer and a
71"legacy-friendly" version of the TigerVNC server:
72
73 cd tigervnc
74 unix/build-xorg init -version 7.4
75 unix/build-xorg build -version 7.4 [-static] [additional configure flags]
76
77Passing an argument of "-static" to the build command line will generate a
78version of Xvnc that has no external dependencies on the X11 shared libraries
79or any other distribution-specific shared libraries. This version of Xvnc
80should be transportable across multiple O/S distributions. The legacy-friendly
81build should work on RedHat Enterprise 4, its contemporaries, and later
82systems. It probably will not work on older systems. It has not been tested
83on non-Linux systems (yet).
84
85build-xorg can also be used to rebuild just the TigerVNC server and viewer,
86once the X11 modules and other dependencies have been built the first time.
87This is convenient for testing changes that just apply to the TigerVNC source
88code. To accomplish this, run:
89
90 unix/build-xorg rebuild [additional make flags]
91
92For instance,
93
94 unix/build-xorg rebuild clean
95
96will clean both the Xvnc and vncviewer builds without destroying any of the
97build configuration or module dependencies.
98
99
100==================================
101Build Recipes for Specific Systems
102==================================
103
104
10532-bit Build on 64-bit Linux
106----------------------------
107
108Add
109
DRC896a96c2010-07-08 07:12:09 +0000110 --host i686-pc-linux-gnu CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
DRC2c0ea902010-04-16 07:33:41 +0000111
112to the configure and build command lines.
113
114
DRCef5e17f2010-09-30 18:53:42 +000011564-bit Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000116---------------------------
117
118Add
119
DRC896a96c2010-07-08 07:12:09 +0000120 --host x86_64-apple-darwin NASM=/opt/local/bin/nasm
DRC2c0ea902010-04-16 07:33:41 +0000121
122to the configure command line. NASM 2.07 or later from MacPorts must be
123installed.
124
125
DRCef5e17f2010-09-30 18:53:42 +000012632-bit Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000127---------------------------
128
129Add
130
131 CFLAGS='-O3 -m32' CXXFLAGS='-O3 -m32' LDFLAGS=-m32
132
133to the configure command line.
134
135
DRCef5e17f2010-09-30 18:53:42 +000013664-bit Backward-Compatible Build on 64-bit OS X
DRC896a96c2010-07-08 07:12:09 +0000137-----------------------------------------------
138
139Add
140
141 --host x86_64-apple-darwin NASM=/opt/local/bin/nasm \
142 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
143 -mmacosx-version-min=10.5 -O3' \
144 CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
145 -mmacosx-version-min=10.5 -O3' \
146 LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk \
147 -mmacosx-version-min=10.5'
148
149to the configure command line. The OS X 10.5 SDK, and NASM 2.07 or later from
150MacPorts, must be installed.
151
152
DRCef5e17f2010-09-30 18:53:42 +000015332-bit Backward-Compatible Build on 64-bit OS X
DRC2c0ea902010-04-16 07:33:41 +0000154-----------------------------------------------
155
156Add
157
158 CC=gcc-4.0 CXX=g++-4.0 CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
159 -mmacosx-version-min=10.4 -O3 -m32' \
160 CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
161 -mmacosx-version-min=10.4 -O3 -m32' \
162 LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
163 -mmacosx-version-min=10.4 -m32'
164
165to the configure command line. The OS X 10.4 SDK must be installed.
166
167
DRC2e0b9652010-10-01 09:31:44 +0000168Building VeNCrypt support on OS X
169---------------------------------
170
171VeNCrypt requires GnuTLS, which is not available on OS X systems by default.
172However, it can be obtained from MacPorts (http://www.macports.org/). The
173easiest way to build TigerVNC using this version of GnuTLS is simply to
174modify the CPATH and LIBRARY_PATH environment variables to include /opt/local,
175i.e.:
176
177export CPATH=/opt/local/include
178export LIBRARY_PATH=/opt/local/lib
179
180and then build TigerVNC as you would normally. However, this produces run-time
181dependencies on the .dylib files in /opt/local/lib. To statically link with
182GnuTLS, add the following monstrosity to the configure command line:
183
184 GNUTLS_CFLAGS=-I/opt/local/include \
185 GNUTLS_LDFLAGS='/opt/local/lib/libgnutls.a /opt/local/lib/libgcrypt.a \
186 /opt/local/lib/libgpg-error.a /opt/local/lib/libz.a \
187 /opt/local/lib/libtasn1.a /opt/local/lib/libiconv.a \
188 /opt/local/lib/libintl.a -framework CoreFoundation'
189
190
DRC2c0ea902010-04-16 07:33:41 +0000191*******************************************************************************
192** Creating Release Packages
193*******************************************************************************
194
195The following commands can be used to create various types of release packages:
196
197make dmg
198
199 Create Macintosh package/disk image. This requires the PackageMaker
200 application, which must be installed in /Developer/Applications/Utilities.
201
202make udmg
203
DRC896a96c2010-07-08 07:12:09 +0000204 On 64-bit OS X (10.5 "Leopard") and later, this creates a version of the
DRC2c0ea902010-04-16 07:33:41 +0000205 Macintosh package/disk image which contains universal i386/x86-64 binaries.
206 The 32-bit fork of these binaries is backward compatible with OS X 10.4 and
DRC896a96c2010-07-08 07:12:09 +0000207 later (OS X 10.4 compatibility SDK required.) If building on OS X 10.6
208 ("Snow Leopard") or later, the 64-bit fork can be made backward compatible
209 with 10.5 by using the instructions in the "Build Recipes" section.