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], [6.1.0], [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)
138 echo ---------------------------------------------
140 echo ---------------------------------------------
143 dnl first, we set static to no!
144 dnl if we want it, use --enable-static
150 echo ---------------------------------------------
152 echo ---------------------------------------------
160 AC_CXX_TEMPLATE_OPTIONS
162 # AC_CC_WARNINGS([ansi])
166 AC_CHECK_LIB(dl,dlopen)
168 dnl Library librt : for alpha/osf
169 AC_CHECK_LIB(rt,nanosleep)
171 dnl add library libm :
174 # _CS_gbo We should add all dependent libraries
176 AC_CXX_USE_STD_IOSTREAM
184 echo ---------------------------------------------
185 echo testing Fortran INTEGER size for CALCIUM
186 echo ---------------------------------------------
192 echo ---------------------------------------------
194 echo ---------------------------------------------
200 echo ---------------------------------------------
202 echo ---------------------------------------------
208 echo ---------------------------------------------
210 echo ---------------------------------------------
213 dnl _CS_gbo We should use here a variable given from the CHECK_PYTHON
218 echo ---------------------------------------------
220 echo ---------------------------------------------
225 if test x$with_onlylauncher = xno; then
227 echo ---------------------------------------------
229 echo ---------------------------------------------
234 # ----------------------------------------------------------------------------
237 if test x$corba_gen = xtrue; then
240 echo ============================================================
241 echo testing mandatory products for CORBA configurations
242 echo ============================================================
246 dnl ---------------------------------------------
248 dnl ---------------------------------------------
254 echo ---------------------------------------------
255 echo Configuration of the ORB
256 echo ---------------------------------------------
259 echo Testing OMNIORB ...
262 echo Selecting the default ORB
264 echo DEFAULT_ORB : $DEFAULT_ORB
267 CORBA=salome_adm/unix/make_$ORB
271 # The CORBA variable defines the file name that
272 # implements the building rules to be included by Makefile to process
273 # idl files and CORBA specific dependencies (ex: the file
274 # salome_adm/unix/make_omniorb is the default for SALOME). The value
275 # of ORB is defined by CHECK_CORBA.
277 # Note that this checking process is no longer relevant for SALOME
278 # because the possibility of changing the ORB as a plugin is probably
279 # deprecated. The software configuration is clearly omniorb for CORBA
280 # communication. This could be simplify in a near futur.
283 echo ---------------------------------------------
285 echo ---------------------------------------------
292 # ----------------------------------------------------------------------------
295 # --- end test ONLYLAUNCHER
296 # ----------------------------------------------------------------------------
299 echo ============================================================
300 echo testing parallel products
301 echo ============================================================
305 echo ---------------------------------------------
306 echo checking if MPI is requested by user
307 echo ---------------------------------------------
313 echo ---------------------------------------------
314 echo checking if PaCO++ is requested by user
315 echo ---------------------------------------------
321 echo ------------------------------------------------------------
322 echo checking if parallel kernel extensions are requested by user
323 echo ------------------------------------------------------------
326 AC_MSG_CHECKING(whether to enable parallel kernel extension)
327 AC_ARG_ENABLE(parallel_extension,
328 AC_HELP_STRING([--enable-parallel_extension], [parallel kernel extension = [no/yes] (default is no)]),
329 parallel_extension_ok=$enableval,
330 parallel_extension_ok=no)
331 if test "x$parallel_extension_ok" = "xyes"
333 if test "x$PaCO_ok" = "xno"
335 parallel_extension_ok=no
339 if test "x$parallel_extension_ok" = "xyes"
346 AM_CONDITIONAL([WITH_PACO_PARALLEL], [test "x$parallel_extension_ok" = "xyes"])
349 echo ============================================================
350 echo testing optionnal products
351 echo ============================================================
355 echo ----------------------------------------------
356 echo testing CPPUNIT only required for unit testing
357 echo ----------------------------------------------
362 echo --------------------------------------------------------------
363 echo Testing libBatch only required for batch functions in Launcher
364 echo --------------------------------------------------------------
368 AM_CONDITIONAL(WITH_LIBBATCH, [test x"$libbatch_ok" = xyes])
371 echo ============================================================
372 echo testing products required only for documentation generation
373 echo ============================================================
377 echo ---------------------------------------------
378 echo Testing html generators
379 echo ---------------------------------------------
382 CHECK_HTML_GENERATORS
384 # Additional conditional to avoid compilation of non-portable code
385 AM_CONDITIONAL(WINDOWS, [ test ])
388 echo ============================================================
390 echo ============================================================
393 # This function displays the values of each variable given in arguments
396 for var in $variables
399 if test x$toto != "x"; then
400 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
406 # --------------------------------------
408 function check_fatal_error {
410 for var in $variables
413 if test x$toto != "xyes"; then
414 echo "FATAL ERROR: some mandatory products are missing."
415 echo "Installing the missing products is required before running the configure script".
421 # --------------------------------------
423 if test x$with_onlylauncher = xno; then
424 if test x$corba_gen = xtrue; then
425 basic_mandatory_products="cc_ok threads_ok python_ok swig_ok hdf5_ok libxml_ok"
427 basic_mandatory_products="cc_ok threads_ok hdf5_ok libxml_ok"
430 basic_mandatory_products="cc_ok threads_ok libxml_ok"
433 echo --- General mandatory products - Light configuration:
434 summary $basic_mandatory_products
435 check_fatal_error $basic_mandatory_products
438 if test x$with_onlylauncher = xno; then
439 corba_mandatory_products="omniORB_ok omniORBpy_ok boost_ok"
440 if test x$corba_gen = xtrue; then
441 echo --- CORBA mandatory products - default configuration:
442 summary $corba_mandatory_products
443 check_fatal_error $corba_mandatory_products
445 echo --- CORBA products not required - option --disable-corba-gen
450 parallel_products="mpi_ok PaCO_ok parallel_extension_ok"
451 echo --- Kernel parallel extensions:
452 summary $parallel_products
455 optional_products="cppunit_ok numpy_ok libbatch_ok"
456 echo --- Optional products:
457 echo [" These products are optional because the KERNEL functions"]
458 echo [" using them are built only if the products are detected."]
459 summary $optional_products
461 if test x$libbatch_ok = xno; then
462 echo [" Warning: Batch functions will not be available in"]
463 echo [" Salome Launcher because they require libBatch."]
467 htmldoc_products="doxygen_ok graphviz_ok rst2html_ok"
469 echo --- Html documentation products: only required for doc production
470 summary $htmldoc_products
473 if test x$with_onlylauncher = xno; then
475 echo "Default ORB : $DEFAULT_ORB"
479 dnl generals files which could be included in every makefile
481 AC_SUBST_FILE(COMMENCE) COMMENCE=salome_adm/unix/make_commence
482 AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
483 AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
486 AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
488 dnl We don t need to say when we re entering directories if we re using
489 dnl GNU make becuase make does it for us.
490 if test "X$GMAKE" = "Xyes"; then
491 AC_SUBST(SETX) SETX=":"
493 AC_SUBST(SETX) SETX="set -x"
497 echo ---------------------------------------------
498 echo generating Makefiles and configure files
499 echo ---------------------------------------------
502 # This list is initiated using autoscan and must be updated manually
503 # when adding a new file <filename>.in to manage. When you execute
504 # autoscan, the Makefile list is generated in the output file configure.scan.
505 # This could be helpfull to update de configuration.
508 salome_adm/unix/SALOMEconfig.ref \
509 salome_adm/Makefile \
510 salome_adm/cmake_files/Makefile \
511 salome_adm/unix/Makefile \
512 salome_adm/unix/config_files/Makefile \
517 doc/salome/Makefile \
518 doc/salome/tui/Makefile \
519 doc/salome/tui/doxyfile \
520 doc/salome/tui/static/header.html \
521 doc/salome/gui/Makefile \
522 doc/salome/gui/doxyfile \
523 doc/salome/gui/static/header.html \
525 idl/Calcium_Ports.idl \
527 resources/KERNELCatalog.xml \
528 resources/CatalogResources.xml \
530 src/Basics/Makefile \
531 src/Basics/Test/Makefile \
532 src/Communication/Makefile \
533 src/Communication_SWIG/Makefile \
534 src/Container/Makefile \
535 src/ParallelContainer/Makefile \
538 src/DSC/DSC_Basic/Makefile \
539 src/DSC/DSC_User/Makefile \
540 src/DSC/DSC_User/Basic/Makefile \
541 src/DSC/DSC_User/Datastream/Makefile \
542 src/DSC/DSC_User/Datastream/Palm/Makefile \
543 src/DSC/DSC_User/Datastream/Calcium/Makefile \
544 src/DSC/DSC_User/Datastream/Calcium/calcium_integer_port_uses.hxx \
545 src/DSC/DSC_User/Datastream/Calcium/CalciumProvidesPort.hxx \
546 src/DSC/DSC_User/Datastream/Calcium/CalciumFortranInt.h \
547 src/DSC/ParallelDSC/Makefile \
548 src/DSC/DSC_Python/Makefile \
549 src/GenericObj/Makefile \
550 src/HDFPersist/Makefile \
551 src/KERNEL_PY/Makefile \
552 src/Launcher/Makefile \
553 src/LifeCycleCORBA/Makefile \
554 src/LifeCycleCORBA/Test/Makefile \
555 src/LifeCycleCORBA_SWIG/Makefile \
556 src/LifeCycleCORBA_SWIG/Test/Makefile \
557 src/Logger/Makefile \
558 src/Logger/Test/Makefile \
559 src/ModuleCatalog/Makefile \
560 src/ModuleGenerator/Makefile \
561 src/ModuleGenerator/testIDLparser \
562 src/MPIContainer/Makefile \
563 src/NamingService/Makefile \
564 src/NamingService/Test/Makefile \
565 src/Notification/Makefile \
566 src/NOTIFICATION_SWIG/Makefile \
567 src/Registry/Makefile \
568 src/ResourcesManager/Makefile \
569 src/SALOMEDS/Makefile \
570 src/SALOMEDS/Test/Makefile \
571 src/SALOMEDSClient/Makefile \
572 src/SALOMEDSImpl/Makefile \
573 src/SALOMEDSImpl/Test/Makefile \
574 src/SALOMELocalTrace/Makefile \
575 src/SALOMELocalTrace/Test/Makefile \
576 src/SALOMETraceCollector/Makefile \
577 src/SALOMETraceCollector/Test/Makefile \
578 src/TestContainer/Makefile \
579 src/TestMPIContainer/Makefile \
580 src/TOOLSDS/Makefile \
581 src/UnitTests/Makefile \
583 src/Utils/Test/Makefile \