Sustain is an interesting animal in its own right. If you don't mind, I'll interject a few of my observations on this issue. From my perspective, the word sustain seems to be tossed about in a rather broad sense.
As a luthier, I've come to realize that there are many facets to sustain. Some guitars tend to sustain along the fundamental note, and do not break down into harmonics very readily. Such instruments can have a relatively long sustain. Yet, their sound is likely to be rather dry and unappealing (lacking harmonic content). In most cases, such instruments are rather over-built. The guitar box finds itself unable (or at least severely restricted) to amplify the strings' harmonic content. Think about a solid-body electric. Hit the strings, and they will keep on ringing (oscillating) for a long time. Significantly longer, in fact, than they would on most acoustic guitars. The quality of the ringing, however, is nothing to relish, until the guitar is hooked-up to an amp.
In the case of the acoustic guitars, the body of the guitar, along with its enclosed air, are the amp, and these amps are not all created equal. Some do a better job of emphasizing higher frequency harmonics. Others lean in the direction of a stronger bass response. To make an instrument balanced, and capable of reaching into the highs and the lows, is one of the balancing acts luthiers must contend with. In many good flamenco guitars I've come across, there is plenty of sustain. The quality of that sustain is a bit more diffused among the harmonic series than on many classicals. I believe the primary reason for this is due to a flamenco guitar's lighter structure, bridge, as well as the players' technique, driving the strings closer to the bridge.
Flamenco and Classical Guitarswww.tsiorba.com