filename | acinclude.m4 |
changeset | 964:f2f3c7612d06 |
prev | 927:17b6b9e245d8 |
next | 977:8514fb4bc101 |
author | nkeynes |
date | Thu Jan 22 00:50:09 2009 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Fix Post-increment mov instructions - per the manual, increment doesn't happen if the source and target registers are the same. |
file | annotate | diff | log | raw |
1.1 --- a/acinclude.m4 Mon Dec 15 10:44:56 2008 +00001.2 +++ b/acinclude.m4 Thu Jan 22 00:50:09 2009 +00001.3 @@ -51,4 +51,41 @@1.4 $2 ])1.5 ])1.7 +# AC_CC_VERSION([if-gcc], [if-icc],[if-other])1.8 +# Check which C compiler we're using and branch accordingly, eg to set1.9 +# different optimization flags. Currently recognizes gcc and icc1.10 +# ---------------1.11 +AC_DEFUN([AC_CC_VERSION], [1.12 +_GCC_VERSION=`$CC --version | $SED -ne '/(GCC)/p'`1.13 +_ICC_VERSION=`$CC --version | $SED -ne '/(ICC)/p'`1.14 +AC_MSG_CHECKING([CC version])1.15 +if test -n "$_GCC_VERSION"; then1.16 + AC_MSG_RESULT([GCC])1.17 + [ $1 ]1.18 +elif test -n "$_ICC_VERSION"; then1.19 + AC_MSG_RESULT([ICC])1.20 + [ $2 ]1.21 +else1.22 + AC_MSG_RESULT([Unknown])1.23 + [ $3 ]1.24 +fi1.25 +]);1.27 +# AC_OBJC_VERSION([if-gcc],[if-other], [if-none])1.28 +# Check which objective C compiler we're using and branch accordingly.1.29 +AC_DEFUN([AC_OBJC_VERSION], [1.30 +AC_MSG_CHECKING([OBJC version])1.31 +if test -n "$OBJC"; then1.32 + _GOBJC_VERSION=`$OBJC --version | $SED -ne '/(GCC)/p'`1.33 + if test -n "$_GOBJC_VERSION"; then1.34 + AC_MSG_RESULT([GCC])1.35 + [ $1 ]1.36 + else1.37 + AC_MSG_RESULT([Unknown])1.38 + [ $2 ]1.39 + fi1.40 +else1.41 + AC_MSG_RESULT([None])1.42 + [ $3 ]1.43 +fi1.44 +]);
.