diff --git a/configure b/configure
index 035d938c79ba54e635aa80ef25ab74ee0f3cdc9e..5674b4e3ba6877de4cffda2ccbdba5e42e2749ba 100755
--- a/configure
+++ b/configure
@@ -1390,10 +1390,11 @@ for opt do
     --enable-debug=*) debuglevel="$optval"
     ;;
     --enable-*=*|--disable-*=*)
-    eval $(echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/')
+    eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/')
     is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
     eval list=\$$(toupper $thing)_LIST
-    $action $(filter "${optval}_${thing}" $list)
+    name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
+    $action $(filter "$name" $list)
     ;;
     --enable-?*|--disable-?*)
     eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')