configure: OSX/macos: autodetect new_macho value
Use old (=no) if autodetect succeeded and osx ver <= 10, else new. Override is possible, and now also documented at ./configure --help.
This commit is contained in:
parent
4dc4e93f1d
commit
e21523529b
1 changed files with 7 additions and 1 deletions
8
configure
vendored
8
configure
vendored
|
@ -71,6 +71,12 @@ case $targetos in
|
||||||
cc=`readlink $cc || echo clang`
|
cc=`readlink $cc || echo clang`
|
||||||
tcc_usrinclude="`xcrun --show-sdk-path`/usr/include"
|
tcc_usrinclude="`xcrun --show-sdk-path`/usr/include"
|
||||||
DLLSUF=".dylib"
|
DLLSUF=".dylib"
|
||||||
|
case $* in *--config-new_macho*) ;; *)
|
||||||
|
# if new_macho was not specified and (known) ver <= 10, use old (=no)
|
||||||
|
osxver=$(sw_vers -productVersion 2>/dev/null) # X.Y.Z
|
||||||
|
osxver=${osxver%%.*} # major version (or empty on sw_vers error)
|
||||||
|
[ "${osxver:-11}" -ge 11 ] || confvars="$confvars new_macho=no"
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
Windows_NT|MINGW*|MSYS*|CYGWIN*)
|
Windows_NT|MINGW*|MSYS*|CYGWIN*)
|
||||||
mingw32=yes
|
mingw32=yes
|
||||||
|
@ -351,7 +357,7 @@ Advanced options (experts only):
|
||||||
--config-backtrace=no disable stack backtraces (with -run or -bt)
|
--config-backtrace=no disable stack backtraces (with -run or -bt)
|
||||||
--config-bcheck=no disable bounds checker (-b)
|
--config-bcheck=no disable bounds checker (-b)
|
||||||
--config-predefs=no do not compile tccdefs.h, instead just include
|
--config-predefs=no do not compile tccdefs.h, instead just include
|
||||||
--config-new_macho=no Use apple old macho object format
|
--config-new_macho=no|yes Force apple object format (autodetect osx <= 10)
|
||||||
--config-codesign Use codesign on apple to sign executables
|
--config-codesign Use codesign on apple to sign executables
|
||||||
--dwarf=x Use dwarf debug info instead of stabs (x=2..5)
|
--dwarf=x Use dwarf debug info instead of stabs (x=2..5)
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue