configure.ac
changeset 2066 b544025bd696
parent 2060 8b67602f5161
child 2076 1baafcd263cc
equal deleted inserted replaced
2065:4d8c9a441ef6 2066:b544025bd696
   363 #------------------------------------------------------------------------------
   363 #------------------------------------------------------------------------------
   364 
   364 
   365 AC_ARG_WITH([rtai-dir],
   365 AC_ARG_WITH([rtai-dir],
   366     AC_HELP_STRING(
   366     AC_HELP_STRING(
   367         [--with-rtai-dir=<DIR>],
   367         [--with-rtai-dir=<DIR>],
   368         [RTAI path (only for RTAI examples)]
   368         [RTAI path (only for RTDM Interface or RTAI examples)]
   369     ),
   369     ),
   370     [
   370     [
   371         rtaidir=[$withval]
   371         rtaidir=[$withval]
       
   372         rtai=1
   372     ],
   373     ],
   373     [
   374     [
   374         rtaidir=""
   375         rtaidir=""
       
   376         rtai=0
   375     ]
   377     ]
   376 )
   378 )
   377 
   379 
   378 AC_MSG_CHECKING([for RTAI path])
   380 AC_MSG_CHECKING([for RTAI path])
   379 
   381 
   385     fi
   387     fi
   386     AC_MSG_RESULT([$rtaidir])
   388     AC_MSG_RESULT([$rtaidir])
   387 fi
   389 fi
   388 
   390 
   389 AC_SUBST(RTAI_DIR,[$rtaidir])
   391 AC_SUBST(RTAI_DIR,[$rtaidir])
       
   392 AM_CONDITIONAL(ENABLE_RTAI, test "x$rtai" = "x1")
       
   393 AC_SUBST(ENABLE_RTAI,[$rtai])
       
   394 
       
   395 #------------------------------------------------------------------------------
       
   396 # Xenomai path (optional)
       
   397 #------------------------------------------------------------------------------
       
   398 
       
   399 AC_ARG_WITH([xenomai-dir],
       
   400     AC_HELP_STRING(
       
   401         [--with-xenomai-dir=<DIR>],
       
   402         [Xenomai path (only for RTDM Interface)]
       
   403     ),
       
   404     [
       
   405         xenomaidir=[$withval]
       
   406         xeno=1
       
   407     ],
       
   408     [
       
   409         xenomaidir=""
       
   410         xeno=0
       
   411     ]
       
   412 )
       
   413 
       
   414 AC_MSG_CHECKING([for Xenomai path])
       
   415 
       
   416 if test -z "${xenomaidir}"; then
       
   417     AC_MSG_RESULT([not specified.])
       
   418 else
       
   419     if test \! -r ${xenomaidir}/include/xeno_config.h; then
       
   420         AC_MSG_ERROR([no Xenomai installation found in ${xenomaidir}!])
       
   421     fi
       
   422     AC_MSG_RESULT([$xenomaidir])
       
   423 fi
       
   424 
       
   425 AC_SUBST(XENOMAI_DIR,[$xenomaidir])
       
   426 AM_CONDITIONAL(ENABLE_XENOMAI, test "x$xeno" = "x1")
       
   427 AC_SUBST(ENABLE_XENOMAI,[$xeno])
       
   428 
       
   429 #------------------------------------------------------------------------------
       
   430 # RTDM Interface (optional)
       
   431 #------------------------------------------------------------------------------
       
   432 
       
   433 AC_ARG_ENABLE([rtdm],
       
   434     AC_HELP_STRING(
       
   435         [--enable-rtdm],
       
   436         [Enable RTDM Interface, depends on RTAI or Xenomai]
       
   437     ),
       
   438     [
       
   439         case "${enableval}" in
       
   440             yes) rtdm=1
       
   441                 ;;
       
   442             no) rtdm=0
       
   443                 ;;
       
   444             *) AC_MSG_ERROR([Invalid value for --enable-rtdm])
       
   445                 ;;
       
   446         esac
       
   447     ],
       
   448     [rtdm=0]
       
   449 )
       
   450 
       
   451 if test "x${rtdm}" = "x1"; then
       
   452     AC_DEFINE([EC_RTDM], [1], [RTDM interfaces enabled])
       
   453 fi
       
   454 AM_CONDITIONAL(ENABLE_RTDM, test "x$rtdm" = "x1")
       
   455 AC_SUBST(ENABLE_RTDM,[$rtdm])
       
   456 
   390 
   457 
   391 #------------------------------------------------------------------------------
   458 #------------------------------------------------------------------------------
   392 # Debug interface
   459 # Debug interface
   393 #------------------------------------------------------------------------------
   460 #------------------------------------------------------------------------------
   394 
   461 
   511 if test "x${hrtimer}" = "x1"; then
   578 if test "x${hrtimer}" = "x1"; then
   512     AC_DEFINE([EC_USE_HRTIMER], [1], [Use hrtimer for scheduling])
   579     AC_DEFINE([EC_USE_HRTIMER], [1], [Use hrtimer for scheduling])
   513 fi
   580 fi
   514 
   581 
   515 #------------------------------------------------------------------------------
   582 #------------------------------------------------------------------------------
       
   583 # Use 2 datagrams (payload+last-byte) when sending to mailbox (reduces frame size)
       
   584 #------------------------------------------------------------------------------
       
   585 
       
   586 AC_ARG_ENABLE([mboxframesize],
       
   587     AS_HELP_STRING([--enable-mboxframesize],
       
   588                    [Reduced frame size when sending to mailbox, uses 2 datagrams (default: no)]),
       
   589     [
       
   590         case "${enableval}" in
       
   591             yes) mboxframesize=1
       
   592                 ;;
       
   593             no) mboxframesize=0
       
   594                 ;;
       
   595             *) AC_MSG_ERROR([Invalid value for --enable-mboxframesize])
       
   596                 ;;
       
   597         esac
       
   598     ],
       
   599     [mboxframesize=0]
       
   600 )
       
   601 
       
   602 if test "x${mboxframesize}" = "x1"; then
       
   603     AC_DEFINE([EC_REDUCE_MBOXFRAMESIZE], [1], [Reduced frame size when sending to mailbox])
       
   604 fi
       
   605 
       
   606 
       
   607 #------------------------------------------------------------------------------
   516 # Read alias address from register
   608 # Read alias address from register
   517 #------------------------------------------------------------------------------
   609 #------------------------------------------------------------------------------
   518 
   610 
   519 AC_ARG_ENABLE([regalias],
   611 AC_ARG_ENABLE([regalias],
   520     AS_HELP_STRING([--enable-regalias],
   612     AS_HELP_STRING([--enable-regalias],
   533 )
   625 )
   534 
   626 
   535 if test "x${regalias}" = "x1"; then
   627 if test "x${regalias}" = "x1"; then
   536     AC_DEFINE([EC_REGALIAS], [1], [Read alias adresses from register])
   628     AC_DEFINE([EC_REGALIAS], [1], [Read alias adresses from register])
   537 fi
   629 fi
       
   630 
   538 
   631 
   539 #------------------------------------------------------------------------------
   632 #------------------------------------------------------------------------------
   540 # Command-line tool
   633 # Command-line tool
   541 #-----------------------------------------------------------------------------
   634 #-----------------------------------------------------------------------------
   542 
   635 
   624         examples/rtai/Kbuild
   717         examples/rtai/Kbuild
   625         examples/rtai/Makefile
   718         examples/rtai/Makefile
   626         examples/tty/Kbuild
   719         examples/tty/Kbuild
   627         examples/tty/Makefile
   720         examples/tty/Makefile
   628         examples/user/Makefile
   721         examples/user/Makefile
       
   722         examples/xenomai/Makefile
       
   723         examples/xenomai_posix/Makefile
       
   724         examples/rtai_rtdm/Makefile
   629         include/Makefile
   725         include/Makefile
   630         lib/Makefile
   726         lib/Makefile
   631         m4/Makefile
   727         m4/Makefile
   632         master/Kbuild
   728         master/Kbuild
   633         master/Makefile
   729         master/Makefile
   636         script/init.d/ethercat
   732         script/init.d/ethercat
   637         script/sysconfig/Makefile
   733         script/sysconfig/Makefile
   638         tool/Makefile
   734         tool/Makefile
   639         tty/Kbuild
   735         tty/Kbuild
   640         tty/Makefile
   736         tty/Makefile
       
   737         rtdm/Makefile
       
   738         rtdm/Kbuild
   641 ])
   739 ])
   642 AC_OUTPUT
   740 AC_OUTPUT
   643 
   741 
   644 #------------------------------------------------------------------------------
   742 #------------------------------------------------------------------------------