-
Notifications
You must be signed in to change notification settings - Fork 11
/
configure.ac
62 lines (49 loc) · 1.45 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
AC_PREREQ(2.64)
AC_COPYRIGHT([Copyright (c) 2011-2016 Varnish Software])
AC_INIT([libvmod-memcached], [1.0.1])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/vmod_memcached.vcc)
AC_CONFIG_HEADERS(config.h)
AC_CANONICAL_SYSTEM
AC_LANG(C)
AM_INIT_AUTOMAKE([foreign])
AC_GNU_SOURCE
AC_PROG_CC
AC_PROG_CC_STDC
if test "x$ac_cv_prog_cc_c99" = xno; then
AC_MSG_ERROR([Could not find a C99 compatible compiler])
fi
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
# Check for rst utilities
AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py rst2man-2.6.py rst2man-2.7.py], "no")
if test "x$RST2MAN" = "xno"; then
AC_MSG_WARN([rst2man not found - not building man pages])
fi
AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" != "xno"])
# Check for pkg-config
PKG_PROG_PKG_CONFIG
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/stdlib.h])
# Check for python
AC_CHECK_PROGS(PYTHON, [python3 python2.7 python2.6], "no")
if test "x$PYTHON" = "xno"; then
AC_MSG_ERROR([Python > 2.5 is needed to build this vmod, please install Python 2.6 or greater.])
fi
PKG_CHECK_MODULES([libvarnishapi], [varnishapi])
VARNISH_VMOD_INCLUDES
VARNISH_VMOD_DIR
VARNISH_VMODTOOL
AC_PATH_PROG([VARNISHTEST], [varnishtest])
AC_PATH_PROG([VARNISHD], [varnishd], [],
[$PATH:$PATH:`pkg-config varnishapi --variable=sbindir`])
# Look for libmemcached using pkg-config
PKG_CHECK_MODULES([LIBMEMCACHED], [libmemcached > 0.53])
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT