aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-06-03 20:06:42 +0200
committerYang Tse <yangsita@gmail.com>2011-06-03 20:08:00 +0200
commit10a7d05be3921b9c9762477a18d41aff232d94d8 (patch)
tree1e43b21b3a893d74f31896a84c576a7a5e49dfa1
parent9776f3445d96238d8490d1d81c915014517c585b (diff)
unit tests: disable unit tests for a given cross-compilation configuration.
cross-compilation of unit tests static library/programs fails when libcurl shared library is also built. This might be due to a libtool or automake issue. In this case we disable unit tests.
-rw-r--r--configure.ac17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 412242f44..7482397cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -305,8 +305,23 @@ AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
CURL_CHECK_CURLDEBUG
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
+supports_unittests=yes
+# cross-compilation of unit tests static library/programs fails when
+# libcurl shared library is built. This might be due to a libtool or
+# automake issue. In this case we disable unit tests.
+if test "x$cross_compiling" != "xno" &&
+ test "x$enable_shared" != "xno"; then
+ supports_unittests=no
+fi
+
dnl Build unit tests when option --enable-debug is given.
-AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_debug = xyes)
+if test "x$want_debug" = "xyes" &&
+ test "x$supports_unittests" = "xyes"; then
+ want_unittests=yes
+else
+ want_unittests=no
+fi
+AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
dnl **********************************************************************
dnl Compilation based checks should not be done before this point.