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