aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-08-01 17:24:08 -0700
committerDamjan Marion <dmarion@me.com>2018-08-02 20:12:00 +0000
commit9686eacfa4eb7ed136ab52e1db7c8586faba2318 (patch)
tree1295fa256bf2df08ecd9a196138648aadce2d0f5 /extras
parentc6c0d2a077a77a126d642ff12dd326222cf13a7a (diff)
vcl: fix debug messages output before heap cfg
Change-Id: Ifaef7ab2bc2fd4f5b4822d894facbcae01849031 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/japi/configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/extras/japi/configure.ac b/extras/japi/configure.ac
index 08f0897af14..4b15bc61b08 100644
--- a/extras/japi/configure.ac
+++ b/extras/japi/configure.ac
@@ -10,6 +10,26 @@ AM_CONDITIONAL([USE_CHECK],[test "$HAVE_CHECK" -eq 1])
AC_PROG_CC
AC_PROG_CXX
+# Check if compiler supports specific flag
+AC_DEFUN([CC_CHECK_FLAG],
+[
+ AC_MSG_CHECKING([if $CC supports $1])
+ AC_LANG_PUSH([C])
+ ac_saved_cflags="$CFLAGS"
+ CFLAGS="-Werror $1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [cc_flag_check=yes],
+ [cc_flag_check=no]
+)
+ AC_MSG_RESULT([$cc_flag_check])
+ CFLAGS="$ac_saved_cflags"
+ AC_LANG_POP([C])
+])
+
+CC_CHECK_FLAG("-Wno-address-of-packed-member")
+AS_IF([test "$cc_flag_check" = yes],
+ [CFLAGS="${CFLAGS} -Wno-address-of-packed-member"], [])
+
AM_CONDITIONAL(ENABLE_ACL_PLUGIN, test "yes" = "yes")
AM_CONDITIONAL(ENABLE_NAT_PLUGIN, test "yes" = "yes")
AM_CONDITIONAL(ENABLE_L2E_PLUGIN, test "yes" = "yes")