summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-10-30 23:09:17 -0400
committerCorey Farrell <git@cfware.com>2017-11-13 08:57:29 -0500
commit76e640bd53438232870c29051e3ac7a3514eab37 (patch)
treea4a9ebaf36d632330d9415b8354a9ed1fe5cb45f /configure
parentb1743cb3c75a943a8a9cb55a3e4355f0133156fe (diff)
Build: Make function constructor/destructor attributes mandatory.
This change causes the configure script to fail if the C compiler does not support both function attributes constructor and destructor. These were already required as modules cannot function without these attributes and Asterisk requires modules. This also has AST_GCC_ATTRIBUTE set a variable ax_cv_have_func_attribute_$1. This is the same variable name used by autoconf-archive's AX_GCC_FUNC_ATTRIBUTE, used for the same purpose. Change-Id: Id68e8a1447f2a6d707c54b56350e7bfdb33fb663
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure43
1 files changed, 43 insertions, 0 deletions
diff --git a/configure b/configure
index d4271af89..f64883be1 100755
--- a/configure
+++ b/configure
@@ -17912,6 +17912,7 @@ $as_echo_n "checking for compiler 'attribute pure' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_pure=0
if test "x" = "x"
then
@@ -17930,6 +17931,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_pure=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_pure 1
@@ -17957,6 +17959,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_pure=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_pure 1
@@ -17980,6 +17983,7 @@ $as_echo_n "checking for compiler 'attribute malloc' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_malloc=0
if test "x" = "x"
then
@@ -17998,6 +18002,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_malloc=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_malloc 1
@@ -18025,6 +18030,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_malloc=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_malloc 1
@@ -18048,6 +18054,7 @@ $as_echo_n "checking for compiler 'attribute const' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_const=0
if test "x" = "x"
then
@@ -18066,6 +18073,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_const=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_const 1
@@ -18093,6 +18101,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_const=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_const 1
@@ -18116,6 +18125,7 @@ $as_echo_n "checking for compiler 'attribute unused' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_unused=0
if test "x" = "x"
then
@@ -18134,6 +18144,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_unused=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_unused 1
@@ -18161,6 +18172,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_unused=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_unused 1
@@ -18184,6 +18196,7 @@ $as_echo_n "checking for compiler 'attribute always_inline' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_always_inline=0
if test "x" = "x"
then
@@ -18202,6 +18215,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_always_inline=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_always_inline 1
@@ -18229,6 +18243,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_always_inline=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_always_inline 1
@@ -18252,6 +18267,7 @@ $as_echo_n "checking for compiler 'attribute deprecated' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_deprecated=0
if test "x" = "x"
then
@@ -18270,6 +18286,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_deprecated=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_deprecated 1
@@ -18297,6 +18314,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_deprecated=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_deprecated 1
@@ -18320,6 +18338,7 @@ $as_echo_n "checking for compiler 'attribute sentinel' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_sentinel=0
if test "x" = "x"
then
@@ -18338,6 +18357,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_sentinel=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_sentinel 1
@@ -18365,6 +18385,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_sentinel=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_sentinel 1
@@ -18388,6 +18409,7 @@ $as_echo_n "checking for compiler 'attribute warn_unused_result' support... " >&
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_warn_unused_result=0
if test "x" = "x"
then
@@ -18406,6 +18428,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_warn_unused_result=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_warn_unused_result 1
@@ -18433,6 +18456,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_warn_unused_result=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_warn_unused_result 1
@@ -18456,6 +18480,7 @@ $as_echo_n "checking for compiler 'attribute may_alias' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_may_alias=0
if test "x" = "x"
then
@@ -18474,6 +18499,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_may_alias=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_may_alias 1
@@ -18501,6 +18527,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_may_alias=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_may_alias 1
@@ -18524,6 +18551,7 @@ $as_echo_n "checking for compiler 'attribute constructor' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_constructor=0
if test "x" = "x"
then
@@ -18542,6 +18570,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_constructor=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_constructor 1
@@ -18569,6 +18598,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_constructor=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_constructor 1
@@ -18586,12 +18616,17 @@ fi
CFLAGS="$saved_CFLAGS"
+if test "$ax_cv_have_func_attribute_constructor" != "1"; then
+ as_fn_error $? "*** Function constructor attribute is not supported by your compiler." "$LINENO" 5
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute destructor' support" >&5
$as_echo_n "checking for compiler 'attribute destructor' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_destructor=0
if test "x" = "x"
then
@@ -18610,6 +18645,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_destructor=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_destructor 1
@@ -18637,6 +18673,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_destructor=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_destructor 1
@@ -18654,12 +18691,16 @@ fi
CFLAGS="$saved_CFLAGS"
+if test "$ax_cv_have_func_attribute_destructor" != "1"; then
+ as_fn_error $? "*** Function destructor attribute is not supported by your compiler." "$LINENO" 5
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute noreturn' support" >&5
$as_echo_n "checking for compiler 'attribute noreturn' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
+ax_cv_have_func_attribute_noreturn=0
if test "xnoreturn" = "x"
then
@@ -18678,6 +18719,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_noreturn=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_noreturn 1
@@ -18705,6 +18747,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ ax_cv_have_func_attribute_noreturn=1
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_noreturn 1