resolve merge conflict
[wakeup.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([wakeup], [0.1], [arjen@andromeda.nl])
6 AC_CONFIG_SRCDIR([src/sunrise.cpp])
7 AC_CONFIG_HEADERS([config.h])
8 AM_INIT_AUTOMAKE([foreign])
9 AC_LANG(C++)
10
11 # Checks for programs.
12 AC_PROG_CXX
13 AC_PROG_CC
14
15 # Checks for libraries.
16 # FIXME: Replace `main' with a function in `-lACL':
17 AC_CHECK_LIB([ACL], [Now])
18 # FIXME: Replace `main' with a function in `-lTachyon':
19 AC_CHECK_LIB([Tachyon], [main])
20 # FIXME: Replace `main' with a function in `-lrt':
21 AC_CHECK_LIB([rt], [main])
22 # FIXME: Replace `main' with a function in `-lpthread':
23 AC_CHECK_LIB([pthread], [main])
24
25
26 AC_PATH_PROG(XML_CONFIG,xml2-config,no)
27
28 if test $XML_CONFIG = "no" 
29 then
30    echo "XML library not found (see http://xmlsoft.org/)."
31    exit 1;
32 fi
33
34 XML_CFLAGS=`$XML_CONFIG --cflags`
35 XML_LFLAGS=`$XML_CONFIG --libs`
36 AC_CHECK_LIB(xml2, xmlParseFile)
37
38
39 CXXFLAGS="$CXXFLAGS $XML_CFLAGS -Wall"
40 LDFLAGS="$LDFLAGS $XML_LFLAGS"
41
42 # Checks for header files.
43 AC_CHECK_HEADERS([fcntl.h stdlib.h unistd.h])
44
45 # Checks for typedefs, structures, and compiler characteristics.
46 AC_CHECK_HEADER_STDBOOL
47 AC_TYPE_SSIZE_T
48
49 # Checks for library functions.
50 AC_FUNC_MMAP
51
52 AC_CONFIG_FILES([Makefile
53                  doc/Makefile
54                  src/Makefile
55                  test/Makefile])
56 AC_OUTPUT