443 else |
445 else |
444 if test \! -r ${rtaidir}/include/rtai.h; then |
446 if test \! -r ${rtaidir}/include/rtai.h; then |
445 AC_MSG_ERROR([no RTAI installation found in ${rtaidir}!]) |
447 AC_MSG_ERROR([no RTAI installation found in ${rtaidir}!]) |
446 fi |
448 fi |
447 AC_MSG_RESULT([$rtaidir]) |
449 AC_MSG_RESULT([$rtaidir]) |
|
450 |
|
451 rtai_lxrt_cflags=`$rtaidir/bin/rtai-config --lxrt-cflags` |
|
452 rtai_lxrt_ldflags=`$rtaidir/bin/rtai-config --lxrt-ldflags` |
448 fi |
453 fi |
449 |
454 |
450 AC_SUBST(RTAI_DIR,[$rtaidir]) |
455 AC_SUBST(RTAI_DIR,[$rtaidir]) |
|
456 AM_CONDITIONAL(ENABLE_RTAI, test "x$rtai" = "x1") |
|
457 AC_SUBST(ENABLE_RTAI,[$rtai]) |
|
458 |
|
459 AC_SUBST(RTAI_LXRT_CFLAGS,[$rtai_lxrt_cflags]) |
|
460 AC_SUBST(RTAI_LXRT_LDFLAGS,[$rtai_lxrt_ldflags]) |
|
461 |
|
462 #------------------------------------------------------------------------------ |
|
463 # Xenomai path (optional) |
|
464 #------------------------------------------------------------------------------ |
|
465 |
|
466 AC_ARG_WITH([xenomai-dir], |
|
467 AC_HELP_STRING( |
|
468 [--with-xenomai-dir=<DIR>], |
|
469 [Xenomai path, for RTDM interface and Xenomai examples] |
|
470 ), |
|
471 [ |
|
472 xenomaidir=[$withval] |
|
473 xeno=1 |
|
474 ], |
|
475 [ |
|
476 xenomaidir="" |
|
477 xeno=0 |
|
478 ] |
|
479 ) |
|
480 |
|
481 AC_MSG_CHECKING([for Xenomai path]) |
|
482 |
|
483 if test -z "${xenomaidir}"; then |
|
484 AC_MSG_RESULT([not specified.]) |
|
485 else |
|
486 if test \! -r ${xenomaidir}/include/xeno_config.h; then |
|
487 AC_MSG_ERROR([no Xenomai installation found in ${xenomaidir}!]) |
|
488 fi |
|
489 AC_MSG_RESULT([$xenomaidir]) |
|
490 |
|
491 xeno_native_cflags=`$xenomaidir/bin/xeno-config --skin native --cflags` |
|
492 xeno_native_ldflags=`$xenomaidir/bin/xeno-config --skin native --ldflags` |
|
493 xeno_posix_cflags=`$xenomaidir/bin/xeno-config --skin posix --cflags` |
|
494 xeno_posix_ldflags=`$xenomaidir/bin/xeno-config --skin posix --ldflags` |
|
495 xeno_rtdm_cflags=`$xenomaidir/bin/xeno-config --skin rtdm --cflags` |
|
496 xeno_rtdm_ldflags=`$xenomaidir/bin/xeno-config --skin rtdm --ldflags` |
|
497 fi |
|
498 |
|
499 AC_SUBST(XENOMAI_DIR,[$xenomaidir]) |
|
500 AM_CONDITIONAL(ENABLE_XENOMAI, test "x$xeno" = "x1") |
|
501 AC_SUBST(ENABLE_XENOMAI,[$xeno]) |
|
502 |
|
503 AC_SUBST(XENOMAI_NATIVE_CFLAGS,[$xeno_native_cflags]) |
|
504 AC_SUBST(XENOMAI_NATIVE_LDFLAGS,[$xeno_native_ldflags]) |
|
505 AC_SUBST(XENOMAI_POSIX_CFLAGS,[$xeno_posix_cflags]) |
|
506 AC_SUBST(XENOMAI_POSIX_LDFLAGS,[$xeno_posix_ldflags]) |
|
507 AC_SUBST(XENOMAI_RTDM_CFLAGS,[$xeno_rtdm_cflags]) |
|
508 AC_SUBST(XENOMAI_RTDM_LDFLAGS,[$xeno_rtdm_ldflags]) |
|
509 |
|
510 #------------------------------------------------------------------------------ |
|
511 # RTDM interface (optional) |
|
512 #------------------------------------------------------------------------------ |
|
513 |
|
514 AC_ARG_ENABLE([rtdm], |
|
515 AC_HELP_STRING( |
|
516 [--enable-rtdm], |
|
517 [Enable RTDM interface, depends on RTAI or Xenomai] |
|
518 ), |
|
519 [ |
|
520 case "${enableval}" in |
|
521 yes) rtdm=1 |
|
522 ;; |
|
523 no) rtdm=0 |
|
524 ;; |
|
525 *) AC_MSG_ERROR([Invalid value for --enable-rtdm]) |
|
526 ;; |
|
527 esac |
|
528 ], |
|
529 [rtdm=0] |
|
530 ) |
|
531 |
|
532 AC_MSG_CHECKING([whether to build RTDM interface]) |
|
533 |
|
534 if test "x${rtdm}" = "x1"; then |
|
535 AC_DEFINE([EC_RTDM], [1], [RTDM interface enabled]) |
|
536 AC_MSG_RESULT([yes]) |
|
537 else |
|
538 AC_MSG_RESULT([no]) |
|
539 fi |
|
540 |
|
541 AM_CONDITIONAL(ENABLE_RTDM, test "x$rtdm" = "x1") |
|
542 AC_SUBST(ENABLE_RTDM,[$rtdm]) |
451 |
543 |
452 #------------------------------------------------------------------------------ |
544 #------------------------------------------------------------------------------ |
453 # Debug interface |
545 # Debug interface |
454 #------------------------------------------------------------------------------ |
546 #------------------------------------------------------------------------------ |
455 |
547 |