| 1 |
# Public macros for the TeX Live (TL) tree - freetype2. |
| 2 |
# Copyright 2015-2019 Karl Berry <[email protected]> |
| 3 |
# Copyright 2009-2014 Peter Breitenlohner <[email protected]> |
| 4 |
# |
| 5 |
# This file is free software; the copyright holder |
| 6 |
# gives unlimited permission to copy and/or distribute it, |
| 7 |
# with or without modifications, as long as this notice is preserved. |
| 8 |
|
| 9 |
# KPSE_FREETYPE2_FLAGS |
| 10 |
# -------------------- |
| 11 |
# Provide the configure option '--with-system-freetype2' (if in the TL tree). |
| 12 |
# |
| 13 |
# Set the make variables FREETYPE2_INCLUDES and FREETYPE2_LIBS to the |
| 14 |
# CPPFLAGS and LIBS required for the `-lfreetype' library in |
| 15 |
# libs/freetype2/ of the TL tree. |
| 16 |
# |
| 17 |
AC_DEFUN([KPSE_FREETYPE2_FLAGS], [dnl |
| 18 |
AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl |
| 19 |
_KPSE_LIB_FLAGS([freetype2], [freetype], [], |
| 20 |
[-IBLD/libs/freetype2/freetype2], |
| 21 |
[BLD/libs/freetype2/libfreetype.a], [], [], |
| 22 |
[${top_builddir}/../../libs/freetype2/freetype2/ft2build.h])[]dnl |
| 23 |
]) # KPSE_FREETYPE2_FLAGS |
| 24 |
|
| 25 |
# KPSE_FREETYPE2_OPTIONS([WITH-SYSTEM]) |
| 26 |
# ------------------------------------- |
| 27 |
AC_DEFUN([KPSE_FREETYPE2_OPTIONS], [dnl |
| 28 |
_KPSE_LIB_OPTIONS([freetype2], [$1], [freetype-config])]) |
| 29 |
|
| 30 |
# KPSE_FREETYPE2_SYSTEM_FLAGS |
| 31 |
# --------------------------- |
| 32 |
# try pkg-config if freetype-config isn't available. |
| 33 |
AC_DEFUN([KPSE_FREETYPE2_SYSTEM_FLAGS], [dnl |
| 34 |
AC_REQUIRE([AC_CANONICAL_HOST])[]dnl |
| 35 |
AC_CHECK_TOOL([FT2_CONFIG], [freetype-config], [false])[]dnl |
| 36 |
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config], [false])[]dnl |
| 37 |
if $FT2_CONFIG --ftversion >/dev/null 2>&1; then |
| 38 |
FREETYPE2_INCLUDES=`$FT2_CONFIG --cflags` |
| 39 |
FREETYPE2_LIBS=`$FT2_CONFIG --libs` |
| 40 |
elif $PKG_CONFIG --libs freetype2 >/dev/null 2>&1; then |
| 41 |
FREETYPE2_INCLUDES=`$PKG_CONFIG --cflags freetype2` |
| 42 |
FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2` |
| 43 |
elif test "x$need_freetype2:$with_system_freetype2" = xyes:yes; then |
| 44 |
AC_MSG_ERROR([did not find freetype-config required for system freetype2 library]) |
| 45 |
fi |
| 46 |
]) # KPSE_FREETYPE2_SYSTEM_FLAGS |