#
# Created from configure.in.base
#
-
+AS_SHELL_SANITIZES
AC_INIT(src)
AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
AC_CANONICAL_HOST
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
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
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,.,"`
--- /dev/null
+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_OPTION(-option,variable where we add option if ok,action if ok; action if not ok)
+dnl
+dnl Check options for C++ compiler
+dnl
+dnl @author Bernard Secher - 15/01/2004
+dnl
+AC_DEFUN([AX_CXX_OPTION], [
+ AC_MSG_CHECKING(CXXFLAGS for $CXX in $1)
+ cat > conftest.cxx <<EOF
+int main(int argc, char **argv) { return 0; }
+EOF
+ $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
+])
+
+
+++ /dev/null
-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_WARNINGS
-dnl
-dnl Check warning flags for C++ compiler to control warning messages
-dnl
-dnl @author Bernard Secher (CEA) - 04/12/2003
-dnl
-AC_DEFUN([AC_CXX_TEMPLATE_DEPTH],[
- AC_MSG_CHECKING(c++ compiler have template-depth flag)
- cat > conftest.cxx <<EOF
-int main(int argc, char **argv) { return 0; }
-EOF
- fTMPDPTH_FLAG=no
- for ac_CXX_TMPDPTH_FLAG in -ftemplate-depth-42 "-pending_instantiations 42" ; do
- if $CXX ${ac_CXX_TMPDPTH_FLAG} 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
- AC_MSG_RESULT(no)
- fi
- AC_SUBST(CXXTMPDPTHFLAGS)
-])
--- /dev/null
+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)
+])
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 <<EOF
-int main(int argc, char **argv) { return 0; }
-EOF
- fNODEP_FLAG=no
- for ac_CXX_NODEP_FLAG in -Wno-deprecated; do
- if $CXX ${ac_CXX_NODEP_FLAG} 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)
])
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 <<EOF
-int main(int argc, char **argv) { return 0; }
-EOF
- fEXPDYN_FLAG=no
- for ac_LD_EXPDYN_FLAG in "-Xlinker -export-dynamic" -transitive_link; do
- if $CXX ${ac_LD_EXPDYN_FLAG} 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
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 <<EOF
-int main(int argc, char **argv) { return 0; }
-EOF
- fUCHAR_FLAG=no
- for ac_CXX_UCHAR_FLAG in -funsigned-char -unsigned ; do
- if $CXX ${ac_CXX_UCHAR_FLAG} 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
# 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"
# 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
dnl ----------------------------------------------------------------
dnl CHECK_PTHREADS
AC_DEFUN(CHECK_PTHREADS,[
-AC_MSG_CHECKING(flags for using pthreads)
-cat > conftest.cxx <<EOF
-int main(int argc, char **argv) { return 0; }
-EOF
-fPTH_FLAG=no
-for ac_CXX_PTH_FLAG in -pthread ; do
- if $CXX ${ac_CXX_PTH_FLAG} 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="")
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
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"
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
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"
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}"
# PYQT
PYQT_SIPS = @PYQT_SIPS@
+PYQT_INCLUDES = @PYQT_INCLUDES@
PYQT_LIBS = @PYQT_LIBS@
# openGL
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