1 # Copyright (C) 2011 CEA/DEN, EDF R&D
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
19 # Author : Marc Tajchman (CEA)
21 # Modified by : Patrick GOLDBRONN (CEA)
22 # Modified by : Marc Tajchman (CEA)
23 # Modified by : Alexander BORODIN (OCN) - autotools usage
24 # Created from configure.in.base
26 AC_INIT([Salome2 Project HOMARD module], [6.3.1], [webmaster.salome@opencascade.com], [SalomeHOMARD])
27 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
30 AM_INIT_AUTOMAKE([-Wno-portability])
32 SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'`
33 AC_SUBST(SHORT_VERSION)
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 ---------------------------------------------
48 dnl Initialize source and build root directories
52 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
58 AC_SUBST(ROOT_BUILDDIR)
61 echo Source root directory : $ROOT_SRCDIR
62 echo Build root directory : $ROOT_BUILDDIR
66 if test -z "$AR"; then
67 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
71 dnl Export the AR macro so that it will be placed in the libtool file
76 echo ---------------------------------------------
78 echo ---------------------------------------------
84 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
87 echo ---------------------------------------------
88 echo Coniguring 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}'/salome_adm/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 echo ---------------------------------------------
165 echo ---------------------------------------------
171 echo ---------------------------------------------
173 echo ---------------------------------------------
180 echo ---------------------------------------------
182 echo ---------------------------------------------
189 AM_CONDITIONAL(HOMARD_ENABLE_GUI, [test "${HOMARD_WITH_GUI}" = "yes"])
191 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
193 echo ---------------------------------------------
195 echo ---------------------------------------------
201 echo ---------------------------------------------
202 echo default ORB : omniORB
203 echo ---------------------------------------------
209 echo ---------------------------------------------
211 echo ---------------------------------------------
218 CORBA=adm_local/unix/$corba
222 if test "${HOMARD_WITH_GUI}" = "yes"; then
224 echo ---------------------------------------------
226 echo ---------------------------------------------
232 echo ---------------------------------------------
234 echo ---------------------------------------------
240 echo ---------------------------------------------
242 echo ---------------------------------------------
248 echo ---------------------------------------------
249 echo Testing full GUI
250 echo ---------------------------------------------
254 if test "x${CORBA_IN_GUI}" != "xyes"; then
255 echo "failed : For configure HOMARD module necessary full GUI !"
261 echo ---------------------------------------------
263 echo ---------------------------------------------
269 echo ---------------------------------------------
271 echo ---------------------------------------------
277 echo ---------------------------------------------
278 echo Testing OpenCascade
279 echo ---------------------------------------------
286 echo ---------------------------------------------
288 echo ---------------------------------------------
295 echo ---------------------------------------------
297 echo ---------------------------------------------
304 echo ---------------------------------------------
305 echo Testing Med Module
306 echo ---------------------------------------------
312 echo ---------------------------------------------
314 echo ---------------------------------------------
321 echo ---------------------------------------------
323 echo ---------------------------------------------
330 echo ---------------------------------------------
332 echo ---------------------------------------------
336 if test "${HOMARD_WITH_GUI}" = "yes"; then
337 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"
340 if test "${HOMARD_WITH_GUI}" = "no"; then
341 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"
344 for var in $variables
346 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
351 echo "Default ORB : $DEFAULT_ORB"
354 dnl We don t need to say when we re entering directories if we re using
355 dnl GNU make becuase make does it for us.
356 if test "X$GMAKE" = "Xyes"; then
357 AC_SUBST(SETX) SETX=":"
359 AC_SUBST(SETX) SETX="set -x"
362 dnl AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
363 dnl AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
364 dnl AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
365 dnl AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
366 dnl AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
367 dnl AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
368 dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
369 dnl AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
372 echo ---------------------------------------------
373 echo generating Makefiles and configure files
374 echo ---------------------------------------------
377 #AC_OUTPUT_COMMANDS([ \
378 # chmod +x ./bin/*; \
379 # chmod +x ./bin/salome/*; \
382 # This list is initiated using autoscan and must be updated manually
383 # when adding a new file <filename>.in to manage. When you execute
384 # autoscan, the Makefile list is generated in the output file configure.scan.
385 # This could be helpfull to update de configuration.
387 salome_adm/unix/SALOMEconfig.h \
391 adm_local/unix/Makefile \
392 adm_local/unix/config_files/Makefile \
396 src/HOMARD_I/Makefile \
397 src/HOMARD/Makefile \
398 src/HOMARDGUI/Makefile \
399 src/HOMARD_SWIG/Makefile \
401 resources/HOMARDCatalog.xml \
402 resources/SalomeApp.xml \