4
4
# Configuration template file for keepalived.
5
5
# autoconf will generate & check deps for proper compilation
7
# Copyright (C) 2001-2004 Alexandre Cassen, <acassen@linux-vs.org>
7
# Copyright (C) 2001-2009 Alexandre Cassen, <acassen@linux-vs.org>
9
9
dnl ----[ Process this file with autoconf to produce a configure script ]----
10
10
AC_INIT(keepalived/core/main.c)
106
106
[IPVS_SUPPORT="_WITH_LVS_"],
108
108
IPVS_SUPPORT="_WITHOUT_LVS_"
112
109
AC_MSG_WARN([keepalived will be built without LVS support.])
116
if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
117
AC_MSG_CHECKING([for IPVS version])
121
#include <net/ip_vs.h>
123
FILE *fp = fopen ("ipvsinfo", "w");
125
fprintf (fp, "%d\n%d\n%d\n", NVERSION(IP_VS_VERSION_CODE));
130
IPVS_MAJOR=`head -n 1 ipvsinfo | tail -n 1`
131
IPVS_MINOR=`head -n 2 ipvsinfo | tail -n 1`
132
IPVS_PATCH=`head -n 3 ipvsinfo | tail -n 1`
143
AC_MSG_RESULT([$IPVS_MAJOR.$IPVS_MINOR.$IPVS_PATCH])
144
if test "$IPVS_MAJOR" = "0" -a "$IPVS_MINOR" = "0" -a "$IPVS_PATCH" = "0"; then
145
AC_MSG_WARN([Cannot determine IPVS version.])
149
113
if test "$IPVS_SUPPORT" = "_WITHOUT_LVS_" -a "$enable_vrrp" = "no"; then
150
114
AC_MSG_ERROR([keepalived MUST be compiled at least with LVS or VRRP framework])
153
117
dnl ----[ IPVS syncd support probe ]---
154
dnl Sync daemon is supported since IPVS 0.9.2 for kernel 2.4
156
118
IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
157
119
if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
158
120
AC_MSG_CHECKING([for IPVS syncd support])
159
121
if test "$KERN" = "_KRNL_2_6_"; then
160
122
IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
161
elif test "$IPVS_MAJOR" -ge 1 -a "$KERN" = "_KRNL_2_4_"; then
162
IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
163
elif test "$IPVS_MINOR" -ge 9 -a "$IPVS_PATCH" -ge 2 -a "$KERN" = "_KRNL_2_4_"; then
123
elif test "_KRNL_2_4_"; then
164
124
IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
166
126
IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
182
142
dnl ----[ Checks for kernel netlink support ]----
183
143
VRRP_SUPPORT="_WITHOUT_VRRP_"
184
144
if test "$enable_vrrp" != "no"; then
185
AC_MSG_CHECKING([for kernel netlink support])
187
#include <asm/types.h>
188
#include <sys/socket.h>
189
#include <linux/netlink.h>
191
int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
198
VRRP_SUPPORT="_WITH_VRRP_"
145
VRRP_SUPPORT="_WITH_VRRP_"
206
148
if test "${enable_debug}" = "yes"; then