2 # Copyright (C) 2007-2012 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], [7.0.0], [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)}'`
37 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
38 MODULE_NAME=blsurfplugin
42 dnl Initialize source and build root directories
46 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
52 AC_SUBST(ROOT_BUILDDIR)
55 echo Source root directory : $ROOT_SRCDIR
56 echo Build root directory : $ROOT_BUILDDIR
60 if test -z "$AR"; then
61 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
65 dnl Export the AR macro so that it will be placed in the libtool file
70 echo ---------------------------------------------
72 echo ---------------------------------------------
79 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
84 echo ---------------------------------------------
86 echo ---------------------------------------------
88 dnl first, we set static to no!
89 dnl if we want it, use --enable-static
95 dnl Fix up the INSTALL macro if it s a relative path. We want the
96 dnl full-path to the binary instead.
99 INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
104 echo ---------------------------------------------
106 echo ---------------------------------------------
110 dnl inutil car libtool
114 # AC_CC_WARNINGS([ansi])
118 echo ---------------------------------------------
120 echo ---------------------------------------------
125 AC_F77_LIBRARY_LDFLAGS
127 AC_FC_LIBRARY_LDFLAGS
128 if test "X$FC" != "X" ; then
133 AC_CHECK_LIB(dl,dlopen)
135 dnl add library libm :
139 dnl Well we use sstream which is not in gcc pre-2.95.3
140 dnl We must test if it exists. If not, add it in include !
146 echo ---------------------------------------------
148 echo ---------------------------------------------
154 dnl ---------------------------------------------
156 dnl ---------------------------------------------
162 echo ---------------------------------------------
164 echo ---------------------------------------------
170 echo ---------------------------------------------
171 echo testing LEX \& YACC
172 echo ---------------------------------------------
181 echo ---------------------------------------------
183 echo ---------------------------------------------
191 dnl echo ---------------------------------------------
192 dnl echo testing java
193 dnl echo ---------------------------------------------
199 echo ---------------------------------------------
201 echo ---------------------------------------------
207 echo ---------------------------------------------
209 echo ---------------------------------------------
215 echo ---------------------------------------------
217 echo ---------------------------------------------
223 dnl echo ---------------------------------------------
224 dnl echo testing mico
225 dnl echo ---------------------------------------------
231 echo ---------------------------------------------
232 echo default ORB : omniORB
233 echo ---------------------------------------------
241 CORBA=adm_local/unix/$corba
244 echo ---------------------------------------------
246 echo ---------------------------------------------
252 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
256 AM_CONDITIONAL(BLSURFPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
258 if test "${SalomeGUI_need}" == "yes"; then
259 if test "${FullGUI_ok}" != "yes"; then
260 AC_MSG_WARN(For configure BLSURFPLUGIN module necessary full GUI!)
262 elif test "${SalomeGUI_need}" == "auto"; then
263 if test "${FullGUI_ok}" != "yes"; then
264 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
266 elif test "${SalomeGUI_need}" == "no"; then
267 echo Build without GUI option has been chosen
270 if test "${gui_ok}" = "yes"; then
272 echo ---------------------------------------------
274 echo ---------------------------------------------
280 echo ---------------------------------------------
282 echo ---------------------------------------------
289 echo ---------------------------------------------
291 echo ---------------------------------------------
297 echo ---------------------------------------------
299 echo ---------------------------------------------
305 echo ---------------------------------------------
306 echo Testing OpenCascade
307 echo ---------------------------------------------
313 echo ---------------------------------------------
314 echo Testing html generators
315 echo ---------------------------------------------
318 CHECK_HTML_GENERATORS
321 dnl echo ---------------------------------------------
322 dnl echo Testing BLSURF
323 dnl echo ---------------------------------------------
329 echo ---------------------------------------------
330 echo Testing MeshGems-CADSurf
331 echo ---------------------------------------------
334 CHECK_MESHGEMS_CADSURF
337 echo ---------------------------------------------
339 echo ---------------------------------------------
345 echo ---------------------------------------------
347 echo ---------------------------------------------
353 echo ---------------------------------------------
355 echo ---------------------------------------------
361 echo ---------------------------------------------
363 echo ---------------------------------------------
369 echo ---------------------------------------------
371 echo ---------------------------------------------
374 #AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
378 if test "${gui_ok}" = "yes"; then
379 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 CADSURF_ok"
380 elif test "${SalomeGUI_need}" != "no"; then
381 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 CADSURF_ok"
383 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 CADSURF_ok"
386 for var in $variables
388 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
393 echo "Default ORB : $DEFAULT_ORB"
396 dnl We don t need to say when we re entering directories if we re using
397 dnl GNU make becuase make does it for us.
398 if test "X$GMAKE" = "Xyes"; then
399 AC_SUBST(SETX) SETX=":"
401 AC_SUBST(SETX) SETX="set -x"
404 dnl Build with SMESH cancel compute feature
405 AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
407 dnl copy shells and utilities contained in the bin directory
408 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
412 echo ---------------------------------------------
413 echo generating Makefiles and configure files
414 echo ---------------------------------------------
417 #AC_OUTPUT_COMMANDS([ \
418 # chmod +x ./bin/*; \
419 # chmod +x ./bin/salome/*;
423 AC_CONFIG_COMMANDS([hack_libtool],[
424 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
425 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
427 CC=\"hack_libtool\"%g" libtool
428 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
429 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
430 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
433 # This list is initiated using autoscan and must be updated manually
434 # when adding a new file <filename>.in to manage. When you execute
435 # autoscan, the Makefile list is generated in the output file configure.scan.
436 # This could be helpfull to update de configuration.
439 adm_local/unix/Makefile \
440 adm_local/unix/config_files/Makefile \
441 adm_local/cmake_files/Makefile \
443 doc/salome/Makefile \
444 doc/salome/gui/Makefile \
445 doc/salome/gui/BLSURFPLUGIN/Makefile \
446 doc/salome/gui/BLSURFPLUGIN/doxyfile \
447 doc/salome/gui/BLSURFPLUGIN/doxyfile_py \
448 doc/salome/gui/BLSURFPLUGIN/static/header.html \
449 doc/salome/gui/BLSURFPLUGIN/static/header_py.html \
450 doc/salome/tui/Makefile \
451 doc/salome/tui/doxyfile \
457 src/BLSURFPlugin/Makefile \
459 BLSURFPLUGIN_version.h \