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 GEOM module], [6.4.0], [webmaster.salome@opencascade.com], [SalomeGEOM])
28 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
31 AM_INIT_AUTOMAKE([tar-pax -Wno-portability])
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 echo ---------------------------------------------
43 echo Initialize source and build root directories
44 echo ---------------------------------------------
48 dnl Initialize source and build root directories
52 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
58 AC_SUBST(ROOT_BUILDDIR)
61 echo Source root directory : $ROOT_SRCDIR
62 echo Build root directory : $ROOT_BUILDDIR
66 if test -z "$AR"; then
67 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
71 dnl Export the AR macro so that it will be placed in the libtool file
76 echo ---------------------------------------------
78 echo ---------------------------------------------
85 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
88 echo ---------------------------------------------
89 echo Configuring production
90 echo ---------------------------------------------
95 echo ---------------------------------------------
97 echo ---------------------------------------------
99 dnl first, we set static to no!
100 dnl if we want it, use --enable-static
106 dnl Fix up the INSTALL macro if it s a relative path. We want the
107 dnl full-path to the binary instead.
110 INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
115 echo ---------------------------------------------
117 echo ---------------------------------------------
121 dnl inutil car libtool
125 AC_CXX_TEMPLATE_OPTIONS
127 # AC_CC_WARNINGS([ansi])
131 AC_CHECK_LIB(dl,dlopen)
133 dnl add library libm :
137 dnl Well we use sstream which is not in gcc pre-2.95.3
138 dnl We must test if it exists. If not, add it in include !
144 dnl ---------------------------------------------
146 dnl ---------------------------------------------
152 echo ---------------------------------------------
154 echo ---------------------------------------------
160 echo ---------------------------------------------
161 echo testing LEX \& YACC
162 echo ---------------------------------------------
171 echo ---------------------------------------------
173 echo ---------------------------------------------
179 dnl echo ---------------------------------------------
180 dnl echo testing java
181 dnl echo ---------------------------------------------
187 echo ---------------------------------------------
189 echo ---------------------------------------------
196 echo ---------------------------------------------
198 echo ---------------------------------------------
203 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
205 echo ---------------------------------------------
207 echo ---------------------------------------------
213 dnl echo ---------------------------------------------
214 dnl echo testing mico
215 dnl echo ---------------------------------------------
221 echo ---------------------------------------------
222 echo default ORB : omniORB
223 echo ---------------------------------------------
229 echo ---------------------------------------------
231 echo ---------------------------------------------
238 CORBA=adm_local/unix/$corba
243 echo ---------------------------------------------
245 echo ---------------------------------------------
251 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
255 AM_CONDITIONAL(GEOM_ENABLE_GUI, [test "${gui_ok}" = "yes"])
257 if test "${SalomeGUI_need}" == "yes"; then
258 if test "${FullGUI_ok}" != "yes"; then
259 AC_MSG_WARN(For configure GEOM module necessary full GUI!)
261 elif test "${SalomeGUI_need}" == "auto"; then
262 if test "${FullGUI_ok}" != "yes"; then
263 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
265 elif test "${SalomeGUI_need}" == "no"; then
266 echo Build without GUI option has been chosen
269 if test "${gui_ok}" = "yes"; then
271 echo ---------------------------------------------
273 echo ---------------------------------------------
279 echo ---------------------------------------------
281 echo ---------------------------------------------
288 echo ---------------------------------------------
290 echo ---------------------------------------------
296 echo ---------------------------------------------
298 echo ---------------------------------------------
304 echo ---------------------------------------------
306 echo ---------------------------------------------
312 echo ---------------------------------------------
313 echo Testing OpenCascade
314 echo ---------------------------------------------
319 echo "OCC_VERSION_DEVELOPMENT = ${OCC_VERSION_DEVELOPMENT}"
321 NMTTools_VAR=NMTTools
322 GEOMAlgo_VAR=GEOMAlgo
323 if test "${OCC_VERSION_DEVELOPMENT}" == "1"; then
325 NMTTools_VAR=NMTTools_NEW
326 GEOMAlgo_VAR=GEOMAlgo_NEW
329 AC_SUBST(NMTTools_VAR)
330 AC_SUBST(GEOMAlgo_VAR)
333 echo ---------------------------------------------
334 echo Testing html generators
335 echo ---------------------------------------------
338 CHECK_HTML_GENERATORS
341 echo ---------------------------------------------
343 echo ---------------------------------------------
348 echo ---------------------------------------------
350 echo ---------------------------------------------
353 if test "${opencv_ok}" = "yes"; then
354 AC_DEFINE_UNQUOTED(WITH_OPENCV,${WITH_OPENCV})
359 echo ---------------------------------------------
361 echo ---------------------------------------------
367 echo ---------------------------------------------
369 echo ---------------------------------------------
374 if test "${gui_ok}" = "yes"; then
375 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok sphinx_ok opencv_ok Kernel_ok gui_ok"
376 elif test "${SalomeGUI_need}" != "no"; then
377 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok opencv_ok Kernel_ok gui_ok"
379 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok opencv_ok Kernel_ok"
382 for var in $variables
384 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
389 echo "Default ORB : $DEFAULT_ORB"
392 dnl We don t need to say when we re entering directories if we re using
393 dnl GNU make because make does it for us.
394 if test "X$GMAKE" = "Xyes"; then
395 AC_SUBST(SETX) SETX=":"
397 AC_SUBST(SETX) SETX="set -x"
401 echo ---------------------------------------------
402 echo generating Makefiles and configure files
403 echo ---------------------------------------------
406 #AC_OUTPUT_COMMANDS([ \
407 # chmod +x ./bin/*; \
411 AC_CONFIG_COMMANDS([hack_libtool],[
412 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
413 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
415 CC=\"hack_libtool\"%g" libtool
416 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
417 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
418 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
421 # This list is initiated using autoscan and must be updated manually
422 # when adding a new file <filename>.in to manage. When you execute
423 # autoscan, the Makefile list is generated in the output file configure.scan.
424 # This could be helpfull to update de configuration.
427 adm_local/cmake_files/Makefile \
428 adm_local/unix/Makefile \
429 adm_local/unix/config_files/Makefile \
434 doc/docutils/Makefile \
435 doc/docutils/conf.py \
436 doc/salome/Makefile \
437 doc/salome/gui/Makefile \
438 doc/salome/gui/GEOM/Makefile \
439 doc/salome/gui/GEOM/doxyfile \
440 doc/salome/gui/GEOM/doxyfile_py \
441 doc/salome/gui/GEOM/doxyfile_tui \
442 doc/salome/gui/GEOM/static/header.html \
443 doc/salome/gui/GEOM/static/header_py.html \
444 doc/salome/tui/Makefile \
445 doc/salome/tui/doxyfile \
446 doc/salome/tui/static/header.html \
448 src/AdvancedGUI/Makefile \
449 src/ARCHIMEDE/Makefile \
450 src/BREPExport/Makefile \
451 src/BREPImport/Makefile \
452 src/BasicGUI/Makefile \
453 src/BlocksGUI/Makefile \
454 src/BooleanGUI/Makefile \
455 src/BuildGUI/Makefile \
456 src/DisplayGUI/Makefile \
457 src/DlgRef/Makefile \
458 src/EntityGUI/Makefile \
460 src/GEOMAlgo/Makefile \
461 src/GEOMAlgo_NEW/Makefile \
462 src/GEOMBase/Makefile \
463 src/GEOMClient/Makefile \
464 src/GEOMFiltersSelection/Makefile \
465 src/Material/Makefile \
466 src/GEOMGUI/Makefile \
467 src/GEOMImpl/Makefile \
468 src/GEOMToolsGUI/Makefile \
469 src/GEOM_I/Makefile \
470 src/GEOM_I_Superv/Makefile \
471 src/GEOM_SWIG/Makefile \
472 src/GEOM_SWIG_WITHIHM/Makefile \
473 src/GEOM_PY/Makefile \
474 src/GEOM_PY/structelem/Makefile \
475 src/GenerationGUI/Makefile \
476 src/GroupGUI/Makefile \
477 src/IGESExport/Makefile \
478 src/IGESImport/Makefile \
479 src/MeasureGUI/Makefile \
481 src/NMTDS_NEW/Makefile \
482 src/NMTTools/Makefile \
483 src/NMTTools_NEW/Makefile \
484 src/OBJECT/Makefile \
485 src/OCC2VTK/Makefile \
486 src/OperationGUI/Makefile \
487 src/PrimitiveGUI/Makefile \
488 src/RepairGUI/Makefile \
489 src/SKETCHER/Makefile \
490 src/STEPExport/Makefile \
491 src/STEPImport/Makefile \
492 src/STLExport/Makefile \
493 src/ShHealOper/Makefile \
494 src/ShapeRecognition/Makefile \
495 src/TransformationGUI/Makefile \
496 src/VTKExport/Makefile \
498 resources/GEOMCatalog.xml \
499 resources/SalomeApp.xml \