The conditions for establishing a masjid are the following:
1) Waqf (endowment)
i.e. The owner of that land or building which is being converted into a masjid must give up his right as owner, and establish that land or building as a religious endowment.
2) Giving adhan
3) Establishing obligatory prayer