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