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