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. |
| 20 | AC_CHECK_HEADER([host-ipmid], [AC_MSG_ERROR(["phosphor-host-ipmid required and not found."])]) |
| 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], |
| 28 | AS_HELP_STRING([--enable-google], [Enable registering with Google OEN]) |
| 29 | ) |
| 30 | AC_ARG_VAR(ENABLE_GOOGLE, [Enable registering with Google OEN]) |
| 31 | AS_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 |
| 37 | AC_CONFIG_FILES([Makefile]) |
| 38 | AC_OUTPUT |