beta-0.89.2
[luatex.git] / source / m4 / kpse-freetype2-flags.m4
blobc00b24a24883a8286ea31fd5e808a3971b5da80b
1 # Public macros for the TeX Live (TL) tree.
2 # Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
4 # This file is free software; the copyright holder
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
8 # KPSE_FREETYPE2_FLAGS
9 # --------------------
10 # Provide the configure option '--with-system-freetype2' (if in the TL tree).
12 # Set the make variables FREETYPE2_INCLUDES and FREETYPE2_LIBS to the CPPFLAGS and
13 # LIBS required for the `-lfreetype' library in libs/freetype2/ of the TL tree.
14 AC_DEFUN([KPSE_FREETYPE2_FLAGS], [dnl
15 AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl
16 _KPSE_LIB_FLAGS([freetype2], [freetype], [],
17                 [-IBLD/libs/freetype2/freetype2],
18                 [BLD/libs/freetype2/libfreetype.a], [],
19                 [], [${top_builddir}/../../libs/freetype2/freetype2/ft2build.h])[]dnl
20 ]) # KPSE_FREETYPE2_FLAGS
22 # KPSE_FREETYPE2_OPTIONS([WITH-SYSTEM])
23 # -------------------------------------
24 AC_DEFUN([KPSE_FREETYPE2_OPTIONS], [_KPSE_LIB_OPTIONS([freetype2], [$1], [freetype-config])])
26 # KPSE_FREETYPE2_SYSTEM_FLAGS
27 # ---------------------------
28 AC_DEFUN([KPSE_FREETYPE2_SYSTEM_FLAGS], [dnl
29 AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
30 AC_CHECK_TOOL([FT2_CONFIG], [freetype-config], [false])[]dnl
31 if $FT2_CONFIG --ftversion >/dev/null 2>&1; then
32   FREETYPE2_INCLUDES=`$FT2_CONFIG --cflags`
33   FREETYPE2_LIBS=`$FT2_CONFIG --libs`
34 elif test "x$need_freetype2:$with_system_freetype2" = xyes:yes; then
35   AC_MSG_ERROR([did not find freetype-config required for system freetype2 library])
37 ]) # KPSE_FREETYPE2_SYSTEM_FLAGS