summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-03 23:37:59 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-03 23:37:59 +0100
commit6724242cf15bfb9987ff5dfe00fe95667f42f0f9 (patch)
treedb700867ffbf1a4ed5256dddd6e47fedff38c13d
parentc8e6e60b4064efffe5aa510e5c436261f7145a83 (diff)
downloadcurl-6724242cf15bfb9987ff5dfe00fe95667f42f0f9.tar.gz
configure: verify that compiler groks -Werror=partial-availability
Reported-by: bemoody Fixes #1104
-rw-r--r--acinclude.m47
1 files changed, 7 insertions, 0 deletions
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
])