Salome HOME
Bug 0020374: Partition operation leads to missing volume. A fix by PKV.
[modules/geom.git] / configure.ac
1 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
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.
10 #
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.
15 #
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
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22 # Author : Marc Tajchman (CEA)
23 # Date : 28/06/2001
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
28 #
29 AC_INIT([Salome2 Project GEOM module], [4.1.5], [webmaster.salome@opencascade.com], [salome])
30 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
31 AC_CANONICAL_HOST
32 AC_CANONICAL_TARGET
33 AM_INIT_AUTOMAKE([-Wno-portability])
34
35 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
36 AC_SUBST(XVERSION)
37
38 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
39 MODULE_NAME=geom
40 AC_SUBST(MODULE_NAME)
41
42 echo
43 echo ---------------------------------------------
44 echo Initialize source and build root directories
45 echo ---------------------------------------------
46 echo
47
48 dnl
49 dnl Initialize source and build root directories
50 dnl
51
52 ROOT_BUILDDIR=`pwd`
53 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
54 cd $ROOT_SRCDIR
55 ROOT_SRCDIR=`pwd`
56 cd $ROOT_BUILDDIR
57
58 AC_SUBST(ROOT_SRCDIR)
59 AC_SUBST(ROOT_BUILDDIR)
60
61 echo
62 echo Source root directory : $ROOT_SRCDIR
63 echo Build  root directory : $ROOT_BUILDDIR
64 echo
65 echo
66
67 if test -z "$AR"; then
68    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
69 fi
70 AC_SUBST(AR)
71
72 dnl Export the AR macro so that it will be placed in the libtool file
73 dnl correctly.
74 export AR
75
76 echo
77 echo ---------------------------------------------
78 echo testing make
79 echo ---------------------------------------------
80 echo
81
82 AC_PROG_MAKE_SET
83 AC_PROG_INSTALL
84 dnl
85 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
86
87 echo
88 echo ---------------------------------------------
89 echo Coniguring production
90 echo ---------------------------------------------
91 echo
92 AC_ENABLE_DEBUG(yes)
93 AC_DISABLE_PRODUCTION
94
95 echo ---------------------------------------------
96 echo testing libtool
97 echo ---------------------------------------------
98
99 dnl first, we set static to no!
100 dnl if we want it, use --enable-static
101 AC_ENABLE_STATIC(no)
102
103 AC_LIBTOOL_DLOPEN
104 AC_PROG_LIBTOOL
105
106 dnl Fix up the INSTALL macro if it s a relative path. We want the
107 dnl full-path to the binary instead.
108 case "$INSTALL" in
109    *install-sh*)
110       INSTALL='\${ROOT_BUILDDIR}'/salome_adm/unix/config_files/install-sh
111       ;;
112 esac
113
114 echo
115 echo ---------------------------------------------
116 echo testing C/C++
117 echo ---------------------------------------------
118 echo
119
120 cc_ok=no
121 dnl inutil car libtool
122 dnl AC_PROG_CC
123 AC_PROG_CXX
124 AC_CXX_WARNINGS
125 AC_CXX_TEMPLATE_OPTIONS
126 AC_DEPEND_FLAG
127 # AC_CC_WARNINGS([ansi])
128 cc_ok=yes
129
130 dnl Library libdl :
131 AC_CHECK_LIB(dl,dlopen)
132
133 dnl add library libm :
134 AC_CHECK_LIB(m,ceil)
135
136 dnl
137 dnl Well we use sstream which is not in gcc pre-2.95.3
138 dnl We must test if it exists. If not, add it in include !
139 dnl
140
141 AC_CXX_HAVE_SSTREAM
142
143 dnl
144 dnl ---------------------------------------------
145 dnl testing MPICH
146 dnl ---------------------------------------------
147 dnl
148
149 CHECK_MPICH
150
151 echo
152 echo ---------------------------------------------
153 echo testing LEX \& YACC
154 echo ---------------------------------------------
155 echo
156
157 lex_yacc_ok=no
158 AC_PROG_YACC
159 AC_PROG_LEX
160 lex_yacc_ok=yes
161
162 echo
163 echo ---------------------------------------------
164 echo testing python
165 echo ---------------------------------------------
166 echo
167
168 CHECK_PYTHON
169
170 dnl echo
171 dnl echo ---------------------------------------------
172 dnl echo testing java
173 dnl echo ---------------------------------------------
174 dnl echo
175
176 dnl CHECK_JAVA
177
178 echo
179 echo ---------------------------------------------
180 echo testing swig
181 echo ---------------------------------------------
182 echo
183
184 AM_PATH_PYTHON(2.3)
185 CHECK_SWIG
186
187 echo
188 echo ---------------------------------------------
189 echo testing threads
190 echo ---------------------------------------------
191 echo
192
193 ENABLE_PTHREADS
194
195 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
196 echo
197 echo ---------------------------------------------
198 echo testing omniORB
199 echo ---------------------------------------------
200 echo
201
202 CHECK_OMNIORB
203
204 dnl echo
205 dnl echo ---------------------------------------------
206 dnl echo testing mico
207 dnl echo ---------------------------------------------
208 dnl echo
209
210 dnl CHECK_MICO
211
212 echo
213 echo ---------------------------------------------
214 echo default ORB : omniORB
215 echo ---------------------------------------------
216 echo
217
218 DEFAULT_ORB=omniORB
219
220 echo
221 echo ---------------------------------------------
222 echo testing Corba
223 echo ---------------------------------------------
224 echo
225
226 CHECK_CORBA
227
228 AC_SUBST_FILE(CORBA)
229 corba=make_$ORB
230 CORBA=adm_local/unix/$corba
231
232 fi
233
234 GEOM_WITH_GUI=yes
235
236 AM_CONDITIONAL(GEOM_ENABLE_GUI, [test "${GEOM_WITH_GUI}" = "yes"])
237
238 if test "${GEOM_WITH_GUI}" = "yes"; then
239     echo
240     echo ---------------------------------------------
241     echo testing msg2qm
242     echo ---------------------------------------------
243     echo
244
245     CHECK_MSG2QM
246
247     echo
248     echo ---------------------------------------------
249     echo testing openGL
250     echo ---------------------------------------------
251     echo
252
253     CHECK_OPENGL
254
255     echo
256     echo ---------------------------------------------
257     echo testing QT
258     echo ---------------------------------------------
259     echo
260
261     CHECK_QT
262
263     echo
264     echo ---------------------------------------------
265     echo testing VTK
266     echo ---------------------------------------------
267     echo
268
269     CHECK_VTK
270
271     echo
272     echo ---------------------------------------------
273     echo Testing GUI
274     echo ---------------------------------------------
275     echo
276
277     CHECK_SALOME_GUI
278
279     echo
280     echo ---------------------------------------------
281     echo Testing full GUI
282     echo ---------------------------------------------
283     echo
284
285     CHECK_CORBA_IN_GUI
286     if test "x${CORBA_IN_GUI}" != "xyes"; then
287       echo "failed : For configure GEOM module necessary full GUI !"
288       exit
289     fi
290 fi
291
292 echo
293 echo ---------------------------------------------
294 echo testing HDF5
295 echo ---------------------------------------------
296 echo
297
298 CHECK_HDF5
299
300 echo
301 echo ---------------------------------------------
302 echo BOOST Library
303 echo ---------------------------------------------
304 echo
305
306 CHECK_BOOST
307
308 echo
309 echo ---------------------------------------------
310 echo Testing OpenCascade
311 echo ---------------------------------------------
312 echo
313
314 CHECK_CAS
315
316 echo
317 echo ---------------------------------------------
318 echo Testing html generators
319 echo ---------------------------------------------
320 echo
321
322 CHECK_HTML_GENERATORS
323
324 echo
325 echo ---------------------------------------------
326 echo Testing Kernel
327 echo ---------------------------------------------
328 echo
329
330 CHECK_KERNEL
331
332 echo
333 echo ---------------------------------------------
334 echo Summary
335 echo ---------------------------------------------
336 echo
337
338 echo Configure
339
340 if test "${GEOM_WITH_GUI}" = "yes"; then
341 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok"
342 fi
343 if test "${GEOM_WITH_GUI}" = "no"; then
344 variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok"
345 fi
346
347 for var in $variables
348 do
349    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
350    eval echo \$$var
351 done
352
353 echo
354 echo "Default ORB   : $DEFAULT_ORB"
355 echo
356
357 dnl We don t need to say when we re entering directories if we re using
358 dnl GNU make becuase make does it for us.
359 if test "X$GMAKE" = "Xyes"; then
360    AC_SUBST(SETX) SETX=":"
361 else
362    AC_SUBST(SETX) SETX="set -x"
363 fi
364
365 dnl copy shells and utilities contained in the bin directory
366 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
367 dnl directory
368
369
370 echo
371 echo ---------------------------------------------
372 echo generating Makefiles and configure files
373 echo ---------------------------------------------
374 echo
375
376 AC_OUTPUT_COMMANDS([ \
377   chmod +x ./bin/*; \
378 ])
379
380 # This list is initiated using autoscan and must be updated manually
381 # when adding a new file <filename>.in to manage. When you execute
382 # autoscan, the Makefile list is generated in the output file configure.scan.
383 # This could be helpfull to update de configuration.
384 AC_OUTPUT([ \
385   salome_adm/unix/SALOMEconfig.h \
386   adm_local/Makefile \
387   adm_local/unix/Makefile \
388   adm_local/unix/config_files/Makefile \
389   bin/VERSION \
390   bin/Makefile \
391   GEOM_version.h \
392   doc/Makefile \
393   doc/salome/Makefile \
394   doc/salome/gui/Makefile \
395   doc/salome/gui/GEOM/doxyfile \
396   doc/salome/gui/GEOM/doxyfile_py \
397   doc/salome/gui/GEOM/doxyfile_tui \
398   doc/salome/tui/Makefile \
399   doc/salome/tui/GEOM/doxyfile \
400   doc/salome/tui/GEOM/sources/static/tree.js \
401   src/Makefile \
402   src/ARCHIMEDE/Makefile \
403   src/BREPExport/Makefile \
404   src/BREPImport/Makefile \
405   src/BasicGUI/Makefile \
406   src/BlocksGUI/Makefile \
407   src/BooleanGUI/Makefile \
408   src/BuildGUI/Makefile \
409   src/DisplayGUI/Makefile \
410   src/DlgRef/Makefile \
411   src/EntityGUI/Makefile \
412   src/GEOM/Makefile \
413   src/GEOMAlgo/Makefile \
414   src/GEOMBase/Makefile \
415   src/GEOMClient/Makefile \
416   src/GEOMFiltersSelection/Makefile \
417   src/GEOMGUI/Makefile \
418   src/GEOMImpl/Makefile \
419   src/GEOMToolsGUI/Makefile \
420   src/GEOM_I/Makefile \
421   src/GEOM_I_Superv/Makefile \
422   src/GEOM_SWIG/Makefile \
423   src/GEOM_SWIG_WITHIHM/Makefile \
424   src/GenerationGUI/Makefile \
425   src/GroupGUI/Makefile \
426   src/IGESExport/Makefile \
427   src/IGESImport/Makefile \
428   src/MeasureGUI/Makefile \
429   src/NMTAlgo/Makefile \
430   src/NMTDS/Makefile \
431   src/NMTTools/Makefile \
432   src/OBJECT/Makefile \
433   src/OperationGUI/Makefile \
434   src/PrimitiveGUI/Makefile \
435   src/RepairGUI/Makefile \
436   src/SKETCHER/Makefile \
437   src/STEPExport/Makefile \
438   src/STEPImport/Makefile \
439   src/STLExport/Makefile \
440   src/ShHealOper/Makefile \
441   src/TransformationGUI/Makefile \
442   resources/Makefile \
443   resources/GEOMCatalog.xml \
444   idl/Makefile \
445   Makefile \
446 ])