2 # ================================================================
3 # Process this file with autoconf to produce a configure script
4 # ================================================================
7 AC_INIT([Salome2 Project], [4.1.1], [paul.rascle@edf.fr], [SalomeKer])
9 # AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary
10 # scripts such as config.guess, install-sh, ...
11 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
14 AM_INIT_AUTOMAKE([tar-pax])
15 #AC_CONFIG_HEADER([config.h])
20 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
25 echo ---------------------------------------------
26 echo Initialize source and build root directories
27 echo ---------------------------------------------
31 # This function return on stdout the absolute path of the filename in
33 # $ filename="../KERNEL_SRC/configure
34 # $ absfilename=`absolute_path $filename`
35 function absolute_path {
38 apath=`dirname $filename`
45 # Build directory, where the configure script is executed.
47 # Source directory, where the configure script is located.
48 ROOT_SRCDIR=`absolute_path $0`
51 AC_SUBST(ROOT_BUILDDIR)
54 echo Source root directory : $ROOT_SRCDIR
55 echo Build root directory : $ROOT_BUILDDIR
57 # ----------------------------------------------------------------------------
60 AC_ARG_ENABLE(corba_gen,
61 [AC_HELP_STRING([--enable-corba-gen],[Generate CORBA stuff [default=yes]])],
62 [case "${enableval}" in
63 yes) corba_gen=true ;;
64 no) corba_gen=false ;;
65 *) AC_MSG_ERROR(bad value ${enableval} for --enable-corba-gen) ;;
66 esac],[corba_gen=true])
67 AM_CONDITIONAL(CORBA_GEN, test x$corba_gen = xtrue)
69 # ----------------------------------------------------------------------------
73 echo ============================================================
74 echo testing general mandatory products - for all configurations
75 echo ============================================================
78 dnl Modification B. Secher portage sur osf
79 AC_CHECK_PROG(SHELL,sh)
82 if test -z "$AR"; then
83 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
88 echo ---------------------------------------------
90 echo ---------------------------------------------
96 echo ---------------------------------------------
97 echo Configuring production
98 echo ---------------------------------------------
102 AC_ENABLE_PRODUCTION(no)
105 echo ---------------------------------------------
107 echo ---------------------------------------------
110 dnl first, we set static to no!
111 dnl if we want it, use --enable-static
117 echo ---------------------------------------------
119 echo ---------------------------------------------
126 AC_CXX_TEMPLATE_OPTIONS
128 # AC_CC_WARNINGS([ansi])
132 AC_CHECK_LIB(dl,dlopen)
134 dnl Library librt : for alpha/osf
135 AC_CHECK_LIB(rt,nanosleep)
137 dnl add library libm :
140 # _CS_gbo We should add all dependent libraries
142 AC_CXX_USE_STD_IOSTREAM
150 echo ---------------------------------------------
152 echo ---------------------------------------------
158 echo ---------------------------------------------
160 echo ---------------------------------------------
166 echo ---------------------------------------------
168 echo ---------------------------------------------
171 dnl _CS_gbo We should use here a variable given from the CHECK_PYTHON
176 echo ---------------------------------------------
178 echo ---------------------------------------------
183 # ----------------------------------------------------------------------------
186 if test x$corba_gen = xtrue; then
189 echo ============================================================
190 echo testing mandatory products for CORBA configurations
191 echo ============================================================
195 dnl ---------------------------------------------
197 dnl ---------------------------------------------
203 echo ---------------------------------------------
204 echo Configuration of the ORB
205 echo ---------------------------------------------
208 echo Testing OMNIORB ...
211 echo Selecting the default ORB
213 echo DEFAULT_ORB : $DEFAULT_ORB
216 CORBA=salome_adm/unix/make_$ORB
220 # The CORBA variable defines the file name that
221 # implements the building rules to be included by Makefile to process
222 # idl files and CORBA specific dependencies (ex: the file
223 # salome_adm/unix/make_omniorb is the default for SALOME). The value
224 # of ORB is defined by CHECK_CORBA.
226 # Note that this checking process is no longer relevant for SALOME
227 # because the possibility of changing the ORB as a plugin is probably
228 # deprecated. The software configuration is clearly omniorb for CORBA
229 # communication. This could be simplify in a near futur.
232 echo ---------------------------------------------
234 echo ---------------------------------------------
240 echo ---------------------------------------------
242 echo ---------------------------------------------
249 # ----------------------------------------------------------------------------
252 echo ============================================================
253 echo testing parallel products
254 echo ============================================================
258 echo ---------------------------------------------
259 echo checking if MPI is requested by user
260 echo ---------------------------------------------
266 echo ---------------------------------------------
267 echo checking if PaCO++ is requested by user
268 echo ---------------------------------------------
274 echo ------------------------------------------------------------
275 echo checking if parallel kernel extensions are requested by user
276 echo ------------------------------------------------------------
279 AC_MSG_CHECKING(whether to enable parallel kernel extension)
280 AC_ARG_ENABLE(parallel_extension,
281 AC_HELP_STRING([--enable-parallel_extension], [parallel kernel extension = [no/yes] (default is no)]),
282 parallel_extension_ok=$enableval,
283 parallel_extension_ok=no)
284 if test "x$parallel_extension_ok" = "xyes"
286 if test "x$PaCO_ok" = "xno"
288 parallel_extension_ok=no
292 if test "x$parallel_extension_ok" = "xyes"
299 AM_CONDITIONAL([WITH_PACO_PARALLEL], [test "x$parallel_extension_ok" = "xyes"])
302 echo ============================================================
303 echo testing optionnal products
304 echo ============================================================
308 echo ---------------------------------------------
310 echo ---------------------------------------------
313 dnl Several batch systems (OpenPBS, LSF, ...) can be operated using
314 dnl the Batch classes library integrated in the KERNEL module. The
315 dnl checking process tests here the presence of underlying batch
316 dnl softwares. If none is detected, the KERNEL is declared to be
323 dnl openpbs_ok is set to yes by CHECK_OPENPBS
329 dnl lsf_ok is set to yes by CHECK_LSF
332 echo testing Local batch system
333 echo --------------------------
336 dnl localbatch_ok is set to yes by CHECK_LOCAL
339 test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes
342 [AC_HELP_STRING([--enable-batch],[Batch [default=yes]])],
343 [case "${enableval}" in
344 yes) test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes;;
346 *) AC_MSG_ERROR(bad value ${enableval} for --enable-batch) ;;
347 esac],[test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes])
349 echo Batch mode = $WITH_BATCH
352 AM_CONDITIONAL(WITH_BATCH, [test x"$WITH_BATCH" = xyes])
355 echo ----------------------------------------------
356 echo testing CPPUNIT only required for unit testing
357 echo ----------------------------------------------
362 echo ============================================================
363 echo testing products required only for documentation generation
364 echo ============================================================
368 echo ---------------------------------------------
369 echo Testing html generators
370 echo ---------------------------------------------
373 CHECK_HTML_GENERATORS
376 echo ============================================================
378 echo ============================================================
381 # This function displays the values of each variable given in arguments
384 for var in $variables
387 if test x$toto != "x"; then
388 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
394 # --------------------------------------
396 function check_fatal_error {
398 for var in $variables
401 if test x$toto != "xyes"; then
402 echo "FATAL ERROR: some mandatory products are missing."
403 echo "Installing the missing products is required before running the configure script".
409 # --------------------------------------
411 if test x$corba_gen = xtrue; then
412 basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok"
414 basic_mandatory_products="cc_ok threads_ok hdf5_ok"
417 echo --- General mandatory products - Light configuration:
418 summary $basic_mandatory_products
419 check_fatal_error $basic_mandatory_products
422 corba_mandatory_products="omniORB_ok omniORBpy_ok boost_ok libxml_ok"
423 if test x$corba_gen = xtrue; then
424 echo --- CORBA mandatory products - default configuration:
425 summary $corba_mandatory_products
426 check_fatal_error $corba_mandatory_products
428 echo --- CORBA products not required - option --disable-corba-gen
429 if test x"$WITH_BATCH" = xyes; then
430 echo --- BATCH mode mandatory products - default configuration:
432 check_fatal_error "python_ok"
434 echo --- Python not required - option --enable-batch=no
439 parallel_products="mpi_ok PaCO_ok parallel_extension_ok"
440 echo --- Kernel parallel extensions:
441 summary $parallel_products
444 optional_products="cppunit_ok openpbs_ok lsf_ok numpy_ok"
445 echo --- Optional products:
446 echo [" These products are optional because the KERNEL functions"]
447 echo [" using them are built only if the products are detected."]
448 summary $optional_products
451 htmldoc_products="doxygen_ok graphviz_ok rst2html_ok"
453 echo --- Html documentation products: only required for doc production
454 summary $htmldoc_products
458 echo "Default ORB : $DEFAULT_ORB"
461 dnl generals files which could be included in every makefile
463 AC_SUBST_FILE(COMMENCE) COMMENCE=salome_adm/unix/make_commence
464 AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
465 AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
468 AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
470 dnl We don t need to say when we re entering directories if we re using
471 dnl GNU make becuase make does it for us.
472 if test "X$GMAKE" = "Xyes"; then
473 AC_SUBST(SETX) SETX=":"
475 AC_SUBST(SETX) SETX="set -x"
479 echo ---------------------------------------------
480 echo copying resource files, shell scripts, and
482 echo ---------------------------------------------
488 for i in `find $ROOT_SRCDIR/bin`
490 local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR/bin,.,"`
493 . | */CVS | */CVS/* | ./salome) ;;
494 ./appliskel |./appliskel/env.d) $INSTALL -d $local_bin ; echo $local_bin ;;
495 *) $INSTALL $i $local_bin; echo $local_bin ;;
501 echo ---------------------------------------------
502 echo generating Makefiles and configure files
503 echo ---------------------------------------------
506 AC_OUTPUT_COMMANDS([ \
508 chmod +x ./bin/salome/* \
511 # This list is initiated using autoscan and must be updated manually
512 # when adding a new file <filename>.in to manage. When you execute
513 # autoscan, the Makefile list is generated in the output file configure.scan.
514 # This could be helpfull to update de configuration.
517 ./salome_adm/unix/SALOMEconfig.ref \
518 ./salome_adm/Makefile \
519 ./salome_adm/unix/Makefile \
520 ./salome_adm/unix/config_files/Makefile \
526 ./doc/salome/Makefile \
527 ./doc/salome/tui/Makefile \
528 ./doc/salome/tui/INPUT/doxyuser:./doc/salome/tui/KERNEL/doxyuser.in \
529 ./doc/salome/tui/INPUT/doxydev:./doc/salome/tui/KERNEL/doxydev.in \
530 ./doc/salome/tui/INPUT/sources/static/tree.js:./doc/salome/tui/KERNEL/sources/static/tree.js.in \
532 ./resources/Makefile \
533 ./resources/KERNELCatalog.xml \
534 ./resources/CatalogResources.xml \
535 ./resources/DEPRECATED/Plugin \
537 ./src/Basics/Makefile \
538 ./src/Basics/Test/Makefile \
539 ./src/Batch/Makefile \
540 ./src/Batch_SWIG/Makefile \
541 ./src/Communication/Makefile \
542 ./src/Communication_SWIG/Makefile \
543 ./src/Container/Makefile \
544 ./src/ParallelContainer/Makefile \
547 ./src/DSC/DSC_Basic/Makefile \
548 ./src/DSC/DSC_User/Makefile \
549 ./src/DSC/DSC_User/Basic/Makefile \
550 ./src/DSC/DSC_User/Datastream/Makefile \
551 ./src/DSC/DSC_User/Datastream/Palm/Makefile \
552 ./src/DSC/DSC_User/Datastream/Calcium/Makefile \
553 ./src/DSC/ParallelDSC/Makefile \
554 ./src/DSC/DSC_Python/Makefile \
555 ./src/GenericObj/Makefile \
556 ./src/HDFPersist/Makefile \
557 ./src/KERNEL_PY/Makefile \
558 ./src/Launcher/Makefile \
559 ./src/LifeCycleCORBA/Makefile \
560 ./src/LifeCycleCORBA/Test/Makefile \
561 ./src/LifeCycleCORBA_SWIG/Makefile \
562 ./src/LifeCycleCORBA_SWIG/Test/Makefile \
563 ./src/Logger/Makefile \
564 ./src/Logger/Test/Makefile \
565 ./src/ModuleCatalog/Makefile \
566 ./src/ModuleGenerator/Makefile \
567 ./src/ModuleGenerator/testIDLparser \
568 ./src/MPIContainer/Makefile \
569 ./src/NamingService/Makefile \
570 ./src/NamingService/Test/Makefile \
571 ./src/Notification/Makefile \
572 ./src/NOTIFICATION_SWIG/Makefile \
573 ./src/Registry/Makefile \
574 ./src/ResourcesManager/Makefile \
575 ./src/SALOMEDS/Makefile \
576 ./src/SALOMEDS/Test/Makefile \
577 ./src/SALOMEDSClient/Makefile \
578 ./src/SALOMEDSImpl/Makefile \
579 ./src/SALOMEDSImpl/Test/Makefile \
580 ./src/SALOMELocalTrace/Makefile \
581 ./src/SALOMELocalTrace/Test/Makefile \
582 ./src/SALOMETraceCollector/Makefile \
583 ./src/SALOMETraceCollector/Test/Makefile \
584 ./src/TestContainer/Makefile \
585 ./src/TestMPIContainer/Makefile \
586 ./src/TOOLSDS/Makefile \
587 ./src/UnitTests/Makefile \
588 ./src/Utils/Makefile \
589 ./src/Utils/Test/Makefile \