[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 02/02: configure: better test for "-Werror=
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 02/02: configure: better test for "-Werror=attributes" |
Date: |
Mon, 10 Apr 2017 17:40:16 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit ab406a9e6a0568bcb607ff737397bdc5b0cf533b
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Mon Apr 10 18:39:47 2017 +0300
configure: better test for "-Werror=attributes"
---
configure.ac | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index b00e7885..fabcde9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,7 +182,21 @@ AS_VAR_IF([[mhd_cv_macro_true_false_valid]], [["yes"]],
[[:]],
AX_CHECK_COMPILE_FLAG([[-Werror=attributes]],
- [[errattr_CFLAGS="-Werror=attributes"]],
+ [
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror=attributes"
+ AC_MSG_CHECKING([[whether -Werror=attributes actually works]])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[__attribute__((non_existing_attrb_dummy)) int SimpleFunc(void)
{return 3;}]], [[int r = SimpleFunc(); if (r) return r;]])],
+ [
+ AC_MSG_RESULT([[no]])
+ errattr_CFLAGS=""
+ ], [
+ AC_MSG_RESULT([[yes]])
+ errattr_CFLAGS="-Werror=attributes"
+ ])
+ CFLAGS="$save_CFLAGS"
+ ],
[[errattr_CFLAGS=""]], [], [])
AC_MSG_CHECKING([[for function inline keywords suppoted by $CC]])
save_CFLAGS="$CFLAGS"
--
To stop receiving notification emails like this one, please contact
address@hidden