1 # Copyright (C) 2011-2013 CEA/DEN, EDF R&D
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
19 # Author : Marc Tajchman (CEA)
21 # Modified by : Patrick GOLDBRONN (CEA)
22 # Modified by : Marc Tajchman (CEA)
23 # Modified by : Alexander BORODIN (OCN) - autotools usage
24 # Created from configure.in.base
26 AC_INIT([Salome2 Project HOMARD module], [7.2.0], [webmaster.salome@opencascade.com], [SalomeHOMARD])
27 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
30 AM_INIT_AUTOMAKE([-Wno-portability])
32 SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'`
33 AC_SUBST(SHORT_VERSION)
34 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
39 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
44 echo ---------------------------------------------
45 echo Initialize source and build root directories
46 echo ---------------------------------------------
50 dnl Initialize source and build root directories
54 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
60 AC_SUBST(ROOT_BUILDDIR)
63 echo Source root directory : $ROOT_SRCDIR
64 echo Build root directory : $ROOT_BUILDDIR
68 if test -z "$AR"; then
69 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
73 dnl Export the AR macro so that it will be placed in the libtool file
78 echo ---------------------------------------------
80 echo ---------------------------------------------
86 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
89 echo ---------------------------------------------
90 echo Coniguring production
91 echo ---------------------------------------------
96 echo ---------------------------------------------
98 echo ---------------------------------------------
100 dnl first, we set static to no!
101 dnl if we want it, use --enable-static
107 dnl Fix up the INSTALL macro if it s a relative path. We want the
108 dnl full-path to the binary instead.
111 INSTALL='\${ROOT_BUILDDIR}'/adm_local/unix/config_files/install-sh
116 echo ---------------------------------------------
118 echo ---------------------------------------------
122 dnl inutil car libtool
126 AC_CXX_TEMPLATE_OPTIONS
128 # AC_CC_WARNINGS([ansi])
132 echo ---------------------------------------------
134 echo ---------------------------------------------
139 AC_F77_LIBRARY_LDFLAGS
141 AC_FC_LIBRARY_LDFLAGS
142 if test "X$FC" != "X" ; then
147 dnl AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
152 AC_CHECK_LIB(dl,dlopen)
154 dnl add library libm :
158 dnl Well we use sstream which is not in gcc pre-2.95.3
159 dnl We must test if it exists. If not, add it in include !
165 echo ---------------------------------------------
167 echo ---------------------------------------------
173 echo ---------------------------------------------
175 echo ---------------------------------------------
182 echo ---------------------------------------------
184 echo ---------------------------------------------
191 AM_CONDITIONAL(HOMARD_ENABLE_GUI, [test "${HOMARD_WITH_GUI}" = "yes"])
193 if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then
195 echo ---------------------------------------------
197 echo ---------------------------------------------
203 echo ---------------------------------------------
204 echo default ORB : omniORB
205 echo ---------------------------------------------
211 echo ---------------------------------------------
213 echo ---------------------------------------------
220 CORBA=adm_local/unix/$corba
224 if test "${HOMARD_WITH_GUI}" = "yes"; then
226 echo ---------------------------------------------
228 echo ---------------------------------------------
234 echo ---------------------------------------------
236 echo ---------------------------------------------
242 echo ---------------------------------------------
244 echo ---------------------------------------------
250 echo ---------------------------------------------
251 echo Testing full GUI
252 echo ---------------------------------------------
256 if test "x${CORBA_IN_GUI}" != "xyes"; then
257 echo "failed : For configure HOMARD module necessary full GUI !"
263 echo ---------------------------------------------
265 echo ---------------------------------------------
271 echo ---------------------------------------------
273 echo ---------------------------------------------
279 echo ---------------------------------------------
281 echo ---------------------------------------------
287 echo ---------------------------------------------
288 echo Testing OpenCascade
289 echo ---------------------------------------------
296 echo ---------------------------------------------
298 echo ---------------------------------------------
304 echo ---------------------------------------------
305 echo Testing Med library
306 echo ---------------------------------------------
313 echo ---------------------------------------------
314 echo Testing Med Module
315 echo ---------------------------------------------
321 echo ---------------------------------------------
323 echo ---------------------------------------------
330 echo ---------------------------------------------
332 echo ---------------------------------------------
339 echo ---------------------------------------------
341 echo ---------------------------------------------
345 if test "${HOMARD_WITH_GUI}" = "yes"; then
346 variables="cc_ok fortran_ok boost_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok hdf5_ok omniORB_ok Kernel_ok med3_ok SalomeGUI_ok Med_ok SMesh_ok sphinx_ok"
349 if test "${HOMARD_WITH_GUI}" = "no"; then
350 variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok SMesh_ok sphinx_ok"
353 for var in $variables
355 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
360 echo "Default ORB : $DEFAULT_ORB"
363 dnl We don t need to say when we re entering directories if we re using
364 dnl GNU make becuase make does it for us.
365 if test "X$GMAKE" = "Xyes"; then
366 AC_SUBST(SETX) SETX=":"
368 AC_SUBST(SETX) SETX="set -x"
371 dnl AM_CONDITIONAL(GUI_ENABLE_CORBA, [test "$GUI_DISABLE_CORBA" = no])
372 dnl AM_CONDITIONAL(ENABLE_PYCONSOLE, [test "$DISABLE_PYCONSOLE" = no])
373 dnl AM_CONDITIONAL(ENABLE_GLVIEWER, [test "$DISABLE_GLVIEWER" = no])
374 dnl AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no])
375 dnl AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no])
376 dnl AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no])
377 dnl AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no])
378 dnl AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no])
381 echo ---------------------------------------------
382 echo generating Makefiles and configure files
383 echo ---------------------------------------------
386 #AC_OUTPUT_COMMANDS([ \
387 # chmod +x ./bin/*; \
388 # chmod +x ./bin/salome/*; \
392 AC_CONFIG_COMMANDS([hack_libtool],[
393 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
394 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
396 CC=\"hack_libtool\"%g" libtool
397 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
398 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
399 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
402 # This list is initiated using autoscan and must be updated manually
403 # when adding a new file <filename>.in to manage. When you execute
404 # autoscan, the Makefile list is generated in the output file configure.scan.
405 # This could be helpfull to update de configuration.
410 adm_local/unix/Makefile \
411 adm_local/unix/config_files/Makefile \
421 src/HOMARD_I/Makefile \
422 src/HOMARD/Makefile \
423 src/HOMARDGUI/Makefile \
424 src/HOMARD_SWIG/Makefile \
426 resources/HOMARDCatalog.xml \
427 resources/SalomeApp.xml \