1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
AC_DEFUN([ACX_DETECT_CXX], [
# Sets environment variable CXXVENDOR to one of
# [GNU,Intel,Portland,Pathscale,IBM,unknown]
AC_CACHE_CHECK([compiler vendor], [acx_cv_detect_cxx], [
acx_cv_detect_cxx=unknown
if test $acx_cv_detect_cxx = unknown; then
$CXX --version 2>&1 | egrep -q "clang"
if test $? = 0; then
acx_cv_detect_cxx=clang
fi
fi
if test $acx_cv_detect_cxx = unknown; then
$CXX --version 2>&1 | egrep -q "GCC|GNU|gcc|gnu|g\+\+|Free S"
if test $? = 0; then
acx_cv_detect_cxx=GNU
fi
fi
if test $acx_cv_detect_cxx = unknown; then
$CXX --version 2>&1 | grep -q "Intel"
if test $? = 0; then
acx_cv_detect_cxx=Intel
fi
fi
if test $acx_cv_detect_cxx = unknown; then
$CXX --version 2>&1 | grep -q "Portland"
if test $? = 0; then
acx_cv_detect_cxx=Portland
fi
fi
if test $acx_cv_detect_cxx = unknown; then
$CXX -v 2>&1 | grep -q "Pathscale"
if test $? = 0; then
acx_cv_detect_cxx=Pathscale
fi
fi
if test $acx_cv_detect_cxx = unknown; then
$CXX -qversion 2>&1 | grep -q "IBM"
if test $? = 0; then
acx_cv_detect_cxx=IBM
fi
fi
])
CXXVENDOR="$acx_cv_detect_cxx"
])
|