configure.ac revision 37eb1ca1
1c43cc173Smrgdnl Process this file with autoconf to create configure.
2c43cc173Smrg
337eb1ca1SmrgAC_PREREQ([2.60])
4c43cc173Smrg
537eb1ca1SmrgAC_INIT(libXi, 1.4.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXi)
63e256790SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
7c43cc173SmrgAM_MAINTAINER_MODE
8c43cc173Smrg
937eb1ca1Smrg# Require xorg-macros minimum of 1.10 for DocBook XML documentation
103e256790Smrgm4_ifndef([XORG_MACROS_VERSION],
1137eb1ca1Smrg          [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
1237eb1ca1SmrgXORG_MACROS_VERSION(1.10)
133e256790SmrgXORG_DEFAULT_OPTIONS
1437eb1ca1SmrgXORG_ENABLE_SPECS
1537eb1ca1SmrgXORG_WITH_XMLTO(0.0.20)
1637eb1ca1SmrgXORG_WITH_FOP
1737eb1ca1SmrgXORG_CHECK_SGML_DOCTOOLS(1.5)
1837eb1ca1SmrgXORG_WITH_ASCIIDOC(8.4.5)
19c43cc173SmrgAM_CONFIG_HEADER(src/config.h)
20c43cc173Smrg
21c43cc173Smrg# Check for progs
22c43cc173SmrgAC_PROG_CC
23c43cc173SmrgAC_PROG_LIBTOOL
24c27c18e8SmrgAC_PROG_SED
25c43cc173Smrg
26c43cc173Smrg# Checks for pkg-config packages
27c27c18e8SmrgPKG_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])
28c43cc173Smrg
29c27c18e8Smrg# Check for xmlto and asciidoc for man page conversion
30c27c18e8Smrg# (only needed by people building tarballs)
3137eb1ca1Smrgif test "$have_xmlto" = yes && test "$have_asciidoc" = yes; then
323e256790Smrg	have_doctools=yes
333e256790Smrgelse
343e256790Smrg	have_doctools=no
353e256790Smrgfi
363e256790SmrgAM_CONDITIONAL([HAVE_DOCTOOLS], [test $have_doctools = yes])
373e256790Smrgif test $have_doctools = no; then
38c27c18e8Smrg	AC_MSG_WARN([xmlto or asciidoc not found - cannot create man pages without it])
39c27c18e8Smrgfi
40c27c18e8Smrg
413e256790Smrg# Determine if the source for man pages is available
423e256790Smrg# It may already be present (tarball) or can be generated using doctools
433e256790SmrgAM_CONDITIONAL([INSTALL_MANPAGES],
443e256790Smrg	[test -f "$srcdir/man/XAllowDeviceEvents.man" || \
453e256790Smrg	  test $have_doctools = yes])
463e256790Smrg
47c43cc173SmrgXORG_CHECK_MALLOC_ZERO
48c43cc173Smrg
49c43cc173SmrgAC_OUTPUT([Makefile
5037eb1ca1Smrg           src/Makefile
5137eb1ca1Smrg           man/Makefile
5237eb1ca1Smrg           doc/Makefile
5337eb1ca1Smrg           specs/Makefile
54c43cc173Smrg           xi.pc])
55c43cc173Smrg
56