Added --enable-e100 switch to configure.
--- a/configure.ac Wed Feb 14 17:26:25 2007 +0000
+++ b/configure.ac Thu Feb 15 16:59:28 2007 +0000
@@ -109,6 +109,26 @@
AC_MSG_RESULT([$kernel8139too])
#------------------------------------------------------------------------------
+# Disable e100
+#------------------------------------------------------------------------------
+
+AC_ARG_ENABLE([e100],
+ AS_HELP_STRING([--enable-e100],
+ [Enable e100 driver]),
+ [
+ case "${enableval}" in
+ yes) enablee100=1
+ ;;
+ no) enablee100=0
+ ;;
+ *) AC_MSG_ERROR([Invalid value for --enable-e100])
+ ;;
+ esac
+ ],
+ [enablee100=0]
+)
+
+#------------------------------------------------------------------------------
# e100 Kernel
#------------------------------------------------------------------------------
@@ -125,20 +145,22 @@
]
)
-AC_MSG_CHECKING([for kernel for e100 driver])
-
-kernels=`ls -1 devices/ | grep -oE "^e100-.*-" | cut -d "-" -f 2 | uniq`
-found=0
-for k in $kernels; do
- if test "$kernele100" = "$k"; then
- found=1
- fi
-done
-if test $found -ne 1; then
- AC_MSG_ERROR([kernel $kernele100 not available for e100 driver!])
-fi
-
-AC_MSG_RESULT([$kernele100])
+if test ${enablee100} -eq 1; then
+ AC_MSG_CHECKING([for kernel for e100 driver])
+
+ kernels=`ls -1 devices/ | grep -oE "^e100-.*-" | cut -d "-" -f 2 | uniq`
+ found=0
+ for k in $kernels; do
+ if test "$kernele100" = "$k"; then
+ found=1
+ fi
+ done
+ if test $found -ne 1; then
+ AC_MSG_ERROR([kernel $kernele100 not available for e100 driver!])
+ fi
+
+ AC_MSG_RESULT([$kernele100])
+fi
#------------------------------------------------------------------------------
# RTAI path (optional)
@@ -232,6 +254,7 @@
# config.kbuild - created by configure
EC_DBG_IF := ${dbg}
EC_8139TOO_KERNEL := ${kernel8139too}
+ENABLE_E100 := ${enablee100}
EC_E100_KERNEL := ${kernele100}
EC_RTAI_DIR := "${rtaidir}"
EC_MSR_DIR := "${msrdir}"
--- a/devices/Kbuild Wed Feb 14 17:26:25 2007 +0000
+++ b/devices/Kbuild Thu Feb 15 16:59:28 2007 +0000
@@ -36,7 +36,10 @@
EC_8139TOO_OBJ = 8139too-$(EC_8139TOO_KERNEL)-ethercat.o
EC_E100_OBJ = e100-$(EC_E100_KERNEL)-ethercat.o
-obj-m := ec_8139too.o ec_e100.o
+obj-m := ec_8139too.o
+ifeq ($(ENABLE_E100),1)
+ obj_m += ec_e100.o
+endif
ec_8139too-objs := $(EC_8139TOO_OBJ)
ec_e100-objs := $(EC_E100_OBJ)