blob: 8f4f3fecb69aba207ece1a72ead644f6128ba938 [file] [log] [blame]
Marri Devender Rao82056ee2017-04-27 00:54:50 -05001# Initialization
2AC_PREREQ([2.69])
3AC_INIT([openpower-debug-collector], [1.0],[https://github.com/openbmc/openpower-debug-collector/issues])
4AC_LANG([C++])
5AC_CONFIG_HEADERS([config.h])
6AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
7AM_SILENT_RULES([yes])
8
9# Checks for programs.
10AC_PROG_CXX
11AC_PROG_INSTALL
12AC_PROG_MAKE_SET
13
Marri Devender Raocaeecac2017-09-26 12:06:24 -050014# Generate elog-errors.hpp if gen_errors optional feature is enabled
15AC_ARG_ENABLE([gen_errors],
16 AS_HELP_STRING([--enable-gen_errors], [Enable elog-errors.hpp generation ]),
17 [],[gen_errors=yes])
18AM_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 Raoca045222017-09-26 11:58:59 -050022AC_ARG_ENABLE([install_error_yaml],
23 AS_HELP_STRING([--enable-install_error_yaml], [Enable installing error yaml file]),
24 [], [install_error_yaml=no])
25AM_CONDITIONAL([INSTALL_ERROR_YAML], [test "x$enable_install_error_yaml" = "xyes"])
26AS_IF([test "x$enable_install_error_yaml" != "xyes"], [
27 # Checks for typedefs, structures, and compiler characteristics.
Vernon Mauery296f1162018-10-04 10:20:57 -070028 AX_CXX_COMPILE_STDCXX_17([noext])
Marri Devender Raoca045222017-09-26 11:58:59 -050029 AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
Marri Devender Rao82056ee2017-04-27 00:54:50 -050030
Marri Devender Raoca045222017-09-26 11:58:59 -050031 # Check for sdbus++
32 AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
33 AS_IF([test "x$SDBUSPLUSPLUS" == "x"],
34 AC_MSG_ERROR(["Requires sdbus++"]))
Marri Devender Raoce640f62017-05-14 09:11:05 -050035
Marri Devender Raoca045222017-09-26 11:58:59 -050036 LT_INIT
Marri Devender Rao82056ee2017-04-27 00:54:50 -050037
Marri Devender Raoca045222017-09-26 11:58:59 -050038 # Checks for libraries.
39 AX_PKG_CHECK_MODULES([SYSTEMD], [], [libsystemd >= 221], [],
40 [AC_MSG_ERROR(["systemd required and not found."])])
Marri Devender Raof973c3d2017-04-27 01:08:34 -050041
Marri Devender Raoca045222017-09-26 11:58:59 -050042 # 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 Rao82056ee2017-04-27 00:54:50 -050046# Create configured output
47AC_CONFIG_FILES([Makefile ])
48AC_OUTPUT