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 : Alexander BORODIN (OCN) - autotools usage
27 # Created from configure.in.base
29 AC_INIT([Salome2 Project HOMARD module], [5.1.0], [webmaster.salome@opencascade.com], [SalomeHOMARD])
30 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
33 AM_INIT_AUTOMAKE([-Wno-portability])
35 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
38 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
43 echo ---------------------------------------------
44 echo Initialize source and build root directories
45 echo ---------------------------------------------
49 dnl Initialize source and build root directories
53 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
59 AC_SUBST(ROOT_BUILDDIR)
62 echo Source root directory : $ROOT_SRCDIR
63 echo Build root directory : $ROOT_BUILDDIR
67 if test -z "$AR"; then
68 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
72 dnl Export the AR macro so that it will be placed in the libtool file
77 echo ---------------------------------------------
79 echo ---------------------------------------------
85 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
88 echo ---------------------------------------------
89 echo Coniguring production
90 echo ---------------------------------------------
95 echo ---------------------------------------------
97 echo ---------------------------------------------
99 dnl first, we set static to no!
100 dnl if we want it, use --enable-static
106 dnl Fix up the INSTALL macro if it s a relative path. We want the
107 dnl full-path to the binary instead.
110 INSTALL='\${ROOT_BUILDDIR}'/salome_adm/unix/config_files/install-sh
115 echo ---------------------------------------------
117 echo ---------------------------------------------
121 dnl inutil car libtool
125 AC_CXX_TEMPLATE_OPTIONS
127 # AC_CC_WARNINGS([ansi])
131 echo ---------------------------------------------
133 echo ---------------------------------------------
138 AC_F77_LIBRARY_LDFLAGS
140 AC_FC_LIBRARY_LDFLAGS
141 if test "X$FC" != "X" ; then
146 dnl AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
151 AC_CHECK_LIB(dl,dlopen)
153 dnl add library libm :
157 dnl Well we use sstream which is not in gcc pre-2.95.3
158 dnl We must test if it exists. If not, add it in include !
164 echo ---------------------------------------------
166 echo ---------------------------------------------
172 echo ---------------------------------------------
174 echo ---------------------------------------------
181 echo ---------------------------------------------
183 echo ---------------------------------------------
190 AM_CONDITIONAL(HOMARD_ENABLE_GUI, [test "${HOMARD_WITH_GUI}" = "yes"])
192 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
194 echo ---------------------------------------------
196 echo ---------------------------------------------
202 echo ---------------------------------------------
203 echo default ORB : omniORB
204 echo ---------------------------------------------
210 echo ---------------------------------------------
212 echo ---------------------------------------------
219 CORBA=adm_local/unix/$corba
223 if test "${HOMARD_WITH_GUI}" = "yes"; then
225 echo ---------------------------------------------
227 echo ---------------------------------------------
233 echo ---------------------------------------------
235 echo ---------------------------------------------
241 echo ---------------------------------------------
243 echo ---------------------------------------------
249 echo ---------------------------------------------
250 echo Testing full GUI
251 echo ---------------------------------------------
255 if test "x${CORBA_IN_GUI}" != "xyes"; then
256 echo "failed : For configure HOMARD module necessary full GUI !"
262 echo ---------------------------------------------
264 echo ---------------------------------------------
270 echo ---------------------------------------------
272 echo ---------------------------------------------
278 echo ---------------------------------------------
279 echo Testing OpenCascade
280 echo ---------------------------------------------
287 echo ---------------------------------------------
289 echo ---------------------------------------------
296 echo ---------------------------------------------
298 echo ---------------------------------------------
305 echo ---------------------------------------------
306 echo Testing Med Module
307 echo ---------------------------------------------
313 echo ---------------------------------------------
315 echo ---------------------------------------------
322 echo ---------------------------------------------
324 echo ---------------------------------------------
331 echo ---------------------------------------------
333 echo ---------------------------------------------
337 if test "${HOMARD_WITH_GUI}" = "yes"; then
338 variables="cc_ok fortran_ok boost_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok hdf5_ok omniORB_ok Kernel_ok med2_ok SalomeGUI_ok Med_ok SMesh_ok sphinx_ok"
341 if test "${HOMARD_WITH_GUI}" = "no"; then
342 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok SMesh_ok sphinx_ok"
345 for var in $variables
347 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
352 echo "Default ORB : $DEFAULT_ORB"
355 dnl We don t need to say when we re entering directories if we re using
356 dnl GNU make becuase make does it for us.
357 if test "X$GMAKE" = "Xyes"; then
358 AC_SUBST(SETX) SETX=":"
360 AC_SUBST(SETX) SETX="set -x"
363 dnl AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
364 dnl AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
365 dnl AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
366 dnl AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
367 dnl AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
368 dnl AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
369 dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
370 dnl AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
373 echo ---------------------------------------------
374 echo generating Makefiles and configure files
375 echo ---------------------------------------------
378 #AC_OUTPUT_COMMANDS([ \
379 # chmod +x ./bin/*; \
380 # chmod +x ./bin/salome/*; \
383 # This list is initiated using autoscan and must be updated manually
384 # when adding a new file <filename>.in to manage. When you execute
385 # autoscan, the Makefile list is generated in the output file configure.scan.
386 # This could be helpfull to update de configuration.
388 salome_adm/unix/SALOMEconfig.h \
393 src/HOMARD_I/Makefile \
394 src/HOMARD/Makefile \
395 src/HOMARDGUI/Makefile \
396 src/HOMARD_SWIG/Makefile \