]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Adding support for native products of recent Linux Distribs :
authornge <nge>
Mon, 7 Sep 2009 09:25:12 +0000 (09:25 +0000)
committernge <nge>
Mon, 7 Sep 2009 09:25:12 +0000 (09:25 +0000)
- Debian Sid (07 sept 2009)
- (K)Ubuntu 9.04

adm_local/unix/config_files/check_pyqt.m4
adm_local/unix/config_files/check_qwt.m4
adm_local/unix/config_files/check_sip.m4

index 9f201a915893b8f64979aa0c98c4afc3179e90ab..f72d4e3411c4417517a44d0113dfdd85cac0754a 100644 (file)
@@ -148,6 +148,8 @@ if test "x$pyqt_ok" == "xyes" ; then
     fi
     TEST_LIB_DIRS="${TEST_LIB_DIRS} /usr/lib${LIB_LOCATION_SUFFIX} /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
     TEST_LIB_DIRS="${TEST_LIB_DIRS} /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages/PyQt4"
+    TEST_LIB_DIRS="${TEST_LIB_DIRS} /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/dist-packages/PyQt4"
+    TEST_LIB_DIRS="${TEST_LIB_DIRS} /usr/lib${LIB_LOCATION_SUFFIX}/pymodules/python${PYTHON_VERSION}/PyQt4"
     TEST_SIPS_DIRS="${TEST_SIPS_DIRS} /usr/share/sip"
     TEST_SIPS_DIRS="${TEST_SIPS_DIRS} /usr/share/sip/PyQt4"
 
@@ -214,4 +216,3 @@ AC_MSG_RESULT(for pyqt: $pyqt_ok)
 ])dnl
 dnl
 
-
index c62506993e6b1203f8d81038fd442c8027a5e530..d80642511b95fa41a2a955a509f5aa5f7a1f5d54 100644 (file)
@@ -44,15 +44,23 @@ AC_ARG_WITH(qwt_inc,
       AC_MSG_RESULT("select $withval as path to QWT includes")
     ])
 
+libqwt_name=qwt
 if test -z $QWTHOME; then
   AC_MSG_RESULT(QWTHOME not defined)
   exist_ok=no  
   if test "x$exist_ok" = "xno"; then
-     for d in /usr/local /usr ; do
-        AC_CHECK_FILE(${d}/lib${LIB_LOCATION_SUFFIX}/libqwt.so,exist_ok=yes,exist_ok=no)
+     for d in /usr /usr/local ; do
+        for extension in qwt qwt-qt4; do
+           AC_CHECK_FILE(${d}/lib${LIB_LOCATION_SUFFIX}/lib${extension}.so,exist_ok=yes,exist_ok=no)
+           if test "x$exist_ok" = "xyes"; then
+              QWTHOME=$d
+              AC_MSG_RESULT(lib${extension}.so detected in $d/lib)
+              libqwt_name=${extension}
+              dnl  No break here, libqwt-qt4.so is choosen even if libqwt.so is present: if 2 are present, in most of cases, libqwt.so is Qt3 version.
+           fi
+        done
         if test "x$exist_ok" = "xyes"; then
-           QWTHOME=$d
-           AC_MSG_RESULT(libqwt.so detected in $d/lib)
+           break
         fi
      done
   fi
@@ -76,6 +84,9 @@ if test -z $QWTHOME; then
         if test ! -f $QWT_INCDIR/qwt.h ; then
           QWT_INCDIR=/usr/lib/qt4/include/qwt
         fi
+        if test ! -f $QWT_INCDIR/qwt.h ; then
+          QWT_INCDIR=/usr/include/qwt-qt4
+        fi
      fi
   else
      qwt_ok=no
@@ -116,9 +127,9 @@ else
     LIBS_old=$LIBS
     LIBS="$LIBS $QT_LIBS"
     if test "x$QWTHOME" = "x/usr" ; then
-      LIBS="$LIBS -lqwt"
+      LIBS="$LIBS -l${libqwt_name}"
     else
-      LIBS="$LIBS -L$QWTHOME/lib -lqwt"
+      LIBS="$LIBS -L$QWTHOME/lib -l${libqwt_name}"
     fi
 
     CXXFLAGS_old=$CXXFLAGS
@@ -145,9 +156,9 @@ else
     else
       AC_MSG_RESULT(yes)
       if test "x$QWTHOME" = "x/usr" ; then
-        QWT_LIBS=" -lqwt"
+        QWT_LIBS=" -l${libqwt_name}"
       else
-        QWT_LIBS="-L$QWTHOME/lib -lqwt"
+        QWT_LIBS="-L$QWTHOME/lib -l${libqwt_name}"
       fi
     fi
 
index 464bdfd7eb8b47fcf2e24b2613fa67d87f49f449..29388c3610f0b2ad8ca625d611bb11a4d5e2fa8b 100644 (file)
@@ -71,7 +71,8 @@ if test "x$sip_ok" = "xyes" ; then
     fi
     TEST_INC_DIRS="${TEST_INC_DIRS} /usr/include /usr/include/python${PYTHON_VERSION}"
     TEST_LIB_DIRS="${TEST_LIB_DIRS} /usr/lib${LIB_LOCATION_SUFFIX} /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/site-packages"
-
+    TEST_LIB_DIRS="${TEST_LIB_DIRS} /usr/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/dist-packages/PyQt4"
+    TEST_LIB_DIRS="${TEST_LIB_DIRS} /usr/lib${LIB_LOCATION_SUFFIX}/pymodules/python${PYTHON_VERSION}"
     dnl Search sip.h file
     sip_ok=no
     for d in ${TEST_INC_DIRS} ; do