configure.ac
branchstable-1.5
changeset 2433 3bdd7a747fae
parent 2419 fdb85a806585
child 2437 7b8078c1ad36
equal deleted inserted replaced
2432:f4313f5aba88 2433:3bdd7a747fae
   424 #------------------------------------------------------------------------------
   424 #------------------------------------------------------------------------------
   425 
   425 
   426 AC_ARG_WITH([rtai-dir],
   426 AC_ARG_WITH([rtai-dir],
   427     AC_HELP_STRING(
   427     AC_HELP_STRING(
   428         [--with-rtai-dir=<DIR>],
   428         [--with-rtai-dir=<DIR>],
   429         [RTAI path (only for RTAI examples)]
   429         [RTAI path, for RTDM interface and RTAI examples]
   430     ),
   430     ),
   431     [
   431     [
   432         rtaidir=[$withval]
   432         rtaidir=[$withval]
       
   433         rtai=1
   433     ],
   434     ],
   434     [
   435     [
   435         rtaidir=""
   436         rtaidir=""
       
   437         rtai=0
   436     ]
   438     ]
   437 )
   439 )
   438 
   440 
   439 AC_MSG_CHECKING([for RTAI path])
   441 AC_MSG_CHECKING([for RTAI path])
   440 
   442 
   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 
   709         examples/dc_user/Makefile
   801         examples/dc_user/Makefile
   710         examples/mini/Kbuild
   802         examples/mini/Kbuild
   711         examples/mini/Makefile
   803         examples/mini/Makefile
   712         examples/rtai/Kbuild
   804         examples/rtai/Kbuild
   713         examples/rtai/Makefile
   805         examples/rtai/Makefile
       
   806         examples/rtai_rtdm/Makefile
   714         examples/tty/Kbuild
   807         examples/tty/Kbuild
   715         examples/tty/Makefile
   808         examples/tty/Makefile
   716         examples/user/Makefile
   809         examples/user/Makefile
       
   810         examples/xenomai/Makefile
       
   811         examples/xenomai_posix/Makefile
   717         include/Makefile
   812         include/Makefile
   718         lib/Makefile
   813         lib/Makefile
   719         m4/Makefile
   814         m4/Makefile
   720         master/Kbuild
   815         master/Kbuild
   721         master/Makefile
   816         master/Makefile