Just wanted to jot this down for any prospective mods. Now, Hf made a pretty solid system for choosing one or the other with a resource mechanic. But it has certain drawbacks, one being a very complicated system, and too, it only works for improvements if you make the building time one. Now, I believe the devs should simply add a mutually exclusive choice tag to the xml as well as a better way to upgrade a single building with many options. See Shogun 2 for a good example of how that would work.
I have been getting dirty with the CoreAbilities.xml and found that I can use the ability system to make things exclusive for buildings. The way to do this is start with an "Ability Bonus" and add as many "Ability Bonus Options" as you desire for a given building. So you could have a building called Merchant. Once you research Commerce, you unlock three specializations for that building in that city. You may choose one of those "Ability Bonus Options" and build it there.
We are still limited in that we have to choose between upgrading the existing building and having one building give two new building options that are mutually exclusive, but at least this way you don't have to make the new option build in one turn. So a small step forward, but an important option for modders.
I wonder if we can get the citylevelup screen to pop up for the decision. That will be a post for a later time. I am too busy to try that just now.