Search
lxdream.org :: lxdream/acinclude.m4 :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename acinclude.m4
changeset 964:f2f3c7612d06
prev927:17b6b9e245d8
next977:8514fb4bc101
author nkeynes
date Thu Jan 15 04:15:11 2009 +0000 (11 years ago)
permissions -rw-r--r--
last change Add support for the Intel ICC compiler (C only, icc doesn't support Obj-C)
- Rename Obj-C source to .m
- Separate paths.c into paths_unix.c and paths_osx.m
- Add configuration detection of ICC, along with specific opt flags
file annotate diff log raw
1.1 --- a/acinclude.m4 Mon Dec 15 10:44:56 2008 +0000
1.2 +++ b/acinclude.m4 Thu Jan 15 04:15:11 2009 +0000
1.3 @@ -51,4 +51,41 @@
1.4 $2 ])
1.5 ])
1.6
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 set
1.9 +# different optimization flags. Currently recognizes gcc and icc
1.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"; then
1.16 + AC_MSG_RESULT([GCC])
1.17 + [ $1 ]
1.18 +elif test -n "$_ICC_VERSION"; then
1.19 + AC_MSG_RESULT([ICC])
1.20 + [ $2 ]
1.21 +else
1.22 + AC_MSG_RESULT([Unknown])
1.23 + [ $3 ]
1.24 +fi
1.25 +]);
1.26
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"; then
1.32 + _GOBJC_VERSION=`$OBJC --version | $SED -ne '/(GCC)/p'`
1.33 + if test -n "$_GOBJC_VERSION"; then
1.34 + AC_MSG_RESULT([GCC])
1.35 + [ $1 ]
1.36 + else
1.37 + AC_MSG_RESULT([Unknown])
1.38 + [ $2 ]
1.39 + fi
1.40 +else
1.41 + AC_MSG_RESULT([None])
1.42 + [ $3 ]
1.43 +fi
1.44 +]);
.