Salome HOME
0020670: EDF 1245 GEOM : Be able to keep the same names for the "Set ... subshapes...
[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.3], [webmaster.salome@opencascade.com], [SalomeGEOM])
30 AC_CONFIG_AUX_DIR(adm_local/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 AC_LOCAL_INSTALL
86 dnl
87 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
88
89 echo
90 echo ---------------------------------------------
91 echo Configuring production
92 echo ---------------------------------------------
93 echo
94 AC_ENABLE_DEBUG(yes)
95 AC_DISABLE_PRODUCTION
96
97 echo ---------------------------------------------
98 echo testing libtool
99 echo ---------------------------------------------
100
101 dnl first, we set static to no!
102 dnl if we want it, use --enable-static
103 AC_ENABLE_STATIC(no)
104
105 AC_LIBTOOL_DLOPEN
106 AC_PROG_LIBTOOL
107
108 dnl Fix up the INSTALL macro if it s a relative path. We want the
109 dnl full-path to the binary instead.
110 case "$INSTALL" in
111    *install-sh*)
112       INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
113       ;;
114 esac
115
116 echo
117 echo ---------------------------------------------
118 echo testing C/C++
119 echo ---------------------------------------------
120 echo
121
122 cc_ok=no
123 dnl inutil car libtool
124 dnl AC_PROG_CC
125 AC_PROG_CXX
126 AC_CXX_WARNINGS
127 AC_CXX_TEMPLATE_OPTIONS
128 AC_DEPEND_FLAG
129 # AC_CC_WARNINGS([ansi])
130 cc_ok=yes
131
132 dnl Library libdl :
133 AC_CHECK_LIB(dl,dlopen)
134
135 dnl add library libm :
136 AC_CHECK_LIB(m,ceil)
137
138 dnl
139 dnl Well we use sstream which is not in gcc pre-2.95.3
140 dnl We must test if it exists. If not, add it in include !
141 dnl
142
143 AC_CXX_HAVE_SSTREAM
144
145 dnl
146 dnl ---------------------------------------------
147 dnl testing MPICH
148 dnl ---------------------------------------------
149 dnl
150
151 CHECK_MPICH
152
153 echo
154 echo ---------------------------------------------
155 echo testing LEX \& YACC
156 echo ---------------------------------------------
157 echo
158
159 lex_yacc_ok=no
160 AC_PROG_YACC
161 AC_PROG_LEX
162 lex_yacc_ok=yes
163
164 echo
165 echo ---------------------------------------------
166 echo testing python
167 echo ---------------------------------------------
168 echo
169
170 CHECK_PYTHON
171
172 dnl echo
173 dnl echo ---------------------------------------------
174 dnl echo testing java
175 dnl echo ---------------------------------------------
176 dnl echo
177
178 dnl CHECK_JAVA
179
180 echo
181 echo ---------------------------------------------
182 echo testing swig
183 echo ---------------------------------------------
184 echo
185
186 AM_PATH_PYTHON(2.3)
187 CHECK_SWIG
188
189 echo
190 echo ---------------------------------------------
191 echo testing threads
192 echo ---------------------------------------------
193 echo
194
195 ENABLE_PTHREADS
196
197 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
198 echo
199 echo ---------------------------------------------
200 echo testing omniORB
201 echo ---------------------------------------------
202 echo
203
204 CHECK_OMNIORB
205
206 dnl echo
207 dnl echo ---------------------------------------------
208 dnl echo testing mico
209 dnl echo ---------------------------------------------
210 dnl echo
211
212 dnl CHECK_MICO
213
214 echo
215 echo ---------------------------------------------
216 echo default ORB : omniORB
217 echo ---------------------------------------------
218 echo
219
220 DEFAULT_ORB=omniORB
221
222 echo
223 echo ---------------------------------------------
224 echo testing Corba
225 echo ---------------------------------------------
226 echo
227
228 CHECK_CORBA
229
230 AC_SUBST_FILE(CORBA)
231 corba=make_$ORB
232 CORBA=adm_local/unix/$corba
233
234 fi
235
236 echo
237 echo ---------------------------------------------
238 echo Testing GUI
239 echo ---------------------------------------------
240 echo
241
242 CHECK_GUI_MODULE
243
244 gui_ok=no
245 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then 
246   gui_ok=yes
247 fi
248
249 AM_CONDITIONAL(GEOM_ENABLE_GUI, [test "${gui_ok}" = "yes"])
250
251 if test "${SalomeGUI_need}" == "yes"; then
252   if test "${FullGUI_ok}" != "yes"; then
253     AC_MSG_WARN(For configure GEOM module necessary full GUI!)
254   fi
255 elif test "${SalomeGUI_need}" == "auto"; then
256   if test "${FullGUI_ok}" != "yes"; then
257     AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
258   fi
259 elif test "${SalomeGUI_need}" == "no"; then
260   echo Build without GUI option has been chosen
261 fi
262
263 if test "${gui_ok}" = "yes"; then
264     echo
265     echo ---------------------------------------------
266     echo testing openGL
267     echo ---------------------------------------------
268     echo
269
270     CHECK_OPENGL
271
272     echo
273     echo ---------------------------------------------
274     echo testing QT
275     echo ---------------------------------------------
276     echo
277
278     CHECK_QT
279
280     echo
281     echo ---------------------------------------------
282     echo testing VTK
283     echo ---------------------------------------------
284     echo
285
286     CHECK_VTK
287 fi
288
289 echo
290 echo ---------------------------------------------
291 echo testing HDF5
292 echo ---------------------------------------------
293 echo
294
295 CHECK_HDF5
296
297 echo
298 echo ---------------------------------------------
299 echo BOOST Library
300 echo ---------------------------------------------
301 echo
302
303 CHECK_BOOST
304
305 echo
306 echo ---------------------------------------------
307 echo Testing OpenCascade
308 echo ---------------------------------------------
309 echo
310
311 CHECK_CAS
312
313 echo
314 echo ---------------------------------------------
315 echo Testing html generators
316 echo ---------------------------------------------
317 echo
318
319 CHECK_HTML_GENERATORS
320
321 echo
322 echo ---------------------------------------------
323 echo Testing Kernel
324 echo ---------------------------------------------
325 echo
326
327 CHECK_KERNEL
328
329 echo
330 echo ---------------------------------------------
331 echo Summary
332 echo ---------------------------------------------
333 echo
334
335 echo Configure
336
337 if test "${gui_ok}" = "yes"; then
338   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"
339 elif test "${SalomeGUI_need}" != "no"; then
340   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"
341 else
342   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"
343 fi
344
345 for var in $variables
346 do
347    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
348    eval echo \$$var
349 done
350
351 echo
352 echo "Default ORB   : $DEFAULT_ORB"
353 echo
354
355 dnl We don t need to say when we re entering directories if we re using
356 dnl GNU make because make does it for us.
357 if test "X$GMAKE" = "Xyes"; then
358    AC_SUBST(SETX) SETX=":"
359 else
360    AC_SUBST(SETX) SETX="set -x"
361 fi
362
363 echo
364 echo ---------------------------------------------
365 echo generating Makefiles and configure files
366 echo ---------------------------------------------
367 echo
368
369 #AC_OUTPUT_COMMANDS([ \
370 #  chmod +x ./bin/*; \
371 #])
372
373 # This list is initiated using autoscan and must be updated manually
374 # when adding a new file <filename>.in to manage. When you execute
375 # autoscan, the Makefile list is generated in the output file configure.scan.
376 # This could be helpfull to update de configuration.
377 AC_OUTPUT([ \
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/AdvancedGUI/Makefile \
396   src/ARCHIMEDE/Makefile \
397   src/BREPExport/Makefile \
398   src/BREPImport/Makefile \
399   src/BasicGUI/Makefile \
400   src/BlocksGUI/Makefile \
401   src/BooleanGUI/Makefile \
402   src/BuildGUI/Makefile \
403   src/DisplayGUI/Makefile \
404   src/DlgRef/Makefile \
405   src/EntityGUI/Makefile \
406   src/GEOM/Makefile \
407   src/GEOMAlgo/Makefile \
408   src/GEOMBase/Makefile \
409   src/GEOMClient/Makefile \
410   src/GEOMFiltersSelection/Makefile \
411   src/GEOMGUI/Makefile \
412   src/GEOMImpl/Makefile \
413   src/GEOMToolsGUI/Makefile \
414   src/GEOM_I/Makefile \
415   src/GEOM_I_Superv/Makefile \
416   src/GEOM_SWIG/Makefile \
417   src/GEOM_SWIG_WITHIHM/Makefile \
418   src/GenerationGUI/Makefile \
419   src/GroupGUI/Makefile \
420   src/IGESExport/Makefile \
421   src/IGESImport/Makefile \
422   src/MeasureGUI/Makefile \
423   src/NMTDS/Makefile \
424   src/NMTTools/Makefile \
425   src/OBJECT/Makefile \
426   src/OperationGUI/Makefile \
427   src/PrimitiveGUI/Makefile \
428   src/RepairGUI/Makefile \
429   src/SKETCHER/Makefile \
430   src/STEPExport/Makefile \
431   src/STEPImport/Makefile \
432   src/STLExport/Makefile \
433   src/ShHealOper/Makefile \
434   src/TransformationGUI/Makefile \
435   resources/Makefile \
436   resources/GEOMCatalog.xml \
437   idl/Makefile \
438   Makefile \
439 ])