On Fri, 2010-07-02 at 03:25 +0100, Jad Naous wrote:
> Hi Guys,
>
> I'm trying to build openvswitch on opensuse, but I'm having issues
> running configure with kernel src dir not found. The thing is that
> opensuse has a separate linux/ source dir and a linux-obj/ dir, and I
> can't pass both to the --with-l26 command.
>
> Is there a workaround or fix?
I needed to do this a few weeks ago and hacked up the below. I'm pretty
sure it isn't ready for prime time but it's a start.
Ian.
diff --git a/acinclude.m4 b/acinclude.m4
index 015bf66..d1a7ae8 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -20,14 +20,25 @@ dnl Configure linux kernel source tree
AC_DEFUN([OVS_CHECK_LINUX26], [
AC_ARG_WITH([l26],
[AC_HELP_STRING([--with-l26=/path/to/linux-2.6],
- [Specify the linux 2.6 kernel sources])],
+ [Specify the linux 2.6 kernel build directory])],
[KBUILD26="$withval"], [KBUILD26=])dnl
+ AC_ARG_WITH([l26-source],
+ [AC_HELP_STRING([--with-l26-source=/path/to/linux-2.6-source],
+ [Specify the linux 2.6 kernel sources])],
+ [KSRC26="$withval"], [KSRC26="$KBUILD26"])dnl
if test -n "$KBUILD26"; then
KBUILD26=`eval echo "$KBUILD26"`
case $KBUILD26 in
/*) ;;
*) KBUILD26=`pwd`/$KBUILD26 ;;
esac
+ if test -n "$KSRC26"; then
+ KSRC26=`eval echo "$KSRC26"`
+ case $KSRC26 in
+ /*) ;;
+ *) KSRC26=`pwd`/$KSRC26 ;;
+ esac
+ fi
# The build directory is what the user provided.
# Make sure that it exists.
@@ -44,7 +55,6 @@ AC_DEFUN([OVS_CHECK_LINUX26], [
# We want the source headers, but $KBUILD26 gives us the "build" headers.
# Use heuristics to find the source headers.
AC_MSG_CHECKING([for Linux 2.6 source directory])
- KSRC26=$KBUILD26
if test ! -e $KSRC26/include/linux/kernel.h; then
case `echo "$KBUILD26" | sed 's,/*$,,'` in # (
*/build)
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org