1 # Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 # ================================================================
24 # Process this file with autoconf to produce a configure script
25 # ================================================================
28 AC_INIT([Salome2 Project], [5.1.4], [paul.rascle@edf.fr], [SalomeKERNEL])
30 # AC_CONFIG_AUX_DIR defines an alternative directory where to find the auxiliary
31 # scripts such as config.guess, install-sh, ...
32 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
35 AM_INIT_AUTOMAKE([tar-pax -Wno-portability])
36 #AC_CONFIG_HEADER([config.h])
38 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
41 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
46 echo ---------------------------------------------
47 echo Initialize source and build root directories
48 echo ---------------------------------------------
52 # This function return on stdout the absolute path of the filename in
54 # $ filename="../KERNEL_SRC/configure
55 # $ absfilename=`absolute_path $filename`
56 function absolute_path {
59 apath=`dirname $filename`
66 # Build directory, where the configure script is executed.
68 # Source directory, where the configure script is located.
69 ROOT_SRCDIR=`absolute_path $0`
72 AC_SUBST(ROOT_BUILDDIR)
75 echo Source root directory : $ROOT_SRCDIR
76 echo Build root directory : $ROOT_BUILDDIR
78 # ----------------------------------------------------------------------------
81 AC_ARG_ENABLE(corba_gen,
82 [AC_HELP_STRING([--enable-corba-gen],[Generate CORBA stuff [default=yes]])],
83 [case "${enableval}" in
84 yes) corba_gen=true ;;
85 no) corba_gen=false ;;
86 *) AC_MSG_ERROR(bad value ${enableval} for --enable-corba-gen) ;;
87 esac],[corba_gen=true])
88 AM_CONDITIONAL(CORBA_GEN, test x$corba_gen = xtrue)
90 # ---- option to build only launcher and resources manager
91 AC_ARG_WITH(onlylauncher,
92 [AC_HELP_STRING([--with-onlylauncher],[Build only launcher and resources manager [default=no]])],
94 [with_onlylauncher="no"])
95 AM_CONDITIONAL(WITHONLYLAUNCHER, test x$with_onlylauncher = xyes)
96 if test "$with_onlylauncher" != "yes"; then
97 AC_DEFINE([HAVE_SALOME_CONFIG], [], [True if SALOMEconfig.h file is used])
100 # ----------------------------------------------------------------------------
104 echo ============================================================
105 echo testing general mandatory products - for all configurations
106 echo ============================================================
109 dnl Modification B. Secher portage sur osf
110 AC_CHECK_PROG(SHELL,sh)
113 if test -z "$AR"; then
114 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
122 echo ---------------------------------------------
124 echo ---------------------------------------------
131 echo ---------------------------------------------
132 echo Configuring production
133 echo ---------------------------------------------
137 AC_ENABLE_PRODUCTION(no)
138 AC_ENABLE_MPI_SEQ_CONTAINER(no)
140 # _GBO_SALOME_PYTHON_PACKAGING_
141 if test "X$enable_debug" = "Xyes"; then
149 echo ---------------------------------------------
151 echo ---------------------------------------------
154 dnl first, we set static to no!
155 dnl if we want it, use --enable-static
161 echo ---------------------------------------------
163 echo ---------------------------------------------
171 AC_CXX_TEMPLATE_OPTIONS
173 # AC_CC_WARNINGS([ansi])
177 AC_CHECK_LIB(dl,dlopen)
179 dnl Library librt : for alpha/osf
180 AC_CHECK_LIB(rt,nanosleep)
182 dnl add library libm :
185 AC_CXX_USE_STD_IOSTREAM
193 echo ---------------------------------------------
194 echo testing Fortran INTEGER size for CALCIUM
195 echo ---------------------------------------------
201 echo ---------------------------------------------
203 echo ---------------------------------------------
209 echo ---------------------------------------------
211 echo ---------------------------------------------
217 echo ---------------------------------------------
219 echo ---------------------------------------------
222 # _GBO_ This definition is required. Without this definition, the pythondir
223 # would not be defined. The version doesn't matter.
228 echo ---------------------------------------------
230 echo ---------------------------------------------
235 if test x$with_onlylauncher = xno; then
237 echo ---------------------------------------------
239 echo ---------------------------------------------
244 # ----------------------------------------------------------------------------
247 if test x$corba_gen = xtrue; then
250 echo ============================================================
251 echo testing mandatory products for CORBA configurations
252 echo ============================================================
256 dnl ---------------------------------------------
258 dnl ---------------------------------------------
264 echo ---------------------------------------------
265 echo Configuration of the ORB
266 echo ---------------------------------------------
269 echo Testing OMNIORB ...
272 echo Selecting the default ORB
274 echo DEFAULT_ORB : $DEFAULT_ORB
277 CORBA=salome_adm/unix/make_$ORB
281 # The CORBA variable defines the file name that
282 # implements the building rules to be included by Makefile to process
283 # idl files and CORBA specific dependencies (ex: the file
284 # salome_adm/unix/make_omniorb is the default for SALOME). The value
285 # of ORB is defined by CHECK_CORBA.
287 # Note that this checking process is no longer relevant for SALOME
288 # because the possibility of changing the ORB as a plugin is probably
289 # deprecated. The software configuration is clearly omniorb for CORBA
290 # communication. This could be simplify in a near futur.
293 echo ---------------------------------------------
295 echo ---------------------------------------------
302 # ----------------------------------------------------------------------------
305 # --- end test ONLYLAUNCHER
306 # ----------------------------------------------------------------------------
309 echo ============================================================
310 echo testing parallel products
311 echo ============================================================
315 echo ---------------------------------------------
316 echo checking if MPI is requested by user
317 echo ---------------------------------------------
323 echo ---------------------------------------------
324 echo checking if PaCO++ is requested by user
325 echo ---------------------------------------------
331 echo ------------------------------------------------------------
332 echo checking if parallel kernel extensions are requested by user
333 echo ------------------------------------------------------------
336 AC_MSG_CHECKING(whether to enable parallel kernel extension)
337 AC_ARG_ENABLE(parallel_extension,
338 AC_HELP_STRING([--enable-parallel_extension], [parallel kernel extension = [no/yes] (default is no)]),
339 parallel_extension_ok=$enableval,
340 parallel_extension_ok=no)
341 if test "x$parallel_extension_ok" = "xyes"
343 if test "x$PaCO_ok" = "xno"
345 parallel_extension_ok=no
349 if test "x$parallel_extension_ok" = "xyes"
356 AM_CONDITIONAL([WITH_PACO_PARALLEL], [test "x$parallel_extension_ok" = "xyes"])
359 echo ============================================================
360 echo testing optionnal products
361 echo ============================================================
365 echo ----------------------------------------------
366 echo testing CPPUNIT only required for unit testing
367 echo ----------------------------------------------
372 echo --------------------------------------------------------------
373 echo Testing libBatch only required for batch functions in Launcher
374 echo --------------------------------------------------------------
378 AM_CONDITIONAL(WITH_LIBBATCH, [test x"$libbatch_ok" = xyes])
381 echo ============================================================
382 echo testing products required only for documentation generation
383 echo ============================================================
387 echo ---------------------------------------------
388 echo Testing html generators
389 echo ---------------------------------------------
392 CHECK_HTML_GENERATORS
394 # Additional conditional to avoid compilation of non-portable code
395 AM_CONDITIONAL(WINDOWS, [ test ])
398 echo ---------------------------------------------
400 echo ---------------------------------------------
405 echo ============================================================
407 echo ============================================================
410 # This function displays the values of each variable given in arguments
413 for var in $variables
416 if test x$toto != "x"; then
417 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
423 # --------------------------------------
425 function check_fatal_error {
427 for var in $variables
430 if test x$toto != "xyes"; then
431 echo "FATAL ERROR: some mandatory products are missing."
432 echo "Installing the missing products is required before running the configure script".
438 # --------------------------------------
440 if test x$with_onlylauncher = xno; then
441 if test x$corba_gen = xtrue; then
442 basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok libxml_ok"
444 basic_mandatory_products="cc_ok threads_ok hdf5_ok libxml_ok"
447 basic_mandatory_products="cc_ok threads_ok libxml_ok"
450 echo --- General mandatory products - Light configuration:
451 summary $basic_mandatory_products
452 check_fatal_error $basic_mandatory_products
455 if test x$with_onlylauncher = xno; then
456 corba_mandatory_products="omniORB_ok omniORBpy_ok boost_ok"
457 if test x$corba_gen = xtrue; then
458 echo --- CORBA mandatory products - default configuration:
459 summary $corba_mandatory_products
460 check_fatal_error $corba_mandatory_products
462 echo --- CORBA products not required - option --disable-corba-gen
467 parallel_products="mpi_ok PaCO_ok parallel_extension_ok"
468 echo --- Kernel parallel extensions:
469 summary $parallel_products
472 optional_products="cppunit_ok numpy_ok libbatch_ok"
473 echo --- Optional products:
474 echo [" These products are optional because the KERNEL functions"]
475 echo [" using them are built only if the products are detected."]
476 summary $optional_products
478 if test x$libbatch_ok = xno; then
479 echo [" Warning: Batch functions will not be available in"]
480 echo [" Salome Launcher because they require libBatch."]
484 htmldoc_products="doxygen_ok graphviz_ok rst2html_ok sphinx_ok"
486 echo --- Html documentation products: only required for doc production
487 summary $htmldoc_products
490 if test x$with_onlylauncher = xno; then
492 echo "Default ORB : $DEFAULT_ORB"
496 dnl generals files which could be included in every makefile
498 AC_SUBST_FILE(COMMENCE) COMMENCE=salome_adm/unix/make_commence
499 AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
500 AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
503 AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
505 dnl We don t need to say when we re entering directories if we re using
506 dnl GNU make becuase make does it for us.
507 if test "X$GMAKE" = "Xyes"; then
508 AC_SUBST(SETX) SETX=":"
510 AC_SUBST(SETX) SETX="set -x"
514 echo ---------------------------------------------
515 echo generating Makefiles and configure files
516 echo ---------------------------------------------
519 # This list is initiated using autoscan and must be updated manually
520 # when adding a new file <filename>.in to manage. When you execute
521 # autoscan, the Makefile list is generated in the output file configure.scan.
522 # This could be helpfull to update de configuration.
525 salome_adm/unix/SALOMEconfig.ref \
526 salome_adm/Makefile \
527 salome_adm/cmake_files/Makefile \
528 salome_adm/unix/Makefile \
529 salome_adm/unix/config_files/Makefile \
534 doc/salome/Makefile \
535 doc/salome/tui/Makefile \
536 doc/salome/tui/doxyfile \
537 doc/salome/tui/static/header.html \
538 doc/salome/gui/Makefile \
539 doc/salome/gui/doxyfile \
540 doc/salome/gui/static/header.html \
541 doc/docutils/Makefile \
543 idl/Calcium_Ports.idl \
545 resources/KERNELCatalog.xml \
546 resources/CatalogResources.xml \
548 src/Basics/Makefile \
549 src/Basics/Test/Makefile \
550 src/Communication/Makefile \
551 src/Communication_SWIG/Makefile \
552 src/Container/Makefile \
553 src/ParallelContainer/Makefile \
556 src/DSC/DSC_Basic/Makefile \
557 src/DSC/DSC_User/Makefile \
558 src/DSC/DSC_User/Basic/Makefile \
559 src/DSC/DSC_User/Datastream/Makefile \
560 src/DSC/DSC_User/Datastream/Palm/Makefile \
561 src/DSC/DSC_User/Datastream/Calcium/Makefile \
562 src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx \
563 src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx \
564 src/DSC/DSC_User/Datastream/Calcium/CalciumFortranInt.h \
565 src/DSC/ParallelDSC/Makefile \
566 src/DSC/DSC_Python/Makefile \
567 src/GenericObj/Makefile \
568 src/HDFPersist/Makefile \
569 src/KERNEL_PY/Makefile \
570 src/KERNEL_PY/kernel/Makefile \
571 src/KERNEL_PY/kernel/logconfig.py \
572 src/Launcher/Makefile \
573 src/LifeCycleCORBA/Makefile \
574 src/LifeCycleCORBA/Test/Makefile \
575 src/LifeCycleCORBA_SWIG/Makefile \
576 src/LifeCycleCORBA_SWIG/Test/Makefile \
577 src/Logger/Makefile \
578 src/Logger/Test/Makefile \
579 src/ModuleCatalog/Makefile \
580 src/ModuleGenerator/Makefile \
581 src/ModuleGenerator/testIDLparser \
582 src/MPIContainer/Makefile \
583 src/NamingService/Makefile \
584 src/NamingService/Test/Makefile \
585 src/Notification/Makefile \
586 src/NOTIFICATION_SWIG/Makefile \
587 src/Registry/Makefile \
588 src/ResourcesManager/Makefile \
589 src/SALOMEDS/Makefile \
590 src/SALOMEDS/Test/Makefile \
591 src/SALOMEDSClient/Makefile \
592 src/SALOMEDSImpl/Makefile \
593 src/SALOMEDSImpl/Test/Makefile \
594 src/SALOMELocalTrace/Makefile \
595 src/SALOMELocalTrace/Test/Makefile \
596 src/SALOMETraceCollector/Makefile \
597 src/SALOMETraceCollector/Test/Makefile \
598 src/TestContainer/Makefile \
599 src/TestMPIContainer/Makefile \
600 src/TOOLSDS/Makefile \
601 src/UnitTests/Makefile \
603 src/Utils/Test/Makefile \