1 # Copyright (C) 2007-2012 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
23 # Author : Marc Tajchman (CEA)
25 # Modified by : Patrick GOLDBRONN (CEA)
26 # Modified by : Marc Tajchman (CEA)
27 # Modified by : Mikhail PONIKAROV (OCN) - autotools usage
29 AC_INIT([Salome2 Project GUI module], [7.1.0], [webmaster.salome@opencascade.com], [SalomeGUI])
30 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
33 AM_INIT_AUTOMAKE([-Wno-portability])
35 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
40 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
45 echo ---------------------------------------------
46 echo Initialize source and build root directories
47 echo ---------------------------------------------
50 ########################################################################
51 # Check --disable-corba-gen and other --disable-* options
53 if test "x${enable_corba_gen}" != "xno" ; then
54 GUI_DISABLE_CORBA="no"
56 GUI_DISABLE_CORBA="yes"
59 if test "x${enable_pyConsole}" != "xno" ; then
60 DISABLE_PYCONSOLE="no"
62 DISABLE_PYCONSOLE="yes"
65 if test "x${enable_glViewer}" != "xno" ; then
68 DISABLE_GLVIEWER="yes"
71 if test "x${enable_plot2dViewer}" != "xno" ; then
72 DISABLE_PLOT2DVIEWER="no"
74 DISABLE_PLOT2DVIEWER="yes"
77 if test "x${enable_supervGraphViewer}" != "xno" ; then
78 DISABLE_SUPERVGRAPHVIEWER="no"
80 DISABLE_SUPERVGRAPHVIEWER="yes"
83 if test "x${enable_occViewer}" != "xno" ; then
84 DISABLE_OCCVIEWER="no"
86 DISABLE_OCCVIEWER="yes"
89 if test "x${enable_vtkViewer}" != "xno" ; then
90 DISABLE_VTKVIEWER="no"
92 DISABLE_VTKVIEWER="yes"
95 if test "x${enable_salomeObject}" != "xno" ; then
96 DISABLE_SALOMEOBJECT="no"
98 DISABLE_SALOMEOBJECT="yes"
101 if test "x${enable_qxGraphViewer}" != "xno" ; then
102 DISABLE_QXGRAPHVIEWER="no"
104 DISABLE_QXGRAPHVIEWER="yes"
108 dnl Initialize source and build root directories
112 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
117 AC_SUBST(ROOT_SRCDIR)
118 AC_SUBST(ROOT_BUILDDIR)
121 echo Source root directory : $ROOT_SRCDIR
122 echo Build root directory : $ROOT_BUILDDIR
126 if test -z "$AR"; then
127 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
131 dnl Export the AR macro so that it will be placed in the libtool file
136 echo ---------------------------------------------
138 echo ---------------------------------------------
145 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
148 echo ---------------------------------------------
149 echo Coniguring production
150 echo ---------------------------------------------
153 AC_DISABLE_PRODUCTION
155 echo ---------------------------------------------
157 echo ---------------------------------------------
159 dnl first, we set static to no!
160 dnl if we want it, use --enable-static
166 dnl Fix up the INSTALL macro if it s a relative path. We want the
167 dnl full-path to the binary instead.
170 INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
175 echo ---------------------------------------------
177 echo ---------------------------------------------
181 dnl inutil car libtool
185 AC_CXX_TEMPLATE_OPTIONS
187 # AC_CC_WARNINGS([ansi])
191 AC_CHECK_LIB(dl,dlopen)
193 dnl add library libm :
197 dnl Well we use sstream which is not in gcc pre-2.95.3
198 dnl We must test if it exists. If not, add it in include !
204 echo ---------------------------------------------
206 echo ---------------------------------------------
213 echo ---------------------------------------------
214 echo testing LEX \& YACC
215 echo ---------------------------------------------
224 echo ---------------------------------------------
226 echo ---------------------------------------------
232 echo ---------------------------------------------
234 echo ---------------------------------------------
242 dnl echo ---------------------------------------------
243 dnl echo testing java
244 dnl echo ---------------------------------------------
250 echo ---------------------------------------------
251 echo Testing Disable Corba
252 echo ---------------------------------------------
256 echo "GUI_DISABLE_CORBA = "$GUI_DISABLE_CORBA
259 echo ---------------------------------------------
261 echo ---------------------------------------------
266 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
268 echo ---------------------------------------------
270 echo ---------------------------------------------
276 dnl echo ---------------------------------------------
277 dnl echo testing mico
278 dnl echo ---------------------------------------------
284 echo ---------------------------------------------
285 echo default ORB : omniORB
286 echo ---------------------------------------------
292 echo ---------------------------------------------
294 echo ---------------------------------------------
301 CORBA=adm_local/unix/$corba
305 echo ---------------------------------------------
307 echo ---------------------------------------------
313 echo ---------------------------------------------
315 echo ---------------------------------------------
321 echo ---------------------------------------------
323 echo ---------------------------------------------
329 echo ---------------------------------------------
331 echo ---------------------------------------------
337 echo ---------------------------------------------
339 echo ---------------------------------------------
345 echo ---------------------------------------------
346 echo Testing OpenCascade
347 echo ---------------------------------------------
353 echo ---------------------------------------------
355 echo ---------------------------------------------
361 echo ---------------------------------------------
363 echo ---------------------------------------------
369 echo ---------------------------------------------
371 echo ---------------------------------------------
379 echo ---------------------------------------------
380 echo Testing PyConsole
381 echo ---------------------------------------------
385 echo "DISABLE_PYCONSOLE = "$DISABLE_PYCONSOLE
388 echo ---------------------------------------------
389 echo Testing GlViewer
390 echo ---------------------------------------------
394 echo "DISABLE_GLVIEWER = "$DISABLE_GLVIEWER
397 echo ---------------------------------------------
398 echo Testing Plot2dViewer
399 echo ---------------------------------------------
403 echo "DISABLE_PLOT2DVIEWER = "$DISABLE_PLOT2DVIEWER
406 echo ---------------------------------------------
407 echo Testing SupervGraphViewer
408 echo ---------------------------------------------
411 CHECK_SUPERVGRAPHVIEWER
412 echo "DISABLE_SUPERVGRAPHVIEWER = "$DISABLE_SUPERVGRAPHVIEWER
415 echo ---------------------------------------------
416 echo Testing OCCViewer
417 echo ---------------------------------------------
421 echo "DISABLE_OCCVIEWER = "$DISABLE_OCCVIEWER
424 echo ---------------------------------------------
425 echo Testing VTKViewer
426 echo ---------------------------------------------
430 echo "DISABLE_VTKVIEWER = "$DISABLE_VTKVIEWER
433 echo ---------------------------------------------
434 echo Testing SalomeObject
435 echo ---------------------------------------------
439 echo "DISABLE_SALOMEOBJECT = "$DISABLE_SALOMEOBJECT
442 echo ---------------------------------------------
443 echo Testing QxGraphViewer
444 echo ---------------------------------------------
448 echo "DISABLE_QXGRAPHVIEWER = "$DISABLE_QXGRAPHVIEWER
450 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
451 if test "x${DISABLE_PYCONSOLE}" == "xyes" ; then
452 echo "failed : for full configuration of GUI module necessary enable PyConsole !"
455 if test "x${DISABLE_GLVIEWER}" == "xyes" ; then
456 echo "failed : for full configuration of GUI module necessary enable GlViewer !"
459 if test "x${DISABLE_PLOT2DVIEWER}" == "xyes" ; then
460 echo "failed : for full configuration of GUI module necessary enable Plot2dViewer !"
463 if test "x${DISABLE_SUPERVGRAPHVIEWER}" == "xyes" ; then
464 echo "failed : for full configuration of GUI module necessary enable SupervGraphViewer !"
467 if test "x${DISABLE_OCCVIEWER}" == "xyes" ; then
468 echo "failed : for full configuration of GUI module necessary enable OCCViewer !"
471 if test "x${DISABLE_VTKVIEWER}" == "xyes" ; then
472 echo "failed : for full configuration of GUI module necessary enable VTKViewer !"
475 if test "x${DISABLE_SALOMEOBJECT}" == "xyes" ; then
476 echo "failed : for full configuration of GUI module necessary enable SalomeObject !"
479 if test "x${DISABLE_QXGRAPHVIEWER}" == "xyes" ; then
480 echo "failed : for full configuration of GUI module necessary enable QxGraphViewer !"
486 echo ---------------------------------------------
487 echo Testing html generators
488 echo ---------------------------------------------
491 CHECK_HTML_GENERATORS
494 echo ---------------------------------------------
496 echo ---------------------------------------------
501 echo ---------------------------------------------
502 echo Testing CPPUNIT only required for unit testing
503 echo ---------------------------------------------
509 echo ---------------------------------------------
511 echo ---------------------------------------------
517 echo ---------------------------------------------
519 echo ---------------------------------------------
522 if test "$GUI_DISABLE_CORBA" == "yes"; then
523 echo "Configure (without Corba)"
529 if test "$GUI_DISABLE_CORBA" != "yes"; then
530 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok
531 omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok libxml_ok Kernel_ok"
533 variables="cc_ok lex_yacc_ok python_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok boost_ok
534 occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok "
537 for var in $variables
539 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
544 variables="cppunit_ok TestRecorder_ok"
546 for var in $variables
549 if test x$toto != "x"; then
550 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
555 if test "$GUI_DISABLE_CORBA" != "yes"; then
557 echo "Default ORB : $DEFAULT_ORB"
561 dnl We don t need to say when we re entering directories if we re using
562 dnl GNU make becuase make does it for us.
563 if test "X$GMAKE" = "Xyes"; then
564 AC_SUBST(SETX) SETX=":"
566 AC_SUBST(SETX) SETX="set -x"
569 AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
570 AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
571 AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
572 AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
573 AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
574 AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
575 AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
576 AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
577 AM_CONDITIONAL(ENABLE_QXGRAPHVIEWER, [test "$DISABLE_QXGRAPHVIEWER" = no])
578 AM_CONDITIONAL(ENABLE_TESTRECORDER, [test "$ENABLE_TESTRECORDER" = yes])
580 if test "$DISABLE_PYCONSOLE" = "no" ; then
581 AC_DEFINE(SUIT_ENABLE_PYTHON)
584 dnl Build with GUI observers feature
585 AC_DEFINE(WITH_SALOMEDS_OBSERVER)
588 echo ---------------------------------------------
589 echo generating Makefiles and configure files
590 echo ---------------------------------------------
593 #AC_OUTPUT_COMMANDS([ \
594 # chmod +x ./bin/*; \
595 # chmod +x ./bin/salome/*; \
599 AC_CONFIG_COMMANDS([hack_libtool],[
600 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
601 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
603 CC=\"hack_libtool\"%g" libtool
604 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
605 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
606 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
609 # This list is initiated using autoscan and must be updated manually
610 # when adding a new file <filename>.in to manage. When you execute
611 # autoscan, the Makefile list is generated in the output file configure.scan.
612 # This could be helpfull to update de configuration.
615 adm_local/cmake_files/Makefile \
616 adm_local/cmake_files/deprecated/Makefile \
617 adm_local/unix/Makefile \
618 adm_local/unix/config_files/Makefile \
623 doc/salome/Makefile \
624 doc/salome/gui/Makefile \
625 doc/salome/gui/doxyfile \
626 doc/salome/gui/static/header.html \
627 doc/salome/tui/Makefile \
628 doc/salome/tui/doxyfile \
629 doc/salome/tui/static/header.html \
631 src/CASCatch/Makefile \
640 src/SUITApp/Makefile \
641 src/LogWindow/Makefile \
642 src/ObjBrowser/Makefile \
644 src/OBJECT/Makefile \
645 src/ViewerTools/Makefile \
646 src/GLViewer/Makefile \
647 src/VTKViewer/Makefile \
649 src/OCCViewer/Makefile \
651 src/PyInterp/Makefile \
652 src/PyConsole/Makefile \
653 src/Plot2d/Makefile \
654 src/SPlot2d/Makefile \
655 src/SUPERVGraph/Makefile \
656 src/QxGraph/Makefile \
657 src/QxScene/Makefile \
658 src/LightApp/Makefile \
659 src/ResExporter/Makefile \
660 src/TOOLSGUI/Makefile \
662 src/OpenGLUtils/Makefile \
663 src/Session/Makefile \
664 src/SalomeApp/Makefile \
665 src/SalomeApp/Test/Makefile \
666 src/SalomeApp/pluginsdemo/Makefile \
667 src/GuiHelpers/Makefile \
668 src/TreeData/Makefile \
669 src/TreeData/Test/Makefile \
670 src/SALOME_SWIG/Makefile \
671 src/SALOME_SWIG/supervisionexample.py \
672 src/SALOME_SWIG/supervisiongeomexample.py \
673 src/SALOME_PY/Makefile \
674 src/SALOME_PYQT/Makefile \
675 src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile \
676 src/SALOME_PYQT/SALOME_PYQT_GUILight/Makefile \
677 src/SALOME_PYQT/SalomePyQt/Makefile \
678 src/GUI_PY/Makefile \
682 tools/dlgfactory/Makefile \
683 tools/vtkEDFOverloads/Makefile \