Salome HOME
86ce9e1851fc465ca399510ba2ecbbee1f189c52
[modules/visu.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 : Mikhail Ponikarov (OCN)
27 #
28 AC_INIT([Salome2 Project VISU module], [5.1.1], [webmaster.salome@opencascade.com], [SalomeVISU])
29 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
30 AC_CANONICAL_HOST
31 AC_CANONICAL_TARGET
32 AM_INIT_AUTOMAKE([-Wno-portability])
33
34 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
35 AC_SUBST(XVERSION)
36
37 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
38 MODULE_NAME=visu
39 AC_SUBST(MODULE_NAME)
40
41 dnl
42 dnl Initialize source and build root directories
43 dnl
44
45 ROOT_BUILDDIR=`pwd`
46 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
47 cd $ROOT_SRCDIR
48 ROOT_SRCDIR=`pwd`
49 cd $ROOT_BUILDDIR
50
51 AC_SUBST(ROOT_SRCDIR)
52 AC_SUBST(ROOT_BUILDDIR)
53
54 echo
55 echo Source root directory : $ROOT_SRCDIR
56 echo Build  root directory : $ROOT_BUILDDIR
57 echo
58 echo
59
60 if test -z "$AR"; then
61    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
62 fi
63 AC_SUBST(AR)
64
65 dnl Export the AR macro so that it will be placed in the libtool file
66 dnl correctly.
67 export AR
68
69 echo
70 echo ---------------------------------------------
71 echo testing make
72 echo ---------------------------------------------
73 echo
74
75 AC_PROG_MAKE_SET
76 AC_PROG_INSTALL
77 dnl 
78 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
79
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='\${KERNEL_ROOT_DIR}'/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_DEPEND_FLAG
113 # AC_CC_WARNINGS([ansi])
114 cc_ok=yes
115
116 dnl Library libdl :
117 AC_CHECK_LIB(dl,dlopen)
118
119 dnl add library libm :
120 AC_CHECK_LIB(m,ceil)
121
122 dnl 
123 dnl Well we use sstream which is not in gcc pre-2.95.3
124 dnl We must test if it exists. If not, add it in include !
125 dnl
126
127 AC_CXX_USE_STD_IOSTREAM
128 AC_CXX_HAVE_SSTREAM
129
130
131
132 dnl
133 dnl ---------------------------------------------
134 dnl testing MPICH
135 dnl ---------------------------------------------
136 dnl
137
138 CHECK_MPICH
139
140 echo
141 echo ---------------------------------------------
142 echo testing LEX \& YACC
143 echo ---------------------------------------------
144 echo
145
146 lex_yacc_ok=no
147 AC_PROG_YACC
148 AC_PROG_LEX
149 lex_yacc_ok=yes
150
151 echo
152 echo ---------------------------------------------
153 echo testing python
154 echo ---------------------------------------------
155 echo
156
157 CHECK_PYTHON
158
159 dnl echo
160 dnl echo ---------------------------------------------
161 dnl echo testing java
162 dnl echo ---------------------------------------------
163 dnl echo
164
165 dnl CHECK_JAVA
166
167 echo
168 echo ---------------------------------------------
169 echo testing swig
170 echo ---------------------------------------------
171 echo
172
173 AM_PATH_PYTHON(2.3)
174 CHECK_SWIG
175
176 echo
177 echo ---------------------------------------------
178 echo testing threads
179 echo ---------------------------------------------
180 echo
181
182 ENABLE_PTHREADS
183
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 CHECK_CORBA
208
209 AC_SUBST_FILE(CORBA)
210 corba=make_$ORB
211 CORBA=adm_local/unix/$corba
212
213 echo
214 echo ---------------------------------------------
215 echo testing openGL
216 echo ---------------------------------------------
217 echo
218
219 CHECK_OPENGL
220
221 echo
222 echo ---------------------------------------------
223 echo testing QT
224 echo ---------------------------------------------
225 echo
226
227 CHECK_QT
228
229 dnl echo
230 dnl echo ---------------------------------------------
231 dnl echo testing msg2qm
232 dnl echo ---------------------------------------------
233 dnl echo
234
235 dnl CHECK_MSG2QM
236
237 echo
238 echo ---------------------------------------------
239 echo testing VTK
240 echo ---------------------------------------------
241 echo
242
243 CHECK_VTK
244
245 echo
246 echo ---------------------------------------------
247 echo testing HDF5
248 echo ---------------------------------------------
249 echo
250
251 CHECK_HDF5
252
253 echo
254 echo ---------------------------------------------
255 echo BOOST Library
256 echo ---------------------------------------------
257 echo
258
259 CHECK_BOOST
260
261 echo
262 echo ---------------------------------------------
263 echo Testing OpenCascade
264 echo ---------------------------------------------
265 echo
266
267 CHECK_CAS
268
269 echo
270 echo ---------------------------------------------
271 echo Testing qwt
272 echo ---------------------------------------------
273 echo
274
275 CHECK_QWT
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 VISU 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 Testing Med
316 echo ---------------------------------------------
317 echo
318
319 CHECK_MED
320
321 AM_CONDITIONAL(MED_ENABLE_MULTIPR, [test "$ENABLE_MULTIPR" = yes])
322
323 echo
324 echo ---------------------------------------------
325 echo Summary
326 echo ---------------------------------------------
327 echo
328
329 echo Configure
330 variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok Med_ok SalomeGUI_ok"
331
332 for var in $variables
333 do
334    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
335    eval echo \$$var
336 done
337
338 echo
339 echo "Default ORB   : $DEFAULT_ORB"
340 echo
341
342 dnl We don t need to say when we re entering directories if we re using
343 dnl GNU make becuase make does it for us.
344 if test "X$GMAKE" = "Xyes"; then
345    AC_SUBST(SETX) SETX=":"
346 else
347    AC_SUBST(SETX) SETX="set -x"
348 fi
349
350 echo
351 echo ---------------------------------------------
352 echo generating Makefiles and configure files
353 echo ---------------------------------------------
354 echo
355
356 AC_OUTPUT_COMMANDS([ \
357   chmod +x ./bin/*; \
358 ])
359
360 # This list is initiated using autoscan and must be updated manually
361 # when adding a new file <filename>.in to manage. When you execute
362 # autoscan, the Makefile list is generated in the output file configure.scan.
363 # This could be helpfull to update de configuration.
364 AC_OUTPUT([ \
365         salome_adm/unix/SALOMEconfig.h \
366         Makefile \
367         VISU_version.h \
368         adm_local/Makefile \
369         adm_local/unix/Makefile \
370         adm_local/unix/config_files/Makefile \
371         bin/Makefile \
372         bin/VERSION \
373         doc/Makefile \
374         doc/salome/Makefile \
375         doc/salome/gui/Makefile \
376         doc/salome/gui/VISU/Makefile \
377         doc/salome/gui/VISU/doxyfile \
378         doc/salome/gui/VISU/doxyfile_idl \
379         doc/salome/tui/Makefile \
380         doc/salome/tui/doxyfile \
381         idl/Makefile \
382         resources/VISUCatalog.xml \
383         resources/Makefile \
384         src/Makefile \
385         src/CONVERTOR/Makefile \
386         src/PIPELINE/Makefile \
387         src/OBJECT/Makefile \
388         src/VVTK/Makefile \
389         src/GUITOOLS/Makefile \
390         src/VISU_I/Makefile \
391         src/VISUGUI/Makefile \
392         src/VISU_SWIG/Makefile \
393         src/ENGINE/Makefile
394 ])