blob: ae22c715ae02400d87b9d736da2f67de6d4b96cd [file] [log] [blame]
Anthony Wilsond1c35322018-12-12 16:10:35 -06001AC_PREREQ([2.69])
2AC_INIT([phosphor-power-control], [1.0], [https://github.com/openbmc/phosphor-power-control/issues])
3AC_LANG([C++])
4AC_CONFIG_HEADERS([config.h])
5AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
6AM_SILENT_RULES([yes])
7
8# Checks for programs
9AC_PROG_CXX
10AC_PROG_INSTALL #Checks/sets the install variable to be used
11AC_PROG_MAKE_SET
12
13# Check for libraries
Patrick Venture4228c8e2019-02-13 14:58:58 -080014PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
15PKG_CHECK_MODULES([GPIOPLUS], [gpioplus])
Anthony Wilsond1c35322018-12-12 16:10:35 -060016
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 library functions
22LT_INIT # Removes WARNING: unrecognized options: --with-libtool-sysroot
23
24# Check for header files.
Anthony Wilsond1c35322018-12-12 16:10:35 -060025AC_CHECK_HEADER(nlohmann/json.hpp, ,[AC_MSG_ERROR([Could not find nlohmann/json.hpp...nlohmann/json package required])])
26
27AC_CONFIG_FILES([Makefile])
28AC_OUTPUT