2 # PLEASE DO NOT MODIFY configure.in FILE
4 # ALL CHANGES WILL BE DISCARDED BY THE NEXT
5 # build_configure COMMAND
7 # CHANGES MUST BE MADE IN configure.in.base FILE
10 # Author : Marc Tajchman (CEA)
12 # Modified by : Patrick GOLDBRONN (CEA)
13 # Modified by : Marc Tajchman (CEA)
15 # Created from configure.in.base
20 AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files)
29 ########################################################################
30 # Check --disable-corba option
32 GUI_DISABLE_CORBA="no"
33 DISABLE_PYCONSOLE="no"
35 DISABLE_PLOT2DVIEWER="no"
36 DISABLE_SUPERVGRAPHVIEWER="no"
37 DISABLE_OCCVIEWER="no"
38 DISABLE_VTKVIEWER="no"
39 DISABLE_SALOMEOBJECT="no"
44 -disable-corba=yes | --disable-corba=yes | -disable-corba | --disable-corba)
45 GUI_DISABLE_CORBA="yes";;
46 -disable-pyConsole=yes | --disable-pyConsole=yes | -disable-pyConsole | --disable-pyConsole)
47 DISABLE_PYCONSOLE="yes";;
48 -disable-glViewer=yes | --disable-glViewer=yes | -disable-glViewer | --disable-glViewer)
49 DISABLE_GLVIEWER="yes";;
50 -disable-plot2dViewer=yes | --disable-plot2dViewer=yes | -disable-plot2dViewer | --disable-plot2dViewer)
51 DISABLE_PLOT2DVIEWER="yes";;
52 -disable-supervGraphViewer=yes | --disable-supervGraphViewer=yes | \
53 -disable-supervGraphViewer | --disable-supervGraphViewer)
54 DISABLE_SUPERVGRAPHVIEWER="yes";;
55 -disable-occViewer=yes | --disable-occViewer=yes | -disable-occViewer | --disable-occViewer)
56 DISABLE_OCCVIEWER="yes";;
57 -disable-vtkViewer=yes | --disable-vtkViewer=yes | -disable-vtkViewer | --disable-vtkViewer)
58 DISABLE_VTKVIEWER="yes";;
59 -disable-salomeObject=yes | --disable-salomeObject=yes | -disable-salomeObject | --disable-salomeObject)
60 DISABLE_SALOMEOBJECT="yes";;
65 dnl Initialize source and build root directories
69 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
75 AC_SUBST(ROOT_BUILDDIR)
78 echo Source root directory : $ROOT_SRCDIR
79 echo Build root directory : $ROOT_BUILDDIR
83 if test -z "$AR"; then
84 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
88 dnl Export the AR macro so that it will be placed in the libtool file
93 echo ---------------------------------------------
95 echo ---------------------------------------------
101 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
104 AC_DISABLE_PRODUCTION
106 echo ---------------------------------------------
108 echo ---------------------------------------------
110 dnl first, we set static to no!
111 dnl if we want it, use --enable-static
117 dnl Fix up the INSTALL macro if it s a relative path. We want the
118 dnl full-path to the binary instead.
121 INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
126 echo ---------------------------------------------
128 echo ---------------------------------------------
132 dnl inutil car libtool
136 AC_CXX_TEMPLATE_OPTIONS
138 # AC_CC_WARNINGS([ansi])
142 AC_CHECK_LIB(dl,dlopen)
144 dnl add library libm :
148 dnl Well we use sstream which is not in gcc pre-2.95.3
149 dnl We must test if it exists. If not, add it in include !
155 dnl ---------------------------------------------
157 dnl ---------------------------------------------
163 echo ---------------------------------------------
164 echo testing LEX \& YACC
165 echo ---------------------------------------------
174 echo ---------------------------------------------
176 echo ---------------------------------------------
182 dnl echo ---------------------------------------------
183 dnl echo testing java
184 dnl echo ---------------------------------------------
190 echo ---------------------------------------------
191 echo Testing Disable Corba
192 echo ---------------------------------------------
196 echo "GUI_DISABLE_CORBA = "$GUI_DISABLE_CORBA
198 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
201 echo ---------------------------------------------
203 echo ---------------------------------------------
210 echo ---------------------------------------------
212 echo ---------------------------------------------
217 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
219 echo ---------------------------------------------
221 echo ---------------------------------------------
227 dnl echo ---------------------------------------------
228 dnl echo testing mico
229 dnl echo ---------------------------------------------
235 echo ---------------------------------------------
236 echo default ORB : omniORB
237 echo ---------------------------------------------
243 echo ---------------------------------------------
245 echo ---------------------------------------------
252 CORBA=adm_local/unix/$corba
256 echo ---------------------------------------------
258 echo ---------------------------------------------
264 echo ---------------------------------------------
266 echo ---------------------------------------------
272 echo ---------------------------------------------
274 echo ---------------------------------------------
280 echo ---------------------------------------------
282 echo ---------------------------------------------
288 echo ---------------------------------------------
290 echo ---------------------------------------------
296 echo ---------------------------------------------
298 echo ---------------------------------------------
304 echo ---------------------------------------------
305 echo Testing OpenCascade
306 echo ---------------------------------------------
312 echo ---------------------------------------------
314 echo ---------------------------------------------
320 echo ---------------------------------------------
322 echo ---------------------------------------------
328 echo ---------------------------------------------
330 echo ---------------------------------------------
336 echo ---------------------------------------------
337 echo Testing PyConsole
338 echo ---------------------------------------------
342 echo "DISABLE_PYCONSOLE = "$DISABLE_PYCONSOLE
345 echo ---------------------------------------------
346 echo Testing GlViewer
347 echo ---------------------------------------------
351 echo "DISABLE_GLVIEWER = "$DISABLE_GLVIEWER
354 echo ---------------------------------------------
355 echo Testing Plot2dViewer
356 echo ---------------------------------------------
360 echo "DISABLE_PLOT2DVIEWER = "$DISABLE_PLOT2DVIEWER
363 echo ---------------------------------------------
364 echo Testing SupervGraphViewer
365 echo ---------------------------------------------
368 CHECK_SUPERVGRAPHVIEWER
369 echo "DISABLE_SUPERVGRAPHVIEWER = "$DISABLE_SUPERVGRAPHVIEWER
372 echo ---------------------------------------------
373 echo Testing OCCViewer
374 echo ---------------------------------------------
378 echo "DISABLE_OCCVIEWER = "$DISABLE_OCCVIEWER
381 echo ---------------------------------------------
382 echo Testing VTKViewer
383 echo ---------------------------------------------
387 echo "DISABLE_VTKVIEWER = "$DISABLE_VTKVIEWER
390 echo ---------------------------------------------
391 echo Testing SalomeObject
392 echo ---------------------------------------------
396 echo "DISABLE_SALOMEOBJECT = "$DISABLE_SALOMEOBJECT
398 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
399 if test "x${DISABLE_PYCONSOLE}" == "xyes" ; then
400 echo "failed : for full configuration of GUI module necessary enable PyConsole !"
403 if test "x${DISABLE_GLVIEWER}" == "xyes" ; then
404 echo "failed : for full configuration of GUI module necessary enable GlViewer !"
407 if test "x${DISABLE_PLOT2DVIEWER}" == "xyes" ; then
408 echo "failed : for full configuration of GUI module necessary enable Plot2dViewer !"
411 if test "x${DISABLE_SUPERVGRAPHVIEWER}" == "xyes" ; then
412 echo "failed : for full configuration of GUI module necessary enable SupervGraphViewer !"
415 if test "x${DISABLE_OCCVIEWER}" == "xyes" ; then
416 echo "failed : for full configuration of GUI module necessary enable OCCViewer !"
419 if test "x${DISABLE_VTKVIEWER}" == "xyes" ; then
420 echo "failed : for full configuration of GUI module necessary enable VTKViewer !"
423 if test "x${DISABLE_SALOMEOBJECT}" == "xyes" ; then
424 echo "failed : for full configuration of GUI module necessary enable SalomeObject !"
430 echo ---------------------------------------------
431 echo Testing html generators
432 echo ---------------------------------------------
435 CHECK_HTML_GENERATORS
437 if test "$GUI_DISABLE_CORBA" == "no"; then
439 echo ---------------------------------------------
441 echo ---------------------------------------------
447 echo ---------------------------------------------
448 echo Testing CPPUNIT only required for unit testing
449 echo ---------------------------------------------
455 echo ---------------------------------------------
457 echo ---------------------------------------------
460 if test "$GUI_DISABLE_CORBA" == "yes"; then
461 echo "Configure (without Corba)"
467 if test "$GUI_DISABLE_CORBA" != "yes"; then
468 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok"
470 variables="cc_ok lex_yacc_ok python_ok threads_ok OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok boost_ok occ_ok sip_ok pyqt_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok"
473 for var in $variables
475 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
480 variables="cppunit_ok"
482 for var in $variables
485 if test x$toto != "x"; then
486 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
491 if test "$GUI_DISABLE_CORBA" != "yes"; then
493 echo "Default ORB : $DEFAULT_ORB"
496 dnl generals files which could be included in every makefile
498 AC_SUBST_FILE(COMMENCE) COMMENCE=adm_local/unix/make_commence
499 AC_SUBST_FILE(CONCLUDE) CONCLUDE=adm_local/unix/make_conclude
500 AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
503 AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
505 dnl We don t need to say when we re entering directories if we re using
506 dnl GNU make becuase make does it for us.
507 if test "X$GMAKE" = "Xyes"; then
508 AC_SUBST(SETX) SETX=":"
510 AC_SUBST(SETX) SETX="set -x"
513 # make other build directories
514 if test "$GUI_DISABLE_CORBA" == "yes"; then
515 dir_variables="salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl"
517 dir_variables="salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources"
520 for rep in $dir_variables
522 # if test ! -d $rep ; then
529 echo ---------------------------------------------
530 echo copying resource files, shell scripts, and
532 echo ---------------------------------------------
536 dnl copy resources directories
538 #for i in `find $ROOT_SRCDIR -name 'resources' -print`
540 # local_res=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
541 # local_res_dir=`echo $local_res | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
542 # mkdir -p $local_res_dir
549 dnl copy shells and utilities contained in the bin directory
550 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
556 for i in $ROOT_SRCDIR/bin/*
558 local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
561 ./bin/CVS | ./bin/salome) ;;
562 *) $INSTALL $i . ; echo $local_bin ;;
567 AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript
569 dnl copy xml files to the build tree (lib directory)
573 #for i in `find $ROOT_SRCDIR -name "*.xml" -print`
576 # echo `echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
582 echo ---------------------------------------------
583 echo generating Makefiles and configure files
584 echo ---------------------------------------------
587 AC_OUTPUT_COMMANDS([ \
591 ## do not delete this line