From b8409020e935d768d0e1c6b79427fc363ebd4208 Mon Sep 17 00:00:00 2001 From: prascle Date: Tue, 14 Feb 2006 19:14:50 +0000 Subject: [PATCH] PR: conditionnal check prerequisite following user options --- configure.ac | 231 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 146 insertions(+), 85 deletions(-) diff --git a/configure.ac b/configure.ac index 9c11c6b44..f3d7fbaa2 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,26 @@ AC_SUBST(ROOT_BUILDDIR) echo echo Source root directory : $ROOT_SRCDIR echo Build root directory : $ROOT_BUILDDIR + +# ---------------------------------------------------------------------------- +# --- test options + +AC_ARG_ENABLE(corba_gen, + [AC_HELP_STRING([--enable-corba-gen],[Generate CORBA stuff [default=yes]])], + [case "${enableval}" in + yes) corba_gen=true ;; + no) corba_gen=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-corba-gen) ;; + esac],[corba_gen=true]) +AM_CONDITIONAL(CORBA_GEN, test x$corba_gen = xtrue) + +# ---------------------------------------------------------------------------- + +echo echo +echo ============================================================ +echo testing general mandatory products - for all configurations +echo ============================================================ echo dnl Modification B. Secher portage sur osf @@ -82,9 +101,11 @@ echo AC_ENABLE_DEBUG(yes) AC_DISABLE_PRODUCTION +echo echo --------------------------------------------- echo testing libtool echo --------------------------------------------- +echo dnl first, we set static to no! dnl if we want it, use --enable-static @@ -133,85 +154,58 @@ echo ENABLE_PTHREADS - echo echo --------------------------------------------- -echo BOOST Library +echo testing python echo --------------------------------------------- echo -CHECK_BOOST - -dnl -dnl --------------------------------------------- -dnl testing MPI -dnl --------------------------------------------- -dnl - -CHECK_MPI - -dnl -dnl --------------------------------------------- -dnl testing sockets -dnl --------------------------------------------- -dnl - -CHECK_SOCKETS +CHECK_PYTHON echo echo --------------------------------------------- -echo Testing Batch +echo testing swig echo --------------------------------------------- echo -dnl Several batch systems (OpenPBS, LSF, ...) can be operated using -dnl the Batch classes library integrated in the KERNEL module. The -dnl checking process tests here the presence of underlying batch -dnl softwares. If none is detected, the KERNEL is declared to be -dnl "without batch". - -echo testing OpenPBS -echo --------------- -openpbs_ok=no -CHECK_OPENPBS -dnl openpbs_ok is set to yes by CHECK_OPENPBS - -echo testing LSF -echo ----------- -lsf_ok=no -CHECK_LSF -dnl lsf_ok is set to yes by CHECK_LSF -echo lsf = $lsf_ok - -echo testing Local batch system -echo -------------------------- -localbatch_ok=no -CHECK_LOCAL -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_SUBST(WITH_BATCH) -AM_CONDITIONAL(WITH_BATCH, [test x"$WITH_BATCH" = xyes]) +dnl _CS_gbo We should use here a variable given from the CHECK_PYTHON +AM_PATH_PYTHON(2.3) +CHECK_SWIG echo echo --------------------------------------------- -echo testing python +echo testing HDF5 echo --------------------------------------------- echo -CHECK_PYTHON +CHECK_HDF5 echo echo --------------------------------------------- -echo testing swig +echo Testing OpenCascade echo --------------------------------------------- echo -dnl _CS_gbo We should use here a variable given from the CHECK_PYTHON -AM_PATH_PYTHON(2.3) -CHECK_SWIG +CHECK_CAS + +# ---------------------------------------------------------------------------- +# --- test corba + +if test x$corba_gen = xtrue; then +echo +echo ============================================================ +echo testing mandatory products for CORBA configurations +echo ============================================================ +echo + +dnl +dnl --------------------------------------------- +dnl testing sockets +dnl --------------------------------------------- +dnl + +CHECK_SOCKETS echo echo --------------------------------------------- @@ -243,38 +237,88 @@ AC_SUBST_FILE(CORBA) # communication. This could be simplify in a near futur. echo -echo ---------------------------------------------- -echo testing CPPUNIT only required for unit testing -echo ---------------------------------------------- +echo --------------------------------------------- +echo Testing QT +echo --------------------------------------------- echo -CHECK_CPPUNIT +# Qt must be kept because kernel makes use of qxml and some other +# non-graphical stuff. +CHECK_QT echo echo --------------------------------------------- -echo testing HDF5 +echo BOOST Library echo --------------------------------------------- echo -CHECK_HDF5 +CHECK_BOOST + +fi +# --- end test corba +# ---------------------------------------------------------------------------- + +echo +echo ============================================================ +echo testing optionnal products +echo ============================================================ +echo echo echo --------------------------------------------- -echo Testing OpenCascade +echo checking if MPI is requested by user echo --------------------------------------------- echo -CHECK_CAS - +CHECK_MPI echo echo --------------------------------------------- -echo Testing QT +echo Testing Batch echo --------------------------------------------- echo -# Qt must be kept because kernel makes use of qxml and some other -# non-graphical stuff. -CHECK_QT +dnl Several batch systems (OpenPBS, LSF, ...) can be operated using +dnl the Batch classes library integrated in the KERNEL module. The +dnl checking process tests here the presence of underlying batch +dnl softwares. If none is detected, the KERNEL is declared to be +dnl "without batch". + +echo testing OpenPBS +echo --------------- +openpbs_ok=no +CHECK_OPENPBS +dnl openpbs_ok is set to yes by CHECK_OPENPBS + +echo testing LSF +echo ----------- +lsf_ok=no +CHECK_LSF +dnl lsf_ok is set to yes by CHECK_LSF +echo lsf = $lsf_ok + +echo testing Local batch system +echo -------------------------- +localbatch_ok=no +CHECK_LOCAL +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_SUBST(WITH_BATCH) +AM_CONDITIONAL(WITH_BATCH, [test x"$WITH_BATCH" = xyes]) + +echo +echo ---------------------------------------------- +echo testing CPPUNIT only required for unit testing +echo ---------------------------------------------- +echo +CHECK_CPPUNIT + +echo +echo ============================================================ +echo testing products required only for documentation generation +echo ============================================================ +echo echo echo --------------------------------------------- @@ -285,9 +329,9 @@ echo CHECK_HTML_GENERATORS echo -echo --------------------------------------------- +echo ============================================================ echo Summary -echo --------------------------------------------- +echo ============================================================ echo # This function displays the values of each variable given in arguments @@ -303,6 +347,8 @@ function summary { done } +# -------------------------------------- + function check_fatal_error { variables=$* for var in $variables @@ -316,27 +362,45 @@ function check_fatal_error { done } -echo Configure -echo +# -------------------------------------- -mandatory_products="cc_ok boost_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok qt_ok" -echo --- Mandatory products: -summary $mandatory_products -check_fatal_error $mandatory_products +basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok occ_ok" +echo --- General mandatory products - Light configuration: +summary $basic_mandatory_products +check_fatal_error $basic_mandatory_products echo -htmldoc_products="doxygen_ok graphviz_ok rst2html_ok" -echo --- Html documentation products: -summary $htmldoc_products +corba_mandatory_products="omniORB_ok qt_ok boost_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 +fi echo -optional_products="mpi_ok cppunit_ok openpbs_ok lsf_ok" +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 + +optional_products="cppunit_ok openpbs_ok lsf_ok" echo --- Optional products: -echo These products are optional because the KERNEL functions using them are built -echo only if the products are detected. +echo [" These products are optional because the KERNEL functions"] +echo [" using them are built only if the products are detected."] summary $optional_products echo +htmldoc_products="doxygen_ok graphviz_ok rst2html_ok" + +echo --- Html documentation products: only required for doc production +summary $htmldoc_products +echo + echo echo "Default ORB : $DEFAULT_ORB" echo @@ -380,9 +444,6 @@ do done cd $ROOT_BUILDDIR -# _CS_gbo Check wether it's used or not!! -AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript - echo echo --------------------------------------------- echo generating Makefiles and configure files -- 2.39.2