#633 closed defect (fixed)
configure script fails to detect Mac OS X Server as Mac OS X platform
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | HEAD | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
The configure script is detecting whether a system is Mac OS X with
configure@3547:
productName=
/usr/bin/sw_vers -productName
if test "$productName" = "Mac OS X" ; then
_macosx=yes
else
_macosx=no
However, sw_vers returns "Mac OS X Server" on Mac OS X Server machines and thus won't pass the test.
Suggested fix:
if /usr/bin/sw_vers -productName|grep 'Mac OS X'; then
_macosx=yes
else
_macosx=no
Change History (3)
comment:1 by , 17 years ago
Status: | new → assigned |
---|
comment:2 by , 17 years ago
No, because "test" doesn't use patterns (so it would be looking litelally for a string ending with the star
character) so it wouldn't match, either.
If you prefer the same syntax, the following
if test "$productName" = "Mac OS X" -o "$productName" = "Mac OS X Server" ; then
works as well. I was just thinking that the grep way would be safer in case Apple decides to change the
product string by adding something,
Does replacing the offending line with
work as well?