configure.ac
branchstable-1.5
changeset 2453 d461b1f07296
parent 2447 e93efb4af231
child 2489 5cd99a1daa7a
--- a/configure.ac	Fri Nov 30 15:24:38 2012 +0100
+++ b/configure.ac	Fri Nov 30 20:15:31 2012 +0100
@@ -782,6 +782,38 @@
 fi
 
 #------------------------------------------------------------------------------
+# Redundancy (number of devices)
+#------------------------------------------------------------------------------
+
+AC_ARG_WITH([devices],
+    AC_HELP_STRING(
+        [--with-devices=<NUMBER>],
+        [Number of Ethernet devices per master. Default: 1]
+    ),
+    [
+        devices=[$withval]
+    ],
+    [
+        devices=1
+    ]
+)
+
+AC_MSG_CHECKING([for number of Ethernet devices])
+
+if test "${devices}" -lt 1; then
+    AC_MSG_ERROR([Number must be greater zero!])
+else
+    if test "${devices}" -gt 1; then
+        AC_MSG_RESULT([$devices (Redundancy enabled)])
+    else
+        AC_MSG_RESULT([$devices (Redundancy disabled)])
+    fi
+fi
+
+AC_DEFINE_UNQUOTED([EC_MAX_NUM_DEVICES], $devices,
+    [Max. number of Ethernet devices per master])
+
+#------------------------------------------------------------------------------
 
 AC_CONFIG_FILES([
         Doxyfile