302db0bda3c1e61d3fb855903ca8aeca86c6dc5d
[ACL.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.69])
5 AC_INIT([libACL], [0.3], [arjen@androemda.nl])
6 AC_CONFIG_SRCDIR([src/date.cpp])
7 AM_INIT_AUTOMAKE
8 AC_CONFIG_MACRO_DIRS([m4])
9 AC_CONFIG_FILES([Makefile src/Makefile test/Makefile doc/Makefile])
10 AC_CONFIG_HEADERS([config.h])
11
12 # Checks for programs.
13 AC_PROG_CXX
14 AC_PROG_CC
15 AC_PROG_YACC
16 AM_PROG_AR
17
18 # Checks for libraries.
19
20 AC_PATH_PROG(XML_CONFIG,xml2-config,no)
21
22 if test $XML_CONFIG = "no" 
23 then
24    echo "XML library not found (see http://xmlsoft.org/)."
25    exit 1;
26 fi
27
28 XML_CFLAGS=`$XML_CONFIG --cflags`
29 XML_LFLAGS=`$XML_CONFIG --libs`
30 AC_CHECK_LIB(xml2, xmlParseFile)
31
32 # Checks for header files.
33 AC_FUNC_ALLOCA
34 AC_CHECK_HEADERS([libintl.h malloc.h stddef.h stdlib.h string.h])
35
36 CXXFLAGS="$CXXFLAGS $X_CFLAGS $XML_CFLAGS -Wall"
37 LDFLAGS="$LDFLAGS $XML_LFLAGS"
38 # Checks for typedefs, structures, and compiler characteristics.
39 AC_CHECK_HEADER_STDBOOL
40 AC_TYPE_SIZE_T
41
42 LT_INIT
43
44 # Checks for library functions.
45 AC_FUNC_MALLOC
46 AC_FUNC_STRTOD
47 AC_CHECK_FUNCS([regcomp strchr strrchr strstr strtol strtoul])
48
49 AC_OUTPUT