aboutsummaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-29 15:31:45 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-29 15:31:45 +0000
commitc228e657cea04141fe1897ab1b3640e03c316073 (patch)
tree2903e6322d12469d9cdd30ffe627d3234ba6d8f7 /acinclude.m4
parentc197a96d0fede6da50c056afe9c31741f9dd50dc (diff)
and now with the correct filenames
add basic support for checking for C compiler attribute support git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23380 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m419
1 files changed, 17 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index ebd8b997f..972271069 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -68,7 +68,7 @@ AC_SUBST([PBX_LIB$1])
AC_DEFUN(
-[AST_CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make, GNU_MAKE,
+[AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE,
GNU_MAKE='Not Found' ;
for a in make gmake gnumake ; do
if test -z "$a" ; then continue ; fi ;
@@ -83,4 +83,19 @@ if test "x$GNU_MAKE" = "xNot Found" ; then
exit 1
fi
AC_SUBST([GNU_MAKE])
-] )
+])
+
+AC_DEFUN(
+[AST_C_ATTRIBUTE],
+[AC_CACHE_CHECK([for $1 attribute support],
+ [ac_cv_attribute_$1],
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM(
+ [[static void foo(void) __attribute__ (($1));xyz]],
+ []),
+ have_attribute_$1=1, have_attribute_$1=0)
+ )
+ if test "$have_attribute_$1" = "1"; then
+ AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to indicate the compiler supports __attribute__ (($1))])
+ fi
+])