GIF89a;
Mass Deface
, enabled by default.
# It replaced individual copies of this code in the above macros in 1.1.
# Currently assumes encoding names will be all upper-case - add m4_toupper
# calls if this is not true in the future.
AC_DEFUN([XORG_FONT_CHECK_ENCODING],[
AC_ARG_ENABLE(m4_tolower($1),
AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)),
[Build $1 fonts (default: yes)]),
[AS_TR_SH($1)=$enableval])
AC_MSG_CHECKING([whether to build $1 fonts])
AC_MSG_RESULT($[AS_TR_SH($1)])
AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes])
]) # XORG_FONT_CHECK_ENCODING
# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....)
# -----------------------------------------------------
# Minimum version: 1.1.0
# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once.
# Add a shorthand --enable/disable-all-encodings option.
AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[
AC_ARG_ENABLE([all-encodings],
AS_HELP_STRING([--disable-all-encodings],
[Disable building of all font encodings]),
[m4_foreach_w([enc], [$1], [
AS_TR_SH(enc)=$enableval
])],
[m4_foreach_w([enc], [$1], [
AS_TR_SH(enc)=yes
])])
m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)])
]) # XORG_FONT_CHECK_ENCODING_LIST
# XORG_FONT_REQUIRED_PROG(VARNAME, progname)
# ------------------------------------------
# Minimum version: 1.1.0
#
# Simple wrapper around AC_PATH_PROG that errors if not found
#
AC_DEFUN([XORG_FONT_REQUIRED_PROG],[
AC_PATH_PROG($1, $2)
if test x"$$1" = x; then
AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.])
fi
])
# XORG_FONT_FCCACHE()
# -------------------
# Minimum version: 1.1.0
#
# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
# Set RUN_FCCACHE to a rule suitable for substituting into a makefile
# to run fc-cache if found and not installing to $DESTDIR and not
# cross-compiling
#
# fc-cache is optional, not required, and should be skipped when making
# packages (installing to $DESTDIR) or cross-compiling
#
AC_DEFUN([XORG_FONT_FCCACHE],[
AC_PATH_PROG(FCCACHE, fc-cache)
FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then
RUN_FCCACHE="${FCCACHE_WARN}"
else
RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else'
RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)"
fi
AC_SUBST([RUN_FCCACHE])
])
# XORG_FONT_MKFONTDIR()
# -------------------
# Minimum version: 1.3.0
#
# Set MKFONTDIR to path to mkfontdir.
#
# If cross-compiling, and if mkdir is not found, use a shell command
# which warns mkfontdir needs to be run on the target
#
# If not cross-compiling, mkfontdir must be found
#
AC_DEFUN([XORG_FONT_MKFONTDIR],[
if test x"$cross_compiling" != x"no" ; then
AC_PATH_PROG(MKFONTDIR, mkfontdir, "")
MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"'
if test x"$MKFONTDIR" = x; then
MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'"
fi
else
XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
fi
AC_SUBST([MKFONTDIR])
])
# XORG_FONT_COMMON_UTILS()
# ------------------------
# Minimum version: 1.1.0
#
# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types
AC_DEFUN([XORG_FONT_COMMON_UTILS],[
XORG_FONT_FCCACHE
XORG_FONT_MKFONTDIR
])
# XORG_FONT_SCALED_UTILS()
# ------------------------
# Minimum version: 1.1.0
#
# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts
# (TrueType, OpenType, Type1)
AC_DEFUN([XORG_FONT_SCALED_UTILS],[
XORG_FONT_COMMON_UTILS
XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale)
])
# XORG_FONT_BDF_UTILS()
# ---------------------
# Minimum version: 1.1.0
#
# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts
# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the
# PCF output files created by bdftopcf
AC_DEFUN([XORG_FONT_BDF_UTILS],[
XORG_FONT_COMMON_UTILS
XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf)
XORG_FONT_CHECK_COMPRESSION
])
# XORG_FONT_CHECK_COMPRESSION()
# -----------------------------
# Minimum version: 1.1.0
#
# Offer a --with-compression flag to control what compression method is
# used for pcf font files. Offers all the methods currently supported
# by libXfont, including no compression.
AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
AC_MSG_CHECKING([font compression method])
AC_ARG_WITH(compression,
[AS_HELP_STRING([--with-compression=