mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 06:18:38 +00:00
Merged revisions 201090 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r201090 | kpfleming | 2009-06-16 14:27:12 -0500 (Tue, 16 Jun 2009) | 5 lines Another minor fix to compiler attribute checking. Defaulting to 'static' for the function scope was bad... so remove it. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@201091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -7,17 +7,10 @@ AC_MSG_CHECKING(for compiler 'attribute $1' support)
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
|
||||
|
||||
if test "x$3" = "x"
|
||||
then
|
||||
attribute_scope="static"
|
||||
else
|
||||
attribute_scope="$3"
|
||||
fi
|
||||
|
||||
if test "x$2" = "x"
|
||||
then
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LANG_PROGRAM([$attribute_scope void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
|
||||
AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
|
||||
[]),
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
|
||||
@@ -25,7 +18,7 @@ AC_COMPILE_IFELSE(
|
||||
)
|
||||
else
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LANG_PROGRAM([$attribute_scope void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}],
|
||||
AC_LANG_PROGRAM([$3 void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}],
|
||||
[]),
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
|
||||
|
||||
101
configure
vendored
101
configure
vendored
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.ac Revision: 196947 .
|
||||
# From configure.ac Revision: 200989 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.63 for asterisk 1.6.
|
||||
#
|
||||
@@ -17470,13 +17470,6 @@ $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
|
||||
@@ -17485,7 +17478,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((pure)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((pure)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -17536,7 +17529,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -17591,13 +17584,6 @@ $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
|
||||
@@ -17606,7 +17592,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((malloc)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((malloc)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -17657,7 +17643,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -17712,13 +17698,6 @@ $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
|
||||
@@ -17727,7 +17706,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((const)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((const)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -17778,7 +17757,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -17833,13 +17812,6 @@ $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
|
||||
@@ -17848,7 +17820,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((unused)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((unused)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -17899,7 +17871,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -17954,13 +17926,6 @@ $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
|
||||
@@ -17969,7 +17934,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((always_inline)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((always_inline)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18020,7 +17985,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18075,13 +18040,6 @@ $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
|
||||
@@ -18090,7 +18048,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((deprecated)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((deprecated)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18141,7 +18099,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18196,13 +18154,6 @@ $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
|
||||
@@ -18211,7 +18162,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((sentinel)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((sentinel)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18262,7 +18213,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18317,13 +18268,6 @@ $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
|
||||
@@ -18332,7 +18276,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((warn_unused_result)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((warn_unused_result)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18383,7 +18327,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18438,13 +18382,6 @@ $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
|
||||
@@ -18453,7 +18390,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__((weak)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__((weak)) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
@@ -18504,7 +18441,7 @@ _ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$attribute_scope void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
void __attribute__(()) *test(void *muffin, ...) {return (void *) 0;}
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
@@ -488,7 +488,7 @@ AST_GCC_ATTRIBUTE(always_inline)
|
||||
AST_GCC_ATTRIBUTE(deprecated)
|
||||
AST_GCC_ATTRIBUTE(sentinel)
|
||||
AST_GCC_ATTRIBUTE(warn_unused_result)
|
||||
AST_GCC_ATTRIBUTE(weak, , "")
|
||||
AST_GCC_ATTRIBUTE(weak)
|
||||
|
||||
AC_MSG_CHECKING(for -ffunction-sections support)
|
||||
saved_CFLAGS="${CFLAGS}"
|
||||
|
||||
Reference in New Issue
Block a user