configure.ac
author Philipp Weyer <pw@igh-essen.com>
Fri, 18 Aug 2017 12:30:16 +0200
changeset 2679 33b922ec1871
parent 2617 559f2f9c5b08
permissions -rw-r--r--
Fixed lib include paths
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#------------------------------------------------------------------------------
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
     2
#
2414
f35c7c8e6591 Replaced all mangled hg keywords.
Florian Pose <fp@igh-essen.com>
parents: 2393
diff changeset
     3
#  $Id$
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
     4
#
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
     5
#  Copyright (C) 2006-2012  Florian Pose, Ingenieurgemeinschaft IgH
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
     6
#
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
     7
#  This file is part of the IgH EtherCAT Master.
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
     8
#
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
     9
#  The IgH EtherCAT Master is free software; you can redistribute it and/or
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    10
#  modify it under the terms of the GNU General Public License version 2, as
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    11
#  published by the Free Software Foundation.
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    12
#
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    13
#  The IgH EtherCAT Master is distributed in the hope that it will be useful,
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    14
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    15
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    16
#  Public License for more details.
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    17
#
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    18
#  You should have received a copy of the GNU General Public License along
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    19
#  with the IgH EtherCAT Master; if not, write to the Free Software
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    20
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    21
#
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    22
#  ---
2393
5d7d2722dfaa Removed whitespace.
Florian Pose <fp@igh-essen.com>
parents: 2389
diff changeset
    23
#
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    24
#  The license mentioned above concerns the source code only. Using the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    25
#  EtherCAT technology and brand is only permitted in compliance with the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    26
#  industrial property and similar rights of Beckhoff Automation GmbH.
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    27
#
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
#------------------------------------------------------------------------------
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
    30
AC_PREREQ(2.59)
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    31
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    32
#
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    33
# Release procedure
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    34
# - Update Ethernet drivers up to release kernel version
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    35
# - Write NEWS entry with changes since last release
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    36
# - Check for complete Doxygen comments
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    37
# - Update version number in documentation
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    38
# - Update the ChangeLog -> hg log -bstable-1.5 --style=changelog > ChangeLog
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    39
# - Update version number below
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    40
# - make dist-bzip2
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    41
#
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    42
AC_INIT([ethercat],[1.5.2],[fp@igh-essen.com])
387
e6e708a5d502 Improved autotools files.
Florian Pose <fp@igh-essen.com>
parents: 385
diff changeset
    43
AC_CONFIG_AUX_DIR([autoconf])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    44
AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2 subdir-objects])
387
e6e708a5d502 Improved autotools files.
Florian Pose <fp@igh-essen.com>
parents: 385
diff changeset
    45
AC_PREFIX_DEFAULT([/opt/etherlab])
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
    46
AC_CONFIG_HEADERS([config.h])
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
    47
AC_CONFIG_SRCDIR([config.h.in])
1432
1cda765207cd m4 macro dir.
Florian Pose <fp@igh-essen.com>
parents: 1414
diff changeset
    48
AC_CONFIG_MACRO_DIR([m4])
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
#------------------------------------------------------------------------------
444
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    51
# Global
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    52
#------------------------------------------------------------------------------
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    53
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    54
AM_PROG_CC_C_O
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    55
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
922
fede1d8f5b71 Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents: 897
diff changeset
    56
AC_PROG_CXX
1242
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    57
AC_PROG_LIBTOOL
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    58
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    59
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    60
# Kernel modules
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    61
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    62
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    63
AC_MSG_CHECKING([whether to build kernel modules])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    64
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    65
AC_ARG_ENABLE([kernel],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    66
    AS_HELP_STRING([--enable-kernel],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    67
                   [Enable building kernel modules]),
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    68
    [
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    69
        case "${enableval}" in
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    70
            yes) enablekernel=1
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    71
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    72
            no) enablekernel=0
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    73
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    74
            *) AC_MSG_ERROR([Invalid value for --enable-generic])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    75
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    76
        esac
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    77
    ],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    78
    [enablekernel=1]
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    79
)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    80
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    81
if test "x$enablekernel" = "x1"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    82
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    83
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    84
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    85
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    86
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    87
AM_CONDITIONAL(ENABLE_KERNEL, test "x$enablekernel" = "x1")
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    88
AC_SUBST(ENABLE_KERNEL,[$enablekernel])
922
fede1d8f5b71 Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents: 897
diff changeset
    89
444
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    90
#------------------------------------------------------------------------------
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    91
# Linux sources
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    92
#------------------------------------------------------------------------------
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    93
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    94
if test "x$enablekernel" = "x1"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
    95
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    96
AC_ARG_WITH([linux-dir],
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    97
    AC_HELP_STRING(
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    98
        [--with-linux-dir=<DIR>],
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    99
        [Linux kernel sources @<:@running kernel@:>@]
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
   100
    ),
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   101
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   102
        sourcedir=[$withval]
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   103
    ],
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   104
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   105
        version=[`uname -r`]
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   106
        modulesdir=/lib/modules/${version}
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   107
        if test \! -d ${modulesdir} || test \! -d ${modulesdir}/build; then
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   108
           echo
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   109
           AC_MSG_ERROR([Failed to find Linux sources. Use --with-linux-dir!])
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   110
        fi
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   111
        sourcedir=`cd ${modulesdir}/build && pwd -P`
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   112
    ]
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
   113
)
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   114
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   115
AC_MSG_CHECKING([for Linux kernel sources])
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   116
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   117
if test \! -r ${sourcedir}/.config; then
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   118
    echo
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   119
    AC_MSG_ERROR([No configured Linux kernel sources in $sourcedir])
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   120
fi
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   121
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   122
# Try to get kernel release string
537
c715766e0f81 Fixed bad configure behavior with complex kernel version strings.
Florian Pose <fp@igh-essen.com>
parents: 507
diff changeset
   123
if test -r ${sourcedir}/include/config/kernel.release; then
c715766e0f81 Fixed bad configure behavior with complex kernel version strings.
Florian Pose <fp@igh-essen.com>
parents: 507
diff changeset
   124
    kernelrelease=`cat $sourcedir/include/config/kernel.release`
c715766e0f81 Fixed bad configure behavior with complex kernel version strings.
Florian Pose <fp@igh-essen.com>
parents: 507
diff changeset
   125
elif test -r ${sourcedir}/.kernelrelease; then
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   126
    kernelrelease=`cat $sourcedir/.kernelrelease`
507
4687f9d8254e Configuring for kernels 2.6.18 and 2.6.19, thanks to Ralf Roesch.
Florian Pose <fp@igh-essen.com>
parents: 506
diff changeset
   127
elif test -r ${sourcedir}/include/linux/utsrelease.h; then
4687f9d8254e Configuring for kernels 2.6.18 and 2.6.19, thanks to Ralf Roesch.
Florian Pose <fp@igh-essen.com>
parents: 506
diff changeset
   128
    hdr=${sourcedir}/include/linux/utsrelease.h
4687f9d8254e Configuring for kernels 2.6.18 and 2.6.19, thanks to Ralf Roesch.
Florian Pose <fp@igh-essen.com>
parents: 506
diff changeset
   129
    kernelrelease=`grep UTS_RELEASE $hdr | cut -d " " -f 3- | tr -d \"`
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   130
elif test -r ${sourcedir}/include/linux/version.h; then
507
4687f9d8254e Configuring for kernels 2.6.18 and 2.6.19, thanks to Ralf Roesch.
Florian Pose <fp@igh-essen.com>
parents: 506
diff changeset
   131
    hdr=${sourcedir}/include/linux/version.h
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   132
    kernelrelease=`grep UTS_RELEASE $hdr | cut -d " " -f 3- | tr -d \"`
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   133
fi
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   134
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   135
if test -z "$kernelrelease"; then
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   136
    echo
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   137
    AC_MSG_ERROR([Failed to extract Linux kernel version!])
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   138
fi
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   139
2389
02f32b78f79d Added e100 driver for kernel 3.0.
Florian Pose <fp@igh-essen.com>
parents: 2229
diff changeset
   140
if test ${kernelrelease%%.*} -gt 2; then
02f32b78f79d Added e100 driver for kernel 3.0.
Florian Pose <fp@igh-essen.com>
parents: 2229
diff changeset
   141
    regex="^[[0-9]]+\.[[0-9]]+"
02f32b78f79d Added e100 driver for kernel 3.0.
Florian Pose <fp@igh-essen.com>
parents: 2229
diff changeset
   142
else
02f32b78f79d Added e100 driver for kernel 3.0.
Florian Pose <fp@igh-essen.com>
parents: 2229
diff changeset
   143
    regex="^[[0-9]]+\.[[0-9]]+\.[[0-9]]+"
02f32b78f79d Added e100 driver for kernel 3.0.
Florian Pose <fp@igh-essen.com>
parents: 2229
diff changeset
   144
fi
02f32b78f79d Added e100 driver for kernel 3.0.
Florian Pose <fp@igh-essen.com>
parents: 2229
diff changeset
   145
02f32b78f79d Added e100 driver for kernel 3.0.
Florian Pose <fp@igh-essen.com>
parents: 2229
diff changeset
   146
# Extract numbers from kernel release
02f32b78f79d Added e100 driver for kernel 3.0.
Florian Pose <fp@igh-essen.com>
parents: 2229
diff changeset
   147
linuxversion=`echo $kernelrelease | grep -oE "$regex"`
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
   148
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
   149
AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir])
1825
65781b048a47 Minor changes in configure output.
Florian Pose <fp@igh-essen.com>
parents: 1824
diff changeset
   150
AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $linuxversion)])
1824
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   151
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   152
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   153
1824
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   154
#------------------------------------------------------------------------------
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   155
# Linux module installation subdirectory
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   156
#------------------------------------------------------------------------------
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   157
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   158
AC_ARG_WITH([module-dir],
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   159
    AC_HELP_STRING(
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   160
        [--with-module-dir=<DIR>],
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   161
        [Linux module installation dir. Default: ethercat]
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   162
    ),
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   163
    [moddir=[$withval]],
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   164
    [moddir="ethercat"]
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   165
)
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   166
AC_SUBST(INSTALL_MOD_DIR,[$moddir])
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   167
1825
65781b048a47 Minor changes in configure output.
Florian Pose <fp@igh-essen.com>
parents: 1824
diff changeset
   168
AC_MSG_CHECKING([for Linux modules installation directory])
1824
bbb70ca26f09 Use kernel's modules_install target, instead of building our own. Attention:
Florian Pose <fp@igh-essen.com>
parents: 1811
diff changeset
   169
AC_MSG_RESULT([$INSTALL_MOD_DIR])
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
   170
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
   171
#------------------------------------------------------------------------------
1540
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   172
# Generic Ethernet driver
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   173
#------------------------------------------------------------------------------
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   174
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   175
AC_ARG_ENABLE([generic],
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   176
    AS_HELP_STRING([--enable-generic],
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   177
                   [Enable generic Ethernet driver]),
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   178
    [
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   179
        case "${enableval}" in
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   180
            yes) enablegeneric=1
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   181
                ;;
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   182
            no) enablegeneric=0
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   183
                ;;
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   184
            *) AC_MSG_ERROR([Invalid value for --enable-generic])
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   185
                ;;
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   186
        esac
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   187
    ],
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   188
    [enablegeneric=$enablekernel]
1540
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   189
)
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   190
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   191
AM_CONDITIONAL(ENABLE_GENERIC, test "x$enablegeneric" = "x1")
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   192
AC_SUBST(ENABLE_GENERIC,[$enablegeneric])
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   193
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1440
diff changeset
   194
#------------------------------------------------------------------------------
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   195
# 8139too driver
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   196
#------------------------------------------------------------------------------
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   197
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   198
AC_ARG_ENABLE([8139too],
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   199
    AS_HELP_STRING([--enable-8139too],
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   200
                   [Enable 8139too driver]),
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   201
    [
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   202
        case "${enableval}" in
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   203
            yes) enable8139too=1
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   204
                ;;
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   205
            no) enable8139too=0
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   206
                ;;
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   207
            *) AC_MSG_ERROR([Invalid value for --enable-8139too])
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   208
                ;;
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   209
        esac
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   210
    ],
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   211
    [enable8139too=$enablekernel]
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   212
)
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   213
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   214
AM_CONDITIONAL(ENABLE_8139TOO, test "x$enable8139too" = "x1")
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   215
AC_SUBST(ENABLE_8139TOO,[$enable8139too])
485
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   216
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   217
AC_ARG_WITH([8139too-kernel],
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   218
    AC_HELP_STRING(
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   219
        [--with-8139too-kernel=<X.Y.Z>],
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   220
        [8139too kernel (only if differing)]
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   221
    ),
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   222
    [
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   223
        kernel8139too=[$withval]
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   224
    ],
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   225
    [
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   226
        kernel8139too=$linuxversion
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   227
    ]
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   228
)
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   229
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   230
if test "x${enable8139too}" = "x1"; then
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   231
    AC_MSG_CHECKING([for kernel for 8139too driver])
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   232
945
a5907351e13e Improved out-of-place build.
Florian Pose <fp@igh-essen.com>
parents: 922
diff changeset
   233
    kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^8139too-.*-" | cut -d "-" -f 2 | uniq`
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   234
    found=0
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   235
    for k in $kernels; do
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   236
        if test "$kernel8139too" = "$k"; then
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   237
            found=1
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   238
        fi
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   239
    done
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   240
    if test $found -ne 1; then
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   241
        AC_MSG_ERROR([kernel $kernel8139too not available for 8139too driver!])
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   242
    fi
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   243
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   244
    AC_MSG_RESULT([$kernel8139too])
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   245
fi
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   246
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   247
AC_SUBST(KERNEL_8139TOO,[$kernel8139too])
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   248
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   249
#------------------------------------------------------------------------------
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   250
# e100 driver
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   251
#------------------------------------------------------------------------------
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   252
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   253
AC_ARG_ENABLE([e100],
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   254
    AS_HELP_STRING([--enable-e100],
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   255
                   [Enable e100 driver]),
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   256
    [
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   257
        case "${enableval}" in
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   258
            yes) enablee100=1
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   259
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   260
            no) enablee100=0
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   261
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   262
            *) AC_MSG_ERROR([Invalid value for --enable-e100])
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   263
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   264
        esac
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   265
    ],
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   266
    [enablee100=0] # disabled by default
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   267
)
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   268
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   269
AM_CONDITIONAL(ENABLE_E100, test "x$enablee100" = "x1")
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   270
AC_SUBST(ENABLE_E100,[$enablee100])
568
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   271
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   272
AC_ARG_WITH([e100-kernel],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   273
    AC_HELP_STRING(
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   274
        [--with-e100-kernel=<X.Y.Z>],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   275
        [e100 kernel (only if differing)]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   276
    ),
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   277
    [
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   278
        kernele100=[$withval]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   279
    ],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   280
    [
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   281
        kernele100=$linuxversion
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   282
    ]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   283
)
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   284
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   285
if test "x${enablee100}" = "x1"; then
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   286
    AC_MSG_CHECKING([for kernel for e100 driver])
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   287
945
a5907351e13e Improved out-of-place build.
Florian Pose <fp@igh-essen.com>
parents: 922
diff changeset
   288
    kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^e100-.*-" | cut -d "-" -f 2 | uniq`
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   289
    found=0
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   290
    for k in $kernels; do
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   291
        if test "$kernele100" = "$k"; then
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   292
            found=1
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   293
        fi
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   294
    done
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   295
    if test $found -ne 1; then
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   296
        AC_MSG_ERROR([kernel $kernele100 not available for e100 driver!])
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   297
    fi
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   298
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   299
    AC_MSG_RESULT([$kernele100])
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   300
fi
568
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   301
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   302
AC_SUBST(KERNEL_E100,[$kernele100])
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   303
568
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   304
#------------------------------------------------------------------------------
667
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   305
# e1000 driver
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   306
#------------------------------------------------------------------------------
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   307
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   308
AC_ARG_ENABLE([e1000],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   309
    AS_HELP_STRING([--enable-e1000],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   310
                   [Enable e1000 driver]),
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   311
    [
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   312
        case "${enableval}" in
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   313
            yes) enablee1000=1
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   314
                ;;
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   315
            no) enablee1000=0
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   316
                ;;
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   317
            *) AC_MSG_ERROR([Invalid value for --enable-e1000])
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   318
                ;;
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   319
        esac
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   320
    ],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   321
    [enablee1000=0] # disabled by default
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   322
)
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   323
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   324
AM_CONDITIONAL(ENABLE_E1000, test "x$enablee1000" = "x1")
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   325
AC_SUBST(ENABLE_E1000,[$enablee1000])
667
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   326
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   327
AC_ARG_WITH([e1000-kernel],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   328
    AC_HELP_STRING(
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   329
        [--with-e1000-kernel=<X.Y.Z>],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   330
        [e1000 kernel (only if differing)]
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   331
    ),
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   332
    [
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   333
        kernele1000=[$withval]
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   334
    ],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   335
    [
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   336
        kernele1000=$linuxversion
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   337
    ]
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   338
)
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   339
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   340
if test "x${enablee1000}" = "x1"; then
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   341
    AC_MSG_CHECKING([for kernel for e1000 driver])
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   342
945
a5907351e13e Improved out-of-place build.
Florian Pose <fp@igh-essen.com>
parents: 922
diff changeset
   343
    kernels=`ls -1 ${srcdir}/devices/e1000/ | grep -oE "^e1000_main-.*" | cut -d "-" -f 2 | uniq`
667
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   344
    found=0
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   345
    for k in $kernels; do
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   346
        if test "$kernele1000" = "$k"; then
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   347
            found=1
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   348
        fi
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   349
    done
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   350
    if test $found -ne 1; then
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   351
        AC_MSG_ERROR([kernel $kernele1000 not available for e1000 driver!])
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   352
    fi
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   353
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   354
    AC_MSG_RESULT([$kernele1000])
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   355
fi
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   356
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   357
AC_SUBST(KERNEL_E1000,[$kernele1000])
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   358
667
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   359
#------------------------------------------------------------------------------
2076
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   360
# e1000e driver
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   361
#------------------------------------------------------------------------------
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   362
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   363
AC_ARG_ENABLE([e1000e],
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   364
    AS_HELP_STRING([--enable-e1000e],
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   365
                   [Enable e1000e driver]),
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   366
    [
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   367
        case "${enableval}" in
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   368
            yes) enablee1000e=1
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   369
                ;;
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   370
            no) enablee1000e=0
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   371
                ;;
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   372
            *) AC_MSG_ERROR([Invalid value for --enable-e1000e])
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   373
                ;;
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   374
        esac
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   375
    ],
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   376
    [enablee1000e=0] # disabled by default
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   377
)
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   378
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   379
AM_CONDITIONAL(ENABLE_E1000E, test "x$enablee1000e" = "x1")
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   380
AC_SUBST(ENABLE_E1000E,[$enablee1000e])
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   381
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   382
AC_ARG_WITH([e1000e-kernel],
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   383
    AC_HELP_STRING(
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   384
        [--with-e1000e-kernel=<X.Y.Z>],
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   385
        [e1000e kernel (only if differing)]
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   386
    ),
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   387
    [
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   388
        kernele1000e=[$withval]
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   389
    ],
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   390
    [
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   391
        kernele1000e=$linuxversion
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   392
    ]
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   393
)
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   394
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   395
e1000elayout=0
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   396
2076
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   397
if test "x${enablee1000e}" = "x1"; then
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   398
    AC_MSG_CHECKING([for kernel for e1000e driver])
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   399
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   400
    kernels=`ls -1 ${srcdir}/devices/e1000e/ | grep -oE "^netdev-.*" | cut -d "-" -f 2 | uniq`
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   401
    found=0
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   402
    for k in $kernels; do
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   403
        if test "$kernele1000e" = "$k"; then
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   404
            found=1
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   405
        fi
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   406
    done
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   407
    if test $found -ne 1; then
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   408
        AC_MSG_ERROR([kernel $kernele1000e not available for e1000e driver!])
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   409
    fi
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   410
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   411
    AC_MSG_RESULT([$kernele1000e])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   412
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   413
    # check for e1000e file layout (changed in kernel 3.4 and 3.10)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   414
    AC_MSG_CHECKING([for e1000e source layout])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   415
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   416
    file34="${srcdir}/devices/e1000e/80003es2lan-$kernele1000e-ethercat.c"
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   417
    file310="${srcdir}/devices/e1000e/ptp-$kernele1000e-ethercat.c"
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   418
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   419
    if test -r "$file310"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   420
        AC_MSG_RESULT([>= 3.10])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   421
        e1000elayout=2
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   422
    elif test -r "$file34"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   423
        AC_MSG_RESULT([>= 3.4])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   424
        e1000elayout=1
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   425
    else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   426
        AC_MSG_RESULT([before 3.4])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   427
    fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   428
2076
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   429
fi
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   430
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   431
AC_SUBST(KERNEL_E1000E,[$kernele1000e])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   432
AC_SUBST(E1000E_LAYOUT, [$e1000elayout])
2076
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   433
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
   434
#------------------------------------------------------------------------------
1353
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   435
# r8169 driver
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   436
#------------------------------------------------------------------------------
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   437
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   438
AC_ARG_ENABLE([r8169],
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   439
    AS_HELP_STRING([--enable-r8169],
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   440
                   [Enable r8169 driver]),
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   441
    [
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   442
        case "${enableval}" in
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   443
            yes) enable_r8169=1
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   444
                ;;
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   445
            no) enable_r8169=0
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   446
                ;;
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   447
            *) AC_MSG_ERROR([Invalid value for --enable-r8169])
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   448
                ;;
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   449
        esac
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   450
    ],
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   451
    [enable_r8169=0] # disabled by default
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   452
)
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   453
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   454
AM_CONDITIONAL(ENABLE_R8169, test "x$enable_r8169" = "x1")
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   455
AC_SUBST(ENABLE_R8169,[$enable_r8169])
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   456
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   457
AC_ARG_WITH([r8169-kernel],
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   458
    AC_HELP_STRING(
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   459
        [--with-r8169-kernel=<X.Y.Z>],
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   460
        [r8169 kernel (only if differing)]
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   461
    ),
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   462
    [
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   463
        kernel_r8169=[$withval]
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   464
    ],
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   465
    [
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   466
        kernel_r8169=$linuxversion
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   467
    ]
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   468
)
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   469
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   470
if test "x${enable_r8169}" = "x1"; then
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   471
    AC_MSG_CHECKING([for kernel for r8169 driver])
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   472
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   473
    kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^r8169-.*-" | cut -d "-" -f 2 | uniq`
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   474
    found=0
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   475
    for k in $kernels; do
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   476
        if test "$kernel_r8169" = "$k"; then
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   477
            found=1
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   478
        fi
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   479
    done
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   480
    if test $found -ne 1; then
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   481
        AC_MSG_ERROR([kernel $kernel_r8169 not available for r8169 driver!])
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   482
    fi
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   483
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   484
    AC_MSG_RESULT([$kernel_r8169])
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   485
fi
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   486
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   487
AC_SUBST(KERNEL_R8169,[$kernel_r8169])
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   488
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1327
diff changeset
   489
#------------------------------------------------------------------------------
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   490
# CCAT driver
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   491
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   492
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   493
AC_MSG_CHECKING([whether to build the CCAT driver])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   494
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   495
AC_ARG_ENABLE([ccat],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   496
    AS_HELP_STRING([--enable-ccat],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   497
                   [Enable CCAT driver]),
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   498
    [
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   499
        case "${enableval}" in
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   500
            yes) enableccat=1
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   501
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   502
            no) enableccat=0
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   503
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   504
            *) AC_MSG_ERROR([Invalid value for --enable-ccat])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   505
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   506
        esac
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   507
    ],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   508
    [enableccat=0] # disabled by default
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   509
)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   510
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   511
if test "x${enableccat}" = "x1"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   512
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   513
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   514
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   515
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   516
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   517
AM_CONDITIONAL(ENABLE_CCAT, test "x$enableccat" = "x1")
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   518
AC_SUBST(ENABLE_CCAT,[$enableccat])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   519
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   520
#------------------------------------------------------------------------------
485
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   521
# RTAI path (optional)
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   522
#------------------------------------------------------------------------------
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   523
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   524
AC_ARG_WITH([rtai-dir],
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   525
    AC_HELP_STRING(
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   526
        [--with-rtai-dir=<DIR>],
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   527
        [RTAI path, for RTDM interface and RTAI examples]
485
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   528
    ),
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   529
    [
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   530
        rtaidir=[$withval]
2058
543c4ce9e86e Working RTAI RTDM module
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2056
diff changeset
   531
        rtai=1
485
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   532
    ],
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   533
    [
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   534
        rtaidir=""
2058
543c4ce9e86e Working RTAI RTDM module
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2056
diff changeset
   535
        rtai=0
485
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   536
    ]
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   537
)
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   538
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   539
AC_MSG_CHECKING([for RTAI path])
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   540
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   541
if test -z "${rtaidir}"; then
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   542
    AC_MSG_RESULT([not specified.])
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   543
else
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   544
    if test \! -r ${rtaidir}/include/rtai.h; then
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   545
        AC_MSG_ERROR([no RTAI installation found in ${rtaidir}!])
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   546
    fi
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   547
    AC_MSG_RESULT([$rtaidir])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   548
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   549
    rtai_lxrt_cflags=`$rtaidir/bin/rtai-config --lxrt-cflags`
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   550
    rtai_lxrt_ldflags=`$rtaidir/bin/rtai-config --lxrt-ldflags`
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   551
fi
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   552
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   553
AC_SUBST(RTAI_DIR,[$rtaidir])
2058
543c4ce9e86e Working RTAI RTDM module
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2056
diff changeset
   554
AM_CONDITIONAL(ENABLE_RTAI, test "x$rtai" = "x1")
543c4ce9e86e Working RTAI RTDM module
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2056
diff changeset
   555
AC_SUBST(ENABLE_RTAI,[$rtai])
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   556
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   557
AC_SUBST(RTAI_LXRT_CFLAGS,[$rtai_lxrt_cflags])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   558
AC_SUBST(RTAI_LXRT_LDFLAGS,[$rtai_lxrt_ldflags])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   559
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   560
#------------------------------------------------------------------------------
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   561
# Xenomai path (optional)
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   562
#------------------------------------------------------------------------------
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   563
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   564
AC_ARG_WITH([xenomai-dir],
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   565
    AC_HELP_STRING(
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   566
        [--with-xenomai-dir=<DIR>],
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   567
        [Xenomai path, for RTDM interface and Xenomai examples]
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   568
    ),
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   569
    [
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   570
        xenomaidir=[$withval]
2058
543c4ce9e86e Working RTAI RTDM module
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2056
diff changeset
   571
        xeno=1
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   572
    ],
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   573
    [
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   574
        xenomaidir=""
2058
543c4ce9e86e Working RTAI RTDM module
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2056
diff changeset
   575
        xeno=0
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   576
    ]
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   577
)
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   578
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   579
AC_MSG_CHECKING([for Xenomai path])
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   580
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   581
if test -z "${xenomaidir}"; then
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   582
    AC_MSG_RESULT([not specified.])
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   583
else
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   584
    if test \! -r ${xenomaidir}/include/xeno_config.h; then
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   585
        AC_MSG_ERROR([no Xenomai installation found in ${xenomaidir}!])
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   586
    fi
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   587
    AC_MSG_RESULT([$xenomaidir])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   588
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   589
    xeno_native_cflags=`$xenomaidir/bin/xeno-config --skin native --cflags`
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   590
    xeno_native_ldflags=`$xenomaidir/bin/xeno-config --skin native --ldflags`
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   591
    xeno_posix_cflags=`$xenomaidir/bin/xeno-config --skin posix --cflags`
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   592
    xeno_posix_ldflags=`$xenomaidir/bin/xeno-config --skin posix --ldflags`
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   593
    xeno_rtdm_cflags=`$xenomaidir/bin/xeno-config --skin rtdm --cflags`
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   594
    xeno_rtdm_ldflags=`$xenomaidir/bin/xeno-config --skin rtdm --ldflags`
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   595
fi
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   596
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   597
AC_SUBST(XENOMAI_DIR,[$xenomaidir])
2058
543c4ce9e86e Working RTAI RTDM module
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2056
diff changeset
   598
AM_CONDITIONAL(ENABLE_XENOMAI, test "x$xeno" = "x1")
543c4ce9e86e Working RTAI RTDM module
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2056
diff changeset
   599
AC_SUBST(ENABLE_XENOMAI,[$xeno])
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   600
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   601
AC_SUBST(XENOMAI_NATIVE_CFLAGS,[$xeno_native_cflags])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   602
AC_SUBST(XENOMAI_NATIVE_LDFLAGS,[$xeno_native_ldflags])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   603
AC_SUBST(XENOMAI_POSIX_CFLAGS,[$xeno_posix_cflags])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   604
AC_SUBST(XENOMAI_POSIX_LDFLAGS,[$xeno_posix_ldflags])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   605
AC_SUBST(XENOMAI_RTDM_CFLAGS,[$xeno_rtdm_cflags])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   606
AC_SUBST(XENOMAI_RTDM_LDFLAGS,[$xeno_rtdm_ldflags])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   607
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   608
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   609
# RTDM interface (optional)
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   610
#------------------------------------------------------------------------------
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   611
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   612
AC_ARG_ENABLE([rtdm],
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   613
    AC_HELP_STRING(
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   614
        [--enable-rtdm],
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   615
        [Enable RTDM interface, depends on RTAI or Xenomai]
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   616
    ),
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   617
    [
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   618
        case "${enableval}" in
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   619
            yes) rtdm=1
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   620
                ;;
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   621
            no) rtdm=0
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   622
                ;;
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   623
            *) AC_MSG_ERROR([Invalid value for --enable-rtdm])
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   624
                ;;
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   625
        esac
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   626
    ],
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   627
    [rtdm=0]
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   628
)
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   629
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   630
AC_MSG_CHECKING([whether to build RTDM interface])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   631
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   632
if test "x${rtdm}" = "x1"; then
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   633
    AC_DEFINE([EC_RTDM], [1], [RTDM interface enabled])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   634
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   635
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   636
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   637
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   638
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   639
AM_CONDITIONAL(ENABLE_RTDM, test "x$rtdm" = "x1")
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   640
AC_SUBST(ENABLE_RTDM,[$rtdm])
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
   641
485
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   642
#------------------------------------------------------------------------------
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   643
# Debug interface
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   644
#------------------------------------------------------------------------------
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   645
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   646
AC_MSG_CHECKING([whether to build the debug interface])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   647
679
62fc387ec928 Added --enable-dummy; renamed EC_DBG_IF to EC_DEBUG_IF, ENABLE_DEBUG_IF
Florian Pose <fp@igh-essen.com>
parents: 667
diff changeset
   648
AC_ARG_ENABLE([debug-if],
62fc387ec928 Added --enable-dummy; renamed EC_DBG_IF to EC_DEBUG_IF, ENABLE_DEBUG_IF
Florian Pose <fp@igh-essen.com>
parents: 667
diff changeset
   649
    AS_HELP_STRING([--enable-debug-if],
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   650
                   [Create a debug interface for each master @<:@NO@:>@]),
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   651
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   652
        case "${enableval}" in
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   653
            yes) dbg=1
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   654
                ;;
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   655
            no) dbg=0
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   656
                ;;
679
62fc387ec928 Added --enable-dummy; renamed EC_DBG_IF to EC_DEBUG_IF, ENABLE_DEBUG_IF
Florian Pose <fp@igh-essen.com>
parents: 667
diff changeset
   657
            *) AC_MSG_ERROR([Invalid value for --enable-debug-if])
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   658
                ;;
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   659
        esac
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   660
    ],
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   661
    [dbg=0]
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   662
)
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   663
679
62fc387ec928 Added --enable-dummy; renamed EC_DBG_IF to EC_DEBUG_IF, ENABLE_DEBUG_IF
Florian Pose <fp@igh-essen.com>
parents: 667
diff changeset
   664
if test "x${dbg}" = "x1"; then
62fc387ec928 Added --enable-dummy; renamed EC_DBG_IF to EC_DEBUG_IF, ENABLE_DEBUG_IF
Florian Pose <fp@igh-essen.com>
parents: 667
diff changeset
   665
    AC_DEFINE([EC_DEBUG_IF], [1], [Debug interfaces enabled])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   666
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   667
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   668
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   669
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   670
679
62fc387ec928 Added --enable-dummy; renamed EC_DBG_IF to EC_DEBUG_IF, ENABLE_DEBUG_IF
Florian Pose <fp@igh-essen.com>
parents: 667
diff changeset
   671
AM_CONDITIONAL(ENABLE_DEBUG_IF, test "x$dbg" = "x1")
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   672
AC_SUBST(ENABLE_DEBUG_IF,[$dbg])
679
62fc387ec928 Added --enable-dummy; renamed EC_DBG_IF to EC_DEBUG_IF, ENABLE_DEBUG_IF
Florian Pose <fp@igh-essen.com>
parents: 667
diff changeset
   673
62fc387ec928 Added --enable-dummy; renamed EC_DBG_IF to EC_DEBUG_IF, ENABLE_DEBUG_IF
Florian Pose <fp@igh-essen.com>
parents: 667
diff changeset
   674
#------------------------------------------------------------------------------
692
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   675
# Debug ring
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   676
#------------------------------------------------------------------------------
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   677
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   678
AC_MSG_CHECKING([whether to build the debug ring])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   679
692
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   680
AC_ARG_ENABLE([debug-ring],
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   681
    AS_HELP_STRING([--enable-debug-ring],
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   682
                   [Create a debug ring to record frames @<:@NO@:>@]),
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   683
    [
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   684
        case "${enableval}" in
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   685
            yes) debugring=1
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   686
                ;;
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   687
            no) debugring=0
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   688
                ;;
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   689
            *) AC_MSG_ERROR([Invalid value for --enable-debug-ring])
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   690
                ;;
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   691
        esac
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   692
    ],
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   693
    [debugring=0]
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   694
)
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   695
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   696
if test "x${debugring}" = "x1"; then
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   697
    AC_DEFINE([EC_DEBUG_RING], [1], [Debug ring enabled])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   698
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   699
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   700
    AC_MSG_RESULT([no])
692
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   701
fi
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   702
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   703
#------------------------------------------------------------------------------
1327
4d179b06dd3c merge -c1604 branches/stable-1.4: Fixed spelling of EtherCAT terms.
Florian Pose <fp@igh-essen.com>
parents: 1302
diff changeset
   704
# Ethernet over EtherCAT support
715
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   705
#------------------------------------------------------------------------------
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   706
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   707
AC_MSG_CHECKING([whether to build with EoE support])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   708
715
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   709
AC_ARG_ENABLE([eoe],
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   710
    AS_HELP_STRING([--enable-eoe],
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   711
                   [Enable EoE support (default: yes)]),
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   712
    [
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   713
        case "${enableval}" in
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   714
            yes) eoe=1
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   715
                ;;
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   716
            no) eoe=0
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   717
                ;;
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   718
            *) AC_MSG_ERROR([Invalid value for --enable-eoe])
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   719
                ;;
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   720
        esac
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   721
    ],
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   722
    [eoe=1]
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   723
)
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   724
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   725
if test "x${eoe}" = "x1"; then
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   726
    AC_DEFINE([EC_EOE], [1], [EoE support enabled])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   727
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   728
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   729
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   730
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   731
715
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   732
AM_CONDITIONAL(ENABLE_EOE, test "x$eoe" = "x1")
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   733
AC_SUBST(ENABLE_EOE,[$eoe])
485
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   734
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
   735
#------------------------------------------------------------------------------
1040
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   736
# CPU timestamp counter support
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   737
#------------------------------------------------------------------------------
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   738
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   739
AC_MSG_CHECKING([whether to use the CPU timestamp counter])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   740
1040
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   741
AC_ARG_ENABLE([cycles],
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   742
    AS_HELP_STRING([--enable-cycles],
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   743
                   [Use CPU timestamp counter (default: no)]),
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   744
    [
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   745
        case "${enableval}" in
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   746
            yes) cycles=1
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   747
                ;;
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   748
            no) cycles=0
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   749
                ;;
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   750
            *) AC_MSG_ERROR([Invalid value for --enable-cycles])
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   751
                ;;
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   752
        esac
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   753
    ],
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   754
    [cycles=0]
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   755
)
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   756
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   757
if test "x${cycles}" = "x1"; then
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   758
    AC_DEFINE([EC_HAVE_CYCLES], [1], [Use CPU timestamp counter])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   759
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   760
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   761
    AC_MSG_RESULT([no])
1040
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   762
fi
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   763
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   764
#------------------------------------------------------------------------------
1773
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   765
# High-resolution timer support
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   766
#------------------------------------------------------------------------------
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   767
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   768
AC_MSG_CHECKING([whether to use high-resolution timers for scheduling])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   769
1773
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   770
AC_ARG_ENABLE([hrtimer],
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   771
    AS_HELP_STRING([--enable-hrtimer],
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   772
                   [Use high-resolution timer for scheduling (default: no)]),
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   773
    [
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   774
        case "${enableval}" in
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   775
            yes) hrtimer=1
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   776
                ;;
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   777
            no) hrtimer=0
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   778
                ;;
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   779
            *) AC_MSG_ERROR([Invalid value for --enable-hrtimer])
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   780
                ;;
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   781
        esac
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   782
    ],
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   783
    [hrtimer=0]
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   784
)
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   785
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   786
if test "x${hrtimer}" = "x1"; then
5371f3e5f6a1 Disable use of hrtimer for scheduling by default. Does not work on some PPC targets.
Florian Pose <fp@igh-essen.com>
parents: 1567
diff changeset
   787
    AC_DEFINE([EC_USE_HRTIMER], [1], [Use hrtimer for scheduling])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   788
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   789
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   790
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   791
fi
2045
ff2a13a4603c Reduced frame size when sending to mailbox, uses 2 datagrams. Enabled with configure option --enable-mboxframesize
Martin Troxler <ch1010277@ch10pc446>
parents: 2035
diff changeset
   792
ff2a13a4603c Reduced frame size when sending to mailbox, uses 2 datagrams. Enabled with configure option --enable-mboxframesize
Martin Troxler <ch1010277@ch10pc446>
parents: 2035
diff changeset
   793
#------------------------------------------------------------------------------
1934
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   794
# Read alias address from register
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   795
#------------------------------------------------------------------------------
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   796
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   797
AC_MSG_CHECKING([whether to read alias addresses from registers])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   798
1934
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   799
AC_ARG_ENABLE([regalias],
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   800
    AS_HELP_STRING([--enable-regalias],
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   801
                   [Read alias adresses from register (default: no)]),
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   802
    [
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   803
        case "${enableval}" in
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   804
            yes) regalias=1
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   805
                ;;
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   806
            no) regalias=0
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   807
                ;;
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   808
            *) AC_MSG_ERROR([Invalid value for --enable-regalias])
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   809
                ;;
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   810
        esac
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   811
    ],
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   812
    [regalias=0]
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   813
)
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   814
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   815
if test "x${regalias}" = "x1"; then
f00951ab7399 Introduced configure switch --enable-regalias for enabling reading alias
Florian Pose <fp@igh-essen.com>
parents: 1825
diff changeset
   816
    AC_DEFINE([EC_REGALIAS], [1], [Read alias adresses from register])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   817
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   818
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   819
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   820
fi
2028
55854f070c4a use rt_mutex instead of semaphore for mutual exclusion (use --enable-mutex)
Martin Troxler <ch1010277@ch10pc446>
parents: 1934
diff changeset
   821
55854f070c4a use rt_mutex instead of semaphore for mutual exclusion (use --enable-mutex)
Martin Troxler <ch1010277@ch10pc446>
parents: 1934
diff changeset
   822
#------------------------------------------------------------------------------
2617
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   823
# Force the reference clock to OP even if unconfigured
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   824
#------------------------------------------------------------------------------
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   825
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   826
AC_MSG_CHECKING([whether to force the reference clock to OP])
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   827
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   828
AC_ARG_ENABLE([refclkop],
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   829
    AS_HELP_STRING([--enable-refclkop],
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   830
                   [Force reference clock to OP (default: no)]),
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   831
    [
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   832
        case "${enableval}" in
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   833
            yes) refclkop=1
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   834
                ;;
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   835
            no) refclkop=0
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   836
                ;;
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   837
            *) AC_MSG_ERROR([Invalid value for --enable-refclkop])
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   838
                ;;
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   839
        esac
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   840
    ],
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   841
    [refclkop=0]
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   842
)
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   843
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   844
if test "x${refclkop}" = "x1"; then
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   845
    AC_DEFINE([EC_REFCLKOP], [1], [Force refclk to OP])
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   846
    AC_MSG_RESULT([yes])
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   847
else
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   848
    AC_MSG_RESULT([no])
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   849
fi
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   850
559f2f9c5b08 Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
Gavin Lambert <gavinl@compacsort.com>
parents: 2600
diff changeset
   851
#------------------------------------------------------------------------------
1253
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   852
# Command-line tool
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   853
#-----------------------------------------------------------------------------
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   854
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   855
AC_MSG_CHECKING([whether to build the command-line tool])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   856
1253
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   857
AC_ARG_ENABLE([tool],
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   858
    AS_HELP_STRING([--enable-tool],
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   859
                   [Build command-line tool (default: yes)]),
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   860
    [
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   861
        case "${enableval}" in
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   862
            yes) tool=1
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   863
                ;;
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   864
            no) tool=0
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   865
                ;;
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   866
            *) AC_MSG_ERROR([Invalid value for --enable-tool])
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   867
                ;;
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   868
        esac
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   869
    ],
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   870
    [tool=1]
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   871
)
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   872
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   873
if test "x${tool}" = "x1"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   874
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   875
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   876
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   877
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   878
1253
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   879
AM_CONDITIONAL(BUILD_TOOL, test "x$tool" = "x1")
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   880
8a081444a89a Added configure switch for disabling the command-line tool.
Florian Pose <fp@igh-essen.com>
parents: 1242
diff changeset
   881
#------------------------------------------------------------------------------
1242
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   882
# Userspace library generation
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   883
#------------------------------------------------------------------------------
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   884
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   885
AC_MSG_CHECKING([whether to build the userspace library])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   886
1242
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   887
AC_ARG_ENABLE([userlib],
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   888
    AS_HELP_STRING([--enable-userlib],
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   889
                   [Generation of the userspace library (default: yes)]),
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   890
    [
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   891
        case "${enableval}" in
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   892
            yes) userlib=1
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   893
                ;;
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   894
            no) userlib=0
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   895
                ;;
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   896
            *) AC_MSG_ERROR([Invalid value for --enable-userlib])
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   897
                ;;
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   898
        esac
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   899
    ],
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   900
    [userlib=1]
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   901
)
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   902
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   903
if test "x${userlib}" = "x1"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   904
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   905
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   906
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   907
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   908
1242
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   909
AM_CONDITIONAL(ENABLE_USERLIB, test "x$userlib" = "x1")
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   910
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
   911
#------------------------------------------------------------------------------
1565
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   912
# TTY driver
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   913
#------------------------------------------------------------------------------
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   914
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   915
AC_MSG_CHECKING([whether to build the tty driver])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   916
1565
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   917
AC_ARG_ENABLE([tty],
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   918
    AS_HELP_STRING([--enable-tty],
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   919
                   [Generation of the ec_tty module (default: no)]),
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   920
    [
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   921
        case "${enableval}" in
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   922
            yes) tty=1
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   923
                ;;
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   924
            no) tty=0
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   925
                ;;
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   926
            *) AC_MSG_ERROR([Invalid value for --enable-tty])
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   927
                ;;
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   928
        esac
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   929
    ],
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   930
    [tty=0]
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   931
)
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   932
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   933
if test "x${tty}" = "x1"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   934
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   935
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   936
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   937
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   938
1565
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   939
AM_CONDITIONAL(ENABLE_TTY, test "x$tty" = "x1")
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   940
AC_SUBST(ENABLE_TTY,[$tty])
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   941
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
   942
#------------------------------------------------------------------------------
2151
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   943
# Slave identification wildcards
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   944
#------------------------------------------------------------------------------
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   945
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   946
AC_MSG_CHECKING([whether to allow identification wildcards])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   947
2151
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   948
AC_ARG_ENABLE([wildcards],
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   949
    AS_HELP_STRING([--enable-wildcards],
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   950
                   [Enable vendor ID / product code wildcards (default: no)]),
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   951
    [
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   952
        case "${enableval}" in
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   953
            yes) wildcards=1
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   954
                ;;
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   955
            no) wildcards=0
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   956
                ;;
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   957
            *) AC_MSG_ERROR([Invalid value for --enable-wildcards])
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   958
                ;;
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   959
        esac
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   960
    ],
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   961
    [wildcards=0]
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   962
)
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   963
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   964
if test "x${wildcards}" = "x1"; then
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   965
    AC_DEFINE([EC_IDENT_WILDCARDS], [1],
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
   966
        [Use vendor id / product code wildcards])
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   967
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   968
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   969
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   970
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   971
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   972
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   973
# Redundancy (number of devices)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   974
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   975
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   976
AC_ARG_WITH([devices],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   977
    AC_HELP_STRING(
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   978
        [--with-devices=<NUMBER>],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   979
        [Number of Ethernet devices per master. Default: 1]
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   980
    ),
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   981
    [
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   982
        devices=[$withval]
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   983
    ],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   984
    [
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   985
        devices=1
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   986
    ]
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   987
)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   988
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   989
AC_MSG_CHECKING([for number of Ethernet devices])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   990
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   991
if test "${devices}" -lt 1; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   992
    AC_MSG_ERROR([Number must be greater zero!])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   993
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   994
    if test "${devices}" -gt 1; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   995
        AC_MSG_RESULT([$devices (Redundancy enabled)])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   996
    else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   997
        AC_MSG_RESULT([$devices (Redundancy disabled)])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   998
    fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
   999
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1000
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1001
AC_DEFINE_UNQUOTED([EC_MAX_NUM_DEVICES], $devices,
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1002
    [Max. number of Ethernet devices per master])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1003
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1004
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1005
# SII assignment
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1006
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1007
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1008
AC_MSG_CHECKING([whether to assign the SII to PDI])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1009
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1010
AC_ARG_ENABLE([sii-assign],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1011
    AS_HELP_STRING([--enable-sii-assign],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1012
                   [Enable SII assignment to PDI (default: no)]),
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1013
    [
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1014
        case "${enableval}" in
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1015
            yes) siiassign=1
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1016
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1017
            no) siiassign=0
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1018
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1019
            *) AC_MSG_ERROR([Invalid value for --enable-sii-assign])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1020
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1021
        esac
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1022
    ],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1023
    [siiassign=0]
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1024
)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1025
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1026
if test "x${siiassign}" = "x1"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1027
    AC_DEFINE([EC_SII_ASSIGN], [1], [Assign SII to PDI])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1028
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1029
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1030
    AC_MSG_RESULT([no])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1031
fi
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1032
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1033
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1034
# syslog output in realtime context
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1035
#------------------------------------------------------------------------------
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1036
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1037
AC_MSG_CHECKING([whether to syslog in realtime context])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1038
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1039
AC_ARG_ENABLE([rt-syslog],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1040
    AS_HELP_STRING([--enable-rt-syslog],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1041
                   [Enable RT syslog (default: yes)]),
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1042
    [
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1043
        case "${enableval}" in
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1044
            yes) rtsyslog=1
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1045
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1046
            no) rtsyslog=0
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1047
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1048
            *) AC_MSG_ERROR([Invalid value for --enable-rt-syslog])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1049
                ;;
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1050
        esac
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1051
    ],
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1052
    [rtsyslog=1]
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1053
)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1054
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1055
if test "x${rtsyslog}" = "x1"; then
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1056
    AC_DEFINE([EC_RT_SYSLOG], [1], [Output to syslog in RT context])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1057
    AC_MSG_RESULT([yes])
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1058
else
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1059
    AC_MSG_RESULT([no])
2151
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
  1060
fi
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
  1061
4751747d4e6d Added --enable-wildcards to use 0xffffffff as wildcard for vendor ID and
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
  1062
#------------------------------------------------------------------------------
2600
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1063
# use loop control registers to open slave ports
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1064
#------------------------------------------------------------------------------
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1065
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1066
AC_MSG_CHECKING([whether to use loop control registers])
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1067
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1068
AC_ARG_ENABLE([loop-control],
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1069
    AS_HELP_STRING([--enable-loop-control],
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1070
                   [Use loop control registers (default: no)]),
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1071
    [
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1072
        case "${enableval}" in
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1073
            yes) loopctl=1
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1074
                ;;
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1075
            no) loopctl=0
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1076
                ;;
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1077
            *) AC_MSG_ERROR([Invalid value for --enable-loop-control])
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1078
                ;;
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1079
        esac
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1080
    ],
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1081
    [loopctl=0]
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1082
)
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1083
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1084
if test "x${loopctl}" = "x1"; then
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1085
    AC_DEFINE([EC_LOOP_CONTROL], [1], [Use loop control registers])
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1086
    AC_MSG_RESULT([yes])
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1087
else
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1088
    AC_MSG_RESULT([no])
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1089
fi
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1090
1a969896d52e Added --enable-loop-control to make use of the loop control registers.
Florian Pose <fp@igh-essen.com>
parents: 2589
diff changeset
  1091
#------------------------------------------------------------------------------
485
8354ddf38481 Improved autotools, added config.kbuild, --with-msr-dir, --with-rtai-dir, --with-8139too-kernel.
Florian Pose <fp@igh-essen.com>
parents: 479
diff changeset
  1092
385
c33367851350 Added file ./bootstrap; Added $(DESTDIR) to */Makefile.am make alternate root installs possible
Richard Hacker <ha@igh-essen.com>
parents: 373
diff changeset
  1093
AC_CONFIG_FILES([
757
6210c4260899 Added Doxyfile to configuration files.
Florian Pose <fp@igh-essen.com>
parents: 732
diff changeset
  1094
        Doxyfile
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
  1095
        Kbuild
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
  1096
        Makefile
882
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1097
        devices/Kbuild
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1098
        devices/Makefile
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1099
        devices/ccat/Kbuild
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1100
        devices/ccat/Makefile
882
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1101
        devices/e1000/Kbuild
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1102
        devices/e1000/Makefile
2076
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
  1103
        devices/e1000e/Kbuild
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 2060
diff changeset
  1104
        devices/e1000e/Makefile
1810
a352f3e4f95d Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents: 1809
diff changeset
  1105
        ethercat.spec
1286
88e573e033f1 Build examples by default.
Florian Pose <fp@igh-essen.com>
parents: 1253
diff changeset
  1106
        examples/Kbuild
882
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1107
        examples/Makefile
1414
0037a63d3cc5 DC example applications.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
  1108
        examples/dc_rtai/Kbuild
0037a63d3cc5 DC example applications.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
  1109
        examples/dc_rtai/Makefile
0037a63d3cc5 DC example applications.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
  1110
        examples/dc_user/Makefile
882
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1111
        examples/mini/Kbuild
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1112
        examples/mini/Makefile
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1113
        examples/rtai/Kbuild
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1114
        examples/rtai/Makefile
2189
002b978df979 Added first systemd support.
Florian Pose <fp@igh-essen.com>
parents: 2151
diff changeset
  1115
        examples/rtai_rtdm/Makefile
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2414
diff changeset
  1116
        examples/rtai_rtdm_dc/Makefile
1810
a352f3e4f95d Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents: 1809
diff changeset
  1117
        examples/tty/Kbuild
1567
1babaa430b7b Added tty example.
Florian Pose <fp@igh-essen.com>
parents: 1565
diff changeset
  1118
        examples/tty/Makefile
1242
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
  1119
        examples/user/Makefile
2054
3417bbc4ad2f First working RTDM Version,
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 1934
diff changeset
  1120
        examples/xenomai/Makefile
2056
a92e8f119723 Work on Xenomai Posix interface, to be tested
Andreas Stewering-Bone <ab@igh-essen.com>
parents: 2054
diff changeset
  1121
        examples/xenomai_posix/Makefile
882
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
  1122
        include/Makefile
1242
632a6b91f8e4 First version of userspace library with requesting/releasing.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
  1123
        lib/Makefile
1440
1b32fe09c689 Added deummy Makefile.am for m4 directory.
Florian Pose <fp@igh-essen.com>
parents: 1432
diff changeset
  1124
        m4/Makefile
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
  1125
        master/Kbuild
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
  1126
        master/Makefile
385
c33367851350 Added file ./bootstrap; Added $(DESTDIR) to */Makefile.am make alternate root installs possible
Richard Hacker <ha@igh-essen.com>
parents: 373
diff changeset
  1127
        script/Makefile
2189
002b978df979 Added first systemd support.
Florian Pose <fp@igh-essen.com>
parents: 2151
diff changeset
  1128
        script/ethercat.service
002b978df979 Added first systemd support.
Florian Pose <fp@igh-essen.com>
parents: 2151
diff changeset
  1129
        script/ethercatctl
563
d113b63c55c4 Changed structure of scripts subdirectory.
Florian Pose <fp@igh-essen.com>
parents: 546
diff changeset
  1130
        script/init.d/Makefile
1185
337ce4fc2383 Repaired init script status command.
Florian Pose <fp@igh-essen.com>
parents: 1120
diff changeset
  1131
        script/init.d/ethercat
563
d113b63c55c4 Changed structure of scripts subdirectory.
Florian Pose <fp@igh-essen.com>
parents: 546
diff changeset
  1132
        script/sysconfig/Makefile
1120
0ae26760c12d Moved tools to tool.
Florian Pose <fp@igh-essen.com>
parents: 1080
diff changeset
  1133
        tool/Makefile
1810
a352f3e4f95d Added spec file for building an RPM package.
Florian Pose <fp@igh-essen.com>
parents: 1809
diff changeset
  1134
        tty/Kbuild
1565
8c526cfe1399 Base files for new TTY driver.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
  1135
        tty/Makefile
385
c33367851350 Added file ./bootstrap; Added $(DESTDIR) to */Makefile.am make alternate root installs possible
Richard Hacker <ha@igh-essen.com>
parents: 373
diff changeset
  1136
])
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
  1137
AC_OUTPUT
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
  1138
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
  1139
#------------------------------------------------------------------------------