In this paper, we study an extended consensus problem for multi-agent systems, where the entire system is decentralized in the sense that each agent can only obtain information (states or outputs) from its neighbor agents. The concept extended consensus means that a combination of each agent's state elements is required to converge to the same vector. For this extended consensus problem, we propose to reduce the problem to a stabilization problem with an appropriate transformation, and thus obtain a strict matrix inequality with respect to a Lyapunov matrix and a structured controller gain matrix. We then utilize a homotopy based method for solving the matrix inequality effectively, and show validity of the result by an example. The feature of the present algorithm is that it can deal with various additional control requirements such as convergence rate specification and actuator limitations.