configure.ac
branchstable-1.5
changeset 2549 933a1b36b05f
parent 2526 2eff7c993a63
child 2553 b0c2762a1a83
--- a/configure.ac	Tue Feb 12 17:31:08 2013 +0100
+++ b/configure.ac	Fri Apr 04 08:32:09 2014 +0200
@@ -212,6 +212,61 @@
 AC_SUBST(KERNEL_8139TOO,[$kernel8139too])
 
 #------------------------------------------------------------------------------
+# CCAT driver
+#------------------------------------------------------------------------------
+
+AC_ARG_ENABLE([ccat],
+    AS_HELP_STRING([--enable-ccat],
+                   [Enable CCAT driver]),
+    [
+        case "${enableval}" in
+            yes) enableccat=1
+                ;;
+            no) enableccat=0
+                ;;
+            *) AC_MSG_ERROR([Invalid value for --enable-ccat])
+                ;;
+        esac
+    ],
+    [enableccat=0] # disabled by default
+)
+
+AM_CONDITIONAL(ENABLE_CCAT, test "x$enableccat" = "x1")
+AC_SUBST(ENABLE_CCAT,[$enableccat])
+
+AC_ARG_WITH([ccat-kernel],
+    AC_HELP_STRING(
+        [--with-ccat-kernel=<X.Y.Z>],
+        [ccat kernel (only if differing)]
+    ),
+    [
+        kernelccat=[$withval]
+    ],
+    [
+        kernelccat=$linuxversion
+    ]
+)
+
+if test "x${enableccat}" = "x1"; then
+    AC_MSG_CHECKING([for kernel for ccat driver])
+
+    kernels=`ls -1 ${srcdir}/devices/ccat/ | grep -oE "^netdev-.*" | cut -d "-" -f 2 | uniq`
+    found=0
+    for k in $kernels; do
+        if test "$kernelccat" = "$k"; then
+            found=1
+        fi
+    done
+    if test $found -ne 1; then
+        AC_MSG_ERROR([kernel $kernelccat not available for ccat driver!])
+    fi
+
+    AC_MSG_RESULT([$kernelccat])
+fi
+
+AC_SUBST(KERNEL_CCAT,[$kernelccat])
+
+#------------------------------------------------------------------------------
 # e100 driver
 #------------------------------------------------------------------------------
 
@@ -939,6 +994,8 @@
         Makefile
         devices/Kbuild
         devices/Makefile
+        devices/ccat/Kbuild
+        devices/ccat/Makefile
         devices/e1000/Kbuild
         devices/e1000/Makefile
         devices/e1000e/Kbuild