forked from freeciv/freeciv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
759 lines (534 loc) · 27.4 KB
/
INSTALL
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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
===================
Installing Freeciv:
===================
This file describes how to compile and install Freeciv.
There may be a localized version of this file in the ./doc directory,
named INSTALL.<locale> (e.g., INSTALL.de).
This document contains sections and subsections as follows:
0. Prerequisites:
1. Prerequisites for the clients:
1a. Prerequisites for the Gtk+ 1.2 client:
1b. Prerequisites for the Gtk+ 2.0 client:
1c. Prerequisites for the Xaw client:
2. Generating Makefiles
2a. Generating the Makefile for svn versions:
2b. Generating the Makefile for release versions:
3. Compiling Freeciv:
4. Installation:
5. Native Language Support:
6. Readline Support:
7. Reinier's Solaris Installation Notes:
8. Reinier's libXpm Solaris Installation Notes:
9. Mac OS X and Darwin notes:
10. Debian GNU/Linux notes:
11. Cygwin notes:
12. Win32 ("native MS Windows") notes:
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 svn snapshots will not work without gcc,
unless you give configure the "--disable-auto-deps" option. See
the section below for more information.
Note that there have been reports that gcc with -O3 miscompiled
freeciv. No problems have been reported with -O2.
- 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 svn snapshots contain things (like dependencies) which use
gmake's enhanced features, so gmake is necessary for development,
unless you give configure the "--disable-auto-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.
The svn version has additional requirements. A release version
contains the generated files.
- The programs from GNU gettext version 0.10.36 or better
Especial the xgettext program is required to create the *.gmo
files which aren't included in the svn tree.
- GNU autoconf version 2.13 or better
Autoconf is required to create configure from configure.in.
- GNU automake version 1.4 or better
Automake is required to create the various Makefile.in from
Makefile.am.
1. Prerequisites for the clients:
=================================
The Freeciv client comes in the following forms:
* Gtk+ 1.2 widget library ("Gtk+ 1.2").
* Gtk+ 2.0 widget library ("Gtk+ 2.0").
* AmigaOS MUI ("Mui").
* Native Microsoft Windows Common Controls ("Win32").
* X Athena Widgets library ("Xaw").
These forms have different prerequisites, explained separately below.
Your system will need to satisfy at least one of these sets of prerequisites.
Note that some Linux 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 Gtk+ 1.2 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.5.
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.10.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.
To compile the client using the "Gtk+" library add "--enable-client=gtk"
to the Freeciv configure script. See the section below for more
information about the configure script.
Freeciv requires a version of "Gtk+" greater or equal to 1.2.5.
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.10.tar.gz
Note: several bugs have been found in Gtk+ versions previous to 1.2.10.
Use those at your own risk.
- 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/1.9/imlib-1.9.14.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.
1b. Prerequisites for the Gtk+ 2.0 client:
==========================================
- "pkg-config".
"pkg-config" is a system for managing library compile/link flags that
works with automake and autoconf. You may obtain it at:
ftp://ftp.gtk.org/pub/gtk/v2.2/dependencies/pkgconfig-0.14.0.tar.gz
- 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 2.2.0.
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/v2.2/glib-2.2.3.tar.bz2
- The "Atk" accessibility library.
The "Atk" library provides a set of interfaces for accessibility.
It allows people with disabilities to utilize all the functionality
provided by Gtk+ apps. You may obtain it at:
ftp://ftp.gtk.org/pub/gtk/v2.2/atk-1.2.4.tar.bz2
- The "Pango" text layout and rendering library.
"Pango" is library for layout and rendering of text, with an emphasis
on internationalization. You may obtain it at:
ftp://ftp.gtk.org/pub/gtk/v2.2/pango-1.2.5.tar.bz2
- 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.
To compile the client using the "Gtk+" library add "--enable-client=gtk-2.0"
to the Freeciv configure script. See the section below for more
information about the configure script.
The "Gtk+" library comes with two companion libraries:
"Gdk":
Provides an abstraction layer over X-Windows/LinuxFB/Win32 to implement
basic drawing functions, windows, clipping, etc.
"GdkPixbuf":
Provides image loading/saving facilities.
Freeciv requires a version of "Gtk+" greater or equal to 2.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/v2.2/gtk+-2.2.4.tar.bz2
"Gtk+" depends on the "Glib", "Atk" and "Pango" libraries.
If you are going to make these yourself, build and install them in the
following order: pkg-config, Glib, Atk, Pango, Gtk+.
1c. 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 "--enable-client=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.
If you have problems installing libXpm on Solaris, or don't want to
install it as root, see Reinier's libXpm Solaris Installation Notes
section near the end of this file.
2. Generating Makefiles
=======================
This section contains two parts, one for generating makefiles from svn
versions and one for generating makefiles from release versions.
2a. Generating the Makefile for svn versions:
=============================================
This step is only needed for svn versions.
To create the makefile just type
% ./autogen.sh
This will create the configure script and will run it. All parameters
of autogen.sh are passed to configure. Read the next section about the
parameters which can be passed to configure.
2b. Generating the Makefile for release versions:
=================================================
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 svn snapshot, and you
don't have both GNU make AND gcc, then pass configure the
"--disable-auto-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-auto-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.
If you prefer to override this default, you can give configure the
"--enable-client=xaw" option.
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.
When you install Freeciv (later), the game components will be copied into
subdirectories of /usr/local by default. If you would like to use some
other installation prefix besides /usr/local, you should specify it now:
% ./configure --prefix=/opt/freeciv
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+ 1.2 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).
- If the problem is with "gettext", please read the Native Language
Support section, below, for possible work-arounds.
- 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/
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. If the problem is with "gettext", please read the Native
Language Support section, below, for possible work-arounds.
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 the
Compiling Freeciv section. These need to be copied to a directory such
as /usr/local (the default), /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 (see the Generating
the Makefile section) 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.)
Also, note that you generally must install Freeciv if you wish to use
its Native Language Support. See the README file for more information.
Finally, if you've chosen to use the Xaw client and you have permission
to log in as the 'root' user, you should consider copying the resource
file data/Freeciv into your app-defaults directory. (Usually this is
/usr/lib/X11/app-defaults).
5. Native Language Support:
===========================
Freeciv uses the "gettext" system for Native Language Support.
If you experience problems with gettext in either configuring or compiling
Freeciv, there are a few work-arounds you can try:
1. If you don't need Native Language Support, disable it using the
"--disable-nls" ./configure option:
% ./configure --disable-nls
% make
2. If you want Native Language Support, try the version of gettext that
is included with Freeciv by specifying the "--with-included-gettext"
./configure option:
% ./configure --with-included-gettext
% make
3. Finally, you can try to install the latest version of GNU gettext.
It may be obtained from here:
ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.11.4.tar.gz
6. Readline Support:
====================
Freeciv has optional support for the readline library.
Readline support is what makes the server command line behave sensibly,
making it possible to
- Use the backspace key.
- Use the cursor to move back and forth on the line you have written.
- Use TAB completion of commands and command arguments. Ie, when you
push tab the server will finish the word for you if there is only one
possible choice.
- Use the up and down cursor to scroll through the history of previously
entered commands.
- etc.
The configure script will check if you have the readline library correctly
installed. If so it will automatically set up the makefiles so that readline
is compiled into the server. If not then it will just silently configure
without readline support.
You can force configure to include readline or die trying by giving
configure the --with-readline option:
% ./configure --with-readline
Some linux distributions (and possibly other operating systems) have
readline version 4 incorrectly installed, so that readline is not
set up to declare it's dynamic dependencies. In that case configure
will try to guess which extra libs it should link against and add them.
The configure script will give a warning if it had to add extra libs
to make readline work. This should be harmless, and is just meant as
a reminder to the folks who distribute readline. :)
7. Reinier's Solaris Installation Notes:
========================================
Solaris (2.5 and up) has its own version of X in /usr/openwin, its own
version of make in /usr/ccs/bin/make, and its own compiler (to be purchased
separately) which, if you have it, is available in /opt/SUNWspro/bin.
Solaris does not provide the XPM library, which is required for the Xaw
client; it doesn't provide any of the stuff required for imlib, gdk and gtk,
either, which is required to build the GTK+ client. However, with some
patience, everything can be compiled without problems.
For information on how to install XPM on Solaris, see the next section.
Many Solaris installations also have MIT X (usually, in /usr/X11), GNU make,
the gcc compiler, and the XPM library installed somewhere. The standard
command "./configure && make" may not be able to find your XPM library and
it is likely to confuse the different versions.
Make sure your environment variables, especially $PATH and $LD_LIBRARY_PATH,
and the ./configure options do not point to an inconsistent set of software,
and compiling will be fine.
A simple recipe to compile with Sun X, Sun make and Sun cc, assuming the xpm
libraries are on their own in the nonstandard location /path/to/xpm:
% setenv PATH /opt/SUNWspro/bin:/usr/ccs/bin:/bin
% unsetenv LD_LIBRARY_PATH
% ./configure --with-xpm-prefix=/path/to/xpm
--disable-auto-deps --with-included-gettext
% make
The "--disable-auto-deps" prevents ./configure from creating Makefiles
specific to GNU make. The symptoms of this happening are:
make: Fatal error in reader:
Makefile, line 214: = missing from replacement macro reference
make: Fatal error: Command failed for target `all-recursive'
Alternatively, you can set up your $PATH and ./configure to use only GNU
tools. Furthermore, Freeciv is known to compile with MIT X, and with
certain combinations of GNU and Sun tools. The exact recipes depend on your
local installation.
8. Reinier's libXpm Solaris Installation Notes:
===============================================
When I was root on my Solaris system, I *still* didn't want to install
third-party software as root. It's bad practice.
Unfortunately, the libXpm installation procedure assumes installation
in /usr/openwin, which is owned by root. But it's not all that hard to
get around that.
Caveats:
- Make sure /usr/ucb/install is in your $PATH before /usr/bin/install,
otherwise 'make install' will break with strange error messages.
- The destination you want to install to can be specified with $DESTDIR;
however, installation will actually take place in $DESTDIR/$OPENWINDIR,
so the additional $OPENWINDIR subdir must be stripped afterwards
(changing the value of $OPENWINHOME doesn't work).
The Procedure:
- Get the source from somewhere, untar it, cd into the source directory,
and issue:
% setenv MYXPMDEST /usr/local # or wherever you want to install it
% xmkmf; make Makefiles includes depend; make
% setenv PATH /usr/local/bin:/usr/ucb:$PATH
% make DESTDIR=$MYXPMDEST install
% make DESTDIR=$MYXPMDEST install.man
% cd $MYXPMDEST; mv ./$OPENWINHOME/* .; rm -rf ./$OPENWINHOME
(If you use sh, bash, ksh, zsh, etc., the "setenv"s above should be:
% MYXPMDEST=/usr/local; export MYXPMDEST
% PATH=/usr/local/bin:/usr/ucb:$PATH
.)
- You can now configure Freeciv with
% ./configure --with-xpm-prefix=$MYXPMDEST
which will add the proper -I/-L/-R options to the compile and link
commands.
9. Mac OS X and Darwin notes:
=============================
Apple's version of GCC uses precompiled headers that does not support
vararg macros (a GCC extension). This causes GCC to fail when
compiling Freeciv since the compiler is otherwise (mostly)
indistinguishable from vanilla GCC. So instead of the usual
% ./configure <...>
you should use either
Bourne shell:
$ CC="gcc -no-cpp-precomp" ./configure <...>
or
C shell:
% env CC="gcc -no-cpp-precomp" ./configure <...>
depending on whether your shell is a Bourne or C shell variant. (If
in doubt, just try both to see which one will work.)
Replace <...> with whatever additional arguments you want to give to
configure.
10. Debian GNU/Linux notes:
===========================
To compile freeciv on a debian system you need the following packages:
Common requirements:
gcc
libc6-dev
libreadline4-dev
zlib1g-dev
xlib6g-dev
For the gtk+ 1.2 client:
gdk-imlib-dev
libglib1.2-dev
libgtk1.2-dev
imlib-progs
For the xaw client:
xaw3dg-dev
libxpm4-dev
If you want to compile the xaw client you should give configure the
argument --with-xaw3d, ie
% ./configure --with-xaw3d
If you need to run aclocal (if you don't know what aclocal is then you
don't need it) you also need to install imlib-dev to get the
AM_PATH_GDK_IMLIB macro. It is a bug in debian that this macro isn't
in gdk-imlib-dev, and it will hopefully be fixed in future debian
releases.
11. Cygwin notes:
=================
Cygwin specific installation notes can be found in doc/INSTALL-Cygwin.
12. Win32 ("native MS Windows") notes:
======================================
Requirements: a unix environment with gcc and binutils for windows (mingw32)
for the native win32 client: libz and libpng
(from http://download.gna.org/freeciv/requirements)
You can use the standard gcc makefiles for them, but set CC and RANLIB to the
right thing. If you use the libpng/libz binary shipped with cygwin, you are
asking for trouble.
To compile zlib from above source enter
with the cygwin utils: make CC="gcc -mno-cygwin"
with a mingw32 cross compiler:
make CC=iX86-mingw32-gcc RANLIB=iX86-mingw32-ranlib
To compile libpng from above source enter
with the cygwin utils:
make -f scripts/makefile.gcc CC="gcc -mno-cygwin"
with a mingw32 cross compiler:
make -f scripts/makefile.gcc CC=i386-mingw32-gcc RANLIB=i386-mingw32-ranlib
These things have to be put to a place where your compiler will find it.
Autoconf and co:
If you build from cvs, you will have to replace ./configure with ./autogen.sh
in the following lines.
You will have trouble with the paths (especially with the localedir) if you
use autoconf2.52.
So autoconf 2.13 is the preferred version (you can use the
--disable-autoconf2.52 switch from autogen.sh).
Configuring the source:
-----------------------
1. with the cygwin utils:
You need the mingw and the w32api package.
export CC="gcc -mno-cygwin"
./configure --with-included-gettext --prefix=.
2. cross compiling from a real unix.
replace X with a number which you have chosen when you have configured your
cross compiler.
export CC=iX86-mingw32-gcc
export AR=iX86-mingw32-ar
export RANLIB=iX86-mingw32-ranlib
./configure --host=iX86-mingw32 --build=$(./config.guess) --with-included-gettext --enable-client=win32 --prefix=.
Build and install:
--------------------
make
make DESTDIR=absolute_install_path bindir=./ install
absolute_install_path must be the path where you want to install freeciv.
It must be absolute and must end with a slash.
Now it is time to cleanup the stuff a bit.
cd into your install dir. Then check if the executables have the .exe suffix and if you want, strip them.
I suggest to move the data dir:
mv share/freeciv data
The final step is to convert the gfx to png. Use your favorite gfx program in
order to do that. You can use a combination of ImageMagick and pngquant for
that. But it is really important that you check the result. Check every file.
The alpha channel (transparency) often magically disappears. There is no
reliable script for that.
** END **