blob: 0ae6166c9b7ef478086d82ba0a7d6bb92d9b992a [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
14PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
15 AC_MSG_ERROR(["Requires phosphor-logging package."]))
Anthony Wilsonb8f3c232018-12-12 16:19:04 -060016PKG_CHECK_MODULES([GPIOPLUS], [gpioplus],,\
17 [AC_MSG_ERROR([Could not find gpioplus...openbmc/gpioplus package required])])
Anthony Wilsond1c35322018-12-12 16:10:35 -060018
19# Checks for typedefs, structures, and compiler characteristics.
20AX_CXX_COMPILE_STDCXX_17([noext])
21AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
22
23# Checks for library functions
24LT_INIT # Removes WARNING: unrecognized options: --with-libtool-sysroot
25
26# Check for header files.
27AC_CHECK_HEADER(phosphor-logging/log.hpp, ,[AC_MSG_ERROR([Could not find phosphor-logging/log.hpp...openbmc/phosphor-logging package required])])
28AC_CHECK_HEADER(nlohmann/json.hpp, ,[AC_MSG_ERROR([Could not find nlohmann/json.hpp...nlohmann/json package required])])
29
30AC_CONFIG_FILES([Makefile])
31AC_OUTPUT