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)
119 echo ---------------------------------------------
121 echo ---------------------------------------------
128 echo ---------------------------------------------
129 echo Configuring production
130 echo ---------------------------------------------
134 AC_ENABLE_PRODUCTION(no)
135 AC_ENABLE_MPI_SEQ_CONTAINER(no)
137 # _GBO_SALOME_PYTHON_PACKAGING_
142 echo ---------------------------------------------
144 echo ---------------------------------------------
147 dnl first, we set static to no!
148 dnl if we want it, use --enable-static
154 echo ---------------------------------------------
156 echo ---------------------------------------------
164 AC_CXX_TEMPLATE_OPTIONS
166 # AC_CC_WARNINGS([ansi])
170 AC_CHECK_LIB(dl,dlopen)
172 dnl Library librt : for alpha/osf
173 AC_CHECK_LIB(rt,nanosleep)
175 dnl add library libm :
178 AC_CXX_USE_STD_IOSTREAM
186 echo ---------------------------------------------
187 echo testing Fortran INTEGER size for CALCIUM
188 echo ---------------------------------------------
194 echo ---------------------------------------------
196 echo ---------------------------------------------
202 echo ---------------------------------------------
204 echo ---------------------------------------------
210 echo ---------------------------------------------
212 echo ---------------------------------------------
215 # _GBO_ This definition is required. Without this definition, the pythondir
216 # would not be defined. The version doesn't matter.
221 echo ---------------------------------------------
223 echo ---------------------------------------------
228 if test x$with_onlylauncher = xno; then
230 echo ---------------------------------------------
232 echo ---------------------------------------------
237 # ----------------------------------------------------------------------------
240 if test x$corba_gen = xtrue; then
243 echo ============================================================
244 echo testing mandatory products for CORBA configurations
245 echo ============================================================
249 dnl ---------------------------------------------
251 dnl ---------------------------------------------
257 echo ---------------------------------------------
258 echo Configuration of the ORB
259 echo ---------------------------------------------
262 echo Testing OMNIORB ...
265 echo Selecting the default ORB
267 echo DEFAULT_ORB : $DEFAULT_ORB
270 CORBA=salome_adm/unix/make_$ORB
274 # The CORBA variable defines the file name that
275 # implements the building rules to be included by Makefile to process
276 # idl files and CORBA specific dependencies (ex: the file
277 # salome_adm/unix/make_omniorb is the default for SALOME). The value
278 # of ORB is defined by CHECK_CORBA.
280 # Note that this checking process is no longer relevant for SALOME
281 # because the possibility of changing the ORB as a plugin is probably
282 # deprecated. The software configuration is clearly omniorb for CORBA
283 # communication. This could be simplify in a near futur.
286 echo ---------------------------------------------
288 echo ---------------------------------------------
295 # ----------------------------------------------------------------------------
298 # --- end test ONLYLAUNCHER
299 # ----------------------------------------------------------------------------
302 echo ============================================================
303 echo testing parallel products
304 echo ============================================================
308 echo ---------------------------------------------
309 echo checking if MPI is requested by user
310 echo ---------------------------------------------
316 echo ---------------------------------------------
317 echo checking if PaCO++ is requested by user
318 echo ---------------------------------------------
324 echo ------------------------------------------------------------
325 echo checking if parallel kernel extensions are requested by user
326 echo ------------------------------------------------------------
329 AC_MSG_CHECKING(whether to enable parallel kernel extension)
330 AC_ARG_ENABLE(parallel_extension,
331 AC_HELP_STRING([--enable-parallel_extension], [parallel kernel extension = [no/yes] (default is no)]),
332 parallel_extension_ok=$enableval,
333 parallel_extension_ok=no)
334 if test "x$parallel_extension_ok" = "xyes"
336 if test "x$PaCO_ok" = "xno"
338 parallel_extension_ok=no
342 if test "x$parallel_extension_ok" = "xyes"
349 AM_CONDITIONAL([WITH_PACO_PARALLEL], [test "x$parallel_extension_ok" = "xyes"])
352 echo ============================================================
353 echo testing optionnal products
354 echo ============================================================
358 echo ----------------------------------------------
359 echo testing CPPUNIT only required for unit testing
360 echo ----------------------------------------------
365 echo --------------------------------------------------------------
366 echo Testing libBatch only required for batch functions in Launcher
367 echo --------------------------------------------------------------
371 AM_CONDITIONAL(WITH_LIBBATCH, [test x"$libbatch_ok" = xyes])
374 echo ============================================================
375 echo testing products required only for documentation generation
376 echo ============================================================
380 echo ---------------------------------------------
381 echo Testing html generators
382 echo ---------------------------------------------
385 CHECK_HTML_GENERATORS
387 # Additional conditional to avoid compilation of non-portable code
388 AM_CONDITIONAL(WINDOWS, [ test ])
391 echo ---------------------------------------------
393 echo ---------------------------------------------
398 echo ============================================================
400 echo ============================================================
403 # This function displays the values of each variable given in arguments
406 for var in $variables
409 if test x$toto != "x"; then
410 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
416 # --------------------------------------
418 function check_fatal_error {
420 for var in $variables
423 if test x$toto != "xyes"; then
424 echo "FATAL ERROR: some mandatory products are missing."
425 echo "Installing the missing products is required before running the configure script".
431 # --------------------------------------
433 if test x$with_onlylauncher = xno; then
434 if test x$corba_gen = xtrue; then
435 basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok libxml_ok"
437 basic_mandatory_products="cc_ok threads_ok hdf5_ok libxml_ok"
440 basic_mandatory_products="cc_ok threads_ok libxml_ok"
443 echo --- General mandatory products - Light configuration:
444 summary $basic_mandatory_products
445 check_fatal_error $basic_mandatory_products
448 if test x$with_onlylauncher = xno; then
449 corba_mandatory_products="omniORB_ok omniORBpy_ok boost_ok"
450 if test x$corba_gen = xtrue; then
451 echo --- CORBA mandatory products - default configuration:
452 summary $corba_mandatory_products
453 check_fatal_error $corba_mandatory_products
455 echo --- CORBA products not required - option --disable-corba-gen
460 parallel_products="mpi_ok PaCO_ok parallel_extension_ok"
461 echo --- Kernel parallel extensions:
462 summary $parallel_products
465 optional_products="cppunit_ok numpy_ok libbatch_ok"
466 echo --- Optional products:
467 echo [" These products are optional because the KERNEL functions"]
468 echo [" using them are built only if the products are detected."]
469 summary $optional_products
471 if test x$libbatch_ok = xno; then
472 echo [" Warning: Batch functions will not be available in"]
473 echo [" Salome Launcher because they require libBatch."]
477 htmldoc_products="doxygen_ok graphviz_ok rst2html_ok sphinx_ok"
479 echo --- Html documentation products: only required for doc production
480 summary $htmldoc_products
483 if test x$with_onlylauncher = xno; then
485 echo "Default ORB : $DEFAULT_ORB"
489 dnl generals files which could be included in every makefile
491 AC_SUBST_FILE(COMMENCE) COMMENCE=salome_adm/unix/make_commence
492 AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
493 AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
496 AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
498 dnl We don t need to say when we re entering directories if we re using
499 dnl GNU make becuase make does it for us.
500 if test "X$GMAKE" = "Xyes"; then
501 AC_SUBST(SETX) SETX=":"
503 AC_SUBST(SETX) SETX="set -x"
507 echo ---------------------------------------------
508 echo generating Makefiles and configure files
509 echo ---------------------------------------------
512 # This list is initiated using autoscan and must be updated manually
513 # when adding a new file <filename>.in to manage. When you execute
514 # autoscan, the Makefile list is generated in the output file configure.scan.
515 # This could be helpfull to update de configuration.
518 salome_adm/unix/SALOMEconfig.ref \
519 salome_adm/Makefile \
520 salome_adm/cmake_files/Makefile \
521 salome_adm/unix/Makefile \
522 salome_adm/unix/config_files/Makefile \
527 doc/salome/Makefile \
528 doc/salome/tui/Makefile \
529 doc/salome/tui/doxyfile \
530 doc/salome/tui/static/header.html \
531 doc/salome/gui/Makefile \
532 doc/salome/gui/doxyfile \
533 doc/salome/gui/static/header.html \
534 doc/docutils/Makefile \
536 idl/Calcium_Ports.idl \
538 resources/KERNELCatalog.xml \
539 resources/CatalogResources.xml \
541 src/Basics/Makefile \
542 src/Basics/Test/Makefile \
543 src/Communication/Makefile \
544 src/Communication_SWIG/Makefile \
545 src/Container/Makefile \
546 src/ParallelContainer/Makefile \
549 src/DSC/DSC_Basic/Makefile \
550 src/DSC/DSC_User/Makefile \
551 src/DSC/DSC_User/Basic/Makefile \
552 src/DSC/DSC_User/Datastream/Makefile \
553 src/DSC/DSC_User/Datastream/Palm/Makefile \
554 src/DSC/DSC_User/Datastream/Calcium/Makefile \
555 src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx \
556 src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx \
557 src/DSC/DSC_User/Datastream/Calcium/CalciumFortranInt.h \
558 src/DSC/ParallelDSC/Makefile \
559 src/DSC/DSC_Python/Makefile \
560 src/GenericObj/Makefile \
561 src/HDFPersist/Makefile \
562 src/KERNEL_PY/Makefile \
563 src/KERNEL_PY/kernel/Makefile \
564 src/KERNEL_PY/kernel/logconfig.py \
565 src/Launcher/Makefile \
566 src/LifeCycleCORBA/Makefile \
567 src/LifeCycleCORBA/Test/Makefile \
568 src/LifeCycleCORBA_SWIG/Makefile \
569 src/LifeCycleCORBA_SWIG/Test/Makefile \
570 src/Logger/Makefile \
571 src/Logger/Test/Makefile \
572 src/ModuleCatalog/Makefile \
573 src/ModuleGenerator/Makefile \
574 src/ModuleGenerator/testIDLparser \
575 src/MPIContainer/Makefile \
576 src/NamingService/Makefile \
577 src/NamingService/Test/Makefile \
578 src/Notification/Makefile \
579 src/NOTIFICATION_SWIG/Makefile \
580 src/Registry/Makefile \
581 src/ResourcesManager/Makefile \
582 src/SALOMEDS/Makefile \
583 src/SALOMEDS/Test/Makefile \
584 src/SALOMEDSClient/Makefile \
585 src/SALOMEDSImpl/Makefile \
586 src/SALOMEDSImpl/Test/Makefile \
587 src/SALOMELocalTrace/Makefile \
588 src/SALOMELocalTrace/Test/Makefile \
589 src/SALOMETraceCollector/Makefile \
590 src/SALOMETraceCollector/Test/Makefile \
591 src/TestContainer/Makefile \
592 src/TestMPIContainer/Makefile \
593 src/TOOLSDS/Makefile \
594 src/UnitTests/Makefile \
596 src/Utils/Test/Makefile \