summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 63e7c4e)
raw | patch | inline | side by side (parent: 63e7c4e)
author | Boian Berberov <bberberov@gmail.com> | |
Mon, 11 Aug 2008 14:57:57 +0000 (16:57 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 11 Aug 2008 14:57:57 +0000 (16:57 +0200) |
Developers,
I am writing an updated ebuild for gentoo and I made this patch that allows
ip_vs.h to be located and the ipvs module to build. Normally I would include
this with the ebuild, but I thought it may be beneficial to send it to you.
Please review it and let me know what you think. I am still inexperienced with
autotools so the patch may not be well put together. If you would consider
applying it or a similar patch, please let me know so I can adjust the ebuild
accordingly.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
I am writing an updated ebuild for gentoo and I made this patch that allows
ip_vs.h to be located and the ipvs module to build. Normally I would include
this with the ebuild, but I thought it may be beneficial to send it to you.
Please review it and let me know what you think. I am still inexperienced with
autotools so the patch may not be well put together. If you would consider
applying it or a similar patch, please let me know so I can adjust the ebuild
accordingly.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.in b/configure.in
index 41ee95555c9a5c419d44601f182cab0e8d962b61..ceb25538ebc4f4dea6ee2ebd2d22eeccfb5d8792 100644 (file)
--- a/configure.in
+++ b/configure.in
esac
AC_MSG_RESULT([$ac_system])
+if test "x$ac_system" = "xLinux"
+then
+ AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
+ if test -z "$KERNEL_DIR"
+ then
+ KERNEL_DIR="/lib/modules/`uname -r`/source"
+ fi
+
+ KERNEL_CFLAGS="-I$KERNEL_DIR/include"
+ AC_SUBST(KERNEL_CFLAGS)
+fi
+
#
# Checks for header files.
#
have_ip_vs_h="no"
if test "x$ac_system" = "xLinux"
then
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $KERNEL_CFLAGS"
+
AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
+
+ CFLAGS=$SAVE_CFLAGS
fi
# For quota module
LDFLAGS=$SAVE_LDFLAGS
fi
-if test "x$ac_system" = "xLinux"
-then
- AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
- if test -z "$KERNEL_DIR"
- then
- KERNEL_DIR="/lib/modules/`uname -r`/source"
- fi
-fi
-
with_own_libiptc="no"
AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
[
if test "x$with_libiptc" = "xyes"
then
SAVE_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -I$KERNEL_DIR/include"
+ CFLAGS="$CFLAGS $KERNEL_CFLAGS"
AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
[
diff --git a/src/Makefile.am b/src/Makefile.am
index 21022493ca74d5e8473f8a1cf1dbc0bd66aa4904..a4f9a79fee7a69a53475953d03c990670591e7ef 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
if BUILD_PLUGIN_IPVS
pkglib_LTLIBRARIES += ipvs.la
ipvs_la_SOURCES = ipvs.c
+ipvs_la_CFLAGS = $(KERNEL_CFLAGS)
ipvs_la_LDFLAGS = -module -avoid-version
collectd_LDADD += "-dlopen" ipvs.la
collectd_DEPENDENCIES += ipvs.la