]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: verify that compiler groks -Werror=partial-availability
authorDaniel Stenberg <daniel@haxx.se>
Thu, 3 Nov 2016 22:37:59 +0000 (23:37 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 3 Nov 2016 22:37:59 +0000 (23:37 +0100)
Reported-by: bemoody
Fixes #1104

acinclude.m4

index f959e3d43f6479b897031b50c9bd3d6cd4c1eb97..2abae8d8ad8f58220b55e54d876a775bd7bbb99c 100644 (file)
@@ -3232,7 +3232,14 @@ AC_DEFUN([CURL_MAC_CFLAGS], [
     else
       AC_MSG_RESULT([$min set])
     fi
+
+    old_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -Werror=partial-availability"
+    AC_MSG_CHECKING([whether $CC accepts -Werror=partial-availability])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+      [AC_MSG_RESULT([yes])],
+      [AC_MSG_RESULT([no])
+      CFLAGS=$old_CFLAGS])
   fi
 
 ])