2 # ================================================================
3 # Process this file with autoconf to produce a configure script
4 # ================================================================
8 AC_INIT([Salome2 Project], [4.1.0], [paul.rascle@edf.fr], [salome])
10 # AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary
11 # scripts such as config.guess, install-sh, ...
12 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
15 AM_INIT_AUTOMAKE([tar-pax])
16 #AC_CONFIG_HEADER([config.h])
26 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
31 echo ---------------------------------------------
32 echo Initialize source and build root directories
33 echo ---------------------------------------------
37 # This function return on stdout the absolute path of the filename in
39 # $ filename="../KERNEL_SRC/configure
40 # $ absfilename=`absolute_path $filename`
41 function absolute_path {
44 apath=`dirname $filename`
51 # Build directory, where the configure script is executed.
53 # Source directory, where the configure script is located.
54 ROOT_SRCDIR=`absolute_path $0`
57 AC_SUBST(ROOT_BUILDDIR)
60 echo Source root directory : $ROOT_SRCDIR
61 echo Build root directory : $ROOT_BUILDDIR
63 # ----------------------------------------------------------------------------
66 AC_ARG_ENABLE(corba_gen,
67 [AC_HELP_STRING([--enable-corba-gen],[Generate CORBA stuff [default=yes]])],
68 [case "${enableval}" in
69 yes) corba_gen=true ;;
70 no) corba_gen=false ;;
71 *) AC_MSG_ERROR(bad value ${enableval} for --enable-corba-gen) ;;
72 esac],[corba_gen=true])
73 AM_CONDITIONAL(CORBA_GEN, test x$corba_gen = xtrue)
75 # ----------------------------------------------------------------------------
79 echo ============================================================
80 echo testing general mandatory products - for all configurations
81 echo ============================================================
84 dnl Modification B. Secher portage sur osf
85 AC_CHECK_PROG(SHELL,sh)
88 if test -z "$AR"; then
89 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
94 echo ---------------------------------------------
96 echo ---------------------------------------------
102 echo ---------------------------------------------
103 echo Configuring production
104 echo ---------------------------------------------
108 AC_ENABLE_PRODUCTION(no)
111 echo ---------------------------------------------
113 echo ---------------------------------------------
116 dnl first, we set static to no!
117 dnl if we want it, use --enable-static
123 echo ---------------------------------------------
125 echo ---------------------------------------------
132 AC_CXX_TEMPLATE_OPTIONS
134 # AC_CC_WARNINGS([ansi])
138 AC_CHECK_LIB(dl,dlopen)
140 dnl Library librt : for alpha/osf
141 AC_CHECK_LIB(rt,nanosleep)
143 dnl add library libm :
146 # _CS_gbo We should add all dependent libraries
148 AC_CXX_USE_STD_IOSTREAM
156 echo ---------------------------------------------
158 echo ---------------------------------------------
164 echo ---------------------------------------------
166 echo ---------------------------------------------
172 echo ---------------------------------------------
174 echo ---------------------------------------------
177 dnl _CS_gbo We should use here a variable given from the CHECK_PYTHON
182 echo ---------------------------------------------
184 echo ---------------------------------------------
189 # ----------------------------------------------------------------------------
192 if test x$corba_gen = xtrue; then
195 echo ============================================================
196 echo testing mandatory products for CORBA configurations
197 echo ============================================================
201 dnl ---------------------------------------------
203 dnl ---------------------------------------------
209 echo ---------------------------------------------
210 echo Configuration of the ORB
211 echo ---------------------------------------------
214 echo Testing OMNIORB ...
217 echo Selecting the default ORB
219 echo DEFAULT_ORB : $DEFAULT_ORB
222 CORBA=salome_adm/unix/make_$ORB
226 # The CORBA variable defines the file name that
227 # implements the building rules to be included by Makefile to process
228 # idl files and CORBA specific dependencies (ex: the file
229 # salome_adm/unix/make_omniorb is the default for SALOME). The value
230 # of ORB is defined by CHECK_CORBA.
232 # Note that this checking process is no longer relevant for SALOME
233 # because the possibility of changing the ORB as a plugin is probably
234 # deprecated. The software configuration is clearly omniorb for CORBA
235 # communication. This could be simplify in a near futur.
238 echo ---------------------------------------------
240 echo ---------------------------------------------
246 echo ---------------------------------------------
248 echo ---------------------------------------------
255 # ----------------------------------------------------------------------------
258 echo ============================================================
259 echo testing parallel products
260 echo ============================================================
264 echo ---------------------------------------------
265 echo checking if MPI is requested by user
266 echo ---------------------------------------------
272 echo ---------------------------------------------
273 echo checking if PaCO++ is requested by user
274 echo ---------------------------------------------
280 echo ------------------------------------------------------------
281 echo checking if parallel kernel extensions are requested by user
282 echo ------------------------------------------------------------
285 AC_MSG_CHECKING(whether to enable parallel kernel extension)
286 AC_ARG_ENABLE(parallel_extension,
287 AC_HELP_STRING([--enable-parallel_extension], [parallel kernel extension = [no/yes] (default is no)]),
288 parallel_extension_ok=$enableval,
289 parallel_extension_ok=no)
290 if test "x$parallel_extension_ok" = "xyes"
292 if test "x$PaCO_ok" = "xno"
294 parallel_extension_ok=no
298 if test "x$parallel_extension_ok" = "xyes"
305 AM_CONDITIONAL([WITH_PACO_PARALLEL], [test "x$parallel_extension_ok" = "xyes"])
308 echo ============================================================
309 echo testing optionnal products
310 echo ============================================================
314 echo ---------------------------------------------
316 echo ---------------------------------------------
319 dnl Several batch systems (OpenPBS, LSF, ...) can be operated using
320 dnl the Batch classes library integrated in the KERNEL module. The
321 dnl checking process tests here the presence of underlying batch
322 dnl softwares. If none is detected, the KERNEL is declared to be
329 dnl openpbs_ok is set to yes by CHECK_OPENPBS
335 dnl lsf_ok is set to yes by CHECK_LSF
338 echo testing Local batch system
339 echo --------------------------
342 dnl localbatch_ok is set to yes by CHECK_LOCAL
345 test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes
348 [AC_HELP_STRING([--enable-batch],[Batch [default=yes]])],
349 [case "${enableval}" in
350 yes) test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes;;
352 *) AC_MSG_ERROR(bad value ${enableval} for --enable-batch) ;;
353 esac],[test x$openpbs_ok = xyes || test x$lsf_ok = xyes || test x$localbatch_ok = xyes && WITH_BATCH=yes])
355 echo Batch mode = $WITH_BATCH
358 AM_CONDITIONAL(WITH_BATCH, [test x"$WITH_BATCH" = xyes])
361 echo ----------------------------------------------
362 echo testing CPPUNIT only required for unit testing
363 echo ----------------------------------------------
368 echo ============================================================
369 echo testing products required only for documentation generation
370 echo ============================================================
374 echo ---------------------------------------------
375 echo Testing html generators
376 echo ---------------------------------------------
379 CHECK_HTML_GENERATORS
382 echo ============================================================
384 echo ============================================================
387 # This function displays the values of each variable given in arguments
390 for var in $variables
393 if test x$toto != "x"; then
394 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
400 # --------------------------------------
402 function check_fatal_error {
404 for var in $variables
407 if test x$toto != "xyes"; then
408 echo "FATAL ERROR: some mandatory products are missing."
409 echo "Installing the missing products is required before running the configure script".
415 # --------------------------------------
417 if test x$corba_gen = xtrue; then
418 basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok"
420 basic_mandatory_products="cc_ok threads_ok hdf5_ok"
423 echo --- General mandatory products - Light configuration:
424 summary $basic_mandatory_products
425 check_fatal_error $basic_mandatory_products
428 corba_mandatory_products="omniORB_ok boost_ok libxml_ok"
429 if test x$corba_gen = xtrue; then
430 echo --- CORBA mandatory products - default configuration:
431 summary $corba_mandatory_products
432 check_fatal_error $corba_mandatory_products
434 echo --- CORBA products not required - option --disable-corba-gen
435 if test x"$WITH_BATCH" = xyes; then
436 echo --- BATCH mode mandatory products - default configuration:
438 check_fatal_error "python_ok"
440 echo --- Python not required - option --enable-batch=no
445 parallel_products="mpi_ok PaCO_ok parallel_extension_ok"
446 echo --- Kernel parallel extensions:
447 summary $parallel_products
450 optional_products="cppunit_ok openpbs_ok lsf_ok"
451 echo --- Optional products:
452 echo [" These products are optional because the KERNEL functions"]
453 echo [" using them are built only if the products are detected."]
454 summary $optional_products
457 htmldoc_products="doxygen_ok graphviz_ok rst2html_ok"
459 echo --- Html documentation products: only required for doc production
460 summary $htmldoc_products
464 echo "Default ORB : $DEFAULT_ORB"
467 dnl generals files which could be included in every makefile
469 AC_SUBST_FILE(COMMENCE) COMMENCE=salome_adm/unix/make_commence
470 AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
471 AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
474 AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
476 dnl We don t need to say when we re entering directories if we re using
477 dnl GNU make becuase make does it for us.
478 if test "X$GMAKE" = "Xyes"; then
479 AC_SUBST(SETX) SETX=":"
481 AC_SUBST(SETX) SETX="set -x"
485 echo ---------------------------------------------
486 echo copying resource files, shell scripts, and
488 echo ---------------------------------------------
494 for i in `find $ROOT_SRCDIR/bin`
496 local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR/bin,.,"`
499 . | */CVS | */CVS/* | ./salome) ;;
500 ./appliskel |./appliskel/env.d) $INSTALL -d $local_bin ; echo $local_bin ;;
501 *) $INSTALL $i $local_bin; echo $local_bin ;;
507 echo ---------------------------------------------
508 echo generating Makefiles and configure files
509 echo ---------------------------------------------
512 AC_OUTPUT_COMMANDS([ \
514 chmod +x ./bin/salome/* \
517 # This list is initiated using autoscan and must be updated manually
518 # when adding a new file <filename>.in to manage. When you execute
519 # autoscan, the Makefile list is generated in the output file configure.scan.
520 # This could be helpfull to update de configuration.
523 ./salome_adm/unix/SALOMEconfig.ref \
524 ./salome_adm/Makefile \
525 ./salome_adm/unix/Makefile \
526 ./salome_adm/unix/config_files/Makefile \
532 ./doc/salome/Makefile \
533 ./doc/salome/tui/Makefile \
534 ./doc/salome/tui/INPUT/doxyuser:./doc/salome/tui/KERNEL/doxyuser.in \
535 ./doc/salome/tui/INPUT/doxydev:./doc/salome/tui/KERNEL/doxydev.in \
536 ./doc/salome/tui/INPUT/sources/static/tree.js:./doc/salome/tui/KERNEL/sources/static/tree.js.in \
538 ./resources/Makefile \
539 ./resources/KERNELCatalog.xml \
540 ./resources/CatalogResources.xml \
541 ./resources/DEPRECATED/Plugin \
543 ./src/Basics/Makefile \
544 ./src/Basics/Test/Makefile \
545 ./src/Batch/Makefile \
546 ./src/Batch_SWIG/Makefile \
547 ./src/Communication/Makefile \
548 ./src/Communication_SWIG/Makefile \
549 ./src/Container/Makefile \
550 ./src/ParallelContainer/Makefile \
553 ./src/DSC/DSC_Basic/Makefile \
554 ./src/DSC/DSC_User/Makefile \
555 ./src/DSC/DSC_User/Basic/Makefile \
556 ./src/DSC/DSC_User/Datastream/Makefile \
557 ./src/DSC/DSC_User/Datastream/Palm/Makefile \
558 ./src/DSC/DSC_User/Datastream/Calcium/Makefile \
559 ./src/DSC/ParallelDSC/Makefile \
560 ./src/DSC/DSC_Python/Makefile \
561 ./src/GenericObj/Makefile \
562 ./src/HDFPersist/Makefile \
563 ./src/KERNEL_PY/Makefile \
564 ./src/Launcher/Makefile \
565 ./src/LifeCycleCORBA/Makefile \
566 ./src/LifeCycleCORBA/Test/Makefile \
567 ./src/LifeCycleCORBA_SWIG/Makefile \
568 ./src/LifeCycleCORBA_SWIG/Test/Makefile \
569 ./src/Logger/Makefile \
570 ./src/Logger/Test/Makefile \
571 ./src/ModuleCatalog/Makefile \
572 ./src/ModuleGenerator/Makefile \
573 ./src/ModuleGenerator/testIDLparser \
574 ./src/MPIContainer/Makefile \
575 ./src/NamingService/Makefile \
576 ./src/NamingService/Test/Makefile \
577 ./src/Notification/Makefile \
578 ./src/NOTIFICATION_SWIG/Makefile \
579 ./src/Registry/Makefile \
580 ./src/ResourcesManager/Makefile \
581 ./src/SALOMEDS/Makefile \
582 ./src/SALOMEDS/Test/Makefile \
583 ./src/SALOMEDSClient/Makefile \
584 ./src/SALOMEDSImpl/Makefile \
585 ./src/SALOMEDSImpl/Test/Makefile \
586 ./src/SALOMELocalTrace/Makefile \
587 ./src/SALOMELocalTrace/Test/Makefile \
588 ./src/SALOMETraceCollector/Makefile \
589 ./src/SALOMETraceCollector/Test/Makefile \
590 ./src/TestContainer/Makefile \
591 ./src/TestMPIContainer/Makefile \
592 ./src/TOOLSDS/Makefile \
593 ./src/UnitTests/Makefile \
594 ./src/Utils/Makefile \
595 ./src/Utils/Test/Makefile \