Patrick Venture | 38e8c6e | 2018-10-24 09:23:35 -0700 | [diff] [blame] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
Patrick Venture | 9a074dc | 2018-11-26 09:14:33 -0800 | [diff] [blame^] | 3 | AC_INIT([i2c-ipmi], [0.1], [https://www.github.com/google-ipmi-i2c/issues]) |
Patrick Venture | 38e8c6e | 2018-10-24 09:23:35 -0700 | [diff] [blame] | 4 | AC_LANG([C++]) |
| 5 | AC_CONFIG_HEADERS([config.h]) |
Patrick Venture | 05111a8 | 2018-11-25 10:55:52 -0800 | [diff] [blame] | 6 | AC_CONFIG_MACRO_DIRS([m4]) |
| 7 | AC_CONFIG_AUX_DIR([build-aux]) |
Patrick Venture | 38e8c6e | 2018-10-24 09:23:35 -0700 | [diff] [blame] | 8 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 9 | AM_SILENT_RULES([yes]) |
| 10 | |
| 11 | # Checks for programs. |
| 12 | AC_PROG_CXX |
| 13 | AM_PROG_AR |
| 14 | AC_PROG_INSTALL |
| 15 | AC_PROG_MAKE_SET |
| 16 | |
| 17 | # Checks for typedefs, structures, and compiler characteristics. |
| 18 | AX_CXX_COMPILE_STDCXX_17([noext]) |
| 19 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 20 | |
| 21 | # Checks for libraries. |
| 22 | AC_CHECK_HEADER([host-ipmid], [AC_MSG_ERROR(["phosphor-host-ipmid required and not found."])]) |
| 23 | |
Patrick Venture | 53a0956 | 2018-11-25 10:57:50 -0800 | [diff] [blame] | 24 | # We require linux i2c functionality |
| 25 | AC_CHECK_HEADERS([linux/i2c-dev.h], [], [ |
| 26 | AC_MSG_ERROR([Could not find linux/i2c-dev.h]) |
| 27 | ]) |
| 28 | AC_CHECK_HEADERS([linux/i2c.h], [], [ |
| 29 | AC_MSG_ERROR([Could not find linux/i2c.h]) |
| 30 | ]) |
| 31 | |
| 32 | |
Patrick Venture | 38e8c6e | 2018-10-24 09:23:35 -0700 | [diff] [blame] | 33 | # Checks for library functions. |
| 34 | LT_INIT # Required for systemd linking |
| 35 | |
| 36 | # Create configured output |
| 37 | AC_CONFIG_FILES([Makefile]) |
| 38 | AC_OUTPUT |