configure.ac revision 3e256790
1dnl Process this file with autoconf to create configure.
2
3AC_PREREQ([2.57])
4
5AC_INIT(libXi, 1.3.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
6AM_INIT_AUTOMAKE([foreign dist-bzip2])
7AM_MAINTAINER_MODE
8
9# Require xorg-macros: XORG_DEFAULT_OPTIONS
10m4_ifndef([XORG_MACROS_VERSION],
11          [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
12XORG_MACROS_VERSION(1.3)
13XORG_DEFAULT_OPTIONS
14AM_CONFIG_HEADER(src/config.h)
15
16# Check for progs
17AC_PROG_CC
18AC_PROG_LIBTOOL
19AC_PROG_SED
20
21# Checks for pkg-config packages
22PKG_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])
23XI_CFLAGS="$CWARNFLAGS $XI_CFLAGS"
24AC_SUBST(XI_CFLAGS)
25AC_SUBST(XI_LIBS)
26
27# Check for xmlto and asciidoc for man page conversion
28# (only needed by people building tarballs)
29AC_ARG_VAR([XMLTO], [Path to xmlto command])
30AC_PATH_PROG([XMLTO], [xmlto])
31AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
32AC_PATH_PROG([ASCIIDOC], [asciidoc])
33if test "x$XMLTO" != "x" && test "x$ASCIIDOC" != "x"; then
34	have_doctools=yes
35else
36	have_doctools=no
37fi
38AM_CONDITIONAL([HAVE_DOCTOOLS], [test $have_doctools = yes])
39if test $have_doctools = no; then
40	AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
41fi
42
43# Determine if the source for man pages is available
44# It may already be present (tarball) or can be generated using doctools
45AM_CONDITIONAL([INSTALL_MANPAGES],
46	[test -f "$srcdir/man/XAllowDeviceEvents.man" || \
47	  test $have_doctools = yes])
48
49XORG_CHECK_MALLOC_ZERO
50
51AC_OUTPUT([Makefile
52	   src/Makefile
53	   man/Makefile
54           xi.pc])
55
56