Salome HOME
Integration of 0019971: A patch for cmake compilation.
[modules/kernel.git] / configure.ac
index 7fe63445cf8a2e5aa2fbe0c6db2e19d4d5ddfbc5..e48747ab9b37040142f4ba7bf9deb86d264928b0 100644 (file)
@@ -4,23 +4,22 @@
 # ================================================================
 #
 #AC_PREREQ(2.59)
-#AC_INIT(src)
-AC_INIT([Salome2 Project], [3.1.0], [gboulant@CS], [salome])
+AC_INIT([Salome2 Project], [5.0.0], [paul.rascle@edf.fr], [SalomeKERNEL])
 
 # AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary
 # scripts such as config.guess, install-sh, ...
 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([tar-pax])
 #AC_CONFIG_HEADER([config.h])
 
-PACKAGE=salome
-AC_SUBST(PACKAGE)
-
-VERSION=3.1.0
-AC_SUBST(VERSION)
+XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
+AC_SUBST(XVERSION)
 
+# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
+MODULE_NAME=kernel
+AC_SUBST(MODULE_NAME)
 
 echo
 echo ---------------------------------------------
@@ -99,8 +98,8 @@ echo Configuring production
 echo ---------------------------------------------
 echo
 # production.m4
-AC_ENABLE_DEBUG(yes)
-AC_DISABLE_PRODUCTION
+AC_ENABLE_DEBUG(no)
+AC_ENABLE_PRODUCTION(no)
 
 echo
 echo ---------------------------------------------
@@ -181,14 +180,6 @@ echo
 
 CHECK_HDF5
 
-echo
-echo ---------------------------------------------
-echo Testing OpenCascade
-echo ---------------------------------------------
-echo
-
-CHECK_CAS
-
 # ----------------------------------------------------------------------------
 # --- test corba
 
@@ -239,20 +230,19 @@ AC_SUBST_FILE(CORBA)
 
 echo
 echo ---------------------------------------------
-echo Testing QT
+echo BOOST Library
 echo ---------------------------------------------
 echo
-# Qt must be kept because kernel makes use of qxml and some other
-# non-graphical stuff.
-CHECK_QT
+
+CHECK_BOOST
 
 echo
 echo ---------------------------------------------
-echo BOOST Library
+echo Testing libxml2
 echo ---------------------------------------------
 echo
 
-CHECK_BOOST
+CHECK_LIBXML
 
 fi 
 # --- end test corba
@@ -260,7 +250,7 @@ fi
 
 echo
 echo ============================================================
-echo testing optionnal products
+echo testing parallel products
 echo ============================================================
 echo
 
@@ -272,6 +262,48 @@ echo
 
 CHECK_MPI
 
+echo
+echo ---------------------------------------------
+echo checking if PaCO++ is requested by user
+echo ---------------------------------------------
+echo
+
+CHECK_PACO
+
+echo
+echo ------------------------------------------------------------
+echo checking if parallel kernel extensions are requested by user
+echo ------------------------------------------------------------
+echo
+
+AC_MSG_CHECKING(whether to enable parallel kernel extension)
+AC_ARG_ENABLE(parallel_extension, 
+             AC_HELP_STRING([--enable-parallel_extension], [parallel kernel extension = [no/yes] (default is no)]),
+             parallel_extension_ok=$enableval,                
+             parallel_extension_ok=no)
+if test "x$parallel_extension_ok" = "xyes"
+then
+  if test "x$PaCO_ok" = "xno"
+  then
+    parallel_extension_ok=no
+  fi
+fi
+
+if test "x$parallel_extension_ok" = "xyes"
+then
+  AC_MSG_RESULT([yes])
+else
+  AC_MSG_RESULT([no])
+fi
+
+AM_CONDITIONAL([WITH_PACO_PARALLEL], [test "x$parallel_extension_ok" = "xyes"])
+
+echo
+echo ============================================================
+echo testing optionnal products
+echo ============================================================
+echo
+
 echo
 echo ---------------------------------------------
 echo Testing Batch
@@ -305,6 +337,17 @@ dnl localbatch_ok is set to yes by CHECK_LOCAL
 
 WITH_BATCH=no
 test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes
+
+AC_ARG_ENABLE(batch,
+  [AC_HELP_STRING([--enable-batch],[Batch [default=yes]])],
+  [case "${enableval}" in
+     yes) test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes;;
+     no)  WITH_BATCH=no ;;
+     *) AC_MSG_ERROR(bad value ${enableval} for --enable-batch) ;;
+  esac],[test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes])
+
+echo Batch mode = $WITH_BATCH
+
 AC_SUBST(WITH_BATCH)
 AM_CONDITIONAL(WITH_BATCH, [test x"$WITH_BATCH" = xyes])
 
@@ -365,31 +408,40 @@ function check_fatal_error {
 
 # --------------------------------------
 
-basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok occ_ok"
+if test x$corba_gen = xtrue; then
+  basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok"
+else
+  basic_mandatory_products="cc_ok threads_ok hdf5_ok"
+fi
+
 echo --- General mandatory products - Light configuration:
 summary $basic_mandatory_products
 check_fatal_error $basic_mandatory_products
 echo
 
-corba_mandatory_products="omniORB_ok qt_ok boost_ok"
+corba_mandatory_products="omniORB_ok omniORBpy_ok boost_ok libxml_ok"
 if test x$corba_gen = xtrue; then
   echo --- CORBA mandatory products - default configuration:
   summary $corba_mandatory_products
   check_fatal_error $corba_mandatory_products
 else
   echo --- CORBA products not required - option --disable-corba-gen
+  if test x"$WITH_BATCH" = xyes; then
+    echo --- BATCH mode mandatory products - default configuration:
+    summary "python_ok"
+    check_fatal_error "python_ok"
+  else 
+    echo --- Python not required - option --enable-batch=no
+  fi
 fi
 echo
 
-if test x$MPIREQUESTED = xyes; then
-  requested_products="mpi_ok"
-  echo --- products requested by user
-  summary $requested_products
-  check_fatal_error $requested_products
-  echo
-fi
+parallel_products="mpi_ok PaCO_ok parallel_extension_ok"
+echo --- Kernel parallel extensions:
+summary $parallel_products
+echo
 
-optional_products="cppunit_ok openpbs_ok lsf_ok"
+optional_products="cppunit_ok openpbs_ok lsf_ok numpy_ok"
 echo --- Optional products:
 echo ["    These products are optional because the KERNEL functions"]
 echo ["    using them are built only if the products are detected."]
@@ -423,75 +475,62 @@ else
    AC_SUBST(SETX) SETX="set -x"
 fi
 
-echo 
-echo ---------------------------------------------
-echo copying resource files, shell scripts, and 
-echo xml files
-echo ---------------------------------------------
-echo
-
-
-mkdir -p bin/salome
-cd bin/salome
-for i in  `find $ROOT_SRCDIR/bin`
-do
-  local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR/bin,.,"`
-  case "$local_bin" in
-        *.in | *~) ;;
-        . | */CVS | */CVS/* | ./salome) ;;
-        ./appliskel |./appliskel/env.d) $INSTALL -d $local_bin ; echo $local_bin ;;
-        *) $INSTALL $i $local_bin; echo $local_bin ;;
-  esac
-done
-cd $ROOT_BUILDDIR
-
 echo
 echo ---------------------------------------------
 echo generating Makefiles and configure files
 echo ---------------------------------------------
 echo
 
-AC_OUTPUT_COMMANDS([ \
-       chmod +x ./bin/*; \
-       chmod +x ./bin/salome/* \
-])
-
 # This list is initiated using autoscan and must be updated manually
 # when adding a new file <filename>.in to manage. When you execute
 # autoscan, the Makefile list is generated in the output file configure.scan.
 # This could be helpfull to update de configuration.
 AC_OUTPUT([ \
-       ./salome_adm/unix/SALOMEconfig.h \
+       ./KERNEL_version.h \
+       ./salome_adm/unix/SALOMEconfig.ref \
        ./salome_adm/Makefile \
        ./salome_adm/unix/Makefile \
        ./salome_adm/unix/config_files/Makefile \
-       ./Makefile \
+       Makefile \
        ./bin/Makefile \
-       ./bin/runIDLparser \
+       ./bin/VERSION \
        ./doc/Makefile \
        ./doc/salome/Makefile \
-       ./doc/salome/DevelopersGuide/DevelopersGuide.tex \
-       ./doc/salome/DevelopersGuide/Makefile \
-       ./doc/salome/gui/Makefile \
        ./doc/salome/tui/Makefile \
+       ./doc/salome/tui/INPUT/doxyuser:./doc/salome/tui/KERNEL/doxyuser.in \
+       ./doc/salome/tui/INPUT/doxydev:./doc/salome/tui/KERNEL/doxydev.in \
+       ./doc/salome/tui/INPUT/sources/static/tree.js:./doc/salome/tui/KERNEL/sources/static/tree.js.in \
        ./idl/Makefile \
        ./resources/Makefile \
+       ./resources/KERNELCatalog.xml \
+       ./resources/CatalogResources.xml \
        ./src/Makefile \
        ./src/Basics/Makefile \
        ./src/Basics/Test/Makefile \
        ./src/Batch/Makefile \
        ./src/Batch_SWIG/Makefile \
-       ./src/CASCatch/Makefile \
        ./src/Communication/Makefile \
        ./src/Communication_SWIG/Makefile \
        ./src/Container/Makefile \
-       ./src/DataTypeCatalog/Makefile \
+       ./src/ParallelContainer/Makefile \
+       ./src/DF/Makefile \
+       ./src/DSC/Makefile \
+       ./src/DSC/DSC_Basic/Makefile \
+       ./src/DSC/DSC_User/Makefile \
+       ./src/DSC/DSC_User/Basic/Makefile \
+       ./src/DSC/DSC_User/Datastream/Makefile \
+       ./src/DSC/DSC_User/Datastream/Palm/Makefile \
+       ./src/DSC/DSC_User/Datastream/Calcium/Makefile \
+       ./src/DSC/ParallelDSC/Makefile \
+       ./src/DSC/DSC_Python/Makefile \
        ./src/GenericObj/Makefile \
        ./src/HDFPersist/Makefile \
        ./src/KERNEL_PY/Makefile \
+       ./src/Launcher/Makefile \
        ./src/LifeCycleCORBA/Makefile \
        ./src/LifeCycleCORBA/Test/Makefile \
        ./src/LifeCycleCORBA_SWIG/Makefile \
+       ./src/LifeCycleCORBA_SWIG/Test/Makefile \
        ./src/Logger/Makefile \
        ./src/Logger/Test/Makefile \
        ./src/ModuleCatalog/Makefile \
@@ -504,7 +543,6 @@ AC_OUTPUT([ \
        ./src/NOTIFICATION_SWIG/Makefile \
        ./src/Registry/Makefile \
        ./src/ResourcesManager/Makefile \
-       ./src/RessourcesCatalog/Makefile \
        ./src/SALOMEDS/Makefile \
        ./src/SALOMEDS/Test/Makefile \
        ./src/SALOMEDSClient/Makefile \