I believe you can only make them consume strategic resources.You can make buildings consume resources (for example, factories consume coal) in order to make them work. I'm not sure if there is an option to make it so that just owning a resource is enough to make the building work. You have to wander around the XML files (probably those conserning the buildings) to find out.
I believe you can only make them consume strategic resources.
I'd start by looking at the Mint, since it cares about luxury resources.
I did but the Mint provides extra gold when you have certain luxuries, not extra happiness.
In Civ IV you could do both (+health) i think...
It all just seems less flexible.
\Skodkim
But that requires the resource to be available locally, rather than just available in the empire, which sounds like a tighter restriction.You can make a building require a resource to be present using <Building_LocalResourceAnds> or <Building_LocalResourceOrs>. This should require its presence but not actually consume the resource. The reference is simply Resources(Type) which means both luxury and strategic resources, so I don't see any reason why it wouldn't work for either - this should apply to any Resource link from Buildings.
Finally you can use the <Happiness> field to increase happiness with that building, so it's getting close to what you want even if not exactly...
There is also <Building_ResourceCultureChanges> which allows you to create a culture increase on a particular resource.
It'd be silly, simplified and probably overpowered if every Market in every city provided that bonus if your civilization controlled but a single source of gold. Wouldn't it make more sense if such building gave that bonus only if gold was a local resource?
That's probably moddable. The Mint's not the only example: Monasteries give extra culture if there's local access to incense and/or wine. As RandomPete suggested, it's possible to mix and match conditions and effects.