diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-16 16:36:54 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-16 16:36:54 +0000 |
commit | ff28797738d0d8b62495cfc0b3fe37c4f9f5bc3a (patch) | |
tree | c3286d171b4eee81e8494f2eea5ab67b429a4ed3 /configure | |
parent | e214f125e663783699f91a578ba52dea1f276c8f (diff) |
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.2@200990 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 121 |
1 files changed, 99 insertions, 22 deletions
@@ -17942,13 +17942,20 @@ 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 /* confdefs.h. */ _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 () { @@ -17999,7 +18006,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 () { @@ -18056,13 +18063,20 @@ 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 /* confdefs.h. */ _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 () { @@ -18113,7 +18127,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 () { @@ -18170,13 +18184,20 @@ 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 /* confdefs.h. */ _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 () { @@ -18227,7 +18248,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 () { @@ -18284,13 +18305,20 @@ 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 /* confdefs.h. */ _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 () { @@ -18341,7 +18369,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 () { @@ -18398,13 +18426,20 @@ 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 /* confdefs.h. */ _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 () { @@ -18455,7 +18490,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 () { @@ -18512,13 +18547,20 @@ 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 /* confdefs.h. */ _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 () { @@ -18569,7 +18611,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 () { @@ -18626,13 +18668,20 @@ 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 /* confdefs.h. */ _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 () { @@ -18683,7 +18732,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 () { @@ -18740,13 +18789,20 @@ 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 /* confdefs.h. */ _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 () { @@ -18797,7 +18853,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 () { @@ -18854,13 +18910,20 @@ 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 /* confdefs.h. */ _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 () { @@ -18911,7 +18974,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 () { @@ -18966,6 +19029,13 @@ $as_echo_n "checking for compiler 'attribute weak_import' 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 @@ -18974,7 +19044,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((weak_import)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((weak_import)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -19025,7 +19095,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 () { @@ -19080,6 +19150,13 @@ $as_echo_n "checking for compiler 'attribute alias' 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 "xalias("foo")" = "x" then cat >conftest.$ac_ext <<_ACEOF @@ -19088,7 +19165,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((alias)) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((alias)) *test(void *muffin, ...) {return (void *) 0;} int main () { @@ -19139,7 +19216,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -static void __attribute__((alias("foo"))) *test(void *muffin, ...) {return (void *) 0;} +$attribute_scope void __attribute__((alias("foo"))) *test(void *muffin, ...) {return (void *) 0;} int main () { |