1 # Private macros for the TeX Live (TL) tree.
2 # Copyright (C) 2009-2015 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.
10 # AC_DEFUN'ed so it can enforce inclusion of this file.
11 AC_DEFUN([KPSE_WEB2C_PREPARE], [])
13 # KPSE_WITH_XTEX(PROG, BUILD-OR-NO, SYNC-OR-NO, TEXT, REQUIRED-LIBS)
14 # ------------------------------------------------------------------
15 # Provide and normalize the configure options --enable-*tex.
16 m4_define([KPSE_WITH_XTEX], [dnl
18 AS_HELP_STRING([--]m4_if([$2], [yes], [dis], [en])[able-$1],
20 [do not ])[compile and install $4],
26 AC_ARG_ENABLE([$1-synctex],
27 AS_HELP_STRING([--]m4_if([$3], [yes], [dis], [en])[able-$1-synctex],
28 [build $4 with]m4_if([$3], [yes], [out])[ SyncTeX support],
29 m4_eval(kpse_indent_26+2)))[]dnl
32 test "x$enable_web2c:$enable_$1" = xyes:yes && {
33 AC_FOREACH([Kpse_Lib], [$5], [ need_[]AS_TR_SH(Kpse_Lib)=yes
38 # KPSE_XTEX_COND(PROG, BUILD-OR-NO, SYNC-OR-NO, TEXT, REQUIRED-LIBS)
39 # ------------------------------------------------------------------
40 # Normalize --enable-*tex-synctex configure option and build conditionals.
41 m4_define([KPSE_XTEX_COND], [dnl
42 AM_CONDITIONAL(AS_TR_CPP($1), [test "x$enable_$1" = xyes])[]dnl
44 AS_CASE([$enable_native_texlive_build:$enable_$1_synctex],
45 [yes:$3 | no:yes | no:no], ,
46 [AS_IF([test -z "$enable_$1_synctex"],
47 [AC_MSG_NOTICE([Assuming `--enable-$1-synctex=$3'])],
48 [AC_MSG_WARN([Enforcing `--enable-$1-synctex=$3' (native TeX Live build)])])
49 enable_$1_synctex=$3])
50 AM_CONDITIONAL(AS_TR_CPP($1)[_SYNCTEX], [test "x$enable_$1_synctex" = xyes])[]dnl
54 # KPSE_WITH_XMF(PROG, BUILD-OR-NO, NOWIN-OR-NO, TEXT, REQUIRED-LIBS)
55 # ------------------------------------------------------------------
56 # Provide and normalize the configure options --enable-mf*.
57 m4_define([KPSE_WITH_XMF], [dnl
59 AS_HELP_STRING([--]m4_if([$2], [yes], [dis], [en])[able-$1],
61 [do not ])[compile and install $4],
67 AC_ARG_ENABLE([$1-nowin],
68 AS_HELP_STRING([--]m4_if([$3], [yes], [dis], [en])[able-$1-nowin],
70 [do not ])[build a separate non-window-capable $4],
71 m4_eval(kpse_indent_26+2)))[]dnl
72 AS_CASE([$enable_$1_nowin],
77 test "x$enable_web2c:$enable_$1" = xyes:yes && {
78 AC_FOREACH([Kpse_Lib], [$5], [ need_[]AS_TR_SH(Kpse_Lib)=yes
83 # KPSE_XMF_COND(PROG, BUILD-OR-NO, NOWIN-OR-NO, TEXT, REQUIRED-LIBS)
84 # ------------------------------------------------------------------
85 # Build conditionals and adjust with_x.
86 m4_define([KPSE_XMF_COND], [dnl
87 AM_CONDITIONAL(AS_TR_CPP($1), [test "x$enable_$1" != xno])[]dnl
88 test "x$enable_$1" = xyes && : ${with_x=yes}
90 AM_CONDITIONAL(AS_TR_CPP($1)[N], [test "x$enable_$1_nowin" != xno])[]dnl
94 # KPSE_WITH_MFWIN(WINDOW, DEFINE, TEXT)
95 # -------------------------------------
96 # Provide configure options --enable-*win.
97 m4_define([KPSE_WITH_MFWIN], [dnl
98 AC_ARG_ENABLE([$1win],
99 AS_HELP_STRING([--enable-$1win],
100 [include $3 window support],
101 m4_eval(kpse_indent_26+2)))[]dnl
104 # KPSE_MFWIN_DEFINE(WINDOW, DEFINE, TEXT)
105 # ---------------------------------------
106 # Defines for enable-*win
107 m4_define([KPSE_MFWIN_DEFINE], [dnl
108 AS_IF([test "x$enable_$1win" = xyes],
109 [AC_DEFINE([$2WIN], ,
110 [metafont: Define to include $3 window support.])])
111 ]) # KPSE_MFWIN_DEFINE