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