INSTALL.UNIX 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. For builds with `cmake' please check file `CMakeLists.txt'; this
  21. is a contributed file not directly supported by the FreeType team.
  22. 2. Regenerate the configure script if needed
  23. --------------------------------------------
  24. This only applies if you are building a git snapshot or checkout,
  25. *not* if you grabbed the sources of an official release.
  26. You need to invoke the `autogen.sh' script in the top-level
  27. directory in order to create the `configure' script for your
  28. platform. Normally, this simply means typing:
  29. sh autogen.sh
  30. In case of problems, you may need to install or upgrade Automake,
  31. Autoconf or Libtool. See README.git in the top-level directory
  32. for more information.
  33. 3. Build and install the library
  34. --------------------------------
  35. The following should work on all Unix systems where the `make'
  36. command invokes GNU Make:
  37. ./configure [options]
  38. make
  39. make install (as root)
  40. The default installation path is `/usr/local'. It can be changed
  41. with the `--prefix=<path>' option. Example:
  42. ./configure --prefix=/usr
  43. When using a different command to invoke GNU Make, use the MAKE
  44. variable. For example, if `gmake' is the command to use on your
  45. system, do something like:
  46. MAKE=gmake ./configure [options]
  47. gmake
  48. gmake install (as root)
  49. If this still doesn't work, there must be a problem with your
  50. system (e.g., you are using a very old version of GNU Make).
  51. It is possible to compile FreeType in a different directory.
  52. Assuming the FreeType source files in directory `/src/freetype' a
  53. compilation in directory `foo' works as follows:
  54. cd foo
  55. /src/freetype/configure [options]
  56. make
  57. make install
  58. 3.1 Interdependency with HarfBuzz
  59. .................................
  60. Note that there is a chicken-and-egg problem currently since the
  61. HarfBuzz library (used by the auto-hinter to improve support of
  62. OpenType fonts) depends on FreeType, which can be solved as
  63. follows in case HarfBuzz is not yet installed on your system.
  64. 1. Call FreeType's `configure' script with option
  65. `--without-harfbuzz', then compile and install FreeType.
  66. 2. Compile and install HarfBuzz.
  67. 3. Call FreeType's `configure' script without option
  68. `--without-harfbuzz' (after executing `make distclean'), then
  69. compile and install FreeType again.
  70. ----------------------------------------------------------------------
  71. Copyright 2003-2017 by
  72. David Turner, Robert Wilhelm, and Werner Lemberg.
  73. This file is part of the FreeType project, and may only be used,
  74. modified, and distributed under the terms of the FreeType project
  75. license, LICENSE.TXT. By continuing to use, modify, or distribute
  76. this file you indicate that you have read the license and understand
  77. and accept it fully.
  78. --- end of INSTALL.UNIX ---