Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 1 | AC_PREREQ([2.69]) |
| 2 | AC_INIT([phosphor-debug-collector], [1.0], [https://github.com/openbmc/phosphor-debug-collector/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 |
Jayanth Othayoth | 23ebc26 | 2017-05-25 07:22:03 -0500 | [diff] [blame] | 12 | AC_PROG_MKDIR_P |
| 13 | AC_CHECK_PROG([DIRNAME], dirname, dirname) |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 14 | |
| 15 | # Check for libraries |
Jayanth Othayoth | 1756c06 | 2017-05-23 22:48:11 -0500 | [diff] [blame] | 16 | PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221],,\ |
| 17 | AC_MSG_ERROR(["systemd required and not found."])) |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 18 | PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\ |
| 19 | AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."])) |
Jayanth Othayoth | 23ebc26 | 2017-05-25 07:22:03 -0500 | [diff] [blame] | 20 | PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\ |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 21 | AC_MSG_ERROR(["Requires sdbusplus package."])) |
Jayanth Othayoth | 1756c06 | 2017-05-23 22:48:11 -0500 | [diff] [blame] | 22 | PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\ |
| 23 | AC_MSG_ERROR(["Requires phosphor-logging package."])) |
| 24 | |
| 25 | # Check for sdbus++ |
| 26 | AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) |
| 27 | AS_IF([test "x$SDBUSPLUSPLUS" == "x"], |
| 28 | AC_MSG_ERROR(["Requires sdbus++"])) |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 29 | |
Jayanth Othayoth | 23ebc26 | 2017-05-25 07:22:03 -0500 | [diff] [blame] | 30 | # Check for sdbus++ |
| 31 | AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) |
| 32 | AS_IF([test "x$SDBUSPLUSPLUS" == "x"], |
| 33 | AC_MSG_ERROR(["Requires sdbus++"])) |
| 34 | |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 35 | # Checks for library functions |
| 36 | LT_INIT # Required for systemd linking |
| 37 | |
| 38 | # Checks for typedefs, structures, and compiler characteristics. |
| 39 | AX_CXX_COMPILE_STDCXX_14([noext]) |
| 40 | AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) |
| 41 | |
| 42 | AC_ARG_VAR(DUMP_BUSNAME, [The Dbus busname to own]) |
Jayanth Othayoth | 065afc2 | 2017-06-12 11:54:14 -0500 | [diff] [blame] | 43 | AS_IF([test "x$DUMP_BUSNAME" == "x"], [DUMP_BUSNAME="xyz.openbmc_project.Dump.Manager"]) |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 44 | AC_DEFINE_UNQUOTED([DUMP_BUSNAME], ["$DUMP_BUSNAME"], [The DBus busname to own]) |
| 45 | |
| 46 | AC_ARG_VAR(DUMP_OBJPATH, [The Dump manager Dbus root]) |
| 47 | AS_IF([test "x$DUMP_OBJPATH" == "x"], [DUMP_OBJPATH="/xyz/openbmc_project/dump"]) |
| 48 | AC_DEFINE_UNQUOTED([DUMP_OBJPATH], ["$DUMP_OBJPATH"], [The dump manager Dbus root]) |
| 49 | |
Jayanth Othayoth | 1756c06 | 2017-05-23 22:48:11 -0500 | [diff] [blame] | 50 | AC_ARG_VAR(CORE_FILE_DIR, [Directory where core dumps are placed]) |
| 51 | AS_IF([test "x$CORE_FILE_DIR" == "x"], [CORE_FILE_DIR="/var/lib/systemd/coredump"]) |
| 52 | AC_DEFINE_UNQUOTED([CORE_FILE_DIR], ["$CORE_FILE_DIR"], [Directory where core dumps are placed]) |
| 53 | |
Jayanth Othayoth | a320c7c | 2017-06-14 07:17:21 -0500 | [diff] [blame] | 54 | AC_ARG_VAR(OBJ_INTERNAL, [Internal Dump manager Dbus object path]) |
| 55 | AS_IF([test "x$OBJ_INTERNAL" == "x"], [OBJ_INTERNAL="/xyz/openbmc_project/dump/internal/manager"]) |
| 56 | AC_DEFINE_UNQUOTED([OBJ_INTERNAL], ["$OBJ_INTERNAL"], [Internal Dump manager Dbus object path]) |
| 57 | |
| 58 | AC_ARG_VAR(OBJ_ENTRY, [The dump entry DBus object path.]) |
| 59 | AS_IF([test "x$OBJ_ENTRY" == "x"], [OBJ_ENTRY="/xyz/openbmc_project/dump/entry"]) |
| 60 | AC_DEFINE_UNQUOTED([OBJ_ENTRY], ["$OBJ_ENTRY"], [The dump entry DBus object path]) |
| 61 | |
Jayanth Othayoth | 2dccfe4 | 2017-07-12 18:20:40 -0500 | [diff] [blame] | 62 | AC_ARG_VAR(BMC_DUMP_PATH, [Directory where bmc dumps are placed]) |
Jayanth Othayoth | d7b95d5 | 2017-08-26 03:13:37 -0500 | [diff] [blame] | 63 | AS_IF([test "x$BMC_DUMP_PATH" == "x"], [BMC_DUMP_PATH="/var/lib/phosphor-debug-collector/dumps/"]) |
Jayanth Othayoth | 2dccfe4 | 2017-07-12 18:20:40 -0500 | [diff] [blame] | 64 | AC_DEFINE_UNQUOTED([BMC_DUMP_PATH], ["$BMC_DUMP_PATH"], [Directory where bmc dumps are placed]) |
Jayanth Othayoth | a320c7c | 2017-06-14 07:17:21 -0500 | [diff] [blame] | 65 | |
Jayanth Othayoth | ab7f920 | 2017-08-02 06:24:58 -0500 | [diff] [blame] | 66 | AC_ARG_VAR(BMC_DUMP_MAX_SIZE, [Maximum size of one bmc dump in kilo bytes]) |
| 67 | AS_IF([test x$BMC_DUMP_MAX_SIZE == x], [BMC_DUMP_MAX_SIZE=200]) |
| 68 | AC_DEFINE_UNQUOTED([BMC_DUMP_MAX_SIZE], [$BMC_DUMP_MAX_SIZE], [Maximum size of one bmc dump in kilo bytes]) |
| 69 | |
Jayanth Othayoth | 104f57c | 2017-08-09 06:19:32 -0500 | [diff] [blame] | 70 | AC_ARG_VAR(BMC_DUMP_MIN_SPACE_REQD, [Minimum space required for one bmc dump in kilo bytes]) |
| 71 | AS_IF([test x$BMC_DUMP_MIN_SPACE_REQD == x], [BMC_DUMP_MIN_SPACE_REQD=20]) |
| 72 | AC_DEFINE_UNQUOTED([BMC_DUMP_MIN_SPACE_REQD], [$BMC_DUMP_MIN_SPACE_REQD], [Minimum space required for one bmc dump in kilo bytes]) |
| 73 | |
Jayanth Othayoth | ab7f920 | 2017-08-02 06:24:58 -0500 | [diff] [blame] | 74 | AC_ARG_VAR(BMC_DUMP_TOTAL_SIZE, [Total size of the bmc dump in kilo bytes]) |
| 75 | AS_IF([test x$BMC_DUMP_TOTAL_SIZE == x], [BMC_DUMP_TOTAL_SIZE=1024]) |
| 76 | AC_DEFINE_UNQUOTED([BMC_DUMP_TOTAL_SIZE], [$BMC_DUMP_TOTAL_SIZE], [Total size of the dump in kilo bytes]) |
| 77 | |
Jayanth Othayoth | d0f0064 | 2017-09-04 06:26:30 -0500 | [diff] [blame] | 78 | AC_DEFINE(OBJ_LOGGING, "/xyz/openbmc_project/logging", [The log manager DBus object path.]) |
| 79 | |
Jayanth Othayoth | 2496482 | 2017-09-04 22:07:06 -0500 | [diff] [blame] | 80 | AC_ARG_VAR(ELOG_ID_PERSIST_PATH, [Path of file for storing elog id's, which have associated dumps]) |
| 81 | AS_IF([test "x$ELOG_ID_PERSIST_PATH" == "x"], \ |
| 82 | [ELOG_ID_PERSIST_PATH="/var/lib/phosphor-debug-collector/elogid"]) |
| 83 | AC_DEFINE_UNQUOTED([ELOG_ID_PERSIST_PATH], ["$ELOG_ID_PERSIST_PATH"], \ |
| 84 | [Path of file for storing elog id's, which have associated dumps]) |
| 85 | |
Vishwanatha Subbanna | 3108597 | 2017-10-05 17:06:37 +0530 | [diff] [blame] | 86 | AC_ARG_VAR(CLASS_VERSION, [Class version to register with Cereal]) |
| 87 | AS_IF([test "x$CLASS_VERSION" == "x"], [CLASS_VERSION=1]) |
| 88 | AC_DEFINE_UNQUOTED([CLASS_VERSION], [$CLASS_VERSION], [Class version to register with Cereal]) |
| 89 | |
Jayanth Othayoth | 7f2f802 | 2017-09-22 11:22:25 -0500 | [diff] [blame] | 90 | AC_ARG_ENABLE([ubifs-workaround], |
| 91 | AS_HELP_STRING([--enable-ubifs-workaround], |
| 92 | [Turn on ubi workaround for core file]) |
| 93 | ) |
| 94 | AS_IF([test "x$enable_ubifs_workaround" != "xno"], |
| 95 | [AC_DEFINE([UBI_CORE_FILE_WORKAROUND], [], |
| 96 | [Turn on ubi workaround for core file])] |
| 97 | ) |
| 98 | |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 99 | AC_CONFIG_FILES([Makefile]) |
| 100 | AC_OUTPUT |