ca6c7465b8c0319750db26a31d880d03dfcf56cb
[scilab.git] / scilab / m4 / macosx.m4
1 #
2 # Return MacOSX version using system_profile tool.
3 #
4 AC_DEFUN([AC_GET_MACOSX_VERSION],[
5         AC_MSG_CHECKING([MacOSX Version])
6         if eval system_profiler SPSoftwareDataType | grep "System Version" | grep "10\.6" > /dev/null; then
7         AC_MSG_RESULT([MacOSX 10.6 - Snow Leopard.])
8         macosx_version="10.6"
9         else
10         if eval system_profiler SPSoftwareDataType | grep "System Version" | grep "10\.5" > /dev/null; then
11         AC_MSG_RESULT([MacOSX 10.5 - Leopard.])
12         macosx_version="10.5"
13         else
14         AC_MSG_ERROR([MacOSX 10.5 or 10.6 is needed.])
15         fi
16         fi
17 ])