2 # Author : Marc Tajchman (CEA)
4 # Modified by : Patrick GOLDBRONN (CEA)
5 # Modified by : Marc Tajchman (CEA)
6 # Modified by : Alexander BORODIN (OCN) - autotools usage
8 # Created from configure.in.base
12 AC_INIT([Salome2 Project SMESH module], [4.1.2], [webmaster.salome@opencascade.com], [salome])
13 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
18 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
21 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
26 echo ---------------------------------------------
27 echo Initialize source and build root directories
28 echo ---------------------------------------------
32 dnl Initialize source and build root directories
36 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
42 AC_SUBST(ROOT_BUILDDIR)
45 echo Source root directory : $ROOT_SRCDIR
46 echo Build root directory : $ROOT_BUILDDIR
50 if test -z "$AR"; then
51 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
55 dnl Export the AR macro so that it will be placed in the libtool file
60 echo ---------------------------------------------
62 echo ---------------------------------------------
68 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
71 echo ---------------------------------------------
72 echo Coniguring production
73 echo ---------------------------------------------
78 echo ---------------------------------------------
80 echo ---------------------------------------------
82 dnl first, we set static to no!
83 dnl if we want it, use --enable-static
89 dnl Fix up the INSTALL macro if it s a relative path. We want the
90 dnl full-path to the binary instead.
93 INSTALL='\${ROOT_BUILDDIR}'/salome_adm/unix/config_files/install-sh
98 echo ---------------------------------------------
100 echo ---------------------------------------------
104 dnl inutil car libtool
108 AC_CXX_TEMPLATE_OPTIONS
110 # AC_CC_WARNINGS([ansi])
114 echo ---------------------------------------------
116 echo ---------------------------------------------
121 AC_F77_LIBRARY_LDFLAGS
123 AC_FC_LIBRARY_LDFLAGS
124 if test "X$FC" != "X" ; then
128 dnl AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
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 ---------------------------------------------
155 echo testing LEX \& YACC
156 echo ---------------------------------------------
165 echo ---------------------------------------------
167 echo ---------------------------------------------
173 dnl echo ---------------------------------------------
174 dnl echo testing java
175 dnl echo ---------------------------------------------
181 echo ---------------------------------------------
183 echo ---------------------------------------------
190 echo ---------------------------------------------
192 echo ---------------------------------------------
199 AM_CONDITIONAL(SMESH_ENABLE_GUI, [test "${SMESH_WITH_GUI}" = "yes"])
201 if test "${SMESH_WITH_GUI}" = "yes"; then
204 echo ---------------------------------------------
206 echo ---------------------------------------------
213 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
215 echo ---------------------------------------------
217 echo ---------------------------------------------
223 dnl echo ---------------------------------------------
224 dnl echo testing mico
225 dnl echo ---------------------------------------------
231 echo ---------------------------------------------
232 echo default ORB : omniORB
233 echo ---------------------------------------------
239 echo ---------------------------------------------
241 echo ---------------------------------------------
248 CORBA=adm_local/unix/$corba
253 if test "${SMESH_WITH_GUI}" = "yes"; then
255 echo ---------------------------------------------
257 echo ---------------------------------------------
263 echo ---------------------------------------------
265 echo ---------------------------------------------
271 echo ---------------------------------------------
273 echo ---------------------------------------------
279 echo ---------------------------------------------
281 echo ---------------------------------------------
287 echo ---------------------------------------------
288 echo Testing full GUI
289 echo ---------------------------------------------
293 if test "x${CORBA_IN_GUI}" != "xyes"; then
294 echo "failed : For configure SMESH module necessary full GUI !"
300 echo ---------------------------------------------
302 echo ---------------------------------------------
308 echo ---------------------------------------------
310 echo ---------------------------------------------
316 echo ---------------------------------------------
317 echo Testing OpenCascade
318 echo ---------------------------------------------
323 if test "${SMESH_WITH_GUI}" = "yes"; then
326 echo ---------------------------------------------
328 echo ---------------------------------------------
336 echo ---------------------------------------------
337 echo Testing html generators
338 echo ---------------------------------------------
341 CHECK_HTML_GENERATORS
344 echo ---------------------------------------------
346 echo ---------------------------------------------
352 echo ---------------------------------------------
354 echo ---------------------------------------------
360 echo ---------------------------------------------
362 echo ---------------------------------------------
370 echo ---------------------------------------------
372 echo ---------------------------------------------
376 if test "${SMESH_WITH_GUI}" = "yes"; then
377 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok qwt_ok Kernel_ok Geom_ok Med_ok"
380 if test "${SMESH_WITH_GUI}" = "no"; then
381 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok"
384 for var in $variables
386 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
391 echo "Default ORB : $DEFAULT_ORB"
394 dnl We don t need to say when we re entering directories if we re using
395 dnl GNU make becuase make does it for us.
396 if test "X$GMAKE" = "Xyes"; then
397 AC_SUBST(SETX) SETX=":"
399 AC_SUBST(SETX) SETX="set -x"
402 dnl AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
403 dnl AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
404 dnl AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
405 dnl AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
406 dnl AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
407 dnl AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
408 dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
409 dnl AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
412 echo ---------------------------------------------
413 echo copying resource files, shell scripts, and
415 echo ---------------------------------------------
419 dnl copy shells and utilities contained in the bin directory
420 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
426 for i in $ROOT_SRCDIR/bin/*
428 local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
431 ./bin/CVS | ./bin/salome) ;;
432 *) $INSTALL $i . ; echo $local_bin ;;
438 echo ---------------------------------------------
439 echo generating Makefiles and configure files
440 echo ---------------------------------------------
443 AC_OUTPUT_COMMANDS([ \
445 chmod +x ./bin/salome/*; \
448 # This list is initiated using autoscan and must be updated manually
449 # when adding a new file <filename>.in to manage. When you execute
450 # autoscan, the Makefile list is generated in the output file configure.scan.
451 # This could be helpfull to update de configuration.
453 ./salome_adm/unix/SALOMEconfig.h \
454 ./adm_local/Makefile \
455 ./adm_local/unix/Makefile \
456 ./adm_local/unix/config_files/Makefile \
461 ./doc/salome/Makefile \
462 ./doc/salome/gui/Makefile \
463 ./doc/salome/gui/SMESH/doxyfile \
464 ./doc/salome/gui/SMESH/doxyfile_py \
465 ./doc/salome/tui/Makefile \
466 ./doc/salome/tui/SMESH/doxyfile \
467 ./doc/salome/tui/SMESH/sources/static/tree.js \
469 ./src/Controls/Makefile \
470 ./src/Driver/Makefile \
471 ./src/DriverDAT/Makefile \
472 ./src/DriverMED/Makefile \
473 ./src/DriverSTL/Makefile \
474 ./src/DriverUNV/Makefile \
475 ./src/MEFISTO2/Makefile \
476 ./src/OBJECT/Makefile \
477 ./src/SMDS/Makefile \
478 ./src/SMESH/Makefile \
479 ./src/SMESHClient/Makefile \
480 ./src/SMESHDS/Makefile \
481 ./src/SMESHFiltersSelection/Makefile \
482 ./src/SMESHGUI/Makefile \
483 ./src/SMESH_I/Makefile \
484 ./src/SMESH_SWIG/Makefile \
485 ./src/SMESH_SWIG_WITHIHM/Makefile \
486 ./src/StdMeshers/Makefile \
487 ./src/StdMeshersGUI/Makefile \
488 ./src/StdMeshers_I/Makefile \
489 ./resources/Makefile \
490 ./resources/SMESHCatalog.xml \