Index: /trunk/configure
===================================================================
--- /trunk/configure	(revision 57931)
+++ /trunk/configure	(revision 57932)
@@ -156,11 +156,14 @@
 DEVDIR="`cd \`dirname $0\`; pwd`/tools"
 if [ -d "/lib/modules/`uname -r`/build" ]; then
- LINUX="/lib/modules/`uname -r`/build"
+  LINUX="/lib/modules/`uname -r`/build"
 elif [ "`echo /lib/modules/*`" != "/lib/modules/*" ]; then
   # Get the most recent kernel headers if none match the current kernel.
   for i in /lib/modules/*; do
-    LINUX="$i/build"
+    if [ -r "$i/build" ]; then
+      LINUX="$i/build"
+    fi
   done
-else
+fi
+if [ -z "$LINUX" ]; then
  LINUX="/usr/src/linux"
 fi
