blob: d11bf6c5dad92720125ace284406ef481392ee20 [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."]))
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 library functions
22LT_INIT # Removes WARNING: unrecognized options: --with-libtool-sysroot
23
24# Check for header files.
25AC_CHECK_HEADER(phosphor-logging/log.hpp, ,[AC_MSG_ERROR([Could not find phosphor-logging/log.hpp...openbmc/phosphor-logging package required])])
26AC_CHECK_HEADER(nlohmann/json.hpp, ,[AC_MSG_ERROR([Could not find nlohmann/json.hpp...nlohmann/json package required])])
27
28AC_CONFIG_FILES([Makefile])
29AC_OUTPUT