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