configure.ac
author Florian Pose <fp@igh-essen.com>
Wed, 30 Jul 2008 15:31:01 +0000
changeset 1172 74ee632c3b5e
parent 1120 0ae26760c12d
child 1185 337ce4fc2383
permissions -rw-r--r--
Fixed attached slave position in 'ethercat config' -> decimal.
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#------------------------------------------------------------------------------
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
# $Id$
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#------------------------------------------------------------------------------
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
     5
AC_PREREQ(2.59)
777
13884840c5d0 Version 1.4.0-pre.
Florian Pose <fp@igh-essen.com>
parents: 760
diff changeset
     6
AC_INIT([ethercat],[1.4.0-pre],[fp@igh-essen.com])
387
e6e708a5d502 Improved autotools files.
Florian Pose <fp@igh-essen.com>
parents: 385
diff changeset
     7
AC_CONFIG_AUX_DIR([autoconf])
479
610ddcf35d5c Removed --foreign switch for autotools.
Florian Pose <fp@igh-essen.com>
parents: 477
diff changeset
     8
AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2])
387
e6e708a5d502 Improved autotools files.
Florian Pose <fp@igh-essen.com>
parents: 385
diff changeset
     9
AC_PREFIX_DEFAULT([/opt/etherlab])
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
    10
AC_CONFIG_HEADERS([config.h])
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
    11
AC_CONFIG_SRCDIR([config.h.in])
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
#------------------------------------------------------------------------------
444
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    14
# Global
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    15
#------------------------------------------------------------------------------
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    16
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    17
branch=trunk
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    18
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    19
AC_DEFINE_UNQUOTED(BRANCH, ["$branch"], [Subversion branch])
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    20
AC_SUBST(BRANCH, [$branch])
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    21
922
fede1d8f5b71 Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents: 897
diff changeset
    22
AC_PROG_CXX
fede1d8f5b71 Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents: 897
diff changeset
    23
444
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    24
#------------------------------------------------------------------------------
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
# Linux sources
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
#------------------------------------------------------------------------------
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    28
AC_ARG_WITH([linux-dir],
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
    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
    30
        [--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
    31
        [Linux kernel sources @<:@running kernel@:>@]
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    32
    ),
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    33
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    34
        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
    35
    ],
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    36
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    37
        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
    38
        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
    39
        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
    40
           echo
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    41
           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
    42
        fi
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    43
        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
    44
    ]
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    45
)
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    47
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
    48
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    49
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
    50
    echo
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    51
    AC_MSG_ERROR([No configured Linux kernel sources in $sourcedir])
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
fi
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    54
# 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
    55
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
    56
    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
    57
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
    58
    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
    59
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
    60
    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
    61
    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
    62
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
    63
    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
    64
    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
    65
fi
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    66
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    67
if test -z "$kernelrelease"; then
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    68
    echo
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    69
    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
    70
fi
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    71
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    72
# Extract three numbers from kernel release string
537
c715766e0f81 Fixed bad configure behavior with complex kernel version strings.
Florian Pose <fp@igh-essen.com>
parents: 507
diff changeset
    73
linuxversion=`echo $kernelrelease | grep -oE "^[[0-9]]+\.[[0-9]]+\.[[0-9]]+"`
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    74
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    75
AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir])
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    76
AC_SUBST(LINUX_KERNEL_RELEASE,[$kernelrelease])
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    77
AC_SUBST(LINUX_KERNEL_VERSION,[$linuxversion])
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    78
AC_SUBST(LINUX_MOD_PATH,[/lib/modules/$kernelrelease/ethercat])
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    79
AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $LINUX_KERNEL_RELEASE)])
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    80
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    81
#------------------------------------------------------------------------------
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    82
# 8139too driver
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    83
#------------------------------------------------------------------------------
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    84
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    85
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
    86
    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
    87
                   [Enable 8139too driver]),
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    88
    [
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    89
        case "${enableval}" in
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    90
            yes) enable8139too=1
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    91
                ;;
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    92
            no) enable8139too=0
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    93
                ;;
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    94
            *) 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
    95
                ;;
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    96
        esac
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    97
    ],
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    98
    [enable8139too=1]
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    99
)
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   100
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   101
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
   102
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
   103
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
   104
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
   105
    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
   106
        [--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
   107
        [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
   108
    ),
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
   109
    [
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
   110
        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
   111
    ],
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
   112
    [
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
   113
        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
   114
    ]
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
   115
)
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
   116
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   117
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
   118
    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
   119
945
a5907351e13e Improved out-of-place build.
Florian Pose <fp@igh-essen.com>
parents: 922
diff changeset
   120
    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
   121
    found=0
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   122
    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
   123
        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
   124
            found=1
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   125
        fi
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   126
    done
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   127
    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
   128
        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
   129
    fi
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   130
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   131
    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
   132
fi
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   133
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   134
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
   135
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   136
#------------------------------------------------------------------------------
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   137
# e100 driver
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   138
#------------------------------------------------------------------------------
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   139
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   140
AC_ARG_ENABLE([e100],
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   141
    AS_HELP_STRING([--enable-e100],
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   142
                   [Enable e100 driver]),
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   143
    [
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   144
        case "${enableval}" in
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   145
            yes) enablee100=1
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   146
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   147
            no) enablee100=0
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   148
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   149
            *) 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
   150
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   151
        esac
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   152
    ],
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   153
    [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
   154
)
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   155
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   156
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
   157
AC_SUBST(ENABLE_E100,[$enablee100])
568
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   158
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   159
AC_ARG_WITH([e100-kernel],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   160
    AC_HELP_STRING(
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   161
        [--with-e100-kernel=<X.Y.Z>],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   162
        [e100 kernel (only if differing)]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   163
    ),
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   164
    [
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   165
        kernele100=[$withval]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   166
    ],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   167
    [
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   168
        kernele100=$linuxversion
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   169
    ]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   170
)
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   171
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   172
if test "x${enablee100}" = "x1"; then
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   173
    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
   174
945
a5907351e13e Improved out-of-place build.
Florian Pose <fp@igh-essen.com>
parents: 922
diff changeset
   175
    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
   176
    found=0
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   177
    for k in $kernels; do
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   178
        if test "$kernele100" = "$k"; then
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   179
            found=1
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   180
        fi
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   181
    done
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   182
    if test $found -ne 1; then
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   183
        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
   184
    fi
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   185
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   186
    AC_MSG_RESULT([$kernele100])
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   187
fi
568
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   188
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   189
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
   190
568
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   191
#------------------------------------------------------------------------------
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   192
# forcedeth driver
581
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   193
#------------------------------------------------------------------------------
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   194
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   195
AC_ARG_ENABLE([forcedeth],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   196
    AS_HELP_STRING([--enable-forcedeth],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   197
                   [Enable forcedeth driver]),
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   198
    [
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   199
        case "${enableval}" in
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   200
            yes) enableforcedeth=1
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   201
                ;;
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   202
            no) enableforcedeth=0
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   203
                ;;
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   204
            *) AC_MSG_ERROR([Invalid value for --enable-forcedeth])
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   205
                ;;
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   206
        esac
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   207
    ],
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   208
    [enableforcedeth=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
   209
)
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   210
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   211
AM_CONDITIONAL(ENABLE_FORCEDETH, test "x$enableforcedeth" = "x1")
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   212
AC_SUBST(ENABLE_FORCEDETH,[$enableforcedeth])
581
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   213
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   214
AC_ARG_WITH([forcedeth-kernel],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   215
    AC_HELP_STRING(
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   216
        [--with-forcedeth-kernel=<X.Y.Z>],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   217
        [forcedeth kernel (only if differing)]
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   218
    ),
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   219
    [
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   220
        kernelforcedeth=[$withval]
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   221
    ],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   222
    [
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   223
        kernelforcedeth=$linuxversion
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   224
    ]
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   225
)
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   226
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
   227
if test "x${enableforcedeth}" = "x1"; then
581
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   228
    AC_MSG_CHECKING([for kernel for forcedeth driver])
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   229
945
a5907351e13e Improved out-of-place build.
Florian Pose <fp@igh-essen.com>
parents: 922
diff changeset
   230
    kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^forcedeth-.*-" | cut -d "-" -f 2 | uniq`
581
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   231
    found=0
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   232
    for k in $kernels; do
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   233
        if test "$kernelforcedeth" = "$k"; then
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   234
            found=1
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   235
        fi
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   236
    done
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   237
    if test $found -ne 1; then
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   238
        AC_MSG_ERROR([kernel $kernelforcedeth not available for forcedeth driver!])
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   239
    fi
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   240
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   241
    AC_MSG_RESULT([$kernelforcedeth])
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   242
fi
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   243
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   244
AC_SUBST(KERNEL_FORCEDETH,[$kernelforcedeth])
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   245
581
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   246
#------------------------------------------------------------------------------
667
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   247
# e1000 driver
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   248
#------------------------------------------------------------------------------
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   249
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   250
AC_ARG_ENABLE([e1000],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   251
    AS_HELP_STRING([--enable-e1000],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   252
                   [Enable e1000 driver]),
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   253
    [
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   254
        case "${enableval}" in
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   255
            yes) enablee1000=1
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   256
                ;;
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   257
            no) enablee1000=0
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   258
                ;;
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   259
            *) 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
   260
                ;;
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   261
        esac
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   262
    ],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   263
    [enablee1000=0] # disabled by default
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   264
)
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   265
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   266
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
   267
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
   268
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   269
AC_ARG_WITH([e1000-kernel],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   270
    AC_HELP_STRING(
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   271
        [--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
   272
        [e1000 kernel (only if differing)]
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   273
    ),
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   274
    [
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   275
        kernele1000=[$withval]
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   276
    ],
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   277
    [
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   278
        kernele1000=$linuxversion
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   279
    ]
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   280
)
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   281
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   282
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
   283
    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
   284
945
a5907351e13e Improved out-of-place build.
Florian Pose <fp@igh-essen.com>
parents: 922
diff changeset
   285
    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
   286
    found=0
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   287
    for k in $kernels; do
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   288
        if test "$kernele1000" = "$k"; then
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   289
            found=1
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   290
        fi
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   291
    done
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   292
    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
   293
        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
   294
    fi
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   295
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   296
    AC_MSG_RESULT([$kernele1000])
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   297
fi
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   298
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   299
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
   300
667
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 665
diff changeset
   301
#------------------------------------------------------------------------------
897
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   302
# r8169 driver
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   303
#------------------------------------------------------------------------------
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   304
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   305
AC_ARG_ENABLE([r8169],
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   306
    AS_HELP_STRING([--enable-r8169],
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   307
                   [Enable r8169 driver]),
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   308
    [
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   309
        case "${enableval}" in
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   310
            yes) enabler8169=1
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   311
                ;;
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   312
            no) enabler8169=0
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   313
                ;;
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   314
            *) AC_MSG_ERROR([Invalid value for --enable-r8169])
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   315
                ;;
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   316
        esac
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   317
    ],
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   318
    [enabler8169=0] # disabled by default
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   319
)
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   320
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   321
AM_CONDITIONAL(ENABLE_R8169, test "x$enabler8169" = "x1")
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   322
AC_SUBST(ENABLE_R8169,[$enabler8169])
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   323
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   324
AC_ARG_WITH([r8169-kernel],
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   325
    AC_HELP_STRING(
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   326
        [--with-r8169-kernel=<X.Y.Z>],
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   327
        [r8169 kernel (only if differing)]
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   328
    ),
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   329
    [
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   330
        kernelr8169=[$withval]
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   331
    ],
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   332
    [
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   333
        kernelr8169=$linuxversion
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   334
    ]
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   335
)
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   336
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   337
if test "x${enabler8169}" = "x1"; then
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   338
    AC_MSG_CHECKING([for kernel for r8169 driver])
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   339
945
a5907351e13e Improved out-of-place build.
Florian Pose <fp@igh-essen.com>
parents: 922
diff changeset
   340
    kernels=`ls -1 ${srcdir}/devices/ | grep -oE "^r8169-.*-" | cut -d "-" -f 2 | uniq`
897
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   341
    found=0
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   342
    for k in $kernels; do
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   343
        if test "$kernelr8169" = "$k"; then
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   344
            found=1
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   345
        fi
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   346
    done
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   347
    if test $found -ne 1; then
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   348
        AC_MSG_ERROR([kernel $kernelr8169 not available for r8169 driver!])
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   349
    fi
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   350
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   351
    AC_MSG_RESULT([$kernelr8169])
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   352
fi
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   353
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   354
AC_SUBST(KERNEL_R8169,[$kernelr8169])
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   355
855c5d2d97f0 Added alpha support for the Realtek r8169 chipset, thanks to Scott
Florian Pose <fp@igh-essen.com>
parents: 882
diff changeset
   356
#------------------------------------------------------------------------------
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
   357
# 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
   358
#------------------------------------------------------------------------------
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
   359
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
   360
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
   361
    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
   362
        [--with-rtai-dir=<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
   363
        [RTAI path (only for RTAI examples)]
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
   364
    ),
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
   365
    [
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
   366
        rtaidir=[$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
   367
    ],
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
   368
    [
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
   369
        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
   370
    ]
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
   371
)
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
   372
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
   373
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
   374
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
   375
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
   376
    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
   377
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
   378
    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
   379
        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
   380
    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
   381
    AC_MSG_RESULT([$rtaidir])
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   382
fi
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   383
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   384
AC_SUBST(RTAI_DIR,[$rtaidir])
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
   385
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
   386
#------------------------------------------------------------------------------
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   387
# Debug interface
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   388
#------------------------------------------------------------------------------
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   389
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
   390
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
   391
    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
   392
                   [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
   393
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   394
        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
   395
            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
   396
                ;;
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   397
            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
   398
                ;;
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
   399
            *) 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
   400
                ;;
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   401
        esac
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   402
    ],
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   403
    [dbg=0]
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   404
)
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   405
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
   406
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
   407
    AC_DEFINE([EC_DEBUG_IF], [1], [Debug interfaces enabled])
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
   408
fi
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
   409
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
   410
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
   411
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
   412
#------------------------------------------------------------------------------
692
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   413
# 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
   414
#------------------------------------------------------------------------------
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   415
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   416
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
   417
    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
   418
                   [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
   419
    [
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   420
        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
   421
            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
   422
                ;;
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   423
            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
   424
                ;;
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   425
            *) 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
   426
                ;;
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   427
        esac
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   428
    ],
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   429
    [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
   430
)
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   431
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   432
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
   433
    AC_DEFINE([EC_DEBUG_RING], [1], [Debug ring enabled])
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   434
fi
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   435
fe7cf37c33f1 Implemented debug frame ring to output the last n frames for debugging
Florian Pose <fp@igh-essen.com>
parents: 686
diff changeset
   436
#------------------------------------------------------------------------------
715
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   437
# Ethernet-over-EtherCAT support
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   438
#------------------------------------------------------------------------------
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   439
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   440
AC_ARG_ENABLE([eoe],
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   441
    AS_HELP_STRING([--enable-eoe],
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   442
                   [Enable EoE support (default: yes)]),
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   443
    [
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   444
        case "${enableval}" in
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   445
            yes) eoe=1
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   446
                ;;
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   447
            no) eoe=0
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   448
                ;;
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   449
            *) AC_MSG_ERROR([Invalid value for --enable-eoe])
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   450
                ;;
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   451
        esac
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   452
    ],
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   453
    [eoe=1]
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   454
)
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   455
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   456
if test "x${eoe}" = "x1"; then
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   457
    AC_DEFINE([EC_EOE], [1], [EoE support enabled])
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   458
fi
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 709
diff changeset
   459
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
   460
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
   461
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
   462
#------------------------------------------------------------------------------
1040
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   463
# CPU timestamp counter support
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   464
#------------------------------------------------------------------------------
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   465
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   466
AC_ARG_ENABLE([cycles],
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   467
    AS_HELP_STRING([--enable-cycles],
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   468
                   [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
   469
    [
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   470
        case "${enableval}" in
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   471
            yes) cycles=1
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   472
                ;;
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   473
            no) cycles=0
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   474
                ;;
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   475
            *) 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
   476
                ;;
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   477
        esac
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   478
    ],
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   479
    [cycles=0]
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   480
)
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   481
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   482
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
   483
    AC_DEFINE([EC_HAVE_CYCLES], [1], [Use CPU timestamp counter])
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   484
fi
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   485
d2527675cdd5 Disable use of CPU timestamp counter by default.
Florian Pose <fp@igh-essen.com>
parents: 945
diff changeset
   486
#------------------------------------------------------------------------------
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
   487
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
   488
AC_CONFIG_FILES([
757
6210c4260899 Added Doxyfile to configuration files.
Florian Pose <fp@igh-essen.com>
parents: 732
diff changeset
   489
        Doxyfile
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   490
        Kbuild
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   491
        Makefile
882
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   492
        devices/Kbuild
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   493
        devices/Makefile
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   494
        devices/e1000/Kbuild
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   495
        devices/e1000/Makefile
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   496
        examples/Makefile
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   497
        examples/mini/Kbuild
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   498
        examples/mini/Makefile
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   499
        examples/rtai/Kbuild
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   500
        examples/rtai/Makefile
a7222d7fb7a8 Removed dummy master.
Florian Pose <fp@igh-essen.com>
parents: 777
diff changeset
   501
        include/Makefile
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 726
diff changeset
   502
        master/Kbuild
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   503
        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
   504
        script/Makefile
563
d113b63c55c4 Changed structure of scripts subdirectory.
Florian Pose <fp@igh-essen.com>
parents: 546
diff changeset
   505
        script/init.d/Makefile
d113b63c55c4 Changed structure of scripts subdirectory.
Florian Pose <fp@igh-essen.com>
parents: 546
diff changeset
   506
        script/sysconfig/Makefile
1120
0ae26760c12d Moved tools to tool.
Florian Pose <fp@igh-essen.com>
parents: 1080
diff changeset
   507
        tool/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
   508
])
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   509
AC_OUTPUT
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   510
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   511
#------------------------------------------------------------------------------