hal: Find and use the right linux/input.h to work with external toolchain
authorDenys Dmytriyenko <denis@denix.org>
Tue, 11 Nov 2008 01:17:02 +0000 (20:17 -0500)
committerKoen Kooi <koen@openembedded.org>
Fri, 14 Nov 2008 19:08:29 +0000 (20:08 +0100)
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
packages/hal/hal_0.5.11.bb

index e93ad64..2b56fdf 100644 (file)
@@ -1,8 +1,14 @@
 require hal.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI += " file://hal-right-input-h.patch;patch=1 \
              file://fix-configure.diff;patch=1"
 
-EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h"
+# The following code finds the right linux/input.h,
+# which also works with external-toolchain/SDK
+do_configure() {
+       linux_input_h=`echo "#include <linux/input.h>" | ${CPP} - | \
+               grep "linux\/input.h" | head -n 1 | awk -F '"' '{print $2}'`
+       autotools_do_configure --with-linux-input-header=${linux_input_h}
+}