forked from freeciv/freeciv
-
Notifications
You must be signed in to change notification settings - Fork 4
/
INSTALL
849 lines (569 loc) · 29.9 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
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
===================
Installing Freeciv:
===================
This file describes how to compile and install Freeciv. Last time we
made sure this file is up to date was 16-Jul-06.
Last minor update was 27-Aug-17.
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 Gtk2 client:
1b. Prerequisites for the Gtk3 client:
1c. Prerequisites for the Gtk3.22 client:
1d. Prerequisites for the SDL client:
1e. Prerequisites for the SDL2 client:
1f. Prerequisites for the Xaw client:
1g. Prerequisites for the Qt client:
2. Generating Makefiles
2a. Generating the Makefile for git 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. 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).
Note that there have been reports that gcc with -O3 miscompiled
freeciv.
- 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.
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.
- libcurl version 7.12.1 or better
Libcurl takes care of http communication with the metaserver, and
file transfers of modpack installers
http://curl.haxx.se/
The git version has additional requirements. A release version
contains the generated files.
- The programs from GNU gettext version 0.14 or better
Especial the xgettext program is required to create the *.gmo
files which aren't included in the git tree.
- GNU autoconf version 2.61 or better
Autoconf is required to create configure from configure.ac.
- GNU automake version 1.10 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+ 2.0 widget library ("Gtk+ 2.0").
* Gtk+ 3.0 widget library ("Gtk+ 3.0").
* X Athena Widgets library ("Xaw").
* SDL
* Qt
These forms have different prerequisites, explained separately below.
Your system will need to satisfy at least one of these sets of prerequisites.
Note that most 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.
Sound support is built in by default if "SDL2_mixer" library development
files are found from the system.
https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz
1a. 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:
http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.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.6.0.
If the Freeciv configure process tells you that you don't have the
Glib library installed, then it may be obtained from here:
http://ftp.gnome.org/pub/gnome/sources/glib/2.30/glib-2.30.2.tar.xz
- 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:
http://ftp.gnome.org/pub/gnome/sources/atk/2.2/atk-2.2.0.tar.xz
- 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:
http://ftp.acc.umu.se/pub/gnome/sources/pango/1.28/pango-1.28.4.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.
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.12.0.
At least 2.16.0 is recommended; some minor UI features will be
missing with earlier versions.
If the Freeciv configure process tells you that you don't have the
Gtk+ library installed, then it may be obtained from here:
http://ftp.acc.umu.se/pub/gnome/sources/gtk+/2.24/gtk+-2.24.9.tar.xz
"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+.
1b. Prerequisites for the Gtk+ 3.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:
http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.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.36
If the Freeciv configure process tells you that you don't have the
Glib library installed, then it may be obtained from here:
http://ftp.gnome.org/pub/gnome/sources/glib/2.36/glib-2.36.1.tar.xz
- 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:
http://ftp.gnome.org/pub/gnome/sources/atk/2.8/atk-2.8.0.tar.xz
- 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:
http://ftp.gnome.org/pub/gnome/sources/pango/1.34/pango-1.34.0.tar.xz
- The "Gdk-Pixbuf" image loading/saving library
"Gdk-Pixbuf" used to be part of "Gtk+" itself, but is now separate
project. It may be obtained from:
http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.28/gdk-pixbuf-2.28.1.tar.xz
- 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.
"Gtk+ 3" is the default client. If you don't specify any client with
"--enable-client" to configure, you will get "Gtk+ 3" client.
The "Gtk+" library comes with one companion libraries:
"Gdk":
Provides an abstraction layer over X-Windows/LinuxFB/Win32 to implement
basic drawing functions, windows, clipping, etc.
Freeciv requires a version of "Gtk+" greater or equal to 3.8.0.
If the Freeciv configure process tells you that you don't have the
Gtk+ library installed, then it may be obtained from here:
http://ftp.gnome.org/pub/gnome/sources/gtk+/3.12/gtk+-3.12.2.tar.xz
"Gtk+" depends on the "Glib", "Atk", "Gdk-Pixbuf", and "Pango" libraries.
If you are going to make these yourself, build and install them in the
following order: pkg-config, Glib, Atk, Pango, Gdk-Pixbuf, Gtk+.
1c. Prerequisites for the Gtk+ 3.22 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:
http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.1.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.50
If the Freeciv configure process tells you that you don't have the
Glib library installed, then it may be obtained from here:
http://ftp.gnome.org/pub/gnome/sources/glib/2.50/glib-2.50.1.tar.xz
- 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:
http://ftp.gnome.org/pub/gnome/sources/atk/2.22/atk-2.22.0.tar.xz
- 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:
http://ftp.gnome.org/pub/gnome/sources/pango/1.40/pango-1.40.3.tar.xz
- The "Gdk-Pixbuf" image loading/saving library
"Gdk-Pixbuf" used to be part of "Gtk+" itself, but is now separate
project. It may be obtained from:
http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.36/gdk-pixbuf-2.36.0.tar.xz
- 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 one companion libraries:
"Gdk":
Provides an abstraction layer over X-Windows/LinuxFB/Win32 to implement
basic drawing functions, windows, clipping, etc.
Freeciv requires a version of "Gtk+" greater or equal to 3.22.0.
If the Freeciv configure process tells you that you don't have the
Gtk+ library installed, then it may be obtained from here:
http://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-3.22.1.tar.xz
"Gtk+" depends on the "Glib", "Atk", "Gdk-Pixbuf", and "Pango" libraries.
If you are going to make these yourself, build and install them in the
following order: pkg-config, Glib, Atk, Pango, Gdk-Pixbuf, Gtk+.
1d. Prerequisites for the SDL client:
=====================================
- The "SDL" library.
"Simple DirectMedia Layer is a cross-platform multimedia library designed
to provide low level access to audio, keyboard, mouse, joystick, 3D hardware
via OpenGL, and 2D video framebuffer." (http://www.libsdl.org)
These features make it a good choice for portable games. You may obtain it
at:
http://www.libsdl.org/release/SDL-1.2.15.tar.gz
To compile the client using the "SDL" library add "--enable-client=sdl"
to the Freeciv configure script. See the section below for more
information about the configure script.
- The "SDL_image" library.
This library loads the PNG images (with the help of libpng) and converts
them to "SDL surfaces" that can be handled by the "SDL" library. You may
obtain it at:
http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz
- The "SDL_gfx" library.
http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.26.tar.gz
- The "SDL_ttf" library.
http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz
- The "freetype" library.
This library helps to render text for the SDL client, using an externally
provided TrueType font. You may obtain it at:
http://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.bz2
1e. Prerequisites for the SDL2 client:
=====================================
- The "SDL2" library.
"Simple DirectMedia Layer is a cross-platform multimedia library designed
to provide low level access to audio, keyboard, mouse, joystick, 3D hardware
via OpenGL, and 2D video framebuffer." (http://www.libsdl.org)
These features make it a good choice for portable games. You may obtain it
at:
http://www.libsdl.org/release/SDL2-2.0.5.tar.gz
To compile the client using the "SDL2" library add "--enable-client=sdl2"
to the Freeciv configure script. See the section below for more
information about the configure script.
- The "SDL2_image" library.
This library loads the PNG images (with the help of libpng) and converts
them to "SDL surfaces" that can be handled by the "SDL" library. You may
obtain it at:
http://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
- The "SDL2_gfx" library.
http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.3.tar.gz
- The "SDL2_ttf" library.
http://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
- The "freetype" library.
This library helps to render text for the SDL2 client, using an externally
provided TrueType font. You may obtain it at:
http://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.bz2
1f. 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.
- A suitable font.
To run the Xaw client a suitable font is required. The X fonts should do.
If the Xaw client complains about not being able to open a font your X
installation probably don't have them. X fonts can be obtained from:
http://xorg.freedesktop.org/releases/individual/font/
If you use Debian you can install the package named xfonts-base in stead.
After installing a suitable font and restarting X the problem should go
away.
1g. Prerequisites for the Qt client:
====================================
- C++ compiler.
Qt-client is written in C++, so you need appropriate compiler.
In Freeciv development, g++ has been used.
- Qt5Core, Qt5Gui, and Qt5Widgets libraries and headers.
At least version 5.2 is required.
2. Generating Makefiles
=======================
This section contains two parts, one for generating makefiles from git
versions and one for generating makefiles from release versions.
2a. Generating the Makefile for git versions:
=============================================
This step is only needed for git 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
By default the configure script will choose the Gtk+ client if the
required libraries are found. 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 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/freeciv-<GUI>" and "server/freeciv-server" binaries.
- The "data/" directory, which contains the graphics and scenarios.
- The "translations/" directory, which contains the localization files.
- The "fcgui" and "fcser" scripts.
It's perfectly feasible to play Freeciv in this directory, without
installing it. If you do this, the "fcgui" and "fcser" 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_DATA_PATH environment variable, to
a single directory or a list of directories separated by colons.
For example:
% setenv FREECIV_DATA_PATH "/usr/games/freeciv/data:./data"
(for users of csh, tcsh, etc.)
% FREECIV_DATA_PATH="/usr/games/freeciv/data:./data"; export FREECIV_DATA_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. 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.19.2.tar.xz
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
% make
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 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. Windows notes:
==================
Windows version of Freeciv can be built either with MinGW or Cygwin.
Official Windows binaries are built with MinGW, and they are self-contained
packages. For using Cygwin version, you need Cygwin environment installed.
Build instructions for MinGW versions are documented on top of file
win32/installer/Makefile
Cygwin specific installation notes can be found in doc/INSTALL.Cygwin.
** END **