Debian Codegraph @

m4/kpse-xpdf-flags.m4

raw
1 # $Id: kpse-xpdf-flags.m4 55138 2020-05-14 17:47:47Z karl $
2 # Public macros for the TeX Live (TL) tree.
3 # Copyright 2015-2020 Karl Berry <[email protected]>
4 # Copyright 2009-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 # Support for our semi-homegrown libs/xpdf library. This is derived
11 # from xpdf source code, but xpdf does not distribute it as a library.
12 # It is used by pdftex (and nothing else) to read PDF images.
13 # Other engines use the semi-homegrown pplib library (q.v.) for that.
14
15 # The well-known poppler library is also originally derived from xpdf
16 # source code, but has been greatly revised and extended. TL used to
17 # (sort of) support poppler as the system xpdf, but after the TL 2020
18 # release we dropped this, because we switched XeTeX to use pplib, and
19 # nothing else used poppler. (No engines ever used poppler to generate
20 # their PDF output).
21 #
22 # poppler is aggressively developed, with requirements for new compilers
23 # and language versions. That's fine for them, but since we don't need
24 # anything new, it has become too time-consuming and problematic to
25 # continue to support it in the TL sources, when we don't have any
26 # requirement for it.
27
28 # KPSE_XPDF_FLAGS
29 # ---------------
30 # Provide the configure option '--with-system-xpdf' (if in the TL tree).
31 #
32 # Set the make variables XPDF_INCLUDES and XPDF_LIBS to the CPPFLAGS and
33 # LIBS required for the `-lxpdf' library in libs/xpdf/ of the TL tree.
34 AC_DEFUN([KPSE_XPDF_FLAGS],
35 [AC_REQUIRE([KPSE_CHECK_WIN32])[]dnl
36 _KPSE_LIB_FLAGS([xpdf], [xpdf], [],
37 [-DPDF_PARSER_ONLY -IBLD/libs/xpdf -IBLD/libs/xpdf/goo -IBLD/libs/xpdf/xpdf],
38 [BLD/libs/xpdf/libxpdf.a], [],
39 [], [${top_builddir}/../../libs/xpdf/xpdf/Stream.h])[]dnl
40 test "x$kpse_cv_have_win32" = xno || XPDF_LIBS="$XPDF_LIBS -lgdi32"
41 ]) # KPSE_XPDF_FLAGS
42
43 # KPSE_XPDF_OPTIONS([WITH-SYSTEM]) -- as above, no more poppler.
44 # Keep this macro's expansion as a valid shell command, though.
45 # since it is used internally in the configure scripts.
46 # --------------------------------
47 AC_DEFUN([KPSE_XPDF_OPTIONS], [dnl
48 : "kpse_xpdf_options - no-op"
49 ]) # KPSE_XPDF_OPTIONS
50 dnl [m4_ifval([$1],
51 dnl [AC_ARG_WITH([system-xpdf],
52 dnl AS_HELP_STRING([--with-system-xpdf],
53 dnl [use installed poppler headers and library instead of xpdf library from TL (requires pkg-config)]))])[]dnl
54 dnl ]) # KPSE_XPDF_OPTIONS
55
56 # KPSE_XPDF_SYSTEM_FLAGS -- as above, no more poppler.
57 # ----------------------
58 AC_DEFUN([KPSE_XPDF_SYSTEM_FLAGS], [dnl
59 : "kpse_xpdf_system_flags - no-op"
60 ]) # KPSE_XPDF_SYSTEM_FLAGS
61 dnl _KPSE_PKG_CONFIG_FLAGS([xpdf], [poppler], [0.12])
62 dnl POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
63 dnl XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES"
64 dnl ]) # KPSE_XPDF_SYSTEM_FLAGS