configure.ac revision 89069ce9
1dnl Process this file with autoconf to create configure.
2
3AC_PREREQ([2.60])
4
5AC_INIT(libXi, 1.4.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
6AM_INIT_AUTOMAKE([foreign dist-bzip2])
7AM_MAINTAINER_MODE
8
9# Require xorg-macros minimum of 1.10 for DocBook XML documentation
10m4_ifndef([XORG_MACROS_VERSION],
11          [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
12XORG_MACROS_VERSION(1.10)
13XORG_DEFAULT_OPTIONS
14XORG_ENABLE_SPECS
15XORG_WITH_XMLTO(0.0.20)
16XORG_WITH_FOP
17XORG_CHECK_SGML_DOCTOOLS(1.5)
18XORG_WITH_ASCIIDOC(8.4.5)
19AM_CONFIG_HEADER(src/config.h)
20
21# Check for progs
22AC_PROG_CC
23AC_PROG_LIBTOOL
24AC_PROG_SED
25
26# Checks for pkg-config packages
27PKG_CHECK_MODULES(XI, [xproto >= 7.0.13] [x11 >= 1.2.99.1] [xextproto >= 7.0.3] [xext >= 1.0.99.1] [inputproto >= 1.9.99.902])
28
29# Check for xmlto and asciidoc for man page conversion
30# (only needed by people building tarballs)
31if test "$have_xmlto" = yes && test "$have_asciidoc" = yes; then
32	have_doctools=yes
33else
34	have_doctools=no
35fi
36AM_CONDITIONAL([HAVE_DOCTOOLS], [test $have_doctools = yes])
37if test $have_doctools = no; then
38	AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
39fi
40
41# Determine if the source for man pages is available
42# It may already be present (tarball) or can be generated using doctools
43AM_CONDITIONAL([INSTALL_MANPAGES],
44	[test -f "$srcdir/man/XAllowDeviceEvents.man" || \
45	  test $have_doctools = yes])
46
47XORG_CHECK_MALLOC_ZERO
48
49AC_OUTPUT([Makefile
50           src/Makefile
51           man/Makefile
52           doc/Makefile
53           specs/Makefile
54           xi.pc])
55
56