blob: 2f904ca00645b50175743f77867fc840136c1f2e [file] [log] [blame]
Brad Bishop73b776b2016-10-19 07:50:28 -04001# Initialization
2AC_PREREQ([2.69])
3AC_INIT([phosphor-inventory-manager], [1.0], [https://github.com/openbmc/phosphor-inventory-manager/issues])
4AC_CONFIG_HEADERS([config.h])
5AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
6AM_SILENT_RULES([yes])
7
8# Checks for programs.
9AC_PROG_CXX
10AM_PROG_AR
11AC_PROG_INSTALL
12AC_PROG_MAKE_SET
13
Brad Bishop49aefb32016-10-19 11:54:14 -040014# Checks for libraries.
15PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
16
17# Checks for header files.
18AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])])
19AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/server.hpp...sdbusplus developement package required])])
20
Brad Bishop73b776b2016-10-19 07:50:28 -040021# Checks for typedefs, structures, and compiler characteristics.
22AX_CXX_COMPILE_STDCXX_14([noext])
23AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CXXFLAGS])
24
25# Checks for library functions.
26LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot'
27
Brad Bishop49aefb32016-10-19 11:54:14 -040028AC_ARG_VAR(BUSNAME, [The DBus busname to own.])
29AC_ARG_VAR(INVENTORY_ROOT, [The DBus inventory namespace root.])
30AC_ARG_VAR(IFACE, [The manager DBus interface.])
31AS_IF([test "x$BUSNAME" == "x"], [BUSNAME="xyz.openbmc_project.Inventory.Manager"])
32AS_IF([test "x$INVENTORY_ROOT" == "x"], [INVENTORY_ROOT="/xyz/openbmc_project/Inventory"])
33AS_IF([test "x$IFACE" == "x"], [IFACE="xyz.openbmc_project.Inventory.Manager"])
34AC_DEFINE_UNQUOTED([BUSNAME], ["$BUSNAME"], [The DBus busname to own.])
35AC_DEFINE_UNQUOTED([INVENTORY_ROOT], ["$INVENTORY_ROOT"], [The DBus inventory namespace root.])
36AC_DEFINE_UNQUOTED([IFACE], ["$IFACE"], [The manager DBus interface.])
Brad Bishop64d994a2016-10-31 10:24:27 -050037AC_ARG_ENABLE([example],
38 AS_HELP_STRING([--enable-example], [Enable example configuration.]))
39AM_CONDITIONAL([EXAMPLE], [test x$enable_example = xyes])
Brad Bishop49aefb32016-10-19 11:54:14 -040040
Brad Bishop73b776b2016-10-19 07:50:28 -040041# Create configured output
Brad Bishop49aefb32016-10-19 11:54:14 -040042AC_CONFIG_FILES([Makefile test/Makefile])
Brad Bishop73b776b2016-10-19 07:50:28 -040043AC_OUTPUT