configure.ac revision c6b4a769
1
2# Initialize Autoconf
3AC_PREREQ([2.60])
4AC_INIT([libXi], [1.8.2],
5	[https://gitlab.freedesktop.org/xorg/lib/libXi/issues], [libXi])
6AC_CONFIG_SRCDIR([Makefile.am])
7AC_CONFIG_HEADERS([src/config.h])
8AC_CONFIG_MACRO_DIRS([m4])
9
10# Initialize Automake
11AM_INIT_AUTOMAKE([foreign dist-xz])
12
13# Initialize libtool
14LT_INIT
15
16# Require xorg-macros minimum of 1.12 for DocBook external references
17m4_ifndef([XORG_MACROS_VERSION],
18          [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
19XORG_MACROS_VERSION(1.12)
20XORG_DEFAULT_OPTIONS
21XORG_ENABLE_DOCS
22XORG_ENABLE_SPECS
23XORG_WITH_XMLTO(0.0.22)
24XORG_WITH_FOP
25XORG_WITH_XSLTPROC
26XORG_CHECK_SGML_DOCTOOLS(1.8)
27XORG_WITH_ASCIIDOC(8.4.5)
28XORG_CHECK_MALLOC_ZERO
29
30# Obtain compiler/linker options for dependencies
31PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.6] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 2.3.99.1])
32# CFLAGS only for PointerBarrier typedef
33PKG_CHECK_MODULES(XFIXES, [xfixes >= 5])
34
35# Check for xmlto and asciidoc for man page conversion
36# (only needed by people building tarballs)
37if test "$have_xmlto" = yes && test "$have_asciidoc" = yes; then
38	have_doctools=yes
39else
40	have_doctools=no
41fi
42AM_CONDITIONAL([HAVE_DOCTOOLS], [test $have_doctools = yes])
43if test $have_doctools = no; then
44	AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
45fi
46
47# Determine if the source for man pages is available
48# It may already be present (tarball) or can be generated using doctools
49AM_CONDITIONAL([INSTALL_MANPAGES],
50	[test -f "$srcdir/man/XAllowDeviceEvents.man" || \
51	  test $have_doctools = yes])
52
53AC_CONFIG_FILES([Makefile
54		src/Makefile
55		man/Makefile
56		specs/Makefile
57		xi.pc])
58AC_OUTPUT
59