-#
-# 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)
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
dnl full-path to the binary instead.
case "$INSTALL" in
*install-sh*)
- INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
+ INSTALL="\${AUX_CONFIG_DIR}/install-sh -c"
;;
esac
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
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 !
dnl
dnl ---------------------------------------------
-dnl testing MPICH
+dnl testing linker
dnl ---------------------------------------------
dnl
-CHECK_MPICH
+AC_LINKER_OPTIONS
echo
echo ---------------------------------------------
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 ---------------------------------------------
AC_SUBST_FILE(CORBA)
corba=make_$ORB
-CORBA=salome_adm/unix/$corba
+CORBA=adm_local/unix/$corba
echo
echo ---------------------------------------------
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 Kernel
+echo Testing html generators
echo ---------------------------------------------
echo
-CHECK_KERNEL
+CHECK_HTML_GENERATORS
echo
echo ---------------------------------------------
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"
for var in $variables
do
printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
dnl generals files which could be included in every makefile
-AC_SUBST_FILE(COMMENCE) COMMENCE=salome_adm/unix/make_commence
-AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
+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
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
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
+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 ????