Enable sync-mac flag for networkd

- This commit enables the sync-mac flag support for
  networkd.

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I4ff7554bd5b60e6cb9f16866aae72b810ea05056
diff --git a/Makefile.am b/Makefile.am
index 3649ca8..d27b304 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -105,6 +105,10 @@
 phosphor_network_manager_CXXFLAGS += -DNIC_SUPPORTS_ETHTOOL
 endif
 
+if FEATURE_SYNC_MAC_FROM_INVENTORY
+phosphor_network_manager_CXXFLAGS += -DSYNC_MAC_FROM_INVENTORY
+endif
+
 xyz/openbmc_project/Network/VLAN/Create/server.cpp: xyz/openbmc_project/Network/VLAN/Create.interface.yaml xyz/openbmc_project/Network/VLAN/Create/server.hpp
 	@mkdir -p `dirname $@`
 	$(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp xyz.openbmc_project.Network.VLAN.Create > $@
diff --git a/configure.ac b/configure.ac
index 1dc2bf0..b6ffd6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,6 +130,18 @@
       )
 AM_CONDITIONAL([FEATURE_NIC_ETHTOOL], [test x$nic_ethtool = xtrue])
 
+# Configure option to enable sync operation between the MAC address in the Inventory 
+# on to the respective ethernet interface
+AC_ARG_ENABLE([sync_mac],
+    [  --enable-sync-mac  Enable/disable sync mac mapping for ethernet interface],
+    [case "${enableval}" in
+      yes) sync_mac=true ;;
+      no) sync_mac=false ;;
+      *) AC_MSG_ERROR([bad value ${sync_mac} for --enable-sync-mac]) ;;
+      esac],[sync_mac=false]
+      )
+AM_CONDITIONAL([FEATURE_SYNC_MAC_FROM_INVENTORY], [test x$sync_mac = xtrue])
+
 # Create configured output.
 AC_CONFIG_FILES([Makefile test/Makefile])
 AC_CONFIG_FILES([xyz.openbmc_project.Network.service])