]> SALOME platform Git repositories - modules/visu.git/blob - configure.ac
Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / configure.ac
1 #  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, 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
20 # Author : Marc Tajchman (CEA)
21 # Date : 28/06/2001
22 # Modified by : Patrick GOLDBRONN (CEA)
23 # Modified by : Marc Tajchman (CEA)
24 # Modified by : Mikhail Ponikarov (OCN)
25 #
26 AC_INIT([Salome2 Project VISU module], [5.1.4], [webmaster.salome@opencascade.com], [SalomeVISU])
27 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
28 AC_CANONICAL_HOST
29 AC_CANONICAL_TARGET
30 AM_INIT_AUTOMAKE([-Wno-portability])
31
32 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
33 AC_SUBST(XVERSION)
34
35 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
36 MODULE_NAME=visu
37 AC_SUBST(MODULE_NAME)
38
39 dnl
40 dnl Initialize source and build root directories
41 dnl
42
43 ROOT_BUILDDIR=`pwd`
44 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
45 cd $ROOT_SRCDIR
46 ROOT_SRCDIR=`pwd`
47 cd $ROOT_BUILDDIR
48
49 AC_SUBST(ROOT_SRCDIR)
50 AC_SUBST(ROOT_BUILDDIR)
51
52 echo
53 echo Source root directory : $ROOT_SRCDIR
54 echo Build  root directory : $ROOT_BUILDDIR
55 echo
56 echo
57
58 if test -z "$AR"; then
59    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
60 fi
61 AC_SUBST(AR)
62
63 dnl Export the AR macro so that it will be placed in the libtool file
64 dnl correctly.
65 export AR
66
67 echo
68 echo ---------------------------------------------
69 echo testing make
70 echo ---------------------------------------------
71 echo
72
73 AC_PROG_MAKE_SET
74 AC_PROG_INSTALL
75 AC_LOCAL_INSTALL
76 dnl 
77 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
78
79 AC_ENABLE_DEBUG(yes)
80 AC_DISABLE_PRODUCTION
81
82 echo ---------------------------------------------
83 echo testing libtool
84 echo ---------------------------------------------
85
86 dnl first, we set static to no!
87 dnl if we want it, use --enable-static
88 AC_ENABLE_STATIC(no)
89
90 AC_LIBTOOL_DLOPEN
91 AC_PROG_LIBTOOL
92
93 dnl Fix up the INSTALL macro if it s a relative path. We want the
94 dnl full-path to the binary instead.
95 case "$INSTALL" in
96    *install-sh*)
97       INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
98       ;;
99 esac
100
101 echo
102 echo ---------------------------------------------
103 echo testing C/C++
104 echo ---------------------------------------------
105 echo
106
107 cc_ok=no
108 dnl inutil car libtool
109 dnl AC_PROG_CC
110 AC_PROG_CXX
111 AC_DEPEND_FLAG
112 # AC_CC_WARNINGS([ansi])
113 cc_ok=yes
114
115 dnl Library libdl :
116 AC_CHECK_LIB(dl,dlopen)
117
118 dnl add library libm :
119 AC_CHECK_LIB(m,ceil)
120
121 dnl 
122 dnl Well we use sstream which is not in gcc pre-2.95.3
123 dnl We must test if it exists. If not, add it in include !
124 dnl
125
126 AC_CXX_USE_STD_IOSTREAM
127 AC_CXX_HAVE_SSTREAM
128
129
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 echo
184 echo ---------------------------------------------
185 echo testing omniORB
186 echo ---------------------------------------------
187 echo
188
189 CHECK_OMNIORB
190
191 dnl echo
192 dnl echo ---------------------------------------------
193 dnl echo testing mico
194 dnl echo ---------------------------------------------
195 dnl echo
196
197 dnl CHECK_MICO
198
199 echo
200 echo ---------------------------------------------
201 echo default ORB : omniORB
202 echo ---------------------------------------------
203 echo
204
205 DEFAULT_ORB=omniORB
206 CHECK_CORBA
207
208 AC_SUBST_FILE(CORBA)
209 corba=make_$ORB
210 CORBA=adm_local/unix/$corba
211
212 echo
213 echo ---------------------------------------------
214 echo testing openGL
215 echo ---------------------------------------------
216 echo
217
218 CHECK_OPENGL
219
220 echo
221 echo ---------------------------------------------
222 echo testing QT
223 echo ---------------------------------------------
224 echo
225
226 CHECK_QT
227
228 dnl echo
229 dnl echo ---------------------------------------------
230 dnl echo testing msg2qm
231 dnl echo ---------------------------------------------
232 dnl echo
233
234 dnl CHECK_MSG2QM
235
236 echo
237 echo ---------------------------------------------
238 echo testing VTK
239 echo ---------------------------------------------
240 echo
241
242 CHECK_VTK
243
244 echo
245 echo ---------------------------------------------
246 echo testing HDF5
247 echo ---------------------------------------------
248 echo
249
250 CHECK_HDF5
251
252 echo
253 echo ---------------------------------------------
254 echo BOOST Library
255 echo ---------------------------------------------
256 echo
257
258 CHECK_BOOST
259
260 echo
261 echo ---------------------------------------------
262 echo Testing OpenCascade
263 echo ---------------------------------------------
264 echo
265
266 CHECK_CAS
267
268 echo
269 echo ---------------------------------------------
270 echo Testing qwt
271 echo ---------------------------------------------
272 echo
273
274 CHECK_QWT
275
276 echo
277 echo ---------------------------------------------
278 echo Testing html generators
279 echo ---------------------------------------------
280 echo
281
282 CHECK_HTML_GENERATORS
283
284 echo
285 echo ---------------------------------------------
286 echo Testing GUI
287 echo ---------------------------------------------
288 echo
289
290 CHECK_SALOME_GUI
291
292 echo
293 echo ---------------------------------------------
294 echo Testing full GUI
295 echo ---------------------------------------------
296 echo
297
298 CHECK_CORBA_IN_GUI
299 if test "x${CORBA_IN_GUI}" != "xyes"; then
300   echo "failed : For configure VISU module necessary full GUI !"
301   exit
302 fi
303
304 echo
305 echo ---------------------------------------------
306 echo Testing Kernel
307 echo ---------------------------------------------
308 echo
309
310 CHECK_KERNEL
311
312 echo
313 echo ---------------------------------------------
314 echo Testing Med
315 echo ---------------------------------------------
316 echo
317
318 CHECK_MED
319
320 AM_CONDITIONAL(MED_ENABLE_MULTIPR, [test "$ENABLE_MULTIPR" = yes])
321
322 echo
323 echo ---------------------------------------------
324 echo Summary
325 echo ---------------------------------------------
326 echo
327
328 echo Configure
329 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"
330
331 for var in $variables
332 do
333    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
334    eval echo \$$var
335 done
336
337 echo
338 echo "Default ORB   : $DEFAULT_ORB"
339 echo
340
341 dnl We don t need to say when we re entering directories if we re using
342 dnl GNU make becuase make does it for us.
343 if test "X$GMAKE" = "Xyes"; then
344    AC_SUBST(SETX) SETX=":"
345 else
346    AC_SUBST(SETX) SETX="set -x"
347 fi
348
349 echo
350 echo ---------------------------------------------
351 echo generating Makefiles and configure files
352 echo ---------------------------------------------
353 echo
354
355 AC_OUTPUT_COMMANDS([ \
356   chmod +x ./bin/*; \
357 ])
358
359 # This list is initiated using autoscan and must be updated manually
360 # when adding a new file <filename>.in to manage. When you execute
361 # autoscan, the Makefile list is generated in the output file configure.scan.
362 # This could be helpfull to update de configuration.
363 AC_OUTPUT([ \
364         Makefile \
365         VISU_version.h \
366         adm_local/Makefile \
367         adm_local/cmake_files/Makefile \
368         adm_local/unix/Makefile \
369         adm_local/unix/config_files/Makefile \
370         bin/Makefile \
371         bin/VERSION \
372         doc/Makefile \
373         doc/salome/Makefile \
374         doc/salome/gui/Makefile \
375         doc/salome/gui/VISU/Makefile \
376         doc/salome/gui/VISU/doxyfile \
377         doc/salome/gui/VISU/doxyfile_idl \
378         doc/salome/gui/VISU/static/header.html \
379         doc/salome/tui/Makefile \
380         doc/salome/tui/doxyfile \
381         doc/salome/tui/static/header.html \
382         idl/Makefile \
383         resources/VISUCatalog.xml \
384         resources/Makefile \
385         src/Makefile \
386         src/CONVERTOR/Makefile \
387         src/PIPELINE/Makefile \
388         src/OBJECT/Makefile \
389         src/VISU_I/Makefile \
390         src/VISUGUI/Makefile \
391         src/VISU_SWIG/Makefile \
392         src/ENGINE/Makefile
393 ])