Salome HOME
Changing version to 4.1.5
[samples/pyhello.git] / configure.ac
1 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
6 #  This library is free software; you can redistribute it and/or
7 #  modify it under the terms of the GNU Lesser General Public
8 #  License as published by the Free Software Foundation; either
9 #  version 2.1 of the License.
10 #
11 #  This library is distributed in the hope that it will be useful,
12 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 #  Lesser General Public License for more details.
15 #
16 #  You should have received a copy of the GNU Lesser General Public
17 #  License along with this library; if not, write to the Free Software
18 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22 #  PLEASE DO NOT MODIFY configure.in FILE
23 #  ALL CHANGES WILL BE DISCARDED BY THE NEXT
24 #  build_configure COMMAND
25 #  CHANGES MUST BE MADE IN configure.in.base FILE
26 # Author : Marc Tajchman (CEA)
27 # Date : 28/06/2001
28 # Modified by : Patrick GOLDBRONN (CEA)
29 # Modified by : Marc Tajchman (CEA)
30 # Created from configure.in.base
31 #
32 AC_INIT([Salome2 Project PYHELLO module], [4.1.5], [webmaster.salome@opencascade.com], [salome])
33 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
34 AC_CANONICAL_HOST
35 AC_CANONICAL_TARGET
36 AM_INIT_AUTOMAKE
37
38 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
39 AC_SUBST(XVERSION)
40
41 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
42 MODULE_NAME=pyhello
43 AC_SUBST(MODULE_NAME)
44
45 dnl
46 dnl Initialize source and build root directories
47 dnl
48
49 ROOT_BUILDDIR=`pwd`
50 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
51 cd $ROOT_SRCDIR
52 ROOT_SRCDIR=`pwd`
53 cd $ROOT_BUILDDIR
54
55 AC_SUBST(ROOT_SRCDIR)
56 AC_SUBST(ROOT_BUILDDIR)
57
58 echo
59 echo Source root directory : $ROOT_SRCDIR
60 echo Build  root directory : $ROOT_BUILDDIR
61 echo
62 echo
63
64 AC_CHECK_PROG(SHELL,sh)
65 AC_SUBST(SHELL)
66
67 if test -z "$AR"; then
68    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
69 fi
70 AC_SUBST(AR)
71
72 dnl Export the AR macro so that it will be placed in the libtool file
73 dnl correctly.
74 export AR
75
76 echo
77 echo ---------------------------------------------
78 echo testing make
79 echo ---------------------------------------------
80 echo
81
82 AC_PROG_MAKE_SET
83 AC_PROG_INSTALL
84 dnl 
85 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
86
87 AC_ENABLE_DEBUG(yes)
88 AC_DISABLE_PRODUCTION
89
90 echo ---------------------------------------------
91 echo testing libtool
92 echo ---------------------------------------------
93
94 dnl first, we set static to no!
95 dnl if we want it, use --enable-static
96 AC_ENABLE_STATIC(no)
97
98 AC_LIBTOOL_DLOPEN
99 AC_PROG_LIBTOOL
100
101 dnl Fix up the INSTALL macro if it s a relative path. We want the
102 dnl full-path to the binary instead.
103 case "$INSTALL" in
104    *install-sh*)
105       INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
106       ;;
107 esac
108
109 echo
110 echo ---------------------------------------------
111 echo testing python
112 echo ---------------------------------------------
113 echo
114
115 CHECK_PYTHON
116
117 AM_PATH_PYTHON(2.3)
118
119 echo
120 echo ---------------------------------------------
121 echo testing omniORB
122 echo ---------------------------------------------
123 echo
124
125 CHECK_OMNIORB
126
127 echo
128 echo ---------------------------------------------
129 echo default ORB : omniORB
130 echo ---------------------------------------------
131 echo
132
133 DEFAULT_ORB=omniORB
134 CHECK_CORBA
135
136 AC_SUBST_FILE(CORBA)
137 corba=make_$ORB
138 CORBA=adm_local/unix/$corba
139
140 echo
141 echo ---------------------------------------------
142 echo testing msg2qm
143 echo ---------------------------------------------
144 echo
145
146 CHECK_MSG2QM
147
148 echo
149 echo ---------------------------------------------
150 echo Testing Kernel
151 echo ---------------------------------------------
152 echo
153
154 CHECK_KERNEL
155
156 echo
157 echo ---------------------------------------------
158 echo Testing GUI
159 echo ---------------------------------------------
160 echo
161
162 CHECK_SALOME_GUI
163
164 echo
165 echo ---------------------------------------------
166 echo Testing full GUI
167 echo ---------------------------------------------
168 echo
169
170 CHECK_CORBA_IN_GUI
171 if test "x${CORBA_IN_GUI}" != "xyes"; then
172   echo "failed : For configure PYHELLO1 module necessary full GUI !"
173   exit
174 fi
175
176
177
178 echo
179 echo ---------------------------------------------
180 echo Summary
181 echo ---------------------------------------------
182 echo
183
184 echo Configure
185 variables="python_ok omniORB_ok msg2qm_ok Kernel_ok"
186
187 for var in $variables
188 do
189    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
190    eval echo \$$var
191 done
192
193 echo
194 echo "Default ORB   : $DEFAULT_ORB"
195 echo
196
197 dnl We don t need to say when we re entering directories if we re using
198 dnl GNU make becuase make does it for us.
199 if test "X$GMAKE" = "Xyes"; then
200    AC_SUBST(SETX) SETX=":"
201 else
202    AC_SUBST(SETX) SETX="set -x"
203 fi
204 echo
205 echo ---------------------------------------------
206 echo generating Makefiles and configure files
207 echo ---------------------------------------------
208 echo
209
210 AC_OUTPUT_COMMANDS([ \
211       chmod +x ./bin/*; \
212 ])
213
214 # This list is initiated using autoscan and must be updated manually
215 # when adding a new file <filename>.in to manage. When you execute
216 # autoscan, the Makefile list is generated in the output file configure.scan.
217 # This could be helpfull to update de configuration.
218 AC_OUTPUT([ \
219   ./salome_adm/unix/SALOMEconfig.h \
220   ./adm_local/Makefile \
221   ./adm_local/unix/Makefile \
222   ./adm_local/unix/config_files/Makefile \
223   ./bin/VERSION \
224   ./bin/runAppli \
225   ./bin/Makefile \
226   ./src/Makefile \
227   ./src/PYHELLO/Makefile \
228   ./src/PYHELLOGUI/Makefile \
229   ./resources/Makefile \
230   ./resources/PYHELLOCatalog.xml \
231   ./idl/Makefile \
232   Makefile \
233 ])