From 6724242cf15bfb9987ff5dfe00fe95667f42f0f9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 3 Nov 2016 23:37:59 +0100 Subject: [PATCH] configure: verify that compiler groks -Werror=partial-availability Reported-by: bemoody Fixes #1104 --- acinclude.m4 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index f959e3d43..2abae8d8a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 ])