1AC_PREREQ([2.60]) 2AC_INIT([encodings], [1.1.0], 3 [https://gitlab.freedesktop.org/xorg/font/encodings/-/issues]) 4AM_INIT_AUTOMAKE([foreign dist-xz]) 5 6# Require xorg-macros 1.20 or later: XORG_DEFAULT_NOCODE_OPTIONS 7m4_ifndef([XORG_MACROS_VERSION], 8 [m4_fatal([must install xorg-macros 1.20 or later before running autoconf/autogen])]) 9XORG_MACROS_VERSION(1.20) 10XORG_DEFAULT_NOCODE_OPTIONS 11 12# Require X.Org's font util macros 1.2 or later 13m4_ifndef([XORG_FONT_MACROS_VERSION], 14 [m4_fatal([must install X.Org font-util 1.2 or later before running autoconf/autogen])]) 15XORG_FONT_MACROS_VERSION(1.2) 16 17# mkfontscale 18XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale) 19 20# Choose whether or not to compress encodings - default is to compress all 21 22AC_MSG_CHECKING([if small encodings should be compressed]) 23AC_ARG_ENABLE(gzip-small-encodings, 24 AS_HELP_STRING([--disable-gzip-small-encodings], 25 [Disable compression of small encoding files]), 26 [GZIP_SMALL="$enableval"], [GZIP_SMALL="yes"]) 27AM_CONDITIONAL(GZIP_SMALL, [test x$GZIP_SMALL = xyes]) 28AC_MSG_RESULT([${GZIP_SMALL}]) 29 30AC_MSG_CHECKING([if large encodings should be compressed]) 31AC_ARG_ENABLE(gzip-large-encodings, 32 AS_HELP_STRING([--disable-gzip-large-encodings], 33 [Disable compression of large encoding files]), 34 [GZIP_LARGE="$enableval"], [GZIP_LARGE="yes"]) 35AM_CONDITIONAL(GZIP_LARGE, [test x$GZIP_LARGE = xyes]) 36AC_MSG_RESULT([${GZIP_LARGE}]) 37 38# gzip 39 40if test x$GZIP_SMALL = xyes -o x$GZIP_LARGE = xyes ; then 41 AC_PATH_PROG(GZIP, gzip) 42 if [[ -z $GZIP ]]; then 43 AC_MSG_ERROR([gzip is needed to compress font encodings]) 44 fi 45 COMPRESS_FLAGS="${COMPRESS_FLAGS--n}" 46 AC_SUBST([COMPRESS_FLAGS]) 47fi 48 49XORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings]) 50 51AC_CONFIG_FILES([Makefile large/Makefile]) 52AC_OUTPUT 53