]> granicus.if.org Git - curl/commitdiff
configure: add AX_CODE_COVERAGE only if using gcc
authorMichael Felt <aixtools@gmail.com>
Wed, 29 Nov 2017 17:18:19 +0000 (17:18 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 8 Dec 2017 14:26:44 +0000 (15:26 +0100)
Fixes #2076
Closes #2125

configure.ac

index 0433a7ccd9dcbb1a4d08723bc40d1bc32adb90b7..fdb8b8f67d6f875e3c187e6bf41d5560dcf80b69 100755 (executable)
@@ -51,7 +51,6 @@ CURL_CHECK_OPTION_ARES
 CURL_CHECK_OPTION_RT
 
 XC_CHECK_PATH_SEPARATOR
-AX_CODE_COVERAGE
 
 #
 # save the configure arguments
@@ -124,6 +123,13 @@ AC_SUBST(libext)
 dnl figure out the libcurl version
 CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h`
 XC_CHECK_PROG_CC
+
+dnl Check if gcc is being used before adding AX_CODE_COVERAGE
+AS_IF([ test "$GCC" = "yes" ], [AX_CODE_COVERAGE],
+  # not using GCC so pass a test below - CODE_COVERAGE_ENABLED_TRUE is not zero length
+  CODE_COVERAGE_ENABLED_TRUE='#'
+)
+
 XC_AUTOMAKE
 AC_MSG_CHECKING([curl version])
 AC_MSG_RESULT($CURLVERSION)