2 # Return MacOSX version using system_profile tool.
4 AC_DEFUN([AC_GET_MACOSX_VERSION],[
5 AC_MSG_CHECKING([Mac OS X Version])
6 [macosx_version=`system_profiler SPSoftwareDataType 2>&1 | grep 'System Version' | sed -e 's/.*\([0-9][0-9]\.[0-9]*\).*/\1/'`]
8 case "$macosx_version" in
10 AC_MSG_RESULT([Mac OS X 10.8 - Mountain Lion.])
13 AC_MSG_RESULT([Mac OS X 10.7 - Lion.])
16 AC_MSG_RESULT([Mac OS X 10.6 - Snow Leopard.])
19 AC_MSG_RESULT([Mac OS X 10.5 - Leopard.])
22 AC_MSG_ERROR([MacOSX 10.5, 10.6, 10.7 or 10.8 are needed. Found $macosx_version])