]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix bug PAL10043
authorvsr <vsr@opencascade.com>
Thu, 22 Sep 2005 06:32:35 +0000 (06:32 +0000)
committervsr <vsr@opencascade.com>
Thu, 22 Sep 2005 06:32:35 +0000 (06:32 +0000)
salome_adm/unix/config_files/check_pyqt.m4
salome_adm/unix/config_files/check_sip.m4
salome_adm/unix/make_commence.in

index 573ebc44f41e0090a368eeb6084e39c7a74773a4..ee024efaf8fc2c8caa136b4e12028a1dfe9d430c 100644 (file)
@@ -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 <qcdestyle.h>],
+                 [new QCDEStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_CDE")
+  AC_TRY_COMPILE([#include <qinterlacestyle.h>],
+                 [new QInterlaceStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_INTERLACE")
+  AC_TRY_COMPILE([#include <qmotifstyle.h>],
+                 [new QMotifStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIF")
+  AC_TRY_COMPILE([#include <qmotifplusstyle.h>],
+                 [new QMotifPlusStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_MOTIFPLUS")
+  AC_TRY_COMPILE([#include <qplatinumstyle.h>],
+                 [new QPlatinumStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_PLATINUM")
+  AC_TRY_COMPILE([#include <qsgistyle.h>],
+                 [new QSGIStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_SGI")
+  AC_TRY_COMPILE([#include <qwindowsstyle.h>],
+                 [new QWindowsStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWS")
+  AC_TRY_COMPILE([#include <qwindowsxpstyle.h>],
+                 [new QWindowsXPStyle();],,PYQT_SIPFLAGS="$PYQT_SIPFLAGS -x Qt_STYLE_WINDOWSXP")
+
+  LIBS="$LIBS -lqassistantclient"
+  AC_TRY_LINK([#include <qassistantclient.h>],
+              [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)
 
index dde9bc31f2d398e4d69f0b802ebd6a74c261614c..245f2382ee200c658920e7c611dfef42445ea64a 100644 (file)
@@ -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 ;;
index 9137541aff2f1e7e16a461c32becf65608642ebc..591a7012703fe2b9ba9ed80496c0b05c428d33b9 100644 (file)
@@ -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@