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