Merge changes I231c062e,Idadc42c7
[profile/ivi/libvpx.git] / configure
index 62e1ffb..eed6f97 100755 (executable)
--- a/configure
+++ b/configure
@@ -531,7 +531,7 @@ process_toolchain() {
         check_add_cflags -Wimplicit-function-declaration
         check_add_cflags -Wuninitialized
         check_add_cflags -Wunused-variable
-        check_add_cflags -Wunused-but-set-variable        
+        check_add_cflags -Wunused-but-set-variable
         enabled extra_warnings || check_add_cflags -Wno-unused-function
     fi
 
@@ -586,6 +586,16 @@ process_toolchain() {
     if enabled postproc_visualizer; then
         enabled postproc || die "postproc_visualizer requires postproc to be enabled"
     fi
+
+    # Enable unit tests if we have a working C++ compiler
+    case "$tgt_cc" in
+        vs*)
+            soft_enable unit_tests;;
+        *)
+            check_cxx "$@" <<EOF && soft_enable unit_tests
+int z;
+EOF
+    esac
 }