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