diff options
author | Ben Pfaff <blp@nicira.com> | 2010-01-08 13:09:10 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-01-08 13:09:10 -0800 |
commit | b57f675ce5326888535f9b77342901cf2c0c76b7 (patch) | |
tree | fffba3c9fd211c070fad72a58383cd115694fac3 /acinclude.m4 | |
parent | fc7ecc66712ea1ed7e06881ce26b4c0282b10d1e (diff) |
datapath: Add a find the kernel source directory for Debian 2.6.32+.
Debian's kernel-headers packages starting from 2.6.32 (or thereabouts) put
links to the kernel build and source directories at the same level, named
"build" and "source" respectively. Add support for this structure.
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 490936e1..d33a7c45 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,6 +1,6 @@ # -*- autoconf -*- -# Copyright (c) 2008, 2009 Nicira Networks. +# Copyright (c) 2008, 2009, 2010 Nicira Networks. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,7 +42,14 @@ AC_DEFUN([OVS_CHECK_LINUX26], [ AC_MSG_CHECKING([for Linux 2.6 source directory]) KSRC26=$KBUILD26 if test ! -e $KSRC26/include/linux/kernel.h; then - KSRC26=`(cd $KBUILD26 && pwd -P) | sed 's,-[[^-]]*$,-common,'` + case `echo "$KBUILD26" | sed 's,/*$,,'` in # ( + */build) + KSRC26=`echo "$KBUILD26" | sed 's,/build/*$,/source,'` + ;; # ( + *) + KSRC26=`(cd $KBUILD26 && pwd -P) | sed 's,-[[^-]]*$,-common,'` + ;; + esac if test ! -e $KSRC26/include/linux/kernel.h; then AC_MSG_ERROR([cannot find source directory]) fi |