Salome HOME
ff6606562e82963016b55219b21ede6363059048
[modules/smesh.git] / adm_local / unix / config_files / check_Platform.m4
1 dnl  Copyright (C) 2007-2008  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 AC_DEFUN([CHECK_PLATFORM],[
23 AC_REQUIRE([AC_PROG_CC])dnl
24 AC_REQUIRE([AC_PROG_CPP])dnl
25
26 AC_CHECKING(for Platform)
27
28 AC_SUBST(PLATFORM_INCLUDES)
29
30 PLATFORM_INCLUDES="PCLINUX"
31 SUFFIXES=""
32
33 f77int="F77INT32"
34 case  $host_os in
35    irix5.* | irix6.* | osf4.* | osf5.* | linux*  )
36
37         linux64="true"
38         expr "$host_os" : 'linux' >/dev/null && test ! x"$host_cpu" = x"x86_64" && linux64="false"
39         if test ! x"$linux64" = "xfalse" ; then
40           echo "$as_me:$LINENO: checking for 64bits integers size in F77/F90" >&5
41 echo $ECHO_N "checking for 64bits integers size in F77/F90... $ECHO_C" >&6
42           # Check whether --enable-int64 or --disable-int64 was given.
43 if test "${enable_int64+set}" = set; then
44   enableval="$enable_int64"
45
46 fi;
47           case "X-$enable_int64" in
48             X-no)
49              echo "$as_me:$LINENO: result: \"disabled\"" >&5
50 echo "${ECHO_T}\"disabled\"" >&6
51              SUFFIXES="_32"
52              ;;
53             *)
54              echo "$as_me:$LINENO: result: \"enabled\"" >&5
55 echo "${ECHO_T}\"enabled\"" >&6
56              SUFFIXES=""
57              f77int="F77INT64"
58              ;;
59           esac
60         fi
61      ;;
62    *)
63      ;;
64 esac
65
66 case $host_os in
67     linux*)
68         test x"$linux64" = x"true" && \
69           MACHINE="PCLINUX64${SUFFIXES}" || \
70         MACHINE=PCLINUX
71         ;;
72     hpux*)
73         MACHINE=HP9000
74         ;;
75     aix4.*)
76         MACHINE=RS6000
77         host_os_novers=aix4.x
78         ;;
79     irix5.*)
80         MACHINE="IRIX64${SUFFIXES}"
81         host_os_novers=irix5.x
82         ;;
83     irix6.*)
84         MACHINE="IRIX64${SUFFIXES}"
85         host_os_novers=irix6.x
86         ;;
87     osf4.*)
88         MACHINE="OSF1${SUFFIXES}"
89         host_os_novers=osf4.x
90         ;;
91     osf5.*)
92         MACHINE="OSF1${SUFFIXES}"
93          host_os_novers=osf5.x
94          ;;
95     solaris2.*)
96         MACHINE=SUN4SOL2
97          host_os_novers=solaris2.x
98          ;;
99     uxpv*)
100         MACHINE=VPP5000
101          ;;
102     *)
103         MACHINE=
104          host_os_novers=$host_os
105          ;;
106 esac
107
108 case $host_cpu in
109     ia64*)
110         MACHINE="PCLINUX64"
111         ;;
112 esac
113
114 PLATFORM_INCLUDES=" -D$MACHINE "
115
116 ])dnl