Salome HOME
Problem: Clipping Plane is not displayed.
[modules/visu.git] / configure.ac
1 # Copyright (C) 2007-2012  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], [6.6.0], [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 VERSION_DEV=1
35 AC_SUBST(VERSION_DEV)
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 dnl CHECK_MPICH
140
141 echo
142 echo ---------------------------------------------
143 echo testing MPI
144 echo ---------------------------------------------
145 echo
146
147 CHECK_MPI
148
149 echo
150 echo ---------------------------------------------
151 echo testing LEX \& YACC
152 echo ---------------------------------------------
153 echo
154
155 lex_yacc_ok=no
156 AC_PROG_YACC
157 AC_PROG_LEX
158 lex_yacc_ok=yes
159
160 echo
161 echo ---------------------------------------------
162 echo testing python
163 echo ---------------------------------------------
164 echo
165
166 CHECK_PYTHON
167
168 dnl echo
169 dnl echo ---------------------------------------------
170 dnl echo testing java
171 dnl echo ---------------------------------------------
172 dnl echo
173
174 dnl CHECK_JAVA
175
176 echo
177 echo ---------------------------------------------
178 echo testing swig
179 echo ---------------------------------------------
180 echo
181
182 AM_PATH_PYTHON(2.3)
183 CHECK_SWIG
184
185 echo
186 echo ---------------------------------------------
187 echo testing threads
188 echo ---------------------------------------------
189 echo
190
191 ENABLE_PTHREADS
192
193 echo
194 echo ---------------------------------------------
195 echo testing omniORB
196 echo ---------------------------------------------
197 echo
198
199 CHECK_OMNIORB
200
201 dnl echo
202 dnl echo ---------------------------------------------
203 dnl echo testing mico
204 dnl echo ---------------------------------------------
205 dnl echo
206
207 dnl CHECK_MICO
208
209 echo
210 echo ---------------------------------------------
211 echo default ORB : omniORB
212 echo ---------------------------------------------
213 echo
214
215 DEFAULT_ORB=omniORB
216 CHECK_CORBA
217
218 AC_SUBST_FILE(CORBA)
219 corba=make_$ORB
220 CORBA=adm_local/unix/$corba
221
222 echo
223 echo ---------------------------------------------
224 echo testing openGL
225 echo ---------------------------------------------
226 echo
227
228 CHECK_OPENGL
229
230 echo
231 echo ---------------------------------------------
232 echo testing QT
233 echo ---------------------------------------------
234 echo
235
236 CHECK_QT
237
238 dnl echo
239 dnl echo ---------------------------------------------
240 dnl echo testing msg2qm
241 dnl echo ---------------------------------------------
242 dnl echo
243
244 dnl CHECK_MSG2QM
245
246 echo
247 echo ---------------------------------------------
248 echo testing VTK
249 echo ---------------------------------------------
250 echo
251
252 CHECK_VTK
253
254 echo
255 echo ---------------------------------------------
256 echo testing HDF5
257 echo ---------------------------------------------
258 echo
259
260 CHECK_HDF5
261
262 echo
263 echo ---------------------------------------------
264 echo BOOST Library
265 echo ---------------------------------------------
266 echo
267
268 CHECK_BOOST
269
270 echo
271 echo ---------------------------------------------
272 echo Testing OpenCascade
273 echo ---------------------------------------------
274 echo
275
276 CHECK_CAS
277
278 echo
279 echo ---------------------------------------------
280 echo Testing qwt
281 echo ---------------------------------------------
282 echo
283
284 CHECK_QWT
285
286 echo
287 echo ---------------------------------------------
288 echo Testing html generators
289 echo ---------------------------------------------
290 echo
291
292 CHECK_HTML_GENERATORS
293
294 echo
295 echo ---------------------------------------------
296 echo Testing GUI
297 echo ---------------------------------------------
298 echo
299
300 CHECK_SALOME_GUI
301
302 echo
303 echo ---------------------------------------------
304 echo Testing full GUI
305 echo ---------------------------------------------
306 echo
307
308 CHECK_CORBA_IN_GUI
309 if test "x${CORBA_IN_GUI}" != "xyes"; then
310   echo "failed : For configure VISU module necessary full GUI !"
311   exit
312 fi
313
314 echo
315 echo ---------------------------------------------
316 echo Testing Kernel
317 echo ---------------------------------------------
318 echo
319
320 CHECK_KERNEL
321
322 echo
323 echo ---------------------------------------------
324 echo Testing Med
325 echo ---------------------------------------------
326 echo
327
328 CHECK_MED
329
330 AM_CONDITIONAL(MED_ENABLE_MULTIPR, [test "$ENABLE_MULTIPR" = yes])
331
332 echo
333 echo ---------------------------------------------
334 echo Summary
335 echo ---------------------------------------------
336 echo
337
338 echo Configure
339 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"
340
341 for var in $variables
342 do
343    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
344    eval echo \$$var
345 done
346
347 echo
348 echo "Default ORB   : $DEFAULT_ORB"
349 echo
350
351 dnl We don t need to say when we re entering directories if we re using
352 dnl GNU make becuase make does it for us.
353 if test "X$GMAKE" = "Xyes"; then
354    AC_SUBST(SETX) SETX=":"
355 else
356    AC_SUBST(SETX) SETX="set -x"
357 fi
358
359 echo
360 echo ---------------------------------------------
361 echo generating Makefiles and configure files
362 echo ---------------------------------------------
363 echo
364
365 AC_OUTPUT_COMMANDS([ \
366   chmod +x ./bin/*; \
367 ])
368
369 AC_HACK_LIBTOOL
370 AC_CONFIG_COMMANDS([hack_libtool],[
371 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
372   $(pwd)/hack_libtool \1 \"\$[@]\" \n\
373 }\n\
374 CC=\"hack_libtool\"%g" libtool
375 sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool
376 sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool
377 sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1  if ! test -d \$sss; then continue; fi\n\1  ssss=\$(cd \$sss; pwd)\n\1  if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1    case \$ssss in\n\1      /usr/lib | /usr/lib64 ) ;;\n\1      * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1    esac\n\1  fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool
378 ],[])
379
380 # This list is initiated using autoscan and must be updated manually
381 # when adding a new file <filename>.in to manage. When you execute
382 # autoscan, the Makefile list is generated in the output file configure.scan.
383 # This could be helpfull to update de configuration.
384 AC_OUTPUT([ \
385         Makefile \
386         VISU_version.h \
387         adm_local/Makefile \
388         adm_local/cmake_files/Makefile \
389         adm_local/unix/Makefile \
390         adm_local/unix/config_files/Makefile \
391         bin/Makefile \
392         bin/VERSION \
393         doc/Makefile \
394         doc/salome/Makefile \
395         doc/salome/gui/Makefile \
396         doc/salome/gui/VISU/Makefile \
397         doc/salome/gui/VISU/doxyfile \
398         doc/salome/gui/VISU/doxyfile_idl \
399         doc/salome/gui/VISU/static/header.html \
400         doc/salome/gui/VISU/static/header_py.html \
401         doc/salome/tui/Makefile \
402         doc/salome/tui/doxyfile \
403         doc/salome/tui/static/header.html \
404         idl/Makefile \
405         resources/VISUCatalog.xml \
406         resources/SalomeApp.xml \
407         resources/Makefile \
408         src/Makefile \
409         src/CONVERTOR/Makefile \
410         src/PIPELINE/Makefile \
411         src/OBJECT/Makefile \
412         src/VISU_I/Makefile \
413         src/VISUGUI/Makefile \
414         src/VISU_SWIG/Makefile \
415         src/ENGINE/Makefile
416 ])