1 # Copyright (C) 2007-2010 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 SMESH module], [5.1.4], [webmaster.salome@opencascade.com], [SalomeSMESH])
28 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
31 AM_INIT_AUTOMAKE([-Wno-portability])
33 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
36 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
41 echo ---------------------------------------------
42 echo Initialize source and build root directories
43 echo ---------------------------------------------
47 dnl Initialize source and build root directories
51 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
57 AC_SUBST(ROOT_BUILDDIR)
60 echo Source root directory : $ROOT_SRCDIR
61 echo Build root directory : $ROOT_BUILDDIR
65 if test -z "$AR"; then
66 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
70 dnl Export the AR macro so that it will be placed in the libtool file
75 echo ---------------------------------------------
77 echo ---------------------------------------------
84 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
87 echo ---------------------------------------------
88 echo Configuring production
89 echo ---------------------------------------------
94 echo ---------------------------------------------
96 echo ---------------------------------------------
98 dnl first, we set static to no!
99 dnl if we want it, use --enable-static
105 dnl Fix up the INSTALL macro if it s a relative path. We want the
106 dnl full-path to the binary instead.
109 INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
114 echo ---------------------------------------------
116 echo ---------------------------------------------
120 dnl inutil car libtool
124 AC_CXX_TEMPLATE_OPTIONS
126 # AC_CC_WARNINGS([ansi])
130 echo ---------------------------------------------
132 echo ---------------------------------------------
137 AC_F77_LIBRARY_LDFLAGS
139 AC_FC_LIBRARY_LDFLAGS
140 if test "X$FC" != "X" ; then
145 dnl AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
150 AC_CHECK_LIB(dl,dlopen)
152 dnl add library libm :
156 dnl Well we use sstream which is not in gcc pre-2.95.3
157 dnl We must test if it exists. If not, add it in include !
163 dnl ---------------------------------------------
165 dnl ---------------------------------------------
171 echo ---------------------------------------------
172 echo testing LEX \& YACC
173 echo ---------------------------------------------
182 echo ---------------------------------------------
184 echo ---------------------------------------------
190 dnl echo ---------------------------------------------
191 dnl echo testing java
192 dnl echo ---------------------------------------------
198 echo ---------------------------------------------
200 echo ---------------------------------------------
207 echo ---------------------------------------------
209 echo ---------------------------------------------
214 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
216 echo ---------------------------------------------
218 echo ---------------------------------------------
224 dnl echo ---------------------------------------------
225 dnl echo testing mico
226 dnl echo ---------------------------------------------
232 echo ---------------------------------------------
233 echo default ORB : omniORB
234 echo ---------------------------------------------
240 echo ---------------------------------------------
242 echo ---------------------------------------------
249 CORBA=adm_local/unix/$corba
254 echo ---------------------------------------------
256 echo ---------------------------------------------
262 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
266 AM_CONDITIONAL(SMESH_ENABLE_GUI, [test "${gui_ok}" = "yes"])
268 if test "${SalomeGUI_need}" == "yes"; then
269 if test "${FullGUI_ok}" != "yes"; then
270 AC_MSG_WARN(For configure SMESH module necessary full GUI!)
272 elif test "${SalomeGUI_need}" == "auto"; then
273 if test "${FullGUI_ok}" != "yes"; then
274 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
276 elif test "${SalomeGUI_need}" == "no"; then
277 echo Build without GUI option has been chosen
280 if test "${gui_ok}" = "yes"; then
282 echo ---------------------------------------------
284 echo ---------------------------------------------
290 echo ---------------------------------------------
292 echo ---------------------------------------------
298 echo ---------------------------------------------
300 echo ---------------------------------------------
307 echo ---------------------------------------------
309 echo ---------------------------------------------
315 echo ---------------------------------------------
317 echo ---------------------------------------------
323 echo ---------------------------------------------
324 echo Testing OpenCascade
325 echo ---------------------------------------------
330 if test "${gui_ok}" = "yes"; then
333 echo ---------------------------------------------
335 echo ---------------------------------------------
343 echo ---------------------------------------------
344 echo Testing html generators
345 echo ---------------------------------------------
348 CHECK_HTML_GENERATORS
351 echo ---------------------------------------------
353 echo ---------------------------------------------
358 echo ---------------------------------------------
360 echo ---------------------------------------------
366 echo ---------------------------------------------
368 echo ---------------------------------------------
374 echo ---------------------------------------------
376 echo ---------------------------------------------
384 echo ---------------------------------------------
386 echo ---------------------------------------------
391 if test "${gui_ok}" = "yes"; then
392 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 sphinx_ok qwt_ok Kernel_ok Geom_ok Med_ok gui_ok"
393 elif test "${SalomeGUI_need}" != "no"; then
394 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 sphinx_ok Kernel_ok Geom_ok Med_ok gui_ok"
396 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 sphinx_ok Kernel_ok Geom_ok Med_ok"
399 for var in $variables
401 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
406 echo "Default ORB : $DEFAULT_ORB"
409 dnl We don t need to say when we re entering directories if we re using
410 dnl GNU make becuase make does it for us.
411 if test "X$GMAKE" = "Xyes"; then
412 AC_SUBST(SETX) SETX=":"
414 AC_SUBST(SETX) SETX="set -x"
417 dnl AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
418 dnl AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
419 dnl AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
420 dnl AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
421 dnl AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
422 dnl AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
423 dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
424 dnl AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
427 echo ---------------------------------------------
428 echo generating Makefiles and configure files
429 echo ---------------------------------------------
432 #AC_OUTPUT_COMMANDS([ \
433 # chmod +x ./bin/*; \
434 # chmod +x ./bin/salome/*; \
437 # This list is initiated using autoscan and must be updated manually
438 # when adding a new file <filename>.in to manage. When you execute
439 # autoscan, the Makefile list is generated in the output file configure.scan.
440 # This could be helpfull to update de configuration.
443 adm_local/cmake_files/Makefile \
444 adm_local/unix/Makefile \
445 adm_local/unix/config_files/Makefile \
450 doc/docutils/Makefile \
451 doc/salome/Makefile \
452 doc/salome/gui/Makefile \
453 doc/salome/gui/SMESH/Makefile \
454 doc/salome/gui/SMESH/doxyfile \
455 doc/salome/gui/SMESH/doxyfile_py \
456 doc/salome/gui/SMESH/static/header.html \
457 doc/salome/tui/Makefile \
458 doc/salome/tui/doxyfile \
459 doc/salome/tui/static/header.html \
461 src/Controls/Makefile \
462 src/Driver/Makefile \
463 src/DriverDAT/Makefile \
464 src/DriverMED/Makefile \
465 src/DriverSTL/Makefile \
466 src/DriverUNV/Makefile \
467 src/MEFISTO2/Makefile \
468 src/OBJECT/Makefile \
469 src/PluginUtils/Makefile \
472 src/SMESHClient/Makefile \
473 src/SMESHDS/Makefile \
474 src/SMESHFiltersSelection/Makefile \
475 src/SMESHGUI/Makefile \
476 src/SMESH_I/Makefile \
477 src/SMESH_SWIG/Makefile \
478 src/SMESH_SWIG_WITHIHM/Makefile \
479 src/StdMeshers/Makefile \
480 src/StdMeshersGUI/Makefile \
481 src/StdMeshers_I/Makefile \
482 src/SMESH_PY/Makefile \
484 resources/SMESHCatalog.xml \