Code

configure: Do not enable gcov unless the compiler is GCC.
authorSebastian Harl <sh@tokkee.org>
Sat, 21 Dec 2013 20:24:31 +0000 (21:24 +0100)
committerSebastian Harl <sh@tokkee.org>
Sat, 21 Dec 2013 20:24:31 +0000 (21:24 +0100)
Others are not known (to me) to work.

configure.ac

index 8620ff8246eab1a902522e44b4a5992343bd0ff8..d927b60a939ce2533a297170d9afb97ce74b0587 100644 (file)
@@ -193,7 +193,7 @@ AC_ARG_ENABLE([gcov],
 
 COVERAGE_CFLAGS=""
 COVERAGE_LDFLAGS=""
-if test "x$enable_gcov" = "xyes"; then
+if test "x$enable_gcov" = "xyes" && test "x$GCC" == "xyes"; then
        COVERAGE_CFLAGS="-O0"
        cov_flag_have_problem="no"
 
@@ -221,7 +221,10 @@ if test "x$enable_gcov" = "xyes"; then
        if test "x$cov_flag_have_problem" != "xno"; then
                AC_MSG_WARN([Some coverage flags are not supported by your compiler!])
        fi
-fi
+else if test "x$enable_gcov" = "xyes"; then
+       AC_MSG_WARN([Your compiler ($CC) is not known to support Gcov!])
+       enable_gcov="no (requires GCC)"
+fi; fi
 AC_SUBST([COVERAGE_CFLAGS])
 AC_SUBST([COVERAGE_LDFLAGS])
 
@@ -242,7 +245,7 @@ AC_ARG_WITH([libdbi],
 if test "x$with_libdbi" = "xyes"; then
        AC_CHECK_HEADERS([dbi/dbi.h],
                        [with_libdbi="yes"],
-                       [with_libdbi="no (dbi/dbi.h) not found"])
+                       [with_libdbi="no (dbi/dbi.h not found)"])
 fi
 if test "x$with_libdbi" = "xyes"; then
        AC_CHECK_LIB([dbi], [dbi_initialize],