AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007-08-05

(C) 2007 guidod
Download the M4 Source.

ax_gcc_const_call

Back to the Main Page.

Synopsis
AX_GCC_CONST_CALL ,

defines GCC_CONST_CALL to __attribute__((__const__)) if available

Version

2006-08-10

Author

Guido U. Draheim <guidod@gmx.de>

Category

guidod's C Support (released)

Documentation

The macro will compile a test program to see whether the compiler does understand the per-function postfix pragma.

@licence GPLWithACException

M4 Source Code
AC_DEFUN([AX_GCC_CONST_CALL],[dnl
AC_CACHE_CHECK(
 [whether the compiler supports function __attribute__((__const__))],
 ax_cv_gcc_const_call,[
 AC_TRY_COMPILE([__attribute__((__const__))
 int f(int i) { return i; }],
 [],
 ax_cv_gcc_const_call=yes, ax_cv_gcc_const_call=no)])
 if test "$ax_cv_gcc_const_call" = yes; then
   AC_DEFINE([GCC_CONST_CALL],[__attribute__((__const__))],
    [most gcc compilers know a function __attribute__((__const__))])
 fi
])