1 # Copyright (C) 2007-2008 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
22 # Author : Marc Tajchman (CEA)
24 # Modified by : Patrick GOLDBRONN (CEA)
25 # Modified by : Marc Tajchman (CEA)
26 # Modified by : Mikhail PONIKAROV (OCN)
28 AC_INIT([Salome2 Project MED module], [5.1.0], [webmaster.salome@opencascade.com], [SalomeMED])
29 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
32 AM_INIT_AUTOMAKE([tar-pax])
34 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
37 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
42 dnl Initialize source and build root directories
45 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
51 AC_SUBST(ROOT_BUILDDIR)
54 echo Source root directory : $ROOT_SRCDIR
55 echo Build root directory : $ROOT_BUILDDIR
59 dnl remember MED_WITH_KERNEL set by build configure
62 old_with_kernel=${MED_WITH_KERNEL}
65 dnl Check --with-kernel option
67 dnl ---------------------------------------------
69 dnl ---------------------------------------------
72 dnl Update and re-run configure if there was build_configure --without-kernel
73 dnl but configure --with-kernel=DIR is being called
75 if test "x${old_with_kernel}" != "x${MED_WITH_KERNEL}"; then
76 if test "x${old_with_kernel}" = "xno" ; then
77 if test ! -d "${KERNEL_ROOT_DIR}"; then
78 echo "failed : KERNEL_ROOT_DIR variable is not correct !"
81 kernel_check_in_aclocal=`grep KERNEL_ROOT_DIR ${ROOT_SRCDIR}/aclocal.m4`
82 if test "x${kernel_check_in_aclocal}" = "x"; then
83 echo "Configuration changed: without KERNEL -> with KERNEL"
84 echo -n "Updating 'configure' script ... "
86 if build_configure --with-kernel={MED_WITH_KERNEL} --with-gui={MED_WITH_GUI}; then
100 AM_CONDITIONAL(MED_ENABLE_KERNEL, [test "$MED_WITH_KERNEL" = yes])
101 AM_CONDITIONAL(MED_ENABLE_GUI, [test "$MED_WITH_GUI" = yes])
103 dnl Modification B. Secher portage sur osf CCRT
104 AC_CHECK_PROG(SHELL,sh,,)
107 if test -z "$AR"; then
108 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
112 dnl Export the AR macro so that it will be placed in the libtool file
117 echo ---------------------------------------------
119 echo ---------------------------------------------
125 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
128 AC_DISABLE_PRODUCTION
130 echo ---------------------------------------------
132 echo ---------------------------------------------
134 dnl first, we set static to no!
135 dnl if we want it, use --enable-static
141 dnl Fix up the INSTALL macro if it s a relative path. We want the
142 dnl full-path to the binary instead.
145 INSTALL='\${ROOT_BUILDDIR}'/salome_adm/unix/config_files/install-sh
150 echo ---------------------------------------------
152 echo ---------------------------------------------
156 dnl inutil car libtool
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 :
175 dnl Check if we use std iostream by default or if we must add
176 dnl a compiler directive for that
179 AC_CXX_USE_STD_IOSTREAM
182 dnl Well we use sstream which is not in gcc pre-2.95.3
183 dnl We must test if it exists. If not, add it in include !
187 AM_CONDITIONAL(MED_ENABLE_SSTREAM, [test "$HAVE_SSTREAM" = yes])
190 dnl ---------------------------------------------
192 dnl ---------------------------------------------
198 echo ---------------------------------------------
200 echo ---------------------------------------------
206 echo ---------------------------------------------
208 echo ---------------------------------------------
214 echo ---------------------------------------------
216 echo ---------------------------------------------
221 AM_CONDITIONAL(MED_SWIG_1_3_21, [test "$SWIG_VERSION" = 1.3.21])
224 echo ---------------------------------------------
226 echo ---------------------------------------------
232 echo ---------------------------------------------
234 echo ---------------------------------------------
240 echo ---------------------------------------------
242 echo ---------------------------------------------
248 echo ---------------------------------------------
249 echo "MED_WITH_KERNEL: ${MED_WITH_KERNEL}"
250 echo "MED_WITH_GUI : ${MED_WITH_GUI}"
251 echo ---------------------------------------------
254 # CHECK_OPENPBS ONLY if MED_WITH_KERNEL is yes
257 # CHECK_LSF ONLY if MED_WITH_KERNEL is yes
260 echo ----------------------------------------------
261 echo testing CPPUNIT only required for unit testing
262 echo ----------------------------------------------
268 echo ---------------------------------------------
269 echo checking SPLITTER
270 echo ---------------------------------------------
273 AC_ENABLE_SPLITTER(yes)
274 AM_CONDITIONAL(MED_ENABLE_SPLITTER, [test "$ENABLE_SPLITTER" = yes])
276 if test "x$ENABLE_SPLITTER" = "xyes"; then
279 echo ---------------------------------------------
281 echo ---------------------------------------------
284 CHECK_METIS dnl metis_ok is set to yes by CHECK_METIS
288 echo ---------------------------------------------
290 echo ---------------------------------------------
293 dnl scotch_ok is set to yes by CHECK_SCOTCH
297 echo ---------------------------------------------
299 echo ---------------------------------------------
302 dnl libxml_ok is set to yes by CHECK_LIBXML
306 AM_CONDITIONAL(MED_ENABLE_METIS, [test "$ENABLE_METIS" = yes])
307 AM_CONDITIONAL(MED_ENABLE_SCOTCH, [test "$ENABLE_SCOTCH" = yes])
310 dnl ---------------------------------------------
312 dnl ---------------------------------------------
317 AM_CONDITIONAL(MED_WITHMPI, [test "$WITHMPI" = yes])
320 echo ---------------------------------------------
321 echo Testing FVM library generators
322 echo ---------------------------------------------
326 AM_CONDITIONAL(MED_ENABLE_FVM, [test "$ENABLE_FVM" = yes])
329 echo ---------------------------------------------
330 echo Testing html generators
331 echo ---------------------------------------------
334 CHECK_HTML_GENERATORS
336 if test "${MED_WITH_KERNEL}" = "yes"; then
339 echo ---------------------------------------------
341 echo ---------------------------------------------
347 echo ---------------------------------------------
349 echo ---------------------------------------------
355 dnl ---------------------------------------------
357 dnl ---------------------------------------------
363 dnl ---------------------------------------------
365 dnl ---------------------------------------------
369 test x$openpbs_ok = xyes || test x$lsf_ok = xyes && WITH_BATCH=yes
372 if test "${MED_WITH_GUI}" = "yes"; then
374 echo ---------------------------------------------
375 echo testing LEX \& YACC
376 echo ---------------------------------------------
386 echo ---------------------------------------------
388 echo ---------------------------------------------
394 echo ---------------------------------------------
395 echo default ORB : omniORB
396 echo ---------------------------------------------
404 CORBA=adm_local/unix/$corba
406 if test "${MED_WITH_GUI}" = "yes"; then
409 echo ---------------------------------------------
411 echo ---------------------------------------------
417 echo ---------------------------------------------
419 echo ---------------------------------------------
425 echo ---------------------------------------------
427 echo ---------------------------------------------
433 echo ---------------------------------------------
434 echo Testing OpenCascade
435 echo ---------------------------------------------
442 echo ---------------------------------------------
444 echo ---------------------------------------------
450 dnl echo ---------------------------------------------
451 dnl echo testing mico
452 dnl echo ---------------------------------------------
463 AC_SUBST(WITHOPENPBS)
467 if test "${MED_WITH_GUI}" = "yes"; then
470 echo ---------------------------------------------
472 echo ---------------------------------------------
478 echo ---------------------------------------------
479 echo Testing full GUI
480 echo ---------------------------------------------
484 if test "x${CORBA_IN_GUI}" != "xyes"; then
485 echo "failed : For configure MED module necessary full GUI !"
492 echo ---------------------------------------------
494 echo ---------------------------------------------
497 if test "$MED_WITH_KERNEL" = "no"; then
498 echo "Configure (without Kernel)"
503 if test "${MED_WITH_GUI}" = "yes"; then
504 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok sip_ok pyqt_ok qwt_ok occ_ok doxygen_ok Kernel_ok SalomeGUI_ok"
506 variables="cc_ok python_ok swig_ok threads_ok hdf5_ok med2_ok omniORB_ok doxygen_ok Kernel_ok"
509 if test "x$ENABLE_SPLITTER" = "xyes"; then
510 variables="$variables metis_ok scotch_ok libxml_ok"
513 for var in $variables
516 if test x$toto != "x"; then
517 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
522 dnl optional variables
526 variables="mpi_ok fvm_ok cppunit_ok"
527 if test "${MED_WITH_KERNEL}" = "yes"; then
528 variables="$variables openpbs_ok lsf_ok graphviz_ok"
531 for var in $variables
534 if test x$toto != "x"; then
535 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
541 echo "Default ORB : $DEFAULT_ORB"
544 dnl We don t need to say when we re entering directories if we re using
545 dnl GNU make becuase make does it for us.
546 if test "X$GMAKE" = "Xyes"; then
547 AC_SUBST(SETX) SETX=":"
549 AC_SUBST(SETX) SETX="set -x"
552 if test -n "${NO_MED_TRACE+X}"; then
553 CPPFLAGS="${CPPFLAGS} -D_NO_MED_TRACE_"
557 echo ---------------------------------------------
558 echo generating Makefiles and configure files
559 echo ---------------------------------------------
562 AC_OUTPUT_COMMANDS([ \
567 ./salome_adm/unix/SALOMEconfig.h \
568 ./adm_local_without_kernel/unix/SALOMEconfig.h \
571 ./adm_local/unix/config_files/Makefile \
572 ./adm_local/unix/Makefile \
573 ./adm_local/cmake_files/Makefile \
574 ./adm_local/Makefile \
575 ./adm_local_without_kernel/unix/config_files/Makefile \
576 ./adm_local_without_kernel/unix/Makefile \
577 ./adm_local_without_kernel/Makefile \
579 ./resources/MEDCatalog.xml \
584 ./src/MEDWrapper/Makefile \
585 ./src/MEDWrapper/Base/Makefile \
586 ./src/MEDWrapper/Factory/Makefile \
587 ./src/MEDWrapper/V2_1/Makefile \
588 ./src/MEDWrapper/V2_1/Core/Makefile \
589 ./src/MEDWrapper/V2_1/Wrapper/Makefile \
590 ./src/MEDWrapper/V2_2/Makefile \
591 ./src/MEDMEM/Doxyfile_med_devel \
592 ./src/MEDMEM/Doxyfile_med_user \
593 ./src/MEDMEM/Makefile \
594 ./src/INTERPOLATION/Makefile \
595 ./src/MEDMEM_SWIG/Makefile \
596 ./src/MEDMEMBinTest/Makefile \
597 ./src/MEDMEMCppTest/Makefile \
598 ./src/INTERP_KERNEL/Makefile \
599 ./src/INTERP_KERNEL/Bases/Makefile \
600 ./src/INTERP_KERNEL/Geometric2D/Makefile \
601 ./src/INTERP_KERNELTest/Makefile \
602 ./src/MEDCoupling/Makefile \
603 ./src/MEDCoupling/Test/Makefile \
604 ./src/MEDSPLITTER/Makefile \
605 ./src/MEDSPLITTER/Test/Makefile \
606 ./src/MEDSPLITTER_Swig/Makefile \
607 ./src/MULTIPR/Makefile \
608 ./src/ParaMEDMEM/Makefile \
609 ./src/ParaMEDMEM/MEDLoader/Makefile \
610 ./src/ParaMEDMEM/Test/Makefile \
611 ./src/ParaMEDMEM_Swig/Makefile \
612 ./src/MEDMEM_I/Makefile \
614 ./src/MedCorba_Swig/Makefile \
615 ./src/MED_SWIG/Makefile \
616 ./src/MedClient/Makefile \
617 ./src/MedClient/src/Makefile \
618 ./src/MedClient/test/Makefile \
619 ./src/MedClient/test/environ/Makefile \
620 ./src/MedClient/test/environ/runContainer \
621 ./src/MedClient/test/environ/runEnvironTests \
622 ./src/MedClient/test/environ/runTestMedCorba \
623 ./src/MedClient/test/environ/stopContainer \
624 ./src/MedClient/test/environ/csh/init1 \
625 ./src/MedClient/test/environ/csh/init2 \
626 ./src/MedClient/test/environ/csh/init3 \
627 ./src/MedClient/test/environ/csh/Makefile \
628 ./src/MedClient/test/environ/csh/runContainer \
629 ./src/MedClient/test/environ/csh/runEnvironTests \
630 ./src/MedClient/test/environ/csh/stopContainer \
631 ./src/MedClient/test/test1/Makefile \
632 ./src/MedClient/test/test2/Makefile \
633 ./src/MEDGUI/Makefile \
635 ./doc/MEDMEM/Makefile \
636 ./doc/MEDMEM/MEDMEM_Content.tex \
637 ./doc/MEDMEM/MEDMEM_UML_light.png \
638 ./doc/MEDMEM/MEDMEM_UML.png \
639 ./doc/MEDMEM/MEDMEM_UsersGuide.tex \
640 ./doc/salome/Makefile \
641 ./doc/salome/tui/Makefile \
642 ./doc/salome/tui/doxyfile \
643 ./doc/doxygen/Makefile \
644 ./doc/doxygen/Doxyfile_med_user \
647 dnl To avoid recompiling half of the sources because of SALOMEconfig.h recreating
648 touch -d 01Jan2007 ./salome_adm/unix/SALOMEconfig.h