1 # Copyright (C) 2007-2010 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], [6.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)}'`
41 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
42 MODULE_NAME=netgenplugin
46 dnl Initialize source and build root directories
50 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
56 AC_SUBST(ROOT_BUILDDIR)
59 echo Source root directory : $ROOT_SRCDIR
60 echo Build root directory : $ROOT_BUILDDIR
64 if test -z "$AR"; then
65 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
69 dnl Export the AR macro so that it will be placed in the libtool file
74 echo ---------------------------------------------
76 echo ---------------------------------------------
83 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
88 echo ---------------------------------------------
90 echo ---------------------------------------------
92 dnl first, we set static to no!
93 dnl if we want it, use --enable-static
99 dnl Fix up the INSTALL macro if it s a relative path. We want the
100 dnl full-path to the binary instead.
103 INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
108 echo ---------------------------------------------
110 echo ---------------------------------------------
114 dnl inutil car libtool
118 # AC_CC_WARNINGS([ansi])
122 echo ---------------------------------------------
124 echo ---------------------------------------------
129 AC_F77_LIBRARY_LDFLAGS
131 AC_FC_LIBRARY_LDFLAGS
132 if test "X$FC" != "X" ; then
137 AC_CHECK_LIB(dl,dlopen)
139 dnl add library libm :
143 dnl Well we use sstream which is not in gcc pre-2.95.3
144 dnl We must test if it exists. If not, add it in include !
150 echo ---------------------------------------------
152 echo ---------------------------------------------
158 dnl ---------------------------------------------
160 dnl ---------------------------------------------
166 echo ---------------------------------------------
168 echo ---------------------------------------------
174 echo ---------------------------------------------
175 echo testing LEX \& YACC
176 echo ---------------------------------------------
185 echo ---------------------------------------------
187 echo ---------------------------------------------
195 dnl echo ---------------------------------------------
196 dnl echo testing java
197 dnl echo ---------------------------------------------
203 echo ---------------------------------------------
205 echo ---------------------------------------------
211 echo ---------------------------------------------
213 echo ---------------------------------------------
219 echo ---------------------------------------------
221 echo ---------------------------------------------
227 dnl echo ---------------------------------------------
228 dnl echo testing mico
229 dnl echo ---------------------------------------------
235 echo ---------------------------------------------
236 echo default ORB : omniORB
237 echo ---------------------------------------------
245 CORBA=adm_local/unix/$corba
248 echo ---------------------------------------------
250 echo ---------------------------------------------
256 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
260 AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
262 if test "${SalomeGUI_need}" == "yes"; then
263 if test "${FullGUI_ok}" != "yes"; then
264 AC_MSG_WARN(For configure NETGENPLUGIN module necessary full GUI!)
266 elif test "${SalomeGUI_need}" == "auto"; then
267 if test "${FullGUI_ok}" != "yes"; then
268 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
270 elif test "${SalomeGUI_need}" == "no"; then
271 echo Build without GUI option has been chosen
274 if test "${gui_ok}" = "yes"; then
276 echo ---------------------------------------------
278 echo ---------------------------------------------
284 echo ---------------------------------------------
286 echo ---------------------------------------------
293 echo ---------------------------------------------
295 echo ---------------------------------------------
301 echo ---------------------------------------------
303 echo ---------------------------------------------
309 echo ---------------------------------------------
310 echo Testing OpenCascade
311 echo ---------------------------------------------
317 echo ---------------------------------------------
318 echo Testing html generators
319 echo ---------------------------------------------
322 CHECK_HTML_GENERATORS
325 echo ---------------------------------------------
327 echo ---------------------------------------------
333 echo ---------------------------------------------
335 echo ---------------------------------------------
341 echo ---------------------------------------------
343 echo ---------------------------------------------
349 echo ---------------------------------------------
351 echo ---------------------------------------------
357 echo ---------------------------------------------
359 echo ---------------------------------------------
365 echo ---------------------------------------------
367 echo ---------------------------------------------
370 AM_CONDITIONAL(CMAKE_BUILD, false)
371 #AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
375 if test "${gui_ok}" = "yes"; then
376 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"
377 elif test "${SalomeGUI_need}" != "no"; then
378 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"
380 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"
383 for var in $variables
385 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
390 echo "Default ORB : $DEFAULT_ORB"
393 dnl We don t need to say when we re entering directories if we re using
394 dnl GNU make becuase make does it for us.
395 if test "X$GMAKE" = "Xyes"; then
396 AC_SUBST(SETX) SETX=":"
398 AC_SUBST(SETX) SETX="set -x"
401 dnl Build with SMESH cancel compute feature
402 AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
404 dnl copy shells and utilities contained in the bin directory
405 dnl excluding .in files (treated in AC-OUTPUT below) and CVS
409 echo ---------------------------------------------
410 echo generating Makefiles and configure files
411 echo ---------------------------------------------
414 #AC_OUTPUT_COMMANDS([ \
415 # chmod +x ./bin/*; \
416 # chmod +x ./bin/salome/*;
420 AC_CONFIG_COMMANDS([hack_libtool],[
421 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
422 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
424 CC=\"hack_libtool\"%g" libtool
425 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
426 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
427 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
430 # This list is initiated using autoscan and must be updated manually
431 # when adding a new file <filename>.in to manage. When you execute
432 # autoscan, the Makefile list is generated in the output file configure.scan.
433 # This could be helpfull to update de configuration.
436 adm_local/unix/Makefile \
437 adm_local/unix/config_files/Makefile \
440 NETGENPLUGIN_version.h \
443 src/NETGEN/Makefile \
444 src/NETGENPlugin/Makefile \