From 54b824d1f4441b7d9c40f3ace1d91447e4bae882 Mon Sep 17 00:00:00 2001 From: "Yichun Zhang (agentzh)" Date: Sat, 19 Dec 2015 11:48:21 -0800 Subject: [PATCH] ./configure: now we automatically set the env MACOSX_DEPLOYMENT_TARGET to the current Mac OS X version unless the env is already set. thanks bsyk for the report in #3. --- util/configure | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/util/configure b/util/configure index be7b42f..1fa0018 100755 --- a/util/configure +++ b/util/configure @@ -622,6 +622,17 @@ _END_ $extra_opts .= " CC=cc"; } + if ($platform eq 'macosx') { + my $v = $ENV{MACOSX_DEPLOYMENT_TARGET}; + if (!defined $v || $v !~ /^\d+\.\d+$/) { + $v = `sw_vers -productVersion`; + if (defined $v && $v =~ /^\s*(\d+\.\d+)/) { + $ENV{MACOSX_DEPLOYMENT_TARGET} = $1; + #warn "MACOSX_DEPLOYMENT_TARGET = $1"; + } + } + } + if (defined $cores) { shell "${make} -j$cores$extra_opts PREFIX=$luajit_prefix", $dry_run; } else {