filename | acinclude.m4 |
changeset | 1147:e04e4af64626 |
prev | 985:52e64faac752 |
next | 1198:407659e01ef0 |
author | nkeynes |
date | Thu Dec 23 18:14:29 2010 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Revert changes from r1151 that went in by accident (not ready from prime-time yet) |
file | annotate | diff | log | raw |
1.1 --- a/acinclude.m4 Tue Feb 24 11:47:41 2009 +00001.2 +++ b/acinclude.m4 Thu Dec 23 18:14:29 2010 +10001.3 @@ -18,6 +18,27 @@1.4 $2 ])1.5 ])1.7 +# AC_CHECK_FORCEINLINE([if-ok],[if-notok])1.8 +# Test if the compiler recognizes __attribute__((always_inline))1.9 +# -----------------------1.10 +AC_DEFUN([AC_CHECK_FORCEINLINE], [1.11 +AC_MSG_CHECKING([support for force inlining]);1.12 +AC_COMPILE_IFELSE([1.13 + AC_LANG_SOURCE([[1.14 +static int __attribute__((always_inline)) foo(int a, int b) { return a+b; }1.15 +1.16 +int main(int argc, char *argv[])1.17 +{1.18 + return foo( 1, 2 ) == 3 ? 0 : 1;1.19 +}]])], [1.20 + FORCEINLINE="__attribute__((always_inline))"1.21 + AC_MSG_RESULT([$FORCEINLINE])1.22 + $1 ], [1.23 + FORCEINLINE=""1.24 + AC_MSG_RESULT([no])1.25 + $2 ])1.26 +])1.27 +1.28 # AC_CHECK_FRAME_ADDRESS([if-ok],[if-notok])1.29 # Test if the compiler will let us modify the return address on the stack1.30 # via __builtin_frame_address()
.