Salome HOME
dc11778cf8fa34eac81c8b81a972641859839831
[modules/yacs.git] / src / wrappergen / bin / HXX2SALOME_GENERIC_CLASS_NAME_SRC / configure.in.base
1 #  Copyright (C) 2006-2008  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 #  PLEASE DO NOT MODIFY configure.in FILE
20 #  ALL CHANGES WILL BE DISCARDED BY THE NEXT
21 #  build_configure COMMAND
22 #  CHANGES MUST BE MADE IN configure.in.base FILE
23 # Author : Marc Tajchman (CEA)
24 # Date : 28/06/2001
25 # Modified by : Patrick GOLDBRONN (CEA)
26 # Modified by : Marc Tajchman (CEA)
27 # Created from configure.in.base
28 #
29 AC_INIT(src)
30 AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files)
31 AC_CANONICAL_HOST
32
33 PACKAGE=salome
34 AC_SUBST(PACKAGE)
35
36 VERSION=1.2.1
37 AC_SUBST(VERSION)
38
39 dnl
40 dnl Initialize source and build root directories
41 dnl
42
43 ROOT_BUILDDIR=`pwd`
44 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
45 cd $ROOT_SRCDIR
46 ROOT_SRCDIR=`pwd`
47 cd $ROOT_BUILDDIR
48
49 AC_SUBST(ROOT_SRCDIR)
50 AC_SUBST(ROOT_BUILDDIR)
51
52 echo
53 echo Source root directory : $ROOT_SRCDIR
54 echo Build  root directory : $ROOT_BUILDDIR
55 echo
56 echo
57
58 if test -z "$AR"; then
59    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
60 fi
61 AC_SUBST(AR)
62
63 dnl Export the AR macro so that it will be placed in the libtool file
64 dnl correctly.
65 export AR
66
67 echo
68 echo ---------------------------------------------
69 echo testing make
70 echo ---------------------------------------------
71 echo
72
73 AC_PROG_MAKE_SET
74 AC_PROG_INSTALL
75 dnl 
76 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
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 dnl Fix up the INSTALL macro if it s a relative path. We want the
93 dnl full-path to the binary instead.
94 case "$INSTALL" in
95    *install-sh*)
96       INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
97       ;;
98 esac
99
100 echo
101 echo ---------------------------------------------
102 echo testing C/C++
103 echo ---------------------------------------------
104 echo
105
106 cc_ok=no
107 dnl inutil car libtool
108 dnl AC_PROG_CC
109 AC_PROG_CXX
110 AC_CXX_WARNINGS
111 AC_CXX_TEMPLATE_OPTIONS
112 AC_CXX_HAVE_SSTREAM
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 BOOST Library
148 echo ---------------------------------------------
149 echo
150
151 CHECK_BOOST
152
153 echo
154 echo ---------------------------------------------
155 echo testing python
156 echo ---------------------------------------------
157 echo
158
159 CHECK_PYTHON
160
161 echo
162 echo ---------------------------------------------
163 echo testing QT
164 echo ---------------------------------------------
165 echo
166
167 CHECK_QT
168
169 echo
170 echo ---------------------------------------------
171 echo testing msg2qm
172 echo ---------------------------------------------
173 echo
174
175 CHECK_MSG2QM
176
177 echo
178 echo ---------------------------------------------
179 echo Testing OpenCascade
180 echo ---------------------------------------------
181 echo
182
183 CHECK_CAS
184
185 echo
186 echo ---------------------------------------------
187 echo testing omniORB
188 echo ---------------------------------------------
189 echo
190
191 CHECK_OMNIORB
192
193 echo
194 echo ---------------------------------------------
195 echo default ORB : omniORB
196 echo ---------------------------------------------
197 echo
198
199 DEFAULT_ORB=omniORB
200 CHECK_CORBA
201
202 AC_SUBST_FILE(CORBA)
203 corba=make_$ORB
204 CORBA=adm_local/unix/$corba
205
206 echo
207 echo ---------------------------------------------
208 echo Testing Kernel
209 echo ---------------------------------------------
210 echo
211
212 CHECK_KERNEL
213
214 echo
215 echo ---------------------------------------------
216 echo Testing GUI
217 echo ---------------------------------------------
218 echo
219
220 CHECK_SALOME_GUI
221
222 echo
223 echo ---------------------------------------------
224 echo testing HDF5
225 echo ---------------------------------------------
226 echo
227
228 CHECK_HDF5
229
230 echo
231 echo ---------------------------------------------
232 echo testing MED AND MED2
233 echo ---------------------------------------------
234 echo
235
236 CHECK_MED
237 CHECK_MED2
238
239 echo
240 echo ---------------------------------------------
241 echo testing Component Evironment
242 echo ---------------------------------------------
243 echo
244
245 CHECK_COMPONENT_ENV
246
247 echo
248 echo ---------------------------------------------
249 echo Summary
250 echo ---------------------------------------------
251 echo
252
253 echo Configure
254 variables="cc_ok threads_ok boost_ok python_ok omniORB_ok qt_ok msg2qm_ok Kernel_ok SalomeGUI_ok Med_ok med2_ok hdf5_ok Comp_Env_ok"
255
256 for var in $variables
257 do
258    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
259    eval echo \$$var
260 done
261
262 echo
263 echo "Default ORB   : $DEFAULT_ORB"
264 echo
265
266 dnl generals files which could be included in every makefile
267
268 AC_SUBST_FILE(COMMENCE) COMMENCE=adm_local/unix/make_commence
269 AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
270 AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
271
272 dnl les dependences
273 AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
274
275 dnl We don t need to say when we re entering directories if we re using
276 dnl GNU make becuase make does it for us.
277 if test "X$GMAKE" = "Xyes"; then
278    AC_SUBST(SETX) SETX=":"
279 else
280    AC_SUBST(SETX) SETX="set -x"
281 fi
282
283 # make other build directories
284 for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources share/salome/doc idl
285 do
286     $INSTALL -d $rep
287 done
288
289 echo 
290 echo ---------------------------------------------
291 echo copying resource files, shell scripts, and 
292 echo xml files
293 echo ---------------------------------------------
294 echo
295
296 dnl copy shells and utilities contained in the bin directory
297 dnl excluding .in files (treated in AC-OUTPUT below) and CVS 
298 dnl directory
299
300 cd bin
301 for i in $ROOT_SRCDIR/bin/*
302 do
303   local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
304   case "$local_bin" in
305         *.in | *~)                    ;;
306         ./bin/CVS)                    ;;
307         *) ln -fs $i; echo $local_bin ;;
308   esac
309 done
310 cd $ROOT_BUILDDIR
311
312 AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript
313
314 echo
315 echo ---------------------------------------------
316 echo generating Makefiles and configure files
317 echo ---------------------------------------------
318 echo
319
320 AC_OUTPUT_COMMANDS([ \
321         chmod +x ./bin/* \
322 ])
323
324 ## do not delete this line