From: Matias Elo <matias....@nokia.com>

Enables building ODP on systems which have no C++ compiler available.

Signed-off-by: Matias Elo <matias....@nokia.com>
---
/** Email created from pull request 349 (matiaselo:fix/redhat_build)
 ** https://github.com/Linaro/odp/pull/349
 ** Patch: https://github.com/Linaro/odp/pull/349.patch
 ** Base sha: 6b5cdc77eb9759a2349b10372a964648559bc92c
 ** Merge commit sha: b7cb2807d0d8daae786abe4a77c68c1be9db059d
 **/
 test/m4/miscellaneous.m4 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test/m4/miscellaneous.m4 b/test/m4/miscellaneous.m4
index dac236a67..b4f90b9c2 100644
--- a/test/m4/miscellaneous.m4
+++ b/test/m4/miscellaneous.m4
@@ -4,5 +4,11 @@
 AC_ARG_ENABLE([test-cpp],
     [AS_HELP_STRING([--disable-test-cpp], [run basic test aginast cpp])],
     [test_cpp=$enableval],
-    [test_cpp=yes])
+    [AC_LANG_PUSH([C++])
+     AC_MSG_CHECKING([for C++ compiler])
+     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+                       [AC_MSG_RESULT(yes) ; test_cpp="yes"],
+                       [AC_MSG_RESULT(no) ; test_cpp="no"])
+     AC_LANG_POP([C++])])
+
 AM_CONDITIONAL([test_cpp], [test x$test_cpp = xyes ])

Reply via email to