]> SALOME platform Git repositories - modules/geom.git/blob - configure.ac
Salome HOME
Patch for generation of documentation
[modules/geom.git] / configure.ac
1 #  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  This library is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU Lesser General Public
5 #  License as published by the Free Software Foundation; either
6 #  version 2.1 of the License.
7 #
8 #  This library is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 #  Lesser General Public License for more details.
12 #
13 #  You should have received a copy of the GNU Lesser General Public
14 #  License along with this library; if not, write to the Free Software
15 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # Author : Marc Tajchman (CEA)
21 # Date : 28/06/2001
22 # Modified by : Patrick GOLDBRONN (CEA)
23 # Modified by : Marc Tajchman (CEA)
24 # Modified by : Alexander BORODIN (OCN) - autotools usage
25 # Created from configure.in.base
26 #
27 AC_INIT([Salome2 Project GEOM module], [5.1.4], [webmaster.salome@opencascade.com], [SalomeGEOM])
28 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
29 AC_CANONICAL_HOST
30 AC_CANONICAL_TARGET
31 AM_INIT_AUTOMAKE([tar-pax -Wno-portability])
32
33
34 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
35 AC_SUBST(XVERSION)
36
37 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
38 MODULE_NAME=geom
39 AC_SUBST(MODULE_NAME)
40
41 echo
42 echo ---------------------------------------------
43 echo Initialize source and build root directories
44 echo ---------------------------------------------
45 echo
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 AC_PROG_MKDIR_P
76 AC_SUBST(MKDIR_P)
77
78 echo
79 echo ---------------------------------------------
80 echo testing make
81 echo ---------------------------------------------
82 echo
83
84 AC_PROG_MAKE_SET
85 AC_PROG_INSTALL
86 AC_LOCAL_INSTALL
87 dnl
88 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
89
90 echo
91 echo ---------------------------------------------
92 echo Configuring production
93 echo ---------------------------------------------
94 echo
95 AC_ENABLE_DEBUG(yes)
96 AC_DISABLE_PRODUCTION
97
98 echo ---------------------------------------------
99 echo testing libtool
100 echo ---------------------------------------------
101
102 dnl first, we set static to no!
103 dnl if we want it, use --enable-static
104 AC_ENABLE_STATIC(no)
105
106 AC_LIBTOOL_DLOPEN
107 AC_PROG_LIBTOOL
108
109 dnl Fix up the INSTALL macro if it s a relative path. We want the
110 dnl full-path to the binary instead.
111 case "$INSTALL" in
112    *install-sh*)
113       INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
114       ;;
115 esac
116
117 echo
118 echo ---------------------------------------------
119 echo testing C/C++
120 echo ---------------------------------------------
121 echo
122
123 cc_ok=no
124 dnl inutil car libtool
125 dnl AC_PROG_CC
126 AC_PROG_CXX
127 AC_CXX_WARNINGS
128 AC_CXX_TEMPLATE_OPTIONS
129 AC_DEPEND_FLAG
130 # AC_CC_WARNINGS([ansi])
131 cc_ok=yes
132
133 dnl Library libdl :
134 AC_CHECK_LIB(dl,dlopen)
135
136 dnl add library libm :
137 AC_CHECK_LIB(m,ceil)
138
139 dnl
140 dnl Well we use sstream which is not in gcc pre-2.95.3
141 dnl We must test if it exists. If not, add it in include !
142 dnl
143
144 AC_CXX_HAVE_SSTREAM
145
146 dnl
147 dnl ---------------------------------------------
148 dnl testing MPICH
149 dnl ---------------------------------------------
150 dnl
151
152 CHECK_MPICH
153
154 echo
155 echo ---------------------------------------------
156 echo testing LEX \& YACC
157 echo ---------------------------------------------
158 echo
159
160 lex_yacc_ok=no
161 AC_PROG_YACC
162 AC_PROG_LEX
163 lex_yacc_ok=yes
164
165 echo
166 echo ---------------------------------------------
167 echo testing python
168 echo ---------------------------------------------
169 echo
170
171 CHECK_PYTHON
172
173 dnl echo
174 dnl echo ---------------------------------------------
175 dnl echo testing java
176 dnl echo ---------------------------------------------
177 dnl echo
178
179 dnl CHECK_JAVA
180
181 echo
182 echo ---------------------------------------------
183 echo testing swig
184 echo ---------------------------------------------
185 echo
186
187 AM_PATH_PYTHON(2.3)
188 CHECK_SWIG
189
190 echo
191 echo ---------------------------------------------
192 echo testing threads
193 echo ---------------------------------------------
194 echo
195
196 ENABLE_PTHREADS
197
198 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
199 echo
200 echo ---------------------------------------------
201 echo testing omniORB
202 echo ---------------------------------------------
203 echo
204
205 CHECK_OMNIORB
206
207 dnl echo
208 dnl echo ---------------------------------------------
209 dnl echo testing mico
210 dnl echo ---------------------------------------------
211 dnl echo
212
213 dnl CHECK_MICO
214
215 echo
216 echo ---------------------------------------------
217 echo default ORB : omniORB
218 echo ---------------------------------------------
219 echo
220
221 DEFAULT_ORB=omniORB
222
223 echo
224 echo ---------------------------------------------
225 echo testing Corba
226 echo ---------------------------------------------
227 echo
228
229 CHECK_CORBA
230
231 AC_SUBST_FILE(CORBA)
232 corba=make_$ORB
233 CORBA=adm_local/unix/$corba
234
235 fi
236
237 echo
238 echo ---------------------------------------------
239 echo Testing GUI
240 echo ---------------------------------------------
241 echo
242
243 CHECK_GUI_MODULE
244
245 gui_ok=no
246 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then 
247   gui_ok=yes
248 fi
249
250 AM_CONDITIONAL(GEOM_ENABLE_GUI, [test "${gui_ok}" = "yes"])
251
252 if test "${SalomeGUI_need}" == "yes"; then
253   if test "${FullGUI_ok}" != "yes"; then
254     AC_MSG_WARN(For configure GEOM module necessary full GUI!)
255   fi
256 elif test "${SalomeGUI_need}" == "auto"; then
257   if test "${FullGUI_ok}" != "yes"; then
258     AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
259   fi
260 elif test "${SalomeGUI_need}" == "no"; then
261   echo Build without GUI option has been chosen
262 fi
263
264 if test "${gui_ok}" = "yes"; then
265     echo
266     echo ---------------------------------------------
267     echo testing openGL
268     echo ---------------------------------------------
269     echo
270
271     CHECK_OPENGL
272
273     echo
274     echo ---------------------------------------------
275     echo testing QT
276     echo ---------------------------------------------
277     echo
278
279     CHECK_QT
280 fi
281
282 echo
283 echo ---------------------------------------------
284 echo testing VTK
285 echo ---------------------------------------------
286 echo
287
288 CHECK_VTK
289
290 echo
291 echo ---------------------------------------------
292 echo testing HDF5
293 echo ---------------------------------------------
294 echo
295
296 CHECK_HDF5
297
298 echo
299 echo ---------------------------------------------
300 echo BOOST Library
301 echo ---------------------------------------------
302 echo
303
304 CHECK_BOOST
305
306 echo
307 echo ---------------------------------------------
308 echo Testing OpenCascade
309 echo ---------------------------------------------
310 echo
311
312 CHECK_CAS
313
314 echo
315 echo ---------------------------------------------
316 echo Testing html generators
317 echo ---------------------------------------------
318 echo
319
320 CHECK_HTML_GENERATORS
321
322 echo
323 echo ---------------------------------------------
324 echo testing sphinx
325 echo ---------------------------------------------
326 echo
327 CHECK_SPHINX
328
329 echo
330 echo ---------------------------------------------
331 echo Testing Kernel
332 echo ---------------------------------------------
333 echo
334
335 CHECK_KERNEL
336
337 echo
338 echo ---------------------------------------------
339 echo Summary
340 echo ---------------------------------------------
341 echo
342
343 echo Configure
344
345 if test "${gui_ok}" = "yes"; then
346   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 sphinx_ok Kernel_ok gui_ok"
347 elif test "${SalomeGUI_need}" != "no"; then
348   variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok gui_ok"
349 else
350   variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok boost_ok occ_ok doxygen_ok graphviz_ok Kernel_ok"
351 fi
352
353 for var in $variables
354 do
355    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
356    eval echo \$$var
357 done
358
359 echo
360 echo "Default ORB   : $DEFAULT_ORB"
361 echo
362
363 dnl We don t need to say when we re entering directories if we re using
364 dnl GNU make because make does it for us.
365 if test "X$GMAKE" = "Xyes"; then
366    AC_SUBST(SETX) SETX=":"
367 else
368    AC_SUBST(SETX) SETX="set -x"
369 fi
370
371 echo
372 echo ---------------------------------------------
373 echo generating Makefiles and configure files
374 echo ---------------------------------------------
375 echo
376
377 #AC_OUTPUT_COMMANDS([ \
378 #  chmod +x ./bin/*; \
379 #])
380
381 # This list is initiated using autoscan and must be updated manually
382 # when adding a new file <filename>.in to manage. When you execute
383 # autoscan, the Makefile list is generated in the output file configure.scan.
384 # This could be helpfull to update de configuration.
385 AC_OUTPUT([ \
386   adm_local/Makefile \
387   adm_local/cmake_files/Makefile \
388   adm_local/unix/Makefile \
389   adm_local/unix/config_files/Makefile \
390   bin/VERSION \
391   bin/Makefile \
392   GEOM_version.h \
393   doc/Makefile \
394   doc/docutils/Makefile \
395   doc/salome/Makefile \
396   doc/salome/gui/Makefile \
397   doc/salome/gui/GEOM/Makefile \
398   doc/salome/gui/GEOM/doxyfile \
399   doc/salome/gui/GEOM/doxyfile_py \
400   doc/salome/gui/GEOM/doxyfile_tui \
401   doc/salome/gui/GEOM/static/header.html \
402   doc/salome/tui/Makefile \
403   doc/salome/tui/doxyfile \
404   doc/salome/tui/static/header.html \
405   src/Makefile \
406   src/AdvancedGUI/Makefile \
407   src/ARCHIMEDE/Makefile \
408   src/BREPExport/Makefile \
409   src/BREPImport/Makefile \
410   src/BasicGUI/Makefile \
411   src/BlocksGUI/Makefile \
412   src/BooleanGUI/Makefile \
413   src/BuildGUI/Makefile \
414   src/DisplayGUI/Makefile \
415   src/DlgRef/Makefile \
416   src/EntityGUI/Makefile \
417   src/GEOM/Makefile \
418   src/GEOMAlgo/Makefile \
419   src/GEOMBase/Makefile \
420   src/GEOMClient/Makefile \
421   src/GEOMFiltersSelection/Makefile \
422   src/GEOMGUI/Makefile \
423   src/GEOMImpl/Makefile \
424   src/GEOMToolsGUI/Makefile \
425   src/GEOM_I/Makefile \
426   src/GEOM_I_Superv/Makefile \
427   src/GEOM_SWIG/Makefile \
428   src/GEOM_SWIG_WITHIHM/Makefile \
429   src/GEOM_PY/Makefile \
430   src/GEOM_PY/structelem/Makefile \
431   src/GenerationGUI/Makefile \
432   src/GroupGUI/Makefile \
433   src/IGESExport/Makefile \
434   src/IGESImport/Makefile \
435   src/MeasureGUI/Makefile \
436   src/NMTDS/Makefile \
437   src/NMTTools/Makefile \
438   src/OBJECT/Makefile \
439   src/OCC2VTK/Makefile \
440   src/OperationGUI/Makefile \
441   src/PrimitiveGUI/Makefile \
442   src/RepairGUI/Makefile \
443   src/SKETCHER/Makefile \
444   src/STEPExport/Makefile \
445   src/STEPImport/Makefile \
446   src/STLExport/Makefile \
447   src/ShHealOper/Makefile \
448   src/TransformationGUI/Makefile \
449   src/VTKExport/Makefile \
450   resources/Makefile \
451   resources/GEOMCatalog.xml \
452   idl/Makefile \
453   Makefile \
454 ])
455
456 AC_HACK_LIBTOOL