Debian Codegraph @

m4/kpse-harfbuzz-flags.m4

raw
1 # $Id: kpse-harfbuzz-flags.m4 78021 2026-02-20 23:21:53Z karl $
2 # Public macros for the TeX Live (TL) tree.
3 # Copyright 2015-2026 Karl Berry <[email protected]>
4 # Copyright 2012-2015 Peter Breitenlohner <[email protected]>
5 #
6 # This file is free software; the copyright holder
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # KPSE_HARFBUZZ_FLAGS
11 # -------------------
12 # Provide the configure options '--with-system-harfbuzz' (if in the TL tree).
13 #
14 # Set the make variables HARFBUZZ_INCLUDES and HARFBUZZ_LIBS to the
15 # CPPFLAGS and LIBS required for the `-lharfbuzz' library in
16 # libs/harfbuzz/ of the TL tree.
17 #
18 # We used to require icu here, but LuaTeX (2019) wants only harfbuzz,
19 # not icu, and everything in our tree that wants icu requires it
20 # explicitly. So no need.
21 #
22 AC_DEFUN([KPSE_HARFBUZZ_FLAGS], [dnl
23 AC_REQUIRE([KPSE_GRAPHITE2_FLAGS])[]dnl
24 _KPSE_LIB_FLAGS([harfbuzz], [harfbuzz], [],
25 [-IBLD/libs/harfbuzz/include],
26 [BLD/libs/harfbuzz/libharfbuzz.a], [], [],
27 [${top_builddir}/../../libs/harfbuzz/include/hb.h])[]dnl
28 ]) # KPSE_HARFBUZZ_FLAGS
29
30 # KPSE_HARFBUZZ_OPTIONS([WITH-SYSTEM])
31 # ------------------------------------
32 AC_DEFUN([KPSE_HARFBUZZ_OPTIONS], [dnl
33 _KPSE_LIB_OPTIONS([harfbuzz], [$1], [pkg-config])])
34
35 # KPSE_HARFBUZZ_SYSTEM_FLAGS
36 # --------------------------
37 # We used to ask for harfbuzz-icu here, that is, we called
38 # pkg-config harfbuzz-icu instead of just harfbuzz. But we never
39 # actually used the ICU support builtin to harfbuzz; Jonathan Kew had a
40 # theory many years ago (private email, 21 October 2009) to switch xetex
41 # to using that, and thus eliminate the need for xetex to link with icu,
42 # but it never came to fruition. So, since LuaTeX (2019) wants harfbuzz
43 # without icu, back to just harfbuzz. (And other programs use icu anyway.)
44 #
45 # In 2026: hitex and luatex are using symbols available only in
46 # libharfbuzz-subset, so ask for that instead of bare harfbuzz. The libs
47 # still include regular harfbuzz, and hopefully that will remain the case.
48 # $ pkg-config --libs harfbuzz-subset
49 # -lharfbuzz-subset -lharfbuzz
50 # Report and fix: https://tug.org/pipermail/tlbuild/2026q1/005946.html
51 AC_DEFUN([KPSE_HARFBUZZ_SYSTEM_FLAGS], [dnl
52 _KPSE_PKG_CONFIG_FLAGS([harfbuzz], [harfbuzz-subset])])