]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Consider OCCT version
authorjfa <jfa@opencascade.com>
Mon, 28 Aug 2006 13:54:50 +0000 (13:54 +0000)
committerjfa <jfa@opencascade.com>
Mon, 28 Aug 2006 13:54:50 +0000 (13:54 +0000)
salome_adm/unix/config_files/check_cas.m4

index c242775cc94211f9e2b95efb56ebb5d91f4247dd..cb7969a5181e13dc566d8061905d4e1fab0ef007 100644 (file)
@@ -107,6 +107,7 @@ else
   occ_ok=yes
   OCC_VERSION_MAJOR=0
   OCC_VERSION_MINOR=0
+  OCC_VERSION_MAINTENANCE=0
   ff=$CASROOT/inc/Standard_Version.hxx
   if test -f $ff ; then
     grep "define OCC_VERSION_MAJOR" $ff > /dev/null
@@ -117,6 +118,10 @@ else
     if test $? = 0 ; then
       OCC_VERSION_MINOR=`grep "define OCC_VERSION_MINOR" $ff | awk '{i=3 ; print $i}'`
     fi
+    grep "define OCC_VERSION_MAINTENANCE" $ff > /dev/null
+    if test $? = 0 ; then
+      OCC_VERSION_MAINTENANCE=`grep "define OCC_VERSION_MAINTENANCE" $ff | awk '{i=3 ; print $i}'`
+    fi
   fi
 fi
 
@@ -135,10 +140,21 @@ dnl cascade headers
   CPPFLAGS_old="$CPPFLAGS"
 case $host_os in
    linux*)
-      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DOCC_CONVERT_SIGNALS -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
+      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H"
+
+      OCC_VERSION_STRING="$OCC_VERSION_MAJOR.$OCC_VERSION_MINOR.$OCC_VERSION_MAINTENANCE"
+      case $OCC_VERSION_STRING in
+        [[0-5]].* | 6.0.* | 6.1.0) # catch versions < 6.1.1
+          CAS_CPPFLAGS="$CAS_CPPFLAGS -DNO_CXX_EXCEPTION"
+          ;;
+        *)
+          CAS_CPPFLAGS="$CAS_CPPFLAGS -DOCC_CONVERT_SIGNALS"
+          ;;
+      esac
+      CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc"
       ;;
    osf*)
-      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
+      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
       ;;
 esac
   CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS"