filename | acinclude.m4 |
changeset | 923:13ac59a786f4 |
next | 927:17b6b9e245d8 |
author | nkeynes |
date | Thu Dec 11 23:28:50 2008 +0000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Make HAVE_FASTCALL dependent on whether the compiler supports the attribute, rather than on whether we're making an optimized build - in any case there's no good reason to disable it for debug builds. |
file | annotate | diff | log | raw |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +00001.2 +++ b/acinclude.m4 Thu Dec 11 23:28:50 2008 +00001.3 @@ -0,0 +1,20 @@1.4 +# AC_CHECK_FASTCALL([if-ok],[if-notok])1.5 +# Test if the compiler recognizes __attribute__((regparm(3))) - we don't1.6 +# currently check if it actually works correctly, but probably should...1.7 +# -----------------------1.8 +AC_DEFUN([AC_CHECK_FASTCALL], [1.9 +AC_MSG_CHECKING([support for fastcall calling conventions]);1.10 +AC_RUN_IFELSE([1.11 + AC_LANG_SOURCE([[1.12 +int __attribute__((regparm(3))) foo(int a, int b) { return a+b; }1.13 +1.14 +int main(int argc, char *argv[])1.15 +{1.16 + return foo( 1, 2 ) == 3 ? 0 : 1;1.17 +}]])], [1.18 + AC_MSG_RESULT([yes])1.19 + $1 ], [1.20 + AC_MSG_RESULT([no])1.21 + $2 ])1.22 +])1.23 +
.