diff --git a/configure b/configure index 6fe82482..4d3e5fc9 100755 --- a/configure +++ b/configure @@ -71,6 +71,12 @@ case $targetos in cc=`readlink $cc || echo clang` tcc_usrinclude="`xcrun --show-sdk-path`/usr/include" 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*) mingw32=yes @@ -351,7 +357,7 @@ Advanced options (experts only): --config-backtrace=no disable stack backtraces (with -run or -bt) --config-bcheck=no disable bounds checker (-b) --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 --dwarf=x Use dwarf debug info instead of stabs (x=2..5) EOF