summaryrefslogtreecommitdiff
path: root/Build/source/m4/kpse-harfbuzz-flags.m4
blob: b51690d8ee6505e44bb11ff2a8913a6ba0e2c5f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Public macros for the TeX Live (TL) tree.
# Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holder
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# KPSE_HARFBUZZ_FLAGS
# -------------------
# Provide the configure options '--with-system-harfbuzz' (if in the TL tree).
#
# Set the make variables HARFBUZZ_INCLUDES and HARFBUZZ_LIBS to the CPPFLAGS and
# LIBS required for the `-lharfbuzz' library in libs/harfbuzz/ of the TL tree.
AC_DEFUN([KPSE_HARFBUZZ_FLAGS],
[AC_REQUIRE([KPSE_FREETYPE2_FLAGS])[]dnl
AC_REQUIRE([KPSE_GRAPHITE2_FLAGS])[]dnl
AC_REQUIRE([KPSE_ICU_FLAGS])[]dnl
_KPSE_LIB_FLAGS([harfbuzz], [harfbuzz], [],
                [-IBLD/libs/harfbuzz/include], [BLD/libs/harfbuzz/libharfbuzz.a], [],
                [], [${top_builddir}/../../libs/harfbuzz/include/hb.h])[]dnl
]) # KPSE_HARFBUZZ_FLAGS

# KPSE_HARFBUZZ_OPTIONS([WITH-SYSTEM])
# ------------------------------------
AC_DEFUN([KPSE_HARFBUZZ_OPTIONS],
[m4_ifval([$1],
          [AC_ARG_WITH([system-harfbuzz],
                       AS_HELP_STRING([--with-system-harfbuzz],
                                      [use installed harfbuzz headers and library
                                       (requires pkg-config)]))])[]dnl
]) # KPSE_HARFBUZZ_OPTIONS

# KPSE_HARFBUZZ_SYSTEM_FLAGS
# --------------------------
AC_DEFUN([KPSE_HARFBUZZ_SYSTEM_FLAGS],
[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
if $PKG_CONFIG harfbuzz --atleast-version=0.9.10; then
  HARFBUZZ_INCLUDES=`$PKG_CONFIG harfbuzz --cflags`
  HARFBUZZ_LIBS=`$PKG_CONFIG harfbuzz --libs`
elif test "x$need_harfbuzz:$with_system_harfbuzz" = xyes:yes; then
  AC_MSG_ERROR([did not find harfbuzz-0.9.10 or better])
fi
]) # KPSE_HARFBUZZ_SYSTEM_FLAGS