blob: d7987c969b08e8caf21bfa9b6b54f6a0ed9b7778 [file] [log] [blame]
Patrick Ventured26fff42018-09-18 15:37:59 -07001# Initialization
2AC_PREREQ([2.69])
3AC_INIT([phosphor-ipmi-ethstats], [1.0], [https://www.github.com/openbmc/phosphor-ipmi-ethstats/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
11AM_PROG_AR
12AC_PROG_INSTALL
13AC_PROG_MAKE_SET
14
15# Checks for typedefs, structures, and compiler characteristics.
16AX_CXX_COMPILE_STDCXX_17([noext])
17AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
18
19# Checks for libraries.
20AC_CHECK_HEADER([host-ipmid], [AC_MSG_ERROR(["phosphor-host-ipmid required and not found."])])
21AC_CHECK_HEADER(experimental/filesystem, ,[AC_MSG_ERROR([Could not find experimental/filesystem...libstdc++fs developement package required])])
22
23# Checks for library functions.
24LT_INIT # Required for systemd linking
25
26# Do you want to install with the Google OEM Number as well.
27AC_ARG_ENABLE([google],
28 AS_HELP_STRING([--enable-google], [Enable registering with Google OEN])
29)
30AC_ARG_VAR(ENABLE_GOOGLE, [Enable registering with Google OEN])
31AS_IF([test "x$enable_google" == "xyes"],
32 [ENABLE_GOOGLE="yes"]
33 AC_DEFINE_UNQUOTED([ENABLE_GOOGLE], ["$ENABLE_GOOGLE"], [Enable registering with Google OEN])
34)
35
36# Create configured output
37AC_CONFIG_FILES([Makefile])
38AC_OUTPUT