forked from varnish/varnish-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
90 lines (73 loc) · 2.19 KB
/
configure.ac
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
90
AC_INIT([varnish-modules], [0.15.0])
AC_COPYRIGHT([Copyright (c) 2016 Varnish Software Group])
AC_PREREQ(2.63)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR(src/vmod_cookie.vcc)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 foreign])
AM_SILENT_RULES([yes])
AM_EXTRA_RECURSIVE_TARGETS([rst-docs])
LT_INIT([dlopen disable-static])
LT_PREREQ([2.2.6])
AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])
AX_CODE_COVERAGE
# Check for rst utilities
AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], "no")
if test "x$RST2MAN" = "xno"; then
AC_MSG_WARN([rst2man not found - not building man pages])
RST2MAN=: # no-op
fi
AM_CONDITIONAL(HAVE_RST2MAN, [test "$RST2MAN" != no])
# Will be available after Varnish 5.0
PKG_CHECK_VAR([VARNISHAPI_LIBDIR], [varnishapi], [libdir])
AC_SUBST([VARNISH_LIBRARY_PATH],
[$VARNISHAPI_LIBDIR:$VARNISHAPI_LIBDIR/varnish])
VARNISH_PREREQ([4.1.4])
VARNISH_VMODS([
bodyaccess
cookie
header
saintmode
tcp
var
vsthrottle
xkey
])
AS_VERSION_COMPARE([$VARNISH_VERSION], [5.0], [VARNISH_VMODS([softpurge])])
AM_CONDITIONAL([WITH_VMOD_SOFTPURGE], [test -n "$BUILD_VMOD_SOFTPURGE"])
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS=$VARNISHAPI_CFLAGS
AC_CHECK_HEADERS([cache/cache_varnishd.h])
AC_CHECK_MEMBER(struct objcore.exp,
[AC_DEFINE([HAVE_OBJCORE_EXP], [1],
[Define if exp is present in the objcore struct])],
[], [#include <cache/cache.h>])
AC_CHECK_MEMBER(struct objcore.hsh_list,
[AC_DEFINE([HAVE_OBJCORE_HSH_LIST], [1],
[Define if hsh_list is present in the objcore struct])],
[], [#include <cache/cache.h>])
AC_CHECK_MEMBER(struct director.admin_health,
[AC_DEFINE([HAVE_DIRECTOR_ADMIN_HEALTH], [1],
[Define if admin_health is present in the director struct])],
[], [
#include <cache/cache.h>
#include <cache/cache_director.h>
])
AC_CHECK_TYPES([req_body_iter_f, objiterate_f, enum exp_event_e],
[], [], [#include <cache/cache.h>])
CPPFLAGS=$save_CPPFLAGS
AC_CHECK_TYPE([struct tcp_info],
[AC_DEFINE([HAVE_TCP_INFO], [1],
[Define if struct tcp_info is present])],
[], [[
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <netinet/in.h>
]])
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT