1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-04 16:45:06 -05:00

configure: disable min version set for Darwin

Fixes #6838
Closes #6860
This commit is contained in:
Muhammed Yavuz Nuzumlalı 2021-04-03 13:20:33 +03:00 committed by Daniel Stenberg
parent 3be5ebf303
commit 5d2c384452
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2580,14 +2580,13 @@ TEST EINVAL TEST
])
dnl CURL_MAC_CFLAGS
dnl CURL_DARWIN_CFLAGS
dnl
dnl Check if -mmacosx-version-min, -miphoneos-version-min or any
dnl similar are set manually, otherwise do. And set
dnl -Werror=partial-availability.
dnl Set -Werror=partial-availability to detect possible breaking code
dnl with very low deployment targets.
dnl
AC_DEFUN([CURL_MAC_CFLAGS], [
AC_DEFUN([CURL_DARWIN_CFLAGS], [
tst_cflags="no"
case $host_os in
@ -2596,28 +2595,10 @@ AC_DEFUN([CURL_MAC_CFLAGS], [
;;
esac
AC_MSG_CHECKING([for good-to-use Mac CFLAGS])
AC_MSG_CHECKING([for good-to-use Darwin CFLAGS])
AC_MSG_RESULT([$tst_cflags]);
if test "$tst_cflags" = "yes"; then
AC_MSG_CHECKING([for *version-min set by user])
min=""
if test -n "$IPHONEOS_DEPLOYMENT_TARGET"; then
var="IPHONEOS_DEPLOYMENT_TARGET"
elif test -n "$MACOSX_DEPLOYMENT_TARGET"; then
var="MACOSX_DEPLOYMENT_TARGET"
elif test -z "$(echo $CFLAGS $CC | grep m.*os.*-version-min)"; then
min="-mmacosx-version-min=10.8"
CFLAGS="$CFLAGS $min"
else
var="CFLAGS or CC"
fi
if test -z "$min"; then
AC_MSG_RESULT([set by user in $var])
else
AC_MSG_RESULT([$min set])
fi
old_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror=partial-availability"
AC_MSG_CHECKING([whether $CC accepts -Werror=partial-availability])