Reconstruct OCC objects on app restart

The OCC objects would get created when corresponding CPU inventory items
get added. This doesn't cover a scenario where the OCC app restarts.

If the CPU inventory is already present when the app starts, construct
OCC objects as well.

Resolves openbmc/openbmc#1824.

Change-Id: I4994d93ba6f528ca67977604ccb1da717563092a
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/configure.ac b/configure.ac
index dadc118..06497f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,6 +101,10 @@
 AS_IF([test "x$PS_DERATING_FACTOR" == "x"], [PS_DERATING_FACTOR=90])
 AC_DEFINE_UNQUOTED([PS_DERATING_FACTOR], [$PS_DERATING_FACTOR], [The power supply derating factor])
 
+AC_ARG_VAR(CPU_SUBPATH, [The subpath containing CPU objects])
+AS_IF([test "x$CPU_SUBPATH" == "x"], [CPU_SUBPATH="/xyz/openbmc_project/inventory/system/chassis/motherboard"])
+AC_DEFINE_UNQUOTED([CPU_SUBPATH], ["$CPU_SUBPATH"], [The subpath containing CPU objects])
+
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile test/Makefile])
 AC_OUTPUT