🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
4.8 KiB

  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.81 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. Say
  36. ./configure --help
  37. to see the list of possible configuration options and important
  38. environment variables. The ./configure script will detect some
  39. prerequisite system libraries (libpng, brotli, etc.) if their
  40. headers are available at the default locations.
  41. The following should work on all Unix systems where the `make'
  42. command invokes GNU Make:
  43. ./configure [options]
  44. make
  45. make install (as root)
  46. The default installation path is `/usr/local'. It can be changed
  47. with the `--prefix=<path>' option. Example:
  48. ./configure --prefix=/usr
  49. When using a different command to invoke GNU Make, use the MAKE
  50. variable. For example, if `gmake' is the command to use on your
  51. system, do something like:
  52. MAKE=gmake ./configure [options]
  53. gmake
  54. gmake install (as root)
  55. If this still doesn't work, there must be a problem with your
  56. system (e.g., you are using a very old version of GNU Make).
  57. For library identification, FreeType's `configure' script uses the
  58. `pkg-config' interface: Assuming it needs library `foo', it calls
  59. the `pkg-config' program to find information on library `foo',
  60. which in turn looks for a `foo.pc' file installed at the system.
  61. Some platforms, however, don't come with `pkg-support'; you then
  62. have to use environment variables as described by `configure
  63. --help'. Example:
  64. LIBPNG_CFLAGS="-I/path/to/libpng/include/directory" \
  65. LIBPNG_LIBS="-L/path/to/libpng/lib/directory" \
  66. configure ...
  67. It is possible to compile FreeType in a different directory.
  68. Assuming the FreeType source files in directory `/src/freetype' a
  69. compilation in directory `foo' works as follows:
  70. cd foo
  71. /src/freetype/configure [options]
  72. make
  73. make install
  74. 3.1 Interdependency with HarfBuzz
  75. .................................
  76. Note that there is a chicken-and-egg problem currently since the
  77. HarfBuzz library (used by the auto-hinter to improve support of
  78. OpenType fonts) depends on FreeType, which can be solved as
  79. follows in case HarfBuzz is not yet installed on your system.
  80. 1. Call FreeType's `configure' script with option
  81. `--without-harfbuzz', then compile and install FreeType.
  82. 2. Compile and install HarfBuzz.
  83. 3. Call FreeType's `configure' script without option
  84. `--without-harfbuzz' (after executing `make distclean'), then
  85. compile and install FreeType again.
  86. ----------------------------------------------------------------------
  87. Copyright (C) 2003-2021 by
  88. David Turner, Robert Wilhelm, and Werner Lemberg.
  89. This file is part of the FreeType project, and may only be used,
  90. modified, and distributed under the terms of the FreeType project
  91. license, LICENSE.TXT. By continuing to use, modify, or distribute
  92. this file you indicate that you have read the license and understand
  93. and accept it fully.
  94. --- end of INSTALL.UNIX ---