configure.ac revision de7ed6e8
1de7ed6e8SmrgAC_PREREQ([2.60])
2de7ed6e8SmrgAC_INIT([encodings], [1.0.4],
3de7ed6e8Smrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
492bb16f8SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
5de7ed6e8SmrgAM_MAINTAINER_MODE
692bb16f8Smrg
78255a313Smrg# Require xorg-macros: XORG_DEFAULT_OPTIONS
88255a313Smrgm4_ifndef([XORG_MACROS_VERSION],
98255a313Smrg	  [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
108255a313SmrgXORG_MACROS_VERSION(1.3)
118255a313SmrgXORG_DEFAULT_OPTIONS
1292bb16f8Smrg
138255a313SmrgAC_PROG_INSTALL
1492bb16f8Smrg
15de7ed6e8Smrg# Require X.Org's font util macros 1.2 or later
168255a313Smrgm4_ifndef([XORG_FONT_MACROS_VERSION],
17de7ed6e8Smrg	  [m4_fatal([must install X.Org font-util 1.2 or later before running autoconf/autogen])])
18de7ed6e8SmrgXORG_FONT_MACROS_VERSION(1.2)
198255a313Smrg
208255a313Smrg# mkfontscale
218255a313SmrgXORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale)
2292bb16f8Smrg
2392bb16f8Smrg# Choose whether or not to compress encodings - default is to compress all
2492bb16f8Smrg
258255a313SmrgAC_MSG_CHECKING([if small encodings should be compressed])
2692bb16f8SmrgAC_ARG_ENABLE(gzip-small-encodings,
278255a313Smrg	AC_HELP_STRING([--disable-gzip-small-encodings],
2892bb16f8Smrg			[Disable compression of small encoding files]),
2992bb16f8Smrg	[GZIP_SMALL="$enableval"], [GZIP_SMALL="yes"]) 
3092bb16f8SmrgAM_CONDITIONAL(GZIP_SMALL, [test x$GZIP_SMALL = xyes])
318255a313SmrgAC_MSG_RESULT([${GZIP_SMALL}])
3292bb16f8Smrg
338255a313SmrgAC_MSG_CHECKING([if large encodings should be compressed])
3492bb16f8SmrgAC_ARG_ENABLE(gzip-large-encodings,
358255a313Smrg	AC_HELP_STRING([--disable-gzip-large-encodings],
3692bb16f8Smrg			[Disable compression of large encoding files]),
3792bb16f8Smrg	[GZIP_LARGE="$enableval"], [GZIP_LARGE="yes"]) 
3892bb16f8SmrgAM_CONDITIONAL(GZIP_LARGE, [test x$GZIP_LARGE = xyes])
398255a313SmrgAC_MSG_RESULT([${GZIP_LARGE}])
4092bb16f8Smrg
4192bb16f8Smrg# gzip
4292bb16f8Smrg
4392bb16f8Smrgif test x$GZIP_SMALL = xyes -o x$GZIP_LARGE = xyes ; then
4492bb16f8Smrg    AC_PATH_PROG(GZIP, gzip)
4592bb16f8Smrg    if [[ -z $GZIP ]]; then
4692bb16f8Smrg	AC_MSG_ERROR([gzip is needed to compress font encodings])
4792bb16f8Smrg    fi
4892bb16f8Smrgfi
4992bb16f8Smrg
508255a313SmrgXORG_FONTSUBDIR([ENCODINGSDIR], [encodingsdir], [encodings])
5192bb16f8Smrg
5292bb16f8SmrgAC_OUTPUT([Makefile large/Makefile])
53