~ubuntu-branches/ubuntu/vivid/keepalived/vivid

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-05-12 20:26:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090512202615-k850bw35qpuvpq4p
Tags: 1.1.17-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/rules: DEB_UPDATE_RCD_PARAMS := expicit init start/stop
    parameters (don't stop at 0 and 6)
  - debian/init.d: init script header adapted to stop rule
  - debian/keepalived.postinst: Remove shutdown and reboot links

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# Configuration template file for keepalived.
5
5
# autoconf will generate & check deps for proper compilation
6
6
#
7
 
# Copyright (C) 2001-2004 Alexandre Cassen, <acassen@linux-vs.org>
 
7
# Copyright (C) 2001-2009 Alexandre Cassen, <acassen@linux-vs.org>
8
8
 
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_"],
107
107
    [
108
108
      IPVS_SUPPORT="_WITHOUT_LVS_"
109
 
      IPVS_MAJOR="0"
110
 
      IPVS_MINOR="0"
111
 
      IPVS_PATCH="0"
112
109
      AC_MSG_WARN([keepalived will be built without LVS support.])
113
110
    ])
114
111
fi  
115
112
 
116
 
if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
117
 
  AC_MSG_CHECKING([for IPVS version])
118
 
  AC_TRY_RUN([ 
119
 
    #include <stdlib.h>
120
 
    #include <stdio.h>
121
 
    #include <net/ip_vs.h>
122
 
    int main (void) {
123
 
      FILE *fp = fopen ("ipvsinfo", "w");
124
 
      if (!fp) return 1;
125
 
      fprintf (fp, "%d\n%d\n%d\n", NVERSION(IP_VS_VERSION_CODE));
126
 
      fclose (fp); 
127
 
      return 0;
128
 
    } 
129
 
  ], [
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`
133
 
  ], [
134
 
    IPVS_MAJOR="0"
135
 
    IPVS_MINOR="0"
136
 
    IPVS_PATCH="0"
137
 
  ], [
138
 
    IPVS_MAJOR="0"
139
 
    IPVS_MINOR="0"
140
 
    IPVS_PATCH="0"
141
 
  ])
142
 
  rm -f ipvsinfo
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.])
146
 
  fi
147
 
fi
148
 
 
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])
151
115
fi
152
116
 
153
117
dnl ----[ IPVS syncd support probe ]---
154
 
dnl Sync daemon is supported since IPVS 0.9.2 for kernel 2.4
155
 
 
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_"
165
125
  else
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])
186
 
  AC_TRY_RUN([
187
 
    #include <asm/types.h>
188
 
    #include <sys/socket.h>
189
 
    #include <linux/netlink.h>
190
 
    int main (void) {
191
 
      int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
192
 
      if (fd < 0)
193
 
        exit(1);
194
 
      close(fd);
195
 
      exit(0);
196
 
    }], [
197
 
      AC_MSG_RESULT(yes)
198
 
      VRRP_SUPPORT="_WITH_VRRP_"
199
 
    ], [
200
 
      AC_MSG_RESULT(no)
201
 
    ], [
202
 
      AC_MSG_RESULT(no)
203
 
    ])
 
145
  VRRP_SUPPORT="_WITH_VRRP_"
204
146
fi
205
147
 
206
148
if test "${enable_debug}" = "yes"; then