configure.ac
changeset 2028 55854f070c4a
parent 1934 f00951ab7399
child 2035 72a4e043e67d
--- a/configure.ac	Thu Dec 23 09:48:56 2010 +0100
+++ b/configure.ac	Wed Jan 05 08:36:53 2011 +0100
@@ -537,6 +537,31 @@
 fi
 
 #------------------------------------------------------------------------------
+# use mutexes instead of semaphores
+#------------------------------------------------------------------------------
+
+AC_ARG_ENABLE([mutex],
+    AS_HELP_STRING([--enable-mutex],
+                   [Use mutex instead of semaphores for mutual exclusion (default: no)]),
+    [
+        case "${enableval}" in
+            yes) mutex=1
+                ;;
+            no) mutex=0
+                ;;
+            *) AC_MSG_ERROR([Invalid value for --enable-mutex])
+                ;;
+        esac
+    ],
+    [mutex=0]
+)
+
+if test "x${mutex}" = "x1"; then
+    AC_DEFINE([EC_USE_MUTEX], [1], [Use mutex for mutual exclusion])
+fi
+
+
+#------------------------------------------------------------------------------
 # Command-line tool
 #-----------------------------------------------------------------------------