CC_VERSION=borland_bcc
else
- dnl KAI C? It seems as if the documented options
- dnl -V and --version are not always supported, so give
- dnl the whole thing a second try by looking for /KCC/
- dnl somewhere in the paths that are output by -v. This
- dnl is risky business, since this combination of
- dnl characters might appear on other installations
- dnl of other compilers as well, so put this test to
- dnl the very end of the detection chain for the
- dnl various compilers
- is_kai_cc="`($CC --version 2>&1) | grep 'KAI C'`"
- is_kai_cc="$is_kai_cc`($CC -v 2>&1) | grep /KCC/`"
- if test "x$is_kai_cc" != "x" ; then
- AC_MSG_RESULT(C compiler is KAI C)
- CC_VERSION=kai_cc
- else
-
- dnl Aw, nothing suitable found...
- AC_MSG_RESULT([Unrecognized compiler -- still trying])
- CC_VERSION=unknown_cc
- fi
+ is_clang="`($CC --version 2>&1) | grep clang`"
+ if test "x$is_clang" != x ; then
+ AC_MSG_RESULT(C compiler is clang)
+ CC_VERSION=clang
+ else
+
+ dnl KAI C? It seems as if the documented options
+ dnl -V and --version are not always supported, so give
+ dnl the whole thing a second try by looking for /KCC/
+ dnl somewhere in the paths that are output by -v. This
+ dnl is risky business, since this combination of
+ dnl characters might appear on other installations
+ dnl of other compilers as well, so put this test to
+ dnl the very end of the detection chain for the
+ dnl various compilers
+ is_kai_cc="`($CC --version 2>&1) | grep 'KAI C'`"
+ is_kai_cc="$is_kai_cc`($CC -v 2>&1) | grep /KCC/`"
+ if test "x$is_kai_cc" != "x" ; then
+ AC_MSG_RESULT(C compiler is KAI C)
+ CC_VERSION=kai_cc
+ else
+
+ dnl Aw, nothing suitable found...
+ AC_MSG_RESULT([Unrecognized compiler -- still trying])
+ CC_VERSION=unknown_cc
+ fi
+ fi
fi
fi
fi
;;
+ clang)
+ CFLAGS="$CFLAGS -g"
+ CFLAGSO="$CFLAGS -fast -O2"
+ CFLAGSPIC="-fPIC"
+ ;;
+
sun_cc*)
CFLAGS="$CFLAGS -g"
CFLAGSO="$CFLAGS -fast -O2"
CC_VERSION=borland_bcc
else
- is_kai_cc="`($CC --version 2>&1) | grep 'KAI C'`"
- is_kai_cc="$is_kai_cc`($CC -v 2>&1) | grep /KCC/`"
- if test "x$is_kai_cc" != "x" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: C compiler is KAI C" >&5
+ is_clang="`($CC --version 2>&1) | grep clang`"
+ if test "x$is_clang" != x ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: C compiler is clang" >&5
+$as_echo "C compiler is clang" >&6; }
+ CC_VERSION=clang
+ else
+
+ is_kai_cc="`($CC --version 2>&1) | grep 'KAI C'`"
+ is_kai_cc="$is_kai_cc`($CC -v 2>&1) | grep /KCC/`"
+ if test "x$is_kai_cc" != "x" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: C compiler is KAI C" >&5
$as_echo "C compiler is KAI C" >&6; }
- CC_VERSION=kai_cc
- else
+ CC_VERSION=kai_cc
+ else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: Unrecognized compiler -- still trying" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Unrecognized compiler -- still trying" >&5
$as_echo "Unrecognized compiler -- still trying" >&6; }
- CC_VERSION=unknown_cc
- fi
+ CC_VERSION=unknown_cc
+ fi
+ fi
fi
fi
fi
;;
+ clang)
+ CFLAGS="$CFLAGS -g"
+ CFLAGSO="$CFLAGS -fast -O2"
+ CFLAGSPIC="-fPIC"
+ ;;
+
sun_cc*)
CFLAGS="$CFLAGS -g"
CFLAGSO="$CFLAGS -fast -O2"