From a945d1523fefaf8a297e27fa24b640252c23c11f Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 22 Sep 2005 06:32:35 +0000 Subject: [PATCH] Fix bug PAL10043 --- salome_adm/unix/config_files/check_pyqt.m4 | 42 ++++++++++++++++++++++ salome_adm/unix/config_files/check_sip.m4 | 6 ++-- salome_adm/unix/make_commence.in | 1 + 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/salome_adm/unix/config_files/check_pyqt.m4 b/salome_adm/unix/config_files/check_pyqt.m4 index 573ebc44f..ee024efaf 100644 --- a/salome_adm/unix/config_files/check_pyqt.m4 +++ b/salome_adm/unix/config_files/check_pyqt.m4 @@ -5,6 +5,9 @@ AC_REQUIRE([CHECK_PYTHON])dnl AC_REQUIRE([CHECK_QT])dnl AC_REQUIRE([CHECK_SIP])dnl +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + AC_ARG_WITH(pyqt, [ --with-pyqt=DIR root directory path to PyQt installation ], [PYQTDIR="$withval" @@ -250,12 +253,51 @@ if test "x$pyqt_sips_ok" == "xno"; then pyqt_ok=no else PYQT_INCLUDES="-I$PYQT_SIPS" + + dnl Additional sip flags required for correct wrappers compilation + AC_MSG_CHECKING(which qt classes should be excluded) + + PYQT_SIPFLAGS="" + + CXXFLAGS_old=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $QT_INCLUDES" + LIBS_old=$LIBS + LIBS="$LIBS $QT_LIBS" + + AC_TRY_COMPILE([#include ], + [new QCDEStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_CDE") + AC_TRY_COMPILE([#include ], + [new QInterlaceStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_INTERLACE") + AC_TRY_COMPILE([#include ], + [new QMotifStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIF") + AC_TRY_COMPILE([#include ], + [new QMotifPlusStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIFPLUS") + AC_TRY_COMPILE([#include ], + [new QPlatinumStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_PLATINUM") + AC_TRY_COMPILE([#include ], + [new QSGIStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_SGI") + AC_TRY_COMPILE([#include ], + [new QWindowsStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWS") + AC_TRY_COMPILE([#include ], + [new QWindowsXPStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWSXP") + + LIBS="$LIBS -lqassistantclient" + AC_TRY_LINK([#include ], + [new QAssistantClient("foo");],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_ASSISTANTCLIENT") + + AC_MSG_RESULT(done) + + CXXFLAGS=$CXXFLAGS_old + LIBS=$LIBS_old fi AC_SUBST(PYQT_INCLUDES) AC_SUBST(PYQT_LIBS) AC_SUBST(PYQT_SIPS) AC_SUBST(PYUIC) +AC_SUBST(PYQT_SIPFLAGS) + +AC_LANG_RESTORE AC_MSG_RESULT(for pyqt: $pyqt_ok) diff --git a/salome_adm/unix/config_files/check_sip.m4 b/salome_adm/unix/config_files/check_sip.m4 index dde9bc31f..245f2382e 100644 --- a/salome_adm/unix/config_files/check_sip.m4 +++ b/salome_adm/unix/config_files/check_sip.m4 @@ -39,8 +39,10 @@ else SIP_VERS=v3_old ;; 3.10*) SIP_VERS=v3_new ;; - 4.*) - SIP_VERS=v4 ;; + 4.1*) + SIP_VERS=v4_old ;; + 4.2*) + SIP_VERS=v4_new ;; *) AC_MSG_RESULT(sip version $version not supported) SIP_VERS=unsupported ;; diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/make_commence.in index 9137541af..591a70127 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/make_commence.in @@ -101,6 +101,7 @@ PYQT_SIPS = @PYQT_SIPS@ PYQT_LIBS = @PYQT_LIBS@ PYQT_INCLUDES = @PYQT_INCLUDES@ PYUIC = @PYUIC@ +PYQT_SIPFLAGS = @PYQT_SIPFLAGS@ # openGL OGL_INCLUDES=@OGL_INCLUDES@ -- 2.39.2