Salome HOME
Update copyright
[modules/smesh.git] / adm_local / unix / config_files / check_Platform.m4
1 dnl Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 dnl
3 dnl Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 dnl
6 dnl This library is free software; you can redistribute it and/or
7 dnl modify it under the terms of the GNU Lesser General Public
8 dnl License as published by the Free Software Foundation; either
9 dnl version 2.1 of the License.
10 dnl
11 dnl This library is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 dnl Lesser General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU Lesser General Public
17 dnl License along with this library; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 dnl
20 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 dnl
22
23 AC_DEFUN([CHECK_PLATFORM],[
24 AC_REQUIRE([AC_PROG_CC])dnl
25 AC_REQUIRE([AC_PROG_CPP])dnl
26
27 AC_CHECKING(for Platform)
28
29 AC_SUBST(PLATFORM_INCLUDES)
30
31 PLATFORM_INCLUDES="PCLINUX"
32 SUFFIXES=""
33
34 f77int="F77INT32"
35 case  $host_os in
36    irix5.* | irix6.* | osf4.* | osf5.* | linux*  )
37
38         linux64="true"
39         expr "$host_os" : 'linux' >/dev/null && test ! x"$host_cpu" = x"x86_64" && linux64="false"
40         if test ! x"$linux64" = "xfalse" ; then
41           echo "$as_me:$LINENO: checking for 64bits integers size in F77/F90" >&5
42 echo $ECHO_N "checking for 64bits integers size in F77/F90... $ECHO_C" >&6
43           # Check whether --enable-int64 or --disable-int64 was given.
44 if test "${enable_int64+set}" = set; then
45   enableval="$enable_int64"
46
47 fi;
48           case "X-$enable_int64" in
49             X-no)
50              echo "$as_me:$LINENO: result: \"disabled\"" >&5
51 echo "${ECHO_T}\"disabled\"" >&6
52              SUFFIXES="_32"
53              ;;
54             *)
55              echo "$as_me:$LINENO: result: \"enabled\"" >&5
56 echo "${ECHO_T}\"enabled\"" >&6
57              SUFFIXES=""
58              f77int="F77INT64"
59              ;;
60           esac
61         fi
62      ;;
63    *)
64      ;;
65 esac
66
67 case $host_os in
68     linux*)
69         test x"$linux64" = x"true" && \
70           MACHINE="PCLINUX64${SUFFIXES}" || \
71         MACHINE=PCLINUX
72         ;;
73     hpux*)
74         MACHINE=HP9000
75         ;;
76     aix4.*)
77         MACHINE=RS6000
78         host_os_novers=aix4.x
79         ;;
80     irix5.*)
81         MACHINE="IRIX64${SUFFIXES}"
82         host_os_novers=irix5.x
83         ;;
84     irix6.*)
85         MACHINE="IRIX64${SUFFIXES}"
86         host_os_novers=irix6.x
87         ;;
88     osf4.*)
89         MACHINE="OSF1${SUFFIXES}"
90         host_os_novers=osf4.x
91         ;;
92     osf5.*)
93         MACHINE="OSF1${SUFFIXES}"
94          host_os_novers=osf5.x
95          ;;
96     solaris2.*)
97         MACHINE=SUN4SOL2
98          host_os_novers=solaris2.x
99          ;;
100     uxpv*)
101         MACHINE=VPP5000
102          ;;
103     *)
104         MACHINE=
105          host_os_novers=$host_os
106          ;;
107 esac
108
109 case $host_cpu in
110     ia64*)
111         MACHINE="PCLINUX64"
112         ;;
113 esac
114
115 PLATFORM_INCLUDES=" -D$MACHINE "
116
117 ])dnl