Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
| 3 | AC_INIT([phosphor-led-manager], [1.0], [https://github.com/openbmc/phosphor-led-manager/issues]) |
Vishwanatha Subbanna | bb8fe0b | 2016-11-12 18:29:38 +0530 | [diff] [blame^] | 4 | AC_LANG([C++]) |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 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 |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 11 | AC_PROG_INSTALL |
| 12 | AC_PROG_MAKE_SET |
Vishwanatha Subbanna | bb8fe0b | 2016-11-12 18:29:38 +0530 | [diff] [blame^] | 13 | |
| 14 | # Checks for typedefs, structures, and compiler characteristics. |
| 15 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 16 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 17 | |
| 18 | # Python |
| 19 | AM_PATH_PYTHON([2.7], [AC_SUBST([PYTHON], [echo "$PYTHON"])], [AC_MSG_ERROR([Could not find python-2.7 installed...python-2.7 is required])]) |
| 20 | |
| 21 | # Checks for libraries. |
| 22 | PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221]) |
| 23 | |
Vishwanatha Subbanna | bb8fe0b | 2016-11-12 18:29:38 +0530 | [diff] [blame^] | 24 | # Check/set gtest specific functions. |
| 25 | AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"]) |
| 26 | AC_SUBST(GTEST_CPPFLAGS) |
| 27 | |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 28 | # Checks for header files. |
| 29 | AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])]) |
Vishwanatha Subbanna | bb8fe0b | 2016-11-12 18:29:38 +0530 | [diff] [blame^] | 30 | AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/server.hpp...openbmc/sdbusplus package required])]) |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 31 | |
Vishwanatha Subbanna | bb8fe0b | 2016-11-12 18:29:38 +0530 | [diff] [blame^] | 32 | # Dbus service name |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 33 | AC_ARG_VAR(BUSNAME, [The Dbus busname to own]) |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 34 | AS_IF([test "x$BUSNAME" == "x"], [BUSNAME="xyz.openbmc_project.ledmanager"]) |
Vishwanatha Subbanna | bb8fe0b | 2016-11-12 18:29:38 +0530 | [diff] [blame^] | 35 | AC_DEFINE_UNQUOTED([BUSNAME], ["$BUSNAME"], [The Dbus busname to own]) |
| 36 | |
| 37 | # Service dbus root |
| 38 | AC_ARG_VAR(OBJPATH, [The Ledmanager Dbus root]) |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 39 | AS_IF([test "x$OBJPATH" == "x"], [OBJPATH="/xyz/openbmc_project/ledmanager/groups"]) |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 40 | AC_DEFINE_UNQUOTED([OBJPATH], ["$OBJPATH"], [The Ledmanager Dbus root]) |
Vishwanatha Subbanna | bb8fe0b | 2016-11-12 18:29:38 +0530 | [diff] [blame^] | 41 | |
| 42 | AC_ARG_VAR(INTERFACE, [The Ledmanager Dbus interface]) |
| 43 | AS_IF([test "x$INTERFACE" == "x"], [INTERFACE="xyz.openbmc_project.ledmanager"]) |
Vishwanatha Subbanna | b21fda7 | 2016-10-17 17:46:37 +0530 | [diff] [blame] | 44 | AC_DEFINE_UNQUOTED([INTERFACE], ["$INTERFACE"], [The Ledmanager Dbus interface]) |
| 45 | |
| 46 | # Create configured output |
| 47 | AC_CONFIG_FILES([Makefile]) |
| 48 | AC_OUTPUT |