echo "conftest.o: conftest.c" > conftest.verif
echo "int main() { return 0; }" > conftest.c
-dnl Evolution portage sur CCRT/osf system
- case $host_os in
- osf*)
-dnl sur CCRT/osf pas d'equivalent de l'option -MG de gcc avec compilo natif
-dnl on utilise donc gnu pour generer les dependances.
- DEPCC=gcc
- DEPCXX=g++
- DEPCXXFLAGS="-Wno-deprecated -funsigned-char"
- DIFFFLAGS="-w"
- ;;
- *)
- DEPCC=${CC-cc}
- DEPCXX=${CXX-c++}
- DEPCXXFLAGS="\${CXXFLAGS}"
- DIFFFLAGS="-b -B"
- ;;
- esac
C_DEPEND_FLAG=
for ac_C_DEPEND_FLAG in -xM -MM -M ; do
rm -f conftest.d conftest.err
- ${DEPCC} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err
+ ${CC-cc} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err
if test -f conftest.u ; then
mv conftest.u conftest.d
fi
rm -f conftest
- diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+ diff -b -B conftest.d conftest.verif > conftest
if test ! -s conftest ; then
C_DEPEND_FLAG=${ac_C_DEPEND_FLAG}
break
dnl use gcc option -MG : asume unknown file will be construct later
rm -f conftest.d conftest.err
- ${DEPCC} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err
+ ${CC-cc} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err
if test -f conftest.u ; then
mv conftest.u conftest.d
fi
rm -f conftest
- diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+ diff -b -B conftest.d conftest.verif > conftest
if test ! -s conftest ; then
C_DEPEND_FLAG=${C_DEPEND_FLAG}" -MG"
fi
exit
fi
- printf " C : ${DEPCC} ${C_DEPEND_FLAG}"
+ echo -n " C : " ${C_DEPEND_FLAG}
AC_LANG_CPLUSPLUS
echo "conftest.o: conftest.cxx" > conftest.verif
for ac_CXX_DEPEND_FLAG in -xM -MM -M ; do
rm -f conftest.d conftest.err
- ${DEPCXX} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err
+ ${CXX-c++} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err
if test -f conftest.u ; then
mv conftest.u conftest.d
fi
rm -f conftest
- diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+ diff -b -B conftest.d conftest.verif > conftest
if test ! -s conftest ; then
CXX_DEPEND_FLAG=${ac_CXX_DEPEND_FLAG}
break
dnl use g++ option -MG : asume unknown file will be construct later
rm -f conftest.d conftest.err
- ${DEPCXX} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err
+ ${CXX-c++} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err
if test -f conftest.u ; then
mv conftest.u conftest.d
fi
rm -f conftest
- diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+ diff -b -B conftest.d conftest.verif > conftest
if test ! -s conftest ; then
CXX_DEPEND_FLAG=${CXX_DEPEND_FLAG}" -MG"
fi
exit
fi
- printf " C++ : ${DEPCXX} ${CXX_DEPEND_FLAG}"
+ echo -n " C++ : " ${CXX_DEPEND_FLAG}
AC_LANG_RESTORE
- AC_SUBST(DEPCC)
- AC_SUBST(DEPCXX)
- AC_SUBST(DEPCXXFLAGS)
AC_SUBST(C_DEPEND_FLAG)
AC_SUBST(CXX_DEPEND_FLAG)
])
Kernel_ok=no
AC_ARG_WITH(kernel,
- [ --with-kernel=DIR root directory path of KERNEL installation ],
+ [ --with-kernel=DIR root directory path of KERNEL build or installation],
KERNEL_DIR="$withval",KERNEL_DIR="")
if test "x$KERNEL_DIR" == "x" ; then
else
AC_MSG_WARN("Cannot find compiled Kernel module distribution")
fi
-
+
AC_MSG_RESULT(for Kernel: $Kernel_ok)
])dnl
--- /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
+AC_DEFUN([CHECK_BOOST],[
+
+AC_CHECKING(for BOOST Library)
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+AC_SUBST(BOOST_CPPFLAGS)
+BOOST_CPPFLAGS=""
+boost_ok=no
+
+if test -z ${BOOSTDIR}; then
+ AC_MSG_WARN(You must provide BOOSTDIR variable)
+else
+ AC_MSG_RESULT(\$BOOSTDIR = ${BOOSTDIR})
+ AC_CHECKING(for boost/shared_ptr.hpp header file)
+ dnl BOOST headers
+ CPPFLAGS_old="${CPPFLAGS}"
+ BOOST_CPPFLAGS="-ftemplate-depth-32 -I${BOOSTDIR}"
+ CPPFLAGS="${CPPFLAGS} ${BOOST_CPPFLAGS}"
+
+ AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no)
+
+ CPPFLAGS="${CPPFLAGS_old}"
+ boost_ok=yes
+fi
+
+AC_LANG_RESTORE
+
+])dnl
+
+
AC_SUBST(CAS_OCAF)
AC_SUBST(CAS_DATAEXCHANGE)
AC_SUBST(CAS_LDFLAGS)
+
AC_SUBST(CAS_LDPATH)
CAS_CPPFLAGS=""
irix6.*)
casdir=Linux
;;
- osf*)
+ osf4.*)
casdir=Linux
;;
solaris2.*)
;;
esac
-AC_MSG_CHECKING(for OpenCascade directories)
-if test -d ${CASROOT}/${casdir}/lib; then
- CAS_LDPATH="-L$CASROOT/$casdir/lib "
- AC_MSG_RESULT(yes)
-else
- if test -d ${CASROOT}/lib; then
- CAS_LDPATH="-L$CASROOT/lib "
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- fi
-fi
-
-
dnl were is OCC ?
if test -z $CASROOT; then
AC_MSG_WARN(You must provide CASROOT variable : see OCC installation manual)
if test "x$occ_ok" = "xyes"; then
-dnl test c++ compiler flag for unsigned character
- for opt in -funsigned-char -unsigned ; do
- AC_CXX_OPTION($opt,CXXFLAGS,flag=yes,flag=no)
- if test "$flag" = "yes"; then
- break
- fi
- done
-
dnl cascade headers
CPPFLAGS_old="$CPPFLAGS"
- CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -I$CASROOT/inc"
- CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -I$CASROOT/inc -I$CASROOT -Wno-deprecated -DHAVE_WOK_CONFIG_H"
+ CXXFLAGS_old="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -funsigned-char"
AC_CHECK_HEADER(Standard_Type.hxx,occ_ok=yes ,occ_ok=no)
+ CPPFLAGS="$CPPFLAGS_old"
+ CXXFLAGS="$CXXFLAGS_old"
fi
if test "x$occ_ok" = xyes ; then
+ CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -I$CASROOT/inc -I$CASROOT -DHAVE_WOK_CONFIG_H"
+ CAS_CXXFLAGS="-funsigned-char"
+
AC_MSG_CHECKING(for OpenCascade libraries)
+ CPPFLAGS_old="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS -Wno-deprecated"
+ CXXFLAGS_old="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $CAS_CXXFLAGS"
LIBS_old="$LIBS"
- LIBS="$LIBS $CAS_LDPATH -lTKernel"
-
+ LIBS="$LIBS -L$CASROOT/$casdir/lib -lTKernel"
AC_CACHE_VAL(salome_cv_lib_occ,[
AC_TRY_LINK(
+using namespace std;
#include <Standard_Type.hxx>
, size_t size;
const Standard_CString aName="toto";
])
occ_ok="$salome_cv_lib_occ"
+ CPPFLAGS="$CPPFLAGS_old"
+ CXXFLAGS="$CXXFLAGS_old"
+ LIBS="$LIBS_old"
fi
-CPPFLAGS="$CPPFLAGS_old"
-LIBS="$LIBS_old"
if test "x$occ_ok" = xno ; then
AC_MSG_RESULT(no)
AC_MSG_WARN(Opencascade libraries not found)
else
AC_MSG_RESULT(yes)
+ CAS_LDPATH="-L$CASROOT/$casdir/lib "
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"
- if test $OCC_VERSION_MAJOR -lt 5 ; then
- CAS_OCAF="$CAS_OCAF -lTKPAppStd"
- fi
- CAS_OCAF="$CAS_OCAF -lTKCDF"
-
+ CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKCAF -lFWOSPlugin -lTKPShape -lTKPCAF -lTKStdSchema -lTKShapeSchema -lPAppStdPlugin -lTKPAppStd -lTKCDF"
+dnl CAS_VIEWER="-L$CASROOT/$casdir/lib -lTKOpenGl -lTKV3d -lTKV2d -lTKService"
CAS_VIEWER="$CAS_LDPATH -lTKOpenGl -lTKV3d -lTKService"
+# CAS_MODELER="-L$CASROOT/$casdir/lib -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKFeat -lTKOffset"
CAS_MODELER="$CAS_LDPATH -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKOffset"
-
- # E.A. compatibility version 4 and 5.x
- CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing"
- if test $OCC_VERSION_MAJOR -lt 5 ; then
- CAS_DATAEXCHANGE="$CAS_DATAEXCHANGE -lTKShHealingStd"
- fi
-
-
+dnl CAS_DATAEXCHANGE="-L$CASROOT/$casdir/lib -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing -lTKShHealingStd -lTKSTL -lTKVRML "
+ CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing -lTKShHealingStd"
CAS_LDFLAGS="$CAS_KERNEL $CAS_OCAF $CAS_VIEWER $CAS_MODELER $CAS_DATAEXCHANGE"
-
+
+
fi
AC_LANG_RESTORE
if test "x$DOXYGEN" = "x"
then
doxygen_ok=no
+ AC_MSG_RESULT(no)
AC_MSG_WARN(doxygen not found)
+else
+ dnl AC_SUBST(DOXYGEN)
+ AC_MSG_RESULT(yes)
fi
AC_CHECKING(for graphviz)
if test "x$DOT" = "x" ; then
graphviz_ok=no
+ AC_MSG_RESULT(no)
AC_MSG_WARN(graphviz not found)
+else
+ AC_MSG_RESULT(yes)
fi
])dnl
if test "$WITHMPICH" = "yes";then
LDFLAGS_old="$LDFLAGS"
LDFLAGS="$MPICH_LIBS $LDFLAGS"
- AC_CHECK_LIB(mpich,MPI_Init,WITHMPICH="yes",WITHMPICH="no")
+ AC_CHECK_LIB(mpich,MPI_Init,
+ AC_CHECK_LIB(pmpich, PMPI_Init,WITHMPICH="yes",WITHMPICH="no"),
+ WITHMPICH="no")
LDFLAGS="$LDFLAGS_old"
fi
- if test "$WITHMPICH" = "yes";then
- mpich_ok=yes
- MPICH_LIBS="$MPICH_LIBS -lmpich"
- fi
-
+ MPICH_LIBS="$MPICH_LIBS -lpmpich -lmpich"
fi
AC_SUBST(MPICH_INCLUDES)
dnl ----------------------------------------------------------------
dnl CHECK_PTHREADS
AC_DEFUN(CHECK_PTHREADS,[
-AC_CXX_OPTION(-pthread,CPPFLAGS,flag=yes,flag=no)
-
-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="")
- AC_CHECK_LIB(pthread,pthread_mutex_lock,
- LIBS_PTHREADS="-lpthread $LIBS_PTHREADS",LIBS_PTHREADS="")
-fi
-
-if test $flag = no && x$LIBS_PTHREADS = x; then
- threads_ok=no
-else
- threads_ok=yes
-fi
+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="")
+AC_CHECK_LIB(pthread,pthread_mutex_lock,
+ LIBS_PTHREADS="-lpthread $LIBS_PTHREADS")
+AC_MSG_CHECKING([parameters for using pthreads])
+case $build_os in
+ freebsd*)
+ CFLAGS_PTHREADS="-pthread"
+ CXXFLAGS_PTHREADS="-pthread"
+ ;;
+ *)
+ ;;
+esac
+AC_MSG_RESULT(["flags: $CFLAGS_PTHREADS\;libs: $LIBS_PTHREADS"])
+threads_ok=yes
])dnl
dnl
dnl
if test "x$qt_ok" = "xyes"
then
+ AC_MSG_CHECKING(include of qt headers)
CPPFLAGS_old=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
if test "x$qt_ok" = "xno"
then
- AC_MSG_WARN(qt headers not found, or too old qt version, in $QTDIR/include)
- AC_MSG_WARN(QTDIR environment variable may be wrong)
+ 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
- QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
+ AC_MSG_RESULT(yes)
+ QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
QT_MT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
fi
fi
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
- sip_ok=yes
- if test -d ${SIPDIR}/include/python${PYTHON_VERSION} ; then
+ if test -d ${SIPDIR}/include ; then
+ sip_ok=yes
SIP_ROOT="$SIPDIR"
- SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include/python${PYTHON_VERSION}"
- SIP_LIBS="-L${SIPDIR}/lib/python${PYTHON_VERSION}/site-packages -lsip"
+ SIP_INCLUDES="${PYTHON_INCLUDES} -I${SIPDIR}/include"
+ SIP_LIBS="-L${SIPDIR}/lib -lsip"
else
sip_ok=yes
SIP_ROOT="$SIPDIR"
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
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"
+LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS -L$x_libraries -lX11 -lXt"
+TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS -L$x_libraries -lX11 -lXt"
if test -z $VTKHOME
then
dnl vtk headers
CPPFLAGS_old="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
+CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES -Wno-deprecated"
AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no")
# LIBS="$LIBS $TRY_LINK_LIBS"
LIBS="$LIBS $LOCAL_LIBS"
CPPFLAGS_old="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $VTK_INCLUDES"
+ CPPFLAGS="$CPPFLAGS $VTK_INCLUDES -Wno-deprecated"
dnl VTKPY_MODULES="$VTKHOME/python"
if test "X$enable_production" = "Xyes"; then
CFLAGS="$CFLAGS -O"
- CXXFLAGS="$CXXFLAGS -O "
+ CXXFLAGS="$CXXFLAGS -O -Wno-deprecated "
fi
])
if test "X$enable_debug" = "Xyes"; then
CFLAGS="$CFLAGS -g -D_DEBUG_ "
- CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ "
+ CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ -Wno-deprecated "
fi
])
AC_MSG_CHECKING([if we need libdb])
PY_NEEDOPENDB=`nm $PYTHON_LIBA | grep dbopen | grep U`
if test "x$PY_NEEDOPENDB" != "x"; then
+ PYTHON_LIBS="$PYTHON_LIBS -ldb"
AC_MSG_RESULT(yes)
- AC_CHECK_LIB(db,dbopen,PYTHON_LIBS="$PYTHON_LIBS -ldb",db_ok=no)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([if we need libdl])
PY_NEEDOPENDL=`nm $PYTHON_LIBA | grep dlopen | grep U`
if test "x$PY_NEEDOPENDL" != "x"; then
+ PYTHON_LIBS="$PYTHON_LIBS -ldl"
AC_MSG_RESULT(yes)
- AC_CHECK_LIB(dl,dlopen,PYTHON_LIBS="$PYTHON_LIBS -ldl",dl_ok=no)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([if we need libutil])
PY_NEEDOPENPTY=`nm $PYTHON_LIBA | grep openpty | grep U`
if test "x$PY_NEEDOPENPTY" != "x"; then
+ PYTHON_LIBS="$PYTHON_LIBS -lutil"
AC_MSG_RESULT(yes)
- AC_CHECK_LIB(util,openpty,PYTHON_LIBS="$PYTHON_LIBS -lutil",openpty_ok=no)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([if we need tcltk])
PY_NEEDTCLTK=`nm $PYTHON_LIBA | grep Tcl_Init | grep U`
if test "x$PY_NEEDTCLTK" != "x"; then
+ PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk"
AC_MSG_RESULT(yes)
- AC_CHECK_LIB(tcl,Tcl_Init,PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk",tclinit_ok=no)
else
AC_MSG_RESULT(no)
fi