dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT(rtai,3.1,rtai@rtai.org) CONFIG_RTAI_VERSION_MAJOR=3 CONFIG_RTAI_VERSION_MINOR=1 CONFIG_RTAI_REVISION_LEVEL=0 AC_CONFIG_HEADERS(rtai_config.h) AC_CONFIG_AUX_DIR(rtai-core/config/autoconf) AC_CONFIG_SRCDIR(rtai-core/sched/rtai/sched_up.c) AC_PREFIX_DEFAULT(/usr/realtime) AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_PROG_INSTALL AC_ARG_WITH(CC, [ --with-cc=compiler use specific C compiler], [ case "$withval" in "" | y | ye | yes | n | no) AC_MSG_ERROR([You must supply an argument to --with-cc.]) ;; esac CC="$withval" ]) AC_PROG_CC CFLAGS="" AC_ARG_WITH(CXX, [ --with-cxx=compiler use specific C++ compiler], [ case "$withval" in "" | y | ye | yes | n | no) AC_MSG_ERROR([You must supply an argument to --with-cxx.]) ;; esac CXX="$withval" ]) AC_PROG_CXX CXXFLAGS="" AC_DEFINE_UNQUOTED(CONFIG_RTAI_BUILD_STRING,"$build",[Build system alias]) RTAI_BUILD_STRING="$build" AC_DEFINE_UNQUOTED(CONFIG_RTAI_HOST_STRING,"$host",[Host system alias]) RTAI_HOST_STRING="$host" AC_DEFINE_UNQUOTED(CONFIG_RTAI_COMPILER,"`$CC -v 2>&1 | tail -n 1`",[Compiler]) AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2]) AM_MAINTAINER_MODE AC_PROG_LIBTOOL AM_PROG_AS AM_PROG_LEX dnl Find arch-specific requirements and supports. Features which dnl are not supported by all archs must be listed here, so that a dnl an Autoconf flag can later be defined/undefined in rtai_config.h. arch_supports_lxrt= arch_supports_leds= arch_supports_sim= arch_supports_rtailab= case "$host" in i*86*-*) RTAI_TARGET_ARCH=i386 arch_supports_lxrt=y arch_supports_leds=y arch_supports_sim=y arch_supports_rtailab=y wanted_kernel_arch=CONFIG_X86 ;; arm-*) RTAI_TARGET_ARCH=arm wanted_kernel_arch=CONFIG_ARM ;; powerpc-*|ppc-*) RTAI_TARGET_ARCH=ppc wanted_kernel_arch=CONFIG_PPC ;; mips-*|mipsel-*) RTAI_TARGET_ARCH=mips wanted_kernel_arch=CONFIG_MIPS ;; cris-*) RTAI_TARGET_ARCH=cris dnl There is no non-ambiguous CONFIG_ETRAX|CRIS symbol dnl so use the root device definition. wanted_kernel_arch=CONFIG_ETRAX_ROOT_DEVICE ;; *) echo "" echo "*******************************************" echo "Still unsupported host: $host -- Sorry." echo "*******************************************" echo "" exit 1;; esac dnl dnl Load the RTAI configuration. dnl RTAI_KCONFIG_FILE=$srcdir/rtai-core/arch/$RTAI_TARGET_ARCH/defconfig kconfig_type=default AC_ARG_WITH(kconfig-file, [ --with-kconfig-file= KConfig parameter file], [ case "$withval" in "" | y | ye | yes | n | no) AC_MSG_ERROR([You must supply an argument to --with-kconfig-file.]) ;; esac RTAI_KCONFIG_FILE="$withval" kconfig_type=supplied ]) AC_MSG_CHECKING([for RTAI Kconfig file]) if test \! -f $RTAI_KCONFIG_FILE; then AC_MSG_ERROR([Kconfig-file $RTAI_KCONFIG_FILE not found -- --with-kconfig-file sets Kconfig file]) fi . $RTAI_KCONFIG_FILE AC_MSG_RESULT([$RTAI_KCONFIG_FILE ($kconfig_type)]) dnl dnl Installation directory for modules dnl AC_MSG_CHECKING([for module installation directory]) AC_ARG_WITH(module-dir, [ --with-module-dir= Installation directory for modules], [ case "$withval" in "" | y | ye | yes | n | no) AC_MSG_ERROR([You must supply an argument to --with-module-dir.]) ;; esac RTAI_MODULE_DIR="$withval" ]) dnl Are we building into the source tree? if test "$srcdir" = `pwd`; then CONFIG_RTAI_OLD_FASHIONED_BUILD=y else CONFIG_RTAI_OLD_FASHIONED_BUILD= fi dnl Set a default module dir if unspecified if test "x" = "x$RTAI_MODULE_DIR" then RTAI_MODULE_DIR='${exec_prefix}/modules' fi AC_MSG_RESULT([$RTAI_MODULE_DIR]) CONFIG_RTAI_MODULE_DIR=$RTAI_MODULE_DIR dnl dnl Process the Linux kernel configuration dnl AC_MSG_CHECKING([for Linux source tree]) dnl CONFIG_MODULES has been forcibly set in RTAI's configuration dnl file, therefore we must unset it before later checking if the kernel dnl actually defined it as required too. unset CONFIG_MODULES RTAI_LINUX_DIR=$CONFIG_RTAI_LINUXDIR AC_ARG_WITH(linux-dir, [ --with-linux-dir= RTAI-enabled Linux kernel tree], [ case "$withval" in "" ) if test x${CONFIG_RTAI_LINUXDIR} = x; then AC_MSG_ERROR([You must supply an argument to --with-linux-dir.]) else withval=${CONFIG_RTAI_LINUXDIR} fi ;; y | ye | yes | n | no) AC_MSG_ERROR([You must supply an argument to --with-linux-dir.]) ;; esac RTAI_LINUX_DIR="$withval" ]) if test x${RTAI_LINUX_DIR} = x; then echo AC_MSG_ERROR([Linux kernel tree not specified -- use --with-linux-dir]) fi if test \! -r ${RTAI_LINUX_DIR}/Makefile; then echo AC_MSG_ERROR([No Linux kernel tree in ${RTAI_LINUX_DIR}]) fi eval linux_`grep '^EXTRAVERSION =' $RTAI_LINUX_DIR/Makefile | sed -e 's, ,,g'` eval linux_`grep '^PATCHLEVEL =' $RTAI_LINUX_DIR/Makefile | sed -e 's, ,,g'` eval linux_`grep '^SUBLEVEL =' $RTAI_LINUX_DIR/Makefile | sed -e 's, ,,g'` eval linux_`grep '^VERSION =' $RTAI_LINUX_DIR/Makefile | sed -e 's, ,,g'` dnl Load Linux kernel configuration now, before config symbols are tested. if test \! -r ${RTAI_LINUX_DIR}/.config; then AC_MSG_RESULT([invalid]) AC_MSG_ERROR([$RTAI_LINUX_DIR is not configured -- --with-linux-dir sets linux-dir]) fi . $RTAI_LINUX_DIR/.config RTAI_LINUX_VERSION="$linux_VERSION.$linux_PATCHLEVEL.$linux_SUBLEVEL" AC_MSG_RESULT([$RTAI_LINUX_DIR (kernel ${RTAI_LINUX_VERSION}${CONFIG_SMP:+-SMP})]) if test x${CONFIG_RTAI_LINUXDIR} = x; then CONFIG_RTAI_LINUXDIR=$RTAI_LINUX_DIR fi dnl dnl Identify the base technology used. dnl unset CONFIG_RTAI_ADEOS AC_MSG_CHECKING([for RTAI base technology]) if test -r $RTAI_LINUX_DIR/include/linux/adeos.h; then AC_DEFINE(CONFIG_RTAI_ADEOS,1,[Use Adeos-based HAL]) AC_MSG_RESULT([Adeos]) CONFIG_RTAI_ADEOS=y elif test x${CONFIG_RTHAL} = xy; then dnl This test has a flaw. CONFIG_RTHAL could be undefined even for dnl a patched kernel if the RTAI support has been configured out. dnl This is the reason why the error message remains ambiguous. dnl We should definitely have _one_ common way of identifying the dnl RTHAL signature inside a kernel tree, that does not rely on dnl the Makefile's EXTRAVERSION variable, because it happened that dnl some people change its value manually to suit their needs... if test "$CONFIG_X86" = y; then echo AC_MSG_ERROR([The legacy RTHAL/x86 has been obsoleted - Please use Adeos instead]) else AC_MSG_RESULT([RTHAL]) fi dnl Need Adeos to run Xenomai in native mode. unset CONFIG_RTAI_XENOMAI else echo AC_MSG_ERROR([HAL patch not applied/enabled in $RTAI_LINUX_DIR]) fi case "$RTAI_LINUX_VERSION" in 2.4.*) unset CONFIG_KBUILD ;; 2.6.*) CONFIG_KBUILD=y ;; *) AC_MSG_ERROR([Unsupported kernel version $RTAI_LINUX_VERSION]) esac dnl dnl Perform a few sanity checks. dnl arch_select=`eval echo \\$$wanted_kernel_arch` if test x$arch_select = x; then echo echo "************************************************************" echo " The target RTAI architecture ($RTAI_TARGET_ARCH) does not match" echo " the kernel architecture selected in $RTAI_LINUX_DIR" echo " (i.e. $wanted_kernel_arch is undefined)" echo "************************************************************" exit 1 fi if test x${CONFIG_MODULES} = x ; then AC_MSG_ERROR([Please set CONFIG_MODULES for $RTAI_LINUX_DIR and rebuild your kernel]) fi if test x${CONFIG_MODVERSIONS} = xy ; then AC_MSG_ERROR([Please unset CONFIG_MODVERSIONS for $RTAI_LINUX_DIR and rebuild your kernel]) fi if test x${CONFIG_RTAI_ADEOS} = xy -a x${CONFIG_ADEOS_CORE} = x; then AC_MSG_ERROR([Please activate the Adeos support in $RTAI_LINUX_DIR and rebuild your kernel]) fi dnl dnl Process the build options, possibly overriding the loaded dnl configuration. dnl RTAI_BUILTIN_MODLIST="" AC_MSG_CHECKING(for trace support) AC_ARG_ENABLE(trace, [ --enable-trace Enable trace support], [case "$enableval" in y | yes) CONFIG_RTAI_TRACE=y ;; *) unset CONFIG_RTAI_TRACE ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_TRACE:-no}) if test x${CONFIG_RTAI_MATH} = xy; then dnl Override Kconfig settings for now CONFIG_RTAI_MATH=m fi AC_MSG_CHECKING(for math support) AC_ARG_ENABLE(math, [ --enable-math Enable math support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_MATH=y ;; m | mod | module) CONFIG_RTAI_MATH=m ;; *) unset CONFIG_RTAI_MATH ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_MATH:-no}) if test x$CONFIG_RTAI_MATH = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST math" fi AC_MSG_CHECKING(for bits IPC support) AC_ARG_ENABLE(bits, [ --enable-bits Enable bits IPC support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_BITS=y ;; m | mod | module) CONFIG_RTAI_BITS=m ;; *) unset CONFIG_RTAI_BITS ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_BITS:-no}) if test x$CONFIG_RTAI_BITS = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/bits" fi AC_MSG_CHECKING(for real-time fifos support) AC_ARG_ENABLE(fifos, [ --enable-fifos Enable fifo IPC support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_FIFOS=y ;; m | mod | module) CONFIG_RTAI_FIFOS=m ;; *) unset CONFIG_RTAI_FIFOS ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_FIFOS:-no}) if test x$CONFIG_RTAI_FIFOS = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/fifos" fi AC_MSG_CHECKING(for netrpc support) AC_ARG_ENABLE(netrpc, [ --enable-netrpc Enable netrpc support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_NETRPC=y ;; m | mod | module) CONFIG_RTAI_NETRPC=m ;; *) unset CONFIG_RTAI_NETRPC ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_NETRPC:-no}) if test x$CONFIG_RTAI_NETRPC = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/netrpc" fi AC_MSG_CHECKING(for netrpc emulation of RTNet) AC_ARG_ENABLE(netrpc-rtnet, [ --enable-netrpc-rtnet Enable netrpc emulation of RTNet], [case "$enableval" in y | yes) CONFIG_RTAI_NETRPC_RTNET=y ;; *) unset CONFIG_RTAI_NETRPC_RTNET ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_NETRPC_RTNET:-no}) AC_MSG_CHECKING(for semaphore support) AC_ARG_ENABLE(sem, [ --enable-sem Enable semaphore support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_SEM=y ;; m | mod | module) CONFIG_RTAI_SEM=m ;; *) unset CONFIG_RTAI_SEM ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_SEM:-no}) if test x$CONFIG_RTAI_SEM = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/sem" fi AC_MSG_CHECKING(for messaging support) AC_ARG_ENABLE(mbx, [ --enable-msg Enable messaging support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_MSG=y ;; m | mod | module) CONFIG_RTAI_MSG=m ;; *) unset CONFIG_RTAI_MSG ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_MSG:-no}) if test x$CONFIG_RTAI_MSG = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/msg" fi AC_MSG_CHECKING(for mailbox support) AC_ARG_ENABLE(mbx, [ --enable-mbx Enable mailbox support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_MBX=y ;; m | mod | module) CONFIG_RTAI_MBX=m ;; *) unset CONFIG_RTAI_MBX ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_MBX:-no}) if test x$CONFIG_RTAI_MBX = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/mbx" fi AC_MSG_CHECKING(for typed mailbox support) AC_ARG_ENABLE(tbx, [ --enable-tbx Enable typed mailbox support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_TBX=y ;; m | mod | module) CONFIG_RTAI_TBX=m ;; *) unset CONFIG_RTAI_TBX ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_TBX:-no}) if test x$CONFIG_RTAI_TBX = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/tbx" fi AC_MSG_CHECKING(for POSIX-like message queue support) AC_ARG_ENABLE(mq, [ --enable-mq Enable POSIX-like message queue support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_MQ=y ;; m | mod | module) CONFIG_RTAI_MQ=m ;; *) unset CONFIG_RTAI_MQ ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_MQ:-no}) if test x$CONFIG_RTAI_MQ = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/mq" fi AC_MSG_CHECKING(for shared memory support) AC_ARG_ENABLE(shm, [ --enable-shm Enable shared memory support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_SHM=y ;; m | mod | module) CONFIG_RTAI_SHM=m ;; *) unset CONFIG_RTAI_SHM ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_SHM:-no}) if test x$CONFIG_RTAI_SHM = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST ipc/shm" fi AC_MSG_CHECKING(for real-time malloc support) AC_ARG_ENABLE(malloc, [ --enable-malloc Enable real-time malloc support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_MALLOC=y ;; m | mod | module) CONFIG_RTAI_MALLOC=m ;; *) unset CONFIG_RTAI_MALLOC ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_MALLOC:-no}) if test x$CONFIG_RTAI_MALLOC = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST malloc" fi AC_MSG_CHECKING(for tasklets support) AC_ARG_ENABLE(tasklets, [ --enable-tasklets Enable tasklets support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_TASKLETS=y ;; m | mod | module) CONFIG_RTAI_TASKLETS=m ;; *) unset CONFIG_RTAI_TASKLETS ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_TASKLETS:-no}) if test x$CONFIG_RTAI_TASKLETS = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST tasklets" fi AC_MSG_CHECKING(for user-space interrupt support) AC_ARG_ENABLE(usi, [ --enable-usi Enable user-space interrupt support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_USI=y ;; m | mod | module) CONFIG_RTAI_USI=m ;; *) unset CONFIG_RTAI_USI ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_USI:-no}) if test x$CONFIG_RTAI_USI = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST usi" fi AC_MSG_CHECKING(for watchdog support) AC_ARG_ENABLE(watchdog, [ --enable-watchdog Enable watchdog support], [case "$enableval" in y | yes | m | mod | module) CONFIG_RTAI_WD=m ;; *) unset CONFIG_RTAI_WD ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_WD:-no}) AC_MSG_CHECKING(for leds-based debugging support) AC_ARG_ENABLE(leds, [ --enable-leds Enable leds-based debugging support], [case "$enableval" in y | yes | b | builtin | built-in) CONFIG_RTAI_LEDS=y ;; m | mod | module) CONFIG_RTAI_LEDS=m ;; *) unset CONFIG_RTAI_LEDS ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_LEDS:-no}) if test x$CONFIG_RTAI_LEDS = xy ; then RTAI_BUILTIN_MODLIST="$RTAI_BUILTIN_MODLIST leds" fi AC_ARG_ENABLE(sched-up, [ --enable-sched-up Enable UP scheduler support], [case "$enableval" in y | yes | m | mod | module) CONFIG_RTAI_SCHED_UP=y ;; *) unset CONFIG_RTAI_SCHED_UP ;; esac]) AC_ARG_ENABLE(sched-smp, [ --enable-sched-smp Enable SMP scheduler support], [case "$enableval" in y | yes | m | mod | module) CONFIG_RTAI_SCHED_SMP=y ;; *) unset CONFIG_RTAI_SCHED_SMP ;; esac]) AC_ARG_ENABLE(sched-mup, [ --enable-sched-mup Enable MUP scheduler support], [case "$enableval" in y | yes | m | mod | module) CONFIG_RTAI_SCHED_MUP=y ;; *) unset CONFIG_RTAI_SCHED_MUP ;; esac]) AC_ARG_ENABLE(sched-lxrt, [ --enable-sched-lxrt Enable LXRT scheduler support], [case "$enableval" in y | yes | m | mod | module) CONFIG_RTAI_SCHED_LXRT=y ;; *) unset CONFIG_RTAI_SCHED_LXRT ;; esac]) AC_ARG_ENABLE(xenomai, [ --enable-xenomai Build Xenomai sub-system], [case "$enableval" in y | yes) CONFIG_RTAI_XENOMAI=y ;; *) unset CONFIG_RTAI_XENOMAI ;; esac]) dnl Some sanity checks for scheduler settings. We are only rearranging dnl defaults and discarding preposterous settings here, previous user dnl selection is kept as long as it is sane. if test "$CONFIG_X86" = y; then if test "$CONFIG_SMP" = y; then # x86 with SMP kernel test x$CONFIG_RTAI_SCHED_SMP = x && smp_forced="(forced)" CONFIG_RTAI_SCHED_SMP=y test x$CONFIG_RTAI_SCHED_UP = xy && up_forced="(forced)" unset CONFIG_RTAI_SCHED_UP else # x86 with UP kernel if test "$CONFIG_RTAI_SCHED_MUP" = y -o "$CONFIG_RTAI_SCHED_SMP" = y; then test x$CONFIG_RTAI_SCHED_SMP = xy && smp_forced="(forced)" unset CONFIG_RTAI_SCHED_SMP test x$CONFIG_RTAI_SCHED_MUP = xy && mup_forced="(forced)" unset CONFIG_RTAI_SCHED_MUP fi test x$CONFIG_RTAI_SCHED_UP = x && up_forced="(forced)" CONFIG_RTAI_SCHED_UP=y CONFIG_RTAI_CPUS=1 fi if test x$CONFIG_X86_CMPXCHG = x; then AC_MSG_ERROR([RTAI won't work on legacy i386 platforms (cmpxchg() is missing, need >= CONFIG_M486)]) fi if test x$CONFIG_RTAI_XENOMAI = xy -a x$CONFIG_X86_WP_WORKS_OK = x; then AC_MSG_ERROR([RTAI/Xenomai won't work on legacy i386 platforms (cannot rely on WP bit, need >= CONFIG_M486)]) fi else # non-x86 test x$CONFIG_RTAI_SCHED_UP = x && up_forced="(forced)" CONFIG_RTAI_SCHED_UP=y test x$CONFIG_RTAI_SCHED_SMP = xy && smp_forced="(forced)" unset CONFIG_RTAI_SCHED_SMP test x$CONFIG_RTAI_SCHED_MUP = xy && mup_forced="(forced)" unset CONFIG_RTAI_SCHED_MUP test x$CONFIG_RTAI_SCHED_LXRT = xy && lxrt_forced="(forced)" unset CONFIG_RTAI_SCHED_LXRT CONFIG_RTAI_CPUS=1 fi dnl Xenomai unsupported on SMP. if test x$CONFIG_RTAI_XENOMAI = xy -a x$CONFIG_SMP = xy; then xenomai_forced="(forced)" unset CONFIG_RTAI_XENOMAI fi AC_MSG_CHECKING(for UP scheduler support) AC_MSG_RESULT([${CONFIG_RTAI_SCHED_UP:-no} $up_forced]) AC_MSG_CHECKING(for SMP scheduler support) AC_MSG_RESULT([${CONFIG_RTAI_SCHED_SMP:-no} $smp_forced]) AC_MSG_CHECKING(for MUP scheduler support) AC_MSG_RESULT([${CONFIG_RTAI_SCHED_MUP:-no} $mup_forced]) AC_MSG_CHECKING(for LXRT scheduler support) AC_MSG_RESULT([${CONFIG_RTAI_SCHED_LXRT:-no} $lxrt_forced]) AC_MSG_CHECKING(for Xenomai sub-system) AC_MSG_RESULT(${CONFIG_RTAI_XENOMAI:-no} $xenomai_forced) AC_MSG_CHECKING(for scheduler lock in ISRs) AC_ARG_ENABLE(sched-lock-isr, [ --enable-sched-lock-isr Enable scheduler lock in ISRs], [case "$enableval" in y | yes) CONFIG_RTAI_SCHED_ISR_LOCK=y ;; *) unset CONFIG_RTAI_SCHED_ISR_LOCK ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_SCHED_ISR_LOCK:-no}) AC_MSG_CHECKING(for 8254 tuning latency) AC_ARG_ENABLE(sched-8254-latency, [ --enable-sched-8254-latency Set 8254 tuning latency], [case "$enableval" in changequote(,)dnl [0-9]*) CONFIG_RTAI_SCHED_8254_LATENCY=$enableval ;; changequote([,])dnl *) AC_MSG_ERROR([Bad argument to option: --enable-8254-latency=]) ;; esac]) if test x$CONFIG_RTAI_SCHED_8254_LATENCY = x ; then # Use a reasonable default if unset CONFIG_RTAI_SCHED_8254_LATENCY=4700 fi AC_MSG_RESULT($CONFIG_RTAI_SCHED_8254_LATENCY) AC_MSG_CHECKING(for APIC tuning latency) AC_ARG_ENABLE(sched-apic-latency, [ --enable-sched-apic-latency Set APIC tuning latency], [case "$enableval" in changequote(,)dnl [0-9]*) CONFIG_RTAI_SCHED_APIC_LATENCY=$enableval ;; changequote([,])dnl *) AC_MSG_ERROR([Bad argument to option: --enable-sched-apic-latency=]) ;; esac]) if test x$CONFIG_RTAI_SCHED_APIC_LATENCY = x ; then # Use a reasonable default if unset CONFIG_RTAI_SCHED_APIC_LATENCY=3944 fi AC_MSG_RESULT($CONFIG_RTAI_SCHED_APIC_LATENCY) AC_MSG_CHECKING(for maximum number of LXRT slots) AC_ARG_ENABLE(sched-lxrt-numslots, [ --enable-sched-lxrt-numslots Set maximum number of LXRT slots], [case "$enableval" in changequote(,)dnl [0-9]*) CONFIG_RTAI_SCHED_LXRT_NUMSLOTS=$enableval ;; changequote([,])dnl *) AC_MSG_ERROR([Bad argument to option: --enable-sched-lxrt-numslots=]) ;; esac]) if test x$CONFIG_RTAI_SCHED_LXRT_NUMSLOTS = x ; then # Use a reasonable default if unset CONFIG_RTAI_SCHED_LXRT_NUMSLOTS=100 fi AC_MSG_RESULT($CONFIG_RTAI_SCHED_LXRT_NUMSLOTS) AC_MSG_CHECKING(for in-kernel C++ support) AC_ARG_ENABLE(cplusplus, [ --enable-cplusplus Build in-kernel C++ support], [case "$enableval" in y | yes) CONFIG_RTAI_CPLUSPLUS=y ;; *) unset CONFIG_RTAI_CPLUSPLUS ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_CPLUSPLUS:-no}) AC_MSG_CHECKING([if gcc accepts -fno-use-cxa-atexit]) save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="-fno-use-cxa-atexit -Werror" AC_CACHE_VAL(ac_cv_accepts_cxa_atexit, AC_LANG_SAVE AC_LANG_CPLUSPLUS [AC_TRY_COMPILE([], [int i = 0; return i; ], [ac_cv_accepts_cxa_atexit=yes], [ac_cv_accepts_cxa_atexit=no])] AC_LANG_RESTORE) AC_MSG_RESULT($ac_cv_accepts_cxa_atexit) CXXFLAGS="$save_CXXFLAGS" AC_MSG_CHECKING(for comedi support over LXRT) AC_ARG_ENABLE(comedi-lxrt, [ --enable-comedi-lxrt Enable comedi/LXRT support], [case "$enableval" in y | yes) CONFIG_RTAI_COMEDI_LXRT=y ;; *) unset CONFIG_RTAI_COMEDI_LXRT ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_COMEDI_LXRT:-no}) #if test x$CONFIG_RTAI_COMEDI_LXRT = xy; then # SC_PATH_COMEDI($COMEDI_DIR) #fi AC_MSG_CHECKING(for real-time serial driver) AC_ARG_ENABLE(serial, [ --enable-serial Build real-time serial driver], [case "$enableval" in y | yes) CONFIG_RTAI_SERIAL=y ;; *) unset CONFIG_RTAI_SERIAL ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_SERIAL:-no}) AC_MSG_CHECKING(for testsuite) AC_ARG_ENABLE(testsuite, [ --enable-testsuite Build RTAI testsuite], [case "$enableval" in y | yes) CONFIG_RTAI_TESTSUITE=y ;; *) unset CONFIG_RTAI_TESTSUITE ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_TESTSUITE:-no}) AC_MSG_CHECKING(for Xenomai debug support) AC_ARG_ENABLE(xenomai-debug, [ --enable-xenomai-debug Enable Xenomai debug], [case "$enableval" in y | yes) CONFIG_RTAI_XENOMAI_DEBUG=y ;; *) unset CONFIG_RTAI_XENOMAI_DEBUG ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_XENOMAI_DEBUG:-no}) AC_MSG_CHECKING(for pSOS+ skin) AC_ARG_ENABLE(psos-skin, [ --enable-psos-skin Build Xenomai-based pSOS+ emulator], [case "$enableval" in y | yes) CONFIG_RTAI_XENOMAI_SKIN_PSOS=y ;; *) unset CONFIG_RTAI_XENOMAI_SKIN_PSOS ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_XENOMAI_SKIN_PSOS:-no}) AC_MSG_CHECKING(for VxWorks skin) AC_ARG_ENABLE(vxworks-skin, [ --enable-vxworks-skin Build Xenomai-based VxWorks emulator], [case "$enableval" in y | yes) CONFIG_RTAI_XENOMAI_SKIN_VXWORKS=y ;; *) unset CONFIG_RTAI_XENOMAI_SKIN_VXWORKS ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_XENOMAI_SKIN_VXWORKS:-no}) AC_MSG_CHECKING(for VRTX skin) AC_ARG_ENABLE(vrtx-skin, [ --enable-vrtx-skin Build Xenomai-based VRTX emulator], [case "$enableval" in y | yes) CONFIG_RTAI_XENOMAI_SKIN_VRTX=y ;; *) unset CONFIG_RTAI_XENOMAI_SKIN_VRTX ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_XENOMAI_SKIN_VRTX:-no}) AC_MSG_CHECKING(for uITRON skin) AC_ARG_ENABLE(uitron-skin, [ --enable-uitron-skin Build Xenomai-based uITRON API skin], [case "$enableval" in y | yes) CONFIG_RTAI_XENOMAI_SKIN_UITRON=y ;; *) unset CONFIG_RTAI_XENOMAI_SKIN_UITRON ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_XENOMAI_SKIN_UITRON:-no}) AC_MSG_CHECKING(for pse51 skin) AC_ARG_ENABLE(pse51-skin, [ --enable-pse51-skin Build Xenomai-based PSE51 API skin], [case "$enableval" in y | yes) CONFIG_RTAI_XENOMAI_SKIN_PSE51=y ;; *) unset CONFIG_RTAI_XENOMAI_SKIN_PSE51 ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_XENOMAI_SKIN_PSE51:-no}) AC_MSG_CHECKING(for Xenomai user-space VMs) AC_ARG_ENABLE(xenomai-vm, [ --enable-xenomai-vm Build Xenomai user-space VMs], [case "$enableval" in y | yes) CONFIG_RTAI_XENOMAI_VMLIB=y ;; *) unset CONFIG_RTAI_XENOMAI_VMLIB ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_XENOMAI_VMLIB:-no}) AC_MSG_CHECKING(for RTAI-Lab) AC_ARG_ENABLE(rtailab, [ --enable-rtailab Build RTAI-Lab], [case "$enableval" in y | yes) CONFIG_RTAI_LAB=y ;; *) unset CONFIG_RTAI_LAB ;; esac]) if test x$arch_supports_rtailab = x; then unset CONFIG_RTAI_LAB fi AC_MSG_RESULT(${CONFIG_RTAI_LAB:-no}) if test x$CONFIG_RTAI_LAB = xy; then AC_MSG_CHECKING(for gcc version) AC_CACHE_VAL(ac_cv_mingcc, AC_LANG_SAVE AC_LANG_CPLUSPLUS [AC_TRY_COMPILE( [#if !( __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)) #error GCC too old #endif], [return 0;], [ac_cv_mingcc=yes], [ac_cv_mingcc=no])] AC_LANG_RESTORE) if [[ $ac_cv_mingcc = no ]]; then AC_MSG_ERROR([Building RTAI-Lab requires GCC version >= 3.1]) else AC_MSG_RESULT([ok]) fi MDL_HAVE_OPENGL #SC_PATH_EFLTK($CONFIG_RTAI_EFLTK_DIR) fi AC_MSG_CHECKING(for FPU support) AC_ARG_ENABLE(fpu, [ --enable-fpu Enable FPU support], [case "$enableval" in y | yes) CONFIG_RTAI_FPU_SUPPORT=y ;; *) unset CONFIG_RTAI_FPU_SUPPORT ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_FPU_SUPPORT:-no}) AC_MSG_CHECKING(for math C99 support) AC_ARG_ENABLE(math-c99, [ --enable-math-c99 Enable math C99 support], [case "$enableval" in y | yes) CONFIG_RTAI_MATH_C99=y ;; *) unset CONFIG_RTAI_MATH_C99 ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_MATH_C99:-no}) AC_MSG_CHECKING(for vmalloc use in real-time malloc support) AC_ARG_ENABLE(malloc-vmalloc, [ --enable-malloc-vmalloc Enable vmalloc support in malloc], [case "$enableval" in y | yes) CONFIG_RTAI_MALLOC_VMALLOC=y ;; *) unset CONFIG_RTAI_MALLOC_VMALLOC ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_MALLOC_VMALLOC:-no}) AC_MSG_CHECKING(for size of real-time malloc heap) AC_ARG_ENABLE(malloc-heap-size, [ --enable-malloc-heap-size Set size of real-time malloc heap], [case "$enableval" in changequote(,)dnl [0-9]*) CONFIG_RTAI_MALLOC_HEAPSZ=$enableval ;; changequote([,])dnl *) AC_MSG_ERROR([Bad argument to option: --enable-malloc-heap-size=]) ;; esac]) if test x$CONFIG_RTAI_MALLOC_HEAPSZ = x ; then # Use a reasonable default if unset (in Kbytes) CONFIG_RTAI_MALLOC_HEAPSZ=128 fi AC_MSG_RESULT($CONFIG_RTAI_MALLOC_HEAPSZ) AC_MSG_CHECKING(for number of CPUs (SMP-only)) AC_ARG_ENABLE(cpus, [ --enable-cpus Enable CPUs], [case "$enableval" in changequote(,)dnl [1-8]) CONFIG_RTAI_CPUS=$enableval ;; changequote([,])dnl *) AC_MSG_ERROR([Bad argument to option: --enable-cpus=]) ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_CPUS:-1}) dnl dnl Check for additional build options. dnl if test \! -d $srcdir/rtai-doc; then unset RTAI_MAYBE_DOCDIR else RTAI_MAYBE_DOCDIR=rtai-doc fi AC_SUBST(RTAI_MAYBE_DOCDIR) AC_MSG_CHECKING(for Doxygen documentation) AC_ARG_ENABLE(doc, [ --enable-dox-doc Build Doxygen documentation], [case "$enableval" in y | yes) CONFIG_RTAI_DOX_DOC=y ;; *) unset CONFIG_RTAI_DOX_DOC ;; esac]) if test \! -d $srcdir/rtai-doc; then if test x$CONFIG_RTAI_DOX_DOC = xy ; then AC_MSG_ERROR([documentation tree is missing.]) fi AC_MSG_RESULT([not present]) else AC_MSG_RESULT(${CONFIG_RTAI_DOX_DOC:-no}) fi AC_CHECK_PROG(DOXYGEN, doxygen, doxygen) if test x${CONFIG_RTAI_DOX_DOC} = xy -a x"$DOXYGEN" = x; then AC_MSG_ERROR([Missing the Doxygen tools to generate the RTAI documentation.]) fi AC_MSG_CHECKING(doxygen version) if test x"$DOXYGEN" != x; then dox_version=`"$DOXYGEN" --version` fi AC_MSG_RESULT(${dox_version:-not installed}) if test x${CONFIG_RTAI_DOX_DOC} = xy then dox_version_number=`echo $dox_version | sed 'y,., ,' | { read dox_major dox_minor dox_patch expr $dox_major \* 10000 + $dox_minor \* 100 + $dox_patch }` if test $dox_version_number \< 10304 then AC_MSG_ERROR([Doxygen version 1.3.4 or higher is needed.]) fi fi AC_CHECK_PROG(DOXYGEN_HAVE_DOT, dot, YES, NO) if test x"$DOXYGEN_HAVE_DOT" = xYES; then DOXYGEN_SHOW_INCLUDE_FILES=NO else DOXYGEN_SHOW_INCLUDE_FILES=YES fi case "$CONFIG_RTAI_DBX_DOC" in y | ye | yes) DBX_DOC=yes;; *) DBX_DOC="";; esac DBX_NET="$CONFIG_RTAI_DBX_NET" DBX_ROOT="$CONFIG_RTAI_DBX_ROOT" DBX_XSL_ROOT="$CONFIG_RTAI_DBX_XSL_ROOT" #DBX_DOC_INIT(rtai-doc/docbook, rtai-doc/generated, 4.2) AC_MSG_CHECKING(whether using LaTeX non-stop mode) AC_ARG_ENABLE(verbose-latex, [ --enable-verbose-latex Uses LaTeX non-stop mode], [case "$enableval" in y | yes) CONFIG_RTAI_DOC_LATEX_NONSTOP=y ;; *) unset CONFIG_RTAI_DOC_LATEX_NONSTOP ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_DOC_LATEX_NONSTOP:-no}) if test x${CONFIG_RTAI_DOC_LATEX_NONSTOP} = xy; then LATEX_BATCHMODE=NO LATEX_MODE=nonstopmode else LATEX_BATCHMODE=YES LATEX_MODE=batchmode fi AC_MSG_CHECKING(for compatibility mode) AC_ARG_ENABLE(compat, [ --enable-compat Enable compatibility mode], [case "$enableval" in y | yes) CONFIG_RTAI_COMPAT=y ;; *) unset CONFIG_RTAI_COMPAT ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_COMPAT:-no}) if test x${CONFIG_RTAI_COMPAT} = xy ; then RTAI_COMPAT_CPPFLAGS='-I${staging}${includedir}/compat' else RTAI_COMPAT_CPPFLAGS="" fi dnl Set default inline mode for LXRT as specified from dnl Kconfig. Defaults to conditional inlining. if test x$CONFIG_RTAI_LXRT_STATIC_INLINE = xy; then CONFIG_RTAI_LXRT_INLINE=1 elif test x$CONFIG_RTAI_LXRT_NO_INLINE = xy; then CONFIG_RTAI_LXRT_INLINE=3 else CONFIG_RTAI_LXRT_INLINE=2 fi AC_MSG_CHECKING(for LXRT inlining) AC_ARG_WITH(lxrt-inline, [ --with-lxrt-inline Set LXRT inlining mode (static|extern|none)], [case "$withval" in static) CONFIG_RTAI_LXRT_INLINE=1 ;; extern) CONFIG_RTAI_LXRT_INLINE=2 ;; none) CONFIG_RTAI_LXRT_INLINE=3 ;; *) AC_MSG_ERROR([Bad argument to option: --with-lxrt-inline=]) ;; esac]) case "$CONFIG_RTAI_LXRT_INLINE" in 1) inline_type=static ;; 2) inline_type=extern ;; 3) inline_type=none ;; esac AC_MSG_RESULT([$inline_type]) AC_MSG_CHECKING(for debug symbols in kernel modules) AC_ARG_ENABLE(module-debug, [ --enable-module-debug Enable debug information in kernel modules], [case "$enableval" in y | yes) CONFIG_RTAI_KMOD_DEBUG=y ;; *) unset CONFIG_RTAI_KMOD_DEBUG ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_KMOD_DEBUG:-no}) AC_MSG_CHECKING(for debug symbols in user-space programs) AC_ARG_ENABLE(user-debug, [ --enable-user-debug Enable debug information in user-space programs], [case "$enableval" in y | yes) CONFIG_RTAI_USER_DEBUG=y ;; *) unset CONFIG_RTAI_USER_DEBUG ;; esac]) AC_MSG_RESULT(${CONFIG_RTAI_USER_DEBUG:-no}) dnl Catch sub-package flags AC_MSG_CHECKING(for RTAI simulator) AC_ARG_ENABLE(sim, [ --enable-sim Build RTAI simulator (MVM) ], [case "$enableval" in y | yes) CONFIG_RTAI_MVM=y ;; *) unset CONFIG_RTAI_MVM ;; esac]) unset RTAI_MAYBE_SIMDIR if test \! -d $srcdir/rtai-sim; then if test x$CONFIG_RTAI_MVM = xy; then AC_MSG_ERROR([simulator is missing.]) fi AC_MSG_RESULT([not present]) else if test x$CONFIG_RTAI_MVM = xy; then export CONFIG_RTAI_XENOMAI_DEBUG export CONFIG_RTAI_MVM_DEBUG export CONFIG_RTAI_MVM_GCC_TARBALL else RTAI_MAYBE_SIMDIR=rtai-sim fi AC_MSG_RESULT(${CONFIG_RTAI_MVM:-no}) fi if test x$arch_supports_sim = x -a x$CONFIG_RTAI_MVM = xy; then AC_MSG_ERROR([simulator is not available on this architecture.]) fi AC_SUBST(RTAI_MAYBE_SIMDIR) dnl We need to know this before building the APIC support dnl into the SMP scheduler for the x86 platform. Autoconf imposes dnl us to define all Automake conditionals...unconditionally. e.g. dnl regardless of the current architecture setup. AM_CONDITIONAL(CONFIG_X86_LOCAL_APIC,[test -n "$CONFIG_X86_LOCAL_APIC"]) if test -n "$CONFIG_RTAI_TRACE" -a x$CONFIG_TRACE = x; then AC_MSG_ERROR([Missing LTT support in kernel to enable trace support.]) fi dnl Check for invalid combinations if test x$CONFIG_RTAI_NETRPC = xy -o x$CONFIG_RTAI_NETRPC = xm ; then if test x$CONFIG_RTAI_MSG = x ; then AC_MSG_ERROR([--enable-netrpc requires --enable-msg]) fi fi if test x$CONFIG_RTAI_NETRPC = xy ; then if test x$CONFIG_RTAI_MSG = xm ; then AC_MSG_ERROR([--enable-netrpc=y requires --enable-msg=y]) fi fi if test x$CONFIG_RTAI_MBX = xy -o x$CONFIG_RTAI_MBX = xm ; then if test x$CONFIG_RTAI_SEM = x ; then AC_MSG_ERROR([--enable-mbx requires --enable-sem]) fi fi if test x$CONFIG_RTAI_MBX = xy ; then if test x$CONFIG_RTAI_SEM = xm ; then AC_MSG_ERROR([--enable-mbx=y requires --enable-sem=y]) fi fi if test x$CONFIG_RTAI_TBX = xy -o x$CONFIG_RTAI_TBX = xm ; then if test x$CONFIG_RTAI_SEM = x ; then AC_MSG_ERROR([--enable-tbx requires --enable-sem]) fi fi if test x$CONFIG_RTAI_TBX = xy ; then if test x$CONFIG_RTAI_SEM = xm ; then AC_MSG_ERROR([--enable-tbx=y requires --enable-sem=y]) fi fi if test x$CONFIG_RTAI_MQ = xy -o x$CONFIG_RTAI_MQ = xm ; then if test x$CONFIG_RTAI_SEM = x ; then AC_MSG_ERROR([--enable-mq requires --enable-sem]) fi fi if test x$CONFIG_RTAI_MQ = xy ; then if test x$CONFIG_RTAI_SEM = xm ; then AC_MSG_ERROR([--enable-mq=y requires --enable-sem=y]) fi fi if test x$CONFIG_RTAI_USI = xy -o x$CONFIG_RTAI_USI = xm ; then if test x$CONFIG_RTAI_SEM = x -o x$CONFIG_RTAI_TASKLETS = x; then AC_MSG_ERROR([--enable-usi requires --enable-sem and --enable-tasklets]) fi fi if test x$CONFIG_RTAI_USI = xy ; then if test x$CONFIG_RTAI_SEM = xm -o x$CONFIG_RTAI_TASKLETS = xm; then AC_MSG_ERROR([--enable-usi=y requires --enable-sem=y and --enable-tasklets=y]) fi fi if test x$CONFIG_RTAI_COMEDI_LXRT = xy -a x$CONFIG_RTAI_SCHED_LXRT = x ; then AC_MSG_ERROR([--enable-comedi-lxrt requires --enable-sched-lxrt]) fi dnl Built-in math support is not currently available with Kbuild-built dnl kernels due to bad dependencies on user-space headers we really dnl need to fix first. So we leave in place all the config machinery dnl for having built-in/modular math support, but will complain here dnl until those dependencies are properly cleared. if test x$CONFIG_KBUILD = xy -a x$CONFIG_RTAI_MATH = xy ; then AC_MSG_ERROR([Built-in math support is not currently available with Linux >= 2.6.x]) fi dnl Kbuild is not quite C++ friendly these days. if test x$CONFIG_KBUILD = xy -a x$CONFIG_RTAI_CPLUSPLUS = xy ; then AC_MSG_ERROR([In-kernel C++ support is not available with Linux >= 2.6.x]) fi dnl dnl Build a Kconfig file corresponding to the current configuration dnl if none exists. dnl if test \! -r .rtai_config; then set | grep -e '^CONFIG_RTAI' -e '^CONFIG_MODULES' | \ sed -e 's,\(.*\)=\(.*\)$,\1=\"\2\",' > .rtai_config fi dnl dnl Produce the info needed to build rtai_config.h dnl AC_DEFINE_UNQUOTED(CONFIG_RTAI_VERSION_MAJOR,$CONFIG_RTAI_VERSION_MAJOR,[Kconfig]) AC_DEFINE_UNQUOTED(CONFIG_RTAI_VERSION_MINOR,$CONFIG_RTAI_VERSION_MINOR,[Kconfig]) AC_DEFINE_UNQUOTED(CONFIG_RTAI_REVISION_LEVEL,$CONFIG_RTAI_REVISION_LEVEL,[Kconfig]) AC_DEFINE(CONFIG_RTAI,1,[Legacy]) AC_DEFINE(CONFIG_RTAI_MOUNT_ON_LOAD,1,[Legacy]) test \! x$CONFIG_KBUILD = x && AC_DEFINE(CONFIG_KBUILD,1,[Kconfig]) test \! x$CONFIG_RTAI_ADEOS = x && AC_DEFINE(CONFIG_RTAI_ADEOS,1,[Kconfig]) test \! x$CONFIG_RTAI_HAL_PREEMPT = x && AC_DEFINE(CONFIG_RTAI_HAL_PREEMPT,1,[Kconfig]) test \! x$CONFIG_RTAI_CPUS = x && AC_DEFINE_UNQUOTED(CONFIG_RTAI_CPUS,$CONFIG_RTAI_CPUS,[Kconfig]) test \! x$CONFIG_RTAI_FPU_SUPPORT = x && AC_DEFINE(CONFIG_RTAI_FPU_SUPPORT,1,[Kconfig]) test \! x$CONFIG_RTAI_MATH_C99 = x && AC_DEFINE(CONFIG_RTAI_MATH_C99,1,[Kconfig]) test \! x$CONFIG_RTAI_TRACE = x && AC_DEFINE(CONFIG_RTAI_TRACE,1,[Kconfig]) test \! x$CONFIG_RTAI_MATH = x && AC_DEFINE(CONFIG_RTAI_MATH,1,[Kconfig]) test \! x$CONFIG_RTAI_BITS = x && AC_DEFINE(CONFIG_RTAI_BITS,1,[Kconfig]) test \! x$CONFIG_RTAI_FIFOS = x && AC_DEFINE(CONFIG_RTAI_FIFOS,1,[Kconfig]) test \! x$CONFIG_RTAI_NETRPC = x && AC_DEFINE(CONFIG_RTAI_NETRPC,1,[Kconfig]) test \! x$CONFIG_RTAI_NETRPC_RTNET = x && AC_DEFINE(CONFIG_RTAI_NETRPC_RTNET,1,[Kconfig]) test \! x$CONFIG_RTAI_SEM = x && AC_DEFINE(CONFIG_RTAI_SEM,1,[Kconfig]) test \! x$CONFIG_RTAI_MSG = x && AC_DEFINE(CONFIG_RTAI_MSG,1,[Kconfig]) test \! x$CONFIG_RTAI_MBX = x && AC_DEFINE(CONFIG_RTAI_MBX,1,[Kconfig]) test \! x$CONFIG_RTAI_TBX = x && AC_DEFINE(CONFIG_RTAI_TBX,1,[Kconfig]) test \! x$CONFIG_RTAI_MQ = x && AC_DEFINE(CONFIG_RTAI_MQ,1,[Kconfig]) test \! x$CONFIG_RTAI_SHM = x && AC_DEFINE(CONFIG_RTAI_SHM,1,[Kconfig]) test \! x$CONFIG_RTAI_MALLOC = x && AC_DEFINE(CONFIG_RTAI_MALLOC,1,[Kconfig]) test \! x$CONFIG_RTAI_MALLOC_VMALLOC = x && AC_DEFINE(CONFIG_RTAI_MALLOC_VMALLOC,1,[Kconfig]) test \! x$CONFIG_RTAI_TASKLETS = x && AC_DEFINE(CONFIG_RTAI_TASKLETS,1,[Kconfig]) test \! x$CONFIG_RTAI_USI = x && AC_DEFINE(CONFIG_RTAI_USI,1,[Kconfig]) test \! x$CONFIG_RTAI_WD = x && AC_DEFINE(CONFIG_RTAI_WD,1,[Kconfig]) test \! x$CONFIG_RTAI_LEDS = x && AC_DEFINE(CONFIG_RTAI_LEDS,1,[Kconfig]) test \! x$CONFIG_RTAI_SERIAL = x && AC_DEFINE(CONFIG_RTAI_SERIAL,1,[Kconfig]) test x$CONFIG_RTAI_MATH = xy && AC_DEFINE(CONFIG_RTAI_MATH_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_BITS = xy && AC_DEFINE(CONFIG_RTAI_BITS_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_FIFOS = xy && AC_DEFINE(CONFIG_RTAI_FIFOS_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_NETRPC = xy && AC_DEFINE(CONFIG_RTAI_NETRPC_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_SEM = xy && AC_DEFINE(CONFIG_RTAI_SEM_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_MSG = xy && AC_DEFINE(CONFIG_RTAI_MSG_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_MBX = xy && AC_DEFINE(CONFIG_RTAI_MBX_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_TBX = xy && AC_DEFINE(CONFIG_RTAI_TBX_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_MQ = xy && AC_DEFINE(CONFIG_RTAI_MQ_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_SHM = xy && AC_DEFINE(CONFIG_RTAI_SHM_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_MALLOC = xy && AC_DEFINE(CONFIG_RTAI_MALLOC_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_TASKLETS = xy && AC_DEFINE(CONFIG_RTAI_TASKLETS_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_USI = xy && AC_DEFINE(CONFIG_RTAI_USI_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_LEDS = xy && AC_DEFINE(CONFIG_RTAI_LEDS_BUILTIN,1,[Kconfig]) test x$CONFIG_RTAI_SCHED_ISR_LOCK = xy && AC_DEFINE(CONFIG_RTAI_SCHED_ISR_LOCK,1,[Kconfig]) test x$CONFIG_RTAI_XENOMAI_DEBUG = xy && AC_DEFINE(CONFIG_RTAI_XENOMAI_DEBUG,1,[Kconfig]) AC_DEFINE_UNQUOTED(CONFIG_RTAI_SCHED_8254_LATENCY,$CONFIG_RTAI_SCHED_8254_LATENCY,[Kconfig]) AC_DEFINE_UNQUOTED(CONFIG_RTAI_SCHED_APIC_LATENCY,$CONFIG_RTAI_SCHED_APIC_LATENCY,[Kconfig]) AC_DEFINE_UNQUOTED(CONFIG_RTAI_SCHED_LXRT_NUMSLOTS,$CONFIG_RTAI_SCHED_LXRT_NUMSLOTS,[Kconfig]) AC_DEFINE_UNQUOTED(CONFIG_RTAI_MALLOC_HEAPSZ,$CONFIG_RTAI_MALLOC_HEAPSZ,[Kconfig]) if test x$CONFIG_DEVFS_FS = xy; then fifos_template="/dev/rtf/%d" else fifos_template="/dev/rtf%d" fi AC_DEFINE_UNQUOTED(CONFIG_RTAI_FIFOS_TEMPLATE,"$fifos_template",[Kconfig]) test x$CONFIG_RTAI_MAINTAINER = xy && AC_DEFINE(CONFIG_RTAI_MAINTAINER,1,[Kconfig]) test x$CONFIG_RTAI_MAINTAINER_PMA = xy && AC_DEFINE(CONFIG_RTAI_MAINTAINER_PMA,1,[Kconfig]) test x$CONFIG_RTAI_MAINTAINER_PGM = xy && AC_DEFINE(CONFIG_RTAI_MAINTAINER_PGM,1,[Kconfig]) test x$arch_supports_lxrt = xy && AC_DEFINE(CONFIG_RTAI_INTERNAL_LXRT_SUPPORT,1,[Kconfig]) test x$arch_supports_leds = xy && AC_DEFINE(CONFIG_RTAI_INTERNAL_LEDS_SUPPORT,1,[Kconfig]) AC_DEFINE_UNQUOTED(CONFIG_RTAI_INTERNAL_LXRT_INLINE,$CONFIG_RTAI_LXRT_INLINE,[Kconfig]) test x$CONFIG_RTAI_COMPAT = xy && AC_DEFINE(CONFIG_RTAI_COMPAT,1,[Kconfig]) AH_VERBATIM(CONFIG_RTAI_LXRT_INLINE,[ #ifndef CONFIG_RTAI_LXRT_INLINE #define CONFIG_RTAI_LXRT_INLINE CONFIG_RTAI_INTERNAL_LXRT_INLINE #endif /* !CONFIG_RTAI_LXRT_INLINE */ #define __hidefun(name) name ## _hidden_inline #if CONFIG_RTAI_LXRT_INLINE == 1 #define RTAI_PROTO(type,name,arglist) static inline type name arglist #elif CONFIG_RTAI_LXRT_INLINE == 2 #define RTAI_PROTO(type,name,arglist) extern inline type name arglist #elif CONFIG_RTAI_LXRT_INLINE == 3 #define RTAI_PROTO(type,name,arglist) type name arglist; static inline type __hidefun(name) arglist #else #define RTAI_PROTO(type,name,arglist) type name arglist #endif /* CONFIG_RTAI_LXRT_INLINE */ #define RTAI_PROTO_ALWAYS_INLINE(type,name,arglist) static inline type name arglist #define RTAI_PROTO_NEVER_INLINE(type,name,arglist) type name arglist; static inline type __hidefun(name) arglist ]) dnl CAUTION: We need to have the CONFIG_RTAI_XX symbols always defined when dnl the configuration header is read, but we want the Autoconf-produced dnl symbols to be defined only when compiling RTAI. This way, we won't dnl pollute the namespace with the latter when our configuration header is dnl indirectly included by a client application. To achieve this, we ask dnl autoheader to produce the following header structure: dnl #define CONFIG_XX dnl #define CONFIG_XX ... dnl #ifdef __IN_RTAI__ dnl dnl #endif /* __IN_RTAI__ */ dnl This is quite a hack since we have to rely on the fact that dnl all Autoconf-generated symbols are lexicographically sorted dnl after CONFIG_RTAI_XX ones, but, well... dnl Use a key which will cause the verbatim string to be put after dnl all CONFIG_RTAI_XX symbols, but still before any Autoconf-generated dnl symbol, hence CONFIG_RTAI___. AH_VERBATIM(CONFIG_RTAI___,[#ifdef __IN_RTAI__]) dnl Now we can close the conditional section, right after all dnl Autoconf-generated symbols have been listed. AH_BOTTOM([#endif /* __IN_RTAI__ */]) AH_BOTTOM([#include ]) dnl dnl Produce automake conditionals. dnl dnl Whether Linux is using the Kbuild make system. AM_CONDITIONAL(CONFIG_KBUILD,[test "$CONFIG_KBUILD" = y]) dnl CPU architecture AM_CONDITIONAL(CONFIG_X86,[test "$CONFIG_X86" = y]) AM_CONDITIONAL(CONFIG_PPC,[test "$CONFIG_PPC" = y]) AM_CONDITIONAL(CONFIG_ARM,[test "$CONFIG_ARM" = y]) AM_CONDITIONAL(CONFIG_ARCH_SA1100,[test "$CONFIG_ARCH_SA1100" = y]) AM_CONDITIONAL(CONFIG_ARCH_CLPS711X,[test "$CONFIG_ARCH_CLPS711X" = y]) AM_CONDITIONAL(CONFIG_ARCH_PXA,[test "$CONFIG_ARCH_PXA" = y]) AM_CONDITIONAL(CONFIG_ARCH_SPC200E,[test "$CONFIG_ARCH_SPC200E" = y]) AM_CONDITIONAL(CONFIG_ARCH_SPC200C,[test "$CONFIG_ARCH_SPC200C" = y]) AM_CONDITIONAL(CONFIG_ARCH_MSE500,[test "$CONFIG_ARCH_MSE500" = y]) AM_CONDITIONAL(CONFIG_MIPS,[test "$CONFIG_MIPS" = y]) AM_CONDITIONAL(CONFIG_CRIS,[test -n "$CONFIG_ETRAX_ROOT_DEVICE"]) AM_CONDITIONAL(CONFIG_UCLINUX,[test "$CONFIG_UCLINUX" = y]) AM_CONDITIONAL(CONFIG_SMP,[test "$CONFIG_SMP" = y]) dnl Features (whether they are built-in or not) AM_CONDITIONAL(CONFIG_RTAI_SCHED_UP,[test -n "$CONFIG_RTAI_SCHED_UP"]) AM_CONDITIONAL(CONFIG_RTAI_SCHED_MUP,[test -n "$CONFIG_RTAI_SCHED_MUP"]) AM_CONDITIONAL(CONFIG_RTAI_SCHED_SMP,[test -n "$CONFIG_RTAI_SCHED_SMP"]) AM_CONDITIONAL(CONFIG_RTAI_SCHED_LXRT,[test -n "$CONFIG_RTAI_SCHED_LXRT"]) AM_CONDITIONAL(CONFIG_RTAI_XENOMAI,[test x$CONFIG_RTAI_XENOMAI = xy]) AM_CONDITIONAL(CONFIG_RTAI_TRACE,[test -n "$CONFIG_RTAI_TRACE"]) AM_CONDITIONAL(CONFIG_RTAI_MATH,[test -n "$CONFIG_RTAI_MATH"]) AM_CONDITIONAL(CONFIG_RTAI_BITS,[test -n "$CONFIG_RTAI_BITS"]) AM_CONDITIONAL(CONFIG_RTAI_FIFOS,[test -n "$CONFIG_RTAI_FIFOS"]) AM_CONDITIONAL(CONFIG_RTAI_NETRPC,[test -n "$CONFIG_RTAI_NETRPC"]) AM_CONDITIONAL(CONFIG_RTAI_SEM,[test -n "$CONFIG_RTAI_SEM"]) AM_CONDITIONAL(CONFIG_RTAI_MSG,[test -n "$CONFIG_RTAI_MSG"]) AM_CONDITIONAL(CONFIG_RTAI_MBX,[test -n "$CONFIG_RTAI_MBX"]) AM_CONDITIONAL(CONFIG_RTAI_TBX,[test -n "$CONFIG_RTAI_TBX"]) AM_CONDITIONAL(CONFIG_RTAI_MQ,[test -n "$CONFIG_RTAI_MQ"]) AM_CONDITIONAL(CONFIG_RTAI_SHM,[test -n "$CONFIG_RTAI_SHM"]) AM_CONDITIONAL(CONFIG_RTAI_MALLOC,[test -n "$CONFIG_RTAI_MALLOC"]) AM_CONDITIONAL(CONFIG_RTAI_TASKLETS,[test -n "$CONFIG_RTAI_TASKLETS"]) AM_CONDITIONAL(CONFIG_RTAI_USI,[test -n "$CONFIG_RTAI_USI"]) AM_CONDITIONAL(CONFIG_RTAI_WD,[test -n "$CONFIG_RTAI_WD"]) AM_CONDITIONAL(CONFIG_RTAI_LEDS,[test -n "$CONFIG_RTAI_LEDS"]) AM_CONDITIONAL(CONFIG_RTAI_MATH_BUILTIN,[test x$CONFIG_RTAI_MATH = xy]) AM_CONDITIONAL(CONFIG_RTAI_BITS_BUILTIN,[test x$CONFIG_RTAI_BITS = xy]) AM_CONDITIONAL(CONFIG_RTAI_FIFOS_BUILTIN,[test x$CONFIG_RTAI_FIFOS = xy]) AM_CONDITIONAL(CONFIG_RTAI_NETRPC_BUILTIN,[test x$CONFIG_RTAI_NETRPC = xy]) AM_CONDITIONAL(CONFIG_RTAI_SEM_BUILTIN,[test x$CONFIG_RTAI_SEM = xy]) AM_CONDITIONAL(CONFIG_RTAI_MSG_BUILTIN,[test x$CONFIG_RTAI_MSG = xy]) AM_CONDITIONAL(CONFIG_RTAI_MBX_BUILTIN,[test x$CONFIG_RTAI_MBX = xy]) AM_CONDITIONAL(CONFIG_RTAI_TBX_BUILTIN,[test x$CONFIG_RTAI_TBX = xy]) AM_CONDITIONAL(CONFIG_RTAI_MQ_BUILTIN,[test x$CONFIG_RTAI_MQ = xy]) AM_CONDITIONAL(CONFIG_RTAI_SHM_BUILTIN,[test x$CONFIG_RTAI_SHM = xy]) AM_CONDITIONAL(CONFIG_RTAI_MALLOC_BUILTIN,[test x$CONFIG_RTAI_MALLOC = xy]) AM_CONDITIONAL(CONFIG_RTAI_TASKLETS_BUILTIN,[test x$CONFIG_RTAI_TASKLETS = xy]) AM_CONDITIONAL(CONFIG_RTAI_USI_BUILTIN,[test x$CONFIG_RTAI_USI = xy]) AM_CONDITIONAL(CONFIG_RTAI_LEDS_BUILTIN,[test x$CONFIG_RTAI_LEDS = xy]) dnl Non-core packages. AM_CONDITIONAL(CONFIG_RTAI_COMEDI_LXRT,[test x$CONFIG_RTAI_COMEDI_LXRT = xy]) AM_CONDITIONAL(CONFIG_RTAI_CPLUSPLUS,[test x$CONFIG_RTAI_CPLUSPLUS = xy]) AM_CONDITIONAL(CONFIG_RTAI_SERIAL,[test x$CONFIG_RTAI_SERIAL = xy]) AM_CONDITIONAL(CONFIG_RTAI_XENOMAI_SKIN_PSOS,[test x$CONFIG_RTAI_XENOMAI_SKIN_PSOS = xy]) AM_CONDITIONAL(CONFIG_RTAI_XENOMAI_SKIN_VXWORKS,[test x$CONFIG_RTAI_XENOMAI_SKIN_VXWORKS = xy]) AM_CONDITIONAL(CONFIG_RTAI_XENOMAI_SKIN_VRTX,[test x$CONFIG_RTAI_XENOMAI_SKIN_VRTX = xy]) AM_CONDITIONAL(CONFIG_RTAI_XENOMAI_SKIN_UITRON,[test x$CONFIG_RTAI_XENOMAI_SKIN_UITRON = xy]) AM_CONDITIONAL(CONFIG_RTAI_XENOMAI_SKIN_PSE51,[test x$CONFIG_RTAI_XENOMAI_SKIN_PSE51 = xy]) AM_CONDITIONAL(CONFIG_RTAI_XENOMAI_VMLIB,[test x$CONFIG_RTAI_XENOMAI_VMLIB = xy]) AM_CONDITIONAL(CONFIG_RTAI_LAB,[test x$CONFIG_RTAI_LAB = xy]) AM_CONDITIONAL(CONFIG_RTAI_MVM,[test x$CONFIG_RTAI_MVM = xy]) AM_CONDITIONAL(CONFIG_RTAI_TESTSUITE,[test x$CONFIG_RTAI_TESTSUITE = xy]) dnl Misc compilation conditionals AM_CONDITIONAL(CONFIG_RTAI_ADEOS,[test "$CONFIG_RTAI_ADEOS" = y]) AM_CONDITIONAL(CONFIG_RTAI_MATH_C99,[test "$CONFIG_RTAI_MATH_C99" = y]) AM_CONDITIONAL(CONFIG_RTAI_COMPAT,[test "$CONFIG_RTAI_COMPAT" = y]) dnl Documentation AM_CONDITIONAL(CONFIG_RTAI_DOX_DOC,[test "$CONFIG_RTAI_DOX_DOC" = y]) # Automake variables related to DocBook documentation are handled in docbook.m4. dnl Maintenance symbols and profiles AM_CONDITIONAL(CONFIG_RTAI_MAINTAINER,[test "$CONFIG_RTAI_MAINTAINER" = y]) AM_CONDITIONAL(CONFIG_RTAI_MAINTAINER_PMA,[test "$CONFIG_RTAI_MAINTAINER_PMA" = y]) AM_CONDITIONAL(CONFIG_RTAI_MAINTAINER_PGM,[test "$CONFIG_RTAI_MAINTAINER_PGM" = y]) AM_CONDITIONAL(CONFIG_RTAI_OLD_FASHIONED_BUILD,[test "$CONFIG_RTAI_OLD_FASHIONED_BUILD" = y]) dnl dnl Define arch-specific CFLAGS and links dnl if test x$CONFIG_KBUILD = x; then dnl The following sets RTAI_KMOD_CFLAGS to the value used by the dnl specified Linux tree for building kernel modules. This hack is dnl not needed for 2.6 and above since out-of-tree builds of modules dnl are fully controlled by the kbuild system, so that we don't even dnl need to know of the compilation flags which will be used. AC_MSG_CHECKING([for module compilation flags]) kmod_cflags=`cd $srcdir/rtai-core/config/modules && make -s RTAI_LINUX_DIR=$RTAI_LINUX_DIR ARCH=$RTAI_TARGET_ARCH CC=$CC | grep '^RTAI_KMOD_CFLAGS='` eval $kmod_cflags if test "$RTAI_KMOD_CFLAGS" = ""; then AC_MSG_ERROR([Unable to retrieve compilation flags for kernel modules out of $RTAI_LINUX_DIR/Makefile]) fi AC_MSG_RESULT([ok]) RTAI_MODULE_EXT=.o RTAI_KBUILD_ENV= RTAI_KBUILD_CMD= RTAI_KBUILD_CLEAN= else RTAI_MODULE_EXT=.ko RTAI_KBUILD_ENV='src2obj = $(patsubst %.$(1),%.o,$(filter %.$(1),$(call notdir,$(2))))' RTAI_KBUILD_CMD="@for src in \$^; do if test \\! -r \`basename \$\$src\`; then \$(LN_S) \$\$src; fi; done; \ rm -f $RTAI_LINUX_DIR/.tmp_versions/rtai_*.mod $RTAI_LINUX_DIR/.tmp_versions/*_rt.mod; \ \$(MAKE) -C $RTAI_LINUX_DIR CROSS_COMPILE=\$(CROSS_COMPILE) CC=$CC ARCH=@RTAI_TARGET_ARCH@ \ SUBDIRS=\$\$PWD M=\$\$PWD rtai_srctree=\`cd \$(top_srcdir) && pwd\` rtai_srcdir=\`cd \$(srcdir) && pwd\` V=\$(V) modules \ rtai_objs='\$(call src2obj,c,\$^) \$(call src2obj,S,\$^) \$(call src2obj,cc,\$^) \$(call src2obj,cpp,\$^)' rtai_target=\$(basename \$@)" RTAI_KBUILD_CLEAN='rm -f *.ko *.mod.c .*.cmd *.o' fi AC_MSG_CHECKING([for kernel module extension]) AC_MSG_RESULT([$RTAI_MODULE_EXT]) AC_MSG_CHECKING([for RTAI target architecture]) RTAI_USER_CFLAGS="-I$RTAI_LINUX_DIR/include" case $RTAI_TARGET_ARCH in i386) RTAI_TARGET_SUBARCH= RTAI_KMOD_CXXFLAGS="$RTAI_KMOD_CFLAGS -fno-rtti -fno-exceptions -fno-strength-reduce -pipe" RTAI_USER_CFLAGS="$RTAI_USER_CFLAGS -Wall -Wstrict-prototypes -pipe" if test x$CONFIG_RTAI_FPU_SUPPORT = xy; then RTAI_FP_CFLAGS="-ffast-math -mhard-float" else RTAI_FP_CFLAGS="-ffast-math -msoft-float" fi ;; arm) if test "$CONFIG_ARCH_SA1100" = y; then RTAI_TARGET_SUBARCH=sa1100 elif test "$CONFIG_ARCH_CLPS711X" = y; then RTAI_TARGET_SUBARCH=clps711x elif test "$CONFIG_ARCH_PXA" = y; then RTAI_TARGET_SUBARCH=pxa elif test "$CONFIG_ARCH_SPC200E" = y; then RTAI_TARGET_SUBARCH=spc2XX elif test "$CONFIG_ARCH_SPC200C" = y; then RTAI_TARGET_SUBARCH=spc2XXc elif test "$CONFIG_ARCH_MSE500" = y; then RTAI_TARGET_SUBARCH=mse500 else echo echo "******************************************" echo "Unsupported ARM sub-architecture -- Sorry." echo "******************************************" exit 1 fi RTAI_KMOD_CXXFLAGS="$RTAI_KMOD_CFLAGS -fno-rtti -fno-exceptions -fno-strength-reduce -pipe" RTAI_USER_CFLAGS="$RTAI_USER_CFLAGS -Wall -Wstrict-prototypes -pipe" RTAI_FP_CFLAGS="-ffast-math -msoft-float" AC_CONFIG_LINKS(rtai-core/include/asm-arm/arch:rtai-core/include/asm-arm/arch-$RTAI_TARGET_SUBARCH) ;; ppc) RTAI_TARGET_SUBARCH= RTAI_KMOD_CFLAGS="$RTAI_KMOD_CFLAGS -I${RTAI_LINUX_DIR}/arch/ppc" RTAI_KMOD_CXXFLAGS="$RTAI_KMOD_CFLAGS -fno-rtti -fno-exceptions -fno-strength-reduce -pipe" RTAI_USER_CFLAGS="$RTAI_USER_CFLAGS -Wall -Wstrict-prototypes -pipe" if test x$CONFIG_RTAI_FPU_SUPPORT = xy; then RTAI_FP_CFLAGS="-mhard-float" else RTAI_FP_CFLAGS="-msoft-float" fi ;; mips) RTAI_TARGET_SUBARCH= RTAI_KMOD_CXXFLAGS="$RTAI_KMOD_CFLAGS -fno-rtti -fno-exceptions -fno-strength-reduce -pipe" RTAI_USER_CFLAGS="$RTAI_USER_CFLAGS -Wall -Wstrict-prototypes -pipe" if test x$CONFIG_RTAI_FPU_SUPPORT = xy; then RTAI_FP_CFLAGS="-mhard-float" else RTAI_FP_CFLAGS="-msoft-float" fi ;; cris) RTAI_TARGET_SUBARCH= RTAI_KMOD_CXXFLAGS="$RTAI_KMOD_CFLAGS -fno-rtti -fno-exceptions -fno-strength-reduce -pipe" RTAI_USER_CFLAGS="$RTAI_USER_CFLAGS -Wall -Wstrict-prototypes -pipe" RTAI_FP_CFLAGS="" ;; esac if test x$CONFIG_RTAI_KMOD_DEBUG = xy; then RTAI_KMOD_CFLAGS="-g $RTAI_KMOD_CFLAGS" RTAI_KMOD_CXXFLAGS="-g $RTAI_KMOD_CXXFLAGS" fi if [[ $ac_cv_accepts_cxa_atexit = yes ]]; then RTAI_KMOD_CXXFLAGS="$RTAI_KMOD_CXXFLAGS -fno-use-cxa-atexit" fi dnl Ok, the following isn't pretty, but required to process the dnl various inlining modes correctly. This boils down to: dnl - if mode == "none", then we will always need -llxrt to be dnl tackled on the library deps for user-space programs. dnl - if mode == "eager/static", then we will never need -llxrt dnl - if mode == "conditional/extern", then we will not need -llxrt dnl unless the optimizer has been switched off, i.e. when the dnl debugging mode has been switched on. if test $CONFIG_RTAI_LXRT_INLINE = 3; then RTAI_LXRT_LDADD=-llxrt else RTAI_LXRT_LDADD= if test x$CONFIG_RTAI_USER_DEBUG = xy; then RTAI_USER_CFLAGS="-g $RTAI_USER_CFLAGS" if test $CONFIG_RTAI_LXRT_INLINE = 2; then RTAI_LXRT_LDADD="-llxrt" fi else RTAI_USER_CFLAGS="-O2 $RTAI_USER_CFLAGS" fi fi RTAI_KMOD_APP_CFLAGS=$RTAI_KMOD_CFLAGS RTAI_KMOD_APP_CXXFLAGS=$RTAI_KMOD_CXXFLAGS RTAI_USER_APP_CFLAGS=$RTAI_USER_CFLAGS RTAI_KMOD_CFLAGS="$RTAI_KMOD_CFLAGS -D__IN_RTAI__" RTAI_KMOD_CXXFLAGS="$RTAI_KMOD_CXXFLAGS -D__IN_RTAI__" RTAI_USER_CFLAGS="$RTAI_USER_CFLAGS -D__IN_RTAI__" AC_CONFIG_LINKS(rtai-core/include/asm:rtai-core/include/asm-$RTAI_TARGET_ARCH) if test x$CONFIG_RTAI_OLD_FASHIONED_BUILD = xy; then AC_CONFIG_LINKS(rtai-core/include/rtai_config.h:rtai_config.h) fi if test x$RTAI_TARGET_SUBARCH = x; then AC_MSG_RESULT([$RTAI_TARGET_ARCH]) else AC_MSG_RESULT([$RTAI_TARGET_ARCH ($RTAI_TARGET_SUBARCH)]) fi if test x$CONFIG_KBUILD = xy; then AC_CONFIG_LINKS(rtai-core/arch/$RTAI_TARGET_ARCH/hal/Makefile:rtai-core/arch/$RTAI_TARGET_ARCH/hal/Makefile.kbuild) if test -d $srcdir/rtai-core/arch/$RTAI_TARGET_ARCH/calibration; then AC_CONFIG_LINKS(rtai-core/arch/$RTAI_TARGET_ARCH/calibration/Makefile:rtai-core/arch/$RTAI_TARGET_ARCH/calibration/Makefile.kbuild) fi AC_CONFIG_LINKS(rtai-core/ipc/bits/Makefile:rtai-core/ipc/bits/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/ipc/fifos/Makefile:rtai-core/ipc/fifos/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/ipc/mbx/Makefile:rtai-core/ipc/mbx/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/ipc/mq/Makefile:rtai-core/ipc/mq/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/ipc/msg/Makefile:rtai-core/ipc/msg/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/ipc/sem/Makefile:rtai-core/ipc/sem/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/ipc/tbx/Makefile:rtai-core/ipc/tbx/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/ipc/netrpc/Makefile:rtai-core/ipc/netrpc/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/ipc/shm/Makefile:rtai-core/ipc/shm/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/leds/Makefile:rtai-core/leds/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/malloc/Makefile:rtai-core/malloc/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/tasklets/Makefile:rtai-core/tasklets/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/wd/Makefile:rtai-core/wd/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/usi/Makefile:rtai-core/usi/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/math/Makefile:rtai-core/math/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/sched/rtai/Makefile:rtai-core/sched/rtai/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/sched/xenomai/Makefile:rtai-core/sched/xenomai/Makefile.kbuild) AC_CONFIG_LINKS(rtai-core/sched/xenomai/fusion/Makefile:rtai-core/sched/xenomai/fusion/Makefile.kbuild) AC_CONFIG_LINKS(rtai-addons/serial/Makefile:rtai-addons/serial/Makefile.kbuild) AC_CONFIG_LINKS(rtai-addons/comedi/Makefile:rtai-addons/comedi/Makefile.kbuild) AC_CONFIG_LINKS(rtai-addons/skins/pse51/Makefile:rtai-addons/skins/pse51/Makefile.kbuild) AC_CONFIG_LINKS(rtai-addons/skins/uITRON/Makefile:rtai-addons/skins/uITRON/Makefile.kbuild) AC_CONFIG_LINKS(rtai-addons/skins/psos+/Makefile:rtai-addons/skins/psos+/Makefile.kbuild) AC_CONFIG_LINKS(rtai-addons/skins/vrtx/Makefile:rtai-addons/skins/vrtx/Makefile.kbuild) AC_CONFIG_LINKS(rtai-addons/skins/vxworks/Makefile:rtai-addons/skins/vxworks/Makefile.kbuild) AC_CONFIG_LINKS(rtai-testsuite/kern/latency/Makefile:rtai-testsuite/kern/latency/Makefile.kbuild) AC_CONFIG_LINKS(rtai-testsuite/kern/preempt/Makefile:rtai-testsuite/kern/preempt/Makefile.kbuild) AC_CONFIG_LINKS(rtai-testsuite/kern/switches/Makefile:rtai-testsuite/kern/switches/Makefile.kbuild) fi dnl dnl Build the Makefiles dnl AC_SUBST(CROSS_COMPILE) AC_SUBST(DOXYGEN_SHOW_INCLUDE_FILES) AC_SUBST(DOXYGEN_HAVE_DOT) AC_SUBST(DOXYGEN) AC_SUBST(LATEX_BATCHMODE) AC_SUBST(LATEX_MODE) AC_SUBST(EFLTK_DIR) AC_SUBST(COMEDI_DIR) AC_SUBST(RTAI_BUILD_STRING) AC_SUBST(RTAI_HOST_STRING) AC_SUBST(RTAI_TARGET_ARCH) AC_SUBST(RTAI_TARGET_SUBARCH) AC_SUBST(RTAI_BUILTIN_MODLIST) AC_SUBST(RTAI_KMOD_CFLAGS) AC_SUBST(RTAI_KMOD_CXXFLAGS) AC_SUBST(RTAI_USER_CFLAGS) AC_SUBST(RTAI_KMOD_APP_CFLAGS) AC_SUBST(RTAI_KMOD_APP_CXXFLAGS) AC_SUBST(RTAI_USER_APP_CFLAGS) AC_SUBST(RTAI_LXRT_LDADD) AC_SUBST(RTAI_FP_CFLAGS) AC_SUBST(RTAI_COMPAT_CPPFLAGS) AC_SUBST(RTAI_LINUX_DIR) AC_SUBST(RTAI_LINUX_VERSION) AC_SUBST(RTAI_MODULE_DIR) AC_SUBST(RTAI_MODULE_EXT) AC_SUBST(RTAI_KBUILD_ENV) AC_SUBST(RTAI_KBUILD_CMD) AC_SUBST(RTAI_KBUILD_CLEAN) AC_SUBST(CONFIG_RTAI_LINUXDIR) AC_CONFIG_FILES([ \ GNUmakefile \ rtai-core/GNUmakefile \ rtai-core/arch/GNUmakefile \ rtai-core/include/GNUmakefile \ rtai-core/ipc/GNUmakefile \ rtai-core/sched/GNUmakefile \ rtai-core/sched/rtai/GNUmakefile \ rtai-core/sched/rtai/liblxrt/GNUmakefile \ rtai-core/sched/xenomai/GNUmakefile \ rtai-core/sched/xenomai/fusion/GNUmakefile \ rtai-core/scripts/GNUmakefile \ rtai-core/scripts/rtai-config \ rtai-core/scripts/rtai-load \ rtai-core/arch/i386/GNUmakefile \ rtai-core/arch/i386/hal/GNUmakefile \ rtai-core/arch/i386/calibration/GNUmakefile \ rtai-core/include/asm-i386/GNUmakefile \ rtai-core/arch/arm/GNUmakefile \ rtai-core/arch/arm/hal/GNUmakefile \ rtai-core/include/asm-arm/GNUmakefile \ rtai-core/arch/ppc/GNUmakefile \ rtai-core/arch/ppc/hal/GNUmakefile \ rtai-core/include/asm-ppc/GNUmakefile \ rtai-core/arch/mips/GNUmakefile \ rtai-core/arch/mips/hal/GNUmakefile \ rtai-core/include/asm-mips/GNUmakefile \ rtai-core/arch/cris/GNUmakefile \ rtai-core/arch/cris/hal/GNUmakefile \ rtai-core/include/asm-cris/GNUmakefile \ rtai-core/ipc/bits/GNUmakefile \ rtai-core/ipc/fifos/GNUmakefile \ rtai-core/ipc/netrpc/GNUmakefile \ rtai-core/ipc/shm/GNUmakefile \ rtai-core/ipc/sem/GNUmakefile \ rtai-core/ipc/msg/GNUmakefile \ rtai-core/ipc/mbx/GNUmakefile \ rtai-core/ipc/tbx/GNUmakefile \ rtai-core/ipc/mq/GNUmakefile \ rtai-core/math/GNUmakefile \ rtai-core/malloc/GNUmakefile \ rtai-core/tasklets/GNUmakefile \ rtai-core/trace/GNUmakefile \ rtai-core/wd/GNUmakefile \ rtai-core/usi/GNUmakefile \ rtai-core/leds/GNUmakefile \ ]) build_addons=$CONFIG_RTAI_CPLUSPLUS$CONFIG_RTAI_SERIAL$CONFIG_RTAI_COMEDI_LXRT for skin in PSOS VXWORKS VRTX UITRON PSE51; do cfvar=CONFIG_RTAI_XENOMAI_SKIN_$skin eval build_addons="$build_addons\$$cfvar" done if test -d $srcdir/rtai-addons; then AC_CONFIG_FILES([ \ rtai-addons/GNUmakefile \ rtai-addons/cpp/GNUmakefile \ rtai-addons/comedi/GNUmakefile \ rtai-addons/serial/GNUmakefile \ rtai-addons/skins/GNUmakefile \ rtai-addons/skins/psos+/GNUmakefile \ rtai-addons/skins/vxworks/GNUmakefile \ rtai-addons/skins/vrtx/GNUmakefile \ rtai-addons/skins/uITRON/GNUmakefile \ rtai-addons/skins/pse51/GNUmakefile \ ]) elif test \! x$build_addons = x; then AC_MSG_ERROR([rtai-addons package is missing]) fi AM_CONDITIONAL(CONFIG_RTAI_ADDONS,[test \! x$build_addons = x]) if test -d $srcdir/rtai-lab; then AC_CONFIG_FILES([ \ rtai-lab/GNUmakefile \ rtai-lab/matlab/GNUmakefile \ rtai-lab/scilab/GNUmakefile \ rtai-lab/scilab/utility/GNUmakefile \ rtai-lab/scilab/devices/GNUmakefile \ ]) elif test \! x$CONFIG_RTAI_LAB = x; then AC_MSG_ERROR([rtai-lab package is missing]) fi if test -d $srcdir/rtai-testsuite; then AC_CONFIG_FILES([ \ rtai-testsuite/GNUmakefile \ rtai-testsuite/kern/GNUmakefile \ rtai-testsuite/kern/latency/GNUmakefile \ rtai-testsuite/kern/preempt/GNUmakefile \ rtai-testsuite/kern/switches/GNUmakefile \ rtai-testsuite/user/GNUmakefile \ rtai-testsuite/user/latency/GNUmakefile \ rtai-testsuite/user/preempt/GNUmakefile \ rtai-testsuite/user/switches/GNUmakefile \ ]) elif test \! x$CONFIG_RTAI_TESTSUITE = x; then AC_MSG_ERROR([rtai-testsuite package is missing]) fi if test -d $srcdir/rtai-compat; then AC_CONFIG_FILES([ \ rtai-compat/GNUmakefile \ rtai-compat/include/GNUmakefile \ ]) elif test \! x$CONFIG_RTAI_COMPAT = x; then AC_MSG_ERROR([rtai-compat package is missing]) fi if test \! x$RTAI_MAYBE_DOCDIR = x; then AC_CONFIG_FILES([ \ rtai-doc/GNUmakefile \ rtai-doc/doxygen/GNUmakefile \ rtai-doc/doxygen/Doxyfile \ rtai-doc/docbook/GNUmakefile \ rtai-doc/docbook/catalog \ rtai-doc/docbook/custom-stylesheets/GNUmakefile \ rtai-doc/docbook/custom-stylesheets/xsl/GNUmakefile \ rtai-doc/docbook/custom-stylesheets/xsl/common/GNUmakefile \ rtai-doc/docbook/custom-stylesheets/xsl/fo/GNUmakefile \ rtai-doc/docbook/custom-stylesheets/xsl/html/GNUmakefile \ rtai-doc/docbook/custom-stylesheets/xsl/html/chunk.xsl \ rtai-doc/docbook/docbook-test/GNUmakefile \ ]) fi if test x$CONFIG_RTAI_MVM = xy; then AC_CONFIG_SUBDIRS(rtai-sim) fi AC_OUTPUT()