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