dist_udevkeymapforcerel_DATA = \
extras/keymap/force-release-maps/samsung-other
-extras/keymap/keys.txt: /usr/include/linux/input.h
+extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h
mkdir -p extras/keymap
$(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
fi])
AC_SUBST(PCI_DATABASE)
+
+ AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found]))
+ AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
fi
AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes])
mandir: ${mandir}
includedir: ${includedir}
+ include_prefix: ${INCLUDE_PREFIX}
+
logging: ${enable_logging}
debug: ${enable_debug}
selinux: ${with_selinux}