From 9058596e1e1ddc89d60d2d054d96a7ee839894e9 Mon Sep 17 00:00:00 2001 From: dmiller Date: Wed, 6 Jul 2016 16:20:56 +0000 Subject: [PATCH] Separate CFLAGS from CXXFLAGS. Was breaking with -std=c++11 on clang --- Makefile.in | 3 +-- configure | 3 +++ configure.ac | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 74e3dde1e..c7f12e2ca 100644 --- a/Makefile.in +++ b/Makefile.in @@ -47,8 +47,7 @@ DEFS += -D_FORTIFY_SOURCE=2 # DEFS += -DMTRACE=1 CXXFLAGS = @CXXFLAGS@ $(DBGFLAGS) $(CCOPT) CPPFLAGS = @CPPFLAGS@ $(DEFS) -export CFLAGS = $(CXXFLAGS) -# CFLAGS = $(DEFS) $(INCLS) +CFLAGS = @CFLAGS@ $(DBGFLAGS) $(CCOPT) STATIC = LDFLAGS = @LDFLAGS@ $(DBGFLAGS) $(STATIC) LIBS = @LIBNSOCK_LIBS@ @LIBNBASE_LIBS@ @LIBPCRE_LIBS@ @LIBPCAP_LIBS@ $(OPENSSL_LIBS) libnetutil/libnetutil.a @LIBDNET_LIBS@ @LIBLUA_LIBS@ @LIBLINEAR_LIBS@ @LIBS@ diff --git a/configure b/configure index 4196e2474..f4c06345e 100755 --- a/configure +++ b/configure @@ -4403,6 +4403,8 @@ if test -n "$GXX"; then CXXFLAGS="$CXXFLAGS -Wall -fno-strict-aliasing" fi +CFLAGS="$CFLAGS -Wall" + # Remember that all following tests will run with this CXXFLAGS by default { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5 $as_echo_n "checking for __func__... " >&6; } @@ -6874,6 +6876,7 @@ fi + LIBLINEARDIR=liblinear have_liblinear=no diff --git a/configure.ac b/configure.ac index 44b40fc4b..929d6bb07 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,8 @@ if test -n "$GXX"; then CXXFLAGS="$CXXFLAGS -Wall -fno-strict-aliasing" fi +CFLAGS="$CFLAGS -Wall" + # Remember that all following tests will run with this CXXFLAGS by default AC_MSG_CHECKING(for __func__) AH_TEMPLATE(__func__, [C99-specified function identifier]) @@ -680,6 +682,7 @@ AC_SUBST(LUA_DIST_CLEAN) AC_SUBST(INSTALLNSE) AC_SUBST(NSE_CHECK) AC_SUBST(CXXFLAGS) +AC_SUBST(CFLAGS) LIBLINEARDIR=liblinear