File: INSTALL

package info (click to toggle)
freeciv 1.9.0-2.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 11,004 kB
  • ctags: 6,284
  • sloc: ansic: 65,037; makefile: 634; sh: 418; sed: 93
file content (321 lines) | stat: -rw-r--r-- 12,669 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
===================
Installing Freeciv:
===================

This file describes how to compile and install Freeciv.

0. Prerequisites:
=================

Freeciv has a number of prerequisites.  Note, that apart from the first
prerequisite, the Freeciv configuration process is smart enough to work
out whether your system is suitable.  If in doubt, just try it.

 - Unix (or similar)

   The Unix operating system, a work-alike such as Linux or FreeBSD,
   or some OS that provides a very Unix-like personality or mode, like
   EMX under OS/2 or the Cygnus Cygwin toolkit under Windows.
   (See http://sourceware.cygnus.com/cygwin/).  Support for
   BSD-style TCP/IP sockets is essential, as is a Bourne-shell
   compatible shell, such as GNU "bash".  (Most Unixes fit the bill...)

 - An ANSI C compiler.

   Freeciv is written in very portable (almost) ANSI C.  Both 32- and 64-
   bit machines are supported.  You cannot use a "K&R C" compiler, or
   a C++ compiler.

   Development of Freeciv is primarily done with "gcc", the GNU
   project's excellent C compiler.  Releases can be compiled with gcc
   or most other compilers (such as the unbundled Solaris C compiler).
   Development releases and CVS snapshots will not work without gcc,
   unless you give configure the "--disable-cvs-deps" option.  See
   the section below for more information.

 - A "make" program.

   Freeciv developers generally use "gmake", the GNU make program.

   Officially released versions of Freeciv are designed to have
   makefiles which work with most make programs.  Development releases
   and CVS snapshots contain things (like dependencies) which use
   gmake's enhanced features, so gmake is necessary for development,
   unless you give configure the "--disable-cvs-deps" option.  See the
   section below for more information.

   You can check if you have GNU make installed on your system by
   typing:

    % make -v                   [and if this doesn't work, try "gmake -v"]

   The output should include "GNU Make" somewhere.

1. Prerequisites for the clients:
=================================

The Freeciv client now comes in two different forms: one using
the Athena widget library ("Xaw"), and one using the Gtk+ widget
library.  The two forms have different prerequisites, explained
separately below.  Your system will need to satisfy at least 
one of the two sets of prerequisites.

Note that some systems have separate library packages for "runtime" 
library support and for development support (for compiling programs 
which use those libraries).  To compile Freeciv on such systems you 
will need to have the appropriate "development" packages installed.
(Attention Red Hat users: this means you! :-)

1a. Prerequisites for the Xaw client:
=====================================

 - X-Windows.

   The Freeciv Xaw client is an X-Windows program, so you'll need 
   some way of running X-Windows programs.  (Most Unixes can...)

   If the Freeciv configuration program can't find X Windows on
   your system, you may need to use the --x-includes=DIR
   and --x-libraries=DIR options.

 - The "Athena" widget library.

   This library (also known as "Xaw") is usually supplied standard
   with the rest of X Windows, but some platforms (HP-UX 10 for
   example) only provide it in a limited form.

   To compile the client using the "Xaw" library add "--with-xaw" to
   the Freeciv configure script.  See the section below for more 
   information about the configure script.

   Many modern Unix systems (such as Linux) ship with a variant called
   "Xaw3d", which has a more modern "3D" look.  If you'd like to try
   compiling with Xaw3d, then add "--with-xaw3d" to the Freeciv
   configure script.

   There are also other variants of Xaw, such as Nextaw.  Freeciv
   does not work with these, although it should be possible to modify
   it in the same fashion as for Xaw3d.  Another tool which may help
   is called "xaw_wrappers", although how to use it is beyond the
   scope of this file.

 - The "Xpm" library.

   This library is essential for icon and bitmap handling.  It is in
   wide use, and is supplied standard on most modern Unix machines,
   although it may be missing on traditional or older Unixes, eg,
   Solaris.

   When you run the Freeciv configure script, it may be necessary for
   you to use the "--with-xpm-prefix=DIR" command-line option, where
   DIR is the name of the directory containing the "include" and "lib"
   subdirectories where Xpm may be found.

   If the Freeciv configure process tells you that you don't have the
   Xpm library installed, then it may be obtained from here:

     ftp://koala.inria.fr/pub/xpm/xpm-3.4k.tar.gz
     ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz

   Install it as you would any other package.  If you can't install
   it in a standard system directory, then use the --with-xpm-prefix
   option, as described above.

1b. Prerequisites for the Gtk+ client:
======================================

 - The "Glib" utility library.

   The "Glib" utility library provides non-graphical functions used by the
   "Gdk" and "Gtk+" libraries, like hash tables, single linked lists, etc.

   Freeciv requires a version of "Glib" greater or equal to 1.2.1.

   If the Freeciv configure process tells you that you don't have the
   Glib library installed, then it may be obtained from here:

     ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.6.tar.gz

 - The "Gtk+" widget library.

   The "Gtk+" widget library was designed for the GIMP graphics program.
   Since then it has gained popularity as an easy to program, free toolkit.
   The "Gtk+" library comes with a companion library "Gdk" which provides an
   abstraction layer over X Windows to implement basic drawing functions,
   windows, clipping, etc.

   Freeciv requires a version of "Gtk+" greater or equal to 1.2.1.

   If the Freeciv configure process tells you that you don't have the
   Gtk+ library installed, then it may be obtained from here:

     ftp://ftp.gtk.org/pub/gtk/v1.2/gtk+-1.2.6.tar.gz

 - The "Imlib" library.

   This library is essential for bitmap handling.  It is also
   used by the GNOME project.

   Freeciv requires a version of "Imlib" greater or equal to 1.9.2.

   If the Freeciv configure process tells you that you don't have the
   Imlib library installed, then it may be obtained from here:

     ftp://ftp.gnome.org/pub/GNOME/sources/imlib/imlib-1.9.7.tar.gz

   (Imlib documentation says that you require other libraries to use
   certain features but none of those are needed by the Freeciv client).

If you are going to make these yourself, build and install them in the
following order: Glib, Gtk+, Imlib.

2. Generating the Makefile:
===========================

Before you compile Freeciv, you must generate a Makefile.  This
makefile is configured to suit the features available on your
machine.

This configuration is done using the GNU "configure" script.

To use "configure", "cd" into the top directory containing the Freeciv
files, and type:

 % ./configure

This script will then attempt to determine the relevant features (and
misfeatures!!) of your system.  It should print a page or two of
diagnostics about your machine, then stop gracefully.

If you'd like help on the various options supported by the
configure script, try the --help option, like this:

 % ./configure --help

  If you're compiling a development release or a CVS snapshot, and you
  don't have both GNU make AND gcc, then pass configure the
  "--disable-cvs-deps" option.  You'll especially need to do this if
  you're using the Solaris cc and make programs.

  Note that if you do this, dependency checking is disabled.  If you
  change any Freeciv .h files after this for any reason, you should do
  a "make clean" before doing "make" to ensure everything is compiled
  correctly.

  "--disable-cvs-deps" has no effect when run with a stable release.

By default the configure script will choose the Gtk+ client if the 
required libraries are found, or else fall back to the Xaw client 
(possibly using Xaw3d).  If you prefer to override this default, you
can give configure one of the options "--with-xaw" or "--with-xaw3d".

If you want to change the compiler options, set the CFLAGS environment
variable in your shell before running "configure".  For example:

 % CFLAGS="-O -g -pipe" ./configure   [for people using Bourne shell or bash]

or

 % setenv CFLAGS "-O -g -pipe"
 % ./configure                        [for people using C shell or tcsh]

If you're tracking down a "core dump", we suggest that you use
a value of "-g" for CFLAGS.

Note, the CFLAGS variable shouldn't be used to specify include and
library directories.  Instead, use the proper configure command-line
options for that.

If for some reason using "configure" gives you trouble, follow these steps:

  - Read the prerequisites section carefully, to determine if your
    system meets all the requirements.

  - If you are compiling the Gtk+ version of the client: Ensure that
    you have the Gtk+, Gdk, Glib & Imlib libraries installed on your
    system.  Make sure that the configure script can find them,
    either by installing them in the standard places on your system,
    or by instructing the configure script with the appropriate
    command-line options.  (See ./configure --help)

  - If you are compiling the Xaw version of the client: Ensure that
    you have both the Xpm and Xaw libraries installed on your system.
    Make sure that the configure script can find them, either by
    installing them in the standard places on your system, or by
    instructing the configure script with the appropriate command-line
    options.  (See ./configure --help).

  - Let us know, so that we can fix it for the next release!!

    Send mail to the freeciv-dev mailing list, telling us what you did,
    and what the result is.  It would be helpful to include the output
    of the configure script, and the contents of the "config.status",
    "config.cache" and "config.log" files, which are generated by the
    configure script.

    You can find out about the freeciv-dev mailing list on our web
    site, at http://www.freeciv.org

Please note that since Freeciv 1.7.2 we have stopped supporting 
the use of Imake, and as of Freeciv 1.8.1 we no longer include 
the Makefile.noimake fallback.

3. Compiling Freeciv:
=====================

If all has gone well previous to this point, then compiling Freeciv
should be as easy as typing "make" (or preferably, "gmake").

If you have problems, read the file BUGS, and follow the advice 
carefully.

After compilation, the important results are:

  - The "client/civclient" and "server/civserver" binaries.
  - The "data/" directory, which contains the graphics and scenarios.
  - The "po/" directory, which contains the localization files.
  - The "civ" and "ser" scripts.

It's perfectly feasible to play Freeciv in this directory, without
installing it.  If you do this, the "civ" and "ser" scripts may be
useful, although they are not as necessary as they used to be.

See the README file for more information.

(However you cannot use Internationalization when playing Freeciv from
the source directory; you must install Freeciv for that.)

4. Installation:
================

Installing Freeciv involves installing the components mentioned in
Section 3.  These need to be copied to a directory such as /usr/games,
/usr/games/freeciv, /usr/local/freeciv, or some other suitable
directory.

Typing "make install" should install everything correctly on
your machine.  You may like to use the --prefix=DIR configure option
to ensure the files get placed where you want.

When the Freeciv client and Freeciv server are run they both need to 
find some files from the "data" directory.  By default freeciv looks
in the following directories, in order, for any data files: the current 
directory; the "data" subdirectory of the current directory; the 
subdirectory ".freeciv" in the user's home directory; and the directory
where the files are placed by running "make install".  You can override
this search patch by setting the FREECIV_PATH environment variable, to
a single directory or a list of directories separated by colons.

For example:

setenv FREECIV_PATH "/usr/games/freeciv/data:./data"
   (for users of csh, tcsh, etc)

FREECIV_PATH="/usr/games/freeciv/data:./data"; export FREECIV_PATH
   (for users of sh, bash, ksh, zsh, etc)

Finally, if you've choose to use the Xaw client and you're logged in as the
'root' user, you should consider copying the file data/Freeciv into your
app-defaults directory. (Usually this is /usr/lib/X11/app-defaults).

** END **