diff mbox

[1/3] configure.ac: remove cunit warning

Message ID 1418310812-10965-2-git-send-email-anders.roxell@linaro.org
State Accepted
Commit aec1af6a6bf85460a288db7cd476cf6f5aab2604
Headers show

Commit Message

Anders Roxell Dec. 11, 2014, 3:13 p.m. UTC
Changed CFLAGS to CPPFLAGS in relevant places to remove the warnings:

configure: WARNING: CUnit/Basic.h: accepted by the compiler, rejected
by the preprocessor!
configure: WARNING: CUnit/Basic.h: proceeding with the compiler's
result

Reported-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 configure.ac | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 2f27261..b185a41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,7 +77,7 @@  AC_ARG_WITH([cunit-path],
 AC_HELP_STRING([--with-cunit-path=DIR Path to Cunit libs and headers],
                [(or in the default path if not specified).]),
     [CUNIT_PATH=$withval
-    AM_CFLAGS="$AM_CFLAGS -I$CUNIT_PATH/include"
+    AM_CPPFLAGS="$AM_CPPFLAGS -I$CUNIT_PATH/include"
     AM_LDFLAGS="$AM_LDFLAGS -L$CUNIT_PATH/lib"
     cunit_support=yes],[])
 
@@ -130,7 +130,7 @@  AC_ARG_WITH([openssl-path],
 AC_HELP_STRING([--with-openssl-path=DIR Path to openssl libs and headers],
                [(or in the default path if not specified).]),
     [OPENSSL_PATH=$withval
-    AM_CFLAGS="$AM_CFLAGS -I$OPENSSL_PATH/include"
+    AM_CPPFLAGS="$AM_CPPFLAGS -I$OPENSSL_PATH/include"
     AM_LDFLAGS="$AM_LDFLAGS -L$OPENSSL_PATH/lib"
     ],[AC_MSG_RESULT([no])])
 
@@ -138,9 +138,9 @@  AC_HELP_STRING([--with-openssl-path=DIR Path to openssl libs and headers],
 # Save and set temporary compilation flags
 ##########################################################################
 OLD_LDFLAGS=$LDFLAGS
-OLD_CFLAGS=$CFLAGS
+OLD_CPPFLAGS=$CPPFLAGS
 LDFLAGS="$AM_LDFLAGS $LDFLAGS"
-CFLAGS="$AM_CFLAGS $CFLAGS"
+CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
 
 ##########################################################################
 # Check for CUnit availability
@@ -169,7 +169,7 @@  AC_CHECK_HEADERS([openssl/des.h openssl/rand.h openssl/hmac.h openssl/evp.h], []
 # Restore old saved variables
 ##########################################################################
 LDFLAGS=$OLD_LDFLAGS
-CFLAGS=$OLD_CFLAGS
+CPPFLAGS=$OLD_CPPFLAGS
 
 ##########################################################################
 # Default warning setup
@@ -212,6 +212,7 @@  AC_SEARCH_LIBS([timer_create],[rt posix4])
 AM_LDFLAGS="$AM_LDFLAGS -pthread -lrt"
 
 AC_SUBST([LIBS])
+AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([AM_CFLAGS])
 AC_SUBST([CFLAGS])
 AC_SUBST([AM_LDFLAGS])