keepalived-1.1.20-do-not-need-kernel-sources.patch 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. diff -urN keepalived-1.1.20-orig/configure.in keepalived-1.1.20/configure.in
  2. --- keepalived-1.1.20-orig/configure.in 2009-11-05 18:23:04.000000000 +0100
  3. +++ keepalived-1.1.20/configure.in 2010-05-31 11:42:05.000000000 +0200
  4. @@ -51,103 +51,18 @@
  5. AC_CHECK_LIB(popt, poptGetContext,,AC_MSG_ERROR([Popt libraries is required]))
  6. dnl ----[ Kernel version check ]----
  7. -CPPFLAGS="$CPPFLAGS -I$kernelinc"
  8. -AC_MSG_CHECKING([for kernel version])
  9. -AC_TRY_RUN([
  10. - #include <stdlib.h>
  11. - #include <stdio.h>
  12. - #include <linux/version.h>
  13. - #if !defined(UTS_RELEASE) && !defined(LINUX_VERSION_CODE)
  14. - #include <linux/utsrelease.h>
  15. - #endif
  16. - int main (void) {
  17. - FILE *fp = fopen ("linuxinfo", "w");
  18. - if (!fp) return 1;
  19. - #if defined(UTS_RELEASE)
  20. - fprintf (fp, "%s\n", UTS_RELEASE);
  21. - #elif defined(LINUX_VERSION_CODE)
  22. - fprintf (fp, "%d.%d.%d\n", LINUX_VERSION_CODE >> 16, (LINUX_VERSION_CODE >> 8) & 0xFF, LINUX_VERSION_CODE & 0xFF);
  23. - #else
  24. - fprintf (fp, "0.0.0\n"); /* Let's fail gently */
  25. - #endif
  26. - fclose (fp);
  27. - return 0;
  28. - }
  29. - ], [
  30. - LINUX_MAJOR=`cat linuxinfo | cut -d'.' -f1`
  31. - LINUX_MINOR=`cat linuxinfo | cut -d'.' -f2`
  32. - LINUX_PATCH=`cat linuxinfo | cut -d'.' -f3`
  33. - ], [
  34. - LINUX_MAJOR="0"
  35. - LINUX_MINOR="0"
  36. - LINUX_PATCH="0"
  37. - ], [
  38. - LINUX_MAJOR="0"
  39. - LINUX_MINOR="0"
  40. - LINUX_PATCH="0"
  41. - ])
  42. - rm -f linuxinfo
  43. -
  44. - if test "$kernelversion" = "2.4"; then
  45. - KERN="_KRNL_2_4_"
  46. - AC_MSG_RESULT([2.4])
  47. - elif test "$kernelversion" = "2.6"; then
  48. - KERN="_KRNL_2_6_"
  49. - AC_MSG_RESULT([2.6])
  50. - else
  51. - AC_MSG_RESULT([$LINUX_MAJOR.$LINUX_MINOR.$LINUX_PATCH])
  52. - if test "$LINUX_MINOR" = "6"; then
  53. - KERN="_KRNL_2_6_"
  54. - elif test "$LINUX_MINOR" = "4"; then
  55. - KERN="_KRNL_2_4_"
  56. - else
  57. - KERN="_KRNL_2_6_"
  58. - fi
  59. - if test "$LINUX_MAJOR" = "0" -a "$LINUX_MINOR" = "0" -a "$LINUX_PATCH" = "0"; then
  60. - AC_MSG_WARN([Cannot determine Linux Kernel version.])
  61. - fi
  62. - fi
  63. -
  64. +KERN="_KRNL_2_6_"
  65. AC_SUBST(KERN)
  66. dnl ----[ Checks for LVS and VRRP support ]----
  67. -IPVS_SUPPORT="_WITHOUT_LVS_"
  68. -if test "$enable_lvs" != "no"; then
  69. - AC_CHECK_HEADER([net/ip_vs.h],
  70. - [IPVS_SUPPORT="_WITH_LVS_"],
  71. - [
  72. - IPVS_SUPPORT="_WITHOUT_LVS_"
  73. - AC_MSG_WARN([keepalived will be built without LVS support.])
  74. - ])
  75. -fi
  76. +IPVS_SUPPORT="_WITH_LVS_"
  77. if test "$IPVS_SUPPORT" = "_WITHOUT_LVS_" -a "$enable_vrrp" = "no"; then
  78. AC_MSG_ERROR([keepalived MUST be compiled at least with LVS or VRRP framework])
  79. fi
  80. dnl ----[ IPVS syncd support probe ]---
  81. -IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
  82. -if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
  83. - AC_MSG_CHECKING([for IPVS syncd support])
  84. - if test "$KERN" = "_KRNL_2_6_"; then
  85. - IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
  86. - elif test "_KRNL_2_4_"; then
  87. - IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
  88. - else
  89. - IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
  90. - fi
  91. -
  92. - if test "${IPVS_SUPPORT}" = "_WITHOUT_LVS_" -o "$enable_lvs_syncd" = "no"; then
  93. - IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
  94. - fi
  95. -
  96. - if test "$IPVS_SYNCD" = "_HAVE_IPVS_SYNCD_"; then
  97. - AC_MSG_RESULT([yes])
  98. - else
  99. - AC_MSG_RESULT([no])
  100. - fi
  101. -fi
  102. -
  103. +IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
  104. AC_SUBST(IPVS_SYNCD)
  105. dnl ----[ Checks for kernel netlink support ]----