]> SALOME platform Git repositories - modules/hexablock.git/blob - configure.ac
Salome HOME
Merge from BR_new_bop4 (porting to new OCCT BOP) 13/09/2013
[modules/hexablock.git] / configure.ac
1 # Copyright (C) 2009-2013  CEA/DEN, EDF R&D
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([Salome6 Project HEXABLOCK module],[7.2.0], [webmaster.salome@opencascade.com], [SalomeHEXABLOCK])
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 SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'`
27 AC_SUBST(SHORT_VERSION)
28 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
29 AC_SUBST(XVERSION)
30 VERSION_DEV=0
31 AC_SUBST(VERSION_DEV)
32
33 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
34 MODULE_NAME=hexablock
35 AC_SUBST(MODULE_NAME)
36
37 dnl
38 dnl Initialize source and build root directories
39 dnl
40
41 ROOT_BUILDDIR=`pwd`
42 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
43 cd $ROOT_SRCDIR
44 ROOT_SRCDIR=`pwd`
45 cd $ROOT_BUILDDIR
46
47 AC_SUBST(ROOT_SRCDIR)
48 AC_SUBST(ROOT_BUILDDIR)
49
50 echo
51 echo Source root directory : $ROOT_SRCDIR
52 echo Build  root directory : $ROOT_BUILDDIR
53 echo
54 echo
55
56 AC_CHECK_PROG(SHELL,sh)
57 AC_SUBST(SHELL)
58
59 if test -z "$AR"; then
60    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
61 fi
62 AC_SUBST(AR)
63
64 dnl Export the AR macro so that it will be placed in the libtool file
65 dnl correctly.
66 export AR
67
68 echo
69 echo ---------------------------------------------
70 echo testing make
71 echo ---------------------------------------------
72 echo
73
74 AC_PROG_MAKE_SET
75 AC_PROG_INSTALL
76 dnl 
77 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
78
79 AC_ENABLE_DEBUG(yes)
80 AC_DISABLE_PRODUCTION
81
82 echo ---------------------------------------------
83 echo testing libtool
84 echo ---------------------------------------------
85
86 dnl first, we set static to no!
87 dnl if we want it, use --enable-static
88 AC_ENABLE_STATIC(no)
89
90 AC_LIBTOOL_DLOPEN
91 AC_PROG_LIBTOOL
92
93 dnl Fix up the INSTALL macro if it s a relative path. We want the
94 dnl full-path to the binary instead.
95 case "$INSTALL" in
96    *install-sh*)
97       INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
98       ;;
99 esac
100
101 echo
102 echo ---------------------------------------------
103 echo testing C/C++
104 echo ---------------------------------------------
105 echo
106
107 cc_ok=no
108 dnl inutil car libtool
109 dnl AC_PROG_CC
110 AC_PROG_CXX
111 AC_CXX_WARNINGS
112 AC_CXX_TEMPLATE_OPTIONS
113 AC_DEPEND_FLAG
114 # AC_CC_WARNINGS([ansi])
115 cc_ok=yes
116
117 dnl Library libdl :
118 AC_CHECK_LIB(dl,dlopen)
119
120 dnl Library librt : for alpha/osf
121 AC_CHECK_LIB(rt,nanosleep)
122
123 dnl add library libm :
124 AC_CHECK_LIB(m,ceil)
125
126 AC_CXX_USE_STD_IOSTREAM
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 echo
138 echo ---------------------------------------------
139 echo testing threads
140 echo ---------------------------------------------
141 echo
142
143 ENABLE_PTHREADS
144
145 echo
146 echo ---------------------------------------------
147 echo testing python
148 echo ---------------------------------------------
149 echo
150
151 CHECK_PYTHON
152
153 AM_PATH_PYTHON(2.3)
154 CHECK_SWIG
155
156
157 AC_PYTHON_DEVEL
158
159 echo
160 echo ---------------------------------------------
161 echo testing QT
162 echo ---------------------------------------------
163 echo
164
165 CHECK_QT
166
167
168
169
170
171
172
173 echo
174 echo ---------------------------------------------
175 echo BOOST Library
176 echo ---------------------------------------------
177 echo
178
179 CHECK_BOOST
180
181 echo
182 echo ---------------------------------------------
183 echo Testing OpenCascade
184 echo ---------------------------------------------
185 echo
186
187 CHECK_CAS
188
189 echo
190 echo ---------------------------------------------
191 echo testing omniORB
192 echo ---------------------------------------------
193 echo
194
195 CHECK_OMNIORB
196
197 echo
198 echo ---------------------------------------------
199 echo default ORB : omniORB
200 echo ---------------------------------------------
201 echo
202
203 DEFAULT_ORB=omniORB
204 CHECK_CORBA
205
206 AC_SUBST_FILE(CORBA)
207 corba=make_$ORB
208 CORBA=adm_local/unix/$corba
209
210
211
212 echo
213 echo ----------------------------------------------
214 echo testing CPPUNIT only required for unit testing
215 echo ----------------------------------------------
216 echo
217 CHECK_CPPUNIT
218
219
220
221 echo
222 echo ----------------------------------------------
223 echo testing Sphinx
224 echo ----------------------------------------------
225 echo
226
227 CHECK_SPHINX
228
229
230
231 echo
232 echo ---------------------------------------------
233 echo Testing Kernel
234 echo ---------------------------------------------
235 echo
236
237 CHECK_KERNEL
238
239
240
241 echo
242 echo ---------------------------------------------
243 echo Testing GUI
244 echo ---------------------------------------------
245 echo
246
247 CHECK_SALOME_GUI
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(HEXABLOCK_ENABLE_GUI, [test "${gui_ok}" = "yes"])
255
256 echo WITH GUI: ${gui_ok}
257
258 echo
259 echo ---------------------------------------------
260 echo Testing Geom
261 echo ---------------------------------------------
262 echo
263
264 CHECK_GEOM
265
266
267 echo
268 echo ---------------------------------------------
269 echo Testing LIBXML
270 echo ---------------------------------------------
271 echo
272 AC_CHECK_LIBXML
273
274
275 echo
276 echo ---------------------------------------------
277 echo Testing QT4
278 echo ---------------------------------------------
279 echo
280 I2_CHECK_QT4
281
282
283
284 echo
285 echo ---------------------------------------------
286 echo testing VTK
287 echo ---------------------------------------------
288 echo
289 CHECK_VTK
290
291
292 echo
293 echo ---------------------------------------------
294 echo Summary
295 echo ---------------------------------------------
296 echo
297
298 echo Configure
299 variables="cc_ok threads_ok boost_ok python_ok omniORB_ok qt_ok occ_ok sphinx_ok vtk_ok Kernel_ok SalomeGUI_ok Geom_ok"
300
301 for var in $variables
302 do
303    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
304    eval echo \$$var
305 done
306
307 echo
308 echo "Default ORB   : $DEFAULT_ORB"
309 echo
310
311 dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
312 dnl We don t need to say when we re entering directories if we re using
313 dnl GNU make becuase make does it for us.
314 if test "X$GMAKE" = "Xyes"; then
315    AC_SUBST(SETX) SETX=":"
316 else
317    AC_SUBST(SETX) SETX="set -x"
318 fi
319 echo
320 echo ---------------------------------------------
321 echo generating Makefiles and configure files
322 echo ---------------------------------------------
323 echo
324
325 AC_OUTPUT_COMMANDS([ \
326       chmod +x ./bin/*; \
327 ])
328
329
330
331 AM_CONDITIONAL(WINDOWS, [ test ])
332
333 # This list is initiated using autoscan and must be updated manually
334 # when adding a new file <filename>.in to manage. When you execute
335 # autoscan, the Makefile list is generated in the output file configure.scan.
336 #
337 # This could be helpfull to update de configuration.
338 AC_OUTPUT([ \
339   salome_adm/unix/SALOMEconfig.h \
340   adm_local/Makefile \
341   adm_local/unix/Makefile \
342   adm_local/unix/config_files/Makefile \
343   bin/VERSION \
344   bin/runAppli \
345   bin/Makefile \
346   doc/Makefile \
347   doc/conf.py \
348   HEXABLOCK_version.h \
349   src/Makefile \
350   src/HEXABLOCKGUI/Makefile \
351   src/HEXABLOCKGUI/MyDlgRef/Makefile \
352   src/HEXABLOCKGUI/resources/HEXABLOCKCatalog.xml \
353   src/HEXABLOCKGUI/resources/SalomeApp.xml \
354   src/HEXABLOCK/Makefile \
355   src/HEXABLOCK_SWIG/Makefile \
356   src/TEST_CPP/Makefile \
357   src/TEST_PY/Makefile \
358   Makefile \
359 ])