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