package version up
[platform/upstream/libXi.git] / configure.ac
1
2 # Initialize Autoconf
3 AC_PREREQ([2.60])
4 AC_INIT([libXi], [1.7.2],
5         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXi])
6 AC_CONFIG_SRCDIR([Makefile.am])
7 AC_CONFIG_HEADERS([src/config.h])
8
9 # Initialize Automake
10 AM_INIT_AUTOMAKE([foreign dist-bzip2])
11
12 # Initialize libtool
13 AC_PROG_LIBTOOL
14
15 # Require xorg-macros minimum of 1.12 for DocBook external references
16 m4_ifndef([XORG_MACROS_VERSION],
17           [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
18 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
28
29 # Obtain compiler/linker options for dependencies
30 PKG_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
32 PKG_CHECK_MODULES(XFIXES, [xfixes >= 5])
33
34 # Check for _XEatDataWords function that may be patched into older Xlib releases
35 SAVE_LIBS="$LIBS"
36 LIBS="$XI_LIBS"
37 AC_CHECK_FUNCS([_XEatDataWords])
38 LIBS="$SAVE_LIBS"
39
40 # Check for xmlto and asciidoc for man page conversion
41 # (only needed by people building tarballs)
42 if test "$have_xmlto" = yes && test "$have_asciidoc" = yes; then
43         have_doctools=yes
44 else
45         have_doctools=no
46 fi
47 AM_CONDITIONAL([HAVE_DOCTOOLS], [test $have_doctools = yes])
48 if test $have_doctools = no; then
49         AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
50 fi
51
52 # Determine if the source for man pages is available
53 # It may already be present (tarball) or can be generated using doctools
54 AM_CONDITIONAL([INSTALL_MANPAGES],
55         [test -f "$srcdir/man/XAllowDeviceEvents.man" || \
56           test $have_doctools = yes])
57
58 AC_CONFIG_FILES([Makefile
59                 src/Makefile
60                 man/Makefile
61                 specs/Makefile
62                 xi.pc])
63 AC_OUTPUT