Enable Cereal class versioning

Cereal class versioning helps to handle data de-serialization
across different class versions that differ in the way, a
particular data is serialized.

Change-Id: Ica01c4cb0c213e0dca8824fcfcfaa5cb43c5bc2e
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/configure.ac b/configure.ac
index 5cc1c2e..f912e14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,10 @@
 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_ARG_VAR(CLASS_VERSION, [Class version to register with Cereal])
+AS_IF([test "x$CLASS_VERSION" == "x"], [CLASS_VERSION=1])
+AC_DEFINE_UNQUOTED([CLASS_VERSION], [$CLASS_VERSION], [Class version to register with Cereal])
+
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile test/Makefile])
 AC_CONFIG_FILES([phosphor-logging.pc])