From 2e71506ceb513b72475856ff6a4b710aac7a9a2a Mon Sep 17 00:00:00 2001 From: caremoli Date: Fri, 21 Jan 2005 14:09:19 +0000 Subject: [PATCH] CCAR: Modifiactions to make KERNEL compile with g++ 3.3 (standard ISO) and to make Salome able to use PyQt 3.11 (+sip 3.10.1) as a prerequisite. Modification to check_boost is not mandatory Modification to QAD_FileDlg.h is already in the main trunk. --- salome_adm/unix/config_files/check_boost.m4 | 2 +- salome_adm/unix/config_files/check_sip.m4 | 44 +++++++++++++++------ salome_adm/unix/make_commence.in | 1 + src/Logger/SALOME_Trace.hxx | 3 +- src/SALOMEDS/SALOMEDS_SObject_i.cxx | 12 ++++-- src/SALOMEGUI/QAD_FileDlg.h | 7 ++++ src/SALOME_PYQT/Makefile.in | 12 ++++-- 7 files changed, 60 insertions(+), 21 deletions(-) diff --git a/salome_adm/unix/config_files/check_boost.m4 b/salome_adm/unix/config_files/check_boost.m4 index 789167b4c..fd04b76d1 100644 --- a/salome_adm/unix/config_files/check_boost.m4 +++ b/salome_adm/unix/config_files/check_boost.m4 @@ -37,7 +37,7 @@ else AC_CHECKING(for boost/shared_ptr.hpp header file) dnl BOOST headers CPPFLAGS_old="${CPPFLAGS}" - BOOST_CPPFLAGS="-I${BOOSTDIR}" + BOOST_CPPFLAGS="-I${BOOSTDIR}/include" CPPFLAGS="${CPPFLAGS} ${BOOST_CPPFLAGS}" AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no) diff --git a/salome_adm/unix/config_files/check_sip.m4 b/salome_adm/unix/config_files/check_sip.m4 index 48a025918..84c2beaf7 100644 --- a/salome_adm/unix/config_files/check_sip.m4 +++ b/salome_adm/unix/config_files/check_sip.m4 @@ -21,42 +21,51 @@ else version=`sip -V` case "$version" in 3.2*) - sip_vers=old ;; + SIP_VERS=old ;; 3.3*) - sip_vers=old ;; + SIP_VERS=old ;; 3.4*) - sip_vers=new ;; + SIP_VERS=new ;; 3.5*) - sip_vers=new ;; + SIP_VERS=new ;; 3.6*) - sip_vers=new ;; + SIP_VERS=new ;; 3.7*) - sip_vers=new ;; + SIP_VERS=new ;; 3.8*) - sip_vers=new ;; + SIP_VERS=new ;; 3.9*) - sip_vers=new ;; - *) - sip_vers=no ;; + SIP_VERS=new ;; + 3.10*) + SIP_VERS=new2 ;; + *) + AC_MSG_RESULT(sip version $version not supported) + SIP_VERS=no ;; esac sip_ok=no - if test "x$sip_vers" = "xold" + if test "x$SIP_VERS" = "xold" then + dnl old install : includes and libs are in python install or in SIPDIR + AC_MSG_RESULT(old install detected) sip_ok=yes SIP_ROOT="$SIPDIR" SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}" SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -L${SIPDIR} -lsip" fi - if test "x$sip_vers" = "xnew" + if test "x$SIP_VERS" = "xnew" then sip_ok=yes if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then + AC_MSG_RESULT(new install with include dir detected) + dnl new install with include dir : includes and libs are in python install or in SIPDIR/include SIP_ROOT="$SIPDIR" SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include/python${PYTHON_VERSION}" SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip" else + dnl new install without include dir : includes and libs are in SIPDIR + AC_MSG_RESULT(new install without include dir detected) sip_ok=yes SIP_ROOT="$SIPDIR" SIP_INCLUDES="-I${SIPDIR}" @@ -64,11 +73,22 @@ else fi fi + if test "x$SIP_VERS" = "xnew2" + then + dnl new2 install : includes and libs are in python install + AC_MSG_RESULT(new2 install detected) + sip_ok=yes + AC_CHECK_FILE($PYTHON_PREFIX/include/python$PYTHON_VERSION/sip.h,sip_ok=$sip_ok,sip_ok=no) + SIP_INCLUDES="${PYTHON_INCLUDES}" + AC_CHECK_FILE($PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages/libsip.so,sip_ok=$sip_ok,sip_ok=no) + SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -lsip" + fi fi AC_SUBST(SIP) AC_SUBST(SIP_INCLUDES) AC_SUBST(SIP_LIBS) +AC_SUBST(SIP_VERS) AC_MSG_RESULT(for sip: $sip_ok) diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/make_commence.in index 77747e2b8..2fcfbfc77 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/make_commence.in @@ -88,6 +88,7 @@ QWT_LIBS=@QWT_LIBS@ SIP = @SIP@ SIP_INCLUDES = @SIP_INCLUDES@ SIP_LIBS = @SIP_LIBS@ +SIP_VERS = @SIP_VERS@ # PYQT PYQT_SIPS = @PYQT_SIPS@ diff --git a/src/Logger/SALOME_Trace.hxx b/src/Logger/SALOME_Trace.hxx index e0019a1f5..31c870b83 100644 --- a/src/Logger/SALOME_Trace.hxx +++ b/src/Logger/SALOME_Trace.hxx @@ -11,7 +11,8 @@ #if !defined(AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_) #define AFX_LOGGER_H__96F2A3AB_F6F8_11D6_BFA6_000476A0958C__INCLUDED_ -#include +// CCAR : g++ 3.3 #include +#include #include "Logger.hh" //these declarations for files don't using OCC includes (for example HDF) diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index 62b2f3d89..92f45b1a9 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -188,7 +188,8 @@ namespace SALOMEDS{ TAttrID2FunMap::const_iterator anEnd = __AttrID2FunMap__.end(); for(; anIter != anEnd; anIter++){ const TAttrID2FunMap::key_type& aKey = anIter->first; - const TAttrID2FunMap::data_type& aValue = anIter->second; + const TAttrID2FunMap::mapped_type& aValue = anIter->second; + //const TAttrID2FunMap::data_type& aValue = anIter->second; __GUID2AttrIDMap__[aValue.myGetGUID()] = aKey; }; @@ -223,7 +224,8 @@ namespace SALOMEDS{ { TAttrID2FunMap::const_iterator anIter = __AttrID2FunMap__.find(theType); if(anIter != __AttrID2FunMap__.end()){ - const TAttrID2FunMap::data_type& aValue = anIter->second; + const TAttrID2FunMap::mapped_type& aValue = anIter->second; + //const TAttrID2FunMap::data_type& aValue = anIter->second; return aValue.myGetGUID(); } // create tree node GUID by name @@ -567,7 +569,8 @@ SALOMEDS_SObject_i::_CreateGenAttribute(const Handle(TDF_Attribute)& theAttr, TAttrID2FunMap::const_iterator anIter = __AttrID2FunMap__.find(theType); if(anIter != __AttrID2FunMap__.end()){ - const TAttrID2FunMap::data_type& aValue = anIter->second; + const TAttrID2FunMap::mapped_type& aValue = anIter->second; + //const TAttrID2FunMap::data_type& aValue = anIter->second; if(aValue.myIsCheckLockedStudy()) _study->CheckLocked(); @@ -646,7 +649,8 @@ Handle(TDF_Attribute) Handle(TDF_Attribute) anAttr; TAttrID2FunMap::const_iterator anIter = __AttrID2FunMap__.find(theType); if(anIter != __AttrID2FunMap__.end()){ - const TAttrID2FunMap::data_type& aValue = anIter->second; + const TAttrID2FunMap::mapped_type& aValue = anIter->second; + //const TAttrID2FunMap::data_type& aValue = anIter->second; if(aValue.myIsCheckLockedStudy()) _study->CheckLocked(); diff --git a/src/SALOMEGUI/QAD_FileDlg.h b/src/SALOMEGUI/QAD_FileDlg.h index a604596a5..e7180753e 100644 --- a/src/SALOMEGUI/QAD_FileDlg.h +++ b/src/SALOMEGUI/QAD_FileDlg.h @@ -14,7 +14,14 @@ #include +// VSR (18/01/2005): use patched QFileDialog only for the official 3.0.5 version of Qt +#if QT_VERSION == 0x030005 #include +#else +#include +#define QFileDialogP QFileDialog +#endif + #include "QAD.h" #include "QAD_FileValidator.h" diff --git a/src/SALOME_PYQT/Makefile.in b/src/SALOME_PYQT/Makefile.in index 7c1de51a1..15a0704bc 100644 --- a/src/SALOME_PYQT/Makefile.in +++ b/src/SALOME_PYQT/Makefile.in @@ -34,12 +34,18 @@ SIP_SRC=$(CURDIR)/SalomePyQtcmodule.cc \ $(CURDIR)/sipSalomePyQtSalomePyQt.cc \ $(CURDIR)/sipSalomePyQtSALOME_Selection.cc +ifeq ($(SIP_VERS),new2) +MOC_SRC = SalomePyQtcmodule_moc.cxx +MOC_H = SalomePyQtcmodule.h +else +MOC_SRC = sipSalomePyQtProxySalomePyQt_moc.cxx +MOC_H = sipSalomePyQtProxySalomePyQt.h +endif + # Libraries targets LIB = libSalomePyQtcmodule.la -MOC_SRC = sipSalomePyQtProxySalomePyQt_moc.cxx - LIB_SRC += SalomePyQt.cxx SALOME_PYQT_GUI.cxx $(SIP_SRC) $(MOC_SRC) LIB_MOC = SALOME_PYQT_GUI.h @@ -59,7 +65,7 @@ LDFLAGS+= -lSalomeGUI -lqtcmodule $(SIP_SRC): $(SIP_FILES) $(SIP) $(SIP_FLAGS) $< -$(MOC_SRC): sipSalomePyQtProxySalomePyQt.h +$(MOC_SRC): $(MOC_H) $(MOC) $< -o $@ @CONCLUDE@ -- 2.39.2