configure.ac
author Florian Pose <fp@igh-essen.com>
Wed, 21 Feb 2007 10:26:19 +0000
changeset 581 99623f8a8493
parent 570 474f9d643372
child 582 39f1704b0c99
permissions -rw-r--r--
Added testing version of forcedeth driver.
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)
565
f42e077f3565 Release 1.2
Florian Pose <fp@igh-essen.com>
parents: 563
diff changeset
     6
AC_INIT([ethercat],[1.2.0],[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
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 440
diff changeset
    22
#------------------------------------------------------------------------------
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    23
# Linux sources
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
#------------------------------------------------------------------------------
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    26
AC_ARG_WITH([linux-dir],
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
    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
    28
        [--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
    29
        [Linux kernel sources @<:@running kernel@:>@]
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    30
    ),
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    31
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    32
        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
    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
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    35
        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
    36
        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
    37
        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
    38
           echo
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    39
           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
    40
        fi
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    41
        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
    42
    ]
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    43
)
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    45
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
    46
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
    47
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
    48
    echo
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    49
    AC_MSG_ERROR([No configured Linux kernel sources in $sourcedir])
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
fi
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
477
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    52
# 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
    53
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
    54
    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
    55
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
    56
    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
    57
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
    58
    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
    59
    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
    60
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
    61
    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
    62
    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
    63
fi
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    64
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    65
if test -z "$kernelrelease"; then
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    66
    echo
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    67
    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
    68
fi
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    69
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    70
# 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
    71
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
    72
367
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    73
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
    74
AC_SUBST(LINUX_KERNEL_RELEASE,[$kernelrelease])
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    75
AC_SUBST(LINUX_KERNEL_VERSION,[$linuxversion])
69d05643041f Improved installation, added quick modules_install target.
Florian Pose <fp@igh-essen.com>
parents: 471
diff changeset
    76
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
    77
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
    78
e85e3143dc8d Autotools "--with-linux" switch; "mydist" target
Florian Pose <fp@igh-essen.com>
parents: 365
diff changeset
    79
#------------------------------------------------------------------------------
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
    80
# 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
    81
#------------------------------------------------------------------------------
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
    82
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
    83
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
    84
    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
    85
        [--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
    86
        [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
    87
    ),
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
    88
    [
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
    89
        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
    90
    ],
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
    91
    [
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
    92
        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
    93
    ]
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
    94
)
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
    95
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
    96
AC_MSG_CHECKING([for kernel for 8139too driver])
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
    97
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
    98
kernels=`ls -1 devices/ | grep -oE "^8139too-.*-" | cut -d "-" -f 2 | uniq`
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
    99
found=0
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
   100
for k in $kernels; do
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
   101
    if test "$kernel8139too" = "$k"; 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
   102
        found=1
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
    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
   104
done
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
if test $found -ne 1; 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
   106
    AC_MSG_ERROR([kernel $kernel8139too not available for 8139too driver!])
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
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
   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
AC_MSG_RESULT([$kernel8139too])
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
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
#------------------------------------------------------------------------------
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   112
# Disable e100
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   113
#------------------------------------------------------------------------------
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   114
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   115
AC_ARG_ENABLE([e100],
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   116
    AS_HELP_STRING([--enable-e100],
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   117
                   [Enable e100 driver]),
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   118
    [
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   119
        case "${enableval}" in
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   120
            yes) enablee100=1
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   121
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   122
            no) enablee100=0
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   123
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   124
            *) 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
   125
                ;;
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   126
        esac
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   127
    ],
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   128
    [enablee100=0]
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   129
)
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   130
570
474f9d643372 Fixed e100 installation with disabled ENABLE_E100.
Florian Pose <fp@igh-essen.com>
parents: 569
diff changeset
   131
AM_CONDITIONAL(ENABLE_E100, test "x$enablee100" = x1)
474f9d643372 Fixed e100 installation with disabled ENABLE_E100.
Florian Pose <fp@igh-essen.com>
parents: 569
diff changeset
   132
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   133
#------------------------------------------------------------------------------
568
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   134
# e100 Kernel
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   135
#------------------------------------------------------------------------------
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   136
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   137
AC_ARG_WITH([e100-kernel],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   138
    AC_HELP_STRING(
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   139
        [--with-e100-kernel=<X.Y.Z>],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   140
        [e100 kernel (only if differing)]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   141
    ),
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   142
    [
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   143
        kernele100=[$withval]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   144
    ],
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   145
    [
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   146
        kernele100=$linuxversion
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   147
    ]
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   148
)
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   149
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   150
if test ${enablee100} -eq 1; then
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   151
    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
   152
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   153
    kernels=`ls -1 devices/ | grep -oE "^e100-.*-" | cut -d "-" -f 2 | uniq`
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   154
    found=0
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   155
    for k in $kernels; do
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   156
        if test "$kernele100" = "$k"; then
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   157
            found=1
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   158
        fi
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   159
    done
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   160
    if test $found -ne 1; then
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   161
        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
   162
    fi
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   163
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   164
    AC_MSG_RESULT([$kernele100])
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   165
fi
568
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
#------------------------------------------------------------------------------
581
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   168
# forcedeth
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   169
#------------------------------------------------------------------------------
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   170
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   171
AC_ARG_ENABLE([forcedeth],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   172
    AS_HELP_STRING([--enable-forcedeth],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   173
                   [Enable forcedeth driver]),
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   174
    [
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   175
        case "${enableval}" in
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   176
            yes) enableforcedeth=1
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   177
                ;;
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   178
            no) enableforcedeth=0
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   179
                ;;
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   180
            *) 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
   181
                ;;
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   182
        esac
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   183
    ],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   184
    [enableforcedeth=0]
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   185
)
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   186
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   187
AM_CONDITIONAL(ENABLE_FORCEDETH, test "x$enableforcedeth" = x1)
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   188
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   189
AC_ARG_WITH([forcedeth-kernel],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   190
    AC_HELP_STRING(
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   191
        [--with-forcedeth-kernel=<X.Y.Z>],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   192
        [forcedeth kernel (only if differing)]
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
        kernelforcedeth=[$withval]
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   196
    ],
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   197
    [
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   198
        kernelforcedeth=$linuxversion
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   199
    ]
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   200
)
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
if test ${enableforcedeth} -eq 1; then
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   203
    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
   204
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   205
    kernels=`ls -1 devices/ | grep -oE "^forcedeth-.*-" | cut -d "-" -f 2 | uniq`
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   206
    found=0
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   207
    for k in $kernels; do
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   208
        if test "$kernelforcedeth" = "$k"; then
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   209
            found=1
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   210
        fi
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   211
    done
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   212
    if test $found -ne 1; then
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   213
        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
   214
    fi
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   215
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   216
    AC_MSG_RESULT([$kernelforcedeth])
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   217
fi
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
#------------------------------------------------------------------------------
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
   220
# 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
   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
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
   224
    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
   225
        [--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
   226
        [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
   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
        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
   230
    ],
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
   231
    [
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
   232
        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
   233
    ]
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
   234
)
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
   235
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
   236
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
   237
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
   238
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
   239
    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
   240
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
   241
    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
   242
        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
   243
    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
   244
    AC_MSG_RESULT([$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
   245
    AC_SUBST(RTAI_DIR,[$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
   246
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
   247
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
   248
#------------------------------------------------------------------------------
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
   249
# MSR 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
   250
#------------------------------------------------------------------------------
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
   251
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
   252
AC_ARG_WITH([msr-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
   253
    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
   254
        [--with-msr-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
   255
        [MSR path (only for MSR example)]
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
   256
    ),
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
   257
    [
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
   258
        msrdir=[$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
   259
    ],
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
   260
    [
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
   261
        msrdir=""
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
   262
    ]
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
   263
)
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
   264
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
   265
AC_MSG_CHECKING([for MSR 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
   266
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
   267
if test -z "${msrdir}"; 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
   268
    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
   269
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
   270
    if test \! -r ${msrdir}/include/msr.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
   271
        AC_MSG_ERROR([no MSR installation found in ${msrdir}!])
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
   272
    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
   273
    AC_MSG_RESULT([$msrdir])
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
   274
    AC_SUBST(MSR_DIR,[$msrdir])
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
   275
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
   276
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
   277
#------------------------------------------------------------------------------
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   278
# Debug interface
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   279
#------------------------------------------------------------------------------
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   280
471
0a6bd71bf4d3 Fixed debug interfaces.
Florian Pose <fp@igh-essen.com>
parents: 468
diff changeset
   281
AC_ARG_ENABLE([dbg-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
   282
    AS_HELP_STRING([--enable-dbg-if],
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   283
                   [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
   284
    [
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   285
        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
   286
            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
   287
                AC_DEFINE([EC_DBG_IF], [1], [Debug interfaces enabled])
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   288
                ;;
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   289
            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
   290
                ;;
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   291
            *) AC_MSG_ERROR([Invalid value for --enable-dbg-if])
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   292
                ;;
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   293
        esac
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   294
    ],
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   295
    [dbg=0]
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   296
)
440
16fddae16c94 Altered configure --with-linux parameter to --with-linux-dir; removed depmod call.
Florian Pose <fp@igh-essen.com>
parents: 393
diff changeset
   297
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   298
AM_CONDITIONAL(EC_DBG_IF, test "x$dbg" = x1)
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   299
AC_SUBST([EC_DBG_IF],${dbg})
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   300
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   301
#------------------------------------------------------------------------------
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   302
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
   303
# Create config.kbuild
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
   304
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
   305
echo configure: creating config.kbuild...
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
   306
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
   307
cat > config.kbuild <<EOF
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
   308
# config.kbuild - created by configure
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
   309
EC_DBG_IF := ${dbg}
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
   310
EC_8139TOO_KERNEL := ${kernel8139too}
569
87dd7f374593 Added --enable-e100 switch to configure.
Florian Pose <fp@igh-essen.com>
parents: 568
diff changeset
   311
ENABLE_E100 := ${enablee100}
568
3edb8f45bdc1 First experimental version of e100 driver.
Florian Pose <fp@igh-essen.com>
parents: 565
diff changeset
   312
EC_E100_KERNEL := ${kernele100}
581
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   313
ENABLE_FORCEDETH := ${enableforcedeth}
99623f8a8493 Added testing version of forcedeth driver.
Florian Pose <fp@igh-essen.com>
parents: 570
diff changeset
   314
EC_FORCEDETH_KERNEL := ${kernelforcedeth}
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
   315
EC_RTAI_DIR := "${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
   316
EC_MSR_DIR := "${msrdir}"
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
   317
EOF
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
   318
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
   319
#------------------------------------------------------------------------------
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
   320
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
   321
AC_CONFIG_FILES([
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   322
        Makefile
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   323
        master/Makefile
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 387
diff changeset
   324
        devices/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
   325
        script/Makefile
563
d113b63c55c4 Changed structure of scripts subdirectory.
Florian Pose <fp@igh-essen.com>
parents: 546
diff changeset
   326
        script/init.d/Makefile
d113b63c55c4 Changed structure of scripts subdirectory.
Florian Pose <fp@igh-essen.com>
parents: 546
diff changeset
   327
        script/sysconfig/Makefile
387
e6e708a5d502 Improved autotools files.
Florian Pose <fp@igh-essen.com>
parents: 385
diff changeset
   328
        include/Makefile
393
9cfbb344adc0 Distribution makefile for examples.
Florian Pose <fp@igh-essen.com>
parents: 392
diff changeset
   329
        examples/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
   330
        examples/mini/Makefile
387
e6e708a5d502 Improved autotools files.
Florian Pose <fp@igh-essen.com>
parents: 385
diff changeset
   331
        examples/rtai/Makefile
e6e708a5d502 Improved autotools files.
Florian Pose <fp@igh-essen.com>
parents: 385
diff changeset
   332
        examples/msr/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
   333
])
365
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   334
AC_OUTPUT
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   335
7aede8ed6025 Corrected autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   336
#------------------------------------------------------------------------------