diff -r 9fde4a17b820 -r 8354ddf38481 configure.ac --- a/configure.ac Mon Nov 06 14:22:35 2006 +0000 +++ b/configure.ac Mon Nov 06 16:27:40 2006 +0000 @@ -72,6 +72,96 @@ AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $LINUX_KERNEL_RELEASE)]) #------------------------------------------------------------------------------ +# 8139too Kernel +#------------------------------------------------------------------------------ + +AC_ARG_WITH([8139too-kernel], + AC_HELP_STRING( + [--with-8139too-kernel=], + [8139too kernel (only if differing)] + ), + [ + kernel8139too=[$withval] + ], + [ + kernel8139too=$linuxversion + ] +) + +AC_MSG_CHECKING([for kernel for 8139too driver]) + +kernels=`ls -1 devices/ | grep -oE "^8139too-.*-" | cut -d "-" -f 2 | uniq` +found=0 +for k in $kernels; do + if test "$kernel8139too" = "$k"; then + found=1 + fi +done +if test $found -ne 1; then + AC_MSG_ERROR([kernel $kernel8139too not available for 8139too driver!]) +fi + +AC_MSG_RESULT([$kernel8139too]) + +#------------------------------------------------------------------------------ +# RTAI path (optional) +#------------------------------------------------------------------------------ + +AC_ARG_WITH([rtai-dir], + AC_HELP_STRING( + [--with-rtai-dir=], + [RTAI path (only for RTAI examples)] + ), + [ + rtaidir=[$withval] + ], + [ + rtaidir="" + ] +) + +AC_MSG_CHECKING([for RTAI path]) + +if test -z "${rtaidir}"; then + AC_MSG_RESULT([not specified.]) +else + if test \! -r ${rtaidir}/include/rtai.h; then + AC_MSG_ERROR([no RTAI installation found in ${rtaidir}!]) + fi + AC_MSG_RESULT([$rtaidir]) + AC_SUBST(RTAI_DIR,[$rtaidir]) +fi + +#------------------------------------------------------------------------------ +# MSR path (optional) +#------------------------------------------------------------------------------ + +AC_ARG_WITH([msr-dir], + AC_HELP_STRING( + [--with-msr-dir=], + [MSR path (only for MSR example)] + ), + [ + msrdir=[$withval] + ], + [ + msrdir="" + ] +) + +AC_MSG_CHECKING([for MSR path]) + +if test -z "${msrdir}"; then + AC_MSG_RESULT([not specified.]) +else + if test \! -r ${msrdir}/include/msr.h; then + AC_MSG_ERROR([no MSR installation found in ${msrdir}!]) + fi + AC_MSG_RESULT([$msrdir]) + AC_SUBST(MSR_DIR,[$msrdir]) +fi + +#------------------------------------------------------------------------------ # Debug interface #------------------------------------------------------------------------------ @@ -97,6 +187,20 @@ #------------------------------------------------------------------------------ +# Create config.kbuild + +echo configure: creating config.kbuild... + +cat > config.kbuild <