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