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]) |
| 4 | AC_CONFIG_HEADERS([config.h]) |
| 5 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 6 | AM_SILENT_RULES([yes]) |
| 7 | |
| 8 | # Checks for programs. |
| 9 | AC_PROG_CXX |
| 10 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 11 | AM_PROG_AR |
| 12 | AC_PROG_INSTALL |
| 13 | AC_PROG_MAKE_SET |
| 14 | LT_INIT |
| 15 | |
| 16 | # Python |
| 17 | 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])]) |
| 18 | |
| 19 | # Checks for libraries. |
| 20 | PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221]) |
| 21 | |
| 22 | # Checks for header files. |
| 23 | AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])]) |
| 24 | #AC_CHECK_HEADER(sdbusplus/vtable.hpp, ,[AC_MSG_ERROR([Could not find vtable.hpp...openbmc/sdbusplus package required])]) |
| 25 | #AC_CHECK_HEADER(dbusplus/message.hpp, ,[AC_MSG_ERROR([Could not find messsage.hpp...openbmc/sdbusplus package required])]) |
| 26 | #AC_CHECK_HEADER(sdbusplus/bus.hpp, ,[AC_MSG_ERROR([Could not find bus.hpp...openbmc/sdbusplus package required])]) |
| 27 | |
| 28 | # Checks for typedefs, structures, and compiler characteristics. |
| 29 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 30 | AC_ARG_VAR(BUSNAME, [The Dbus busname to own]) |
| 31 | AC_ARG_VAR(OBJPATH, [The Ledmanager Dbus root]) |
| 32 | AC_ARG_VAR(INTERFACE, [The Ledmanager Dbus interface]) |
| 33 | AS_IF([test "x$BUSNAME" == "x"], [BUSNAME="xyz.openbmc_project.ledmanager"]) |
| 34 | AS_IF([test "x$OBJPATH" == "x"], [OBJPATH="/xyz/openbmc_project/ledmanager/groups"]) |
| 35 | AS_IF([test "x$INTERFACE" == "x"], [INTERFACE="xyz.openbmc_project.Ledmanager"]) |
| 36 | AC_DEFINE_UNQUOTED([BUSNAME], ["$BUSNAME"], [The DBus busname to own]) |
| 37 | AC_DEFINE_UNQUOTED([OBJPATH], ["$OBJPATH"], [The Ledmanager Dbus root]) |
| 38 | AC_DEFINE_UNQUOTED([INTERFACE], ["$INTERFACE"], [The Ledmanager Dbus interface]) |
| 39 | |
| 40 | # Create configured output |
| 41 | AC_CONFIG_FILES([Makefile]) |
| 42 | AC_OUTPUT |