summaryrefslogtreecommitdiffabout
path: root/configure.ac
blob: b9e9b561e6df1cd041aac3bfeef52be246fc3f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
AC_INIT([sitecing], [0.0.1], [sitecing-bugs@klever.net])
AC_CONFIG_SRCDIR([include/sitecing/sitecing_parser.h])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([dist-bzip2])

AC_PROG_INSTALL
AC_PROG_AWK
AC_PROG_CXX
AC_PROG_CC
AM_PROG_LEX
AC_PROG_LIBTOOL

AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h unistd.h])

AC_C_CONST

AC_FUNC_MALLOC
AC_FUNC_REALLOC

AC_WITH_PKGCONFIG

PKG_CHECK_MODULES([KINGATE],[kingate],,[
 AC_MSG_ERROR([no kingate library found, get it at http://kin.klever.net/kingate/])
])
HAVE_FCGI=false
HAVE_PLAINCGI=false
PKG_CHECK_MODULES([KINGATE_FCGI],[kingate-fcgi],[
 HAVE_FCGI=true
],[
 AC_MSG_NOTICE([no fastcgi support in kingate library])
])
PKG_CHECK_MODULES([KINGATE_PLAINCGI],[kingate-plaincgi],[
 HAVE_PLAINCGI=true
],[
 AC_MSG_NOTICE([no plaincgi support in kingate library])
])
if ! (${HAVE_FCGI} || ${HAVE_PLAINCGI}) ; then
 AC_MSG_ERROR([not a single CGI interface supported in kingate])
fi
AM_CONDITIONAL([HAVE_FCGI],[${HAVE_FCGI}])
AM_CONDITIONAL([HAVE_PLAINCGI],[${HAVE_PLAINCGI}])

PKG_CHECK_MODULES([DOTCONF],[dotconf],,[
 AC_MSG_ERROR([no dotconf library found])
])

AC_WITH_PCRE([
 AC_WITH_PCREPP(,[
  AC_MSG_ERROR([no pcre++ library found])
 ])
],[
 AC_MSG_ERROR([no pcre library found])
])

AC_CHECK_FUNC([dlopen],,[
 AC_CHECK_LIB([dl],[dlopen],,[
  AC_MSG_ERROR([no dlopen library found])
 ])
])

AC_PATH_PROG([XSLTPROC],[xsltproc],[true])

WANT_DOXYGEN="yes"
AC_ARG_ENABLE([doxygen],
 AC_HELP_STRING([--disable-doxygen],[do not generate documentation]),
 [
  test "${enableval}" = "no" && WANT_DOXYGEN="no"
 ]
)
if test "${WANT_DOXYGEN}" = "yes" ; then
 AC_WITH_DOXYGEN
 AC_WITH_DOT
else
 AM_CONDITIONAL([HAVE_DOXYGEN],[false])
 AM_CONDITIONAL([HAVE_DOT],[false])
fi

AC_CONFIG_FILES([
 Makefile
  Doxyfile
  sitecing.pc
 include/Makefile
 lib/Makefile
 share/Makefile
 src/Makefile
 components/Makefile
])
AC_OUTPUT