Fix dynamic_sparsity_test.

Skip the test in dynamic_sparsity_test when there are no sparse
linear algebra libraries available.

Also fix a minor typo in version_history.rst

Change-Id: Ie7cc14e655c58b6bd9625ce9f9025f94d0624d2d
diff --git a/docs/source/version_history.rst b/docs/source/version_history.rst
index 30316ee..73fc2f0 100644
--- a/docs/source/version_history.rst
+++ b/docs/source/version_history.rst
@@ -90,7 +90,7 @@
 #. Fix detection of CMake-built glog on Windows. (Alex Stewart)
 #. Add additional search paths for glog & Eigen on Windows. (Alex
    Stewart)
-#. Various minor grammar and bug fixes to the documetation (Sameer
+#. Various minor grammar and bug fixes to the documentation (Sameer
    Agarwal, Alex Stewart, William Rucklidge)
 
 
diff --git a/internal/ceres/dynamic_sparsity_test.cc b/internal/ceres/dynamic_sparsity_test.cc
index c6bba20..5fe60f4 100644
--- a/internal/ceres/dynamic_sparsity_test.cc
+++ b/internal/ceres/dynamic_sparsity_test.cc
@@ -358,6 +358,13 @@
 };
 
 TEST(DynamicSparsity, StaticAndDynamicSparsityProduceSameSolution) {
+  // Skip test if there is no sparse linear algebra library.
+  if (!IsSparseLinearAlgebraLibraryTypeAvailable(SUITE_SPARSE) &&
+      !IsSparseLinearAlgebraLibraryTypeAvailable(CX_SPARSE) &&
+      !IsSparseLinearAlgebraLibraryTypeAvailable(EIGEN_SPARSE)) {
+    return;
+  }
+
   // Problem configuration.
   const int num_segments = 151;
   const double regularization_weight = 1e-2;