Initial commit for the Dump core file monitor infrastructure.

Add an inotify watch to the known core dump location.

Resolves openbmc/openbmc#1504

Change-Id: I0093c9f601d82917ca2efb53a4d47ed98f0eaa7f
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/configure.ac b/configure.ac
index 9cf8ba2..fb1f382 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,10 +13,19 @@
 AC_CHECK_PROG([DIRNAME], dirname, dirname)
 
 # Check for libraries
+PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221],,\
+    AC_MSG_ERROR(["systemd required and not found."]))
 PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces],,\
     AC_MSG_ERROR(["Requires phosphor-dbus-interfaces package."]))
 PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\
     AC_MSG_ERROR(["Requires sdbusplus package."]))
+PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
+    AC_MSG_ERROR(["Requires phosphor-logging package."]))
+
+# Check for sdbus++
+AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
+AS_IF([test "x$SDBUSPLUSPLUS" == "x"],
+    AC_MSG_ERROR(["Requires sdbus++"]))
 
 # Check for sdbus++
 AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++])
@@ -38,5 +47,9 @@
 AS_IF([test "x$DUMP_OBJPATH" == "x"], [DUMP_OBJPATH="/xyz/openbmc_project/dump"])
 AC_DEFINE_UNQUOTED([DUMP_OBJPATH], ["$DUMP_OBJPATH"], [The dump manager Dbus root])
 
+AC_ARG_VAR(CORE_FILE_DIR, [Directory where core dumps are placed])
+AS_IF([test "x$CORE_FILE_DIR" == "x"], [CORE_FILE_DIR="/var/lib/systemd/coredump"])
+AC_DEFINE_UNQUOTED([CORE_FILE_DIR], ["$CORE_FILE_DIR"], [Directory where core dumps are placed])
+
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT