fp@365: #------------------------------------------------------------------------------
fp@1363: #
fp@1363: # $Id$
fp@1363: #
fp@1363: # Copyright (C) 2006-2009 Florian Pose, Ingenieurgemeinschaft IgH
fp@1363: #
fp@1363: # This file is part of the IgH EtherCAT Master.
fp@1363: #
fp@1363: # The IgH EtherCAT Master is free software; you can redistribute it and/or
fp@1363: # modify it under the terms of the GNU General Public License version 2, as
fp@1363: # published by the Free Software Foundation.
fp@1363: #
fp@1363: # The IgH EtherCAT Master is distributed in the hope that it will be useful,
fp@1363: # but WITHOUT ANY WARRANTY; without even the implied warranty of
fp@1363: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
fp@1363: # Public License for more details.
fp@1363: #
fp@1363: # You should have received a copy of the GNU General Public License along
fp@1363: # with the IgH EtherCAT Master; if not, write to the Free Software
fp@1363: # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
fp@1363: #
fp@1363: # ---
fp@1363: #
fp@1363: # The license mentioned above concerns the source code only. Using the
fp@1363: # EtherCAT technology and brand is only permitted in compliance with the
fp@1363: # industrial property and similar rights of Beckhoff Automation GmbH.
fp@1363: #
fp@365: #------------------------------------------------------------------------------
fp@365:
fp@392: AC_PREREQ(2.59)
fp@1208: AC_INIT([ethercat],[devel],[fp@igh-essen.com])
fp@387: AC_CONFIG_AUX_DIR([autoconf])
fp@479: AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2])
fp@387: AC_PREFIX_DEFAULT([/opt/etherlab])
fp@392: AC_CONFIG_HEADERS([config.h])
fp@392: AC_CONFIG_SRCDIR([config.h.in])
fp@1432: AC_CONFIG_MACRO_DIR([m4])
fp@365:
fp@365: #------------------------------------------------------------------------------
fp@444: # Global
fp@444: #------------------------------------------------------------------------------
fp@444:
fp@922: AC_PROG_CXX
fp@1242: AC_PROG_LIBTOOL
fp@1302: AM_PROG_CC_C_O
fp@922:
fp@444: #------------------------------------------------------------------------------
fp@365: # Linux sources
fp@365: #------------------------------------------------------------------------------
fp@365:
fp@440: AC_ARG_WITH([linux-dir],
fp@365: AC_HELP_STRING(
fp@440: [--with-linux-dir=
],
fp@440: [Linux kernel sources @<:@running kernel@:>@]
fp@367: ),
fp@440: [
fp@440: sourcedir=[$withval]
fp@440: ],
fp@440: [
fp@440: version=[`uname -r`]
fp@440: modulesdir=/lib/modules/${version}
fp@440: if test \! -d ${modulesdir} || test \! -d ${modulesdir}/build; then
fp@440: echo
fp@477: AC_MSG_ERROR([Failed to find Linux sources. Use --with-linux-dir!])
fp@440: fi
fp@440: sourcedir=`cd ${modulesdir}/build && pwd -P`
fp@440: ]
fp@367: )
fp@365:
fp@440: AC_MSG_CHECKING([for Linux kernel sources])
fp@440:
fp@440: if test \! -r ${sourcedir}/.config; then
fp@477: echo
fp@477: AC_MSG_ERROR([No configured Linux kernel sources in $sourcedir])
fp@365: fi
fp@365:
fp@477: # Try to get kernel release string
fp@537: if test -r ${sourcedir}/include/config/kernel.release; then
fp@537: kernelrelease=`cat $sourcedir/include/config/kernel.release`
fp@537: elif test -r ${sourcedir}/.kernelrelease; then
fp@477: kernelrelease=`cat $sourcedir/.kernelrelease`
fp@507: elif test -r ${sourcedir}/include/linux/utsrelease.h; then
fp@507: hdr=${sourcedir}/include/linux/utsrelease.h
fp@507: kernelrelease=`grep UTS_RELEASE $hdr | cut -d " " -f 3- | tr -d \"`
fp@477: elif test -r ${sourcedir}/include/linux/version.h; then
fp@507: hdr=${sourcedir}/include/linux/version.h
fp@477: kernelrelease=`grep UTS_RELEASE $hdr | cut -d " " -f 3- | tr -d \"`
fp@477: fi
fp@477:
fp@477: if test -z "$kernelrelease"; then
fp@477: echo
fp@477: AC_MSG_ERROR([Failed to extract Linux kernel version!])
fp@477: fi
fp@477:
fp@477: # Extract three numbers from kernel release string
fp@537: linuxversion=`echo $kernelrelease | grep -oE "^[[0-9]]+\.[[0-9]]+\.[[0-9]]+"`
fp@477:
fp@367: AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir])
fp@1825: AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $linuxversion)])
fp@1824:
fp@1824: #------------------------------------------------------------------------------
fp@1824: # Linux module installation subdirectory
fp@1824: #------------------------------------------------------------------------------
fp@1824:
fp@1824: AC_ARG_WITH([module-dir],
fp@1824: AC_HELP_STRING(
fp@1824: [--with-module-dir=],
fp@1824: [Linux module installation dir. Default: ethercat]
fp@1824: ),
fp@1824: [moddir=[$withval]],
fp@1824: [moddir="ethercat"]
fp@1824: )
fp@1824: AC_SUBST(INSTALL_MOD_DIR,[$moddir])
fp@1824:
fp@1825: AC_MSG_CHECKING([for Linux modules installation directory])
fp@1824: AC_MSG_RESULT([$INSTALL_MOD_DIR])
fp@367:
fp@367: #------------------------------------------------------------------------------
fp@1540: # Generic Ethernet driver
fp@1540: #------------------------------------------------------------------------------
fp@1540:
fp@1540: AC_ARG_ENABLE([generic],
fp@1540: AS_HELP_STRING([--enable-generic],
fp@1540: [Enable generic Ethernet driver]),
fp@1540: [
fp@1540: case "${enableval}" in
fp@1540: yes) enablegeneric=1
fp@1540: ;;
fp@1540: no) enablegeneric=0
fp@1540: ;;
fp@1540: *) AC_MSG_ERROR([Invalid value for --enable-generic])
fp@1540: ;;
fp@1540: esac
fp@1540: ],
fp@1540: [enablegeneric=0]
fp@1540: )
fp@1540:
fp@1540: AM_CONDITIONAL(ENABLE_GENERIC, test "x$enablegeneric" = "x1")
fp@1540: AC_SUBST(ENABLE_GENERIC,[$enablegeneric])
fp@1540:
fp@1540: #------------------------------------------------------------------------------
fp@582: # 8139too driver
fp@582: #------------------------------------------------------------------------------
fp@582:
fp@582: AC_ARG_ENABLE([8139too],
fp@582: AS_HELP_STRING([--enable-8139too],
fp@582: [Enable 8139too driver]),
fp@582: [
fp@582: case "${enableval}" in
fp@582: yes) enable8139too=1
fp@582: ;;
fp@582: no) enable8139too=0
fp@582: ;;
fp@582: *) AC_MSG_ERROR([Invalid value for --enable-8139too])
fp@582: ;;
fp@582: esac
fp@582: ],
fp@582: [enable8139too=1]
fp@582: )
fp@582:
fp@582: AM_CONDITIONAL(ENABLE_8139TOO, test "x$enable8139too" = "x1")
fp@732: AC_SUBST(ENABLE_8139TOO,[$enable8139too])
fp@485:
fp@485: AC_ARG_WITH([8139too-kernel],
fp@485: AC_HELP_STRING(
fp@485: [--with-8139too-kernel=],
fp@485: [8139too kernel (only if differing)]
fp@485: ),
fp@485: [
fp@485: kernel8139too=[$withval]
fp@485: ],
fp@485: [
fp@485: kernel8139too=$linuxversion
fp@485: ]
fp@485: )
fp@485:
fp@582: if test "x${enable8139too}" = "x1"; then
fp@582: AC_MSG_CHECKING([for kernel for 8139too driver])
fp@582:
fp@945: kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^8139too-.*-" | cut -d "-" -f 2 | uniq`
fp@582: found=0
fp@582: for k in $kernels; do
fp@582: if test "$kernel8139too" = "$k"; then
fp@582: found=1
fp@582: fi
fp@582: done
fp@582: if test $found -ne 1; then
fp@582: AC_MSG_ERROR([kernel $kernel8139too not available for 8139too driver!])
fp@582: fi
fp@582:
fp@582: AC_MSG_RESULT([$kernel8139too])
fp@582: fi
fp@582:
fp@732: AC_SUBST(KERNEL_8139TOO,[$kernel8139too])
fp@732:
fp@582: #------------------------------------------------------------------------------
fp@582: # e100 driver
fp@569: #------------------------------------------------------------------------------
fp@569:
fp@569: AC_ARG_ENABLE([e100],
fp@569: AS_HELP_STRING([--enable-e100],
fp@569: [Enable e100 driver]),
fp@569: [
fp@569: case "${enableval}" in
fp@569: yes) enablee100=1
fp@569: ;;
fp@569: no) enablee100=0
fp@569: ;;
fp@569: *) AC_MSG_ERROR([Invalid value for --enable-e100])
fp@569: ;;
fp@569: esac
fp@569: ],
fp@582: [enablee100=0] # disabled by default
fp@582: )
fp@582:
fp@582: AM_CONDITIONAL(ENABLE_E100, test "x$enablee100" = "x1")
fp@732: AC_SUBST(ENABLE_E100,[$enablee100])
fp@568:
fp@568: AC_ARG_WITH([e100-kernel],
fp@568: AC_HELP_STRING(
fp@568: [--with-e100-kernel=],
fp@568: [e100 kernel (only if differing)]
fp@568: ),
fp@568: [
fp@568: kernele100=[$withval]
fp@568: ],
fp@568: [
fp@568: kernele100=$linuxversion
fp@568: ]
fp@568: )
fp@568:
fp@582: if test "x${enablee100}" = "x1"; then
fp@569: AC_MSG_CHECKING([for kernel for e100 driver])
fp@569:
fp@945: kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^e100-.*-" | cut -d "-" -f 2 | uniq`
fp@569: found=0
fp@569: for k in $kernels; do
fp@569: if test "$kernele100" = "$k"; then
fp@569: found=1
fp@569: fi
fp@569: done
fp@569: if test $found -ne 1; then
fp@569: AC_MSG_ERROR([kernel $kernele100 not available for e100 driver!])
fp@569: fi
fp@569:
fp@569: AC_MSG_RESULT([$kernele100])
fp@569: fi
fp@568:
fp@732: AC_SUBST(KERNEL_E100,[$kernele100])
fp@732:
fp@568: #------------------------------------------------------------------------------
fp@667: # e1000 driver
fp@667: #------------------------------------------------------------------------------
fp@667:
fp@667: AC_ARG_ENABLE([e1000],
fp@667: AS_HELP_STRING([--enable-e1000],
fp@667: [Enable e1000 driver]),
fp@667: [
fp@667: case "${enableval}" in
fp@667: yes) enablee1000=1
fp@667: ;;
fp@667: no) enablee1000=0
fp@667: ;;
fp@667: *) AC_MSG_ERROR([Invalid value for --enable-e1000])
fp@667: ;;
fp@667: esac
fp@667: ],
fp@667: [enablee1000=0] # disabled by default
fp@667: )
fp@667:
fp@667: AM_CONDITIONAL(ENABLE_E1000, test "x$enablee1000" = "x1")
fp@732: AC_SUBST(ENABLE_E1000,[$enablee1000])
fp@667:
fp@667: AC_ARG_WITH([e1000-kernel],
fp@667: AC_HELP_STRING(
fp@667: [--with-e1000-kernel=],
fp@667: [e1000 kernel (only if differing)]
fp@667: ),
fp@667: [
fp@667: kernele1000=[$withval]
fp@667: ],
fp@667: [
fp@667: kernele1000=$linuxversion
fp@667: ]
fp@667: )
fp@667:
fp@667: if test "x${enablee1000}" = "x1"; then
fp@667: AC_MSG_CHECKING([for kernel for e1000 driver])
fp@667:
fp@945: kernels=`ls -1 ${srcdir}/devices/e1000/ | grep -oE "^e1000_main-.*" | cut -d "-" -f 2 | uniq`
fp@667: found=0
fp@667: for k in $kernels; do
fp@667: if test "$kernele1000" = "$k"; then
fp@667: found=1
fp@667: fi
fp@667: done
fp@667: if test $found -ne 1; then
fp@667: AC_MSG_ERROR([kernel $kernele1000 not available for e1000 driver!])
fp@667: fi
fp@667:
fp@667: AC_MSG_RESULT([$kernele1000])
fp@667: fi
fp@667:
fp@732: AC_SUBST(KERNEL_E1000,[$kernele1000])
fp@732:
fp@667: #------------------------------------------------------------------------------
fp@2076: # e1000e driver
fp@2076: #------------------------------------------------------------------------------
fp@2076:
fp@2076: AC_ARG_ENABLE([e1000e],
fp@2076: AS_HELP_STRING([--enable-e1000e],
fp@2076: [Enable e1000e driver]),
fp@2076: [
fp@2076: case "${enableval}" in
fp@2076: yes) enablee1000e=1
fp@2076: ;;
fp@2076: no) enablee1000e=0
fp@2076: ;;
fp@2076: *) AC_MSG_ERROR([Invalid value for --enable-e1000e])
fp@2076: ;;
fp@2076: esac
fp@2076: ],
fp@2076: [enablee1000e=0] # disabled by default
fp@2076: )
fp@2076:
fp@2076: AM_CONDITIONAL(ENABLE_E1000E, test "x$enablee1000e" = "x1")
fp@2076: AC_SUBST(ENABLE_E1000E,[$enablee1000e])
fp@2076:
fp@2076: AC_ARG_WITH([e1000e-kernel],
fp@2076: AC_HELP_STRING(
fp@2076: [--with-e1000e-kernel=],
fp@2076: [e1000e kernel (only if differing)]
fp@2076: ),
fp@2076: [
fp@2076: kernele1000e=[$withval]
fp@2076: ],
fp@2076: [
fp@2076: kernele1000e=$linuxversion
fp@2076: ]
fp@2076: )
fp@2076:
fp@2076: if test "x${enablee1000e}" = "x1"; then
fp@2076: AC_MSG_CHECKING([for kernel for e1000e driver])
fp@2076:
fp@2076: kernels=`ls -1 ${srcdir}/devices/e1000e/ | grep -oE "^netdev-.*" | cut -d "-" -f 2 | uniq`
fp@2076: found=0
fp@2076: for k in $kernels; do
fp@2076: if test "$kernele1000e" = "$k"; then
fp@2076: found=1
fp@2076: fi
fp@2076: done
fp@2076: if test $found -ne 1; then
fp@2076: AC_MSG_ERROR([kernel $kernele1000e not available for e1000e driver!])
fp@2076: fi
fp@2076:
fp@2076: AC_MSG_RESULT([$kernele1000e])
fp@2076: fi
fp@2076:
fp@2076: AC_SUBST(KERNEL_E1000E,[$kernele1000e])
fp@2076:
fp@2076: #------------------------------------------------------------------------------
fp@1353: # r8169 driver
fp@1353: #------------------------------------------------------------------------------
fp@1353:
fp@1353: AC_ARG_ENABLE([r8169],
fp@1353: AS_HELP_STRING([--enable-r8169],
fp@1353: [Enable r8169 driver]),
fp@1353: [
fp@1353: case "${enableval}" in
fp@1353: yes) enable_r8169=1
fp@1353: ;;
fp@1353: no) enable_r8169=0
fp@1353: ;;
fp@1353: *) AC_MSG_ERROR([Invalid value for --enable-r8169])
fp@1353: ;;
fp@1353: esac
fp@1353: ],
fp@1353: [enable_r8169=0] # disabled by default
fp@1353: )
fp@1353:
fp@1353: AM_CONDITIONAL(ENABLE_R8169, test "x$enable_r8169" = "x1")
fp@1353: AC_SUBST(ENABLE_R8169,[$enable_r8169])
fp@1353:
fp@1353: AC_ARG_WITH([r8169-kernel],
fp@1353: AC_HELP_STRING(
fp@1353: [--with-r8169-kernel=],
fp@1353: [r8169 kernel (only if differing)]
fp@1353: ),
fp@1353: [
fp@1353: kernel_r8169=[$withval]
fp@1353: ],
fp@1353: [
fp@1353: kernel_r8169=$linuxversion
fp@1353: ]
fp@1353: )
fp@1353:
fp@1353: if test "x${enable_r8169}" = "x1"; then
fp@1353: AC_MSG_CHECKING([for kernel for r8169 driver])
fp@1353:
fp@1353: kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^r8169-.*-" | cut -d "-" -f 2 | uniq`
fp@1353: found=0
fp@1353: for k in $kernels; do
fp@1353: if test "$kernel_r8169" = "$k"; then
fp@1353: found=1
fp@1353: fi
fp@1353: done
fp@1353: if test $found -ne 1; then
fp@1353: AC_MSG_ERROR([kernel $kernel_r8169 not available for r8169 driver!])
fp@1353: fi
fp@1353:
fp@1353: AC_MSG_RESULT([$kernel_r8169])
fp@1353: fi
fp@1353:
fp@1353: AC_SUBST(KERNEL_R8169,[$kernel_r8169])
fp@1353:
fp@1353: #------------------------------------------------------------------------------
fp@485: # RTAI path (optional)
fp@485: #------------------------------------------------------------------------------
fp@485:
fp@485: AC_ARG_WITH([rtai-dir],
fp@485: AC_HELP_STRING(
fp@485: [--with-rtai-dir=],
ab@2054: [RTAI path (only for RTDM Interface or RTAI examples)]
fp@485: ),
fp@485: [
fp@485: rtaidir=[$withval]
ab@2058: rtai=1
fp@485: ],
fp@485: [
fp@485: rtaidir=""
ab@2058: rtai=0
fp@485: ]
fp@485: )
fp@485:
fp@485: AC_MSG_CHECKING([for RTAI path])
fp@485:
fp@485: if test -z "${rtaidir}"; then
fp@485: AC_MSG_RESULT([not specified.])
fp@485: else
fp@485: if test \! -r ${rtaidir}/include/rtai.h; then
fp@485: AC_MSG_ERROR([no RTAI installation found in ${rtaidir}!])
fp@485: fi
fp@485: AC_MSG_RESULT([$rtaidir])
fp@732: fi
fp@732:
fp@732: AC_SUBST(RTAI_DIR,[$rtaidir])
ab@2058: AM_CONDITIONAL(ENABLE_RTAI, test "x$rtai" = "x1")
ab@2058: AC_SUBST(ENABLE_RTAI,[$rtai])
ab@2054:
ab@2054: #------------------------------------------------------------------------------
ab@2054: # Xenomai path (optional)
ab@2054: #------------------------------------------------------------------------------
ab@2054:
ab@2054: AC_ARG_WITH([xenomai-dir],
ab@2054: AC_HELP_STRING(
ab@2054: [--with-xenomai-dir=],
ab@2058: [Xenomai path (only for RTDM Interface)]
ab@2054: ),
ab@2054: [
ab@2054: xenomaidir=[$withval]
ab@2058: xeno=1
ab@2054: ],
ab@2054: [
ab@2054: xenomaidir=""
ab@2058: xeno=0
ab@2054: ]
ab@2054: )
ab@2054:
ab@2054: AC_MSG_CHECKING([for Xenomai path])
ab@2054:
ab@2054: if test -z "${xenomaidir}"; then
ab@2054: AC_MSG_RESULT([not specified.])
ab@2054: else
ab@2054: if test \! -r ${xenomaidir}/include/xeno_config.h; then
ab@2054: AC_MSG_ERROR([no Xenomai installation found in ${xenomaidir}!])
ab@2054: fi
ab@2054: AC_MSG_RESULT([$xenomaidir])
ab@2054: fi
ab@2054:
ab@2054: AC_SUBST(XENOMAI_DIR,[$xenomaidir])
ab@2058: AM_CONDITIONAL(ENABLE_XENOMAI, test "x$xeno" = "x1")
ab@2058: AC_SUBST(ENABLE_XENOMAI,[$xeno])
ab@2054:
ab@2054: #------------------------------------------------------------------------------
ab@2054: # RTDM Interface (optional)
ab@2054: #------------------------------------------------------------------------------
ab@2054:
ab@2054: AC_ARG_ENABLE([rtdm],
ab@2054: AC_HELP_STRING(
ab@2054: [--enable-rtdm],
ab@2054: [Enable RTDM Interface, depends on RTAI or Xenomai]
ab@2054: ),
ab@2054: [
ab@2054: case "${enableval}" in
ab@2054: yes) rtdm=1
ab@2054: ;;
ab@2054: no) rtdm=0
ab@2054: ;;
ab@2054: *) AC_MSG_ERROR([Invalid value for --enable-rtdm])
ab@2054: ;;
ab@2054: esac
ab@2054: ],
ab@2054: [rtdm=0]
ab@2054: )
ab@2054:
ab@2054: if test "x${rtdm}" = "x1"; then
ab@2054: AC_DEFINE([EC_RTDM], [1], [RTDM interfaces enabled])
ab@2054: fi
ab@2054: AM_CONDITIONAL(ENABLE_RTDM, test "x$rtdm" = "x1")
ab@2054: AC_SUBST(ENABLE_RTDM,[$rtdm])
ab@2054:
fp@485:
fp@485: #------------------------------------------------------------------------------
fp@392: # Debug interface
fp@392: #------------------------------------------------------------------------------
fp@392:
fp@679: AC_ARG_ENABLE([debug-if],
fp@679: AS_HELP_STRING([--enable-debug-if],
fp@440: [Create a debug interface for each master @<:@NO@:>@]),
fp@440: [
fp@440: case "${enableval}" in
fp@440: yes) dbg=1
fp@440: ;;
fp@440: no) dbg=0
fp@440: ;;
fp@679: *) AC_MSG_ERROR([Invalid value for --enable-debug-if])
fp@440: ;;
fp@440: esac
fp@440: ],
fp@440: [dbg=0]
fp@392: )
fp@440:
fp@679: if test "x${dbg}" = "x1"; then
fp@679: AC_DEFINE([EC_DEBUG_IF], [1], [Debug interfaces enabled])
fp@679: fi
fp@679: AM_CONDITIONAL(ENABLE_DEBUG_IF, test "x$dbg" = "x1")
fp@732: AC_SUBST(ENABLE_DEBUG_IF,[$dbg])
fp@679:
fp@679: #------------------------------------------------------------------------------
fp@692: # Debug ring
fp@692: #------------------------------------------------------------------------------
fp@692:
fp@692: AC_ARG_ENABLE([debug-ring],
fp@692: AS_HELP_STRING([--enable-debug-ring],
fp@692: [Create a debug ring to record frames @<:@NO@:>@]),
fp@692: [
fp@692: case "${enableval}" in
fp@692: yes) debugring=1
fp@692: ;;
fp@692: no) debugring=0
fp@692: ;;
fp@692: *) AC_MSG_ERROR([Invalid value for --enable-debug-ring])
fp@692: ;;
fp@692: esac
fp@692: ],
fp@692: [debugring=0]
fp@692: )
fp@692:
fp@692: if test "x${debugring}" = "x1"; then
fp@692: AC_DEFINE([EC_DEBUG_RING], [1], [Debug ring enabled])
fp@692: fi
fp@692:
fp@692: #------------------------------------------------------------------------------
fp@1327: # Ethernet over EtherCAT support
fp@715: #------------------------------------------------------------------------------
fp@715:
fp@715: AC_ARG_ENABLE([eoe],
fp@715: AS_HELP_STRING([--enable-eoe],
fp@715: [Enable EoE support (default: yes)]),
fp@715: [
fp@715: case "${enableval}" in
fp@715: yes) eoe=1
fp@715: ;;
fp@715: no) eoe=0
fp@715: ;;
fp@715: *) AC_MSG_ERROR([Invalid value for --enable-eoe])
fp@715: ;;
fp@715: esac
fp@715: ],
fp@715: [eoe=1]
fp@715: )
fp@715:
fp@715: if test "x${eoe}" = "x1"; then
fp@715: AC_DEFINE([EC_EOE], [1], [EoE support enabled])
fp@715: fi
fp@715: AM_CONDITIONAL(ENABLE_EOE, test "x$eoe" = "x1")
fp@732: AC_SUBST(ENABLE_EOE,[$eoe])
fp@485:
fp@485: #------------------------------------------------------------------------------
fp@1040: # CPU timestamp counter support
fp@1040: #------------------------------------------------------------------------------
fp@1040:
fp@1040: AC_ARG_ENABLE([cycles],
fp@1040: AS_HELP_STRING([--enable-cycles],
fp@1040: [Use CPU timestamp counter (default: no)]),
fp@1040: [
fp@1040: case "${enableval}" in
fp@1040: yes) cycles=1
fp@1040: ;;
fp@1040: no) cycles=0
fp@1040: ;;
fp@1040: *) AC_MSG_ERROR([Invalid value for --enable-cycles])
fp@1040: ;;
fp@1040: esac
fp@1040: ],
fp@1040: [cycles=0]
fp@1040: )
fp@1040:
fp@1040: if test "x${cycles}" = "x1"; then
fp@1040: AC_DEFINE([EC_HAVE_CYCLES], [1], [Use CPU timestamp counter])
fp@1040: fi
fp@1040:
fp@1040: #------------------------------------------------------------------------------
fp@1773: # High-resolution timer support
fp@1773: #------------------------------------------------------------------------------
fp@1773:
fp@1773: AC_ARG_ENABLE([hrtimer],
fp@1773: AS_HELP_STRING([--enable-hrtimer],
fp@1773: [Use high-resolution timer for scheduling (default: no)]),
fp@1773: [
fp@1773: case "${enableval}" in
fp@1773: yes) hrtimer=1
fp@1773: ;;
fp@1773: no) hrtimer=0
fp@1773: ;;
fp@1773: *) AC_MSG_ERROR([Invalid value for --enable-hrtimer])
fp@1773: ;;
fp@1773: esac
fp@1773: ],
fp@1773: [hrtimer=0]
fp@1773: )
fp@1773:
fp@1773: if test "x${hrtimer}" = "x1"; then
fp@1773: AC_DEFINE([EC_USE_HRTIMER], [1], [Use hrtimer for scheduling])
fp@1773: fi
fp@1773:
fp@1773: #------------------------------------------------------------------------------
ch1010277@2045: # Use 2 datagrams (payload+last-byte) when sending to mailbox (reduces frame size)
ch1010277@2045: #------------------------------------------------------------------------------
ch1010277@2045:
ch1010277@2045: AC_ARG_ENABLE([mboxframesize],
ch1010277@2045: AS_HELP_STRING([--enable-mboxframesize],
ch1010277@2045: [Reduced frame size when sending to mailbox, uses 2 datagrams (default: no)]),
ch1010277@2045: [
ch1010277@2045: case "${enableval}" in
ch1010277@2045: yes) mboxframesize=1
ch1010277@2045: ;;
ch1010277@2045: no) mboxframesize=0
ch1010277@2045: ;;
ch1010277@2045: *) AC_MSG_ERROR([Invalid value for --enable-mboxframesize])
ch1010277@2045: ;;
ch1010277@2045: esac
ch1010277@2045: ],
ch1010277@2045: [mboxframesize=0]
ch1010277@2045: )
ch1010277@2045:
ch1010277@2045: if test "x${mboxframesize}" = "x1"; then
ch1010277@2045: AC_DEFINE([EC_REDUCE_MBOXFRAMESIZE], [1], [Reduced frame size when sending to mailbox])
ch1010277@2045: fi
ch1010277@2045:
ch1010277@2045:
ch1010277@2045: #------------------------------------------------------------------------------
fp@1934: # Read alias address from register
fp@1934: #------------------------------------------------------------------------------
fp@1934:
fp@1934: AC_ARG_ENABLE([regalias],
fp@1934: AS_HELP_STRING([--enable-regalias],
fp@1934: [Read alias adresses from register (default: no)]),
fp@1934: [
fp@1934: case "${enableval}" in
fp@1934: yes) regalias=1
fp@1934: ;;
fp@1934: no) regalias=0
fp@1934: ;;
fp@1934: *) AC_MSG_ERROR([Invalid value for --enable-regalias])
fp@1934: ;;
fp@1934: esac
fp@1934: ],
fp@1934: [regalias=0]
fp@1934: )
fp@1934:
fp@1934: if test "x${regalias}" = "x1"; then
fp@1934: AC_DEFINE([EC_REGALIAS], [1], [Read alias adresses from register])
fp@1934: fi
fp@1934:
ch1010277@2028:
ch1010277@2028: #------------------------------------------------------------------------------
fp@1253: # Command-line tool
fp@1253: #-----------------------------------------------------------------------------
fp@1253:
fp@1253: AC_ARG_ENABLE([tool],
fp@1253: AS_HELP_STRING([--enable-tool],
fp@1253: [Build command-line tool (default: yes)]),
fp@1253: [
fp@1253: case "${enableval}" in
fp@1253: yes) tool=1
fp@1253: ;;
fp@1253: no) tool=0
fp@1253: ;;
fp@1253: *) AC_MSG_ERROR([Invalid value for --enable-tool])
fp@1253: ;;
fp@1253: esac
fp@1253: ],
fp@1253: [tool=1]
fp@1253: )
fp@1253:
fp@1253: AM_CONDITIONAL(BUILD_TOOL, test "x$tool" = "x1")
fp@1253:
fp@1253: #------------------------------------------------------------------------------
fp@1242: # Userspace library generation
fp@1242: #------------------------------------------------------------------------------
fp@1242:
fp@1242: AC_ARG_ENABLE([userlib],
fp@1242: AS_HELP_STRING([--enable-userlib],
fp@1242: [Generation of the userspace library (default: yes)]),
fp@1242: [
fp@1242: case "${enableval}" in
fp@1242: yes) userlib=1
fp@1242: ;;
fp@1242: no) userlib=0
fp@1242: ;;
fp@1242: *) AC_MSG_ERROR([Invalid value for --enable-userlib])
fp@1242: ;;
fp@1242: esac
fp@1242: ],
fp@1242: [userlib=1]
fp@1242: )
fp@1242:
fp@1242: AM_CONDITIONAL(ENABLE_USERLIB, test "x$userlib" = "x1")
fp@1242:
fp@1242: #------------------------------------------------------------------------------
fp@1565: # TTY driver
fp@1565: #------------------------------------------------------------------------------
fp@1565:
fp@1565: AC_ARG_ENABLE([tty],
fp@1565: AS_HELP_STRING([--enable-tty],
fp@1565: [Generation of the ec_tty module (default: no)]),
fp@1565: [
fp@1565: case "${enableval}" in
fp@1565: yes) tty=1
fp@1565: ;;
fp@1565: no) tty=0
fp@1565: ;;
fp@1565: *) AC_MSG_ERROR([Invalid value for --enable-tty])
fp@1565: ;;
fp@1565: esac
fp@1565: ],
fp@1565: [tty=0]
fp@1565: )
fp@1565:
fp@1565: AM_CONDITIONAL(ENABLE_TTY, test "x$tty" = "x1")
fp@1565: AC_SUBST(ENABLE_TTY,[$tty])
fp@1565:
fp@1565: #------------------------------------------------------------------------------
fp@485:
ha@385: AC_CONFIG_FILES([
fp@757: Doxyfile
fp@732: Kbuild
fp@392: Makefile
fp@882: devices/Kbuild
fp@882: devices/Makefile
fp@882: devices/e1000/Kbuild
fp@882: devices/e1000/Makefile
fp@2076: devices/e1000e/Kbuild
fp@2076: devices/e1000e/Makefile
fp@1810: ethercat.spec
fp@1286: examples/Kbuild
fp@882: examples/Makefile
fp@1414: examples/dc_rtai/Kbuild
fp@1414: examples/dc_rtai/Makefile
fp@1414: examples/dc_user/Makefile
fp@882: examples/mini/Kbuild
fp@882: examples/mini/Makefile
fp@882: examples/rtai/Kbuild
fp@882: examples/rtai/Makefile
fp@1810: examples/tty/Kbuild
fp@1567: examples/tty/Makefile
fp@1242: examples/user/Makefile
ab@2054: examples/xenomai/Makefile
ab@2056: examples/xenomai_posix/Makefile
ab@2058: examples/rtai_rtdm/Makefile
fp@882: include/Makefile
fp@1242: lib/Makefile
fp@1440: m4/Makefile
fp@732: master/Kbuild
fp@392: master/Makefile
ha@385: script/Makefile
fp@563: script/init.d/Makefile
fp@1185: script/init.d/ethercat
fp@563: script/sysconfig/Makefile
fp@1120: tool/Makefile
fp@1810: tty/Kbuild
fp@1565: tty/Makefile
ab@2054: rtdm/Makefile
ab@2054: rtdm/Kbuild
ha@385: ])
fp@365: AC_OUTPUT
fp@365:
fp@365: #------------------------------------------------------------------------------