1 # Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
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)
26 # Modified by : Patrick GOLDBRONN (CEA)
27 # Modified by : Marc Tajchman (CEA)
29 AC_INIT([Salome2 Project CALCULATOR module], [7.2.0], [webmaster.salome@opencascade.com], [SalomeCALCULATOR])
30 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
33 AM_INIT_AUTOMAKE([-Wno-portability])
35 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
40 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
41 MODULE_NAME=calculator
45 dnl Initialize source and build root directories
49 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
55 AC_SUBST(ROOT_BUILDDIR)
58 echo Source root directory : $ROOT_SRCDIR
59 echo Build root directory : $ROOT_BUILDDIR
63 AC_CHECK_PROG(SHELL,sh)
66 if test -z "$AR"; then
67 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
71 dnl Export the AR macro so that it will be placed in the libtool file
76 echo ---------------------------------------------
78 echo ---------------------------------------------
85 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
90 echo ---------------------------------------------
92 echo ---------------------------------------------
94 dnl first, we set static to no!
95 dnl if we want it, use --enable-static
101 dnl Fix up the INSTALL macro if it s a relative path. We want the
102 dnl full-path to the binary instead.
105 #INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
109 INSTALL="${AUX_CONFIG_DIR}/install-sh -c"
112 INSTALL='\${AUX_CONFIG_DIR}'/install-sh
118 echo ---------------------------------------------
120 echo ---------------------------------------------
124 dnl inutil car libtool
128 AC_CXX_TEMPLATE_OPTIONS
130 # AC_CC_WARNINGS([ansi])
134 AC_CHECK_LIB(dl,dlopen)
136 dnl Library librt : for alpha/osf
137 AC_CHECK_LIB(rt,nanosleep)
139 dnl add library libm :
143 dnl Check if we use std iostream by default or if we must add
144 dnl a compiler directive for that
147 AC_CXX_USE_STD_IOSTREAM
150 dnl Well we use sstream which is not in gcc pre-2.95.3
151 dnl We must test if it exists. If not, add it in include !
155 #AM_CONDITIONAL(MED_ENABLE_SSTREAM, [test "$HAVE_SSTREAM" = yes])
158 dnl ---------------------------------------------
160 dnl ---------------------------------------------
166 echo ---------------------------------------------
168 echo ---------------------------------------------
174 echo ---------------------------------------------
176 echo ---------------------------------------------
182 echo ---------------------------------------------
184 echo ---------------------------------------------
190 echo ---------------------------------------------
192 echo ---------------------------------------------
197 #AM_CONDITIONAL(MED_SWIG_1_3_21, [test "$SWIG_VERSION" = 1.3.21])
200 echo ---------------------------------------------
202 echo ---------------------------------------------
208 echo ---------------------------------------------
210 echo ---------------------------------------------
216 echo ---------------------------------------------
218 echo ---------------------------------------------
224 echo ---------------------------------------------
226 echo ---------------------------------------------
232 echo ---------------------------------------------
233 echo default ORB : omniORB
234 echo ---------------------------------------------
242 CORBA=adm_local/unix/$corba
245 echo ---------------------------------------------
246 echo Testing OpenCascade
247 echo ---------------------------------------------
253 echo ---------------------------------------------
255 echo ---------------------------------------------
260 dnl For the sake of $MACHINE needed for MED Wrapper
264 echo ---------------------------------------------
266 echo ---------------------------------------------
272 echo ---------------------------------------------
274 echo ---------------------------------------------
278 variables="python_ok omniORB_ok Kernel_ok"
280 for var in $variables
282 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
287 echo "Default ORB : $DEFAULT_ORB"
290 dnl We don t need to say when we re entering directories if we re using
291 dnl GNU make becuase make does it for us.
292 if test "X$GMAKE" = "Xyes"; then
293 AC_SUBST(SETX) SETX=":"
295 AC_SUBST(SETX) SETX="set -x"
299 echo ---------------------------------------------
300 echo generating Makefiles and configure files
301 echo ---------------------------------------------
304 AC_OUTPUT_COMMANDS([ \
309 AC_CONFIG_COMMANDS([hack_libtool],[
310 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
311 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
313 CC=\"hack_libtool\"%g" libtool
314 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
315 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
316 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
319 # This list is initiated using autoscan and must be updated manually
320 # when adding a new file <filename>.in to manage. When you execute
321 # autoscan, the Makefile list is generated in the output file configure.scan.
322 # This could be helpfull to update de configuration.
325 adm_local/unix/Makefile \
326 adm_local/unix/config_files/Makefile \
331 CALCULATOR_version.h \
333 src/CALCULATOR/Makefile \
335 resources/CALCULATORCatalog.xml \
336 resources/SalomeApp.xml \