Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#633 closed defect (fixed)

configure script fails to detect Mac OS X Server as Mac OS X platform

Reported by: urbanek@… Owned by: diego@…
Priority: normal Component: build system
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:


The configure script is detecting whether a system is Mac OS X with

productName=/usr/bin/sw_vers -productName
if test "$productName" = "Mac OS X" ; then




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




Change History (3)

comment:1 Changed 14 years ago by diego@…

  • Status changed from new to assigned

Does replacing the offending line with

if test "$productName" = "Mac OS X*" ; then

work as well?

comment:2 Changed 14 years ago by urbanek@…

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,

comment:3 Changed 14 years ago by diego@…

  • Resolution set to fixed
  • Status changed from assigned to closed

Fix committed.

Note: See TracTickets for help on using tickets.