Ugandan President Yoweri Museveni on Monday signed a controversial law that will see homosexuals jailed for life, and dismissed warnings from key foreign allies and donors including the United States.