blob: 45081dbefeed46d1b5f85c4fc77fa2afdfe246ac [file] [log] [blame]
Gunnar Mills9df13162017-03-08 15:00:08 -06001AC_PREREQ([2.69])
2AC_INIT([openpower-pnor-code-mgmt], [1.0], [https://github.com/openbmc/openpower-pnor-code-mgmt/issues])
3AC_LANG([C++])
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
10AC_PROG_INSTALL #Checks/sets the install variable to be used
11AC_PROG_MAKE_SET
12
13# Check for libraries
14PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\
15 AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."]))
16PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,
17 AC_MSG_ERROR(["Requires sdbusplus package."]))
Gunnar Mills44c77292017-03-20 15:02:27 -050018PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,
19 [AC_MSG_ERROR([The openbmc/phosphor-logging package is required])])
Gunnar Mills9df13162017-03-08 15:00:08 -060020
21# Checks for library functions
22LT_INIT # Required for systemd linking
23
24# Checks for typedefs, structures, and compiler characteristics.
25AX_CXX_COMPILE_STDCXX_14([noext])
26AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
27
28AC_ARG_VAR(VERSION_BUSNAME, [The Dbus busname to own])
29AS_IF([test "x$VERSION_BUSNAME" == "x"],
30 [VERSION_BUSNAME="org.open_power.Software.Host.Version"])
31AC_DEFINE_UNQUOTED([VERSION_BUSNAME], ["$VERSION_BUSNAME"], [The DBus busname to own])
32
33AC_ARG_VAR(SOFTWARE_OBJPATH, [The software manager Dbus root])
34AS_IF([test "x$SOFTWARE_OBJPATH" == "x"], [SOFTWARE_OBJPATH="/xyz/openbmc_project/software"])
35AC_DEFINE_UNQUOTED([SOFTWARE_OBJPATH], ["$SOFTWARE_OBJPATH"], [The software manager Dbus root])
36
Adriana Kobylak2d8fa222017-03-15 12:34:32 -050037AC_DEFINE(BUSNAME_UPDATER, "org.open_power.Software.Host.Updater",
38 [The item updater DBus busname to own.])
39
Gunnar Mills44c77292017-03-20 15:02:27 -050040AC_ARG_VAR(TOC_FILE, [The path to the pnor toc file])
41AS_IF([test "x$TOC_FILE" == "x"], [TOC_FILE="/tmp/pnor/pnor.toc"])
42AC_DEFINE_UNQUOTED([TOC_FILE], ["$TOC_FILE"], [The path to the pnor toc file])
43
Gunnar Mills9df13162017-03-08 15:00:08 -060044AC_CONFIG_FILES([Makefile])
45AC_OUTPUT
46