From 15016fb09b6170c44c662b1e14f6fdd8b684909b Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 14 Jun 2005 06:28:49 +0000 Subject: [PATCH] Patches from Paul for Debian --- salome_adm/unix/config_files/check_hdf5.m4 | 7 ++++- salome_adm/unix/config_files/check_lam.m4 | 7 ++++- salome_adm/unix/config_files/check_lsf.m4 | 7 ++++- salome_adm/unix/config_files/check_med2.m4 | 7 ++++- salome_adm/unix/config_files/check_mico.m4 | 7 ++++- salome_adm/unix/config_files/check_mpi.m4 | 7 ++++- salome_adm/unix/config_files/check_mpich.m4 | 7 ++++- salome_adm/unix/config_files/check_omniorb.m4 | 7 ++++- salome_adm/unix/config_files/check_opengl.m4 | 21 +++++++++++-- salome_adm/unix/config_files/check_openpbs.m4 | 7 ++++- salome_adm/unix/config_files/check_pyqt.m4 | 28 ++++++++++++++--- salome_adm/unix/config_files/check_qt.m4 | 30 ++++++++++++++----- salome_adm/unix/config_files/check_qwt.m4 | 24 ++++++++++++--- salome_adm/unix/config_files/check_sip.m4 | 14 +++++++-- salome_adm/unix/config_files/check_vtk.m4 | 5 ++++ src/PatchQt/qfiledialogP.cxx | 3 +- src/SALOME_PYQT/Makefile.in | 3 ++ 17 files changed, 159 insertions(+), 32 deletions(-) diff --git a/salome_adm/unix/config_files/check_hdf5.m4 b/salome_adm/unix/config_files/check_hdf5.m4 index b3658afc1..b20db13ac 100644 --- a/salome_adm/unix/config_files/check_hdf5.m4 +++ b/salome_adm/unix/config_files/check_hdf5.m4 @@ -48,7 +48,12 @@ then AC_MSG_WARN(undefined HDF5HOME variable which specify hdf5 installation directory) else LOCAL_INCLUDES="-I$HDF5HOME/include" - LOCAL_LIBS="-L$HDF5HOME/lib" + if test "x$HDF5HOME" = "x/usr" + then + LOCAL_LIBS="" + else + LOCAL_LIBS="-L$HDF5HOME/lib" + fi fi dnl hdf5 headers diff --git a/salome_adm/unix/config_files/check_lam.m4 b/salome_adm/unix/config_files/check_lam.m4 index 9a303a054..994a2b0a5 100644 --- a/salome_adm/unix/config_files/check_lam.m4 +++ b/salome_adm/unix/config_files/check_lam.m4 @@ -41,7 +41,12 @@ if test "$WITHLAM" = yes; then if test "$LAM_HOME"; then MPI_INCLUDES="-I$LAM_HOME/include" - MPI_LIBS="-L$LAM_HOME/lib" + if test "x$LAM_HOME" = "x/usr" + then + MPI_LIBS="" + else + MPI_LIBS="-L$LAM_HOME/lib" + fi fi CPPFLAGS_old="$CPPFLAGS" diff --git a/salome_adm/unix/config_files/check_lsf.m4 b/salome_adm/unix/config_files/check_lsf.m4 index 5fb9e0b10..4e448bafa 100755 --- a/salome_adm/unix/config_files/check_lsf.m4 +++ b/salome_adm/unix/config_files/check_lsf.m4 @@ -43,7 +43,12 @@ AC_DEFUN([CHECK_LSF], dnl LIB directory - LSF_LDFLAGS="-L${LSF_LIBDIR}" + if test "x${LSF_LIBDIR}" = "x/usr/lib" + then + LSF_LDFLAGS="" + else + LSF_LDFLAGS="-L${LSF_LIBDIR}" + fi LSF_LIBS="" saved_LDFLAGS=${LDFLAGS} saved_LIBS=${LIBS} diff --git a/salome_adm/unix/config_files/check_med2.m4 b/salome_adm/unix/config_files/check_med2.m4 index 3b8fd9f8d..07d100bfa 100644 --- a/salome_adm/unix/config_files/check_med2.m4 +++ b/salome_adm/unix/config_files/check_med2.m4 @@ -53,7 +53,12 @@ then AC_MSG_WARN(undefined MED2HOME variable which specify med2 installation directory) else LOCAL_INCLUDES="$HDF5_INCLUDES -I$MED2HOME/include" - LOCAL_LIBS="-L$MED2HOME/lib -lmed $HDF5_LIBS" + if test "x$MED2HOME" = "x/usr" + then + LOCAL_LIBS="-lmed $HDF5_LIBS" + else + LOCAL_LIBS="-L$MED2HOME/lib -lmed $HDF5_LIBS" + fi fi dnl check med2 header diff --git a/salome_adm/unix/config_files/check_mico.m4 b/salome_adm/unix/config_files/check_mico.m4 index b839d1e5c..5d97e2aa1 100644 --- a/salome_adm/unix/config_files/check_mico.m4 +++ b/salome_adm/unix/config_files/check_mico.m4 @@ -84,7 +84,12 @@ fi if test "x$mico_ok" = "xyes" then - MICO_LDFLAGS="-L$MICO_LIB" + if test "x$MICO_LIB" = "x/usr/lib" + then + MICO_LDFLAGS="" + else + MICO_LDFLAGS="-L$MICO_LIB" + fi LIBS_old=$LIBS MICO_LIBS="$MICO_LDFLAGS -lmico$MICO_VERSION -ldl" diff --git a/salome_adm/unix/config_files/check_mpi.m4 b/salome_adm/unix/config_files/check_mpi.m4 index d746ac055..e8255a2e4 100644 --- a/salome_adm/unix/config_files/check_mpi.m4 +++ b/salome_adm/unix/config_files/check_mpi.m4 @@ -41,7 +41,12 @@ if test "$WITHMPI" = yes; then if test "x$withval" != "xyes"; then MPI_HOME=$withval MPI_INCLUDES="-I$MPI_HOME/include" - MPI_LIBS="-L$MPI_HOME/lib" + if test "x$MPI_HOME" = "x/usr" + then + MPI_LIBS="" + else + MPI_LIBS="-L$MPI_HOME/lib" + fi fi CPPFLAGS_old="$CPPFLAGS" diff --git a/salome_adm/unix/config_files/check_mpich.m4 b/salome_adm/unix/config_files/check_mpich.m4 index de0e6d50a..c5971aa35 100644 --- a/salome_adm/unix/config_files/check_mpich.m4 +++ b/salome_adm/unix/config_files/check_mpich.m4 @@ -41,7 +41,12 @@ if test "$WITHMPICH" = yes; then if test "$MPICH_HOME"; then MPI_INCLUDES="-I$MPICH_HOME/include" - MPI_LIBS="-L$MPICH_HOME/lib" + if test "x$MPICH_HOME" = "x/usr" + then + MPI_LIBS="" + else + MPI_LIBS="-L$MPICH_HOME/lib" + fi fi CPPFLAGS_old="$CPPFLAGS" diff --git a/salome_adm/unix/config_files/check_omniorb.m4 b/salome_adm/unix/config_files/check_omniorb.m4 index f3d5abcdb..1f63365bf 100644 --- a/salome_adm/unix/config_files/check_omniorb.m4 +++ b/salome_adm/unix/config_files/check_omniorb.m4 @@ -99,7 +99,12 @@ dnl omniORB_ok=yes if test "x$omniORB_ok" = "xyes" then - OMNIORB_LDFLAGS="-L$OMNIORB_LIB" + if test "x$OMNIORB_LIB" = "x/usr/lib" + then + OMNIORB_LDFLAGS="" + else + OMNIORB_LDFLAGS="-L$OMNIORB_LIB" + fi LIBS_old=$LIBS LIBS="$LIBS $OMNIORB_LDFLAGS -lomnithread" diff --git a/salome_adm/unix/config_files/check_opengl.m4 b/salome_adm/unix/config_files/check_opengl.m4 index ad1ccbd1e..dd43d25a0 100644 --- a/salome_adm/unix/config_files/check_opengl.m4 +++ b/salome_adm/unix/config_files/check_opengl.m4 @@ -49,7 +49,12 @@ if test "x$local_opengl" = "xyes" ; then if test -f "${opengl_dir}/include/GL/gl.h" ; then OpenGL_ok=yes OGL_INCLUDES="-I${opengl_dir}/include" - OGL_LIBS="-L${opengl_dir}/lib" + if test "x${opengl_dir}" = "x/usr" + then + OGL_LIBS="" + else + OGL_LIBS="-L${opengl_dir}/lib" + fi AC_MSG_RESULT(select OpenGL distribution in ${opengl_dir}) else AC_MSG_RESULT(no gl.h header file in ${opengl_dir}/include/GL) @@ -91,13 +96,23 @@ then for i in $dirs; do if test -r "$i/libGL.so"; then dnl AC_MSG_RESULT(in $i) - OGL_LIBS="-L$i" + if test "x$i" = "x/usr/lib" + then + OGL_LIBS="" + else + OGL_LIBS="-L$i" + fi break fi # under IRIX ? if test -r "$i/libGL.sl"; then dnl AC_MSG_RESULT(in $i) - OGL_LIBS="-L$i" + if test "x$i" = "x/usr/lib" + then + OGL_LIBS="" + else + OGL_LIBS="-L$i" + fi break fi done diff --git a/salome_adm/unix/config_files/check_openpbs.m4 b/salome_adm/unix/config_files/check_openpbs.m4 index 9598285c9..220528574 100644 --- a/salome_adm/unix/config_files/check_openpbs.m4 +++ b/salome_adm/unix/config_files/check_openpbs.m4 @@ -30,7 +30,12 @@ AC_DEFUN([CHECK_OPENPBS], CPPFLAGS=${saved_CPPFLAGS} AC_SUBST(OPENPBS_INCLUDES) - OPENPBS_LIBDIR="-L${OPENPBS}/lib" + if test "x${OPENPBS}" = "x/usr" + then + OPENPBS_LIBDIR="" + else + OPENPBS_LIBDIR="-L${OPENPBS}/lib" + fi OPENPBS_LIBS="-lpbs" saved_LDFLAGS=${LDFLAGS} saved_LIBS=${LIBS} diff --git a/salome_adm/unix/config_files/check_pyqt.m4 b/salome_adm/unix/config_files/check_pyqt.m4 index f16a4df7e..573ebc44f 100644 --- a/salome_adm/unix/config_files/check_pyqt.m4 +++ b/salome_adm/unix/config_files/check_pyqt.m4 @@ -84,11 +84,21 @@ if test "x${PYQTDIR}" != "x"; then dnl try {PYQTDIR} AC_CHECK_FILE(${PYQTDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${PYQTDIR} -lqtcmodule" + if test "x${PYQTDIR}" = "x/usr/lib" + then + PYQT_LIBS="-lqtcmodule" + else + PYQT_LIBS="-L${PYQTDIR} -lqtcmodule" + fi else AC_CHECK_FILE(${PYQTDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${PYQTDIR}" + if test "x${PYQTDIR}" = "x/usr/lib" + then + PYQT_LIBS="" + else + PYQT_LIBS="-L${PYQTDIR}" + fi fi fi if test "x$pyqt_lib_ok" == "xno"; then @@ -126,11 +136,21 @@ if test "x$pyqt_lib_ok" == "xno"; then if test -d ${SIPDIR} ; then AC_CHECK_FILE(${SIPDIR}/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${SIPDIR} -lqtcmodule" + if test "x${SIPDIR}" = "x/usr/lib" + then + PYQT_LIBS="-lqtcmodule" + else + PYQT_LIBS="-L${SIPDIR} -lqtcmodule" + fi else AC_CHECK_FILE(${SIPDIR}/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no) if test "x$pyqt_lib_ok" == "xyes"; then - PYQT_LIBS="-L${SIPDIR}" + if test "x${SIPDIR}" = "x/usr/lib" + then + PYQT_LIBS="" + else + PYQT_LIBS="-L${SIPDIR}" + fi fi fi fi diff --git a/salome_adm/unix/config_files/check_qt.m4 b/salome_adm/unix/config_files/check_qt.m4 index 1e4d90ad6..3faa1e990 100644 --- a/salome_adm/unix/config_files/check_qt.m4 +++ b/salome_adm/unix/config_files/check_qt.m4 @@ -39,7 +39,10 @@ then qt_ok=no else AC_MSG_RESULT(QTDIR is $QTDIR) - QT_VERS=`grep "QT_VERSION_STR" ${QTDIR}/include/qglobal.h | sed -e 's%^#define QT_VERSION_STR\([[:space:]]*\)%%g' -e 's%\"%%g'` + 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'` fi @@ -86,7 +89,7 @@ QT_ROOT=$QTDIR if test "x$qt_ok" = "xyes" then CPPFLAGS_old=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$QTDIR/include" + CPPFLAGS="$CPPFLAGS -I$QTDIR/include${QTINC}" AC_LANG_CPLUSPLUS AC_CHECK_HEADER(qaction.h,qt_ok=yes ,qt_ok=no) @@ -101,8 +104,8 @@ then AC_MSG_RESULT(QTDIR environment variable may be wrong) else AC_MSG_RESULT(yes) - QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT" - QT_MT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT" + QT_INCLUDES="-I${QT_ROOT}/include${QTINC} -DQT_THREAD_SUPPORT" + QT_MT_INCLUDES="-I${QT_ROOT}/include${QTINC} -DQT_THREAD_SUPPORT" fi fi @@ -110,10 +113,15 @@ if test "x$qt_ok" = "xyes" then AC_MSG_CHECKING(linking qt library) LIBS_old=$LIBS - LIBS="$LIBS -L$QTDIR/lib -lqt-mt $OGL_LIBS" + if test "x$QTDIR" = "x/usr" + then + LIBS="$LIBS -lqt-mt $OGL_LIBS" + else + LIBS="$LIBS -L$QTDIR/lib -lqt-mt $OGL_LIBS" + fi CXXFLAGS_old=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -I$QTDIR/include" + CXXFLAGS="$CXXFLAGS $QT_INCLUDES" AC_CACHE_VAL(salome_cv_lib_qt,[ AC_TRY_LINK( @@ -132,8 +140,14 @@ then AC_MSG_RESULT(QTDIR environment variable may be wrong) else AC_MSG_RESULT(yes) - QT_LIBS="-L$QTDIR/lib -lqt-mt" - QT_MT_LIBS="-L$QTDIR/lib -lqt-mt" + if test "x$QTDIR" = "x/usr" + then + QT_LIBS=" -lqt-mt" + QT_MT_LIBS=" -lqt-mt" + else + QT_LIBS="-L$QTDIR/lib -lqt-mt" + QT_MT_LIBS="-L$QTDIR/lib -lqt-mt" + fi fi LIBS=$LIBS_old diff --git a/salome_adm/unix/config_files/check_qwt.m4 b/salome_adm/unix/config_files/check_qwt.m4 index c50835666..9cdc0a9d3 100644 --- a/salome_adm/unix/config_files/check_qwt.m4 +++ b/salome_adm/unix/config_files/check_qwt.m4 @@ -64,7 +64,7 @@ else AC_LANG_CPLUSPLUS CPPFLAGS_old=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$QWT_INCLUDES" - CPPFLAGS="$CPPFLAGS -I$QTDIR/include" + CPPFLAGS="$CPPFLAGS $QT_INCLUDES" AC_CHECK_HEADER(qwt.h,qwt_ok=yes,qwt_ok=no) @@ -81,10 +81,21 @@ if test "x$qwt_ok" = "xyes" then AC_MSG_CHECKING(linking qwt library) LIBS_old=$LIBS - LIBS="$LIBS -L$QTDIR/lib -lqt-mt -L$QWTHOME/lib -lqwt" + if test "x$QTDIR" = "x/usr" + then + LIBS="$LIBS -lqt-mt" + else + LIBS="$LIBS -L$QTDIR/lib -lqt-mt" + fi + if test "x$QWTHOME" = "x/usr/lib" + then + LIBS="$LIBS -lqwt" + else + LIBS="$LIBS -L$QWTHOME/lib -lqwt" + fi CXXFLAGS_old=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -I$QTDIR/include -I$QWT_INCLUDES" + CXXFLAGS="$CXXFLAGS $QT_INCLUDES -I$QWT_INCLUDES" AC_CACHE_VAL(salome_cv_lib_qwt,[ AC_TRY_LINK( @@ -106,7 +117,12 @@ then AC_MSG_RESULT(QWTHOME environment variable may be wrong) else QWT_INCLUDES="-I$QWT_INCLUDES" - QWT_LIBS="-L$QWTHOME/lib -lqwt" + if test "x$QWTHOME" = "x/usr/lib" + then + QWT_LIBS=" -lqwt" + else + QWT_LIBS="-L$QWTHOME/lib -lqwt" + fi AC_SUBST(QWT_INCLUDES) AC_SUBST(QWT_LIBS) diff --git a/salome_adm/unix/config_files/check_sip.m4 b/salome_adm/unix/config_files/check_sip.m4 index 3fe220f56..dde9bc31f 100644 --- a/salome_adm/unix/config_files/check_sip.m4 +++ b/salome_adm/unix/config_files/check_sip.m4 @@ -89,11 +89,21 @@ else dnl look for (lib)sip.so in ${SIPDIR} AC_CHECK_FILE(${SIPDIR}/libsip.so,sip_lib_ok=yes,sip_lib_ok=no) if test "x$sip_lib_ok" == "xyes" ; then - SIP_LIBS="-L${SIPDIR} -lsip" + if test "x${SIPDIR}" = "x/usr/lib" + then + SIP_LIBS="-lsip" + else + SIP_LIBS="-L${SIPDIR} -lsip" + fi else AC_CHECK_FILE(${SIPDIR}/sip.so,sip_lib_ok=yes,sip_lib_ok=no) if test "x$sip_lib_ok" == "xyes" ; then - SIP_LIBS="-L${SIPDIR}" + if test "x${SIPDIR}" = "x/usr/lib" + then + SIP_LIBS="" + else + SIP_LIBS="-L${SIPDIR}" + fi fi fi diff --git a/salome_adm/unix/config_files/check_vtk.m4 b/salome_adm/unix/config_files/check_vtk.m4 index 4b4b1454f..3f46f41ba 100644 --- a/salome_adm/unix/config_files/check_vtk.m4 +++ b/salome_adm/unix/config_files/check_vtk.m4 @@ -55,6 +55,11 @@ else LXLIB="" fi +if test "x$x_libraries" = "x/usr/lib" +then + LXLIB="" +fi + LOCAL_INCLUDES="$OGL_INCLUDES" LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS $LXLIB -lX11 -lXt" TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS $LXLIB -lX11 -lXt" diff --git a/src/PatchQt/qfiledialogP.cxx b/src/PatchQt/qfiledialogP.cxx index e6aa9dbba..5a71ec597 100644 --- a/src/PatchQt/qfiledialogP.cxx +++ b/src/PatchQt/qfiledialogP.cxx @@ -41,8 +41,6 @@ ** **********************************************************************/ -#include "qplatformdefs.h" - // Solaris redefines connect -> __xnet_connect with _XOPEN_SOURCE_EXTENDED. #if defined(connect) #undef connect @@ -52,6 +50,7 @@ #if (QT_VERSION < 0x030303) +#include #include "qfiledialogP_moc.cxx" #ifndef QT_NO_FILEDIALOG diff --git a/src/SALOME_PYQT/Makefile.in b/src/SALOME_PYQT/Makefile.in index 31f04063d..5daa9a947 100644 --- a/src/SALOME_PYQT/Makefile.in +++ b/src/SALOME_PYQT/Makefile.in @@ -19,6 +19,9 @@ VPATH=.:@srcdir@:@top_srcdir@/idl 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 # Sip flags SIP_FLAGS = -t WS_X11 -t $(QT_VERS) -s ".cc" -c . -I $(PYQT_SIPS) -- 2.39.2