Anthony Wilson | d1c3532 | 2018-12-12 16:10:35 -0600 | [diff] [blame] | 1 | AC_PREREQ([2.69]) |
| 2 | AC_INIT([phosphor-power-control], [1.0], [https://github.com/openbmc/phosphor-power-control/issues]) |
| 3 | AC_LANG([C++]) |
| 4 | AC_CONFIG_HEADERS([config.h]) |
| 5 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 6 | AM_SILENT_RULES([yes]) |
| 7 | |
| 8 | # Checks for programs |
| 9 | AC_PROG_CXX |
| 10 | AC_PROG_INSTALL #Checks/sets the install variable to be used |
| 11 | AC_PROG_MAKE_SET |
| 12 | |
| 13 | # Check for libraries |
| 14 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\ |
| 15 | AC_MSG_ERROR(["Requires phosphor-logging package."])) |
Anthony Wilson | b8f3c23 | 2018-12-12 16:19:04 -0600 | [diff] [blame] | 16 | PKG_CHECK_MODULES([GPIOPLUS], [gpioplus],,\ |
| 17 | [AC_MSG_ERROR([Could not find gpioplus...openbmc/gpioplus package required])]) |
Anthony Wilson | d1c3532 | 2018-12-12 16:10:35 -0600 | [diff] [blame] | 18 | |
| 19 | # Checks for typedefs, structures, and compiler characteristics. |
| 20 | AX_CXX_COMPILE_STDCXX_17([noext]) |
| 21 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 22 | |
| 23 | # Checks for library functions |
| 24 | LT_INIT # Removes WARNING: unrecognized options: --with-libtool-sysroot |
| 25 | |
| 26 | # Check for header files. |
| 27 | AC_CHECK_HEADER(phosphor-logging/log.hpp, ,[AC_MSG_ERROR([Could not find phosphor-logging/log.hpp...openbmc/phosphor-logging package required])]) |
| 28 | AC_CHECK_HEADER(nlohmann/json.hpp, ,[AC_MSG_ERROR([Could not find nlohmann/json.hpp...nlohmann/json package required])]) |
| 29 | |
| 30 | AC_CONFIG_FILES([Makefile]) |
| 31 | AC_OUTPUT |