configure.ac 1.66 KB
Newer Older
Alan Coopersmith's avatar
Alan Coopersmith committed
1

2
# Initialize Autoconf
3
AC_PREREQ([2.60])
Matt Turner's avatar
Matt Turner committed
4
AC_INIT([libXi], [1.7.10],
5
	[https://gitlab.freedesktop.org/xorg/lib/libXi/issues], [libXi])
6 7
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([src/config.h])
Alan Coopersmith's avatar
Alan Coopersmith committed
8

9
# Initialize Automake
10
AM_INIT_AUTOMAKE([foreign dist-bzip2])
Alan Coopersmith's avatar
Alan Coopersmith committed
11

12 13 14
# Initialize libtool
AC_PROG_LIBTOOL

15
# Require xorg-macros minimum of 1.12 for DocBook external references
16
m4_ifndef([XORG_MACROS_VERSION],
17 18
          [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.12)
19
XORG_DEFAULT_OPTIONS
20
XORG_ENABLE_DOCS
21
XORG_ENABLE_SPECS
22
XORG_WITH_XMLTO(0.0.22)
23
XORG_WITH_FOP
24
XORG_WITH_XSLTPROC
25
XORG_CHECK_SGML_DOCTOOLS(1.8)
26
XORG_WITH_ASCIIDOC(8.4.5)
27
XORG_CHECK_MALLOC_ZERO
Alan Coopersmith's avatar
Alan Coopersmith committed
28

29
# Obtain compiler/linker options for dependencies
30
PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.6] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 2.2.99.1])
31 32
# CFLAGS only for PointerBarrier typedef
PKG_CHECK_MODULES(XFIXES, [xfixes >= 5])
Alan Coopersmith's avatar
Alan Coopersmith committed
33

34
# Check for xmlto and asciidoc for man page conversion
35
# (only needed by people building tarballs)
36 37 38 39 40 41 42
if test "$have_xmlto" = yes && test "$have_asciidoc" = yes; then
	have_doctools=yes
else
	have_doctools=no
fi
AM_CONDITIONAL([HAVE_DOCTOOLS], [test $have_doctools = yes])
if test $have_doctools = no; then
43
	AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
44
fi
45

46 47 48 49 50 51
# Determine if the source for man pages is available
# It may already be present (tarball) or can be generated using doctools
AM_CONDITIONAL([INSTALL_MANPAGES],
	[test -f "$srcdir/man/XAllowDeviceEvents.man" || \
	  test $have_doctools = yes])

52 53 54 55 56 57
AC_CONFIG_FILES([Makefile
		src/Makefile
		man/Makefile
		specs/Makefile
		xi.pc])
AC_OUTPUT