From: jfa Date: Mon, 28 Aug 2006 13:54:50 +0000 (+0000) Subject: Consider OCCT version X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4395d0a180977796a13ecf907422597e857cebd4;p=modules%2Fkernel.git Consider OCCT version --- diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index c242775cc..cb7969a51 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -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"