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 GEOM module], [6.5.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)}'`
39 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
44 echo ---------------------------------------------
45 echo Initialize source and build root directories
46 echo ---------------------------------------------
50 dnl Initialize source and build root directories
54 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
60 AC_SUBST(ROOT_BUILDDIR)
63 echo Source root directory : $ROOT_SRCDIR
64 echo Build root directory : $ROOT_BUILDDIR
68 if test -z "$AR"; then
69 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
73 dnl Export the AR macro so that it will be placed in the libtool file
78 echo ---------------------------------------------
80 echo ---------------------------------------------
87 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
90 echo ---------------------------------------------
91 echo Configuring production
92 echo ---------------------------------------------
97 echo ---------------------------------------------
99 echo ---------------------------------------------
101 dnl first, we set static to no!
102 dnl if we want it, use --enable-static
108 dnl Fix up the INSTALL macro if it s a relative path. We want the
109 dnl full-path to the binary instead.
112 INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
117 echo ---------------------------------------------
119 echo ---------------------------------------------
123 dnl inutil car libtool
127 AC_CXX_TEMPLATE_OPTIONS
129 # AC_CC_WARNINGS([ansi])
133 AC_CHECK_LIB(dl,dlopen)
135 dnl add library libm :
139 dnl Well we use sstream which is not in gcc pre-2.95.3
140 dnl We must test if it exists. If not, add it in include !
146 dnl ---------------------------------------------
148 dnl ---------------------------------------------
154 echo ---------------------------------------------
156 echo ---------------------------------------------
162 echo ---------------------------------------------
163 echo testing LEX \& YACC
164 echo ---------------------------------------------
173 echo ---------------------------------------------
175 echo ---------------------------------------------
181 dnl echo ---------------------------------------------
182 dnl echo testing java
183 dnl echo ---------------------------------------------
189 echo ---------------------------------------------
191 echo ---------------------------------------------
198 echo ---------------------------------------------
200 echo ---------------------------------------------
205 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
207 echo ---------------------------------------------
209 echo ---------------------------------------------
215 dnl echo ---------------------------------------------
216 dnl echo testing mico
217 dnl echo ---------------------------------------------
223 echo ---------------------------------------------
224 echo default ORB : omniORB
225 echo ---------------------------------------------
231 echo ---------------------------------------------
233 echo ---------------------------------------------
240 CORBA=adm_local/unix/$corba
245 echo ---------------------------------------------
247 echo ---------------------------------------------
253 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
257 AM_CONDITIONAL(GEOM_ENABLE_GUI, [test "${gui_ok}" = "yes"])
259 if test "${SalomeGUI_need}" == "yes"; then
260 if test "${FullGUI_ok}" != "yes"; then
261 AC_MSG_WARN(For configure GEOM module necessary full GUI!)
263 elif test "${SalomeGUI_need}" == "auto"; then
264 if test "${FullGUI_ok}" != "yes"; then
265 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
267 elif test "${SalomeGUI_need}" == "no"; then
268 echo Build without GUI option has been chosen
271 if test "${gui_ok}" = "yes"; then
273 echo ---------------------------------------------
275 echo ---------------------------------------------
281 echo ---------------------------------------------
283 echo ---------------------------------------------
290 echo ---------------------------------------------
292 echo ---------------------------------------------
298 echo ---------------------------------------------
300 echo ---------------------------------------------
306 echo ---------------------------------------------
308 echo ---------------------------------------------
314 echo ---------------------------------------------
315 echo Testing OpenCascade
316 echo ---------------------------------------------
322 echo ---------------------------------------------
323 echo Testing html generators
324 echo ---------------------------------------------
327 CHECK_HTML_GENERATORS
330 echo ---------------------------------------------
332 echo ---------------------------------------------
337 echo ---------------------------------------------
339 echo ---------------------------------------------
342 if test "${opencv_ok}" = "yes"; then
343 AC_DEFINE_UNQUOTED(WITH_OPENCV,${WITH_OPENCV})
348 echo ---------------------------------------------
350 echo ---------------------------------------------
356 echo ---------------------------------------------
358 echo ---------------------------------------------
361 if test "${SalomeGUI_need}" == "no"; then
362 echo "* Configuration options (without GUI):"
364 echo "* Configuration options:"
368 obligatory_vars="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 sphinx_ok Kernel_ok"
369 optional_vars="opencv_ok"
370 gui_vars="OpenGL_ok qt_ok gui_ok"
376 echo "--- Mandatory products:"
378 missing_obligatory=no
379 for var in $obligatory_vars
382 if test x$toto == "x"; then toto="no" ; fi
383 if test x$toto == "xno"; then missing_obligatory=yes ; fi
384 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
388 if test x$missing_obligatory == "xyes"; then
389 AC_MSG_ERROR([one or more obligatory product is missing])
396 if test "${SalomeGUI_need}" == "yes"; then
397 # SALOME GUI is mandatory
398 if test "${gui_ok}" != "yes"; then
399 AC_MSG_ERROR([SALOME GUI is missing])
403 if test "${SalomeGUI_need}" != "no"; then
404 echo "--- GUI products (optional):"
409 if test x$toto == "x"; then toto="no"; fi
410 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
419 echo "--- Other products (optional):"
421 for var in $optional_vars
424 if test x$toto != "x"; then
425 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
431 echo "* Default ORB : $DEFAULT_ORB"
434 dnl We don t need to say when we re entering directories if we re using
435 dnl GNU make because make does it for us.
436 if test "X$GMAKE" = "Xyes"; then
437 AC_SUBST(SETX) SETX=":"
439 AC_SUBST(SETX) SETX="set -x"
443 echo ---------------------------------------------
444 echo generating Makefiles and configure files
445 echo ---------------------------------------------
448 #AC_OUTPUT_COMMANDS([ \
449 # chmod +x ./bin/*; \
453 AC_CONFIG_COMMANDS([hack_libtool],[
454 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
455 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
457 CC=\"hack_libtool\"%g" libtool
458 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
459 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
460 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
463 # This list is initiated using autoscan and must be updated manually
464 # when adding a new file <filename>.in to manage. When you execute
465 # autoscan, the Makefile list is generated in the output file configure.scan.
466 # This could be helpfull to update de configuration.
469 adm_local/cmake_files/Makefile \
470 adm_local/unix/Makefile \
471 adm_local/unix/config_files/Makefile \
476 doc/docutils/Makefile \
477 doc/docutils/conf.py \
478 doc/salome/Makefile \
479 doc/salome/gui/Makefile \
480 doc/salome/gui/GEOM/Makefile \
481 doc/salome/gui/GEOM/doxyfile \
482 doc/salome/gui/GEOM/doxyfile_py \
483 doc/salome/gui/GEOM/doxyfile_tui \
484 doc/salome/gui/GEOM/static/header.html \
485 doc/salome/gui/GEOM/static/header_py.html \
486 doc/salome/tui/Makefile \
487 doc/salome/tui/doxyfile \
488 doc/salome/tui/static/header.html \
490 src/AdvancedGUI/Makefile \
491 src/ARCHIMEDE/Makefile \
492 src/BREPExport/Makefile \
493 src/BREPImport/Makefile \
494 src/BasicGUI/Makefile \
495 src/BlocksGUI/Makefile \
496 src/BooleanGUI/Makefile \
497 src/BuildGUI/Makefile \
498 src/DisplayGUI/Makefile \
499 src/DlgRef/Makefile \
500 src/EntityGUI/Makefile \
502 src/GEOMAlgo/Makefile \
503 src/GEOMBase/Makefile \
504 src/GEOMClient/Makefile \
505 src/GEOMFiltersSelection/Makefile \
506 src/Material/Makefile \
507 src/GEOMGUI/Makefile \
508 src/GEOMImpl/Makefile \
509 src/GEOMToolsGUI/Makefile \
510 src/GEOM_I/Makefile \
511 src/GEOM_I_Superv/Makefile \
512 src/GEOM_SWIG/Makefile \
513 src/GEOM_SWIG_WITHIHM/Makefile \
514 src/GEOM_PY/Makefile \
515 src/GEOM_PY/structelem/Makefile \
516 src/GenerationGUI/Makefile \
517 src/GroupGUI/Makefile \
518 src/IGESExport/Makefile \
519 src/IGESImport/Makefile \
520 src/MeasureGUI/Makefile \
522 src/NMTTools/Makefile \
523 src/OBJECT/Makefile \
524 src/OCC2VTK/Makefile \
525 src/OperationGUI/Makefile \
526 src/PrimitiveGUI/Makefile \
527 src/RepairGUI/Makefile \
528 src/SKETCHER/Makefile \
529 src/STEPExport/Makefile \
530 src/STEPImport/Makefile \
531 src/STLExport/Makefile \
532 src/ShHealOper/Makefile \
533 src/ShapeRecognition/Makefile \
534 src/TransformationGUI/Makefile \
535 src/VTKExport/Makefile \
537 resources/GEOMCatalog.xml \
538 resources/SalomeApp.xml \