Search
lxdream.org :: lxdream/acinclude.m4
lxdream 0.9.1
released Jun 29
Download Now
filename acinclude.m4
changeset 923:13ac59a786f4
next927:17b6b9e245d8
author nkeynes
date Thu Dec 11 23:28:50 2008 +0000 (11 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
nkeynes@923
     1
# AC_CHECK_FASTCALL([if-ok],[if-notok])
nkeynes@923
     2
# Test if the compiler recognizes __attribute__((regparm(3))) - we don't 
nkeynes@923
     3
# currently check if it actually works correctly, but probably should...
nkeynes@923
     4
# -----------------------
nkeynes@923
     5
AC_DEFUN([AC_CHECK_FASTCALL], [
nkeynes@923
     6
AC_MSG_CHECKING([support for fastcall calling conventions]);
nkeynes@923
     7
AC_RUN_IFELSE([
nkeynes@923
     8
  AC_LANG_SOURCE([[
nkeynes@923
     9
int __attribute__((regparm(3))) foo(int a, int b) { return a+b; }
nkeynes@923
    10
nkeynes@923
    11
int main(int argc, char *argv[])
nkeynes@923
    12
{
nkeynes@923
    13
   return foo( 1, 2 ) == 3 ? 0 : 1;
nkeynes@923
    14
}]])], [ 
nkeynes@923
    15
   AC_MSG_RESULT([yes])
nkeynes@923
    16
   $1 ], [ 
nkeynes@923
    17
   AC_MSG_RESULT([no])
nkeynes@923
    18
   $2 ])
nkeynes@923
    19
])
nkeynes@923
    20
.