+AC_SUBST([SNMP_LIBS])
+AC_SUBST([SNMP_CFLAGS])
+
+dnl ---------------
+dnl libyang
+dnl ---------------
+PKG_CHECK_MODULES([libyang], [libyang >= 0.16.7], , [
+ AC_MSG_ERROR([libyang (>= 0.16.7) was not found on your system.])
+])
+AC_CHECK_MEMBER([struct lyd_node.priv], [], [
+ AC_MSG_ERROR([m4_normalize([
+ libyang needs to be compiled with ENABLE_LYD_PRIV=ON.
+ See http://docs.frrouting.org/projects/dev-guide/en/latest/building-libyang.html for details.])
+ ])
+], [[#include <libyang/libyang.h>]])
+
+dnl ---------------
+dnl configuration rollbacks
+dnl ---------------
+SQLITE3=false
+if test "$enable_config_rollbacks" = "yes"; then
+ PKG_CHECK_MODULES([sqlite3], [sqlite3], [
+ AC_DEFINE([HAVE_CONFIG_ROLLBACKS], [1], [Enable configuration rollbacks])
+ AC_DEFINE([HAVE_SQLITE3], [1], [Enable sqlite3 database])
+ SQLITE3=true
+ ], [
+ AC_MSG_ERROR([--enable-config-rollbacks given but sqlite3 was not found on your system.])
+ ])
+fi
+AM_CONDITIONAL([SQLITE3], [$SQLITE3])
+
+dnl ---------------
+dnl confd
+dnl ---------------
+if test "$enable_confd" != "" -a "$enable_confd" != "no"; then
+ AC_CHECK_PROG([CONFD], [confd], [confd], [/bin/false], "${enable_confd}/bin")
+ if test "x$CONFD" = "x/bin/false"; then
+ AC_MSG_ERROR([confd was not found on your system.])]
+ fi
+ CONFD_CFLAGS="-I${enable_confd}/include -L${enable_confd}/lib"
+ AC_SUBST([CONFD_CFLAGS])
+ AC_DEFINE([HAVE_CONFD], [1], [Enable confd integration])
+fi
+AM_CONDITIONAL([CONFD], [test "x$enable_confd" != "x"])
+
+dnl ---------------
+dnl sysrepo
+dnl ---------------
+if test "$enable_sysrepo" = "yes"; then
+ PKG_CHECK_MODULES([sysrepo], [libsysrepo],
+ [AC_DEFINE([HAVE_SYSREPO], [1], [Enable sysrepo integration])
+ SYSREPO=true],
+ [SYSREPO=false
+ AC_MSG_ERROR([sysrepo was not found on your system.])]
+ )
+fi
+AM_CONDITIONAL([SYSREPO], [test "x$enable_sysrepo" = "xyes"])