All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: David Vogt <mail@davidvogt.de>
Cc: netfilter-devel@lists.netfilter.org,
	Patrick McHardy <kaber@trash.net>,
	pablo@netfilter.org, Amin Azez <azez@ufomechanic.net>
Subject: Re: Fix --with-kernel for libnfnetlink
Date: Fri, 21 Apr 2006 13:09:54 +0200	[thread overview]
Message-ID: <20060421110954.GA4403@localhost.localdomain> (raw)
In-Reply-To: <859616420604210021y53dda87ai64678342068ed43f@mail.gmail.com>

Hi,

On Fri, Apr 21, 2006 at 09:21:58AM +0200, David Vogt wrote:
> 2006/4/20, Patrick McHardy <kaber@trash.net>:
> > David Vogt wrote:
> > > Amin Azez has helped me with some trouble concerning the compilation
> > > of libnfnetlink.
> > > The --with-kernel parameter for the configure script did not work as
> > > intended, so Amin has proposed the following changes that 1) look for
> > > the kernel sources 2) recognise --with-kernel parameter.
> >
> > Please change this to use --kernel as literal path as suggested
> > by Sven Koch.
> 
> Like this?
> 
> Index: configure.in
> ===================================================================
> --- configure.in	(revision 6583)
> +++ configure.in	(working copy)
> @@ -18,6 +18,35 @@
> 
> 
>  dnl--------------------------------
> +AC_DEFUN([NF_KERNEL_SOURCE],[
> +
> + if test "$with_kernel" = ""; then
> +   KERNEL="/lib/modules/`uname -r`/build"
> + else
> +   KERNEL="$with_kernel"
> + fi
> +
> + AC_MSG_CHECKING([for kernel headers in $KERNEL/include])
> + if test -r "$KERNEL/include/linux/config.h" ; then
> +   AC_SUBST(KERNELDIR,[$KERNEL])
> +   AC_MSG_RESULT([found])
> + else
> +   AC_MSG_ERROR([not found])
> + fi
> +
> +])
> +
> +AC_ARG_WITH(kernel,
> +              AC_HELP_STRING([--with-kernel=DIR],
> +                             [ Show location of kernel source.
> Default is to use uname -r and look in
> /lib/modules/KERNEL/build/include. ]),
> +              NF_KERNEL_SOURCE($with_kernel),NF_KERNEL_SOURCE())
> +
> +if test ! -z "$libdir"; then
> +  MODULE_DIR="\\\"$libdir/\\\""
> +  CFLAGS="$CFLAGS -DCONNTRACK_LIB_DIR=$MODULE_DIR"
> +fi
> +
> +
>  dnl--------------------------------

Why do you need this parameter? the netfilter libraries don't require
kernel headers anymore since they are already bundled in the package
provided. For example, see include/libnfnetlink/linux_nfnetlink.h. We
have had several problems with iptables and the kernel headers in the
past: compilation warnings, breakages... That is the reason why we
decided to do so.

On the other hand, autogen.sh automates the copy of these headers,
so you could choose them via KERNEL_DIR but you need some important
reason to do that.

-- 
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

  reply	other threads:[~2006-04-21 11:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-20 15:25 Fix --with-kernel for libnfnetlink David Vogt
2006-04-20 16:33 ` Amin Azez
2006-04-20 16:50 ` Sven-Haegar Koch
2006-04-20 18:51   ` Patrick McHardy
2006-04-20 18:53     ` Patrick McHardy
2006-04-20 19:38     ` KOVACS Krisztian
2006-04-20 22:52       ` Patrick McHardy
2006-04-21 15:25         ` Pablo Neira Ayuso
2006-04-21 20:02           ` Harald Welte
2006-04-20 19:34 ` Patrick McHardy
2006-04-21  7:21   ` David Vogt
2006-04-21 11:09     ` Pablo Neira Ayuso [this message]
2006-04-21 12:48       ` Amin Azez
2006-04-21 13:12         ` Pablo Neira Ayuso
2006-04-21 13:56           ` Amin Azez
2006-07-26 14:06       ` Amin Azez
2006-07-26 14:11         ` quick fix " Amin Azez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060421110954.GA4403@localhost.localdomain \
    --to=pablo@netfilter.org \
    --cc=azez@ufomechanic.net \
    --cc=kaber@trash.net \
    --cc=mail@davidvogt.de \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.