blob: f742e4eca5df5fb1b5b41ad7ff57d36c2f465971 [file] [log] [blame]
Patrick Venture38e8c6e2018-10-24 09:23:35 -07001# Initialization
2AC_PREREQ([2.69])
Patrick Venture9a074dc2018-11-26 09:14:33 -08003AC_INIT([i2c-ipmi], [0.1], [https://www.github.com/google-ipmi-i2c/issues])
Patrick Venture38e8c6e2018-10-24 09:23:35 -07004AC_LANG([C++])
5AC_CONFIG_HEADERS([config.h])
Patrick Venture05111a82018-11-25 10:55:52 -08006AC_CONFIG_MACRO_DIRS([m4])
7AC_CONFIG_AUX_DIR([build-aux])
Patrick Venture38e8c6e2018-10-24 09:23:35 -07008AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
9AM_SILENT_RULES([yes])
10
11# Checks for programs.
12AC_PROG_CXX
13AM_PROG_AR
14AC_PROG_INSTALL
15AC_PROG_MAKE_SET
16
17# Checks for typedefs, structures, and compiler characteristics.
18AX_CXX_COMPILE_STDCXX_17([noext])
19AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
20
21# Checks for libraries.
22AC_CHECK_HEADER([host-ipmid], [AC_MSG_ERROR(["phosphor-host-ipmid required and not found."])])
23
Patrick Venture53a09562018-11-25 10:57:50 -080024# We require linux i2c functionality
25AC_CHECK_HEADERS([linux/i2c-dev.h], [], [
26 AC_MSG_ERROR([Could not find linux/i2c-dev.h])
27])
28AC_CHECK_HEADERS([linux/i2c.h], [], [
29 AC_MSG_ERROR([Could not find linux/i2c.h])
30])
31
32
Patrick Venture38e8c6e2018-10-24 09:23:35 -070033# Checks for library functions.
34LT_INIT # Required for systemd linking
35
36# Create configured output
37AC_CONFIG_FILES([Makefile])
38AC_OUTPUT