1 # Copyright (C) 2007-2012 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.6.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)}'`
38 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
43 echo ---------------------------------------------
44 echo Initialize source and build root directories
45 echo ---------------------------------------------
49 dnl Initialize source and build root directories
53 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
59 AC_SUBST(ROOT_BUILDDIR)
62 echo Source root directory : $ROOT_SRCDIR
63 echo Build root directory : $ROOT_BUILDDIR
67 if test -z "$AR"; then
68 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
72 dnl Export the AR macro so that it will be placed in the libtool file
77 echo ---------------------------------------------
79 echo ---------------------------------------------
86 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
89 echo ---------------------------------------------
90 echo Configuring production
91 echo ---------------------------------------------
96 echo ---------------------------------------------
98 echo ---------------------------------------------
100 dnl first, we set static to no!
101 dnl if we want it, use --enable-static
107 dnl Fix up the INSTALL macro if it s a relative path. We want the
108 dnl full-path to the binary instead.
111 INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
116 echo ---------------------------------------------
118 echo ---------------------------------------------
122 dnl inutil car libtool
126 AC_CXX_TEMPLATE_OPTIONS
128 # AC_CC_WARNINGS([ansi])
132 echo ---------------------------------------------
134 echo ---------------------------------------------
139 AC_F77_LIBRARY_LDFLAGS
141 AC_FC_LIBRARY_LDFLAGS
142 if test "X$FC" != "X" ; then
147 dnl AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
152 AC_CHECK_LIB(dl,dlopen)
154 dnl add library libm :
158 dnl Well we use sstream which is not in gcc pre-2.95.3
159 dnl We must test if it exists. If not, add it in include !
165 dnl ---------------------------------------------
167 dnl ---------------------------------------------
173 echo ---------------------------------------------
175 echo ---------------------------------------------
181 echo ---------------------------------------------
182 echo testing LEX \& YACC
183 echo ---------------------------------------------
192 echo ---------------------------------------------
194 echo ---------------------------------------------
200 dnl echo ---------------------------------------------
201 dnl echo testing java
202 dnl echo ---------------------------------------------
208 echo ---------------------------------------------
210 echo ---------------------------------------------
217 echo ---------------------------------------------
219 echo ---------------------------------------------
224 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
226 echo ---------------------------------------------
228 echo ---------------------------------------------
234 dnl echo ---------------------------------------------
235 dnl echo testing mico
236 dnl echo ---------------------------------------------
242 echo ---------------------------------------------
243 echo default ORB : omniORB
244 echo ---------------------------------------------
250 echo ---------------------------------------------
252 echo ---------------------------------------------
259 CORBA=adm_local/unix/$corba
264 echo ---------------------------------------------
266 echo ---------------------------------------------
272 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
276 AM_CONDITIONAL(SMESH_ENABLE_GUI, [test "${gui_ok}" = "yes"])
278 if test "${SalomeGUI_need}" == "yes"; then
279 if test "${FullGUI_ok}" != "yes"; then
280 AC_MSG_WARN(For configure SMESH module necessary full GUI!)
282 elif test "${SalomeGUI_need}" == "auto"; then
283 if test "${FullGUI_ok}" != "yes"; then
284 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
286 elif test "${SalomeGUI_need}" == "no"; then
287 echo Build without GUI option has been chosen
290 if test "${gui_ok}" = "yes"; then
292 echo ---------------------------------------------
294 echo ---------------------------------------------
300 echo ---------------------------------------------
302 echo ---------------------------------------------
308 echo ---------------------------------------------
310 echo ---------------------------------------------
316 echo ---------------------------------------------
318 echo ---------------------------------------------
324 echo ---------------------------------------------
326 echo ---------------------------------------------
333 echo ---------------------------------------------
335 echo ---------------------------------------------
341 echo ---------------------------------------------
343 echo ---------------------------------------------
349 echo ---------------------------------------------
351 echo ---------------------------------------------
357 echo ---------------------------------------------
359 echo ---------------------------------------------
365 echo ---------------------------------------------
366 echo Testing OpenCascade
367 echo ---------------------------------------------
373 echo ---------------------------------------------
374 echo Testing html generators
375 echo ---------------------------------------------
378 CHECK_HTML_GENERATORS
381 echo ---------------------------------------------
383 echo ---------------------------------------------
388 echo ---------------------------------------------
390 echo ---------------------------------------------
392 dnl Check the libxml that will be required to use the SALOME launcher
396 echo ---------------------------------------------
398 echo ---------------------------------------------
404 echo ---------------------------------------------
406 echo ---------------------------------------------
412 echo ---------------------------------------------
414 echo ---------------------------------------------
422 echo ---------------------------------------------
423 echo Testing CGNS library
424 echo ---------------------------------------------
430 echo ---------------------------------------------
431 echo Testing PADDER library
432 echo ---------------------------------------------
439 echo ---------------------------------------------
440 echo Testing TBB library
441 echo ---------------------------------------------
447 echo ---------------------------------------------
449 echo ---------------------------------------------
454 if test "${gui_ok}" = "yes"; then
455 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 tbb_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok qwt_ok Kernel_ok Geom_ok Med_ok gui_ok"
456 elif test "${SalomeGUI_need}" != "no"; then
457 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok cgns_ok tbb_ok med3_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok Geom_ok Med_ok gui_ok"
459 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok cgns_ok tbb_ok med3_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok Geom_ok Med_ok"
462 for var in $variables
464 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
469 echo "Default ORB : $DEFAULT_ORB"
472 echo "Optionnal products (for plugins):"
473 optional_vars="cgal_ok padder_ok"
474 for var in $optional_vars
476 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
482 dnl We don t need to say when we re entering directories if we re using
483 dnl GNU make becuase make does it for us.
484 if test "X$GMAKE" = "Xyes"; then
485 AC_SUBST(SETX) SETX=":"
487 AC_SUBST(SETX) SETX="set -x"
490 dnl AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
491 dnl AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
492 dnl AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
493 dnl AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
494 dnl AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
495 dnl AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
496 dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
497 dnl AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
499 dnl Build with SMESH cancel compute feature
500 AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
503 echo ---------------------------------------------
504 echo generating Makefiles and configure files
505 echo ---------------------------------------------
508 #AC_OUTPUT_COMMANDS([ \
509 # chmod +x ./bin/*; \
510 # chmod +x ./bin/salome/*; \
514 AC_CONFIG_COMMANDS([hack_libtool],[
515 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
516 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
518 CC=\"hack_libtool\"%g" libtool
519 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
520 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
521 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
524 # This list is initiated using autoscan and must be updated manually
525 # when adding a new file <filename>.in to manage. When you execute
526 # autoscan, the Makefile list is generated in the output file configure.scan.
527 # This could be helpfull to update de configuration.
530 adm_local/cmake_files/Makefile \
531 adm_local/unix/Makefile \
532 adm_local/unix/config_files/Makefile \
537 doc/docutils/Makefile \
538 doc/docutils/conf.py \
539 doc/salome/Makefile \
540 doc/salome/gui/Makefile \
541 doc/salome/gui/SMESH/Makefile \
542 doc/salome/gui/SMESH/doxyfile \
543 doc/salome/gui/SMESH/doxyfile_py \
544 doc/salome/gui/SMESH/static/header.html \
545 doc/salome/gui/SMESH/static/header_py.html \
546 doc/salome/tui/Makefile \
547 doc/salome/tui/doxyfile \
548 doc/salome/tui/static/header.html \
550 src/Controls/Makefile \
551 src/Driver/Makefile \
552 src/DriverDAT/Makefile \
553 src/DriverMED/Makefile \
554 src/DriverSTL/Makefile \
555 src/DriverUNV/Makefile \
556 src/DriverGMF/Makefile \
557 src/DriverCGNS/Makefile \
558 src/MEFISTO2/Makefile \
559 src/OBJECT/Makefile \
560 src/PluginUtils/Makefile \
563 src/SMESHUtils/Makefile \
564 src/SMESHClient/Makefile \
565 src/SMESHDS/Makefile \
566 src/SMESHFiltersSelection/Makefile \
567 src/SMESHGUI/Makefile \
568 src/SMESH_I/Makefile \
569 src/SMESH_SWIG/Makefile \
570 src/SMESH_SWIG_WITHIHM/Makefile \
571 src/StdMeshers/Makefile \
572 src/StdMeshersGUI/Makefile \
573 src/StdMeshers_I/Makefile \
574 src/SMESH_PY/Makefile \
576 src/Tools/MeshCut/Makefile \
577 src/Tools/YamsPlug/Makefile \
578 src/Tools/padder/Makefile \
579 src/Tools/padder/meshjob/Makefile \
580 src/Tools/padder/meshjob/idl/Makefile \
581 src/Tools/padder/meshjob/impl/Makefile \
582 src/Tools/padder/spadderpy/Makefile \
583 src/Tools/padder/spadderpy/padder.cfg \
584 src/Tools/padder/spadderpy/gui/Makefile \
585 src/Tools/padder/spadderpy/plugin/Makefile \
586 src/Tools/padder/spadderpy/plugin/envPlugins.sh \
587 src/Tools/padder/resources/Makefile \
588 src/Tools/padder/resources/appligen/Makefile \
589 src/Tools/padder/resources/appligen/appligen.sh \
590 src/Tools/padder/resources/appligen/config_appli.xml \
591 src/Tools/padder/resources/testdata/Makefile \
592 src/Tools/padder/unittests/Makefile \
593 src/Tools/padder/unittests/autotest.sh \
594 src/Tools/padder/doc/Makefile \
595 src/Tools/padder/doc/doxyfile \
597 resources/SMESHCatalog.xml \
598 resources/SalomeApp.xml \