AS_HELP_STRING([--enable-systemd], [enable Systemd support]))
AC_ARG_ENABLE(poll,
AS_HELP_STRING([--enable-poll], [enable usage of Poll instead of select]))
+AC_ARG_ENABLE(mpls,
+ AS_HELP_STRING([--enable-mpls], [enable MPLS support - requires compatible kernel]))
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--enable-werror], [enable -Werror (recommended for developers only)]))
AC_ARG_ENABLE(cumulus,
AC_DEFINE(HAVE_POLL,,Compile systemd support in)
fi
+dnl ----------
+dnl MPLS check
+dnl ----------
+MPLS_METHOD=""
+AC_MSG_CHECKING(whether this OS has MPLS stack)
+if test "x${enable_mpls}" = "xyes"; then
+ case "$host" in
+ *-linux*)
+ AC_DEFINE(HAVE_MPLS,,Enable MPLS)
+ MPLS_METHOD="zebra_mpls_netlink.o"
+ AC_MSG_RESULT(Linux MPLS)
+ ;;
+ *)
+ AC_MSG_RESULT(Unsupported kernel)
+ MPLS_METHOD="zebra_mpls_null.o"
+ ;;
+ esac
+else
+ AC_MSG_RESULT(disabled)
+ MPLS_METHOD="zebra_mpls_null.o"
+fi
+AC_SUBST(MPLS_METHOD)
+
if test "${enable_cumulus}" = "yes" ; then
AC_DEFINE(HAVE_CUMULUS,,Compile Special Cumulus Code in)
fi