Salome HOME
2430543008983270f4106d4447cb96dbde4e74d9
[samples/sierpinsky.git] / configure.ac
1 #  Copyright (C) 2005-2008  OPEN CASCADE
2 #
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.
7 #
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.
12 #
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
16 #
17 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 #  PLEASE DO NOT MODIFY configure.in FILE
20 #  ALL CHANGES WILL BE DISCARDED BY THE NEXT
21 #  build_configure COMMAND
22 #  CHANGES MUST BE MADE IN configure.in.base FILE
23 # Author : Marc Tajchman (CEA)
24 # Date : 28/06/2001
25 # Modified by : Patrick GOLDBRONN (CEA)
26 # Modified by : Marc Tajchman (CEA)
27 # Created from configure.in.base
28 #
29 AC_INIT([Salome2 Project SIERPINSKY module],[4.1.4], [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
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=sierpinsky
40 AC_SUBST(MODULE_NAME)
41
42 dnl
43 dnl Initialize source and build root directories
44 dnl
45
46 ROOT_BUILDDIR=`pwd`
47 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
48 cd $ROOT_SRCDIR
49 ROOT_SRCDIR=`pwd`
50 cd $ROOT_BUILDDIR
51
52 AC_SUBST(ROOT_SRCDIR)
53 AC_SUBST(ROOT_BUILDDIR)
54
55 echo
56 echo Source root directory : $ROOT_SRCDIR
57 echo Build  root directory : $ROOT_BUILDDIR
58 echo
59 echo
60
61 AC_CHECK_PROG(SHELL,sh)
62 AC_SUBST(SHELL)
63
64 if test -z "$AR"; then
65    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
66 fi
67 AC_SUBST(AR)
68
69 dnl Export the AR macro so that it will be placed in the libtool file
70 dnl correctly.
71 export AR
72
73 echo
74 echo ---------------------------------------------
75 echo testing make
76 echo ---------------------------------------------
77 echo
78
79 AC_PROG_MAKE_SET
80 AC_PROG_INSTALL
81 dnl 
82 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
83
84 AC_ENABLE_DEBUG(yes)
85 AC_DISABLE_PRODUCTION
86
87 echo ---------------------------------------------
88 echo testing libtool
89 echo ---------------------------------------------
90
91 dnl first, we set static to no!
92 dnl if we want it, use --enable-static
93 AC_ENABLE_STATIC(no)
94
95 AC_LIBTOOL_DLOPEN
96 AC_PROG_LIBTOOL
97
98 dnl Fix up the INSTALL macro if it s a relative path. We want the
99 dnl full-path to the binary instead.
100 case "$INSTALL" in
101    *install-sh*)
102       INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
103       ;;
104 esac
105
106 echo
107 echo ---------------------------------------------
108 echo testing C/C++
109 echo ---------------------------------------------
110 echo
111
112 cc_ok=no
113 dnl inutil car libtool
114 dnl AC_PROG_CC
115 AC_PROG_CXX
116 AC_DEPEND_FLAG
117 # AC_CC_WARNINGS([ansi])
118 cc_ok=yes
119
120 dnl Library libdl :
121 AC_CHECK_LIB(dl,dlopen)
122
123 dnl add library libm :
124 AC_CHECK_LIB(m,ceil)
125
126 dnl 
127 dnl Well we use sstream which is not in gcc pre-2.95.3
128 dnl We must test if it exists. If not, add it in include !
129 dnl
130
131 AC_CXX_HAVE_SSTREAM
132
133 dnl
134 dnl ---------------------------------------------
135 dnl testing MPICH
136 dnl ---------------------------------------------
137 dnl
138
139 CHECK_MPICH
140
141 echo
142 echo ---------------------------------------------
143 echo testing LEX \& YACC
144 echo ---------------------------------------------
145 echo
146
147 lex_yacc_ok=no
148 AC_PROG_YACC
149 AC_PROG_LEX
150 lex_yacc_ok=yes
151
152 echo
153 echo ---------------------------------------------
154 echo testing python
155 echo ---------------------------------------------
156 echo
157
158 CHECK_PYTHON
159
160 AM_PATH_PYTHON(2.3)
161
162 dnl echo
163 dnl echo ---------------------------------------------
164 dnl echo testing java
165 dnl echo ---------------------------------------------
166 dnl echo
167
168 dnl CHECK_JAVA
169
170 echo
171 echo ---------------------------------------------
172 echo testing swig
173 echo ---------------------------------------------
174 echo
175
176 CHECK_SWIG
177
178 echo
179 echo ---------------------------------------------
180 echo testing threads
181 echo ---------------------------------------------
182 echo
183
184 ENABLE_PTHREADS
185
186 echo
187 echo ---------------------------------------------
188 echo testing omniORB
189 echo ---------------------------------------------
190 echo
191
192 CHECK_OMNIORB
193
194 dnl echo
195 dnl echo ---------------------------------------------
196 dnl echo testing mico
197 dnl echo ---------------------------------------------
198 dnl echo
199
200 dnl CHECK_MICO
201
202 echo
203 echo ---------------------------------------------
204 echo default ORB : omniORB
205 echo ---------------------------------------------
206 echo
207
208 DEFAULT_ORB=omniORB
209 CHECK_CORBA
210
211 AC_SUBST_FILE(CORBA)
212 corba=make_$ORB
213 CORBA=adm_local/unix/$corba
214
215 echo
216 echo ---------------------------------------------
217 echo testing openGL
218 echo ---------------------------------------------
219 echo
220
221 CHECK_OPENGL
222
223 echo
224 echo ---------------------------------------------
225 echo testing QT
226 echo ---------------------------------------------
227 echo
228
229 CHECK_QT
230
231 echo
232 echo ---------------------------------------------
233 echo testing msg2qm
234 echo ---------------------------------------------
235 echo
236
237 CHECK_MSG2QM
238
239 echo
240 echo ---------------------------------------------
241 echo testing VTK
242 echo ---------------------------------------------
243 echo
244
245 CHECK_VTK
246
247 echo
248 echo ---------------------------------------------
249 echo testing HDF5
250 echo ---------------------------------------------
251 echo
252
253 CHECK_HDF5
254
255 echo
256 echo ---------------------------------------------
257 echo BOOST Library
258 echo ---------------------------------------------
259 echo
260
261 CHECK_BOOST
262
263 echo
264 echo ---------------------------------------------
265 echo testing MED2
266 echo ---------------------------------------------
267 echo
268
269 CHECK_MED2
270
271 echo
272 echo ---------------------------------------------
273 echo Testing OpenCascade
274 echo ---------------------------------------------
275 echo
276
277 CHECK_CAS
278
279 echo
280 echo ---------------------------------------------
281 echo Testing html generators
282 echo ---------------------------------------------
283 echo
284
285 CHECK_HTML_GENERATORS
286
287 echo
288 echo ---------------------------------------------
289 echo Testing gd library
290 echo ---------------------------------------------
291 echo
292
293 CHECK_GDLIB
294
295 echo
296 echo ---------------------------------------------
297 echo Testing GUI
298 echo ---------------------------------------------
299 echo
300
301 CHECK_SALOME_GUI
302
303 echo
304 echo ---------------------------------------------
305 echo Testing full GUI
306 echo ---------------------------------------------
307 echo
308
309 CHECK_CORBA_IN_GUI
310 if test "x${CORBA_IN_GUI}" != "xyes"; then
311   echo "failed : For configure COMPONENT module necessary full GUI !"
312   exit
313 fi
314
315 echo
316 echo ---------------------------------------------
317 echo Testing Kernel
318 echo ---------------------------------------------
319 echo
320
321 CHECK_KERNEL
322
323 echo
324 echo ---------------------------------------------
325 echo Testing Med
326 echo ---------------------------------------------
327 echo
328
329 CHECK_MED
330
331 echo
332 echo ---------------------------------------------
333 echo testing MED2
334 echo ---------------------------------------------
335 echo
336
337 CHECK_MED2
338
339 echo
340 echo ---------------------------------------------
341 echo Testing Visu
342 echo ---------------------------------------------
343 echo
344
345 CHECK_VISU
346
347 echo
348 echo ---------------------------------------------
349 echo Testing Randomizer
350 echo ---------------------------------------------
351 echo
352
353 CHECK_RANDOMIZER
354
355 echo
356 echo ---------------------------------------------
357 echo Summary
358 echo ---------------------------------------------
359 echo
360
361 echo Configure
362 variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok
363 OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok gd_ok Kernel_ok Med_ok Visu_ok Randomizer_ok"
364
365 for var in $variables
366 do
367    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
368    eval echo \$$var
369 done
370
371 echo
372 echo "Default ORB   : $DEFAULT_ORB"
373 echo
374
375 dnl We don t need to say when we re entering directories if we re using
376 dnl GNU make becuase make does it for us.
377 if test "X$GMAKE" = "Xyes"; then
378    AC_SUBST(SETX) SETX=":"
379 else
380    AC_SUBST(SETX) SETX="set -x"
381 fi
382 echo
383 echo ---------------------------------------------
384 echo generating Makefiles and configure files
385 echo ---------------------------------------------
386 echo
387
388 AC_OUTPUT_COMMANDS([ \
389       chmod +x ./bin/*; \
390 ])
391
392 # This list is initiated using autoscan and must be updated manually
393 # when adding a new file <filename>.in to manage. When you execute
394 # autoscan, the Makefile list is generated in the output file configure.scan.
395 # This could be helpfull to update de configuration.
396 AC_OUTPUT([ \
397   ./salome_adm/unix/SALOMEconfig.h \
398   ./adm_local/Makefile \
399   ./adm_local/unix/Makefile \
400   ./adm_local/unix/config_files/Makefile \
401   ./bin/VERSION \
402   ./bin/Makefile \
403   ./src/Makefile \
404   ./src/Sierpinsky/Makefile \
405   ./src/SierpinskyGUI/Makefile \
406   ./resources/Makefile \
407   ./resources/SIERPINSKYCatalog.xml \
408   ./idl/Makefile \
409   Makefile \
410 ])