netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] add --with-kernel-includes configure option to libnetfilter_conntrack
@ 2009-01-20 16:39 Bart De Schuymer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart De Schuymer @ 2009-01-20 16:39 UTC (permalink / raw)
  To: netfilter-devel

Hi,

The previous mail should have had libnetfilter_log in the subject...

This adds the --with-kernel-includes configure option to
libnetfilter_conntrack and updates the README. This option allows
compiling with kernel headers not located at /usr/include.

Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>



--- libnetfilter_conntrack-0.0.99/configure.in.old	2009-01-19 17:48:09.000000000 +0100
+++ libnetfilter_conntrack-0.0.99/configure.in	2009-01-19 17:48:46.000000000 +0100
@@ -72,11 +72,34 @@ if test ! -z "$libdir"; then
 	CFLAGS="$CFLAGS -DLIBNETFILTER_CONNTRACK_DIR=$MODULE_DIR"
 fi
 
-CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS"
 LIBNFCONNTRACK_LIBS="$LIBNFNETLINK_LIBS"
 
 AC_SUBST(LIBNFCONNTRACK_LIBS)
 
+dnl Allows compiling the library with kernel include headers not located
+dnl at /usr/include
+AC_ARG_WITH([kernel-includes],
+    [AS_HELP_STRING([--with-kernel-includes=PATH],
+    [Path to kernel source include files @<:@default=/usr/include@:>@])],
+    [
+    if test x$withval = xyes -o x$withval = x ; then
+	AC_MSG_ERROR(--with-kernel-includes must be given the path to your kernel source include files.)
+    fi
+    if ! test -d $withval ; then
+	AC_MSG_ERROR(The --with-kernel-includes path $withval is not a directory.)
+    fi
+    if ! test -d $withval/linux ; then
+	AC_MSG_ERROR(The --with-kernel-includes directory $withval must contain the directory 'linux'.)
+    fi
+    if ! test -r $withval/linux ; then
+	AC_MSG_ERROR(You must have read permissions for the kernel source include files.)
+    fi
+    KERNEL_INCLUDES=`(cd $withval; /bin/pwd)`
+    TMP_CFLAGS_OTHER=`$PKG_CONFIG libnfnetlink --cflags-only-other`
+    TMP_CFLAGS_I=`$PKG_CONFIG libnfnetlink --cflags-only-I`
+    CFLAGS="$CFLAGS $TMP_CFLAGS_OTHER -I$KERNEL_INCLUDES $TMP_CFLAGS_I"],
+    CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS")
+
 dnl Output the makefile
 AC_OUTPUT(Makefile src/Makefile include/Makefile utils/Makefile qa/Makefile include/libnetfilter_conntrack/Makefile include/internal/Makefile src/conntrack/Makefile src/expect/Makefile src/deprecated/Makefile src/deprecated/l3extensions/Makefile src/deprecated/extensions/Makefile libnetfilter_conntrack.pc)
 
--- libnetfilter_conntrack-0.0.99/README.old	2009-01-19 17:51:11.000000000 +0100
+++ libnetfilter_conntrack-0.0.99/README	2009-01-19 17:58:21.000000000 +0100
@@ -38,6 +38,9 @@ Linux kernel version >= 2.6.18 (http://w
  * ctnetlink (ip_conntrack_netlink)
  * connection tracking event notification API 
 
+You can specify the location of your kernel sources using the
+"--with-kernel-includes" configure option.
+
 = Documentation =
 
 The libnetfilter_conntrack API is well documented, however we don't have any

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] add --with-kernel-includes configure option to libnetfilter_conntrack
@ 2009-01-24 11:23 Bart De Schuymer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart De Schuymer @ 2009-01-24 11:23 UTC (permalink / raw)
  To: netfilter-devel

Hi,

[This is a rediff which includes support for directories with
spaces.]


This adds the --with-kernel-includes configure option to
libnetfilter_conntrack and updates README. This option allows compiling
with kernel headers not located at /usr/include.

Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>


--- libnetfilter_conntrack-0.0.99/configure.in.old	2009-01-19 17:48:09.000000000 +0100
+++ libnetfilter_conntrack-0.0.99/configure.in	2009-01-20 19:24:32.000000000 +0100
@@ -72,11 +72,34 @@ if test ! -z "$libdir"; then
 	CFLAGS="$CFLAGS -DLIBNETFILTER_CONNTRACK_DIR=$MODULE_DIR"
 fi
 
-CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS"
 LIBNFCONNTRACK_LIBS="$LIBNFNETLINK_LIBS"
 
 AC_SUBST(LIBNFCONNTRACK_LIBS)
 
+dnl Allows compiling the library with kernel include headers not located
+dnl at /usr/include
+AC_ARG_WITH([kernel-includes],
+    [AS_HELP_STRING([--with-kernel-includes=PATH],
+    [Path to kernel source include files @<:@default=/usr/include@:>@])],
+    [
+    if test "x$withval" = xyes -o "x$withval" = x ; then
+	AC_MSG_ERROR(--with-kernel-includes must be given the path to your kernel source include files.)
+    fi
+    if ! test -d "$withval" ; then
+	AC_MSG_ERROR(The --with-kernel-includes path $withval is not a directory.)
+    fi
+    if ! test -d "$withval/linux" ; then
+	AC_MSG_ERROR(The --with-kernel-includes directory $withval must contain the directory 'linux'.)
+    fi
+    if ! test -r "$withval/linux" ; then
+	AC_MSG_ERROR(You must have read permissions for the kernel source include files.)
+    fi
+    KERNEL_INCLUDES=`(cd "$withval"; /bin/pwd)`
+    TMP_CFLAGS_OTHER=`$PKG_CONFIG libnfnetlink --cflags-only-other`
+    TMP_CFLAGS_I=`$PKG_CONFIG libnfnetlink --cflags-only-I`
+    CFLAGS="$CFLAGS $TMP_CFLAGS_OTHER -I\"$KERNEL_INCLUDES\" $TMP_CFLAGS_I"],
+    CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS")
+
 dnl Output the makefile
 AC_OUTPUT(Makefile src/Makefile include/Makefile utils/Makefile qa/Makefile include/libnetfilter_conntrack/Makefile include/internal/Makefile src/conntrack/Makefile src/expect/Makefile src/deprecated/Makefile src/deprecated/l3extensions/Makefile src/deprecated/extensions/Makefile libnetfilter_conntrack.pc)
 
--- libnetfilter_conntrack-0.0.99/README.old	2009-01-19 17:51:11.000000000 +0100
+++ libnetfilter_conntrack-0.0.99/README	2009-01-19 17:58:21.000000000 +0100
@@ -38,6 +38,9 @@ Linux kernel version >= 2.6.18 (http://w
  * ctnetlink (ip_conntrack_netlink)
  * connection tracking event notification API 
 
+You can specify the location of your kernel sources using the
+"--with-kernel-includes" configure option.
+
 = Documentation =
 
 The libnetfilter_conntrack API is well documented, however we don't have any

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-24 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-24 11:23 [PATCH] add --with-kernel-includes configure option to libnetfilter_conntrack Bart De Schuymer
  -- strict thread matches above, loose matches on Subject: below --
2009-01-20 16:39 Bart De Schuymer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).