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