home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Games / Freeciv / INSTALL < prev    next >
Text File  |  1999-10-20  |  13KB  |  322 lines

  1. ===================
  2. Installing Freeciv:
  3. ===================
  4.  
  5. This file describes how to compile and install Freeciv.
  6.  
  7. 0. Prerequisites:
  8. =================
  9.  
  10. Freeciv has a number of prerequisites.  Note, that apart from the first
  11. prerequisite, the Freeciv configuration process is smart enough to work
  12. out whether your system is suitable.  If in doubt, just try it.
  13.  
  14.  - Unix (or similar)
  15.  
  16.    The Unix operating system, a work-alike such as Linux or FreeBSD,
  17.    or some OS that provides a very Unix-like personality or mode, like
  18.    EMX under OS/2 or the Cygnus Cygwin toolkit under Windows.
  19.    (See http://sourceware.cygnus.com/cygwin/).  Support for
  20.    BSD-style TCP/IP sockets is essential, as is a Bourne-shell
  21.    compatible shell, such as GNU "bash".  (Most Unixes fit the bill...)
  22.  
  23.  - An ANSI C compiler.
  24.  
  25.    Freeciv is written in very portable (almost) ANSI C.  Both 32- and 64-
  26.    bit machines are supported.  You cannot use a "K&R C" compiler, or
  27.    a C++ compiler.
  28.  
  29.    Development of Freeciv is primarily done with "gcc", the GNU
  30.    project's excellent C compiler.  Releases can be compiled with gcc
  31.    or most other compilers (such as the unbundled Solaris C compiler).
  32.    Development releases and CVS snapshots will not work without gcc,
  33.    unless you give configure the "--disable-cvs-deps" option.  See
  34.    the section below for more information.
  35.  
  36.  - A "make" program.
  37.  
  38.    Freeciv developers generally use "gmake", the GNU make program.
  39.  
  40.    Officially released versions of Freeciv are designed to have
  41.    makefiles which work with most make programs.  Development releases
  42.    and CVS snapshots contain things (like dependencies) which use
  43.    gmake's enhanced features, so gmake is necessary for development,
  44.    unless you give configure the "--disable-cvs-deps" option.  See the
  45.    section below for more information.
  46.  
  47.    You can check if you have GNU make installed on your system by
  48.    typing:
  49.  
  50.     % make -v                   [and if this doesn't work, try "gmake -v"]
  51.  
  52.    The output should include "GNU Make" somewhere.
  53.  
  54. 1. Prerequisites for the clients:
  55. =================================
  56.  
  57. The Freeciv client now comes in two different forms: one using
  58. the Athena widget library ("Xaw"), and one using the Gtk+ widget
  59. library.  The two forms have different prerequisites, explained
  60. separately below.  Your system will need to satisfy at least 
  61. one of the two sets of prerequisites.
  62.  
  63. Note that some systems have separate library packages for "runtime" 
  64. library support and for development support (for compiling programs 
  65. which use those libraries).  To compile Freeciv on such systems you 
  66. will need to have the appropriate "development" packages installed.
  67. (Attention Red Hat users: this means you! :-)
  68.  
  69. 1a. Prerequisites for the Xaw client:
  70. =====================================
  71.  
  72.  - X-Windows.
  73.  
  74.    The Freeciv Xaw client is an X-Windows program, so you'll need 
  75.    some way of running X-Windows programs.  (Most Unixes can...)
  76.  
  77.    If the Freeciv configuration program can't find X Windows on
  78.    your system, you may need to use the --x-includes=DIR
  79.    and --x-libraries=DIR options.
  80.  
  81.  - The "Athena" widget library.
  82.  
  83.    This library (also known as "Xaw") is usually supplied standard
  84.    with the rest of X Windows, but some platforms (HP-UX 10 for
  85.    example) only provide it in a limited form.
  86.  
  87.    To compile the client using the "Xaw" library add "--with-xaw" to
  88.    the Freeciv configure script.  See the section below for more 
  89.    information about the configure script.
  90.  
  91.    Many modern Unix systems (such as Linux) ship with a variant called
  92.    "Xaw3d", which has a more modern "3D" look.  If you'd like to try
  93.    compiling with Xaw3d, then add "--with-xaw3d" to the Freeciv
  94.    configure script.
  95.  
  96.    There are also other variants of Xaw, such as Nextaw.  Freeciv
  97.    does not work with these, although it should be possible to modify
  98.    it in the same fashion as for Xaw3d.  Another tool which may help
  99.    is called "xaw_wrappers", although how to use it is beyond the
  100.    scope of this file.
  101.  
  102.  - The "Xpm" library.
  103.  
  104.    This library is essential for icon and bitmap handling.  It is in
  105.    wide use, and is supplied standard on most modern Unix machines,
  106.    although it may be missing on traditional or older Unixes, eg,
  107.    Solaris.
  108.  
  109.    When you run the Freeciv configure script, it may be necessary for
  110.    you to use the "--with-xpm-prefix=DIR" command-line option, where
  111.    DIR is the name of the directory containing the "include" and "lib"
  112.    subdirectories where Xpm may be found.
  113.  
  114.    If the Freeciv configure process tells you that you don't have the
  115.    Xpm library installed, then it may be obtained from here:
  116.  
  117.      ftp://koala.inria.fr/pub/xpm/xpm-3.4k.tar.gz
  118.      ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
  119.  
  120.    Install it as you would any other package.  If you can't install
  121.    it in a standard system directory, then use the --with-xpm-prefix
  122.    option, as described above.
  123.  
  124. 1b. Prerequisites for the Gtk+ client:
  125. ======================================
  126.  
  127.  - The "Glib" utility library.
  128.  
  129.    The "Glib" utility library provides non-graphical functions used by the
  130.    "Gdk" and "Gtk+" libraries, like hash tables, single linked lists, etc.
  131.  
  132.    Freeciv requires a version of "Glib" greater or equal to 1.2.1.
  133.  
  134.    If the Freeciv configure process tells you that you don't have the
  135.    Glib library installed, then it may be obtained from here:
  136.  
  137.      ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.6.tar.gz
  138.  
  139.  - The "Gtk+" widget library.
  140.  
  141.    The "Gtk+" widget library was designed for the GIMP graphics program.
  142.    Since then it has gained popularity as an easy to program, free toolkit.
  143.    The "Gtk+" library comes with a companion library "Gdk" which provides an
  144.    abstraction layer over X Windows to implement basic drawing functions,
  145.    windows, clipping, etc.
  146.  
  147.    Freeciv requires a version of "Gtk+" greater or equal to 1.2.1.
  148.  
  149.    If the Freeciv configure process tells you that you don't have the
  150.    Gtk+ library installed, then it may be obtained from here:
  151.  
  152.      ftp://ftp.gtk.org/pub/gtk/v1.2/gtk+-1.2.6.tar.gz
  153.  
  154.  - The "Imlib" library.
  155.  
  156.    This library is essential for bitmap handling.  It is also
  157.    used by the GNOME project.
  158.  
  159.    Freeciv requires a version of "Imlib" greater or equal to 1.9.2.
  160.  
  161.    If the Freeciv configure process tells you that you don't have the
  162.    Imlib library installed, then it may be obtained from here:
  163.  
  164.      ftp://ftp.gnome.org/pub/GNOME/sources/imlib/imlib-1.9.7.tar.gz
  165.  
  166.    (Imlib documentation says that you require other libraries to use
  167.    certain features but none of those are needed by the Freeciv client).
  168.  
  169. If you are going to make these yourself, build and install them in the
  170. following order: Glib, Gtk+, Imlib.
  171.  
  172. 2. Generating the Makefile:
  173. ===========================
  174.  
  175. Before you compile Freeciv, you must generate a Makefile.  This
  176. makefile is configured to suit the features available on your
  177. machine.
  178.  
  179. This configuration is done using the GNU "configure" script.
  180.  
  181. To use "configure", "cd" into the top directory containing the Freeciv
  182. files, and type:
  183.  
  184.  % ./configure
  185.  
  186. This script will then attempt to determine the relevant features (and
  187. misfeatures!!) of your system.  It should print a page or two of
  188. diagnostics about your machine, then stop gracefully.
  189.  
  190. If you'd like help on the various options supported by the
  191. configure script, try the --help option, like this:
  192.  
  193.  % ./configure --help
  194.  
  195.   If you're compiling a development release or a CVS snapshot, and you
  196.   don't have both GNU make AND gcc, then pass configure the
  197.   "--disable-cvs-deps" option.  You'll especially need to do this if
  198.   you're using the Solaris cc and make programs.
  199.  
  200.   Note that if you do this, dependency checking is disabled.  If you
  201.   change any Freeciv .h files after this for any reason, you should do
  202.   a "make clean" before doing "make" to ensure everything is compiled
  203.   correctly.
  204.  
  205.   "--disable-cvs-deps" has no effect when run with a stable release.
  206.  
  207. By default the configure script will choose the Gtk+ client if the 
  208. required libraries are found, or else fall back to the Xaw client 
  209. (possibly using Xaw3d).  If you prefer to override this default, you
  210. can give configure one of the options "--with-xaw" or "--with-xaw3d".
  211.  
  212. If you want to change the compiler options, set the CFLAGS environment
  213. variable in your shell before running "configure".  For example:
  214.  
  215.  % CFLAGS="-O -g -pipe" ./configure   [for people using Bourne shell or bash]
  216.  
  217. or
  218.  
  219.  % setenv CFLAGS "-O -g -pipe"
  220.  % ./configure                        [for people using C shell or tcsh]
  221.  
  222. If you're tracking down a "core dump", we suggest that you use
  223. a value of "-g" for CFLAGS.
  224.  
  225. Note, the CFLAGS variable shouldn't be used to specify include and
  226. library directories.  Instead, use the proper configure command-line
  227. options for that.
  228.  
  229. If for some reason using "configure" gives you trouble, follow these steps:
  230.  
  231.   - Read the prerequisites section carefully, to determine if your
  232.     system meets all the requirements.
  233.  
  234.   - If you are compiling the Gtk+ version of the client: Ensure that
  235.     you have the Gtk+, Gdk, Glib & Imlib libraries installed on your
  236.     system.  Make sure that the configure script can find them,
  237.     either by installing them in the standard places on your system,
  238.     or by instructing the configure script with the appropriate
  239.     command-line options.  (See ./configure --help)
  240.  
  241.   - If you are compiling the Xaw version of the client: Ensure that
  242.     you have both the Xpm and Xaw libraries installed on your system.
  243.     Make sure that the configure script can find them, either by
  244.     installing them in the standard places on your system, or by
  245.     instructing the configure script with the appropriate command-line
  246.     options.  (See ./configure --help).
  247.  
  248.   - Let us know, so that we can fix it for the next release!!
  249.  
  250.     Send mail to the freeciv-dev mailing list, telling us what you did,
  251.     and what the result is.  It would be helpful to include the output
  252.     of the configure script, and the contents of the "config.status",
  253.     "config.cache" and "config.log" files, which are generated by the
  254.     configure script.
  255.  
  256.     You can find out about the freeciv-dev mailing list on our web
  257.     site, at http://www.freeciv.org
  258.  
  259. Please note that since Freeciv 1.7.2 we have stopped supporting 
  260. the use of Imake, and as of Freeciv 1.8.1 we no longer include 
  261. the Makefile.noimake fallback.
  262.  
  263. 3. Compiling Freeciv:
  264. =====================
  265.  
  266. If all has gone well previous to this point, then compiling Freeciv
  267. should be as easy as typing "make" (or preferably, "gmake").
  268.  
  269. If you have problems, read the file BUGS, and follow the advice 
  270. carefully.
  271.  
  272. After compilation, the important results are:
  273.  
  274.   - The "client/civclient" and "server/civserver" binaries.
  275.   - The "data/" directory, which contains the graphics and scenarios.
  276.   - The "po/" directory, which contains the localization files.
  277.   - The "civ" and "ser" scripts.
  278.  
  279. It's perfectly feasible to play Freeciv in this directory, without
  280. installing it.  If you do this, the "civ" and "ser" scripts may be
  281. useful, although they are not as necessary as they used to be.
  282.  
  283. See the README file for more information.
  284.  
  285. (However you cannot use Internationalization when playing Freeciv from
  286. the source directory; you must install Freeciv for that.)
  287.  
  288. 4. Installation:
  289. ================
  290.  
  291. Installing Freeciv involves installing the components mentioned in
  292. Section 3.  These need to be copied to a directory such as /usr/games,
  293. /usr/games/freeciv, /usr/local/freeciv, or some other suitable
  294. directory.
  295.  
  296. Typing "make install" should install everything correctly on
  297. your machine.  You may like to use the --prefix=DIR configure option
  298. to ensure the files get placed where you want.
  299.  
  300. When the Freeciv client and Freeciv server are run they both need to 
  301. find some files from the "data" directory.  By default freeciv looks
  302. in the following directories, in order, for any data files: the current 
  303. directory; the "data" subdirectory of the current directory; the 
  304. subdirectory ".freeciv" in the user's home directory; and the directory
  305. where the files are placed by running "make install".  You can override
  306. this search patch by setting the FREECIV_PATH environment variable, to
  307. a single directory or a list of directories separated by colons.
  308.  
  309. For example:
  310.  
  311. setenv FREECIV_PATH "/usr/games/freeciv/data:./data"
  312.    (for users of csh, tcsh, etc)
  313.  
  314. FREECIV_PATH="/usr/games/freeciv/data:./data"; export FREECIV_PATH
  315.    (for users of sh, bash, ksh, zsh, etc)
  316.  
  317. Finally, if you've choose to use the Xaw client and you're logged in as the
  318. 'root' user, you should consider copying the file data/Freeciv into your
  319. app-defaults directory. (Usually this is /usr/lib/X11/app-defaults).
  320.  
  321. ** END **
  322.