gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: attempt fix flag detection


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: attempt fix flag detection again
Date: Mon, 09 Sep 2019 14:13:29 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new be6ab0620 attempt fix flag detection again
be6ab0620 is described below

commit be6ab0620c2cac18847bd0124310f9225b5f5ba6
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Mon Sep 9 14:11:38 2019 +0200

    attempt fix flag detection again
---
 configure.ac | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7ca7250e7..5e0b3bd14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,7 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
   AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
     [ac_save_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS $1"
-     AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
+     AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
        [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
        [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
      CFLAGS="$ac_save_CFLAGS"
@@ -81,9 +81,22 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
     [$2], [$3])
 ])
 
+
+# CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found])
+# Check for CFLAG and appends them to CFLAGS if supported
+AC_DEFUN([CC_CHECK_CFLAG_APPEND], [
+  AC_CACHE_CHECK([if $CC supports $1 flag],
+    AS_TR_SH([cc_cv_cflags_$1]),
+    CC_CHECK_CFLAGS_SILENT([$1])
+  )
+
+  AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
+    [CFLAGS="$CFLAGS $1"; $2], [$3])
+])
+
+
 # We make heavy use of this, llvm/gcc and gcc-9 give warnings so disable.
-CC_CHECK_CFLAGS_SILENT([-Wno-address-of-packed-member],
-                      [CFLAGS="-Wno-address-of-packed-member $CFLAGS"])
+CC_CHECK_CFLAG_APPEND([-Wno-address-of-packed-member])
 
 # Use Linux interface name unless the OS has a different preference
 DEFAULT_INTERFACE="\"eth0\""

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]