1 # Copyright (C) 2007-2008 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
22 # Author : Marc Tajchman (CEA)
24 # Modified by : Patrick GOLDBRONN (CEA)
25 # Modified by : Marc Tajchman (CEA)
26 # Modified by : Mikhail PONIKAROV (OCN) - autotools usage
28 AC_INIT([Salome2 Project GUI module], [5.1.0], [webmaster.salome@opencascade.com], [SalomeGUI])
29 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
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 ---------------------------------------------
47 ########################################################################
48 # Check --disable-corba-gen and other --disable-* options
50 if test "x${enable_corba_gen}" != "xno" ; then
51 GUI_DISABLE_CORBA="no"
53 GUI_DISABLE_CORBA="yes"
56 if test "x${enable_pyConsole}" != "xno" ; then
57 DISABLE_PYCONSOLE="no"
59 DISABLE_PYCONSOLE="yes"
62 if test "x${enable_glViewer}" != "xno" ; then
65 DISABLE_GLVIEWER="yes"
68 if test "x${enable_plot2dViewer}" != "xno" ; then
69 DISABLE_PLOT2DVIEWER="no"
71 DISABLE_PLOT2DVIEWER="yes"
74 if test "x${enable_supervGraphViewer}" != "xno" ; then
75 DISABLE_SUPERVGRAPHVIEWER="no"
77 DISABLE_SUPERVGRAPHVIEWER="yes"
80 if test "x${enable_occViewer}" != "xno" ; then
81 DISABLE_OCCVIEWER="no"
83 DISABLE_OCCVIEWER="yes"
86 if test "x${enable_vtkViewer}" != "xno" ; then
87 DISABLE_VTKVIEWER="no"
89 DISABLE_VTKVIEWER="yes"
92 if test "x${enable_salomeObject}" != "xno" ; then
93 DISABLE_SALOMEOBJECT="no"
95 DISABLE_SALOMEOBJECT="yes"
98 if test "x${enable_qxGraphViewer}" != "xno" ; then
99 DISABLE_QXGRAPHVIEWER="no"
101 DISABLE_QXGRAPHVIEWER="yes"
103 dnl THIS IS A TEMPORARY SOLUTION BECAUSE QXGRAPH NOT YET PORTING TO QT4
104 dnl AFTER PORTING QXGARPH TO QT4 THE STRING BELOW HAVE TO BE REMOVED
105 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 ---------------------------------------------
144 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
147 echo ---------------------------------------------
148 echo Coniguring production
149 echo ---------------------------------------------
152 AC_DISABLE_PRODUCTION
154 echo ---------------------------------------------
156 echo ---------------------------------------------
158 dnl first, we set static to no!
159 dnl if we want it, use --enable-static
165 dnl Fix up the INSTALL macro if it s a relative path. We want the
166 dnl full-path to the binary instead.
169 INSTALL='\${ROOT_BUILDDIR}'/salome_adm/unix/config_files/install-sh
174 echo ---------------------------------------------
176 echo ---------------------------------------------
180 dnl inutil car libtool
184 AC_CXX_TEMPLATE_OPTIONS
186 # AC_CC_WARNINGS([ansi])
190 AC_CHECK_LIB(dl,dlopen)
192 dnl add library libm :
196 dnl Well we use sstream which is not in gcc pre-2.95.3
197 dnl We must test if it exists. If not, add it in include !
203 dnl ---------------------------------------------
205 dnl ---------------------------------------------
211 echo ---------------------------------------------
212 echo testing LEX \& YACC
213 echo ---------------------------------------------
222 echo ---------------------------------------------
224 echo ---------------------------------------------
230 dnl echo ---------------------------------------------
231 dnl echo testing java
232 dnl echo ---------------------------------------------
238 echo ---------------------------------------------
239 echo Testing Disable Corba
240 echo ---------------------------------------------
244 echo "GUI_DISABLE_CORBA = "$GUI_DISABLE_CORBA
246 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
249 echo ---------------------------------------------
251 echo ---------------------------------------------
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 dnl THIS IS A TEMPORARY SOLUTION BECAUSE QXGRAPH NOT YET PORTING TO QT4
480 dnl AFTER PORTING QXGARPH TO QT4 THE FOLLOWING CHECK HAVE TO BE UNCOMMENTED
481 dnl if test "x${DISABLE_QXGRAPHVIEWER}" == "xyes" ; then
482 dnl echo "failed : for full configuration of GUI module necessary enable QxGraphViewer !"
488 echo ---------------------------------------------
489 echo Testing html generators
490 echo ---------------------------------------------
493 CHECK_HTML_GENERATORS
496 echo ---------------------------------------------
498 echo ---------------------------------------------
503 echo ---------------------------------------------
504 echo Testing CPPUNIT only required for unit testing
505 echo ---------------------------------------------
511 echo ---------------------------------------------
513 echo ---------------------------------------------
519 echo ---------------------------------------------
521 echo ---------------------------------------------
524 if test "$GUI_DISABLE_CORBA" == "yes"; then
525 echo "Configure (without Corba)"
531 if test "$GUI_DISABLE_CORBA" != "yes"; then
532 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok
533 omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok libxml_ok Kernel_ok"
535 variables="cc_ok lex_yacc_ok python_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok boost_ok
536 occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok"
539 for var in $variables
541 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
546 variables="cppunit_ok TestRecorder_ok"
548 for var in $variables
551 if test x$toto != "x"; then
552 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
557 if test "$GUI_DISABLE_CORBA" != "yes"; then
559 echo "Default ORB : $DEFAULT_ORB"
563 dnl We don t need to say when we re entering directories if we re using
564 dnl GNU make becuase make does it for us.
565 if test "X$GMAKE" = "Xyes"; then
566 AC_SUBST(SETX) SETX=":"
568 AC_SUBST(SETX) SETX="set -x"
571 AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
572 AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
573 AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
574 AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
575 AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
576 AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
577 AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
578 AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
579 AM_CONDITIONAL(ENABLE_QXGRAPHVIEWER, [test "$DISABLE_QXGRAPHVIEWER" = no])
580 AM_CONDITIONAL(ENABLE_TESTRECORDER, [test "$ENABLE_TESTRECORDER" = yes])
583 echo ---------------------------------------------
584 echo generating Makefiles and configure files
585 echo ---------------------------------------------
588 #AC_OUTPUT_COMMANDS([ \
589 # chmod +x ./bin/*; \
590 # chmod +x ./bin/salome/*; \
593 # This list is initiated using autoscan and must be updated manually
594 # when adding a new file <filename>.in to manage. When you execute
595 # autoscan, the Makefile list is generated in the output file configure.scan.
596 # This could be helpfull to update de configuration.
598 ./salome_adm/unix/SALOMEconfig.h \
599 ./adm_local/Makefile \
600 ./adm_local/cmake_files/Makefile \
601 ./adm_local/unix/Makefile \
602 ./adm_local/unix/config_files/Makefile \
607 ./doc/salome/Makefile \
608 ./doc/salome/gui/Makefile \
609 ./doc/salome/gui/doxyfile \
610 ./doc/salome/tui/Makefile \
611 ./doc/salome/tui/doxyfile \
613 ./src/CASCatch/Makefile \
615 ./src/Style/Makefile \
618 ./src/SUIT/Makefile \
622 ./src/SUITApp/Makefile \
623 ./src/LogWindow/Makefile \
624 ./src/ObjBrowser/Makefile \
626 ./src/OBJECT/Makefile \
627 ./src/GLViewer/Makefile \
628 ./src/VTKViewer/Makefile \
629 ./src/SVTK/Makefile \
630 ./src/OCCViewer/Makefile \
631 ./src/SOCC/Makefile \
632 ./src/PyInterp/Makefile \
633 ./src/PyConsole/Makefile \
634 ./src/Plot2d/Makefile \
635 ./src/SPlot2d/Makefile \
636 ./src/SUPERVGraph/Makefile \
637 ./src/QxGraph/Makefile \
638 ./src/QxScene/Makefile \
639 ./src/LightApp/Makefile \
640 ./src/ResExporter/Makefile \
641 ./src/TOOLSGUI/Makefile \
642 ./src/Event/Makefile \
643 ./src/Session/Makefile \
644 ./src/SalomeApp/Makefile \
645 ./src/SalomeApp/Test/Makefile \
646 ./src/SALOME_SWIG/Makefile \
647 ./src/SALOME_SWIG/supervisionexample.py \
648 ./src/SALOME_SWIG/supervisiongeomexample.py \
649 ./src/SALOME_PY/Makefile \
650 ./src/SALOME_PYQT/Makefile \
651 ./src/SALOME_PYQT/SALOME_PYQT_GUI/Makefile \
652 ./src/SALOME_PYQT/SalomePyQt/Makefile \
653 ./resources/Makefile \