]> SALOME platform Git repositories - plugins/netgenplugin.git/blob - configure.ac
Salome HOME
45224949b02b0af727d49259793ee03c61fad280
[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.2], [webmaster.salome@opencascade.com], [SalomeNETGENPLUGIN])
35 AC_CONFIG_AUX_DIR(adm_local/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 AC_LOCAL_INSTALL
84 dnl 
85 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
86
87 AC_ENABLE_DEBUG(yes)
88 AC_DISABLE_PRODUCTION
89
90 echo ---------------------------------------------
91 echo testing libtool
92 echo ---------------------------------------------
93
94 dnl first, we set static to no!
95 dnl if we want it, use --enable-static
96 AC_ENABLE_STATIC(no)
97
98 AC_LIBTOOL_DLOPEN
99 AC_PROG_LIBTOOL
100
101 dnl Fix up the INSTALL macro if it s a relative path. We want the
102 dnl full-path to the binary instead.
103 case "$INSTALL" in
104    *install-sh*)
105       INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
106       ;;
107 esac
108
109 echo
110 echo ---------------------------------------------
111 echo testing C/C++
112 echo ---------------------------------------------
113 echo
114
115 cc_ok=no
116 dnl inutil car libtool
117 dnl AC_PROG_CC
118 AC_PROG_CXX
119 AC_DEPEND_FLAG
120 # AC_CC_WARNINGS([ansi])
121 cc_ok=yes
122
123 echo
124 echo ---------------------------------------------
125 echo testing Fortran
126 echo ---------------------------------------------
127 echo
128
129 fortran_ok=no
130 AC_PROG_F77
131 AC_F77_LIBRARY_LDFLAGS
132 AC_PROG_FC
133 AC_FC_LIBRARY_LDFLAGS
134 if test "X$FC" != "X" ; then
135    fortran_ok=yes
136 fi
137
138 dnl Library libdl :
139 AC_CHECK_LIB(dl,dlopen)
140
141 dnl add library libm :
142 AC_CHECK_LIB(m,ceil)
143
144 dnl 
145 dnl Well we use sstream which is not in gcc pre-2.95.3
146 dnl We must test if it exists. If not, add it in include !
147 dnl
148
149 AC_CXX_HAVE_SSTREAM
150
151 echo
152 echo ---------------------------------------------
153 echo BOOST Library
154 echo ---------------------------------------------
155 echo
156
157 CHECK_BOOST
158
159 dnl
160 dnl ---------------------------------------------
161 dnl testing MPICH
162 dnl ---------------------------------------------
163 dnl
164
165 CHECK_MPICH
166
167 echo
168 echo ---------------------------------------------
169 echo testing LEX \& YACC
170 echo ---------------------------------------------
171 echo
172
173 lex_yacc_ok=no
174 AC_PROG_YACC
175 AC_PROG_LEX
176 lex_yacc_ok=yes
177
178 echo
179 echo ---------------------------------------------
180 echo testing python
181 echo ---------------------------------------------
182 echo
183
184 CHECK_PYTHON
185
186 AM_PATH_PYTHON(2.3)
187
188 dnl echo
189 dnl echo ---------------------------------------------
190 dnl echo testing java
191 dnl echo ---------------------------------------------
192 dnl echo
193
194 dnl CHECK_JAVA
195
196 echo
197 echo ---------------------------------------------
198 echo testing swig
199 echo ---------------------------------------------
200 echo
201
202 CHECK_SWIG
203
204 echo
205 echo ---------------------------------------------
206 echo testing threads
207 echo ---------------------------------------------
208 echo
209
210 ENABLE_PTHREADS
211
212 echo
213 echo ---------------------------------------------
214 echo testing omniORB
215 echo ---------------------------------------------
216 echo
217
218 CHECK_OMNIORB
219
220 dnl echo
221 dnl echo ---------------------------------------------
222 dnl echo testing mico
223 dnl echo ---------------------------------------------
224 dnl echo
225
226 dnl CHECK_MICO
227
228 echo
229 echo ---------------------------------------------
230 echo default ORB : omniORB
231 echo ---------------------------------------------
232 echo
233
234 DEFAULT_ORB=omniORB
235 CHECK_CORBA
236
237 AC_SUBST_FILE(CORBA)
238 corba=make_$ORB
239 CORBA=adm_local/unix/$corba
240
241 echo
242 echo ---------------------------------------------
243 echo Testing GUI
244 echo ---------------------------------------------
245 echo
246
247 CHECK_GUI_MODULE
248
249 gui_ok=no
250 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then 
251   gui_ok=yes
252 fi
253
254 AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
255
256 if test "${SalomeGUI_need}" == "yes"; then
257   if test "${FullGUI_ok}" != "yes"; then
258     AC_MSG_WARN(For configure NETGENPLUGIN module necessary full GUI!)
259   fi
260 elif test "${SalomeGUI_need}" == "auto"; then
261   if test "${FullGUI_ok}" != "yes"; then
262     AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
263   fi
264 elif test "${SalomeGUI_need}" == "no"; then
265   echo Build without GUI option has been chosen
266 fi
267
268 if test "${gui_ok}" = "yes"; then
269     echo
270     echo ---------------------------------------------
271     echo testing openGL
272     echo ---------------------------------------------
273     echo
274
275     CHECK_OPENGL
276
277     echo
278     echo ---------------------------------------------
279     echo testing QT
280     echo ---------------------------------------------
281     echo
282
283     CHECK_QT
284
285     echo
286     echo ---------------------------------------------
287     echo testing VTK
288     echo ---------------------------------------------
289     echo
290
291     CHECK_VTK
292 fi
293
294 echo
295 echo ---------------------------------------------
296 echo testing HDF5
297 echo ---------------------------------------------
298 echo
299
300 CHECK_HDF5
301
302 echo
303 echo ---------------------------------------------
304 echo Testing OpenCascade
305 echo ---------------------------------------------
306 echo
307
308 CHECK_CAS
309
310 echo
311 echo ---------------------------------------------
312 echo Testing html generators
313 echo ---------------------------------------------
314 echo
315
316 CHECK_HTML_GENERATORS
317
318 echo
319 echo ---------------------------------------------
320 echo Testing Kernel
321 echo ---------------------------------------------
322 echo
323
324 CHECK_KERNEL
325
326 echo
327 echo ---------------------------------------------
328 echo Testing Geom
329 echo ---------------------------------------------
330 echo
331
332 CHECK_GEOM
333
334  echo
335  echo ---------------------------------------------
336  echo Testing Med
337  echo ---------------------------------------------
338  echo
339  
340 CHECK_MED
341
342 echo
343 echo ---------------------------------------------
344 echo Testing Netgen
345 echo ---------------------------------------------
346 echo
347
348 CHECK_NETGEN
349  
350 echo
351 echo ---------------------------------------------
352 echo Testing SMesh
353 echo ---------------------------------------------
354 echo
355
356 CHECK_SMESH
357
358 echo
359 echo ---------------------------------------------
360 echo Summary
361 echo ---------------------------------------------
362 echo
363
364 #AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
365
366 echo Configure
367
368 if test "${gui_ok}" = "yes"; then
369   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"
370 elif test "${SalomeGUI_need}" != "no"; then
371   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"
372 else
373   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"
374 fi
375
376 for var in $variables
377 do
378    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
379    eval echo \$$var
380 done
381
382 echo
383 echo "Default ORB   : $DEFAULT_ORB"
384 echo
385
386 dnl We don t need to say when we re entering directories if we re using
387 dnl GNU make becuase make does it for us.
388 if test "X$GMAKE" = "Xyes"; then
389    AC_SUBST(SETX) SETX=":"
390 else
391    AC_SUBST(SETX) SETX="set -x"
392 fi
393
394 dnl copy shells and utilities contained in the bin directory
395 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
396 dnl directory
397
398 echo
399 echo ---------------------------------------------
400 echo generating Makefiles and configure files
401 echo ---------------------------------------------
402 echo
403
404 #AC_OUTPUT_COMMANDS([ \
405 #  chmod +x ./bin/*; \
406 #  chmod +x ./bin/salome/*;
407 #])
408
409 # This list is initiated using autoscan and must be updated manually
410 # when adding a new file <filename>.in to manage. When you execute
411 # autoscan, the Makefile list is generated in the output file configure.scan.
412 # This could be helpfull to update de configuration.
413 AC_OUTPUT([ \
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 ])