Skip to contentSkip to conversation

add --with-kernel-includes configure option to libnetfilter_queue

PATCH In review Bart De Schuymer 2 participants 2 messages Jan 24, 2009 – Jan 26, 2009 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add --with-kernel-includes configure option to libnetfilter_queue

Hi,

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

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

configure.in renamed from configure.in.old +0 -0
@@ -19,14 +19,37 @@ esac
 

dnl Dependencies
LIBNFNETLINK_REQUIRED=0.0.38
- +
PKG_CHECK_MODULES(LIBNFNETLINK, libnfnetlink >= $LIBNFNETLINK_REQUIRED,,
AC_MSG_ERROR(Cannot find libnfnetlink >= $LIBNFNETLINK_REQUIRED))
- -CFLAGS="$CFLAGS $LIBNFNETLINK_CFLAGS"
+
LIBNFQUEUE_LIBS="$LIBNFNETLINK_LIBS"
- +
AC_SUBST(LIBNFQUEUE_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 makefiles
AC_OUTPUT(Makefile include/Makefile include/libnetfilter_queue/Makefile src/Makefile utils/Makefile libnetfilter_queue.pc doxygen.cfg)

README renamed from README.old +45 -0

45 lines not on this page · raw message

#1 lore raw
Quoted 3 lines · Bart De Schuymer

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

Since my autoconf knowledge is very limited, I'll wait for Jan to state an opinion on these patches.