diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-10-29 10:01:42 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-10-30 16:10:34 +0100 |
commit | c131148b695afd9cf6601ce8879711ccb8ba0a9d (patch) | |
tree | 47f6e5ceacb7f602a3320139cc3fa61509cf75fc /acinclude.m4 | |
parent | e4d38014cd74a43644774589eed00ce210022b3e (diff) | |
download | curl-c131148b695afd9cf6601ce8879711ccb8ba0a9d.tar.gz |
acinclude: detect manually set minimum macos/ipod version
... even if set in the CC or IPHONEOS/MACOSX_DEPLOYMENT_TARGET
variables.
Reported-by: hamstergene on github
Fixes #6138
Closes #6140
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index e7a36e4bd..fb77b2cfd 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2526,14 +2526,20 @@ AC_DEFUN([CURL_MAC_CFLAGS], [ AC_MSG_RESULT([$tst_cflags]); if test "$tst_cflags" = "yes"; then - AC_MSG_CHECKING([for *version-min in CFLAGS]) + AC_MSG_CHECKING([for *version-min set by user]) min="" - if test -z "$(echo $CFLAGS | grep m.*os.*-version-min)"; then + 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]) + AC_MSG_RESULT([set by user in $var]) else AC_MSG_RESULT([$min set]) fi |