1# $FreeBSD$ 2 3.if !defined(COMPILER_TYPE) 4. if ${CC:T:Mgcc} == "gcc" 5COMPILER_TYPE:= gcc 6. elif ${CC:T:Mclang} == "clang" 7COMPILER_TYPE:= clang 8. else 9_COMPILER_VERSION!= ${CC} --version 10. if ${_COMPILER_VERSION:Mgcc} == "gcc" 11COMPILER_TYPE:= gcc 12. elif ${_COMPILER_VERSION:M\(GCC\)} == "(GCC)" 13COMPILER_TYPE:= gcc 14. elif ${_COMPILER_VERSION:Mclang} == "clang" 15COMPILER_TYPE:= clang 16. else 17.error Unable to determing compiler type for ${CC} 18. endif 19. undef _COMPILER_VERSION 20. endif 21.endif 22 23.if ${COMPILER_TYPE} == "clang" 24COMPILER_FEATURES= c++11 25.else 26COMPILER_FEATURES= 27.endif 28