diff -r 19732da2cf86 -r 3001f6523e63 configure.ac --- a/configure.ac Fri May 13 15:33:16 2011 +0200 +++ b/configure.ac Fri May 13 15:34:20 2011 +0200 @@ -365,13 +365,15 @@ AC_ARG_WITH([rtai-dir], AC_HELP_STRING( [--with-rtai-dir=], - [RTAI path (only for RTAI examples)] + [RTAI path (only for RTDM Interface or RTAI examples)] ), [ rtaidir=[$withval] + rtai=1 ], [ rtaidir="" + rtai=0 ] ) @@ -387,6 +389,71 @@ fi AC_SUBST(RTAI_DIR,[$rtaidir]) +AM_CONDITIONAL(ENABLE_RTAI, test "x$rtai" = "x1") +AC_SUBST(ENABLE_RTAI,[$rtai]) + +#------------------------------------------------------------------------------ +# Xenomai path (optional) +#------------------------------------------------------------------------------ + +AC_ARG_WITH([xenomai-dir], + AC_HELP_STRING( + [--with-xenomai-dir=], + [Xenomai path (only for RTDM Interface)] + ), + [ + xenomaidir=[$withval] + xeno=1 + ], + [ + xenomaidir="" + xeno=0 + ] +) + +AC_MSG_CHECKING([for Xenomai path]) + +if test -z "${xenomaidir}"; then + AC_MSG_RESULT([not specified.]) +else + if test \! -r ${xenomaidir}/include/xeno_config.h; then + AC_MSG_ERROR([no Xenomai installation found in ${xenomaidir}!]) + fi + AC_MSG_RESULT([$xenomaidir]) +fi + +AC_SUBST(XENOMAI_DIR,[$xenomaidir]) +AM_CONDITIONAL(ENABLE_XENOMAI, test "x$xeno" = "x1") +AC_SUBST(ENABLE_XENOMAI,[$xeno]) + +#------------------------------------------------------------------------------ +# RTDM Interface (optional) +#------------------------------------------------------------------------------ + +AC_ARG_ENABLE([rtdm], + AC_HELP_STRING( + [--enable-rtdm], + [Enable RTDM Interface, depends on RTAI or Xenomai] + ), + [ + case "${enableval}" in + yes) rtdm=1 + ;; + no) rtdm=0 + ;; + *) AC_MSG_ERROR([Invalid value for --enable-rtdm]) + ;; + esac + ], + [rtdm=0] +) + +if test "x${rtdm}" = "x1"; then + AC_DEFINE([EC_RTDM], [1], [RTDM interfaces enabled]) +fi +AM_CONDITIONAL(ENABLE_RTDM, test "x$rtdm" = "x1") +AC_SUBST(ENABLE_RTDM,[$rtdm]) + #------------------------------------------------------------------------------ # Debug interface @@ -513,6 +580,31 @@ fi #------------------------------------------------------------------------------ +# Use 2 datagrams (payload+last-byte) when sending to mailbox (reduces frame size) +#------------------------------------------------------------------------------ + +AC_ARG_ENABLE([mboxframesize], + AS_HELP_STRING([--enable-mboxframesize], + [Reduced frame size when sending to mailbox, uses 2 datagrams (default: no)]), + [ + case "${enableval}" in + yes) mboxframesize=1 + ;; + no) mboxframesize=0 + ;; + *) AC_MSG_ERROR([Invalid value for --enable-mboxframesize]) + ;; + esac + ], + [mboxframesize=0] +) + +if test "x${mboxframesize}" = "x1"; then + AC_DEFINE([EC_REDUCE_MBOXFRAMESIZE], [1], [Reduced frame size when sending to mailbox]) +fi + + +#------------------------------------------------------------------------------ # Read alias address from register #------------------------------------------------------------------------------ @@ -536,6 +628,7 @@ AC_DEFINE([EC_REGALIAS], [1], [Read alias adresses from register]) fi + #------------------------------------------------------------------------------ # Command-line tool #----------------------------------------------------------------------------- @@ -626,6 +719,9 @@ examples/tty/Kbuild examples/tty/Makefile examples/user/Makefile + examples/xenomai/Makefile + examples/xenomai_posix/Makefile + examples/rtai_rtdm/Makefile include/Makefile lib/Makefile m4/Makefile @@ -638,6 +734,8 @@ tool/Makefile tty/Kbuild tty/Makefile + rtdm/Makefile + rtdm/Kbuild ]) AC_OUTPUT