Created Debian package
[xmldoc.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ([2.59])
4 AC_INIT([xmldoc], [0.10], [arjen@andromeda.nl])
5 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
6
7 dnl Checks for programs.
8 AC_PROG_CC
9
10 dnl Checks for XML and XSLT libraries.
11
12 AC_PATH_PROG(XSLT_CONFIG,xslt-config,no)
13
14 if test $XSLT_CONFIG = "no"
15 then
16    echo "xslt library not found, install package libxslt-dev."
17    exit 1
18 fi
19
20 XSLT_CFLAGS=`$XSLT_CONFIG --cflags`
21 CFLAGS="$CFLAGS $XSLT_CFLAGS"
22
23 AC_CHECK_HEADER(libxml/xmlmemory.h)
24 AC_CHECK_HEADER(libxslt/xslt.h)
25
26 dnl Replace `main' with a function in -lexslt:
27 AC_CHECK_LIB(exslt, main)
28 dnl Replace `main' with a function in -lxml2:
29 AC_CHECK_LIB(xml2, xmlParseFile)
30 dnl Replace `main' with a function in -lxslt:
31 AC_CHECK_LIB(xslt, xsltSetXIncludeDefault)
32
33 dnl Checks for header files.
34 AC_HEADER_STDC
35 AC_CHECK_HEADERS(unistd.h)
36
37 dnl Checks for typedefs, structures, and compiler characteristics.
38 AC_C_CONST
39
40 dnl Checks for library functions.
41
42 AC_CONFIG_FILES([Makefile doc/Makefile test/Makefile xml2html xml2latex xml2text xml2wiki])
43
44 AC_OUTPUT