Enable nlohmann-json dependency in phosphor-networkd
- This commit would enable and enforce the nlohmann-json headers
as a dependency.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I73e784d92e3480faa7eb25c127df0c1cbebeb1c7
diff --git a/configure.ac b/configure.ac
index b6ffd6c..8dfe113 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,14 @@
)
AM_CONDITIONAL([FEATURE_SYNC_MAC_FROM_INVENTORY], [test x$sync_mac = xtrue])
+#check for nlohmann-json header files.
+AS_IF([test "x$sync_mac" == "xtrue"],[
+AC_CHECK_HEADER(
+ nlohmann/json.hpp,
+ [],
+ [AC_MSG_ERROR([Could not find nlohmann/json.hpp])]]
+))
+
# Create configured output.
AC_CONFIG_FILES([Makefile test/Makefile])
AC_CONFIG_FILES([xyz.openbmc_project.Network.service])