Marri Devender Rao | 82056ee | 2017-04-27 00:54:50 -0500 | [diff] [blame] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
| 3 | AC_INIT([openpower-debug-collector], [1.0],[https://github.com/openbmc/openpower-debug-collector/issues]) |
| 4 | AC_LANG([C++]) |
| 5 | AC_CONFIG_HEADERS([config.h]) |
| 6 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 7 | AM_SILENT_RULES([yes]) |
| 8 | |
| 9 | # Checks for programs. |
| 10 | AC_PROG_CXX |
| 11 | AC_PROG_INSTALL |
| 12 | AC_PROG_MAKE_SET |
| 13 | |
Marri Devender Rao | caeecac | 2017-09-26 12:06:24 -0500 | [diff] [blame] | 14 | # Generate elog-errors.hpp if gen_errors optional feature is enabled |
| 15 | AC_ARG_ENABLE([gen_errors], |
| 16 | AS_HELP_STRING([--enable-gen_errors], [Enable elog-errors.hpp generation ]), |
| 17 | [],[gen_errors=yes]) |
| 18 | AM_CONDITIONAL([GEN_ERRORS], [test "x$enable_gen_errors" != "xno"]) |
| 19 | |
| 20 | # Check for compiler, packages only when install_error_yaml optional feature |
| 21 | # is disabled |
Marri Devender Rao | ca04522 | 2017-09-26 11:58:59 -0500 | [diff] [blame] | 22 | AC_ARG_ENABLE([install_error_yaml], |
| 23 | AS_HELP_STRING([--enable-install_error_yaml], [Enable installing error yaml file]), |
| 24 | [], [install_error_yaml=no]) |
| 25 | AM_CONDITIONAL([INSTALL_ERROR_YAML], [test "x$enable_install_error_yaml" = "xyes"]) |
| 26 | AS_IF([test "x$enable_install_error_yaml" != "xyes"], [ |
| 27 | # Checks for typedefs, structures, and compiler characteristics. |
Vernon Mauery | 296f116 | 2018-10-04 10:20:57 -0700 | [diff] [blame] | 28 | AX_CXX_COMPILE_STDCXX_17([noext]) |
Marri Devender Rao | ca04522 | 2017-09-26 11:58:59 -0500 | [diff] [blame] | 29 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
Marri Devender Rao | 82056ee | 2017-04-27 00:54:50 -0500 | [diff] [blame] | 30 | |
Marri Devender Rao | ca04522 | 2017-09-26 11:58:59 -0500 | [diff] [blame] | 31 | # Check for sdbus++ |
| 32 | AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) |
| 33 | AS_IF([test "x$SDBUSPLUSPLUS" == "x"], |
| 34 | AC_MSG_ERROR(["Requires sdbus++"])) |
Marri Devender Rao | ce640f6 | 2017-05-14 09:11:05 -0500 | [diff] [blame] | 35 | |
Marri Devender Rao | ca04522 | 2017-09-26 11:58:59 -0500 | [diff] [blame] | 36 | LT_INIT |
Marri Devender Rao | 82056ee | 2017-04-27 00:54:50 -0500 | [diff] [blame] | 37 | |
Marri Devender Rao | ca04522 | 2017-09-26 11:58:59 -0500 | [diff] [blame] | 38 | # Checks for libraries. |
| 39 | AX_PKG_CHECK_MODULES([SYSTEMD], [], [libsystemd >= 221], [], |
| 40 | [AC_MSG_ERROR(["systemd required and not found."])]) |
Marri Devender Rao | f973c3d | 2017-04-27 01:08:34 -0500 | [diff] [blame] | 41 | |
Marri Devender Rao | ca04522 | 2017-09-26 11:58:59 -0500 | [diff] [blame] | 42 | # Checks for modules |
| 43 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],, |
| 44 | [AC_MSG_ERROR([Could not find phosphor-logging...openbmc/phosphor-logging package required])]) |
| 45 | ]) |
Marri Devender Rao | 82056ee | 2017-04-27 00:54:50 -0500 | [diff] [blame] | 46 | # Create configured output |
| 47 | AC_CONFIG_FILES([Makefile ]) |
| 48 | AC_OUTPUT |