include (CheckSymbolExists)

MACRO(CHECK_DEF_SYMBOL_EXISTS SYMBOL HEADERS VARIABLE)
    CHECK_SYMBOL_EXISTS(${SYMBOL} ${HEADERS} ${VARIABLE})
    IF(${VARIABLE})
        ADD_DEFINITIONS(-D${VARIABLE})
    ENDIF(${VARIABLE})
ENDMACRO(CHECK_DEF_SYMBOL_EXISTS SYMBOL HEADERS VARIABLE)
