configure.ac revision de301c82
1#
2#  Copyright © 2003 Keith Packard, Noah Levitt
3#
4#  Permission to use, copy, modify, distribute, and sell this software and its
5#  documentation for any purpose is hereby granted without fee, provided that
6#  the above copyright notice appear in all copies and that both that
7#  copyright notice and this permission notice appear in supporting
8#  documentation, and that the name of Keith Packard not be used in
9#  advertising or publicity pertaining to distribution of the software without
10#  specific, written prior permission.  Keith Packard makes no
11#  representations about the suitability of this software for any purpose.  It
12#  is provided "as is" without express or implied warranty.
13#
14#  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16#  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20#  PERFORMANCE OF THIS SOFTWARE.
21#
22
23# Initialize Autoconf
24AC_PREREQ([2.60])
25#
26# This is the package version number, not the shared library
27# version.  This version number will be substituted into Xft.h
28# Please bump the minor library number at each release as well.
29#
30AC_INIT([libXft], [2.3.9],
31        [https://gitlab.freedesktop.org/xorg/lib/libXft/issues], [libXft])
32AC_CONFIG_SRCDIR([Makefile.am])
33AC_CONFIG_HEADERS([config.h])
34AC_CONFIG_MACRO_DIRS([m4])
35
36# Initialize Automake
37AM_INIT_AUTOMAKE([foreign dist-xz])
38
39# Initialize libtool
40LT_INIT
41
42# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
43m4_ifndef([XORG_MACROS_VERSION],
44          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
45XORG_MACROS_VERSION(1.8)
46XORG_DEFAULT_OPTIONS
47
48# Set library version for Xft.h from package version set in AC_INIT
49# copied from PACKAGE_VERSION_* settings in XORG_VERSION
50AC_CONFIG_HEADERS([include/X11/Xft/Xft.h])
51AC_DEFINE_UNQUOTED([XFT_MAJOR],
52                [`echo $PACKAGE_VERSION | cut -d . -f 1`],
53                [Major version of Xft])
54AC_DEFINE_UNQUOTED([XFT_MINOR],
55                [`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`],
56                [Minor version of Xft])
57AC_DEFINE_UNQUOTED([XFT_REVISION],
58                [`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`],
59                [Micro revision of Xft])
60
61XFT_LT_VERSION=`echo $PACKAGE_VERSION | tr '.' ':'`
62AC_SUBST([XFT_LT_VERSION])
63
64#
65# Check for Xrender
66#
67PKG_CHECK_MODULES(XRENDER, xrender >= 0.8.2 x11 xproto >= 7.0.22)
68
69# Check freetype configuration
70PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.1.6)
71
72# Check fontconfig configuration
73PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.5.92)
74
75AC_SUBST(XRENDER_CFLAGS)
76AC_SUBST(XRENDER_LIBS)
77AC_SUBST(FREETYPE_CFLAGS)
78AC_SUBST(FREETYPE_LIBS)
79AC_SUBST(FONTCONFIG_CFLAGS)
80AC_SUBST(FONTCONFIG_LIBS)
81
82if test "$VERSION" = "" ; then
83       VERSION=$PACKAGE_VERSION;
84fi
85
86AC_CONFIG_FILES([Makefile
87		xft.pc
88		src/Makefile
89		man/Makefile])
90AC_OUTPUT
91