]> SALOME platform Git repositories - samples/atomic.git/blob - configure.ac
Salome HOME
Implementation of the "0021452: [CEA 530]: Improvement of SALOME module integration...
[samples/atomic.git] / configure.ac
1 # Copyright (C) 2007-2011  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 AC_INIT([Salome2 Project ATOMIC module], [6.4.0], [webmaster.salome@opencascade.com], [SalomeATOMIC])
21 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
22 AC_CANONICAL_HOST
23 AC_CANONICAL_TARGET
24 AM_INIT_AUTOMAKE([-Wno-portability])
25
26 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
27 AC_SUBST(XVERSION)
28
29 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
30 MODULE_NAME=atomic
31 AC_SUBST(MODULE_NAME)
32
33 dnl
34 dnl Initialize source and build root directories
35 dnl
36
37 ROOT_BUILDDIR=`pwd`
38 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
39 cd $ROOT_SRCDIR
40 ROOT_SRCDIR=`pwd`
41 cd $ROOT_BUILDDIR
42
43 AC_SUBST(ROOT_SRCDIR)
44 AC_SUBST(ROOT_BUILDDIR)
45
46 echo
47 echo Source root directory : $ROOT_SRCDIR
48 echo Build  root directory : $ROOT_BUILDDIR
49 echo
50 echo
51
52 AC_CHECK_PROG(SHELL,sh)
53 AC_SUBST(SHELL)
54
55 if test -z "$AR"; then
56    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
57 fi
58 AC_SUBST(AR)
59
60 dnl Export the AR macro so that it will be placed in the libtool file
61 dnl correctly.
62 export AR
63
64 echo
65 echo ---------------------------------------------
66 echo testing make
67 echo ---------------------------------------------
68 echo
69
70 AC_PROG_MAKE_SET
71 AC_PROG_INSTALL
72 AC_LOCAL_INSTALL
73 dnl 
74 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
75
76 AC_ENABLE_DEBUG(yes)
77 AC_DISABLE_PRODUCTION
78
79 echo ---------------------------------------------
80 echo testing libtool
81 echo ---------------------------------------------
82
83 dnl first, we set static to no!
84 dnl if we want it, use --enable-static
85 AC_ENABLE_STATIC(no)
86
87 AC_LIBTOOL_DLOPEN
88 AC_PROG_LIBTOOL
89
90 echo
91 echo ---------------------------------------------
92 echo testing C/C++
93 echo ---------------------------------------------
94 echo
95
96 cc_ok=no
97 dnl inutil car libtool
98 dnl AC_PROG_CC
99 AC_PROG_CXX
100 AC_CXX_WARNINGS
101 AC_CXX_TEMPLATE_OPTIONS
102 AC_DEPEND_FLAG
103 # AC_CC_WARNINGS([ansi])
104 cc_ok=yes
105
106 dnl Library libdl :
107 AC_CHECK_LIB(dl,dlopen)
108
109 dnl add library libm :
110 AC_CHECK_LIB(m,ceil)
111
112 dnl Library librt : for alpha/osf
113 AC_CHECK_LIB(rt,nanosleep)
114
115 dnl 
116 dnl Check if we use std iostream by default or if we must add
117 dnl a compiler directive for that
118 dnl
119
120 AC_CXX_USE_STD_IOSTREAM
121
122 dnl 
123 dnl Well we use sstream which is not in gcc pre-2.95.3
124 dnl We must test if it exists. If not, add it in include !
125 dnl
126
127 AC_CXX_HAVE_SSTREAM
128
129 dnl
130 dnl ---------------------------------------------
131 dnl testing linker
132 dnl ---------------------------------------------
133 dnl
134
135 AC_LINKER_OPTIONS
136
137 dnl
138 dnl ---------------------------------------------
139 dnl testing WITHIHM
140 dnl ---------------------------------------------
141 dnl
142
143 CHECK_WITHIHM
144
145 echo
146 echo ---------------------------------------------
147 echo testing LEX \& YACC
148 echo ---------------------------------------------
149 echo
150
151 lex_yacc_ok=no
152 AC_PROG_YACC
153 AC_PROG_LEX
154 lex_yacc_ok=yes
155
156 echo
157 echo ---------------------------------------------
158 echo testing python
159 echo ---------------------------------------------
160 echo
161
162 CHECK_PYTHON
163
164 AM_PATH_PYTHON(2.3)
165
166 echo
167 echo ---------------------------------------------
168 echo testing threads
169 echo ---------------------------------------------
170 echo
171
172 ENABLE_PTHREADS
173
174 echo
175 echo ---------------------------------------------
176 echo testing openGL
177 echo ---------------------------------------------
178 echo
179
180 CHECK_OPENGL
181
182 echo
183 echo ---------------------------------------------
184 echo testing QT
185 echo ---------------------------------------------
186 echo
187
188 CHECK_QT
189
190 echo
191 echo ---------------------------------------------
192 echo testing VTK
193 echo ---------------------------------------------
194 echo
195
196 CHECK_VTK
197
198 echo
199 echo ---------------------------------------------
200 echo testing MPI
201 echo ---------------------------------------------
202 echo
203
204 CHECK_MPI
205
206 echo
207 echo ---------------------------------------------
208 echo testing HDF5
209 echo ---------------------------------------------
210 echo
211
212 CHECK_HDF5
213
214 echo
215 echo ---------------------------------------------
216 echo Testing OpenCascade
217 echo ---------------------------------------------
218 echo
219
220 CHECK_CAS
221
222 echo
223 echo ---------------------------------------------
224 echo Testing sip
225 echo ---------------------------------------------
226 echo
227
228 CHECK_SIP
229
230
231 echo
232 echo ---------------------------------------------
233 echo Testing pyqt
234 echo ---------------------------------------------
235 echo
236
237 CHECK_PYQT
238
239 echo
240 echo ---------------------------------------------
241 echo Testing html generators
242 echo ---------------------------------------------
243 echo
244
245 CHECK_HTML_GENERATORS
246
247 echo
248 echo ---------------------------------------------
249 echo Testing Kernel
250 echo ---------------------------------------------
251 echo
252
253 CHECK_KERNEL
254
255 echo
256 echo ---------------------------------------------
257 echo Testing GUI
258 echo ---------------------------------------------
259 echo
260
261 CHECK_SALOME_GUI
262
263 echo
264 echo ---------------------------------------------
265 echo Summary
266 echo ---------------------------------------------
267 echo
268
269 echo Configure
270 variables="cc_ok lex_yacc_ok python_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok occ_ok doxygen_ok graphviz_ok Kernel_ok SalomeGUI_ok"
271
272 for var in $variables
273 do
274    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
275    eval echo \$$var
276 done
277
278 dnl We don't need to say when we re entering directories if we re using
279 dnl GNU make because make does it for us.
280 if test "X$GMAKE" = "Xyes"; then
281    AC_SUBST(SETX) SETX=":"
282 else
283    AC_SUBST(SETX) SETX="set -x"
284 fi
285
286 AC_OUTPUT_COMMANDS([ \
287         chmod +x ./bin/* \
288 ])
289
290 echo
291 echo ---------------------------------------------
292 echo generating Makefiles and configure files
293 echo ---------------------------------------------
294 echo
295
296 # This list is initiated using autoscan and must be updated manually
297 # when adding a new file <filename>.in to manage. When you execute
298 # autoscan, the Makefile list is generated in the output file configure.scan.
299 # This could be helpfull to update de configuration.
300 AC_OUTPUT([ \
301   adm_local/Makefile \
302   adm_local/unix/Makefile \
303   adm_local/unix/config_files/Makefile \
304   bin/VERSION \
305   bin/Makefile \
306   resources/Makefile \
307   resources/SalomeApp.xml \
308   src/Makefile \
309   src/ATOMICGUI/Makefile \
310   src/AtomicPy/Makefile \
311   ATOMIC_version.h \
312   Makefile \
313 ])