Prepared for release 0.5
[xmldoc.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(xp.c)
3 AM_INIT_AUTOMAKE(XMLDoc, 0.5)
4
5 dnl Checks for programs.
6 AC_PROG_CC
7
8 AC_PATH_PROG(XML_CONFIG,xml2-config,no)
9
10 if test $XML_CONFIG = "no" 
11 then
12    echo "XML2 library not found (see http://xmlsoft.org/)."
13    exit 1;
14 fi
15
16 dnl Checks for libraries.
17
18 XML_CFLAGS=`$XML_CONFIG --cflags`
19 CFLAGS="$CFLAGS $XML_CFLAGS"
20
21 dnl Replace `main' with a function in -lexslt:
22 AC_CHECK_LIB(exslt, main)
23 dnl Replace `main' with a function in -lxml2:
24 AC_CHECK_LIB(xml2, xmlParseFile)
25 dnl Replace `main' with a function in -lxslt:
26 AC_CHECK_LIB(xslt, main)
27
28 dnl Checks for header files.
29 AC_HEADER_STDC
30 AC_CHECK_HEADERS(unistd.h)
31
32 dnl Checks for typedefs, structures, and compiler characteristics.
33 AC_C_CONST
34
35 dnl Checks for library functions.
36
37 AC_OUTPUT(Makefile)