1
# $Id: configure.ac 4415 2009-12-16 12:31:57Z tfheen $
1
# $Id: configure.ac 4638 2010-03-24 09:48:24Z tfheen $
4
AC_COPYRIGHT([Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS])
5
AC_REVISION([$Id: configure.ac 4415 2009-12-16 12:31:57Z tfheen $])
6
AC_INIT([Varnish], [2.0.6], [varnish-dev@projects.linpro.no])
4
AC_COPYRIGHT([Copyright (c) 2006 Verdens Gang AS
5
Copyright (c) 2006-2010 Redpill Linpro AS
6
Copyright (c) 2010 Varnish Software AS])
7
AC_REVISION([$Id: configure.ac 4638 2010-03-24 09:48:24Z tfheen $])
8
AC_INIT([Varnish], [2.1], [varnish-dev@projects.linpro.no])
7
9
AC_CONFIG_SRCDIR(include/varnishapi.h)
8
10
AM_CONFIG_HEADER(config.h)
26
AC_CHECK_PROGS(XSLTPROC, [xsltproc])
28
AC_CHECK_PROGS(XSLTPROC, [xsltproc], "no")
29
if test "x$XSLTPROC" = "xno"; then
30
AC_MSG_WARN([xsltproc not found – not building documentation])
32
AM_CONDITIONAL(HAVE_XSLTPROC,[test "x$XSLTPROC" != "xno"])
28
34
# Checks for libraries.
29
35
save_LIBS="${LIBS}"
79
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[pkg.m4 missing, please install pkg-config])
81
if test -n $PKG_CONFIG; then
82
PKG_CHECK_MODULES([PCRE], [libpcre])
84
AC_CHECK_PROG(PCRE_CONFIG, pcre-config, pcre-config)
85
AC_ARG_WITH(pcre-config,
86
AS_HELP_STRING([--with-pcre-config=PATH],
87
[Location of PCRE pcre-config (auto)]),
88
[pcre_config="$withval"],
91
if test "x$pcre_config" != "x" ; then
92
AC_MSG_CHECKING(for $pcre_config)
94
if test -f $pcre_config ; then
95
PCRE_CONFIG=$pcre_config
98
AC_MSG_RESULT(no - searching PATH)
101
if test "x$PCRE_CONFIG" = "x"; then
102
AC_CHECK_PROGS(PCRE_CONFIG, pcre-config)
104
PCRE_CFLAGS=`$PCRE_CONFIG --cflags`
105
PCRE_LIBS=`$PCRE_CONFIG --libs`
107
AC_SUBST(PCRE_CFLAGS)
73
111
# Checks for header files.
75
113
AC_HEADER_SYS_WAIT
115
AC_CHECK_HEADERS([sys/param.h])
116
AC_CHECK_HEADERS([sys/types.h])
77
117
AC_CHECK_HEADERS([sys/endian.h])
78
118
AC_CHECK_HEADERS([sys/filio.h])
79
AC_CHECK_HEADERS([sys/mount.h])
119
AC_CHECK_HEADERS([sys/mount.h], [], [], [#include <sys/param.h>])
80
120
AC_CHECK_HEADERS([sys/socket.h])
81
121
AC_CHECK_HEADERS([sys/statvfs.h])
82
122
AC_CHECK_HEADERS([sys/vfs.h])
87
127
AC_CHECK_HEADERS([stddef.h])
88
128
AC_CHECK_HEADERS([stdlib.h])
89
129
AC_CHECK_HEADERS([unistd.h])
130
AC_CHECK_HEADERS([priv.h])
91
132
# Checks for typedefs, structures, and compiler characteristics.
170
212
# These functions are provided by libcompat on platforms where they
171
213
# are not available
172
AC_CHECK_FUNCS([asprintf vasprintf])
173
214
AC_CHECK_FUNCS([setproctitle])
174
215
AC_CHECK_FUNCS([srandomdev])
175
216
AC_CHECK_FUNCS([strlcat strlcpy])
176
217
AC_CHECK_FUNCS([strndup])
177
AC_CHECK_FUNCS([daemon])
178
218
AC_CHECK_FUNCS([backtrace])
219
# white lie - we don't actually test it
220
AC_MSG_CHECKING([whether daemon() works])
223
# present but not functional
228
AC_CHECK_FUNCS([daemon])
181
234
save_LIBS="${LIBS}"
182
235
LIBS="${LIBS} ${RT_LIBS}"
183
236
AC_CHECK_FUNCS([clock_gettime])
237
AC_CHECK_FUNCS([gethrtime])
184
238
LIBS="${save_LIBS}"
186
240
# Check which mechanism to use for the acceptor. We look for kqueue
364
418
AC_DEFINE_UNQUOTED([VCC_CC],"$VCC_CC",[C compiler command line for VCL code])
366
# Define HTTP_HDR_MAX_VAL
367
AC_ARG_WITH(max-header-fields,
368
AS_HELP_STRING([--with-max-header-fields=NUM],
369
[How many header fields to support (default=32)]),
371
[with_max_header_fields=32])
373
AC_DEFINE_UNQUOTED(HTTP_HDR_MAX_VAL, $with_max_header_fields, [Define maximum number of header fields supported by varnish ])
375
420
# Use jemalloc on Linux