sensor-mon: Create sensor-monitor application

This is a new application that will be used to take actions based on
sensor values or sensor threshold alarm values.  It's not built unless
the --enable-sensor-monitor option is used.

The first behavior will be to do power offs and create event logs based
on the xyz.openbmc_project.Sensor.Threshold.HardShutdown and
SoftShutdown threshold interfaces that may be present on sensor object
paths.  It will watch the high and low alarm properties on those
interfaces.  This could then be used to power off the system after some
delay if some sensor value gets too high or low, such as a high ambient
or a low voltage.

This first commit in the series creates the application and a new
ShutdownAlarmMonitor class, which is where the monitoring will happen.
Initially, it just finds all existing soft and hard shutdown interfaces
on D-Bus and puts them in a map.  It also registers for properties
changed signals for those interfaces.

Note that the interfacesAdded signal doesn't need to be used because all
sensor applications today emit propertiesChanged signals when they first
start up anyway.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia5b82fcbe32f65d94b23bf26a025202a7f885183
diff --git a/configure.ac b/configure.ac
index 230cd1d..d89fa3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,8 @@
     AS_HELP_STRING([--disable-cooling-type], [Disable cooling-type package.]))
 AC_ARG_ENABLE([monitor],
     AS_HELP_STRING([--disable-monitor], [Disable monitor]))
+AC_ARG_ENABLE([sensor-monitor],
+    AS_HELP_STRING([--enable-sensor-monitor], [Enable sensor monitor]))
 
 AM_CONDITIONAL([WANT_JSON], [test "x$enable_json" == "xyes"])
 AM_CONDITIONAL([WANT_JSON_CONTROL], [test "x$enable_json" == "xyes" -a "x$enable_json_control" != "xno"])
@@ -78,6 +80,7 @@
 AM_CONDITIONAL([WANT_CONTROL], [test "x$enable_control" != "xno"])
 AM_CONDITIONAL([WANT_COOLING_TYPE], [test "x$enable_cooling_type" != "xno"])
 AM_CONDITIONAL([WANT_MONITOR], [test "x$enable_monitor" != "xno"])
+AM_CONDITIONAL([WANT_SENSOR_MONITOR], [test "x$enable_sensor_monitor" == "xyes"])
 
 # Package specific checks.
 AS_IF([test "x$enable_presence" != "xno"], [
@@ -228,6 +231,11 @@
     AC_CONFIG_FILES([monitor/Makefile])
 ])
 
+AS_IF([test "x$enable_sensor_monitor" == "xyes"], [
+
+    AC_CONFIG_FILES([sensor-monitor/Makefile])
+])
+
 # Create configured output
 AC_CONFIG_FILES([Makefile test/Makefile presence/test/Makefile monitor/test/Makefile])
 AC_OUTPUT