Fix `hookmethod=auto` does not work on some mac monterey, issue #464

Keep finding `sw_vers` POSIX.
pull/465/head
Gavin Chou 2022-07-28 17:39:17 +08:00
parent 7efbf9f077
commit 7f508ca2c6
1 changed files with 1 additions and 2 deletions

3
configure vendored
View File

@ -215,8 +215,7 @@ check_define __APPLE__ && {
test "$osver" -gt $((120000 - 1)) && hookmethod=dyld
fi
# The above check is not sufficient, check out issue #464 for more detail.
has_sw_vers=`which sw_vers 2>/dev/null`
if [ "$hookmethod" = auto ] && [ "$has_sw_vers" ] ; then
if [ "$hookmethod" = auto ] && [ -f "/usr/bin/sw_vers" ] ; then
osver=`sw_vers | grep -i productver | awk '{print $2}' | awk -F. '{print $1}'`
test "$osver" -ge 12 && hookmethod=dyld
fi