2 # Copyright (C) 2007-2011 CEA/DEN, EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 # Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
26 AC_INIT([Salome2 Project BLSURFPLUGIN module], [6.3.1], [webmaster.salome@opencascade.com], [SalomeBLSURFPLUGIN])
27 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
30 AM_INIT_AUTOMAKE([-Wno-portability])
32 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
35 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
36 MODULE_NAME=blsurfplugin
40 dnl Initialize source and build root directories
44 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
50 AC_SUBST(ROOT_BUILDDIR)
53 echo Source root directory : $ROOT_SRCDIR
54 echo Build root directory : $ROOT_BUILDDIR
58 if test -z "$AR"; then
59 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
63 dnl Export the AR macro so that it will be placed in the libtool file
68 echo ---------------------------------------------
70 echo ---------------------------------------------
77 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
82 echo ---------------------------------------------
84 echo ---------------------------------------------
86 dnl first, we set static to no!
87 dnl if we want it, use --enable-static
93 dnl Fix up the INSTALL macro if it s a relative path. We want the
94 dnl full-path to the binary instead.
97 INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
102 echo ---------------------------------------------
104 echo ---------------------------------------------
108 dnl inutil car libtool
112 # AC_CC_WARNINGS([ansi])
116 echo ---------------------------------------------
118 echo ---------------------------------------------
123 AC_F77_LIBRARY_LDFLAGS
125 AC_FC_LIBRARY_LDFLAGS
126 if test "X$FC" != "X" ; then
131 AC_CHECK_LIB(dl,dlopen)
133 dnl add library libm :
137 dnl Well we use sstream which is not in gcc pre-2.95.3
138 dnl We must test if it exists. If not, add it in include !
144 echo ---------------------------------------------
146 echo ---------------------------------------------
152 dnl ---------------------------------------------
154 dnl ---------------------------------------------
160 echo ---------------------------------------------
162 echo ---------------------------------------------
168 echo ---------------------------------------------
169 echo testing LEX \& YACC
170 echo ---------------------------------------------
179 echo ---------------------------------------------
181 echo ---------------------------------------------
189 dnl echo ---------------------------------------------
190 dnl echo testing java
191 dnl echo ---------------------------------------------
197 echo ---------------------------------------------
199 echo ---------------------------------------------
205 echo ---------------------------------------------
207 echo ---------------------------------------------
213 echo ---------------------------------------------
215 echo ---------------------------------------------
221 dnl echo ---------------------------------------------
222 dnl echo testing mico
223 dnl echo ---------------------------------------------
229 echo ---------------------------------------------
230 echo default ORB : omniORB
231 echo ---------------------------------------------
239 CORBA=adm_local/unix/$corba
242 echo ---------------------------------------------
244 echo ---------------------------------------------
250 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
254 AM_CONDITIONAL(BLSURFPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
256 if test "${SalomeGUI_need}" == "yes"; then
257 if test "${FullGUI_ok}" != "yes"; then
258 AC_MSG_WARN(For configure BLSURFPLUGIN module necessary full GUI!)
260 elif test "${SalomeGUI_need}" == "auto"; then
261 if test "${FullGUI_ok}" != "yes"; then
262 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
264 elif test "${SalomeGUI_need}" == "no"; then
265 echo Build without GUI option has been chosen
268 if test "${gui_ok}" = "yes"; then
270 echo ---------------------------------------------
272 echo ---------------------------------------------
278 echo ---------------------------------------------
280 echo ---------------------------------------------
287 echo ---------------------------------------------
289 echo ---------------------------------------------
295 echo ---------------------------------------------
297 echo ---------------------------------------------
303 echo ---------------------------------------------
304 echo Testing OpenCascade
305 echo ---------------------------------------------
311 echo ---------------------------------------------
312 echo Testing html generators
313 echo ---------------------------------------------
316 CHECK_HTML_GENERATORS
319 echo ---------------------------------------------
321 echo ---------------------------------------------
327 echo ---------------------------------------------
329 echo ---------------------------------------------
335 echo ---------------------------------------------
337 echo ---------------------------------------------
343 echo ---------------------------------------------
345 echo ---------------------------------------------
351 echo ---------------------------------------------
353 echo ---------------------------------------------
359 echo ---------------------------------------------
361 echo ---------------------------------------------
364 #AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
368 if test "${gui_ok}" = "yes"; then
369 variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok SMesh_ok gui_ok BLSURF_ok"
370 elif test "${SalomeGUI_need}" != "no"; then
371 variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok SMesh_ok gui_ok BLSURF_ok"
373 variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok SMesh_ok BLSURF_ok"
376 for var in $variables
378 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
383 echo "Default ORB : $DEFAULT_ORB"
386 dnl We don t need to say when we re entering directories if we re using
387 dnl GNU make becuase make does it for us.
388 if test "X$GMAKE" = "Xyes"; then
389 AC_SUBST(SETX) SETX=":"
391 AC_SUBST(SETX) SETX="set -x"
394 dnl Build with SMESH cancel compute feature
395 AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
397 dnl copy shells and utilities contained in the bin directory
398 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
402 echo ---------------------------------------------
403 echo generating Makefiles and configure files
404 echo ---------------------------------------------
407 #AC_OUTPUT_COMMANDS([ \
408 # chmod +x ./bin/*; \
409 # chmod +x ./bin/salome/*;
413 AC_CONFIG_COMMANDS([hack_libtool],[
414 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
415 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
417 CC=\"hack_libtool\"%g" libtool
418 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
419 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
420 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
423 # This list is initiated using autoscan and must be updated manually
424 # when adding a new file <filename>.in to manage. When you execute
425 # autoscan, the Makefile list is generated in the output file configure.scan.
426 # This could be helpfull to update de configuration.
429 adm_local/unix/Makefile \
430 adm_local/unix/config_files/Makefile \
431 adm_local/cmake_files/Makefile \
433 doc/salome/Makefile \
434 doc/salome/gui/Makefile \
435 doc/salome/gui/doxyfile \
436 doc/salome/tui/Makefile \
437 doc/salome/tui/doxyfile \
443 src/BLSURFPlugin/Makefile \
445 BLSURFPLUGIN_version.h \