1dnl  Copyright 2005 Red Hat, Inc.
2dnl
3dnl  Permission to use, copy, modify, distribute, and sell this software
4dnl  and its documentation for any purpose is hereby granted without fee,
5dnl  provided that the above copyright notice appear in all copies and
6dnl  that both that copyright notice and this permission notice appear in
7dnl  supporting documentation, and that the name of Red Hat not be used in
8dnl  advertising or publicity pertaining to distribution of the software
9dnl  without specific, written prior permission.  Red Hat makes no
10dnl  representations about the suitability of this software for any
11dnl  purpose.  It is provided "as is" without express or implied warranty.
12dnl
13dnl  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
14dnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
15dnl  NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
16dnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
17dnl  OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
18dnl  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
19dnl  USE OR PERFORMANCE OF THIS SOFTWARE.
20dnl
21dnl Process this file with autoconf to create configure.
22
23# Initialize Autoconf
24AC_PREREQ([2.60])
25AC_INIT([mkfontscale], [1.2.3],
26        [https://gitlab.freedesktop.org/xorg/app/mkfontscale/-/issues],
27        [mkfontscale])
28AC_CONFIG_SRCDIR([Makefile.am])
29AC_CONFIG_HEADERS([config.h])
30AC_USE_SYSTEM_EXTENSIONS
31
32# Initialize Automake
33AM_INIT_AUTOMAKE([foreign dist-xz])
34
35# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
36m4_ifndef([XORG_MACROS_VERSION],
37	  [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
38XORG_MACROS_VERSION(1.8)
39XORG_DEFAULT_OPTIONS
40
41AC_ARG_WITH(bzip2,
42	AS_HELP_STRING([--with-bzip2],
43			[Support bzip2 compressed bitmap fonts]),
44	[], [with_bzip2=no])
45if test "x$with_bzip2" = xyes; then
46	AC_CHECK_LIB(bz2, BZ2_bzopen, [],
47		AC_MSG_ERROR([*** libbz2 is required for bzip2 support]))
48	AC_DEFINE(X_BZIP2_FONT_COMPRESSION,1,[Support bzip2 for bitmap fonts])
49fi
50
51# Checks for typedefs, structures, and compiler characteristics.
52AC_SYS_LARGEFILE
53
54# Checks for system functions / libraries
55AC_CHECK_FUNCS([vasprintf])
56
57# Checks for pkg-config packages
58PKG_CHECK_MODULES(MKFONTSCALE, fontenc freetype2)
59PKG_CHECK_MODULES(ZLIB, zlib)
60PKG_CHECK_MODULES(X11, [xproto >= 7.0.25])
61
62dnl Allow checking code with lint, sparse, etc.
63XORG_WITH_LINT
64
65AC_CONFIG_FILES([
66	Makefile
67	man/Makefile])
68AC_OUTPUT
69