+# Check if we're about to use Intel's ICC compiler
+case "`${cc:-cc} -V 2>&1`" in
+*"Intel(R) C++ Compiler"*|*"Intel(R) C Compiler"*)
+ # record the version, formats:
+ # icc (ICC) 10.1 20080801
+ # icpc (ICC) 10.1 20080801
+ # followed by a copyright on the second line
+ ccversion=`${cc:-cc} --version | sed -n -e 's/^icp\?c \((ICC) \)\?//p'`
+ # This is needed for Configure's prototype checks to work correctly
+ # The -mp flag is needed to pass various floating point related tests
+ # The -no-gcc flag is needed otherwise, icc pretends (poorly) to be gcc
+ ccflags="-we147 -mp -no-gcc $ccflags"
+ # Prevent relocation errors on 64bits arch
+ case "`uname -m`" in
+ *ia64*|*x86_64*)
+ cccdlflags='-fPIC'
+ ;;
+ esac
+ # If we're using ICC, we usually want the best performance
+ case "$optimize" in
+ '') optimize='-O3' ;;
+ esac
+ ;;
+*" Sun "*"C"*)
+ # Sun's C compiler, which might have a 'tag' name between
+ # 'Sun' and the 'C': Examples:
+ # cc: Sun C 5.9 Linux_i386 Patch 124871-01 2007/07/31
+ # cc: Sun Ceres C 5.10 Linux_i386 2008/07/10
+ test "$optimize" || optimize='-xO2'
+ cccdlflags='-KPIC'
+ lddlflags='-G -Bdynamic'
+ # Sun C doesn't support gcc attributes, but, in many cases, doesn't
+ # complain either. Not all cases, though.
+ d_attribute_format='undef'
+ d_attribute_malloc='undef'
+ d_attribute_nonnull='undef'
+ d_attribute_noreturn='undef'
+ d_attribute_pure='undef'
+ d_attribute_unused='undef'
+ d_attribute_warn_unused_result='undef'
+ ;;
+esac
+