Salome HOME
fix archive not found in product
[tools/sat.git] / data / templates / PythonComponent / configure.ac
1 #  Copyright (C) 2007-2010  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 #  PLEASE DO NOT MODIFY configure.in FILE
21 #  ALL CHANGES WILL BE DISCARDED BY THE NEXT
22 #  build_configure COMMAND
23 #  CHANGES MUST BE MADE IN configure.in.base FILE
24 # Author : Marc Tajchman (CEA)
25 # Date : 28/06/2001
26 # Modified by : Patrick GOLDBRONN (CEA)
27 # Modified by : Marc Tajchman (CEA)
28 # Created from configure.in.base
29 #
30 AC_INIT([Salome2 Project :sat:{PYCMP} module], [6.3.0], [webmaster.salome@opencascade.com], [Salome:sat:{PYCMP}])
31 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
32 AC_CANONICAL_HOST
33 AC_CANONICAL_TARGET
34 AM_INIT_AUTOMAKE([-Wno-portability])
35
36 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
37 AC_SUBST(XVERSION)
38
39 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
40 MODULE_NAME=:sat:{PYCMP_minus}
41 AC_SUBST(MODULE_NAME)
42
43 dnl
44 dnl Initialize source and build root directories
45 dnl
46
47 ROOT_BUILDDIR=`pwd`
48 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
49 cd $ROOT_SRCDIR
50 ROOT_SRCDIR=`pwd`
51 cd $ROOT_BUILDDIR
52
53 AC_SUBST(ROOT_SRCDIR)
54 AC_SUBST(ROOT_BUILDDIR)
55
56 echo
57 echo Source root directory : $ROOT_SRCDIR
58 echo Build  root directory : $ROOT_BUILDDIR
59 echo
60 echo
61
62 AC_CHECK_PROG(SHELL,sh)
63 AC_SUBST(SHELL)
64
65 if test -z "$AR"; then
66    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
67 fi
68 AC_SUBST(AR)
69
70 dnl Export the AR macro so that it will be placed in the libtool file
71 dnl correctly.
72 export AR
73
74 echo
75 echo ---------------------------------------------
76 echo testing make
77 echo ---------------------------------------------
78 echo
79
80 AC_PROG_MAKE_SET
81 AC_PROG_INSTALL
82 AC_LOCAL_INSTALL
83 dnl 
84 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
85
86 AC_ENABLE_DEBUG(yes)
87 AC_DISABLE_PRODUCTION
88
89 echo ---------------------------------------------
90 echo testing libtool
91 echo ---------------------------------------------
92
93 dnl first, we set static to no!
94 dnl if we want it, use --enable-static
95 AC_ENABLE_STATIC(no)
96
97 AC_LIBTOOL_DLOPEN
98 AC_PROG_LIBTOOL
99
100 dnl Fix up the INSTALL macro if it s a relative path. We want the
101 dnl full-path to the binary instead.
102 case "$INSTALL" in
103    *install-sh*)
104       INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
105       ;;
106 esac
107
108 echo
109 echo ---------------------------------------------
110 echo testing python
111 echo ---------------------------------------------
112 echo
113
114 CHECK_PYTHON
115
116 AM_PATH_PYTHON(2.3)
117
118 echo
119 echo ---------------------------------------------
120 echo testing omniORB
121 echo ---------------------------------------------
122 echo
123
124 CHECK_OMNIORB
125
126 echo
127 echo ---------------------------------------------
128 echo default ORB : omniORB
129 echo ---------------------------------------------
130 echo
131
132 DEFAULT_ORB=omniORB
133 CHECK_CORBA
134
135 AC_SUBST_FILE(CORBA)
136 corba=make_$ORB
137 CORBA=adm_local/unix/$corba
138
139 echo
140 echo ---------------------------------------------
141 echo testing QT
142 echo ---------------------------------------------
143 echo
144
145 CHECK_QT
146
147 echo
148 echo ---------------------------------------------
149 echo Testing html generators
150 echo ---------------------------------------------
151 echo
152
153 CHECK_HTML_GENERATORS
154
155 echo
156 echo ---------------------------------------------
157 echo Testing Kernel
158 echo ---------------------------------------------
159 echo
160
161 CHECK_KERNEL
162
163 echo
164 echo ---------------------------------------------
165 echo Testing GUI
166 echo ---------------------------------------------
167 echo
168
169 CHECK_SALOME_GUI
170
171 echo
172 echo ---------------------------------------------
173 echo Testing full GUI
174 echo ---------------------------------------------
175 echo
176
177 CHECK_CORBA_IN_GUI
178
179 if test "x${CORBA_IN_GUI}" != "xyes"; then
180   echo "failed : For configure :sat:{PYCMP} module necessary full GUI !"
181   exit
182 fi
183
184 echo
185 echo ---------------------------------------------
186 echo Summary
187 echo ---------------------------------------------
188 echo
189
190 echo Configure
191 variables="python_ok omniORB_ok qt_ok doxygen_ok Kernel_ok"
192
193 for var in $variables
194 do
195    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
196    eval echo \$$var
197 done
198
199 echo
200 echo "Default ORB   : $DEFAULT_ORB"
201 echo
202
203 dnl We don t need to say when we re entering directories if we re using
204 dnl GNU make becuase make does it for us.
205 if test "X$GMAKE" = "Xyes"; then
206    AC_SUBST(SETX) SETX=":"
207 else
208    AC_SUBST(SETX) SETX="set -x"
209 fi
210 echo
211 echo ---------------------------------------------
212 echo generating Makefiles and configure files
213 echo ---------------------------------------------
214 echo
215
216 AC_OUTPUT_COMMANDS([ \
217       chmod +x ./bin/*; \
218 ])
219
220 AC_HACK_LIBTOOL
221 AC_CONFIG_COMMANDS([hack_libtool],[
222 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
223   $(pwd)/hack_libtool \1 \"\$[@]\" \n\
224 }\n\
225 CC=\"hack_libtool\"%g" libtool
226 sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool
227 sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool
228 sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1  if ! test -d \$sss; then continue; fi\n\1  ssss=\$(cd \$sss; pwd)\n\1  if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1    case \$ssss in\n\1      /usr/lib | /usr/lib64 ) ;;\n\1      * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1    esac\n\1  fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool
229 ],[])
230
231 # This list is initiated using autoscan and must be updated manually
232 # when adding a new file <filename>.in to manage. When you execute
233 # autoscan, the Makefile list is generated in the output file configure.scan.
234 # This could be helpfull to update de configuration.
235 AC_OUTPUT([ \
236   adm_local/Makefile \
237   adm_local/unix/Makefile \
238   adm_local/unix/config_files/Makefile \
239   bin/VERSION \
240   bin/runAppli \
241   bin/Makefile \
242   doc/Makefile \
243   doc/doxyfile \
244   doc/static/header.html \
245   src/Makefile \
246   src/Controller/Makefile \
247   src/Dialog/Makefile \
248   src/Model/Makefile \
249   src/View/Makefile \
250   src/Tools/Makefile \
251   src/:sat:{PYCMP}GUI/Makefile \
252   resources/Makefile \
253   resources/:sat:{PYCMP}Catalog.xml \
254   idl/Makefile \
255   Makefile \
256 ])