aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2016-04-07 17:12:48 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2016-04-07 18:07:06 +0300
commit6c83e1e1310b3b7b72f53cfccf1b8a5a952f1a93 (patch)
tree50a2489a825f7c1f0ef278995c237cb9d448f34d /test
parent8b87bcf374aafe2d22bbb8f2ce7ffd9ed2ae10e3 (diff)
validation: configure: move cflags guards to test/m4
Move cflags guards to test/m4 to fix cunit library search. This fixes build failure with --with-cunit-path= option. https://bugs.linaro.org/show_bug.cgi?id=2161 Reported-by: Brian Brooks <brian.brooks@linaro.org> Suggested-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r--test/m4/validation.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/test/m4/validation.m4 b/test/m4/validation.m4
index b13711826..d32f675ae 100644
--- a/test/m4/validation.m4
+++ b/test/m4/validation.m4
@@ -31,6 +31,14 @@ AC_HELP_STRING([--with-cunit-path=DIR path to CUnit libs and headers],
cunit_support=yes],[])
##########################################################################
+# Save and set temporary compilation flags
+##########################################################################
+OLD_LDFLAGS=$LDFLAGS
+OLD_CPPFLAGS=$CPPFLAGS
+LDFLAGS="$AM_LDFLAGS $LDFLAGS"
+CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
+
+##########################################################################
# Check for CUnit availability
##########################################################################
if test x$cunit_support = xyes
@@ -42,3 +50,9 @@ then
else
cunit_support=no
fi
+
+##########################################################################
+# Restore old saved variables
+##########################################################################
+LDFLAGS=$OLD_LDFLAGS
+CPPFLAGS=$OLD_CPPFLAGS