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]) |
| 63 | AS_IF([test "x$BMC_DUMP_PATH" == "x"], [BMC_DUMP_PATH="/tmp/dumps"]) |
| 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 | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 66 | AC_CONFIG_FILES([Makefile]) |
| 67 | AC_OUTPUT |