[MacOSX Lion] Compilation with gfortran-4.6
[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\.7" > /dev/null; then
7         AC_MSG_RESULT([MacOSX 10.7 - Lion.])
8         macosx_version="10.7"
9         else
10         if eval system_profiler SPSoftwareDataType | grep "System Version" | grep "10\.6" > /dev/null; then
11         AC_MSG_RESULT([MacOSX 10.6 - Snow Leopard.])
12         macosx_version="10.6"
13         else
14         if eval system_profiler SPSoftwareDataType | grep "System Version" | grep "10\.5" > /dev/null; then
15         AC_MSG_RESULT([MacOSX 10.5 - Leopard.])
16         macosx_version="10.5"
17         else
18         AC_MSG_ERROR([MacOSX 10.5,10.6 or 10.7 is needed.])
19         fi
20         fi
21         fi
22 ])