From 4395d0a180977796a13ecf907422597e857cebd4 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 28 Aug 2006 13:54:50 +0000 Subject: [PATCH] Consider OCCT version --- salome_adm/unix/config_files/check_cas.m4 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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" -- 2.39.2