]> SALOME platform Git repositories - modules/med.git/blobdiff - configure.in.base
Salome HOME
Update version to 3.2.0a1
[modules/med.git] / configure.in.base
index 584e6b02e32e2e48b920b164d7fac2e4113b4c33..632529721fe5d960f0a46e6b1899d0c40022cb91 100644 (file)
@@ -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(SALOME)
-AC_CONFIG_AUX_DIR(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
@@ -82,7 +122,7 @@ 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='\${top_srcdir}'/adm/unix/config_files/install-sh
+      INSTALL="\${AUX_CONFIG_DIR}/install-sh -c"
       ;;
 esac
 
@@ -96,6 +136,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
@@ -106,6 +148,16 @@ AC_CHECK_LIB(dl,dlopen)
 dnl add library libm :
 AC_CHECK_LIB(m,ceil)
 
+dnl Library librt : for alpha/osf
+AC_CHECK_LIB(rt,nanosleep)
+
+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,11 +167,11 @@ AC_CXX_HAVE_SSTREAM
 
 dnl
 dnl ---------------------------------------------
-dnl testing MPICH
+dnl testing linker
 dnl ---------------------------------------------
 dnl
 
-CHECK_MPICH
+AC_LINKER_OPTIONS
 
 echo
 echo ---------------------------------------------
@@ -142,43 +194,82 @@ CHECK_PYTHON
 
 echo
 echo ---------------------------------------------
-echo testing java
+echo testing swig
 echo ---------------------------------------------
 echo
 
-CHECK_JAVA
+CHECK_SWIG
 
 echo
 echo ---------------------------------------------
-echo testing swig
+echo testing threads
 echo ---------------------------------------------
 echo
 
-CHECK_SWIG
+ENABLE_PTHREADS
 
+dnl BOOST is needed for MED Wrapper
 echo
 echo ---------------------------------------------
-echo testing threads
+echo BOOST Library
 echo ---------------------------------------------
 echo
 
-ENABLE_PTHREADS
+CHECK_BOOST
 
 echo
 echo ---------------------------------------------
-echo testing omniORB
+echo testing HDF5
 echo ---------------------------------------------
 echo
 
-CHECK_OMNIORB
+CHECK_HDF5
 
 echo
 echo ---------------------------------------------
-echo testing mico
+echo testing MED2
 echo ---------------------------------------------
 echo
 
-CHECK_MICO
+CHECK_MED2
+
+
+if test "${MED_WITH_KERNEL}" == "yes"; then
+{
+#CPPFLAGS="$CPPFLAGS -DMED_WITH_KERNEL"
+
+dnl echo
+dnl echo ---------------------------------------------
+dnl echo testing java
+dnl echo ---------------------------------------------
+dnl echo
+
+dnl CHECK_JAVA
+
+dnl
+dnl ---------------------------------------------
+dnl testing MPICH
+dnl ---------------------------------------------
+dnl
+
+CHECK_MPI
+CHECK_MPICH
+
+dnl
+dnl ---------------------------------------------
+dnl testing WITHIHM
+dnl ---------------------------------------------
+dnl
+
+CHECK_WITHIHM
+
+echo
+echo ---------------------------------------------
+echo testing omniORB
+echo ---------------------------------------------
+echo
+
+CHECK_OMNIORB
 
 echo
 echo ---------------------------------------------
@@ -191,7 +282,7 @@ CHECK_CORBA
 
 AC_SUBST_FILE(CORBA)
 corba=make_$ORB
-CORBA=adm/unix/$corba
+CORBA=adm_local/unix/$corba
 
 echo
 echo ---------------------------------------------
@@ -219,27 +310,52 @@ CHECK_VTK
 
 echo
 echo ---------------------------------------------
-echo testing HDF5
+echo Testing OpenCascade
 echo ---------------------------------------------
 echo
 
-CHECK_HDF5
+CHECK_CAS
 
 echo
 echo ---------------------------------------------
-echo testing MED2
+echo Testing Kernel
 echo ---------------------------------------------
 echo
 
-CHECK_MED2
+CHECK_KERNEL
+
+dnl echo
+dnl echo ---------------------------------------------
+dnl echo testing mico
+dnl echo ---------------------------------------------
+dnl echo
+
+dnl CHECK_MICO
 
 echo
 echo ---------------------------------------------
-echo Testing OpenCascade
+echo testing MSG2QM
 echo ---------------------------------------------
 echo
 
-CHECK_CAS
+CHECK_MSG2QM
+
+}
+else
+{
+  WITHIHM=""
+  AC_SUBST(WITHIHM)
+  CPPFLAGS="$CPPFLAGS -DMED_WITHOUT_KERNEL"
+}
+fi # MED_WITH_KERNEL
+
+echo
+echo ---------------------------------------------
+echo Testing html generators
+echo ---------------------------------------------
+echo
+
+CHECK_HTML_GENERATORS
 
 echo
 echo ---------------------------------------------
@@ -247,9 +363,13 @@ 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"
+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"
 for var in $variables
 do
    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
@@ -262,12 +382,12 @@ echo
 
 dnl generals files which could be included in every makefile
 
-AC_SUBST_FILE(COMMENCE) COMMENCE=adm/unix/make_commence
-AC_SUBST_FILE(CONCLUDE) CONCLUDE=adm/unix/make_conclude
-AC_SUBST_FILE(MODULE) MODULE=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=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.
@@ -278,12 +398,13 @@ else
 fi
 
 # make other build directories
-for rep in adm bin include lib share/salome/resources share/salome/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 
@@ -311,19 +432,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=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 ????
@@ -336,6 +461,7 @@ dnl pourquoi ????
 #done
 #cd $ROOT_BUILDDIR
 
+
 echo
 echo ---------------------------------------------
 echo generating Makefiles and configure files