blob: 7d93605fa3e3599964291d71e7b85d1b1ab71bef [file] [log] [blame]
Jayanth Othayoth224882b2017-05-04 05:46:45 -05001AC_PREREQ([2.69])
2AC_INIT([phosphor-debug-collector], [1.0], [https://github.com/openbmc/phosphor-debug-collector/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
Jayanth Othayoth23ebc262017-05-25 07:22:03 -050012AC_PROG_MKDIR_P
13AC_CHECK_PROG([DIRNAME], dirname, dirname)
Jayanth Othayoth224882b2017-05-04 05:46:45 -050014
15# Check for libraries
Jayanth Othayoth1756c062017-05-23 22:48:11 -050016PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221],,\
17 AC_MSG_ERROR(["systemd required and not found."]))
Jayanth Othayoth224882b2017-05-04 05:46:45 -050018PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\
19 AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."]))
Jayanth Othayoth23ebc262017-05-25 07:22:03 -050020PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\
Jayanth Othayoth224882b2017-05-04 05:46:45 -050021 AC_MSG_ERROR(["Requires sdbusplus package."]))
Jayanth Othayoth1756c062017-05-23 22:48:11 -050022PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
23 AC_MSG_ERROR(["Requires phosphor-logging package."]))
24
25# Check for sdbus++
26AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
27AS_IF([test "x$SDBUSPLUSPLUS" == "x"],
28 AC_MSG_ERROR(["Requires sdbus++"]))
Jayanth Othayoth224882b2017-05-04 05:46:45 -050029
Jayanth Othayoth23ebc262017-05-25 07:22:03 -050030# Check for sdbus++
31AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
32AS_IF([test "x$SDBUSPLUSPLUS" == "x"],
33 AC_MSG_ERROR(["Requires sdbus++"]))
34
Jayanth Othayoth224882b2017-05-04 05:46:45 -050035# Checks for library functions
36LT_INIT # Required for systemd linking
37
38# Checks for typedefs, structures, and compiler characteristics.
39AX_CXX_COMPILE_STDCXX_14([noext])
40AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
41
42AC_ARG_VAR(DUMP_BUSNAME, [The Dbus busname to own])
Jayanth Othayoth065afc22017-06-12 11:54:14 -050043AS_IF([test "x$DUMP_BUSNAME" == "x"], [DUMP_BUSNAME="xyz.openbmc_project.Dump.Manager"])
Jayanth Othayoth224882b2017-05-04 05:46:45 -050044AC_DEFINE_UNQUOTED([DUMP_BUSNAME], ["$DUMP_BUSNAME"], [The DBus busname to own])
45
46AC_ARG_VAR(DUMP_OBJPATH, [The Dump manager Dbus root])
47AS_IF([test "x$DUMP_OBJPATH" == "x"], [DUMP_OBJPATH="/xyz/openbmc_project/dump"])
48AC_DEFINE_UNQUOTED([DUMP_OBJPATH], ["$DUMP_OBJPATH"], [The dump manager Dbus root])
49
Jayanth Othayoth1756c062017-05-23 22:48:11 -050050AC_ARG_VAR(CORE_FILE_DIR, [Directory where core dumps are placed])
51AS_IF([test "x$CORE_FILE_DIR" == "x"], [CORE_FILE_DIR="/var/lib/systemd/coredump"])
52AC_DEFINE_UNQUOTED([CORE_FILE_DIR], ["$CORE_FILE_DIR"], [Directory where core dumps are placed])
53
Jayanth Othayotha320c7c2017-06-14 07:17:21 -050054AC_ARG_VAR(OBJ_INTERNAL, [Internal Dump manager Dbus object path])
55AS_IF([test "x$OBJ_INTERNAL" == "x"], [OBJ_INTERNAL="/xyz/openbmc_project/dump/internal/manager"])
56AC_DEFINE_UNQUOTED([OBJ_INTERNAL], ["$OBJ_INTERNAL"], [Internal Dump manager Dbus object path])
57
58AC_ARG_VAR(OBJ_ENTRY, [The dump entry DBus object path.])
59AS_IF([test "x$OBJ_ENTRY" == "x"], [OBJ_ENTRY="/xyz/openbmc_project/dump/entry"])
60AC_DEFINE_UNQUOTED([OBJ_ENTRY], ["$OBJ_ENTRY"], [The dump entry DBus object path])
61
Jayanth Othayoth2dccfe42017-07-12 18:20:40 -050062AC_ARG_VAR(BMC_DUMP_PATH, [Directory where bmc dumps are placed])
63AS_IF([test "x$BMC_DUMP_PATH" == "x"], [BMC_DUMP_PATH="/tmp/dumps"])
64AC_DEFINE_UNQUOTED([BMC_DUMP_PATH], ["$BMC_DUMP_PATH"], [Directory where bmc dumps are placed])
Jayanth Othayotha320c7c2017-06-14 07:17:21 -050065
Jayanth Othayoth224882b2017-05-04 05:46:45 -050066AC_CONFIG_FILES([Makefile])
67AC_OUTPUT