Jayanth Othayoth | 0aa0d11 | 2018-09-03 03:47:27 -0500 | [diff] [blame] | 1 | # Initialization |
| 2 | AC_PREREQ([2.69]) |
| 3 | AC_INIT([phosphor-certificate-manager], [1.0], [https://github.com/openbmc/phosphor-certificate-manager/issues]) |
| 4 | AC_LANG([C++]) |
| 5 | AC_CONFIG_HEADERS([config.h]) |
| 6 | AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz]) |
| 7 | AM_SILENT_RULES([yes]) |
| 8 | |
| 9 | # Checks for programs. |
| 10 | AC_PROG_CXX |
| 11 | AC_PROG_INSTALL |
| 12 | AC_PROG_MAKE_SET |
| 13 | |
| 14 | # Checks for library functions |
| 15 | LT_INIT # Required for systemd linking |
| 16 | |
| 17 | # Checks for typedefs, structures, and compiler characteristics. |
| 18 | AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) |
| 19 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 20 | |
Jayanth Othayoth | cfbc8dc | 2018-09-03 07:22:27 -0500 | [diff] [blame^] | 21 | # Check for libraries |
| 22 | PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\ |
| 23 | AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."])) |
| 24 | PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],, |
| 25 | AC_MSG_ERROR(["Requires sdbusplus package."])) |
| 26 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\ |
| 27 | AC_MSG_ERROR(["Requires phosphor-logging package."])) |
| 28 | |
| 29 | # Code coverage |
| 30 | AX_CODE_COVERAGE |
| 31 | |
| 32 | AC_ARG_VAR(BUSNAME, [The D-Bus busname to own]) |
| 33 | AS_IF([test "x$BUSNAME" == "x"], [BUSNAME="xyz.openbmc_project.Certs.Manager"]) |
| 34 | AC_DEFINE_UNQUOTED([BUSNAME], ["$BUSNAME"], [The D-Bus busname to own]) |
| 35 | AC_ARG_VAR(OBJPATH, [The certificate manager D-Bus root]) |
| 36 | AS_IF([test "x$OBJPATH" == "x"], [OBJPATH="/xyz/openbmc_project/certs"]) |
| 37 | AC_DEFINE_UNQUOTED([OBJPATH], ["$OBJPATH"], [The certificate manager D-Bus root]) |
| 38 | |
Jayanth Othayoth | 0aa0d11 | 2018-09-03 03:47:27 -0500 | [diff] [blame] | 39 | # Create configured output |
| 40 | AC_CONFIG_FILES([Makefile]) |
| 41 | AC_OUTPUT |