From: nds Date: Tue, 28 Feb 2006 14:27:29 +0000 (+0000) Subject: Change configuration X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=87268f6425dd845ab82c6cf6bd1c96d999953219;p=modules%2Fgui.git Change configuration --- diff --git a/Makefile.in b/Makefile.in index 989c6a476..c1bc6bff4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,7 +14,13 @@ VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:@top_srcdir@/resources:./bin:@top @COMMENCE@ -SUBDIRS = idl src doc +SUBDIRS = src + +ifeq ($(GUI_DISABLE_CORBA),no) + SUBDIRS+= idl +endif + +SUBDIRS+= doc adm_local RESOURCES_FILES = \ back.xpm \ diff --git a/adm_local/Makefile.in b/adm_local/Makefile.in new file mode 100644 index 000000000..9b5e810db --- /dev/null +++ b/adm_local/Makefile.in @@ -0,0 +1,41 @@ +# source path +top_srcdir=@top_srcdir@ +top_builddir=.. +srcdir=@srcdir@ +VPATH=.:$(srcdir)/adm_local + + +all: resources + +install: + cp -rf @top_srcdir@/adm_local @prefix@ + +bin: + +resources : + cp -rf @top_srcdir@/adm_local $(top_builddir) + +inc: + +lib: + +depend: + +depend_idl: + +install-end: + +install-include: + +install-bin: + +uninstall: + +uninstall-idl: + +distclean: + +clean: + +distclean-other: + diff --git a/adm_local/unix/config_files/check_GUI.m4 b/adm_local/unix/config_files/check_GUI.m4 new file mode 100755 index 000000000..ad022e400 --- /dev/null +++ b/adm_local/unix/config_files/check_GUI.m4 @@ -0,0 +1,53 @@ +# Check availability of Salome binary distribution +# +# Author : Marc Tajchman (CEA, 2002) +#------------------------------------------------------------ + +AC_DEFUN([CHECK_SALOME_GUI],[ + +AC_CHECKING(for SalomeGUI) + +SalomeGUI_ok=no + +AC_ARG_WITH(gui, + --with-salome_gui=DIR root directory path of SALOME GUI installation, + SALOME_GUI_DIR="$withval",SALOME_GUI_DIR="") + +if test "x$SALOME_GUI_DIR" = "x" ; then + +# no --with-gui-dir option used + + if test "x$GUI_ROOT_DIR" != "x" ; then + + # SALOME_ROOT_DIR environment variable defined + SALOME_GUI_DIR=$GUI_ROOT_DIR + + else + + # search Salome binaries in PATH variable + AC_PATH_PROG(TEMP, libLightApp.so) + if test "x$TEMP" != "x" ; then + SALOME_BIN_DIR=`dirname $TEMP` + SALOME_GUI_DIR=`dirname $SALOME_BIN_DIR` + fi + + fi +# +fi + +if test -f ${SALOME_GUI_DIR}/lib/salome/libLightApp.so ; then + SalomeGUI_ok=yes + AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR}) + + if test "x$GUI_ROOT_DIR" == "x" ; then + GUI_ROOT_DIR=${SALOME_GUI_DIR} + fi + AC_SUBST(GUI_ROOT_DIR) +else + AC_MSG_WARN("Cannot find compiled SALOME GUI distribution") +fi + +AC_MSG_RESULT(for SALOME GUI: $SalomeGUI_ok) + +])dnl + diff --git a/adm_local/unix/config_files/check_full_GUI.m4 b/adm_local/unix/config_files/check_full_GUI.m4 new file mode 100755 index 000000000..44f8247ae --- /dev/null +++ b/adm_local/unix/config_files/check_full_GUI.m4 @@ -0,0 +1,55 @@ +# Check availability of full Salome binary distribution +# +# Author : Marc Tajchman (CEA, 2002) +#------------------------------------------------------------ + +AC_DEFUN([CHECK_FULL_GUI],[ + +AC_CHECKING(for full SalomeGUI) + +SalomeGUI_ok=no +FULL_GUI="no" + +AC_ARG_WITH(gui, + --with-salome_gui=DIR root directory path of full SALOME GUI installation, + SALOME_GUI_DIR="$withval",SALOME_GUI_DIR="") + +if test "x$SALOME_GUI_DIR" = "x" ; then + +# no --with-gui-dir option used + + if test "x$GUI_ROOT_DIR" != "x" ; then + + # SALOME_ROOT_DIR environment variable defined + SALOME_GUI_DIR=$GUI_ROOT_DIR + + else + + # search Salome binaries in PATH variable + AC_PATH_PROG(TEMP, libSalomeApp.so) + if test "x$TEMP" != "x" ; then + SALOME_BIN_DIR=`dirname $TEMP` + SALOME_GUI_DIR=`dirname $SALOME_BIN_DIR` + fi + + fi +# +fi + +if test -f ${SALOME_GUI_DIR}/lib/salome/libSalomeApp.so ; then + SalomeGUI_ok=yes + FULL_GUI=yes + AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR}) + + if test "x$GUI_ROOT_DIR" == "x" ; then + GUI_ROOT_DIR=${SALOME_GUI_DIR} + fi +else + AC_MSG_WARN("Cannot find compiled full SALOME GUI distribution") +fi +AC_SUBST(FULL_GUI) + +AC_MSG_RESULT(for full SALOME GUI: $SalomeGUI_ok) + +])dnl + diff --git a/adm_local/unix/config_files/check_msg2qm.m4 b/adm_local/unix/config_files/check_msg2qm.m4 new file mode 100755 index 000000000..8d0c5474f --- /dev/null +++ b/adm_local/unix/config_files/check_msg2qm.m4 @@ -0,0 +1,57 @@ +# Check availability of Qt's msg2qm tool binary distribution +# +# Author : Jerome Roy (CEA, 2003) +# + +AC_DEFUN([CHECK_MSG2QM],[ + +AC_CHECKING(for msg2qm) + +msg2qm_ok=no + +AC_ARG_WITH(msg2qm, + [ --with-msg2qm=DIR root directory path of MSG2QM installation], + MSG2QM_DIR="$withval",MSG2QM_DIR="") + +if test "x$MSG2QM_DIR" == "x" ; then + +# no --with-MSG2QM-dir option used + + if test "x$MSG2QM_ROOT" != "x" ; then + + # MSG2QM_ROOT environment variable defined + MSG2QM_DIR=$MSG2QM_ROOT + + else + + # search MSG2QM binaries in PATH variable + AC_PATH_PROG(TEMP, msg2qm) + if test "x$TEMP" != "x" ; then + MSG2QM_DIR=`dirname $TEMP` + fi + + fi +# +fi + +# look for msg2qm in ${MSG2QM_DIR} directory +if test -f ${MSG2QM_DIR}/msg2qm ; then + msg2qm_ok=yes + MSG2QM="${MSG2QM_DIR}/msg2qm" + AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}) +else + # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory + if test -f ${MSG2QM_DIR}/bin/msg2qm ; then + msg2qm_ok=yes + MSG2QM="${MSG2QM_DIR}/bin/msg2qm" + AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin) + else + AC_MSG_WARN("Cannot find MSG2QM executable") + fi +fi + +AC_SUBST(MSG2QM) +AC_MSG_RESULT(for MSG2QM: $msg2qm_ok) + +])dnl + diff --git a/adm_local/unix/config_files/check_opengl.m4 b/adm_local/unix/config_files/check_opengl.m4 new file mode 100644 index 000000000..dd43d25a0 --- /dev/null +++ b/adm_local/unix/config_files/check_opengl.m4 @@ -0,0 +1,143 @@ +dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl +AC_DEFUN([CHECK_OPENGL],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_ARG_WITH(opengl, + [ --with-opengl=DIR root directory path of OpenGL installation ], + [ + opengl_dir="$withval" + local_opengl=yes + ], [ + dirs="/usr/lib /usr/local/lib /opt/graphics/OpenGL/lib /usr/openwin/lib /usr/X11R6/lib" + ])dnl + +AC_CHECKING(for OpenGL) + +AC_SUBST(OGL_INCLUDES) +AC_SUBST(OGL_LIBS) + +OGL_INCLUDES="" +OGL_LIBS="" + +OpenGL_ok=no + +dnl openGL headers + +# by default + +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" + 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) + fi +fi + +if test "x$OpenGL_ok" = "xno" +then + AC_CHECK_HEADERS(GL/gl.h, [OpenGL_ok=yes]) +fi + +if test "x$OpenGL_ok" = "xno" +then +# under SunOS ? + AC_CHECK_HEADERS(/usr/openwin/share/include/GL/glxmd.h, + [OpenGL_ok=yes] + OGL_INCLUDES="-I/usr/openwin/share/include/") +fi + +if test "x$OpenGL_ok" = "xno" +then +# under IRIX ? + AC_CHECK_HEADERS(/opt/graphics/OpenGL/include/GL/glxmd.h, + [OpenGL_ok=yes] + OGL_INCLUDES="-I/opt/graphics/OpenGL/include") +fi +if test "x$OpenGL_ok" = "xno" +then +# some linux OpenGL servers hide the includes in /usr/X11R6/include/GL + AC_CHECK_HEADERS(/usr/X11R6/include/GL/gl.h, + [OpenGL_ok=yes] + OGL_INCLUDES="-I/usr/X11R6/include") +fi + +if test "x$OpenGL_ok" = "xyes" +then + AC_CHECKING(for OpenGL library) + OpenGL_ok=no + for i in $dirs; do + if test -r "$i/libGL.so"; then +dnl AC_MSG_RESULT(in $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) + if test "x$i" = "x/usr/lib" + then + OGL_LIBS="" + else + OGL_LIBS="-L$i" + fi + break + fi + done + LDFLAGS_old="$LDFLAGS" + LDFLAGS="$LDFLAGS $OGL_LIBS" + AC_CHECK_LIB(GL,glBegin,OpenGL_ok=yes,OpenGL_ok=no) + LDFLAGS="$LDFLAGS_old" +fi + +if test "x$OpenGL_ok" = "xyes" ; then + OGL_LIBS="$OGL_LIBS -lGL" +fi + + +OpenGLU_ok=no +LDFLAGS_old="$LDFLAGS" +LDFLAGS="$LDFLAGS $OGL_LIBS" +AC_CHECK_LIB(GLU,gluBeginSurface,OpenGLU_ok=yes,OpenGLU_ok=no) +LDFLAGS="$LDFLAGS_old" + +if test "x$OpenGLU_ok" = "xyes" ; then + OGL_LIBS="$OGL_LIBS -lGLU" +fi + +# Save cache +AC_CACHE_SAVE + +])dnl diff --git a/adm_local/unix/config_files/check_pyqt.m4 b/adm_local/unix/config_files/check_pyqt.m4 new file mode 100644 index 000000000..ee024efaf --- /dev/null +++ b/adm_local/unix/config_files/check_pyqt.m4 @@ -0,0 +1,307 @@ +dnl Copyright (C) 2003 CEA/DEN, EDF R&D + +AC_DEFUN([CHECK_PYQT],[ +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" + AC_MSG_RESULT("select $withval as path to PyQt") + ]) + +AC_ARG_WITH(pyqt_sips, + [ --with-pyqt_sips=DIR a directory path to PyQt sips installation ], + [PYQT_SIPS="$withval" + AC_MSG_RESULT("select $withval as path to PyQt sips") + ]) + + +AC_ARG_WITH(pyuic, + [ --with-pyuic=EXEC pyuic executable ], + [PYUIC="$withval" + AC_MSG_RESULT("select $withval as pyqt executable") + ]) + +AC_CHECKING(for pyqt) + +pyqt_ok=yes + +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_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 "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 "x$pyqt_uic_ok" == "xno"; then + pyqt_ok=no +fi + +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 + 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 + 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 + 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 +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 + 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 + if test "x${SIPDIR}" = "x/usr/lib" + then + PYQT_LIBS="" + else + PYQT_LIBS="-L${SIPDIR}" + fi + fi + fi + fi + fi +fi +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 + +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" + + 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) + +])dnl +dnl + + diff --git a/adm_local/unix/config_files/check_qt.m4 b/adm_local/unix/config_files/check_qt.m4 new file mode 100644 index 000000000..ab2869c21 --- /dev/null +++ b/adm_local/unix/config_files/check_qt.m4 @@ -0,0 +1,175 @@ +dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl + +AC_DEFUN([CHECK_QT],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl +AC_REQUIRE([CHECK_OPENGL])dnl + +AC_CHECKING(for QT) +qt_ok=yes + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +if test "x$QTDIR" = "x" +then + AC_MSG_RESULT(please define QTDIR variable) + qt_ok=no +else + AC_MSG_RESULT(QTDIR is $QTDIR) + 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 + +if test "x$qt_ok" = "xyes" +then + if test -f ${QTDIR}/bin/moc + then + MOC=${QTDIR}/bin/moc + else + AC_PATH_PROG(MOC, moc) + fi + if test "x$MOC" = "x" + then + qt_ok=no + AC_MSG_RESULT(moc qt-compiler not in PATH variable) + else + qt_ok=yes + AC_MSG_RESULT(moc found) + fi +fi + +if test "x$qt_ok" = "xyes" +then + if test -f ${QTDIR}/bin/uic + then + UIC=${QTDIR}/bin/uic + else + AC_PATH_PROG(UIC, uic) + fi + if test "x$UIC" = "x" + then + qt_ok=no + AC_MSG_RESULT(uic qt-interface compiler not in PATH variable) + else + qt_ok=yes + AC_MSG_RESULT(uic found) + fi +fi + +AC_SUBST(QTDIR) +QT_ROOT=$QTDIR + +if test "x$qt_ok" = "xyes" +then + CPPFLAGS_old=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$QTDIR/include${QTINC}" + + AC_LANG_CPLUSPLUS + AC_CHECK_HEADER(qaction.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${QTINC} -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE" + QT_MT_INCLUDES="-I${QT_ROOT}/include${QTINC} -DQT_THREAD_SUPPORT -DQT_CLEAN_NAMESPACE" + fi +fi + +if test "x$qt_ok" = "xyes" +then + AC_MSG_CHECKING(linking qt library) + LIBS_old=$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 $QT_INCLUDES" + + AC_CACHE_VAL(salome_cv_lib_qt,[ + AC_TRY_LINK( +#include +, int n; + char **s; + QApplication a(n, s); + a.exec();, + eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no") + ]) + qt_ok="$salome_cv_lib_qt" + + if test "x$qt_ok" = "xno" + then + AC_MSG_RESULT(unable to link with qt library) + AC_MSG_RESULT(QTDIR environment variable may be wrong) + else + AC_MSG_RESULT(yes) + 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 + CXXFLAGS=$CXXFLAGS_old + +fi + +AC_SUBST(MOC) +AC_SUBST(UIC) + +AC_SUBST(QT_ROOT) +AC_SUBST(QT_INCLUDES) +AC_SUBST(QT_LIBS) +AC_SUBST(QT_MT_LIBS) +AC_SUBST(QT_VERS) + +AC_LANG_RESTORE + +AC_MSG_RESULT(for qt: $qt_ok) + +# Save cache +AC_CACHE_SAVE + +])dnl +dnl diff --git a/adm_local/unix/config_files/check_qwt.m4 b/adm_local/unix/config_files/check_qwt.m4 new file mode 100644 index 000000000..13bf90914 --- /dev/null +++ b/adm_local/unix/config_files/check_qwt.m4 @@ -0,0 +1,151 @@ +dnl Copyright (C) 2003 CEA/DEN, EDF R&D + +AC_DEFUN([CHECK_QWT],[ +AC_REQUIRE([CHECK_QT])dnl + +AC_CHECKING(for qwt) + +qwt_ok=yes + +dnl were is qwt ? + +AC_ARG_WITH(qwt, + [ --with-qwt=DIR directory path to QWT installation ], + [QWTHOME="$withval" + AC_MSG_RESULT("select $withval as path to QWT") + ]) + +AC_ARG_WITH(qwt_inc, + [ --with-qwt_inc=DIR directory path to QWT includes ], + [QWT_INCLUDES="$withval" + AC_MSG_RESULT("select $withval as path to QWT includes") + ]) + +if test -z $QWTHOME; then + AC_MSG_RESULT(QWTHOME not defined) + 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 + if test -z $QWT_INCLUDES; then + QWT_INCLUDES=$QWTHOME"/include/qwt" + if test ! -f $QWT_INCLUDES/qwt.h ; then + QWT_INCLUDES=$QWTHOME"/include" + fi + if test ! -f $QWT_INCLUDES/qwt.h ; then + QWT_INCLUDES=/usr/lib/qt3/include/qwt + fi + fi + fi +else + if test -z $QWT_INCLUDES; then + QWT_INCLUDES="$QWTHOME/include" + fi +fi + +if test "x$qwt_ok" = xno -o ! -d "$QWTHOME" ; then + AC_MSG_RESULT(no) + AC_MSG_WARN(qwt not found) + qwt_ok=no +else + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + CPPFLAGS_old=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$QWT_INCLUDES" + CPPFLAGS="$CPPFLAGS $QT_INCLUDES" + + AC_CHECK_HEADER(qwt.h,qwt_ok=yes,qwt_ok=no) + + CPPFLAGS=$CPPFLAGS_old + + if test "x$qwt_ok" = xno ; then + AC_MSG_RESULT(no) + AC_MSG_WARN(qwt not found) + else + qwt_ok=yes + fi + +if test "x$qwt_ok" = "xyes" +then + AC_MSG_CHECKING(linking qwt library) + LIBS_old=$LIBS + 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" + then + LIBS="$LIBS -lqwt" + else + LIBS="$LIBS -L$QWTHOME/lib -lqwt" + fi + + CXXFLAGS_old=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $QT_INCLUDES -I$QWT_INCLUDES" + + AC_CACHE_VAL(salome_cv_lib_qwt,[ + AC_TRY_LINK( +#include +#include +, int n; + char **s; + QApplication a(n, s); + QwtPlot* p; + a.setMainWidget(p); + a.exec();, + eval "salome_cv_lib_qwt=yes",eval "salome_cv_lib_qwt=no") + ]) + qwt_ok="$salome_cv_lib_qwt" + + if test "x$qwt_ok" = "xno" + then + AC_MSG_RESULT(unable to link with qwt library) + AC_MSG_RESULT(QWTHOME environment variable may be wrong) + else + QWT_INCLUDES="-I$QWT_INCLUDES" + if test "x$QWTHOME" = "x/usr" + then + QWT_LIBS=" -lqwt" + else + QWT_LIBS="-L$QWTHOME/lib -lqwt" + fi + + AC_SUBST(QWT_INCLUDES) + AC_SUBST(QWT_LIBS) + + AC_MSG_RESULT(yes) + fi + + LIBS=$LIBS_old + CXXFLAGS=$CXXFLAGS_old + +fi + + + AC_LANG_RESTORE + +fi + + +])dnl +dnl diff --git a/adm_local/unix/config_files/check_sip.m4 b/adm_local/unix/config_files/check_sip.m4 new file mode 100644 index 000000000..245f2382e --- /dev/null +++ b/adm_local/unix/config_files/check_sip.m4 @@ -0,0 +1,168 @@ +dnl Copyright (C) 2003 CEA/DEN, EDF R&D + +AC_DEFUN([CHECK_SIP],[ +AC_REQUIRE([CHECK_PYTHON])dnl +AC_REQUIRE([CHECK_QT])dnl + +sip_ok=yes + +AC_ARG_WITH(sip, + [ --with-sip=EXEC sip executable ], + [SIP="$withval" + AC_MSG_RESULT("select $withval as sip executable") + ], [ + AC_PATH_PROG(SIP, sip) + ]) + +if test "x$SIP" = "x" ; then + sip_ok=no + AC_MSG_RESULT(sip not in PATH variable) +else + version=`$SIP -V` + AC_MSG_RESULT(sip version is $version) + case "$version" in + 3.2*) + SIP_VERS=v3_old ;; + 3.3*) + SIP_VERS=v3_old ;; + 3.4*) + SIP_VERS=v3_old ;; + 3.5*) + SIP_VERS=v3_old ;; + 3.6*) + SIP_VERS=v3_old ;; + 3.7*) + SIP_VERS=v3_old ;; + 3.8*) + SIP_VERS=v3_old ;; + 3.9*) + SIP_VERS=v3_old ;; + 3.10*) + SIP_VERS=v3_new ;; + 4.1*) + SIP_VERS=v4_old ;; + 4.2*) + SIP_VERS=v4_new ;; + *) + AC_MSG_RESULT(sip version $version not supported) + SIP_VERS=unsupported ;; + esac + + 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_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_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 + 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 + if test "x${SIPDIR}" = "x/usr/lib" + then + SIP_LIBS="" + else + SIP_LIBS="-L${SIPDIR}" + fi + fi + fi + + 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 + +AC_SUBST(SIP) +AC_SUBST(SIP_INCLUDES) +AC_SUBST(SIP_LIBS) +AC_SUBST(SIP_VERS) + +AC_MSG_RESULT(for sip: $sip_ok) + +])dnl +dnl diff --git a/adm_local/unix/config_files/check_vtk.m4 b/adm_local/unix/config_files/check_vtk.m4 new file mode 100644 index 000000000..df9245b5d --- /dev/null +++ b/adm_local/unix/config_files/check_vtk.m4 @@ -0,0 +1,148 @@ +dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl + +AC_DEFUN([CHECK_VTK],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl + +AC_CHECKING(for VTK) + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +AC_SUBST(VTK_INCLUDES) +AC_SUBST(VTK_LIBS) +AC_SUBST(VTKPY_MODULES) + +VTK_INCLUDES="" +VTK_LIBS="" +VTKPY_MODULES="" + +vtk_ok=no + +AC_PATH_X + +if test "x$OpenGL_ok" != "xyes" +then + AC_MSG_WARN(vtk needs OpenGL correct configuration, check configure output) +fi + +if test "x$x_libraries" != "x" +then + LXLIB="-L$x_libraries" +else + LXLIB="" +fi + +if test "x$x_libraries" = "x/usr/lib" +then + LXLIB="" +fi + +if test "x$x_libraries" = "x/usr/lib" +then + 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" + +if test -z $VTKHOME +then + AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled) + if test -f /usr/include/vtk/vtkPlane.h ; then + AC_MSG_RESULT(trying /usr) + VTKHOME="/usr" + fi +fi + +if test ! -z $VTKHOME +then + LOCAL_INCLUDES="-I$VTKHOME/include/vtk $LOCAL_INCLUDES" + LOCAL_LIBS="-L$VTKHOME/lib/vtk $LOCAL_LIBS" + TRY_LINK_LIBS="-L$VTKHOME/lib/vtk $TRY_LINK_LIBS" +fi + +dnl vtk headers +CPPFLAGS_old="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" + +AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no") + + CPPFLAGS="$CPPFLAGS_old" + + if test "x$vtk_ok" = "xyes" + then + VTK_INCLUDES="$LOCAL_INCLUDES" + + dnl vtk libraries + + AC_MSG_CHECKING(linking VTK library) + + LIBS_old="$LIBS" +# LIBS="$LIBS $TRY_LINK_LIBS" + LIBS="$LIBS $LOCAL_LIBS" + CPPFLAGS_old="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $VTK_INCLUDES" + + dnl VTKPY_MODULES="$VTKHOME/python" + + AC_CACHE_VAL(salome_cv_lib_vtk,[ + AC_TRY_LINK( +#include "vtkPlane.h" +, vtkPlane *p = vtkPlane::New();, + eval "salome_cv_lib_vtk=yes",eval "salome_cv_lib_vtk=no") + ]) + vtk_ok="$salome_cv_lib_vtk" + LIBS="$LIBS_old" + CPPFLAGS="$CPPFLAGS_old" + +fi + +if test "x$vtk_ok" = "xno" +then + AC_MSG_RESULT("no") + AC_MSG_WARN(unable to link with vtk library) +else + AC_MSG_RESULT("yes") + VTK_LIBS="$LOCAL_LIBS" + VTK_MT_LIBS="$LOCAL_LIBS" +fi + +AC_MSG_RESULT("for vtk: $vtk_ok") + +AC_LANG_RESTORE + +# Save cache +AC_CACHE_SAVE + +])dnl + + diff --git a/adm_local/unix/config_files/disable_Corba.m4 b/adm_local/unix/config_files/disable_Corba.m4 new file mode 100644 index 000000000..f2f5e9d06 --- /dev/null +++ b/adm_local/unix/config_files/disable_Corba.m4 @@ -0,0 +1,27 @@ +# +# Check configure option --disable-corba=[yes|no|DIR] taking into account that +# GUI_DISABLE_CORBA may be already set during build_configure, +# Set GUI_DISABLE_CORBA to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([DISABLE_CORBA],[ + +AC_ARG_WITH(corba, + [ --disable-corba default=no ], + disable_corba="$withval",disable_corba="${GUI_DISABLE_CORBA}") + +case $disable_corba in + yes) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(******* DISABLE CORBA configuration ********) +# AC_MSG_RESULT(************************************************) + GUI_DISABLE_CORBA="yes";; + *) + GUI_DISABLE_CORBA="no" +esac + +AC_SUBST(GUI_DISABLE_CORBA) + +])dnl diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index cb1d7e470..68af5d608 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -1,6 +1,7 @@ # common directories to put headerfiles inc_builddir=$(top_builddir)/include/salome +GUI_DISABLE_CORBA=@GUI_DISABLE_CORBA@ @SET_MAKE@ SHELL=/bin/sh @@ -254,14 +255,9 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base ACLOCAL_SRC = \ -ac_cxx_bool.m4 check_corba.m4 check_vtk.m4 \ -ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \ -ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \ -ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \ -ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \ -ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \ -ac_cc_warnings.m4 check_qt.m4 check_swig.m4 \ -check_boost.m4 check_msg2qm.m4 - -$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) +check_qt.m4 check_vtk.m4 check_qwt.m4 \ +check_sip.m4 check_msg2qm.m4 check_pyqt.m4 \ +check_opengl.m4 + +$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=$(top_srcdir)/adm_local/unix/config_files/%) cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files diff --git a/build_configure b/build_configure index ec5cce644..d39c8d7bd 100755 --- a/build_configure +++ b/build_configure @@ -12,14 +12,29 @@ ORIG_DIR=`pwd` CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` +######################################################################## +# Check --disable-corba option + +GUI_DISABLE_CORBA="no" + +for option +do + case $option in + -disable-corba=yes | --disable-corba=yes | -disable-corba | --disable-corba) + GUI_DISABLE_CORBA="yes" + break;; + esac +done + ######################################################################## # Test if the KERNEL_ROOT_DIR is set correctly -if test ! -d "${KERNEL_ROOT_DIR}"; then - echo "failed : KERNEL_ROOT_DIR variable is not correct !" - exit -fi -# Test if the KERNEL_SRC is set correctly +if test "x${GUI_DISABLE_CORBA}" == "xno"; then + if test ! -d "${KERNEL_ROOT_DIR}"; then + echo "failed : KERNEL_ROOT_DIR variable is not correct !" + exit + fi +fi #if test ! -d "${KERNEL_SRC}"; then # echo "failed : KERNEL_SRC variable is not correct !" @@ -107,28 +122,66 @@ if [ -e "${CONF_DIR}/salome_adm" ] ; then \rm -rf ${CONF_DIR}/salome_adm fi +# insert header and AC_INIT(src) which must go before anything else +cat > configure.in_tmp1 <> configure.in_tmp1 + +# insert the configure.in.base +cat configure.in.base >> configure.in_tmp1 + + # make a link allowing AC_OUTPUT to find the salome_adm/.../*.in files echo "" >> configure.in_tmp1 echo 'ln -fs ${KERNEL_ROOT_DIR}/salome_adm ${ROOT_SRCDIR}/.' >> configure.in_tmp1 -echo "" >> configure.in_tmp1 -echo "AC_OUTPUT([ \\" >> configure.in_tmp1 - # # List of .in files in the adm/unix directory # These files MUST be on top of AC_OUTPUT list so we # put them "manually" # - -echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1 -echo " ./adm_local/unix/make_omniorb \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1 -echo " ./adm_local/unix/make_commence \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1 -echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1 +echo "" >> configure.in_tmp1 +echo "AC_OUTPUT([ \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1 +echo " ])" >> configure.in_tmp1 +echo "" >> configure.in_tmp1 +echo 'if test ${GUI_DISABLE_CORBA} == no; then' >> configure.in_tmp1 +echo "{" >> configure.in_tmp1 +echo "AC_OUTPUT([ \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1 +echo " ./adm_local/unix/make_omniorb \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1 +echo " ])" >> configure.in_tmp1 +echo "}" >> configure.in_tmp1 +echo "fi" >> configure.in_tmp1 +echo "" >> configure.in_tmp1 +echo "AC_OUTPUT([ \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1 +echo " ./adm_local/unix/make_commence \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1 \rm -f configure.in_tmp2 configure.in_tmp3 touch configure.in_tmp2 diff --git a/configure.in.base b/configure.in.base index e6be9b20d..043700cde 100644 --- a/configure.in.base +++ b/configure.in.base @@ -1,24 +1,3 @@ -# -# PLEASE DO NOT MODIFY configure.in FILE -# -# ALL CHANGES WILL BE DISCARDED BY THE NEXT -# build_configure COMMAND -# -# CHANGES MUST BE MADE IN configure.in.base FILE -# -# -# Author : Marc Tajchman (CEA) -# Date : 28/06/2001 -# Modified by : Patrick GOLDBRONN (CEA) -# Modified by : Marc Tajchman (CEA) -# -# Created from configure.in.base -# - - -AC_INIT(src) -AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files) -AC_CANONICAL_HOST PACKAGE=salome AC_SUBST(PACKAGE) @@ -45,6 +24,58 @@ echo Build root directory : $ROOT_BUILDDIR echo echo + +dnl remember GUI_DISABLE_CORBA set by build configure +old_disable_corba=${GUI_DISABLE_CORBA} + +dnl +dnl Check --disable-corba option +dnl --------------------------------------------- + DISABLE_CORBA +dnl --------------------------------------------- +dnl + +dnl Update and re-run configure if there was build_configure --disable-corba +dnl but configure --disable-corba=DIR is being called + +if test "x${old_disable_corba}" != "x${GUI_DISABLE_CORBA}"; then + if test "x${old_disable_corba}" == "xyes" ; then + if test ! -d "${KERNEL_ROOT_DIR}"; then + echo "failed : KERNEL_ROOT_DIR variable is not correct !" + exit + fi + kernel_check_in_aclocal=`grep KERNEL_ROOT_DIR ${ROOT_SRCDIR}/aclocal.m4` + if test "x${kernel_check_in_aclocal}" == "x"; then + echo "Configuration changed: disable Corba -> enable Corba" + echo -n "Updating 'configure' script ... " + cd $ROOT_SRCDIR + aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files + if autoconf; then + echo "done" + else + echo "failed (check file permissions and/or user quotas ...)" + cd $ROOT_BUILDDIR + exit + fi + cd $ROOT_BUILDDIR + $0 $* + exit + fi + fi +fi + +dnl AC_CONFIG_AUX_DIR - path to install-sh, config.sub, config.guess, +dnl Automake and Libtool scripts etc. +dnl config.sub, config.guess are needed for AC_CANONICAL_HOST + +AUX_CONFIG_DIR=${KERNEL_ROOT_DIR}/salome_adm/unix/config_files +AC_CONFIG_AUX_DIR(${AUX_CONFIG_DIR}) +AC_CANONICAL_HOST + +dnl Modification B. Secher portage sur osf CCRT +AC_CHECK_PROG(SHELL,sh,,) +AC_SUBST(SHELL) + if test -z "$AR"; then AC_CHECK_PROGS(AR,ar xar,:,$PATH) fi @@ -284,13 +315,14 @@ echo CHECK_HTML_GENERATORS -echo -echo --------------------------------------------- -echo Testing Kernel -echo --------------------------------------------- -echo - -CHECK_KERNEL +if test "$GUI_DISABLE_CORBA" == "no"; then + echo + echo --------------------------------------------- + echo Testing Kernel + echo --------------------------------------------- + echo + CHECK_KERNEL +fi echo echo --------------------------------------------- @@ -298,7 +330,12 @@ echo Summary echo --------------------------------------------- echo -echo Configure +if test "$GUI_DISABLE_CORBA" == "yes"; then + echo "Configure (without Corba)" +else + echo Configure +fi + variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok" for var in $variables diff --git a/src/Makefile.in b/src/Makefile.in index 332907b5c..e9adbe0d4 100755 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -33,8 +33,14 @@ VPATH=.:@srcdir@ @COMMENCE@ SUBDIRS = Qtx DDS QDS SUIT STD CAF CAM SUITApp VTKViewer OCCViewer GLViewer \ - LogWindow Event OBJECT Prs PyInterp PythonConsole ObjBrowser \ - RegistryDisplay Plot2d TOOLSGUI SOCC SVTK SPlot2d SUPERVGraph \ - LightApp Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT Style ResExporter + LogWindow OBJECT Prs PyInterp PythonConsole ObjBrowser Plot2d \ + SOCC SVTK SPlot2d SUPERVGraph LightApp \ + Style ResExporter + +ifeq ($(GUI_DISABLE_CORBA),no) + SUBDIRS += RegistryDisplay TOOLSGUI \ + Event Session SalomeApp SALOME_SWIG SALOME_PY SALOME_PYQT +endif + @MODULE@ diff --git a/src/SPlot2d/Makefile.in b/src/SPlot2d/Makefile.in index d0a8d1604..44334e80b 100644 --- a/src/SPlot2d/Makefile.in +++ b/src/SPlot2d/Makefile.in @@ -39,8 +39,8 @@ LIB_MOC = \ # SALOME_GenericObj.idl #CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(OGL_INCLUDES) $(PYTHON_INCLUDES) $(QWT_INCLUDES) $(BOOST_CPPFLAGS) -I$(KERNEL_ROOT_DIR)/include/salome -CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(QWT_INCLUDES) $(BOOST_CPPFLAGS) -I$(KERNEL_ROOT_DIR)/include/salome -LDFLAGS+=$(QT_MT_LIBS) $(QWT_LIBS) -L$(KERNEL_ROOT_DIR)/lib/salome -lsuit -lPlot2d -lSalomePrs +CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(QWT_INCLUDES) $(BOOST_CPPFLAGS) +LDFLAGS+=$(QT_MT_LIBS) $(QWT_LIBS) -lsuit -lPlot2d -lSalomePrs @CONCLUDE@ diff --git a/src/SUPERVGraph/Makefile.in b/src/SUPERVGraph/Makefile.in index 149feb93f..533fc020c 100755 --- a/src/SUPERVGraph/Makefile.in +++ b/src/SUPERVGraph/Makefile.in @@ -34,7 +34,7 @@ RESOURCES_FILES = view_pan.png \ LIB_CLIENT_IDL = -CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) -I${KERNEL_ROOT_DIR}/include/salome +CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) LDFLAGS+=$(QT_MT_LIBS) -L$(top_builddir)/lib