X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=configure.in.base;h=0891d99673004982b36fbe843abbb175dea0308b;hb=737d338203f97874d9fb589fb25619554a995949;hp=07acc004c1d33a02d3bd3d68117ede060b34663c;hpb=2d816298e5d10a6f807c278ac947aa16d8d88c90;p=modules%2Fmed.git diff --git a/configure.in.base b/configure.in.base index 07acc004c..0891d9967 100644 --- a/configure.in.base +++ b/configure.in.base @@ -1,23 +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) @@ -44,6 +24,66 @@ echo Build root directory : $ROOT_BUILDDIR echo echo +dnl remember MED_WITH_KERNEL set by build configure +old_with_kernel=${MED_WITH_KERNEL} + +dnl +dnl Check --with-kernel option +echo +dnl --------------------------------------------- + WITH_KERNEL +dnl --------------------------------------------- +dnl + +dnl Update and re-run configure if there was build_configure --without-kernel +dnl but configure --with-kernel=DIR is being called + +if test "x${old_with_kernel}" != "x${MED_WITH_KERNEL}"; then + if test "x${old_with_kernel}" = "xno" ; 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: without KERNEL -> with KERNEL" + 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 + +WITHOUT_KERNEL_CONFIG_DIR=${ROOT_SRCDIR}/adm_local_without_kernel/unix/config_files +AUX_CONFIG_DIR="" +if test "${MED_WITH_KERNEL}" = "yes"; then + AUX_CONFIG_DIR=${KERNEL_ROOT_DIR}/salome_adm/unix/config_files +else + AUX_CONFIG_DIR=${WITHOUT_KERNEL_CONFIG_DIR} +fi +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 @@ -53,6 +93,26 @@ dnl Export the AR macro so that it will be placed in the libtool file dnl correctly. export AR +echo +echo --------------------------------------------- +echo Testing GUI +echo --------------------------------------------- +echo + +CHECK_SALOME_GUI + +echo +echo --------------------------------------------- +echo Testing full GUI +echo --------------------------------------------- +echo + +CHECK_CORBA_IN_GUI +if test "x${CORBA_IN_GUI}" != "xyes"; then + echo "failed : For configure MED module necessary full GUI !" + exit +fi + echo echo --------------------------------------------- echo testing make @@ -82,8 +142,14 @@ dnl Fix up the INSTALL macro if it s a relative path. We want the dnl full-path to the binary instead. case "$INSTALL" in *install-sh*) - INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh - ;; + case $host_os in + osf*) + INSTALL="${AUX_CONFIG_DIR}/install-sh -c" + ;; + *) + INSTALL="\${AUX_CONFIG_DIR}/install-sh -c" + ;; + esac esac echo @@ -96,6 +162,8 @@ cc_ok=no dnl inutil car libtool dnl AC_PROG_CC AC_PROG_CXX +AC_CXX_WARNINGS +AC_CXX_TEMPLATE_OPTIONS AC_DEPEND_FLAG # AC_CC_WARNINGS([ansi]) cc_ok=yes @@ -103,9 +171,19 @@ cc_ok=yes dnl Library libdl : AC_CHECK_LIB(dl,dlopen) +dnl Library librt : for alpha/osf +AC_CHECK_LIB(rt,nanosleep) + dnl add library libm : AC_CHECK_LIB(m,ceil) +dnl +dnl Check if we use std iostream by default or if we must add +dnl a compiler directive for that +dnl + +AC_CXX_USE_STD_IOSTREAM + dnl dnl Well we use sstream which is not in gcc pre-2.95.3 dnl We must test if it exists. If not, add it in include ! @@ -115,107 +193,114 @@ AC_CXX_HAVE_SSTREAM dnl dnl --------------------------------------------- -dnl testing MPICH +dnl testing linker dnl --------------------------------------------- dnl -CHECK_MPICH +AC_LINKER_OPTIONS echo echo --------------------------------------------- -echo testing LEX \& YACC +echo testing threads echo --------------------------------------------- echo -lex_yacc_ok=no -AC_PROG_YACC -AC_PROG_LEX -lex_yacc_ok=yes +ENABLE_PTHREADS -echo -echo --------------------------------------------- -echo testing python -echo --------------------------------------------- -echo +dnl +dnl --------------------------------------------- +dnl testing WITHIHM +dnl --------------------------------------------- +dnl -CHECK_PYTHON +CHECK_WITHIHM echo echo --------------------------------------------- -echo testing java +echo BOOST Library echo --------------------------------------------- echo -CHECK_JAVA +CHECK_BOOST -echo -echo --------------------------------------------- -echo testing swig -echo --------------------------------------------- -echo - -CHECK_SWIG +dnl +dnl --------------------------------------------- +dnl testing sockets +dnl --------------------------------------------- +dnl -echo -echo --------------------------------------------- -echo testing threads -echo --------------------------------------------- -echo +CHECK_SOCKETS -ENABLE_PTHREADS +dnl +dnl --------------------------------------------- +dnl testing OpenPBS +dnl --------------------------------------------- +dnl echo echo --------------------------------------------- -echo testing omniORB +echo testing OpenPBS echo --------------------------------------------- echo -CHECK_OMNIORB +openpbs_ok=no +CHECK_OPENPBS +dnl openpbs_ok is set to yes by CHECK_OPENPBS -echo -echo --------------------------------------------- -echo testing mico -echo --------------------------------------------- -echo - -CHECK_MICO +dnl +dnl --------------------------------------------- +dnl testing LSF +dnl --------------------------------------------- +dnl echo echo --------------------------------------------- -echo default ORB : omniORB +echo testing LSF echo --------------------------------------------- echo -DEFAULT_ORB=omniORB -CHECK_CORBA +lsf_ok=no +CHECK_LSF +dnl lsf_ok is set to yes by CHECK_LSF -AC_SUBST_FILE(CORBA) -corba=make_$ORB -CORBA=${KERNEL_ROOT_DIR}/salome_adm/unix/$corba - -echo -echo --------------------------------------------- -echo testing openGL -echo --------------------------------------------- -echo +dnl +dnl --------------------------------------------- +dnl testing Batch +dnl --------------------------------------------- +dnl -CHECK_OPENGL +WITH_BATCH=no +test x$openpbs_ok = xyes || test x$lsf_ok = xyes && WITH_BATCH=yes +AC_SUBST(WITH_BATCH) + +if test "X$WITHIHM" = "Xyes"; then + echo + echo --------------------------------------------- + echo testing LEX \& YACC + echo --------------------------------------------- + echo + + lex_yacc_ok=no + AC_PROG_YACC + AC_PROG_LEX + lex_yacc_ok=yes +fi echo echo --------------------------------------------- -echo testing QT +echo testing python echo --------------------------------------------- echo -CHECK_QT +CHECK_PYTHON echo echo --------------------------------------------- -echo testing VTK +echo testing swig echo --------------------------------------------- echo -CHECK_VTK +CHECK_SWIG echo echo --------------------------------------------- @@ -233,21 +318,132 @@ echo CHECK_MED2 -echo -echo --------------------------------------------- -echo Testing OpenCascade -echo --------------------------------------------- -echo +echo "MED_WITH_KERNEL ${MED_WITH_KERNEL}" + +if test "${MED_WITH_KERNEL}" = "yes"; then +{ + + dnl echo + dnl echo --------------------------------------------- + dnl echo testing java + dnl echo --------------------------------------------- + dnl echo + + dnl CHECK_JAVA + + dnl + dnl --------------------------------------------- + dnl testing MPI + dnl --------------------------------------------- + dnl + + CHECK_MPI + CHECK_MPICH + + echo + echo --------------------------------------------- + echo testing omniORB + echo --------------------------------------------- + echo -CHECK_CAS + CHECK_OMNIORB + + echo + echo --------------------------------------------- + echo default ORB : omniORB + echo --------------------------------------------- + echo + + DEFAULT_ORB=omniORB + CHECK_CORBA + + AC_SUBST_FILE(CORBA) + corba=make_$ORB + CORBA=adm_local/unix/$corba + + + echo + echo --------------------------------------------- + echo testing openGL + echo --------------------------------------------- + echo + + CHECK_OPENGL + + echo + echo --------------------------------------------- + echo testing QT + echo --------------------------------------------- + echo + + CHECK_QT + + if test "X$WITHIHM" = "Xyes"; then + echo + echo --------------------------------------------- + echo testing VTK + echo --------------------------------------------- + echo + + CHECK_VTK + fi + + echo + echo --------------------------------------------- + echo Testing OpenCascade + echo --------------------------------------------- + echo + + CHECK_CAS + + echo + echo --------------------------------------------- + echo Testing Kernel + echo --------------------------------------------- + echo + + CHECK_KERNEL + + dnl echo + dnl echo --------------------------------------------- + dnl echo testing mico + dnl echo --------------------------------------------- + dnl echo + + dnl CHECK_MICO + + echo + echo --------------------------------------------- + echo testing MSG2QM + echo --------------------------------------------- + echo + + CHECK_MSG2QM + + echo + echo --------------------------------------------- + echo Testing html generators + echo --------------------------------------------- + echo + + CHECK_HTML_GENERATORS + +} +else +{ + WITHIHM="" + AC_SUBST(WITHIHM) + CPPFLAGS="$CPPFLAGS -DMED_WITHOUT_KERNEL" +} +fi # MED_WITH_KERNEL echo echo --------------------------------------------- -echo Testing Kernel +echo Testing html generators echo --------------------------------------------- echo -CHECK_KERNEL +CHECK_HTML_GENERATORS echo echo --------------------------------------------- @@ -255,13 +451,39 @@ echo Summary echo --------------------------------------------- echo -echo Configure -variables="cc_ok lex_yacc_ok python_ok java_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok mico_ok occ_ok Kernel_ok" +if test "$MED_WITH_KERNEL" = "no"; then + echo "Configure (without Kernel)" +else + echo Configure +fi + +#variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok med2_ok boost_ok doxygen_ok graphviz_ok OpenGL_ok qt_ok vtk_ok omniORB_ok occ_ok Kernel_ok" +if test "X$WITHIHM" = "Xyes"; then +variables="cc_ok lex_yacc_ok mpi_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok sip_ok pyqt_ok qwt_ok Kernel_ok" +fi +if test "X$WITHIHM" = "Xno"; then +variables="cc_ok mpi_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok hdf5_ok med2_ok omniORB_ok occ_ok Kernel_ok" +fi + +for var in $variables +do + eval toto=\$$var + if test x$toto != "x"; then + printf " %10s : " `echo \$var | sed -e "s,_ok,,"` + eval echo \$$var + fi +done +echo "---Optional:" +variables="cppunit_ok openpbs_ok lsf_ok doxygen_ok graphviz_ok" + for var in $variables do - printf " %10s : " `echo \$var | sed -e "s,_ok,,"` - eval echo \$$var + eval toto=\$$var + if test x$toto != "x"; then + printf " %10s : " `echo \$var | sed -e "s,_ok,,"` + eval echo \$$var + fi done echo @@ -270,12 +492,12 @@ echo dnl generals files which could be included in every makefile -AC_SUBST_FILE(COMMENCE) COMMENCE=${KERNEL_ROOT_DIR}/salome_adm/unix/make_commence -AC_SUBST_FILE(CONCLUDE) CONCLUDE=${KERNEL_ROOT_DIR}/salome_adm/unix/make_conclude -AC_SUBST_FILE(MODULE) MODULE=${KERNEL_ROOT_DIR}/salome_adm/unix/make_module +AC_SUBST_FILE(COMMENCE) COMMENCE=adm_local/unix/make_commence +AC_SUBST_FILE(CONCLUDE) CONCLUDE=adm_local/unix/make_conclude +AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module dnl les dependences -AC_SUBST_FILE(DEPEND) DEPEND=${KERNEL_ROOT_DIR}/salome_adm/unix/depend +AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend dnl We don t need to say when we re entering directories if we re using dnl GNU make becuase make does it for us. @@ -286,12 +508,13 @@ else fi # make other build directories -for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources share/salome/doc idl +for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl do # if test ! -d $rep ; then # eval mkdir $rep # fi - $INSTALL -d $rep +# $INSTALL -d $rep + mkdir -p $rep done echo @@ -319,19 +542,23 @@ 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 +mkdir -p bin/salome +cd bin/salome + for i in $ROOT_SRCDIR/bin/* do local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"` case "$local_bin" in *.in | *~) ;; - ./bin/CVS) ;; - *) ln -fs $i; echo $local_bin ;; + ./bin/CVS | ./bin/salome) ;; + *) ln -fs $i .; echo $local_bin ;; esac done cd $ROOT_BUILDDIR -AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=${KERNEL_ROOT_DIR}/salome_adm/unix/envScript +if test ${MED_WITH_KERNEL} = "yes"; then +AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript +fi dnl copy xml files to the build tree (lib directory) dnl pourquoi ????