Salome HOME
Improve help system
[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.3], [webmaster.salome@opencascade.com], [SalomeVISU])
29 AC_CONFIG_AUX_DIR(adm_local/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 AC_LOCAL_INSTALL
78 dnl 
79 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
80
81 AC_ENABLE_DEBUG(yes)
82 AC_DISABLE_PRODUCTION
83
84 echo ---------------------------------------------
85 echo testing libtool
86 echo ---------------------------------------------
87
88 dnl first, we set static to no!
89 dnl if we want it, use --enable-static
90 AC_ENABLE_STATIC(no)
91
92 AC_LIBTOOL_DLOPEN
93 AC_PROG_LIBTOOL
94
95 dnl Fix up the INSTALL macro if it s a relative path. We want the
96 dnl full-path to the binary instead.
97 case "$INSTALL" in
98    *install-sh*)
99       INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
100       ;;
101 esac
102
103 echo
104 echo ---------------------------------------------
105 echo testing C/C++
106 echo ---------------------------------------------
107 echo
108
109 cc_ok=no
110 dnl inutil car libtool
111 dnl AC_PROG_CC
112 AC_PROG_CXX
113 AC_DEPEND_FLAG
114 # AC_CC_WARNINGS([ansi])
115 cc_ok=yes
116
117 dnl Library libdl :
118 AC_CHECK_LIB(dl,dlopen)
119
120 dnl add library libm :
121 AC_CHECK_LIB(m,ceil)
122
123 dnl 
124 dnl Well we use sstream which is not in gcc pre-2.95.3
125 dnl We must test if it exists. If not, add it in include !
126 dnl
127
128 AC_CXX_USE_STD_IOSTREAM
129 AC_CXX_HAVE_SSTREAM
130
131
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 dnl echo
161 dnl echo ---------------------------------------------
162 dnl echo testing java
163 dnl echo ---------------------------------------------
164 dnl echo
165
166 dnl CHECK_JAVA
167
168 echo
169 echo ---------------------------------------------
170 echo testing swig
171 echo ---------------------------------------------
172 echo
173
174 AM_PATH_PYTHON(2.3)
175 CHECK_SWIG
176
177 echo
178 echo ---------------------------------------------
179 echo testing threads
180 echo ---------------------------------------------
181 echo
182
183 ENABLE_PTHREADS
184
185 echo
186 echo ---------------------------------------------
187 echo testing omniORB
188 echo ---------------------------------------------
189 echo
190
191 CHECK_OMNIORB
192
193 dnl echo
194 dnl echo ---------------------------------------------
195 dnl echo testing mico
196 dnl echo ---------------------------------------------
197 dnl echo
198
199 dnl CHECK_MICO
200
201 echo
202 echo ---------------------------------------------
203 echo default ORB : omniORB
204 echo ---------------------------------------------
205 echo
206
207 DEFAULT_ORB=omniORB
208 CHECK_CORBA
209
210 AC_SUBST_FILE(CORBA)
211 corba=make_$ORB
212 CORBA=adm_local/unix/$corba
213
214 echo
215 echo ---------------------------------------------
216 echo testing openGL
217 echo ---------------------------------------------
218 echo
219
220 CHECK_OPENGL
221
222 echo
223 echo ---------------------------------------------
224 echo testing QT
225 echo ---------------------------------------------
226 echo
227
228 CHECK_QT
229
230 dnl echo
231 dnl echo ---------------------------------------------
232 dnl echo testing msg2qm
233 dnl echo ---------------------------------------------
234 dnl echo
235
236 dnl CHECK_MSG2QM
237
238 echo
239 echo ---------------------------------------------
240 echo testing VTK
241 echo ---------------------------------------------
242 echo
243
244 CHECK_VTK
245
246 echo
247 echo ---------------------------------------------
248 echo testing HDF5
249 echo ---------------------------------------------
250 echo
251
252 CHECK_HDF5
253
254 echo
255 echo ---------------------------------------------
256 echo BOOST Library
257 echo ---------------------------------------------
258 echo
259
260 CHECK_BOOST
261
262 echo
263 echo ---------------------------------------------
264 echo Testing OpenCascade
265 echo ---------------------------------------------
266 echo
267
268 CHECK_CAS
269
270 echo
271 echo ---------------------------------------------
272 echo Testing qwt
273 echo ---------------------------------------------
274 echo
275
276 CHECK_QWT
277
278 echo
279 echo ---------------------------------------------
280 echo Testing html generators
281 echo ---------------------------------------------
282 echo
283
284 CHECK_HTML_GENERATORS
285
286 echo
287 echo ---------------------------------------------
288 echo Testing GUI
289 echo ---------------------------------------------
290 echo
291
292 CHECK_SALOME_GUI
293
294 echo
295 echo ---------------------------------------------
296 echo Testing full GUI
297 echo ---------------------------------------------
298 echo
299
300 CHECK_CORBA_IN_GUI
301 if test "x${CORBA_IN_GUI}" != "xyes"; then
302   echo "failed : For configure VISU module necessary full GUI !"
303   exit
304 fi
305
306 echo
307 echo ---------------------------------------------
308 echo Testing Kernel
309 echo ---------------------------------------------
310 echo
311
312 CHECK_KERNEL
313
314 echo
315 echo ---------------------------------------------
316 echo Testing Med
317 echo ---------------------------------------------
318 echo
319
320 CHECK_MED
321
322 AM_CONDITIONAL(MED_ENABLE_MULTIPR, [test "$ENABLE_MULTIPR" = yes])
323
324 echo
325 echo ---------------------------------------------
326 echo Summary
327 echo ---------------------------------------------
328 echo
329
330 echo Configure
331 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"
332
333 for var in $variables
334 do
335    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
336    eval echo \$$var
337 done
338
339 echo
340 echo "Default ORB   : $DEFAULT_ORB"
341 echo
342
343 dnl We don t need to say when we re entering directories if we re using
344 dnl GNU make becuase make does it for us.
345 if test "X$GMAKE" = "Xyes"; then
346    AC_SUBST(SETX) SETX=":"
347 else
348    AC_SUBST(SETX) SETX="set -x"
349 fi
350
351 echo
352 echo ---------------------------------------------
353 echo generating Makefiles and configure files
354 echo ---------------------------------------------
355 echo
356
357 AC_OUTPUT_COMMANDS([ \
358   chmod +x ./bin/*; \
359 ])
360
361 # This list is initiated using autoscan and must be updated manually
362 # when adding a new file <filename>.in to manage. When you execute
363 # autoscan, the Makefile list is generated in the output file configure.scan.
364 # This could be helpfull to update de configuration.
365 AC_OUTPUT([ \
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 ])