Test for Overlay Support

Simple question, but I’ve been unable to find an answer searching the boards. How can I test for (enabled) overlay support.

The situation: Porting application to Linux, some cards seem to support overlays, others don’t.