Some more automake cleanup
[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.7], [arjen@andromeda.nl])
5 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
6
7 dnl Checks for programs.
8 AC_PROG_CC
9
10 AC_PATH_PROG(XSLT_CONFIG,xslt-config,no)
11
12 if test $XSLT_CONFIG = "no" 
13 then
14    echo "XSLT library not found (see http://xmlsoft.org/)."
15    exit 1;
16 fi
17
18 dnl Checks for libraries.
19
20 XSLT_CFLAGS=`$XSLT_CONFIG --cflags`
21 XSLT_LFLAGS=`$XSLT_CONFIG --libs`
22 CFLAGS="$CFLAGS $XSLT_CFLAGS"
23 LDFLAGS="$LDFLAGS $XSLT_LFLAGS"
24
25 dnl Replace `main' with a function in -lexslt:
26 AC_CHECK_LIB(exslt, main)
27 dnl Replace `main' with a function in -lxml2:
28 AC_CHECK_LIB(xml2, xmlParseFile)
29 dnl Replace `main' with a function in -lxslt:
30 AC_CHECK_LIB(xslt, main)
31
32 dnl Checks for header files.
33 AC_HEADER_STDC
34 AC_CHECK_HEADERS(unistd.h)
35
36 dnl Checks for typedefs, structures, and compiler characteristics.
37 AC_C_CONST
38
39 dnl Checks for library functions.
40
41 AC_CONFIG_FILES([Makefile doc/Makefile])
42
43 AC_OUTPUT