Enable unit tests by default

Build unit tests by default if there is a working C++ toolchain
available.

Change-Id: I511558339b332fadfde37ef01b2dbf2755f48f89
diff --git a/configure b/configure
index 2b1328d..eed6f97 100755
--- a/configure
+++ b/configure
@@ -586,6 +586,16 @@
     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
 }