Patrick Venture | d26fff4 | 2018-09-18 15:37:59 -0700 | [diff] [blame] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
| 3 | AC_INIT([phosphor-ipmi-ethstats], [1.0], [https://www.github.com/openbmc/phosphor-ipmi-ethstats/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 | AM_PROG_AR |
| 12 | AC_PROG_INSTALL |
| 13 | AC_PROG_MAKE_SET |
| 14 | |
| 15 | # Checks for typedefs, structures, and compiler characteristics. |
| 16 | AX_CXX_COMPILE_STDCXX_17([noext]) |
| 17 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 18 | |
| 19 | # Checks for libraries. |
William A. Kennington III | 539f03f | 2019-02-12 13:28:45 -0800 | [diff] [blame] | 20 | PKG_CHECK_MODULES([LIBIPMID], [libipmid]) |
Patrick Venture | d26fff4 | 2018-09-18 15:37:59 -0700 | [diff] [blame] | 21 | AC_CHECK_HEADER(experimental/filesystem, ,[AC_MSG_ERROR([Could not find experimental/filesystem...libstdc++fs developement package required])]) |
| 22 | |
| 23 | # Checks for library functions. |
| 24 | LT_INIT # Required for systemd linking |
| 25 | |
| 26 | # Do you want to install with the Google OEM Number as well. |
| 27 | AC_ARG_ENABLE([google], |
Patrick Venture | d72f8b5 | 2019-03-07 16:54:57 -0800 | [diff] [blame] | 28 | AS_HELP_STRING( |
| 29 | [--enable-google], [Enable registering with Google OEN.] |
| 30 | ) |
Patrick Venture | d26fff4 | 2018-09-18 15:37:59 -0700 | [diff] [blame] | 31 | ) |
Patrick Venture | d72f8b5 | 2019-03-07 16:54:57 -0800 | [diff] [blame] | 32 | AM_CONDITIONAL(ENABLE_GOOGLE, [test "x$enable_google" = "xyes"]) |
| 33 | AS_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 Venture | d26fff4 | 2018-09-18 15:37:59 -0700 | [diff] [blame] | 36 | ) |
| 37 | |
| 38 | # Create configured output |
| 39 | AC_CONFIG_FILES([Makefile]) |
| 40 | AC_OUTPUT |