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 | |
Andrew Jeffery | 234ba8a | 2017-04-18 16:55:25 +0930 | [diff] [blame] | 8 | AC_CONFIG_MACRO_DIRS([m4]) |
| 9 | |
Gunnar Mills | 9df1316 | 2017-03-08 15:00:08 -0600 | [diff] [blame] | 10 | # Checks for programs |
| 11 | AC_PROG_CXX |
| 12 | AC_PROG_INSTALL #Checks/sets the install variable to be used |
| 13 | AC_PROG_MAKE_SET |
| 14 | |
| 15 | # Check for libraries |
| 16 | PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\ |
| 17 | AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."])) |
| 18 | PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],, |
| 19 | AC_MSG_ERROR(["Requires sdbusplus package."])) |
Gunnar Mills | 44c7729 | 2017-03-20 15:02:27 -0500 | [diff] [blame] | 20 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],, |
| 21 | [AC_MSG_ERROR([The openbmc/phosphor-logging package is required])]) |
Gunnar Mills | 9df1316 | 2017-03-08 15:00:08 -0600 | [diff] [blame] | 22 | |
| 23 | # Checks for library functions |
| 24 | LT_INIT # Required for systemd linking |
| 25 | |
Gunnar Mills | 1ea62e1 | 2017-03-27 21:49:16 -0500 | [diff] [blame] | 26 | # Check/set gtest specific functions. |
| 27 | AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"]) |
| 28 | AC_SUBST(GTEST_CPPFLAGS) |
| 29 | AC_ARG_ENABLE([oe-sdk], |
| 30 | AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.]) |
| 31 | ) |
| 32 | AC_ARG_VAR(OECORE_TARGET_SYSROOT, |
| 33 | [Path to the OE SDK SYSROOT]) |
| 34 | AS_IF([test "x$enable_oe_sdk" == "xyes"], |
| 35 | AS_IF([test "x$OECORE_TARGET_SYSROOT" == "x"], |
| 36 | AC_MSG_ERROR([OECORE_TARGET_SYSROOT must be set with --enable-oe-sdk]) |
| 37 | ) |
| 38 | AC_MSG_NOTICE([Enabling OE-SDK at $OECORE_TARGET_SYSROOT]) |
| 39 | [ |
| 40 | testcase_flags="-Wl,-rpath,\${OECORE_TARGET_SYSROOT}/lib" |
| 41 | testcase_flags="${testcase_flags} -Wl,-rpath,\${OECORE_TARGET_SYSROOT}/usr/lib" |
| 42 | testcase_flags="${testcase_flags} -Wl,-dynamic-linker,`find \${OECORE_TARGET_SYSROOT}/lib/ld-*.so | sort -r -n | head -n1`" |
| 43 | ] |
| 44 | AC_SUBST([OESDK_TESTCASE_FLAGS], [$testcase_flags]) |
| 45 | ) |
| 46 | |
Gunnar Mills | 9df1316 | 2017-03-08 15:00:08 -0600 | [diff] [blame] | 47 | # Checks for typedefs, structures, and compiler characteristics. |
| 48 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 49 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 50 | |
Gunnar Mills | 9df1316 | 2017-03-08 15:00:08 -0600 | [diff] [blame] | 51 | AC_ARG_VAR(SOFTWARE_OBJPATH, [The software manager Dbus root]) |
| 52 | AS_IF([test "x$SOFTWARE_OBJPATH" == "x"], [SOFTWARE_OBJPATH="/xyz/openbmc_project/software"]) |
| 53 | AC_DEFINE_UNQUOTED([SOFTWARE_OBJPATH], ["$SOFTWARE_OBJPATH"], [The software manager Dbus root]) |
| 54 | |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 55 | AC_DEFINE(VERSION_IFACE, "xyz.openbmc_project.Software.Version", |
| 56 | [The software version manager interface]) |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 57 | AC_DEFINE(FILEPATH_IFACE, "xyz.openbmc_project.Common.FilePath", |
| 58 | [The common file path interface]) |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 59 | |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 60 | AC_DEFINE(BUSNAME_UPDATER, "org.open_power.Software.Host.Updater", |
| 61 | [The item updater DBus busname to own.]) |
| 62 | |
Saqib Khan | 77420d2 | 2017-04-04 11:07:07 -0500 | [diff] [blame] | 63 | AC_ARG_VAR(MANIFEST_FILE, [The path to the MANIFEST file]) |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 64 | AS_IF([test "x$MANIFEST_FILE" == "x"], [MANIFEST_FILE="MANIFEST"]) |
Saqib Khan | 77420d2 | 2017-04-04 11:07:07 -0500 | [diff] [blame] | 65 | AC_DEFINE_UNQUOTED([MANIFEST_FILE], ["$MANIFEST_FILE"], [The path to the MANIFEST file]) |
Gunnar Mills | 44c7729 | 2017-03-20 15:02:27 -0500 | [diff] [blame] | 66 | |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 67 | AC_DEFINE(MAPPER_BUSNAME, "xyz.openbmc_project.ObjectMapper", |
| 68 | [The object mapper busname.]) |
| 69 | AC_DEFINE(MAPPER_PATH, "/xyz/openbmc_project/object_mapper", |
| 70 | [The object mapper path.]) |
| 71 | AC_DEFINE(MAPPER_INTERFACE, "xyz.openbmc_project.ObjectMapper", |
| 72 | [The object mapper interface.]) |
| 73 | |
Adriana Kobylak | 692b555 | 2017-04-17 14:02:58 -0500 | [diff] [blame] | 74 | AC_DEFINE(SYSTEMD_BUSNAME, "org.freedesktop.systemd1", |
| 75 | [systemd busname.]) |
| 76 | AC_DEFINE(SYSTEMD_PATH, "/org/freedesktop/systemd1", |
| 77 | [systemd path.]) |
| 78 | AC_DEFINE(SYSTEMD_INTERFACE, "org.freedesktop.systemd1.Manager", |
| 79 | [systemd interface.]) |
| 80 | |
Adriana Kobylak | 55f9e83 | 2017-05-14 16:13:00 -0500 | [diff] [blame] | 81 | AC_DEFINE(PNOR_TOC_FILE, "pnor.toc", |
| 82 | [The name of the PNOR table of contents file]) |
| 83 | AC_DEFINE(PNOR_RO_PREFIX, "/media/pnor-ro-", |
| 84 | [The prefix path for the versioned read-only pnor partitions]) |
| 85 | AC_DEFINE(PNOR_RW_PREFIX, "/media/pnor-rw-", |
| 86 | [The prefix path for the versioned read-write pnor partitions]) |
| 87 | AC_DEFINE(PNOR_PRSV, "/media/pnor-prsv", |
| 88 | [The path for the preserved pnor partitions]) |
| 89 | AC_DEFINE(PNOR_ACTIVE_PATH, "/var/lib/phosphor-software-manager/pnor/", |
| 90 | [Path to the active pnor partitions]) |
| 91 | AC_DEFINE(PNOR_RO_ACTIVE_PATH, "/var/lib/phosphor-software-manager/pnor/ro", |
| 92 | [Path to the active read-only pnor partitions]) |
| 93 | AC_DEFINE(PNOR_RW_ACTIVE_PATH, "/var/lib/phosphor-software-manager/pnor/rw", |
| 94 | [Path to the active read-write pnor partitions]) |
| 95 | AC_DEFINE(PNOR_PRSV_ACTIVE_PATH, "/var/lib/phosphor-software-manager/pnor/prsv", |
| 96 | [Path to the active preserved pnor partitions]) |
| 97 | |
Gunnar Mills | 1ea62e1 | 2017-03-27 21:49:16 -0500 | [diff] [blame] | 98 | AC_CONFIG_FILES([Makefile test/Makefile]) |
Gunnar Mills | 9df1316 | 2017-03-08 15:00:08 -0600 | [diff] [blame] | 99 | AC_OUTPUT |
| 100 | |