4
AC_COPYRIGHT([Copyright (c) 2007-2011 Varnish Software AS])
6
AC_INIT([varnish-nagios], [1.1], [varnish-dev@varnish-cache.org])
7
AC_CONFIG_SRCDIR(check_varnish.c)
8
AM_CONFIG_HEADER(config.h)
15
# Checks for programs.
23
# Checks for libraries.
24
PKG_CHECK_MODULES([VARNISHAPI], [varnishapi])
26
# Checks for header files.
31
# Checks for typedefs, structures, and compiler characteristics.
34
# Checks for library functions.
37
# Now that we're done using the compiler to look for functions and
38
# libraries, set CFLAGS to what we want them to be for our own code
40
# This corresponds to FreeBSD's WARNS level 6
41
DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
43
# Additional flags for GCC 4
44
EXTRA_DEVELOPER_CFLAGS="-Wextra -Wno-missing-field-initializers -Wno-sign-compare"
46
AC_ARG_ENABLE(developer-warnings,
47
AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]),
48
CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}")
49
AC_ARG_ENABLE(debugging-symbols,
50
AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]),
51
CFLAGS="${CFLAGS} -O0 -g -fno-inline")
52
AC_ARG_ENABLE(extra-developer-warnings,
53
AS_HELP_STRING([--enable-extra-developer-warnings],[enable even stricter warnings (default is NO)]),
54
CFLAGS="${CFLAGS} ${EXTRA_DEVELOPER_CFLAGS}")
55
AC_ARG_ENABLE(stack-protector,
56
AS_HELP_STRING([--enable-stack-protector],[enable stack protector (default is NO)]),
57
CFLAGS="${CFLAGS} -fstack-protector-all")
59
AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]),
60
CFLAGS="${CFLAGS} -Werror")