Adding check for --disable-shared on --enable-coverage
authorChristopher L. Conway <christopherleeconway@gmail.com>
Thu, 1 Apr 2010 03:02:01 +0000 (03:02 +0000)
committerChristopher L. Conway <christopherleeconway@gmail.com>
Thu, 1 Apr 2010 03:02:01 +0000 (03:02 +0000)
configure.ac

index 985a269033e1e40cfacf9fe47ba2ffca0a08210e..ecaa1bf30e62b8514b8070f4306aa3057bbb6e90 100644 (file)
@@ -317,6 +317,12 @@ fi
 AC_MSG_RESULT([$enable_coverage])
 
 if test "$enable_coverage" = yes; then
+dnl TODO: Is there someway to detect if enable_shared is set by default,
+dnl so that we can automatically disable shared and enable static?
+  if test "$enable_shared" = yes; then
+    AC_MSG_ERROR([Gcov requires static libraries. Use --disable-shared.])
+  fi
+
   CVC4CPPFLAGS="$CVC4CPPFLAGS -DCVC4_COVERAGE"
   CVC4CXXFLAGS="$CVC4CXXFLAGS --coverage"
   CVC4LDFLAGS="$CVC4LDFLAGS --coverage"