From 6884c6e29fa62766f3a3678ae9be34b4d82d5d96 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Tue, 16 Jun 2009 16:35:45 +0000 Subject: Merged revisions 200985 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r200985 | kpfleming | 2009-06-16 11:32:36 -0500 (Tue, 16 Jun 2009) | 7 lines Fix problems with new compiler attribute checking in configure script. The last changes to ast_gcc_attribute.m4 caused some problems checking for various attributes, because the scope of the symbol the attribute is applied to can be important; this patch allows the scope to be specified for the check. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@200989 f38db490-d61c-443f-a65b-d21fe96a405b --- configure | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 81 insertions(+), 18 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 3ba512bad..2149fa1da 100755 --- a/configure +++ b/configure @@ -17470,6 +17470,13 @@ $as_echo_n "checking for compiler 'attribute pure' support... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x" = "x" +then +attribute_scope="static" +else +attribute_scope="" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -17478,7 +17485,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((pure)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((pure)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17529,7 +17536,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17584,6 +17591,13 @@ $as_echo_n "checking for compiler 'attribute malloc' support... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x" = "x" +then +attribute_scope="static" +else +attribute_scope="" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -17592,7 +17606,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((malloc)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((malloc)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17643,7 +17657,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17698,6 +17712,13 @@ $as_echo_n "checking for compiler 'attribute const' support... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x" = "x" +then +attribute_scope="static" +else +attribute_scope="" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -17706,7 +17727,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((const)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((const)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17757,7 +17778,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17812,6 +17833,13 @@ $as_echo_n "checking for compiler 'attribute unused' support... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x" = "x" +then +attribute_scope="static" +else +attribute_scope="" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -17820,7 +17848,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((unused)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((unused)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17871,7 +17899,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17926,6 +17954,13 @@ $as_echo_n "checking for compiler 'attribute always_inline' support... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x" = "x" +then +attribute_scope="static" +else +attribute_scope="" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -17934,7 +17969,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((always_inline)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((always_inline)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -17985,7 +18020,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -18040,6 +18075,13 @@ $as_echo_n "checking for compiler 'attribute deprecated' support... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x" = "x" +then +attribute_scope="static" +else +attribute_scope="" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -18048,7 +18090,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((deprecated)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((deprecated)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -18099,7 +18141,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -18154,6 +18196,13 @@ $as_echo_n "checking for compiler 'attribute sentinel' support... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x" = "x" +then +attribute_scope="static" +else +attribute_scope="" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -18162,7 +18211,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((sentinel)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((sentinel)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -18213,7 +18262,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -18268,6 +18317,13 @@ $as_echo_n "checking for compiler 'attribute warn_unused_result' support... " >& saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x" = "x" +then +attribute_scope="static" +else +attribute_scope="" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -18276,7 +18332,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((warn_unused_result)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((warn_unused_result)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -18327,7 +18383,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -18382,6 +18438,13 @@ $as_echo_n "checking for compiler 'attribute weak' support... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Wno-unused -Werror" +if test "x""" = "x" +then +attribute_scope="static" +else +attribute_scope="""" +fi + if test "x" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -18390,7 +18453,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((weak)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((weak)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -18441,7 +18504,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;} int main () { -- cgit v1.2.3