Implement a cap on the number of committed errors

Resolves openbmc/openbmc#1617

Change-Id: I5850e5addb723e6f5102eb4677bb365285c1a633
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/configure.ac b/configure.ac
index 977bcb0..5cc1c2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,10 @@
     [AX_APPEND_COMPILE_FLAGS([-DPROCESS_META], [CXXFLAGS])]
 )
 
+AC_ARG_VAR(ERROR_CAP, [Max number of error entries allowed for commit])
+AS_IF([test "x$ERROR_CAP" == "x"], [ERROR_CAP=100])
+AC_DEFINE_UNQUOTED([ERROR_CAP], [$ERROR_CAP], [Max number of error entries allowed for commit])
+
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile test/Makefile])
 AC_CONFIG_FILES([phosphor-logging.pc])