Subject: | hints/darwin.pl tweak for OS X server |
On OS X server the system version includes "Server" before the version number, for example:
$ system_profiler SPSoftwareDataType | grep System
System Software Overview:
System Version: Mac OS X Server 10.7.1 (11B26)
$ diff -u hints/darwin.pl /tmp/darwin.pl
--- hints/darwin.pl 2011-08-07 12:00:29.000000000 -0700
+++ /tmp/darwin.pl 2011-09-04 23:30:10.000000000 -0700
@@ -4,7 +4,7 @@
if ( $Config{myarchname} =~ /i386/ ) {
my $os_version = qx(system_profiler SPSoftwareDataType);
- if($os_version =~ /System Version: Mac OS X 10\.(\d+)/) {
+ if($os_version =~ /System Version: Mac OS X (?:Server) 10\.(\d+)/) {
if($1 >= 5) { # Leopard and up
$arch = "-arch x86_64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.$1.sdk -
mmacosx-version-min=10.$1";
} else {