-[ "$config_sasl" = y ] && config_opts="$config_opts --with-cyrus-sasl"
-[ "$config_tls" = y ] && config_opts="$config_opts --with-tls"
+if [ "$config_sasl" = y ]; then
+ config_opts="$config_opts --with-cyrus-sasl"
+elif [ "$config_sasl" != 'determined by configure' ]; then
+ config_opts="$config_opts --with-cyrus-sasl=no"
+fi
+if [ "$config_tls" = y ]; then
+ config_opts="$config_opts --with-tls"
+elif [ "$config_tls" != 'determined by configure' ]; then
+ config_opts="$config_opts --with-tls=no"
+fi