Salome HOME
Changing version to 5.1.2
[modules/geom.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 # Author : Marc Tajchman (CEA)
23 # Date : 28/06/2001
24 # Modified by : Patrick GOLDBRONN (CEA)
25 # Modified by : Marc Tajchman (CEA)
26 # Modified by : Alexander BORODIN (OCN) - autotools usage
27 # Created from configure.in.base
28 #
29 AC_INIT([Salome2 Project GEOM module], [5.1.2], [webmaster.salome@opencascade.com], [SalomeGEOM])
30 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
31 AC_CANONICAL_HOST
32 AC_CANONICAL_TARGET
33 AM_INIT_AUTOMAKE([tar-pax -Wno-portability])
34
35
36 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
37 AC_SUBST(XVERSION)
38
39 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
40 MODULE_NAME=geom
41 AC_SUBST(MODULE_NAME)
42
43 echo
44 echo ---------------------------------------------
45 echo Initialize source and build root directories
46 echo ---------------------------------------------
47 echo
48
49 dnl
50 dnl Initialize source and build root directories
51 dnl
52
53 ROOT_BUILDDIR=`pwd`
54 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
55 cd $ROOT_SRCDIR
56 ROOT_SRCDIR=`pwd`
57 cd $ROOT_BUILDDIR
58
59 AC_SUBST(ROOT_SRCDIR)
60 AC_SUBST(ROOT_BUILDDIR)
61
62 echo
63 echo Source root directory : $ROOT_SRCDIR
64 echo Build  root directory : $ROOT_BUILDDIR
65 echo
66 echo
67
68 if test -z "$AR"; then
69    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
70 fi
71 AC_SUBST(AR)
72
73 dnl Export the AR macro so that it will be placed in the libtool file
74 dnl correctly.
75 export AR
76
77 echo
78 echo ---------------------------------------------
79 echo testing make
80 echo ---------------------------------------------
81 echo
82
83 AC_PROG_MAKE_SET
84 AC_PROG_INSTALL
85 dnl
86 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
87
88 echo
89 echo ---------------------------------------------
90 echo Configuring production
91 echo ---------------------------------------------
92 echo
93 AC_ENABLE_DEBUG(yes)
94 AC_DISABLE_PRODUCTION
95
96 echo ---------------------------------------------
97 echo testing libtool
98 echo ---------------------------------------------
99
100 dnl first, we set static to no!
101 dnl if we want it, use --enable-static
102 AC_ENABLE_STATIC(no)
103
104 AC_LIBTOOL_DLOPEN
105 AC_PROG_LIBTOOL
106
107 dnl Fix up the INSTALL macro if it s a relative path. We want the
108 dnl full-path to the binary instead.
109 case "$INSTALL" in
110    *install-sh*)
111       INSTALL='\${ROOT_BUILDDIR}'/salome_adm/unix/config_files/install-sh
112       ;;
113 esac
114
115 echo
116 echo ---------------------------------------------
117 echo testing C/C++
118 echo ---------------------------------------------
119 echo
120
121 cc_ok=no
122 dnl inutil car libtool
123 dnl AC_PROG_CC
124 AC_PROG_CXX
125 AC_CXX_WARNINGS
126 AC_CXX_TEMPLATE_OPTIONS
127 AC_DEPEND_FLAG
128 # AC_CC_WARNINGS([ansi])
129 cc_ok=yes
130
131 dnl Library libdl :
132 AC_CHECK_LIB(dl,dlopen)
133
134 dnl add library libm :
135 AC_CHECK_LIB(m,ceil)
136
137 dnl
138 dnl Well we use sstream which is not in gcc pre-2.95.3
139 dnl We must test if it exists. If not, add it in include !
140 dnl
141
142 AC_CXX_HAVE_SSTREAM
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 dnl echo
172 dnl echo ---------------------------------------------
173 dnl echo testing java
174 dnl echo ---------------------------------------------
175 dnl echo
176
177 dnl CHECK_JAVA
178
179 echo
180 echo ---------------------------------------------
181 echo testing swig
182 echo ---------------------------------------------
183 echo
184
185 AM_PATH_PYTHON(2.3)
186 CHECK_SWIG
187
188 echo
189 echo ---------------------------------------------
190 echo testing threads
191 echo ---------------------------------------------
192 echo
193
194 ENABLE_PTHREADS
195
196 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
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
221 echo
222 echo ---------------------------------------------
223 echo testing Corba
224 echo ---------------------------------------------
225 echo
226
227 CHECK_CORBA
228
229 AC_SUBST_FILE(CORBA)
230 corba=make_$ORB
231 CORBA=adm_local/unix/$corba
232
233 fi
234
235 echo
236 echo ---------------------------------------------
237 echo Testing GUI
238 echo ---------------------------------------------
239 echo
240
241 CHECK_GUI_MODULE
242
243 gui_ok=no
244 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then 
245   gui_ok=yes
246 fi
247
248 AM_CONDITIONAL(GEOM_ENABLE_GUI, [test "${gui_ok}" = "yes"])
249
250 if test "${SalomeGUI_need}" == "yes"; then
251   if test "${FullGUI_ok}" != "yes"; then
252     AC_MSG_WARN(For configure GEOM module necessary full GUI!)
253   fi
254 elif test "${SalomeGUI_need}" == "auto"; then
255   if test "${FullGUI_ok}" != "yes"; then
256     AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
257   fi
258 elif test "${SalomeGUI_need}" == "no"; then
259   echo Build without GUI option has been chosen
260 fi
261
262 if test "${gui_ok}" = "yes"; then
263     echo
264     echo ---------------------------------------------
265     echo testing openGL
266     echo ---------------------------------------------
267     echo
268
269     CHECK_OPENGL
270
271     echo
272     echo ---------------------------------------------
273     echo testing QT
274     echo ---------------------------------------------
275     echo
276
277     CHECK_QT
278
279     echo
280     echo ---------------------------------------------
281     echo testing VTK
282     echo ---------------------------------------------
283     echo
284
285     CHECK_VTK
286 fi
287
288 echo
289 echo ---------------------------------------------
290 echo testing HDF5
291 echo ---------------------------------------------
292 echo
293
294 CHECK_HDF5
295
296 echo
297 echo ---------------------------------------------
298 echo BOOST Library
299 echo ---------------------------------------------
300 echo
301
302 CHECK_BOOST
303
304 echo
305 echo ---------------------------------------------
306 echo Testing OpenCascade
307 echo ---------------------------------------------
308 echo
309
310 CHECK_CAS
311
312 echo
313 echo ---------------------------------------------
314 echo Testing html generators
315 echo ---------------------------------------------
316 echo
317
318 CHECK_HTML_GENERATORS
319
320 echo
321 echo ---------------------------------------------
322 echo Testing Kernel
323 echo ---------------------------------------------
324 echo
325
326 CHECK_KERNEL
327
328 echo
329 echo ---------------------------------------------
330 echo Summary
331 echo ---------------------------------------------
332 echo
333
334 echo Configure
335
336 if test "${gui_ok}" = "yes"; then
337   variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok"
338 elif test "${SalomeGUI_need}" != "no"; then
339   variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok"
340 else
341   variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok"
342 fi
343
344 for var in $variables
345 do
346    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
347    eval echo \$$var
348 done
349
350 echo
351 echo "Default ORB   : $DEFAULT_ORB"
352 echo
353
354 dnl We don t need to say when we re entering directories if we re using
355 dnl GNU make because make does it for us.
356 if test "X$GMAKE" = "Xyes"; then
357    AC_SUBST(SETX) SETX=":"
358 else
359    AC_SUBST(SETX) SETX="set -x"
360 fi
361
362 echo
363 echo ---------------------------------------------
364 echo generating Makefiles and configure files
365 echo ---------------------------------------------
366 echo
367
368 #AC_OUTPUT_COMMANDS([ \
369 #  chmod +x ./bin/*; \
370 #])
371
372 # This list is initiated using autoscan and must be updated manually
373 # when adding a new file <filename>.in to manage. When you execute
374 # autoscan, the Makefile list is generated in the output file configure.scan.
375 # This could be helpfull to update de configuration.
376 AC_OUTPUT([ \
377   salome_adm/unix/SALOMEconfig.h \
378   adm_local/Makefile \
379   adm_local/cmake_files/Makefile \
380   adm_local/unix/Makefile \
381   adm_local/unix/config_files/Makefile \
382   bin/VERSION \
383   bin/Makefile \
384   GEOM_version.h \
385   doc/Makefile \
386   doc/salome/Makefile \
387   doc/salome/gui/Makefile \
388   doc/salome/gui/GEOM/Makefile \
389   doc/salome/gui/GEOM/doxyfile \
390   doc/salome/gui/GEOM/doxyfile_py \
391   doc/salome/gui/GEOM/doxyfile_tui \
392   doc/salome/tui/Makefile \
393   doc/salome/tui/doxyfile \
394   src/Makefile \
395   src/ARCHIMEDE/Makefile \
396   src/BREPExport/Makefile \
397   src/BREPImport/Makefile \
398   src/BasicGUI/Makefile \
399   src/BlocksGUI/Makefile \
400   src/BooleanGUI/Makefile \
401   src/BuildGUI/Makefile \
402   src/DisplayGUI/Makefile \
403   src/DlgRef/Makefile \
404   src/EntityGUI/Makefile \
405   src/GEOM/Makefile \
406   src/GEOMAlgo/Makefile \
407   src/GEOMBase/Makefile \
408   src/GEOMClient/Makefile \
409   src/GEOMFiltersSelection/Makefile \
410   src/GEOMGUI/Makefile \
411   src/GEOMImpl/Makefile \
412   src/GEOMToolsGUI/Makefile \
413   src/GEOM_I/Makefile \
414   src/GEOM_I_Superv/Makefile \
415   src/GEOM_SWIG/Makefile \
416   src/GEOM_SWIG_WITHIHM/Makefile \
417   src/GenerationGUI/Makefile \
418   src/GroupGUI/Makefile \
419   src/IGESExport/Makefile \
420   src/IGESImport/Makefile \
421   src/MeasureGUI/Makefile \
422   src/NMTDS/Makefile \
423   src/NMTTools/Makefile \
424   src/OBJECT/Makefile \
425   src/OperationGUI/Makefile \
426   src/PrimitiveGUI/Makefile \
427   src/RepairGUI/Makefile \
428   src/SKETCHER/Makefile \
429   src/STEPExport/Makefile \
430   src/STEPImport/Makefile \
431   src/STLExport/Makefile \
432   src/ShHealOper/Makefile \
433   src/TransformationGUI/Makefile \
434   resources/Makefile \
435   resources/GEOMCatalog.xml \
436   idl/Makefile \
437   Makefile \
438 ])