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)
28 # 13/03/2007: Alexander BORODIN - OCN
29 # Reorganization for usage of autotools
30 # Created from configure.in.base
32 AC_INIT([Salome2 Project NETGENPLUGIN module], [7.2.0], [webmaster.salome@opencascade.com], [SalomeNETGENPLUGIN])
33 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
36 AM_INIT_AUTOMAKE([-Wno-portability])
38 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
43 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
44 MODULE_NAME=netgenplugin
48 dnl Initialize source and build root directories
52 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
58 AC_SUBST(ROOT_BUILDDIR)
61 echo Source root directory : $ROOT_SRCDIR
62 echo Build root directory : $ROOT_BUILDDIR
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 + pour les librairies dynamiques !
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='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
110 echo ---------------------------------------------
112 echo ---------------------------------------------
116 dnl inutil car libtool
120 # AC_CC_WARNINGS([ansi])
124 echo ---------------------------------------------
126 echo ---------------------------------------------
131 AC_F77_LIBRARY_LDFLAGS
133 AC_FC_LIBRARY_LDFLAGS
134 if test "X$FC" != "X" ; then
139 AC_CHECK_LIB(dl,dlopen)
141 dnl add library libm :
145 dnl Well we use sstream which is not in gcc pre-2.95.3
146 dnl We must test if it exists. If not, add it in include !
152 echo ---------------------------------------------
154 echo ---------------------------------------------
160 dnl ---------------------------------------------
162 dnl ---------------------------------------------
168 echo ---------------------------------------------
170 echo ---------------------------------------------
176 echo ---------------------------------------------
177 echo testing LEX \& YACC
178 echo ---------------------------------------------
187 echo ---------------------------------------------
189 echo ---------------------------------------------
197 dnl echo ---------------------------------------------
198 dnl echo testing java
199 dnl echo ---------------------------------------------
205 echo ---------------------------------------------
207 echo ---------------------------------------------
213 echo ---------------------------------------------
215 echo ---------------------------------------------
221 echo ---------------------------------------------
223 echo ---------------------------------------------
229 dnl echo ---------------------------------------------
230 dnl echo testing mico
231 dnl echo ---------------------------------------------
237 echo ---------------------------------------------
238 echo default ORB : omniORB
239 echo ---------------------------------------------
247 CORBA=adm_local/unix/$corba
250 echo ---------------------------------------------
252 echo ---------------------------------------------
258 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
262 AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
264 if test "${SalomeGUI_need}" == "yes"; then
265 if test "${FullGUI_ok}" != "yes"; then
266 AC_MSG_WARN(For configure NETGENPLUGIN module necessary full GUI!)
268 elif test "${SalomeGUI_need}" == "auto"; then
269 if test "${FullGUI_ok}" != "yes"; then
270 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
272 elif test "${SalomeGUI_need}" == "no"; then
273 echo Build without GUI option has been chosen
276 if test "${gui_ok}" = "yes"; then
278 echo ---------------------------------------------
280 echo ---------------------------------------------
286 echo ---------------------------------------------
288 echo ---------------------------------------------
295 echo ---------------------------------------------
297 echo ---------------------------------------------
303 echo ---------------------------------------------
305 echo ---------------------------------------------
311 echo ---------------------------------------------
312 echo Testing OpenCascade
313 echo ---------------------------------------------
319 echo ---------------------------------------------
320 echo Testing html generators
321 echo ---------------------------------------------
324 CHECK_HTML_GENERATORS
327 echo ---------------------------------------------
329 echo ---------------------------------------------
335 echo ---------------------------------------------
337 echo ---------------------------------------------
343 echo ---------------------------------------------
345 echo ---------------------------------------------
351 echo ---------------------------------------------
353 echo ---------------------------------------------
359 echo ---------------------------------------------
361 echo ---------------------------------------------
364 AM_CONDITIONAL(CMAKE_BUILD, false)
365 #AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
369 if test "${gui_ok}" = "yes"; then
370 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 gui_ok Geom_ok SMesh_ok Netgen_ok"
371 elif test "${SalomeGUI_need}" != "no"; then
372 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 gui_ok Geom_ok SMesh_ok Netgen_ok"
374 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 SMesh_ok Netgen_ok"
377 for var in $variables
379 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
384 echo "Default ORB : $DEFAULT_ORB"
387 dnl We don t need to say when we re entering directories if we re using
388 dnl GNU make becuase make does it for us.
389 if test "X$GMAKE" = "Xyes"; then
390 AC_SUBST(SETX) SETX=":"
392 AC_SUBST(SETX) SETX="set -x"
395 dnl Build with SMESH cancel compute feature
396 AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
398 dnl copy shells and utilities contained in the bin directory
399 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
403 echo ---------------------------------------------
404 echo generating Makefiles and configure files
405 echo ---------------------------------------------
408 #AC_OUTPUT_COMMANDS([ \
409 # chmod +x ./bin/*; \
410 # chmod +x ./bin/salome/*;
414 AC_CONFIG_COMMANDS([hack_libtool],[
415 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
416 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
418 CC=\"hack_libtool\"%g" libtool
419 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
420 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
421 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
424 # This list is initiated using autoscan and must be updated manually
425 # when adding a new file <filename>.in to manage. When you execute
426 # autoscan, the Makefile list is generated in the output file configure.scan.
427 # This could be helpfull to update de configuration.
430 adm_local/unix/Makefile \
431 adm_local/unix/config_files/Makefile \
434 NETGENPLUGIN_version.h \
436 doc/salome/Makefile \
437 doc/salome/examples/Makefile \
438 doc/salome/gui/Makefile \
439 doc/salome/gui/NETGENPLUGIN/Makefile \
440 doc/salome/gui/NETGENPLUGIN/doxyfile \
441 doc/salome/gui/NETGENPLUGIN/doxyfile_py \
442 doc/salome/gui/NETGENPLUGIN/static/header.html \
443 doc/salome/gui/NETGENPLUGIN/static/header_py.html \
446 src/NETGENPlugin/Makefile \