2 # Copyright (C) 2007-2013 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 HexoticPLUGIN module], [6.6.0], [webmaster.salome@opencascade.com], [SalomeHexoticPLUGIN])
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=hexoticplugin
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 ---------------------------------------------
78 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
83 echo ---------------------------------------------
85 echo ---------------------------------------------
87 dnl first, we set static to no!
88 dnl if we want it, use --enable-static
94 dnl Fix up the INSTALL macro if it s a relative path. We want the
95 dnl full-path to the binary instead.
98 INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
103 echo ---------------------------------------------
105 echo ---------------------------------------------
109 dnl inutil car libtool
113 # AC_CC_WARNINGS([ansi])
117 echo ---------------------------------------------
119 echo ---------------------------------------------
124 AC_F77_LIBRARY_LDFLAGS
126 AC_FC_LIBRARY_LDFLAGS
127 if test "X$FC" != "X" ; then
132 AC_CHECK_LIB(dl,dlopen)
134 dnl add library libm :
138 dnl Well we use sstream which is not in gcc pre-2.95.3
139 dnl We must test if it exists. If not, add it in include !
145 echo ---------------------------------------------
147 echo ---------------------------------------------
153 dnl ---------------------------------------------
155 dnl ---------------------------------------------
161 echo ---------------------------------------------
163 echo ---------------------------------------------
169 echo ---------------------------------------------
170 echo testing LEX \& YACC
171 echo ---------------------------------------------
180 echo ---------------------------------------------
182 echo ---------------------------------------------
190 dnl echo ---------------------------------------------
191 dnl echo testing java
192 dnl echo ---------------------------------------------
198 echo ---------------------------------------------
200 echo ---------------------------------------------
206 echo ---------------------------------------------
208 echo ---------------------------------------------
214 echo ---------------------------------------------
216 echo ---------------------------------------------
222 dnl echo ---------------------------------------------
223 dnl echo testing mico
224 dnl echo ---------------------------------------------
230 echo ---------------------------------------------
231 echo default ORB : omniORB
232 echo ---------------------------------------------
240 CORBA=adm_local/unix/$corba
243 echo ---------------------------------------------
245 echo ---------------------------------------------
251 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
255 AM_CONDITIONAL(HEXOTICPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
257 if test "${SalomeGUI_need}" == "yes"; then
258 if test "${FullGUI_ok}" != "yes"; then
259 AC_MSG_WARN(For configure HexoticPLUGIN module necessary full GUI!)
261 elif test "${SalomeGUI_need}" == "auto"; then
262 if test "${FullGUI_ok}" != "yes"; then
263 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
265 elif test "${SalomeGUI_need}" == "no"; then
266 echo Build without GUI option has been chosen
269 if test "${gui_ok}" = "yes"; then
271 echo ---------------------------------------------
273 echo ---------------------------------------------
279 echo ---------------------------------------------
281 echo ---------------------------------------------
288 echo ---------------------------------------------
290 echo ---------------------------------------------
296 echo ---------------------------------------------
298 echo ---------------------------------------------
304 echo ---------------------------------------------
305 echo Testing OpenCascade
306 echo ---------------------------------------------
312 echo ---------------------------------------------
313 echo Testing html generators
314 echo ---------------------------------------------
317 CHECK_HTML_GENERATORS
320 echo ---------------------------------------------
322 echo ---------------------------------------------
328 echo ---------------------------------------------
330 echo ---------------------------------------------
336 echo ---------------------------------------------
338 echo ---------------------------------------------
344 echo ---------------------------------------------
346 echo ---------------------------------------------
352 echo ---------------------------------------------
354 echo ---------------------------------------------
360 echo ---------------------------------------------
361 echo Testing BLSURFPlugin
362 echo ---------------------------------------------
366 if test "${BLSURFplugin_ok}" = "yes"; then
367 AC_DEFINE(WITH_BLSURFPLUGIN)
369 AM_CONDITIONAL(HEXOTICPLUGIN_ENABLE_BLSURFPLUGIN, [test "${BLSURFplugin_ok}" = "yes"])
372 echo ---------------------------------------------
374 echo ---------------------------------------------
377 #AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
379 if test "${gui_ok}" = "yes"; then
380 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"
381 opt_variables="Hexotic_ok BLSURFplugin_ok"
382 elif test "${SalomeGUI_need}" != "no"; then
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 gui_ok"
384 opt_variables="Hexotic_ok BLSURFplugin_ok"
386 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"
387 opt_variables="Hexotic_ok BLSURFplugin_ok"
391 echo --- Mandatory products :
394 for var in $variables
396 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
401 echo --- Optional products :
404 for var in $opt_variables
406 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
412 echo "Default ORB : $DEFAULT_ORB"
415 dnl We don t need to say when we re entering directories if we re using
416 dnl GNU make becuase make does it for us.
417 if test "X$GMAKE" = "Xyes"; then
418 AC_SUBST(SETX) SETX=":"
420 AC_SUBST(SETX) SETX="set -x"
423 dnl Build with SMESH cancel compute feature
424 AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
426 dnl copy shells and utilities contained in the bin directory
427 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
431 echo ---------------------------------------------
432 echo generating Makefiles and configure files
433 echo ---------------------------------------------
436 #AC_OUTPUT_COMMANDS([ \
437 # chmod +x ./bin/*; \
438 # chmod +x ./bin/salome/*;
442 AC_CONFIG_COMMANDS([hack_libtool],[
443 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
444 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
446 CC=\"hack_libtool\"%g" libtool
447 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
448 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
449 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
452 # This list is initiated using autoscan and must be updated manually
453 # when adding a new file <filename>.in to manage. When you execute
454 # autoscan, the Makefile list is generated in the output file configure.scan.
455 # This could be helpfull to update de configuration.
458 adm_local/unix/Makefile \
459 adm_local/unix/config_files/Makefile \
465 src/HexoticPlugin/Makefile \
467 src/GUI/resources/Makefile \
468 HexoticPLUGIN_version.h \
470 doc/salome/Makefile \
471 doc/salome/examples/Makefile \
472 doc/salome/gui/Makefile \
473 doc/salome/gui/HexoticPLUGIN/Makefile \
474 doc/salome/gui/HexoticPLUGIN/doxyfile \
475 doc/salome/gui/HexoticPLUGIN/doxyfile_py \
476 doc/salome/gui/HexoticPLUGIN/static/header.html \
477 doc/salome/gui/HexoticPLUGIN/static/header_py.html \