INSTALL.UNIX 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. This document contains instructions on how to build the FreeType
  2. library on Unix systems. This also works for emulations like Cygwin
  3. or MSys on Win32:
  4. 1. Ensure that you are using GNU Make
  5. -------------------------------------
  6. The FreeType build system _exclusively_ works with GNU Make. You
  7. will not be able to compile the library with the instructions
  8. below using any other alternative (including BSD Make).
  9. Check that you have GNU make by running the command:
  10. make -v
  11. This should dump some text that begins with:
  12. GNU Make <version number>
  13. Copyright (C) <year> Free Software Foundation Inc.
  14. Note that version 3.80 or higher is *required* or the build will
  15. fail.
  16. It is also fine to have GNU Make under another name (e.g. 'gmake')
  17. if you use the MAKE variable as described below.
  18. As a special exception, 'makepp' can also be used to build
  19. FreeType 2. See the file docs/MAKEPP for details.
  20. 2. Regenerate the configure script if needed
  21. --------------------------------------------
  22. This only applies if you are building a git snapshot or checkout,
  23. *not* if you grabbed the sources of an official release.
  24. You need to invoke the `autogen.sh' script in the top-level
  25. directory in order to create the `configure' script for your
  26. platform. Normally, this simply means typing:
  27. sh autogen.sh
  28. In case of problems, you may need to install or upgrade Automake,
  29. Autoconf or Libtool. See README.git in the top-level directory
  30. for more information.
  31. 3. Build and install the library
  32. --------------------------------
  33. The following should work on all Unix systems where the `make'
  34. command invokes GNU Make:
  35. ./configure [options]
  36. make
  37. make install (as root)
  38. The default installation path is `/usr/local'. It can be changed
  39. with the `--prefix=<path>' option. Example:
  40. ./configure --prefix=/usr
  41. When using a different command to invoke GNU Make, use the MAKE
  42. variable. For example, if `gmake' is the command to use on your
  43. system, do something like:
  44. MAKE=gmake ./configure [options]
  45. gmake
  46. gmake install (as root)
  47. If this still doesn't work, there must be a problem with your
  48. system (e.g., you are using a very old version of GNU Make).
  49. It is possible to compile FreeType in a different directory.
  50. Assuming the FreeType source files in directory `/src/freetype' a
  51. compilation in directory `foo' works as follows:
  52. cd foo
  53. /src/freetype/configure [options]
  54. make
  55. make install
  56. 3.1 Interdependency with HarfBuzz
  57. .................................
  58. Note that there is a chicken-and-egg problem currently since the
  59. HarfBuzz library (used by the auto-hinter to improve support of
  60. OpenType fonts) depends on FreeType, which can be solved as
  61. follows in case HarfBuzz is not yet installed on your system.
  62. 1. Call FreeType's `configure' script with option
  63. `--without-harfbuzz', then compile and install FreeType.
  64. 2. Compile and install HarfBuzz.
  65. 3. Call FreeType's `configure' script without option
  66. `--without-harfbuzz' (after executing `make distclean'), then
  67. compile and install FreeType again.
  68. ----------------------------------------------------------------------
  69. Copyright 2003-2016 by
  70. David Turner, Robert Wilhelm, and Werner Lemberg.
  71. This file is part of the FreeType project, and may only be used,
  72. modified, and distributed under the terms of the FreeType project
  73. license, LICENSE.TXT. By continuing to use, modify, or distribute
  74. this file you indicate that you have read the license and understand
  75. and accept it fully.
  76. --- end of INSTALL.UNIX ---