From 61b80bf84963d69b5b2ab633c374779b501acc81 Mon Sep 17 00:00:00 2001 From: secher Date: Wed, 21 Jan 2004 08:55:15 +0000 Subject: [PATCH] portage CCRT alpha/osf --- configure.in.base | 8 +- ...cxx_template_depth.m4 => ac_cxx_option.m4} | 31 +++-- .../config_files/ac_cxx_template_options.m4 | 39 ++++++ .../unix/config_files/ac_cxx_warnings.m4 | 31 +---- .../unix/config_files/ac_linker_options.m4 | 16 +-- salome_adm/unix/config_files/check_cas.m4 | 20 +--- .../unix/config_files/check_pthreads.m4 | 18 +-- salome_adm/unix/config_files/check_pyqt.m4 | 112 +++++++----------- salome_adm/unix/config_files/check_sip.m4 | 17 ++- salome_adm/unix/make_commence.in | 1 + src/Makefile.in | 5 +- 11 files changed, 126 insertions(+), 172 deletions(-) rename salome_adm/unix/config_files/{ac_cxx_template_depth.m4 => ac_cxx_option.m4} (63%) create mode 100644 salome_adm/unix/config_files/ac_cxx_template_options.m4 diff --git a/configure.in.base b/configure.in.base index 872de60ef..f946353c7 100644 --- a/configure.in.base +++ b/configure.in.base @@ -14,7 +14,7 @@ # # Created from configure.in.base # - +AS_SHELL_SANITIZES AC_INIT(src) AC_CONFIG_AUX_DIR(salome_adm/unix/config_files) AC_CANONICAL_HOST @@ -49,7 +49,7 @@ echo echo dnl Modification B. Secher portage sur osf -AC_PATH_PROG(SHELL,sh,,) +AC_CHECK_PROG(SHELL,sh,,) AC_SUBST(SHELL) if test -z "$AR"; then @@ -105,7 +105,7 @@ dnl inutil car libtool dnl AC_PROG_CC AC_PROG_CXX AC_CXX_WARNINGS -AC_CXX_TEMPLATE_DEPTH +AC_CXX_TEMPLATE_OPTIONS AC_DEPEND_FLAG #AC_CC_WARNINGS([ansi]) cc_ok=yes @@ -370,7 +370,7 @@ dnl copy shells and utilities contained in the bin directory dnl excluding .in files (treated in AC-OUTPUT below) and CVS dnl directory -cd bin +cd $ROOT_BUILDDIR/bin for i in $ROOT_SRCDIR/bin/* do local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"` diff --git a/salome_adm/unix/config_files/ac_cxx_template_depth.m4 b/salome_adm/unix/config_files/ac_cxx_option.m4 similarity index 63% rename from salome_adm/unix/config_files/ac_cxx_template_depth.m4 rename to salome_adm/unix/config_files/ac_cxx_option.m4 index 1753d6dc8..4c51d67fe 100644 --- a/salome_adm/unix/config_files/ac_cxx_template_depth.m4 +++ b/salome_adm/unix/config_files/ac_cxx_option.m4 @@ -19,28 +19,27 @@ dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencasc dnl dnl dnl -dnl @synopsis AC_CXX_WARNINGS +dnl @synopsis AC_CXX_OPTION(-option,variable where we add option if ok,action if ok; action if not ok) dnl -dnl Check warning flags for C++ compiler to control warning messages +dnl Check options for C++ compiler dnl -dnl @author Bernard Secher (CEA) - 04/12/2003 +dnl @author Bernard Secher - 15/01/2004 dnl -AC_DEFUN([AC_CXX_TEMPLATE_DEPTH],[ - AC_MSG_CHECKING(c++ compiler have template-depth flag) +AC_DEFUN([AX_CXX_OPTION], [ + AC_MSG_CHECKING(CXXFLAGS for $CXX in $1) cat > conftest.cxx < /dev/null 2>&1; then - CXXTMPDPTHFLAGS="${ac_CXX_TMPDPTH_FLAG}" - AC_MSG_RESULT(${ac_CXX_TMPDPTH_FLAG}) - fTMPDPTH_FLAG=yes - break - fi - done - if test $fTMPDPTH_FLAG = no; then + $CXX $1 conftest.cxx > conftest.log 2>&1 + var=`echo $1 | sed -e "s, .*$,," | sed -e "s,^-,,"` + if ! grep -e $var conftest.log > /dev/null 2>&1 ; then + AC_MSG_RESULT(yes) + $2="${$2} $1" + eval $3 + else AC_MSG_RESULT(no) + eval $4 fi - AC_SUBST(CXXTMPDPTHFLAGS) ]) + + diff --git a/salome_adm/unix/config_files/ac_cxx_template_options.m4 b/salome_adm/unix/config_files/ac_cxx_template_options.m4 new file mode 100644 index 000000000..9e256c0ed --- /dev/null +++ b/salome_adm/unix/config_files/ac_cxx_template_options.m4 @@ -0,0 +1,39 @@ +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 +dnl @synopsis AC_CXX_TEMPLATE_OPTIONS +dnl +dnl Check template options for C++ compiler +dnl +dnl @author Bernard Secher (CEA) - 04/12/2003 +dnl +AC_DEFUN([AC_CXX_TEMPLATE_OPTIONS],[ +dnl + for opt in -ftemplate-depth-42 "-pending_instantiations 42" ; do + AX_CXX_OPTION($opt,CXXTMPDPTHFLAGS,flag=yes,flag=no) + if test "$flag" = "yes"; then + break + fi + AC_SUBST(CXXTMPDPTHFLAGS) + done +dnl + AX_CXX_OPTION(-ptr $ROOT_BUILDDIR/cxx_repository,CXXFLAGS) +]) diff --git a/salome_adm/unix/config_files/ac_cxx_warnings.m4 b/salome_adm/unix/config_files/ac_cxx_warnings.m4 index f37689c73..11934b1ac 100644 --- a/salome_adm/unix/config_files/ac_cxx_warnings.m4 +++ b/salome_adm/unix/config_files/ac_cxx_warnings.m4 @@ -26,34 +26,5 @@ dnl dnl @author Bernard Secher (CEA) - 04/12/2003 dnl AC_DEFUN([AC_CXX_WARNINGS],[ - AC_MSG_CHECKING(c++ compiler have no-deprecated flag) - cat > conftest.cxx < /dev/null 2>&1; then - CXXFLAGS="$CXXFLAGS ${ac_CXX_NODEP_FLAG}" - AC_MSG_RESULT(${ac_CXX_NODEP_FLAG}) - fNODEP_FLAG=yes - break - fi - done - if test $fNODEP_FLAG = no; then - AC_MSG_RESULT(no) - fi -dnl - AC_MSG_CHECKING(c++ compiler have repository flag) - fREP_FLAG=no - for ac_CXX_REP_FLAG in "-ptr ${ROOT_BUILDDIR}/cxx_repository"; do - if $CXX ${ac_CXX_REP_FLAG} conftest.cxx > /dev/null 2>&1; then - CXXFLAGS="$CXXFLAGS ${ac_CXX_REP_FLAG}" - AC_MSG_RESULT(${ac_CXX_REP_FLAG}) - fREP_FLAG=yes - break - fi - done - if test $fREP_FLAG = no; then - AC_MSG_RESULT(no) - fi + AX_CXX_OPTION(-Wno-deprecated,CXXFLAGS) ]) diff --git a/salome_adm/unix/config_files/ac_linker_options.m4 b/salome_adm/unix/config_files/ac_linker_options.m4 index 32a5d8e14..95a1b5b95 100644 --- a/salome_adm/unix/config_files/ac_linker_options.m4 +++ b/salome_adm/unix/config_files/ac_linker_options.m4 @@ -26,22 +26,12 @@ dnl dnl @author Bernard Secher (CEA) - 04/12/2003 dnl AC_DEFUN([AC_LINKER_OPTIONS],[ - AC_MSG_CHECKING(loader have export dynamic option) - cat > conftest.cxx < /dev/null 2>&1; then - LDEXPDYNFLAGS="${ac_LD_EXPDYN_FLAG}" - AC_MSG_RESULT(${ac_LD_EXPDYN_FLAG}) - fEXPDYN_FLAG=yes + for opt in "-Xlinker -export-dynamic" -transitive_link; do + AX_CXX_OPTION($opt,LDEXPDYNFLAGS,flag=yes,flag=no) + if test "$flag" = "yes"; then break fi done - if test $fEXPDYN_FLAG = no; then - AC_MSG_RESULT(no) - fi AC_SUBST(LDEXPDYNFLAGS) dnl case $host_os in diff --git a/salome_adm/unix/config_files/check_cas.m4 b/salome_adm/unix/config_files/check_cas.m4 index 1188558f7..0ae6c36c2 100644 --- a/salome_adm/unix/config_files/check_cas.m4 +++ b/salome_adm/unix/config_files/check_cas.m4 @@ -101,22 +101,12 @@ fi if test "x$occ_ok" = "xyes"; then dnl test c++ compiler flag for unsigned character - AC_MSG_CHECKING(c++ compiler have unsigned character flag) - cat > conftest.cxx < /dev/null 2>&1; then - CXXFLAGS="$CXXFLAGS ${ac_CXX_UCHAR_FLAG}" - AC_MSG_RESULT(${ac_CXX_UCHAR_FLAG}) - fUCHAR_FLAG=yes + for opt in -funsigned-char -unsigned ; do + AX_CXX_OPTION($opt,CXXFLAGS,flag=yes,flag=no) + if test "$flag" = "yes"; then break fi done - if test $fUCHAR_FLAG = no; then - AC_MSG_RESULT(no) - fi dnl cascade headers @@ -159,7 +149,7 @@ else # E.A. compatibility version 4 and 5.x CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKCAF -lFWOSPlugin -lTKPShape -lTKPCAF -lTKStdSchema -lTKShapeSchema -lPAppStdPlugin" - if test $OCC_VERSION_MAJOR < 5 ; then + if test $OCC_VERSION_MAJOR -lt 5 ; then CAS_OCAF="$CAS_OCAF -lTKPAppStd" fi CAS_OCAF="$CAS_OCAF -lTKCDF" @@ -169,7 +159,7 @@ else # E.A. compatibility version 4 and 5.x CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing" - if test $OCC_VERSION_MAJOR < 5 ; then + if test $OCC_VERSION_MAJOR -lt 5 ; then CAS_DATAEXCHANGE="$CAS_DATAEXCHANGE -lTKShHealingStd" fi diff --git a/salome_adm/unix/config_files/check_pthreads.m4 b/salome_adm/unix/config_files/check_pthreads.m4 index 895ede57d..7c6b91eeb 100644 --- a/salome_adm/unix/config_files/check_pthreads.m4 +++ b/salome_adm/unix/config_files/check_pthreads.m4 @@ -30,21 +30,9 @@ dnl@id $Id$ dnl ---------------------------------------------------------------- dnl CHECK_PTHREADS AC_DEFUN(CHECK_PTHREADS,[ -AC_MSG_CHECKING(flags for using pthreads) -cat > conftest.cxx < /dev/null 2>&1; then - CPPFLAGS="$CPPFLAGS ${ac_CXX_PTH_FLAG}" - fPTH_FLAG=yes - AC_MSG_RESULT($ac_CXX_PTH_FLAG) - break - fi -done +AX_CXX_OPTION(-pthread,CPPFLAGS,flag=yes,flag=no) -if test $fPTH_FLAG = no; then +if test $flag = no; then AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl AC_CHECK_HEADER(pthread.h,AC_DEFINE(HAVE_PTHREAD_H)) AC_CHECK_LIB(posix4,nanosleep, LIBS_PTHREADS="-lposix4",LIBS_PTHREADS="") @@ -52,7 +40,7 @@ if test $fPTH_FLAG = no; then LIBS_PTHREADS="-lpthread $LIBS_PTHREADS",LIBS_PTHREADS="") fi -if test $fPTH_FLAG = no && x$LIBS_PTHREADS = x; then +if test $flag = no && x$LIBS_PTHREADS = x; then threads_ok=no else threads_ok=yes diff --git a/salome_adm/unix/config_files/check_pyqt.m4 b/salome_adm/unix/config_files/check_pyqt.m4 index eb11bf251..8977452d2 100644 --- a/salome_adm/unix/config_files/check_pyqt.m4 +++ b/salome_adm/unix/config_files/check_pyqt.m4 @@ -3,30 +3,6 @@ dnl Copyright (C) 2003 CEA/DEN, EDF R&D AC_DEFUN([CHECK_PYQT],[ AC_REQUIRE([CHECK_PYTHON])dnl -AC_CHECKING(for pyqt) - -pyqt_ok=no - -PYTHON_SITE_PACKPYQT=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages -AC_CHECK_FILES($PYTHON_SITE_PACKPYQT/qt.py $PYTHON_SITE_PACKPYQT/libqtcmodule.so,pyqt_ok=yes,pyqt_ok=no) -if test "x$pyqt_ok" = xyes ; then - PYQT_INCLUDES="-I $PYTHON_SITE_PACKPYQT" - PYQT_LIBS="-L$PYTHON_SITE_PACKPYQT -lqtcmodule" -fi - -if test "x$pyqt_ok" = xyes ; then - AC_CHECK_FILES(/usr/share/sip/qt/qtmod.sip,pyqt_ok=yes,pyqt_ok=no) - if test "x$pyqt_ok" = xyes ; then - PYQT_SIPS="/usr/share/sip/qt" - fi - AC_SUBST(PYQT_INCLUDES) - AC_SUBST(PYQT_LIBS) - AC_SUBST(PYQT_SIPS) -else - - pyqt_ok=yes - dnl were is pyqt ? - AC_ARG_WITH(pyqt, [ --with-pyqt=DIR root directory path to PyQt installation ], [PYQTDIR="$withval" @@ -46,66 +22,62 @@ AC_ARG_WITH(pyuic, AC_MSG_RESULT("select $withval as pyqt executable") ]) +AC_CHECKING(for pyqt) -if test -z $PYQTDIR; then - PYQTDIR="/usr/lib/python${PYTHON_VERSION}/site-packages" -else - if test -z $PYQT_SIPS; then - PYQT_SIPS="$PYQTDIR/sip" - fi - if test -z $PYUIC; then - AC_CHECK_FILE("$PYQTDIR/pyuic",pyqt_ok=yes,pyqt_ok=no) - if test "x$pyqt_ok" = xyes ; then - PYUIC="$PYQTDIR/pyuic" - else - AC_PATH_PROG(PYUIC, pyuic) - fi - fi +pyqt_ok=no + +if test "x$PYQTDIR" = x; then + PYQTDIR="/usr" fi -if test -z $PYQT_SIPS; then - PYQT_SIPS="/usr/share/sip/qt" +if test "x$PYQT_SIPS" = x; then + PYQT_SIPS="/usr/share/sip/qt" fi -if test -z $PYUIC; then - PYUIC="/usr/bin/pyuic" +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 + fi fi -AC_CHECK_FILES("$PYQTDIR/qt.py","$PYQTDIR/qt/qt.py",pyqt_ok=yes,pyqt_ok=no) -if test "x$pyqt_ok" = xno ; then - AC_MSG_WARN(pyqt not found) +if test -d $PYQTDIR/bin; then + PYQTBIN=$PYQTDIR/bin else - AC_CHECK_FILE("$PYQTDIR/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no) - if test "x$pyqt_ok" = xno ; then - AC_MSG_WARN(pyqt not found) - else - PYQT_ROOT=$PYQTDIR - PYQT_LIBS="-L$PYQTDIR -lqtcmodule" - fi - AC_CHECK_FILE("$PYQT_SIPS/copying.sip",pyqt_ok=yes,pyqt_ok=no) - if test "x$pyqt_ok" = xno ; then - AC_MSG_WARN(pyqt not found) - else - PYQT_INCLUDES="-I$PYQT_SIPS" - fi - - AC_SUBST(PYQT_ROOT) - AC_SUBST(PYQT_INCLUDES) - AC_SUBST(PYQT_LIBS) + PYQTBIN=$PYQTDIR +fi + +AC_CHECK_FILE("$PYQTBIN/pyuic",pyqt_ok=yes,pyqt_ok=no) +if test "x$pyqt_ok" = xyes ; then + AC_CHECK_FILES("$PYQTLIB/qt.py",pyqt_ok=yes,pyqt_ok=no) fi -PYQT_ROOT=$PYQTDIR -PYQT_INCLUDES="-I$PYQT_SIPS" -PYQT_LIBS="-L$PYQTDIR -lqtcmodule" +if test "x$pyqt_ok" = xyes ; then + AC_CHECK_FILE("$PYQTLIB/libqtcmodule.so",pyqt_ok=yes,pyqt_ok=no) +fi -AC_SUBST(PYQT_ROOT) -AC_SUBST(PYQT_INCLUDES) -AC_SUBST(PYUIC) -AC_SUBST(PYQT_SIPS) -AC_SUBST(PYQT_LIBS) +if test "x$pyqt_ok" = xyes ; then + AC_CHECK_FILES("$PYQT_SIPS/qtmod.sip",pyqt_ok=yes,pyqt_ok=no) +fi +if test "x$pyqt_ok" = xyes ; then + AC_CHECK_FILE("$PYQT_SIPS/copying.sip",pyqt_ok=yes,pyqt_ok=no) +fi +if test "x$pyqt_ok" = xyes ; then + PYQT_ROOT=$PYQTDIR + PYQT_INCLUDES="-I$PYQT_SIPS" + PYQT_LIBS="-L$PYQTLIB -lqtcmodule" + AC_SUBST(PYQT_ROOT) + AC_SUBST(PYQT_INCLUDES) + AC_SUBST(PYQT_LIBS) + AC_SUBST(PYQT_SIPS) + AC_SUBST(PYUIC) fi + ])dnl dnl diff --git a/salome_adm/unix/config_files/check_sip.m4 b/salome_adm/unix/config_files/check_sip.m4 index d66f84e6e..f5f1fc614 100644 --- a/salome_adm/unix/config_files/check_sip.m4 +++ b/salome_adm/unix/config_files/check_sip.m4 @@ -28,10 +28,17 @@ else sip_vers=new ;; 3.5*) sip_vers=new ;; + 3.6*) + sip_vers=new ;; + 3.7*) + sip_vers=new ;; + 3.8*) + sip_vers=new ;; + 3.9*) + sip_vers=new ;; *) sip_vers=no ;; esac - sip_ok=no if test "x$sip_vers" = "xold" @@ -44,11 +51,11 @@ else if test "x$sip_vers" = "xnew" then - if test -z ${SIPDIR}/include ; then - sip_ok=yes + sip_ok=yes + if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then SIP_ROOT="$SIPDIR" - SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include" - SIP_LIBS="-L${SIPDIR}/lib -lsip" + SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include/python${PYTHON_VERSION}" + SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip" else SIP_ROOT="$SIPDIR" SIP_INCLUDES="-I${SIPDIR}" diff --git a/salome_adm/unix/make_commence.in b/salome_adm/unix/make_commence.in index f0ab99393..608947b34 100644 --- a/salome_adm/unix/make_commence.in +++ b/salome_adm/unix/make_commence.in @@ -78,6 +78,7 @@ SIP_LIBS = @SIP_LIBS@ # PYQT PYQT_SIPS = @PYQT_SIPS@ +PYQT_INCLUDES = @PYQT_INCLUDES@ PYQT_LIBS = @PYQT_LIBS@ # openGL diff --git a/src/Makefile.in b/src/Makefile.in index 110100d9e..6bdf3f75d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -36,11 +36,8 @@ SUBDIRS = MSG2QM Logger Utils PatchQt NamingService Registry ModuleCatalog DataT RessourcesCatalog Notification NOTIFICATION_SWIG Container TestContainer LifeCycleCORBA \ HDFPersist OBJECT TOOLSDS SALOMEDS SALOMEGUI Plot2d VTKViewer OCCViewer SUPERVGraph Session \ SALOME_SWIG TOOLSGUI SALOME_PY RegistryDisplay ModuleGenerator \ - Loader + SALOME_PYQT Loader -ifeq (@pyqt_ok@,yes) - SUBDIRS+= SALOME_PYQT -endif ifeq (@WITHMPICH@,yes) SUBDIRS+= MPIContainer MPILifeCycleCORBA TestMPIContainer endif -- 2.39.2