AC_SUBST(CAS_DATAEXCHANGE)
AC_SUBST(CAS_LDFLAGS)
AC_SUBST(CAS_LDPATH)
+AC_SUBST(CAS_STDPLUGIN)
OWN_CONFIG_H=no
esac
AC_MSG_CHECKING(for OpenCascade directories)
+
+if test -z $CASROOT; then
+ AC_MSG_RESULT(CASROOT not defined)
+ for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do
+ if test -f $d/libTKernel.so ; then
+ AC_MSG_RESULT(libTKernel.so detected in $d)
+ CASROOT=$d
+ CASROOT=`echo ${CASROOT} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+ break
+ fi
+ done
+fi
+
if test -d ${CASROOT}/${casdir}/lib; then
CAS_LDPATH="-L$CASROOT/$casdir/lib "
AC_MSG_RESULT(yes)
else
occ_ok=yes
OCC_VERSION_MAJOR=0
+ OCC_VERSION_MINOR=0
ff=$CASROOT/inc/Standard_Version.hxx
if test -f $ff ; then
grep "define OCC_VERSION_MAJOR" $ff > /dev/null
if test $? = 0 ; then
OCC_VERSION_MAJOR=`grep "define OCC_VERSION_MAJOR" $ff | awk '{i=3 ; print $i}'`
fi
+ grep "define OCC_VERSION_MINOR" $ff > /dev/null
+ if test $? = 0 ; then
+ OCC_VERSION_MINOR=`grep "define OCC_VERSION_MINOR" $ff | awk '{i=3 ; print $i}'`
+ fi
fi
fi
esac
CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS"
+ if test -n $KERNEL_ROOT_DIR; then
+ if test -d $KERNEL_ROOT_DIR/include/salome; then
+ CAS_CPPFLAGS="$CAS_CPPFLAGS -I$KERNEL_ROOT_DIR/include/salome"
+ CPPFLAGS="$CPPFLAGS -I$KERNEL_ROOT_DIR/include/salome"
+ fi
+ fi
+ CAS_CPPFLAGS="$CAS_CPPFLAGS -I${ROOT_BUILDDIR}/include/salome"
+ CPPFLAGS="$CPPFLAGS -I${ROOT_BUILDDIR}/salome_adm/unix"
+
echo
echo
echo testing config.h
CAS_KERNEL="$CAS_LDPATH -lTKernel -lTKMath"
# E.A. compatibility version 4 and 5.x
- CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKCAF -lFWOSPlugin -lTKPShape -lTKPCAF -lTKStdSchema -lTKShapeSchema -lPAppStdPlugin"
+ CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKPShape -lTKCDF -lTKCAF -lTKShapeSchema -lTKPCAF -lFWOSPlugin -lTKStdSchema"
if test $OCC_VERSION_MAJOR -lt 5 ; then
CAS_OCAF="$CAS_OCAF -lTKPAppStd"
fi
- CAS_OCAF="$CAS_OCAF -lTKCDF"
+ if test -f $CASROOT/$casdir/lib/libPAppStdPlugin.so ; then
+ # this library is absent in CASCADE 5.2.3
+ CAS_OCAF="$CAS_OCAF -lPAppStdPlugin"
+ CAS_STDPLUGIN="PAppStdPlugin"
+ fi
+ if test -f $CASROOT/$casdir/lib/libStdPlugin.so ; then
+ # this libraries are only for CASCADE 5.2.3
+ CAS_STDPLUGIN="StdPlugin"
+ CAS_OCAF="$CAS_OCAF -lStdPlugin -lStdLPlugin -lTKLCAF -lTKPLCAF -lTKStdLSchema"
+ fi
CAS_VIEWER="$CAS_LDPATH -lTKOpenGl -lTKV3d -lTKService"
- CAS_MODELER="$CAS_LDPATH -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKOffset"
+ CAS_MODELER="$CAS_LDPATH -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBO -lTKBool -lTKHLR -lTKFillet -lTKOffset -lTKFeat"
# E.A. compatibility version 4 and 5.x
CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing"
AC_DEFUN([CHECK_PYQT],[
AC_REQUIRE([CHECK_PYTHON])dnl
+AC_REQUIRE([CHECK_QT])dnl
+AC_REQUIRE([CHECK_SIP])dnl
AC_ARG_WITH(pyqt,
[ --with-pyqt=DIR root directory path to PyQt installation ],
AC_CHECKING(for pyqt)
-pyqt_ok=no
+pyqt_ok=yes
-if test "x$PYQTDIR" = x; then
- PYQTDIR="/usr"
+dnl look for pyuic
+pyqt_uic_ok=no
+if test "x$PYUIC" != x; then
+ dnl try withval value
+ AC_CHECK_FILE($PYUIC,pyqt_uic_ok=yes,pyqt_uic_ok=no)
fi
-
-if test "x$PYQT_SIPS" = x; then
- PYQT_SIPS="/usr/share/sip/qt"
+if test "x$pyqt_uic_ok" == "xno"; then
+ dnl try ${PYQTDIR}
+ if test "x${PYQTDIR}" != "x"; then
+ if test -d ${PYQTDIR} ; then
+ AC_CHECK_FILE(${PYQTDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no)
+ if test "x$pyqt_uic_ok" == "xyes"; then
+ PYUIC="${PYQTDIR}/pyuic"
+ fi
+ fi
+ fi
fi
-
-if test -d $PYQTDIR/lib/python${PYTHON_VERSION}/site-packages; then
- PYQTLIB=$PYQTDIR/lib/python${PYTHON_VERSION}/site-packages
-else
- if test -d $PYQTDIR/lib; then
- PYQTLIB=$PYQTDIR/lib
- else
- PYQTLIB=$PYQTDIR
+if test "x$pyqt_uic_ok" == "xno"; then
+ dnl try ${SIPDIR}
+ if test "x${SIPDIR}" != "x"; then
+ if test -d ${SIPDIR} ; then
+ AC_CHECK_FILE(${SIPDIR}/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no)
+ if test "x$pyqt_uic_ok" == "xyes"; then
+ PYUIC="${SIPDIR}/pyuic"
+ fi
+ fi
+ fi
+fi
+if test "x$pyqt_uic_ok" == "xno"; then
+ dnl try ${PYTHONHOME}/bin
+ if test "x${PYTHONHOME}" != "x"; then
+ if test -d ${PYTHONHOME}/bin ; then
+ AC_CHECK_FILE(${PYTHONHOME}/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no)
+ if test "x$pyqt_uic_ok" == "xyes"; then
+ PYUIC="${PYTHONHOME}/bin/pyuic"
+ fi
+ fi
+ fi
+fi
+if test "x$pyqt_uic_ok" == "xno"; then
+ dnl try /usr/bin
+ AC_CHECK_FILE(/usr/bin/pyuic,pyqt_uic_ok=yes,pyqt_uic_ok=no)
+ if test "x$pyqt_uic_ok" == "xyes"; then
+ PYUIC="/usr/bin/pyuic"
fi
fi
-
-if test -d $PYQTDIR/bin; then
- PYQTBIN=$PYQTDIR/bin
-else
- PYQTBIN=$PYQTDIR
+if test "x$pyqt_uic_ok" == "xno"; then
+ pyqt_ok=no
fi
-if test "x$PYUIC" = x; then
- PYUIC="$PYQTBIN/pyuic"
+dnl look for PyQt libs
+pyqt_lib_ok=no
+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"
+ 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}"
+ fi
+ fi
+ if test "x$pyqt_lib_ok" == "xno"; then
+ dnl try {PYQTDIR}/lib
+ if test -d {PYQTDIR}/lib; then
+ AC_CHECK_FILE(${PYQTDIR}/lib/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+ if test "x$pyqt_lib_ok" == "xyes"; then
+ PYQT_LIBS="-L${PYQTDIR}/lib -lqtcmodule"
+ else
+ AC_CHECK_FILE(${PYQTDIR}/lib/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+ if test "x$pyqt_lib_ok" == "xyes"; then
+ PYQT_LIBS="-L${PYQTDIR}/lib"
+ fi
+ fi
+ fi
+ fi
+ if test "x$pyqt_lib_ok" == "xno"; then
+ dnl try {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages
+ if test -d {PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages; then
+ AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+ if test "x$pyqt_lib_ok" == "xyes"; then
+ PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule"
+ else
+ AC_CHECK_FILE(${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+ if test "x$pyqt_lib_ok" == "xyes"; then
+ PYQT_LIBS="-L${PYQTDIR}/lib/python${PYTHON_VERSION}/site-packages"
+ fi
+ fi
+ fi
+ fi
fi
-
-AC_CHECK_FILE("$PYUIC",pyqt_ok=yes,pyqt_ok=no)
-
-dnl if test "x$pyqt_ok" = xyes ; then
-dnl AC_CHECK_FILES("$PYQTLIB/qt.py",pyqt_ok=yes,pyqt_ok=no)
-dnl fi
-
-dnl if test "x$pyqt_ok" = xno ; then
-dnl AC_CHECK_FILES("$PYQTLIB/qt/qt.py",pyqt_ok=yes,pyqt_ok=no)
-dnl fi
-
-dnl if test "x$pyqt_ok" = xyes ; then
-dnl AC_CHECK_FILE("$PYQTLIB/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no)
-dnl fi
-
-if test "x$pyqt_ok" = xyes ; then
- AC_CHECK_FILES("$PYQT_SIPS/qtmod.sip",pyqt_ok=yes,pyqt_ok=no)
+if test "x$pyqt_lib_ok" == "xno"; then
+ dnl try ${SIPDIR}
+ if test "x${SIPDIR}" != "x"; 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"
+ 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}"
+ fi
+ fi
+ fi
+ fi
fi
-if test "x$pyqt_ok" = xyes ; then
- AC_CHECK_FILE("$PYQT_SIPS/copying.sip",pyqt_ok=yes,pyqt_ok=no)
+if test "x$pyqt_lib_ok" == "xno"; then
+ dnl try ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages
+ if test "x${PYTHONHOME}" != "x"; then
+ if test -d ${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages ; then
+ AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+ if test "x$pyqt_lib_ok" == "xyes"; then
+ PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule"
+ else
+ AC_CHECK_FILE(${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+ if test "x$pyqt_lib_ok" == "xyes"; then
+ PYQT_LIBS="-L${PYTHONHOME}/lib/python${PYTHON_VERSION}/site-packages"
+ fi
+ fi
+ fi
+ fi
+fi
+if test "x$pyqt_lib_ok" == "xno"; then
+ dnl try /usr/lib/python${PYTHON_VERSION}/site-packages
+ AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libqtcmodule.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+ if test "x$pyqt_lib_ok" == "xyes"; then
+ PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages -lqtcmodule"
+ else
+ AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/qt.so,pyqt_lib_ok=yes,pyqt_lib_ok=no)
+ if test "x$pyqt_lib_ok" == "xyes"; then
+ PYQT_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages"
+ fi
+ fi
+fi
+if test "x$pyqt_lib_ok" == "xno"; then
+ pyqt_ok=no
fi
-if test "x$pyqt_ok" = xyes ; then
- PYQT_ROOT=$PYQTDIR
+dnl look for PyQt sips
+pyqt_sips_ok=no
+dnl try ${PYQT_SIPS} or ${PYQT_SIPS}/qt
+if test "x${PYQT_SIPS}" != "x"; then
+ AC_CHECK_FILE(${PYQT_SIPS}/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
+ if test "x$pyqt_sips_ok" == "xno"; then
+ AC_CHECK_FILE(${PYQT_SIPS}/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
+ if test "x$pyqt_sips_ok" == "xyes"; then
+ PYQT_SIPS="${PYQT_SIPS}/qt"
+ fi
+ fi
+fi
+if test "x$pyqt_sips_ok" == "xno"; then
+ dnl try ${PYQTDIR}/sip
+ if test "x${PYQTDIR}" != "x"; then
+ if test -d ${PYQTDIR}/sip ; then
+ AC_CHECK_FILE(${PYQTDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
+ if test "x$pyqt_sips_ok" == "xyes"; then
+ PYQT_SIPS="${PYQTDIR}/sip"
+ else
+ AC_CHECK_FILE(${PYQTDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
+ if test "x$pyqt_sips_ok" == "xyes"; then
+ PYQT_SIPS="${PYQTDIR}/sip/qt"
+ fi
+ fi
+ fi
+ fi
+fi
+if test "x$pyqt_sips_ok" == "xno"; then
+ dnl try ${SIPDIR}/sip
+ if test "x${SIPDIR}" != "x"; then
+ if test -d ${SIPDIR}/sip ; then
+ AC_CHECK_FILE(${SIPDIR}/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
+ if test "x$pyqt_sips_ok" == "xyes"; then
+ PYQT_SIPS="${SIPDIR}/sip"
+ else
+ AC_CHECK_FILE(${SIPDIR}/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
+ if test "x$pyqt_sips_ok" == "xyes"; then
+ PYQT_SIPS="${SIPDIR}/sip/qt"
+ fi
+ fi
+ fi
+ fi
+fi
+if test "x$pyqt_sips_ok" == "xno"; then
+ dnl try /usr/share/sip
+ if test -d /usr/share/sip ; then
+ AC_CHECK_FILE(/usr/share/sip/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
+ if test "x$pyqt_sips_ok" == "xyes"; then
+ PYQT_SIPS="/usr/share/sip"
+ else
+ AC_CHECK_FILE(/usr/share/sip/qt/qglobal.sip,pyqt_sips_ok=yes,pyqt_sips_ok=no)
+ if test "x$pyqt_sips_ok" == "xyes"; then
+ PYQT_SIPS="/usr/share/sip/qt"
+ fi
+ fi
+ fi
+fi
+if test "x$pyqt_sips_ok" == "xno"; then
+ pyqt_ok=no
+else
PYQT_INCLUDES="-I$PYQT_SIPS"
- PYQT_LIBS="-L$PYQTLIB "
- AC_SUBST(PYQT_ROOT)
- AC_SUBST(PYQT_INCLUDES)
- AC_SUBST(PYQT_LIBS)
- AC_SUBST(PYQT_SIPS)
- AC_SUBST(PYUIC)
fi
+AC_SUBST(PYQT_INCLUDES)
+AC_SUBST(PYQT_LIBS)
+AC_SUBST(PYQT_SIPS)
+AC_SUBST(PYUIC)
+
+AC_MSG_RESULT(for pyqt: $pyqt_ok)
+
])dnl
dnl
then
AC_MSG_RESULT(please define QTDIR variable)
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'`
+ AC_MSG_RESULT(Qt version is $QT_VERS)
+ QT_VERS="Qt_"`echo $QT_VERS | sed -e 's%\"%%g' -e 's%\.%_%g'`
fi
if test "x$qt_ok" = "xyes"
fi
fi
-version=`moc -v > mocversion 2>&1;cut -c40-44 mocversion;rm -rf mocversion`
-case "$version" in
- 3.3.3)
- QT_VERS=v3_3_3
- AC_MSG_RESULT(QT3.3.3 install detected)
- qt_ok=yes;;
- 3.0.5)
- AC_MSG_RESULT(QT3.0.5 install detected)
- QT_VERS=v3_0_5
- qt_ok=yes;;
- *)
- AC_MSG_RESULT(qt version $version not supported)
- qt_ok=no
- QT_VERS=no ;;
-esac
-
-AC_SUBST(QT_VERS)
-AC_MSG_RESULT(qt version $QT_VERS )
-
AC_SUBST(QTDIR)
QT_ROOT=$QTDIR
AC_MSG_CHECKING(include of qt headers)
- if test "x$qt_ok" = "xyes"
+ if test "x$qt_ok" = "xno"
then
+ AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include)
+ 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"
- else
- CPPFLAGS_old=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$QTDIR/include/qt3"
-
- AC_LANG_CPLUSPLUS
- AC_CHECK_HEADER(qapp.h,qt_ok=yes ,qt_ok=no)
-
- CPPFLAGS=$CPPFLAGS_old
-
- AC_MSG_CHECKING(include of qt headers)
-
- if test "x$qt_ok" = "xno"
- then
- AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include)
- AC_MSG_RESULT(QTDIR environment variable may be wrong)
- else
- AC_MSG_RESULT(yes)
- QT_INCLUDES="-I${QT_ROOT}/include/qt3 -DQT_THREAD_SUPPORT"
- QT_MT_INCLUDES="-I${QT_ROOT}/include/qt3 -DQT_THREAD_SUPPORT"
- fi
fi
fi
LIBS="$LIBS -L$QTDIR/lib -lqt-mt $OGL_LIBS"
CXXFLAGS_old=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS $QT_MT_INCLUDES"
+ CXXFLAGS="$CXXFLAGS -I$QTDIR/include"
AC_CACHE_VAL(salome_cv_lib_qt,[
AC_TRY_LINK(
if test -z $QWTHOME; then
AC_MSG_RESULT(QWTHOME not defined)
exits_ok=no
- AC_CHECK_FILE("/usr/local/lib/libqwt.so",exits_ok=yes,exits_ok=no)
+ if test "x$exits_ok" = "xno"; then
+ for d in /usr/local /usr ; do
+ AC_CHECK_FILE(${d}/lib/libqwt.so,exits_ok=yes,exits_ok=no)
+ if test "x$exits_ok" = "xyes"; then
+ QWTHOME=$d
+ AC_MSG_RESULT(libqwt.so detected in $d/lib)
+ fi
+ done
+ fi
+ if test "x$exits_ok" = "xno"; then
+ for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do
+ if test -f $d/libqwt.so ; then
+ AC_MSG_RESULT(libqwt.so detected in $d)
+ QWTHOME=$d
+ QWTHOME=`echo ${QWTHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+ exits_ok=yes
+ break
+ fi
+ done
+ fi
if test "x$exits_ok" = "xyes"; then
- QWTHOME="/usr/local/lib"
- AC_MSG_RESULT(libqwt.so detected in /usr/local/lib)
if test -z $QWT_INCLUDES; then
- QWT_INCLUDES="/usr/local/include/qwt"
+ QWT_INCLUDES=$QWTHOME"/include/qwt"
fi
- else
- AC_CHECK_FILE("/usr/lib/libqwt.so",exits_ok=yes,exits_ok=no)
- if test "x$exits_ok" = "xyes"; then
- QWTHOME="/usr/lib"
- AC_MSG_RESULT(libqwt.so detected in /usr/lib)
- if test -z $QWT_INCLUDES; then
- QWT_INCLUDES="/usr/include/qwt"
- fi
- fi
- fi
+ fi
else
if test -z $QWT_INCLUDES; then
QWT_INCLUDES="$QWTHOME/include"
AC_LANG_CPLUSPLUS
CPPFLAGS_old=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$QWT_INCLUDES"
- CPPFLAGS="$CPPFLAGS $QT_INCLUDES"
-# CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
+ CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
AC_CHECK_HEADER(qwt.h,qwt_ok=yes,qwt_ok=no)
LIBS="$LIBS -L$QTDIR/lib -lqt-mt -L$QWTHOME/lib -lqwt"
CXXFLAGS_old=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS $QT_INCLUDES -I$QWT_INCLUDES"
-# CXXFLAGS="$CXXFLAGS -I$QTDIR/include -I$QWT_INCLUDES"
+ CXXFLAGS="$CXXFLAGS -I$QTDIR/include -I$QWT_INCLUDES"
AC_CACHE_VAL(salome_cv_lib_qwt,[
AC_TRY_LINK(
AC_DEFUN([CHECK_SIP],[
AC_REQUIRE([CHECK_PYTHON])dnl
+AC_REQUIRE([CHECK_QT])dnl
sip_ok=yes
AC_PATH_PROG(SIP, sip)
])
-if test "x$SIP" = "x"
-then
+if test "x$SIP" = "x" ; then
sip_ok=no
AC_MSG_RESULT(sip not in PATH variable)
else
- version=`sip -V`
+ version=`$SIP -V`
+ AC_MSG_RESULT(sip version is $version)
case "$version" in
3.2*)
- SIP_VERS=old ;;
+ SIP_VERS=v3_old ;;
3.3*)
- SIP_VERS=old ;;
+ SIP_VERS=v3_old ;;
3.4*)
- SIP_VERS=new ;;
+ SIP_VERS=v3_old ;;
3.5*)
- SIP_VERS=new ;;
+ SIP_VERS=v3_old ;;
3.6*)
- SIP_VERS=new ;;
+ SIP_VERS=v3_old ;;
3.7*)
- SIP_VERS=new ;;
+ SIP_VERS=v3_old ;;
3.8*)
- SIP_VERS=new ;;
+ SIP_VERS=v3_old ;;
3.9*)
- SIP_VERS=new ;;
+ SIP_VERS=v3_old ;;
3.10*)
- SIP_VERS=new2 ;;
- 4.1*)
- SIP_VERS=v4_1 ;;
+ SIP_VERS=v3_new ;;
+ 4.*)
+ SIP_VERS=v4 ;;
*)
AC_MSG_RESULT(sip version $version not supported)
- SIP_VERS=no ;;
+ SIP_VERS=unsupported ;;
esac
- sip_ok=no
- if test "x$SIP_VERS" = "xold"
- then
- dnl old install : includes and libs are in python install or in SIPDIR
- AC_MSG_RESULT(old install detected)
- sip_ok=yes
- SIP_ROOT="$SIPDIR"
- SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}"
- SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -L${SIPDIR} -lsip"
+ sip_ok=no
+ dnl Search sip.h file
+ if test "x$SIPDIR" != "x" ; then
+ dnl look for sip.h in ${SIPDIR}
+ AC_CHECK_FILE(${SIPDIR}/sip.h,sip_ok=yes,sip_ok=no)
+ if test "x$sip_ok" == "xyes" ; then
+ SIP_INCLUDES="-I${SIPDIR}"
+ fi
+ if test "x$sip_ok" == "xno" ; then
+ dnl look for sip.h in ${SIPDIR}/include/python${PYTHON_VERSION}
+ if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then
+ AC_CHECK_FILE(${SIPDIR}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no)
+ if test "x$sip_ok" == "xyes" ; then
+ SIP_INCLUDES="-I${SIPDIR}/include/python${PYTHON_VERSION}"
+ fi
+ fi
+ fi
fi
-
- if test "x$SIP_VERS" = "xnew"
- then
- sip_ok=yes
- if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then
- AC_MSG_RESULT(new install with include dir detected)
- dnl new install with include dir : includes and libs are in python install or in SIPDIR/include
- SIP_ROOT="$SIPDIR"
- SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include/python${PYTHON_VERSION}"
- SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip"
- else
- dnl new install without include dir : includes and libs are in SIPDIR
- AC_MSG_RESULT(new install without include dir detected)
- sip_ok=yes
- SIP_ROOT="$SIPDIR"
- SIP_INCLUDES="-I${SIPDIR}"
- SIP_LIBS="-L${SIPDIR} -lsip"
- fi
+ if test "x$sip_ok" == "xno" ; then
+ dnl look for sip.h in ${PYTHON_PREFIX}/include/python${PYTHON_VERSION}
+ if test -d ${PYTHON_PREFIX}/include/python${PYTHON_VERSION} ; then
+ AC_CHECK_FILE(${PYTHON_PREFIX}/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no)
+ if test "x$sip_ok" == "xyes" ; then
+ SIP_INCLUDES="${PYTHON_INCLUDES}"
+ fi
+ fi
fi
-
- if test "x$SIP_VERS" = "xnew2"
- then
- dnl new2 install : includes and libs are in python install
- AC_MSG_RESULT(new2 install detected)
- sip_ok=yes
- AC_CHECK_FILE($PYTHON_PREFIX/include/python$PYTHON_VERSION/sip.h,sip_ok=$sip_ok,sip_ok=no)
- SIP_INCLUDES="${PYTHON_INCLUDES}"
- AC_CHECK_FILE($PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages/libsip.so,sip_ok=$sip_ok,sip_ok=no)
- SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -lsip"
+ if test "x$sip_ok" == "xno" ; then
+ dnl look for sip.h in /usr/include/python${PYTHON_VERSION}
+ if test -d /usr/include/python${PYTHON_VERSION} ; then
+ AC_CHECK_FILE(/usr/include/python${PYTHON_VERSION}/sip.h,sip_ok=yes,sip_ok=no)
+ if test "x$sip_ok" == "xyes" ; then
+ SIP_INCLUDES="/usr/include/python${PYTHON_VERSION}"
+ fi
+ fi
fi
+
+ dnl Search (lib)sip.so file
+ sip_lib_ok=no
+ if test "x$SIPDIR" != "x" ; then
+ 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"
+ 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}"
+ fi
+ fi
- if test "x$SIP_VERS" = "xv4_1"
- then
- dnl 4.1 install : includes and libs are in python install
- AC_MSG_RESULT(4.1 install detected)
- sip_ok=yes
- AC_CHECK_FILE($PYTHON_PREFIX/include/python$PYTHON_VERSION/sip.h,sip_ok=$sip_ok,sip_ok=no)
- SIP_INCLUDES="${PYTHON_INCLUDES}"
- AC_CHECK_FILE($PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages/sip.so,sip_ok=$sip_ok,sip_ok=no)
- SIP_LIBS="${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/sip.so"
+ if test "x$sip_lib_ok" == "xno" ; then
+ dnl look for (lib)sip.so in ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages
+ if test -d ${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages ; then
+ AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
+ if test "x$sip_lib_ok" == "xyes" ; then
+ SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip"
+ else
+ AC_CHECK_FILE(${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
+ if test "x$sip_lib_ok" == "xyes" ; then
+ SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test "x$sip_lib_ok" == "xno" ; then
+ dnl look for (lib)sip.so in ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages
+ if test -d ${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages ; then
+ AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
+ if test "x$sip_lib_ok" == "xyes" ; then
+ SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages -lsip"
+ else
+ AC_CHECK_FILE(${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
+ if test "x$sip_lib_ok" == "xyes" ; then
+ SIP_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"
+ fi
+ fi
+ fi
+ fi
+ if test "x$sip_lib_ok" == "xno" ; then
+ dnl look for (lib)sip.so in /usr/lib/python${PYTHON_VERSION}/site-packages
+ if test -d /usr/lib/python${PYTHON_VERSION}/site-packages ; then
+ AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/libsip.so,sip_lib_ok=yes,sip_lib_ok=no)
+ if test "x$sip_lib_ok" == "xyes" ; then
+ SIP_LIBS="-L$/usr/lib/python${PYTHON_VERSION}/site-packages -lsip"
+ else
+ AC_CHECK_FILE(/usr/lib/python${PYTHON_VERSION}/site-packages/sip.so,sip_lib_ok=yes,sip_lib_ok=no)
+ if test "x$sip_lib_ok" == "xyes" ; then
+ SIP_LIBS="-L/usr/lib/python${PYTHON_VERSION}/site-packages"
+ fi
+ fi
+ fi
+ fi
+ if test "x$sip_lib_ok" == "xno" ; then
+ sip_ok=no
fi
fi
QT_MT_INCLUDES = @QT_INCLUDES@ -DQT_THREAD_SUPPORT
QT_LIBS = @QT_LIBS@
QT_MT_LIBS = @QT_MT_LIBS@
+QT_VERS = @QT_VERS@
MOC = @MOC@
UIC = @UIC@
-QT_VERS = @QT_VERS@
+# msg2qm
+MSG2QM = @MSG2QM@
#QWT
# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib/salome/%.la)
LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib/salome/%.la, $(filter %.la, $(LIB)))
LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib/salome/%.a, $(filter %.a, $(LIB)))
+LIB_BUILD_SO = $(patsubst %.so, $(top_builddir)/lib/salome/%.so, $(filter %.so, $(LIB)))
ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),)
LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB)))
LIB_SWIG =
endif
-lib: $(LIB_BUILD) $(LIB_CLIENT_PY)
+lib: $(LIB_BUILD) $(LIB_BUILD_SO) $(LIB_CLIENT_PY)
# we don't build static library !
$(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la
-$(RM) $@
ln -sf $(CURDIR)/$< $@ || true
+$(LIB_BUILD_SO): $(top_builddir)/lib/salome/%.so: %.so
+ -$(RM) $@
+ ln -sf $(CURDIR)/$< $@ || true
+
$(LIB): $(LIB_OBJ)
- @$(LT) --mode=link $(CXX) -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
+ @$(LT) --mode=link $(CXX) -shared -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
# transform idl reference in appropriate obj file
BIN_CLIENT_SRC = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX))