In a large pot over medium-high heat, brown the garlic in the oil. Add the onions and mushrooms. Cook, stirring frequently, until well caramelized. Season with salt and pepper. Deglaze the saucepan with the wine and reduce until almost dry. Add the water and wheat. Cover and cook for 1 hour. Uncover and cook for another 30 minutes, or until the liquid is entirely absorbed and the wheat is cooked but still slightly firm to the tooth. Adjust the seasoning.