From 8cbc5af87a607add648cdf96965f43b42e853c19 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 4 Oct 2007 08:14:29 +0000 Subject: [PATCH] Improve check of Qt and PyQt products --- adm_local/unix/config_files/check_pyqt.m4 | 4 ++++ adm_local/unix/config_files/check_qt.m4 | 7 +++---- adm_local/unix/make_commence.in | 3 ++- src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile.in | 17 ----------------- src/SALOME_PYQT/SalomePyQt/Makefile.in | 14 -------------- 5 files changed, 9 insertions(+), 36 deletions(-) diff --git a/adm_local/unix/config_files/check_pyqt.m4 b/adm_local/unix/config_files/check_pyqt.m4 index e07ead615..f63479879 100644 --- a/adm_local/unix/config_files/check_pyqt.m4 +++ b/adm_local/unix/config_files/check_pyqt.m4 @@ -312,12 +312,16 @@ else CXXFLAGS=$CXXFLAGS_old LIBS=$LIBS_old fi +# get latest Qt version supported +QT_VERS=`grep -e "[[[:space:]]]*Qt_[[[:digit:]_]]\+}" ${PYQT_SIPS}/versions.sip | sed -e "s/\(.*\)[[[:space:]]]*\(Qt_[[[:digit:]_]]\+\)}/\2/g"` +AC_MSG_RESULT(Latest Qt version supported by PyQt is $QT_VERS) AC_SUBST(PYQT_INCLUDES) AC_SUBST(PYQT_LIBS) AC_SUBST(PYQT_SIPS) AC_SUBST(PYUIC) AC_SUBST(PYQT_SIPFLAGS) +AC_SUBST(QT_VERS) AC_LANG_RESTORE diff --git a/adm_local/unix/config_files/check_qt.m4 b/adm_local/unix/config_files/check_qt.m4 index ab5348319..1aea9c3a2 100644 --- a/adm_local/unix/config_files/check_qt.m4 +++ b/adm_local/unix/config_files/check_qt.m4 @@ -48,9 +48,8 @@ else qt_inc_ok=no QTINC="" AC_CHECK_FILE(${QTDIR}/include/qt3/qglobal.h,QTINC="/qt3",QTINC="") - QT_VERS=`grep "QT_VERSION_STR" ${QTDIR}/include${QTINC}/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'` - AC_MSG_RESULT(Qt version is $QT_VERS) - QT_VERS="Qt_"`echo $QT_VERS | sed -e 's%\"%%g' -e 's%\.%_%g'` + QT_VERSION=`grep "QT_VERSION_STR" ${QTDIR}/include${QTINC}/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'` + AC_MSG_RESULT(Qt version is $QT_VERSION) fi if test "x$qt_ok" = "xyes" @@ -169,7 +168,7 @@ AC_SUBST(QT_INCLUDES) AC_SUBST(QT_MT_INCLUDES) AC_SUBST(QT_LIBS) AC_SUBST(QT_MT_LIBS) -AC_SUBST(QT_VERS) +AC_SUBST(QT_VERSION) AC_LANG_RESTORE diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index b3af3f710..af372d3ab 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -73,7 +73,7 @@ QT_INCLUDES = @QT_INCLUDES@ QT_MT_INCLUDES = @QT_INCLUDES@ -DQT_THREAD_SUPPORT QT_LIBS = @QT_LIBS@ QT_MT_LIBS = @QT_MT_LIBS@ -QT_VERS = @QT_VERS@ +QT_VERSION = @QT_VERSION@ MOC = @MOC@ UIC = @UIC@ @@ -98,6 +98,7 @@ PYQT_LIBS = @PYQT_LIBS@ PYQT_INCLUDES = @PYQT_INCLUDES@ PYUIC = @PYUIC@ PYQT_SIPFLAGS = @PYQT_SIPFLAGS@ +QT_VERS = @QT_VERS@ # openGL OGL_INCLUDES=@OGL_INCLUDES@ diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile.in b/src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile.in index bf628703b..f6c1bab2a 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile.in +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile.in @@ -30,23 +30,6 @@ top_builddir=$(shell (cd ../../..;pwd)) @COMMENCE@ -# small trick for Mandrake-10.1: PyQt 3.13 does not support Qt 3.3.3 -ifeq ($(QT_VERS),Qt_3_3_3) -QT_VERS = Qt_3_3_0 -endif - -ifeq ($(QT_VERS),Qt_3_3_4) -QT_VERS = Qt_3_3_0 -endif - -ifeq ($(QT_VERS),Qt_3_3_6) -QT_VERS = Qt_3_3_0 -endif - -ifeq ($(QT_VERS),Qt_3_3_7) -QT_VERS = Qt_3_3_0 -endif - # Sip flags SIP_FLAGS = -t WS_X11 -t $(QT_VERS) $(PYQT_SIPFLAGS) -s ".cc" -c . -I $(PYQT_SIPS) diff --git a/src/SALOME_PYQT/SalomePyQt/Makefile.in b/src/SALOME_PYQT/SalomePyQt/Makefile.in index 3f0834c8f..c3fe8fa9d 100644 --- a/src/SALOME_PYQT/SalomePyQt/Makefile.in +++ b/src/SALOME_PYQT/SalomePyQt/Makefile.in @@ -28,20 +28,6 @@ VPATH=.:@srcdir@:@top_srcdir@/idl @COMMENCE@ -# small trick for Mandrake-10.1: PyQt 3.13 does not support Qt 3.3.3 -ifeq ($(QT_VERS),Qt_3_3_3) -QT_VERS = Qt_3_3_0 -endif -ifeq ($(QT_VERS),Qt_3_3_4) -QT_VERS = Qt_3_3_0 -endif -ifeq ($(QT_VERS),Qt_3_3_6) -QT_VERS = Qt_3_3_0 -endif -ifeq ($(QT_VERS),Qt_3_3_7) -QT_VERS = Qt_3_3_0 -endif - # Sip flags SIP_FLAGS = -t WS_X11 -t $(QT_VERS) $(PYQT_SIPFLAGS) -s ".cc" -c . -I $(PYQT_SIPS) -- 2.39.2