X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=m4%2Fattribute.m4;h=0678485903f41d7b69627adf862a5c71a576992a;hb=0f0bea383106de1a896905fdf8a56f55265bce74;hp=58b8346723f1ba7bf7d25c02530da2579f703a4b;hpb=da3078c63a3b658573f6e2f986f69ed4d7993b3a;p=meshlink diff --git a/m4/attribute.m4 b/m4/attribute.m4 index 58b83467..06784859 100644 --- a/m4/attribute.m4 +++ b/m4/attribute.m4 @@ -1,25 +1,25 @@ dnl Check to find out whether function attributes are supported. dnl If they are not, #define them to be nothing. -AC_DEFUN(tinc_ATTRIBUTE, +AC_DEFUN([MeshLink_ATTRIBUTE], [ - AC_CACHE_CHECK([for working $1 attribute], tinc_cv_attribute_$1, + AC_CACHE_CHECK([for working $1 attribute], MeshLink_cv_attribute_$1, [ tempcflags="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" AC_COMPILE_IFELSE( [AC_LANG_SOURCE( - [void test(void) __attribute__ (($1)); - void test(void) { return; } + [void *test(void *arg) __attribute__ (($1)); + void *test(void *arg) { return arg; } ], )], - [tinc_cv_attribute_$1=yes], - [tinc_cv_attribute_$1=no] + [MeshLink_cv_attribute_$1=yes], + [MeshLink_cv_attribute_$1=no] ) CFLAGS="$tempcflags" ]) - if test ${tinc_cv_attribute_$1} = no; then + if test ${MeshLink_cv_attribute_$1} = no; then AC_DEFINE([$1], [], [Defined if the $1 attribute is not supported.]) fi ])