+dnl ------------------------------------
+dnl Enable RPKI and add librtr to libs
+dnl ------------------------------------
+if test "${enable_rpki}" = "yes"; then
+ PKG_CHECK_MODULES(RTRLIB,[rtrlib >= 0.5.0],
+ [AC_DEFINE(HAVE_RPKI,1,Enable RPKI prefix validation for BGP)
+ RPKI=true],
+ [RPKI=false
+ AC_MSG_ERROR([rtrlib was not found on your system or is too old.])]
+ )
+fi
+AM_CONDITIONAL([RPKI], test "x$RPKI" = "xtrue")
+
+dnl ------------------------------------------
+dnl Check whether rtrlib was build with ssh support
+dnl ------------------------------------------
+AC_MSG_CHECKING([whether the RTR Library is compiled with SSH])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "rtrlib/rtrlib.h"]],
+ [[struct tr_ssh_config config;]])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(FOUND_SSH,,found_ssh)],
+ AC_MSG_RESULT(no)
+)
+