INSTALL 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. There are six basic steps to building and installing the
  2. GIMP:
  3. 1. You need to have installed GTK version 1.2.8 or better. Do not try
  4. to use the unstable GTK+ versions 1.3.x, it will not work.
  5. 2. You may want to install other third party libraries or programs that
  6. are needed for some of the available plugins: TIFF, PNG, JPEG, MPEG,
  7. perl, etc.
  8. 3. You may want to install the freefont package so you have the fonts
  9. most scripts use by default.
  10. Grab it from ftp://ftp.gimp.org/pub/gimp/fonts/
  11. 4. Configure the GIMP by running the `configure' script.
  12. You may want to pass some options to it, see below.
  13. 5. Build the GIMP by running `make'.
  14. 6. Install the GIMP by running `make install' or `make install-strip'.
  15. 7. Optionally install the separate gimp-data-extras package.
  16. Please make sure you don't have any old GTK, jpeg, etc. libraries lying
  17. around on your system, otherwise configure will fail to find the new
  18. ones.
  19. Generic instructions for configuring and compiling auto-configured
  20. packages are included below. Here is an illustration of commands that
  21. might be used to build and install the GIMP. The actual configuration,
  22. compilation and installation output is not shown.
  23. % tar xvfz gimp-1.2.x.tar.gz # unpack the sources
  24. % cd gimp-1.2.x # change to the toplevel directory
  25. % ./configure # run the `configure' script
  26. % make # build the GIMP
  27. % make install # install the GIMP
  28. The `configure' script examines your system, and adapts the GIMP to
  29. run on it. The script has many options, some of which are described in
  30. the generic instructions included at the end of this file. All of the
  31. options can be listed using the command `./configure --help'. There
  32. are five commands special options the GIMP `configure' script
  33. recognizes. These are:
  34. 1. --enable-shared and --disable-shared. This option affects whether
  35. shared libraries will be built or not. Shared libraries provide
  36. for much smaller executables, but they are difficult to debug
  37. with. If you are interested in doing development, it is probably
  38. wise to specify `--disable-shared'. The default is to enable
  39. shared libraries.
  40. 2. --enable-debug and --disable-debug. This option causes the build
  41. process to compile with debugging enabled. If debugging is
  42. disabled, the GIMP will instead be compiled with optimizations turned
  43. on. The default is for debugging to be disabled. NOTE: This
  44. option is intended primarily as a convenience for developers.
  45. 3. --enable-ansi and --disable-ansi. This option causes stricter
  46. ANSI C checking to be performed when compiling with GCC. The
  47. default is for strict checking to be disabled. NOTE: This option
  48. is intended primarily as a convenience for developers.
  49. 4. --enable-gimpdir=DIR. This option changes the default directory
  50. the gimp uses to search for its configuration files from ~/.gimp-1.2
  51. (the directory .gimp-1.2 in the users home directory) to DIR.
  52. 5. --disable-print. The print plug-in requires a recent version of
  53. libgimpprint. If you don't have it already installed, download
  54. it from http://gimp-print.sourceforge.net/. If you want to compile
  55. GIMP without support for printing, use the --disable-print option.
  56. 6. --enable-perl and --disable-perl. The perl extension does not build
  57. on all systems. If you experience problems use --disable-perl
  58. and gimp will not even try to built it. The perl extension does
  59. not usually respect the normal configure prefix but uses perl's
  60. instead. You can force it to use a different prefix by giving it as
  61. an argument to the --enable-perl option (--enable-perl=/my/prefix),
  62. however, you will usually have to set PERL5LIB or equivalent
  63. environment variables, otherwise gimp-perl will not run or you will
  64. get many errors on startup. See README.perl for even finer grained
  65. control about installation paths (and distribution making).
  66. 7. --enable-nls and --disable-nls. This option changes whether to build
  67. GIMP with or without localisation support. This option is enabled by
  68. default. If you'd like to enjoy GIMP in your native language, assuming
  69. the necessary catalogs are available, then leave this option on. If
  70. you'd like to have an English GIMP in every case then turn this option
  71. off; this will also decrease the binary size by a few bits.
  72. 8. --with-mp. This options control whether to build GIMP with or without
  73. support for multiple processors. This option is off by default. If you
  74. do have multiply processors and run GIMP with an OS supporting them
  75. you will like to enable this features to use all of your horsepower.
  76. Enabling it on singleprocessor systems won't harm but cause a bit
  77. processing overhead.
  78. 9. --with-sendmail=[]. This option is used to tell GIMP where to find
  79. this command. Normally this options don't have to be used because
  80. configure tries to find it in the usual places.
  81. The `make' command builds several things:
  82. - The libraries `libgimp/libgimp.la', `libgimp/libgimpi.la' and
  83. `libgimp/libgimpui.la'. The `.la' suffix is used by libtool, the
  84. program used to ease the compilation of shared libraries on
  85. different platforms.
  86. - The plug-in programs in the `plug-ins' subdirectory.
  87. - The main GIMP program in `app/gimp'.
  88. The `make install' commands installs the gimp header files associated
  89. with libgimp and the libgimp library, the plug-ins, some data files and
  90. the GIMP executable. After running `make install' and assuming the build
  91. process was successful you should be able to run `gimp'.
  92. Using `make install-strip' will remove unneeded debugging cruft and
  93. unused functions from the binaries which will reduce the size of the
  94. GIMP and its plug-ins.
  95. When ./configure fails
  96. ======================
  97. 'configure' tries to compile and run a short GTK program. There are
  98. several reasons why this might fail:
  99. * The 'gtk-config' script installed with GTK could not be found.
  100. (This script is used to get information about where GTK is
  101. installed.)
  102. Fix: Either make sure that this program is in your path, or set
  103. the environment variable GTK_CONFIG to the full pathname to
  104. this program before running configure.
  105. * The GTK libraries were not found at run time. The details
  106. of how to fix this problem will depend on the system:
  107. Fix: On Linux and other systems using ELF libraries, add the
  108. directory to /etc/ld.so.conf or to the environment variable
  109. LD_LIBRARY_PATH, and run 'ldconfig'.
  110. On other systems, it may be necessary to encode this path
  111. into the executable, by setting the LDFLAGS environment variable
  112. before running configure. For example:
  113. LDFLAGS="-R/home/joe/lib" ./configure
  114. or
  115. LDFLAGS="-Wl,-rpath -Wl,/home/joe/lib" ./configure
  116. * An old version of the GTK libraries was found instead of
  117. your newly installed version. This commonly happens if a
  118. binary package of GTK was previously installed on your system,
  119. and you later compiled GTK from source.
  120. Fix: remove the old libraries and include files.
  121. * The perl extension does not detect all combinations of libraries and
  122. packages it needs to built properly, causing compilation to stop
  123. prematurely.
  124. Fix: use configure with the "--disable-perl" switch or install perl
  125. (version>=5.005) and the Perl-Gtk-interface.
  126. A detailed log of the ./configure output is written to the file
  127. config.log. This may help diagnose problems.
  128. If you are sure of what you're doing, you can bypass the sanity check and
  129. just go by what gtk-config by using the --disable-gtktest option. Please
  130. only use this in dire circumstances.
  131. After fixing a problem, it is safest to delete the file 'config.cache'
  132. before re-running ./configure.
  133. When ./configure fails on plug-ins
  134. ==================================
  135. There are some GIMP plug-ins that need additional third-party libraries
  136. installed on your system. For example to compile the plug-ins that load
  137. and save JPEG, PNG or TIFF files you need the related libraries and header
  138. files installed, otherwise you'll get a message that plugin xyz will not
  139. be build.
  140. If you are sure that those libraries are correctly installed, but configure
  141. fails to detect them, the following might help:
  142. Set your LDFLAGS environment variable to look for the library in a certain
  143. place, e.g. if you are working in a bash shell you would say:
  144. export LDFLAGS="-L<path_to_library> -L<path_to_another_one>"
  145. before you run configure.
  146. Set your CPPFLAGS environment variable to look for the header file in a
  147. certain place, e.g. if you are working in a bash shell you would say:
  148. export CPPFLAGS="-I<path_to_header_file> -I<path_to_another_one>"
  149. before you run configure.
  150. It's wise to remove the file 'config.cache' before re-running configure.
  151. Generic Instructions for Building Auto-Configured Packages
  152. ==========================================================
  153. To compile this package:
  154. 1. Configure the package for your system. In the directory that this
  155. file is in, type `./configure'. If you're using `csh' on an old
  156. version of System V, you might need to type `sh configure' instead to
  157. prevent `csh' from trying to execute `configure' itself.
  158. The `configure' shell script attempts to guess correct values for
  159. various system-dependent variables used during compilation, and
  160. creates the Makefile(s) (one in each subdirectory of the source
  161. directory). In some packages it creates a C header file containing
  162. system-dependent definitions. It also creates a file `config.status'
  163. that you can run in the future to recreate the current configuration.
  164. Running `configure' takes a minute or two.
  165. To compile the package in a different directory from the one
  166. containing the source code, you must use GNU make. `cd' to the
  167. directory where you want the object files and executables to go and
  168. run `configure' with the option `--srcdir=DIR', where DIR is the
  169. directory that contains the source code. Using this option is
  170. actually unnecessary if the source code is in the parent directory of
  171. the one in which you are compiling; `configure' automatically checks
  172. for the source code in `..' if it does not find it in the current
  173. directory.
  174. By default, `make install' will install the package's files in
  175. /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
  176. an installation prefix other than /usr/local by giving `configure' the
  177. option `--prefix=PATH'.
  178. You can specify separate installation prefixes for machine-specific
  179. files and machine-independent files. If you give `configure' the
  180. option `--exec-prefix=PATH', the package will use PATH as the prefix
  181. for installing programs and libraries. Normally, all files are
  182. installed using the same prefix.
  183. `configure' ignores any other arguments that you give it.
  184. If your system requires unusual options for compilation or linking
  185. that `configure' doesn't know about, you can give `configure' initial
  186. values for some variables by setting them in the environment. In
  187. Bourne-compatible shells, you can do that on the command line like
  188. this:
  189. CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
  190. The `make' variables that you might want to override with environment
  191. variables when running `configure' are:
  192. (For these variables, any value given in the environment overrides the
  193. value that `configure' would choose:)
  194. CC C compiler program.
  195. Default is `cc', or `gcc' if `gcc' is in your PATH.
  196. INSTALL Program to use to install files.
  197. Default is `install' if you have it, `cp' otherwise.
  198. INCLUDEDIR Directory for `configure' to search for include files.
  199. Default is /usr/include.
  200. (For these variables, any value given in the environment is added to
  201. the value that `configure' chooses:)
  202. DEFS Configuration options, in the form '-Dfoo -Dbar ...'
  203. LIBS Libraries to link with, in the form '-lfoo -lbar ...'
  204. If you need to do unusual things to compile the package, we encourage
  205. you to teach `configure' how to do them and mail the diffs to the
  206. address given in the README so we can include them in the next
  207. release.
  208. 2. Type `make' to compile the package.
  209. 3. Type `make install' to install programs, data files, and
  210. documentation.
  211. 4. You can remove the program binaries and object files from the
  212. source directory by typing `make clean'. To also remove the
  213. Makefile(s), the header file containing system-dependent definitions
  214. (if the package uses one), and `config.status' (all the files that
  215. `configure' created), type `make distclean'.
  216. The file `configure.in' is used as a template to create `configure' by
  217. a program called `autoconf'. You will only need it if you want to
  218. regenerate `configure' using a newer version of `autoconf'.