1 # Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 # Author : Marc Tajchman (CEA)
22 # Modified by : Patrick GOLDBRONN (CEA)
23 # Modified by : Marc Tajchman (CEA)
24 # Modified by : Alexander BORODIN (OCN) - autotools usage
25 # Created from configure.in.base
27 AC_INIT([Salome2 Project SMESH module], [6.4.0], [webmaster.salome@opencascade.com], [SalomeSMESH])
28 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
31 AM_INIT_AUTOMAKE([-Wno-portability])
33 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
36 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
41 echo ---------------------------------------------
42 echo Initialize source and build root directories
43 echo ---------------------------------------------
47 dnl Initialize source and build root directories
51 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
57 AC_SUBST(ROOT_BUILDDIR)
60 echo Source root directory : $ROOT_SRCDIR
61 echo Build root directory : $ROOT_BUILDDIR
65 if test -z "$AR"; then
66 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
70 dnl Export the AR macro so that it will be placed in the libtool file
75 echo ---------------------------------------------
77 echo ---------------------------------------------
84 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
87 echo ---------------------------------------------
88 echo Configuring production
89 echo ---------------------------------------------
94 echo ---------------------------------------------
96 echo ---------------------------------------------
98 dnl first, we set static to no!
99 dnl if we want it, use --enable-static
105 dnl Fix up the INSTALL macro if it s a relative path. We want the
106 dnl full-path to the binary instead.
109 INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
114 echo ---------------------------------------------
116 echo ---------------------------------------------
120 dnl inutil car libtool
124 AC_CXX_TEMPLATE_OPTIONS
126 # AC_CC_WARNINGS([ansi])
130 echo ---------------------------------------------
132 echo ---------------------------------------------
137 AC_F77_LIBRARY_LDFLAGS
139 AC_FC_LIBRARY_LDFLAGS
140 if test "X$FC" != "X" ; then
145 dnl AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
150 AC_CHECK_LIB(dl,dlopen)
152 dnl add library libm :
156 dnl Well we use sstream which is not in gcc pre-2.95.3
157 dnl We must test if it exists. If not, add it in include !
163 dnl ---------------------------------------------
165 dnl ---------------------------------------------
171 echo ---------------------------------------------
173 echo ---------------------------------------------
179 echo ---------------------------------------------
180 echo testing LEX \& YACC
181 echo ---------------------------------------------
190 echo ---------------------------------------------
192 echo ---------------------------------------------
198 dnl echo ---------------------------------------------
199 dnl echo testing java
200 dnl echo ---------------------------------------------
206 echo ---------------------------------------------
208 echo ---------------------------------------------
215 echo ---------------------------------------------
217 echo ---------------------------------------------
222 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
224 echo ---------------------------------------------
226 echo ---------------------------------------------
232 dnl echo ---------------------------------------------
233 dnl echo testing mico
234 dnl echo ---------------------------------------------
240 echo ---------------------------------------------
241 echo default ORB : omniORB
242 echo ---------------------------------------------
248 echo ---------------------------------------------
250 echo ---------------------------------------------
257 CORBA=adm_local/unix/$corba
262 echo ---------------------------------------------
264 echo ---------------------------------------------
270 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
274 AM_CONDITIONAL(SMESH_ENABLE_GUI, [test "${gui_ok}" = "yes"])
276 if test "${SalomeGUI_need}" == "yes"; then
277 if test "${FullGUI_ok}" != "yes"; then
278 AC_MSG_WARN(For configure SMESH module necessary full GUI!)
280 elif test "${SalomeGUI_need}" == "auto"; then
281 if test "${FullGUI_ok}" != "yes"; then
282 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
284 elif test "${SalomeGUI_need}" == "no"; then
285 echo Build without GUI option has been chosen
288 if test "${gui_ok}" = "yes"; then
290 echo ---------------------------------------------
292 echo ---------------------------------------------
298 echo ---------------------------------------------
300 echo ---------------------------------------------
304 AC_PATH_PROG(PYUIC, pyuic4)
306 AC_PATH_PROG(PYRCC, pyrcc4)
310 echo ---------------------------------------------
312 echo ---------------------------------------------
319 echo ---------------------------------------------
321 echo ---------------------------------------------
327 echo ---------------------------------------------
329 echo ---------------------------------------------
335 echo ---------------------------------------------
337 echo ---------------------------------------------
343 echo ---------------------------------------------
345 echo ---------------------------------------------
351 echo ---------------------------------------------
352 echo Testing OpenCascade
353 echo ---------------------------------------------
359 echo ---------------------------------------------
360 echo Testing html generators
361 echo ---------------------------------------------
364 CHECK_HTML_GENERATORS
367 echo ---------------------------------------------
369 echo ---------------------------------------------
374 echo ---------------------------------------------
376 echo ---------------------------------------------
378 dnl Check the libxml that will be required to use the SALOME launcher
382 echo ---------------------------------------------
384 echo ---------------------------------------------
390 echo ---------------------------------------------
392 echo ---------------------------------------------
398 echo ---------------------------------------------
400 echo ---------------------------------------------
408 echo ---------------------------------------------
409 echo Testing CGNS library
410 echo ---------------------------------------------
416 echo ---------------------------------------------
418 echo ---------------------------------------------
423 if test "${gui_ok}" = "yes"; then
424 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok cgns_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok qwt_ok Kernel_ok Geom_ok Med_ok gui_ok"
425 elif test "${SalomeGUI_need}" != "no"; then
426 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok cgns_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok Geom_ok Med_ok gui_ok"
428 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok cgns_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok Geom_ok Med_ok"
431 for var in $variables
433 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
438 echo "Default ORB : $DEFAULT_ORB"
441 dnl We don t need to say when we re entering directories if we re using
442 dnl GNU make becuase make does it for us.
443 if test "X$GMAKE" = "Xyes"; then
444 AC_SUBST(SETX) SETX=":"
446 AC_SUBST(SETX) SETX="set -x"
449 dnl AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
450 dnl AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
451 dnl AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
452 dnl AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
453 dnl AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
454 dnl AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
455 dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
456 dnl AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
458 dnl Build with SMESH cancel compute feature
459 AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
462 echo ---------------------------------------------
463 echo generating Makefiles and configure files
464 echo ---------------------------------------------
467 #AC_OUTPUT_COMMANDS([ \
468 # chmod +x ./bin/*; \
469 # chmod +x ./bin/salome/*; \
473 AC_CONFIG_COMMANDS([hack_libtool],[
474 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
475 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
477 CC=\"hack_libtool\"%g" libtool
478 sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool
479 sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool
480 sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1 if ! test -d \$sss; then continue; fi\n\1 ssss=\$(cd \$sss; pwd)\n\1 if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1 case \$ssss in\n\1 /usr/lib | /usr/lib64 ) ;;\n\1 * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1 esac\n\1 fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool
483 # This list is initiated using autoscan and must be updated manually
484 # when adding a new file <filename>.in to manage. When you execute
485 # autoscan, the Makefile list is generated in the output file configure.scan.
486 # This could be helpfull to update de configuration.
489 adm_local/cmake_files/Makefile \
490 adm_local/unix/Makefile \
491 adm_local/unix/config_files/Makefile \
496 doc/docutils/Makefile \
497 doc/docutils/conf.py \
498 doc/salome/Makefile \
499 doc/salome/gui/Makefile \
500 doc/salome/gui/SMESH/Makefile \
501 doc/salome/gui/SMESH/doxyfile \
502 doc/salome/gui/SMESH/doxyfile_py \
503 doc/salome/gui/SMESH/static/header.html \
504 doc/salome/gui/SMESH/static/header_py.html \
505 doc/salome/tui/Makefile \
506 doc/salome/tui/doxyfile \
507 doc/salome/tui/static/header.html \
509 src/Controls/Makefile \
510 src/Driver/Makefile \
511 src/DriverDAT/Makefile \
512 src/DriverMED/Makefile \
513 src/DriverSTL/Makefile \
514 src/DriverUNV/Makefile \
515 src/DriverCGNS/Makefile \
516 src/MEFISTO2/Makefile \
517 src/OBJECT/Makefile \
518 src/PluginUtils/Makefile \
521 src/SMESHUtils/Makefile \
522 src/SMESHClient/Makefile \
523 src/SMESHDS/Makefile \
524 src/SMESHFiltersSelection/Makefile \
525 src/SMESHGUI/Makefile \
526 src/SMESH_I/Makefile \
527 src/SMESH_SWIG/Makefile \
528 src/SMESH_SWIG_WITHIHM/Makefile \
529 src/StdMeshers/Makefile \
530 src/StdMeshersGUI/Makefile \
531 src/StdMeshers_I/Makefile \
532 src/SMESH_PY/Makefile \
534 src/Tools/MeshCut/Makefile \
535 src/Tools/padder/Makefile \
536 src/Tools/padder/meshjob/Makefile \
537 src/Tools/padder/meshjob/idl/Makefile \
538 src/Tools/padder/meshjob/impl/Makefile \
539 src/Tools/padder/spadderpy/Makefile \
540 src/Tools/padder/spadderpy/padder.cfg \
541 src/Tools/padder/spadderpy/gui/Makefile \
542 src/Tools/padder/spadderpy/plugin/Makefile \
543 src/Tools/padder/spadderpy/plugin/envPlugins.sh \
544 src/Tools/padder/resources/Makefile \
545 src/Tools/padder/resources/appligen/Makefile \
546 src/Tools/padder/resources/appligen/appligen.sh \
547 src/Tools/padder/resources/appligen/config_appli.xml \
548 src/Tools/padder/resources/padderexe/Makefile \
549 src/Tools/padder/resources/padderexe/envPadder.sh \
550 src/Tools/padder/unittests/Makefile \
551 src/Tools/padder/unittests/autotest.sh \
552 src/Tools/padder/doc/Makefile \
553 src/Tools/padder/doc/doxyfile \
555 resources/SMESHCatalog.xml \
556 resources/SalomeApp.xml \