build: add checks for linux headers
Add checks for the two required linux headers: i2c and i2c-dev.
Change-Id: Ia3c8f4a96aaeb9db95d63410c910fbfaca63d5f5
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/configure.ac b/configure.ac
index 9ebc80d..f8354a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,15 @@
# Checks for libraries.
AC_CHECK_HEADER([host-ipmid], [AC_MSG_ERROR(["phosphor-host-ipmid required and not found."])])
+# We require linux i2c functionality
+AC_CHECK_HEADERS([linux/i2c-dev.h], [], [
+ AC_MSG_ERROR([Could not find linux/i2c-dev.h])
+])
+AC_CHECK_HEADERS([linux/i2c.h], [], [
+ AC_MSG_ERROR([Could not find linux/i2c.h])
+])
+
+
# Checks for library functions.
LT_INIT # Required for systemd linking