blob: 35bb02c1be67dfc3420fdfa528dd0c8b3b79101e [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.
William A. Kennington III539f03f2019-02-12 13:28:45 -080020PKG_CHECK_MODULES([LIBIPMID], [libipmid])
Patrick Ventured26fff42018-09-18 15:37:59 -070021AC_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],
Patrick Ventured72f8b52019-03-07 16:54:57 -080028 AS_HELP_STRING(
29 [--enable-google], [Enable registering with Google OEN.]
30 )
Patrick Ventured26fff42018-09-18 15:37:59 -070031)
Patrick Ventured72f8b52019-03-07 16:54:57 -080032AM_CONDITIONAL(ENABLE_GOOGLE, [test "x$enable_google" = "xyes"])
33AS_IF([test "x$enable_google" = "xyes"],
34 [AC_DEFINE(ENABLE_GOOGLE, [1], [Register with Google OEN.])],
35 [AC_DEFINE(ENABLE_GOOGLE, [0], [Do not register with Google OEN.])]
Patrick Ventured26fff42018-09-18 15:37:59 -070036)
37
38# Create configured output
39AC_CONFIG_FILES([Makefile])
40AC_OUTPUT