1 # Copyright (C) 2004-2011 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
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 # Created from configure.in.base
30 AC_INIT([Salome2 Project GHS3DPLUGIN module],[6.4.0], [webmaster.salome@opencascade.com], [SalomeGHS3DPLUGIN])
31 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
34 AM_INIT_AUTOMAKE([-Wno-portability])
36 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.)
40 MODULE_NAME=ghs3dplugin
44 dnl Initialize source and build root directories
48 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
54 AC_SUBST(ROOT_BUILDDIR)
57 echo Source root directory : $ROOT_SRCDIR
58 echo Build root directory : $ROOT_BUILDDIR
62 AC_CHECK_PROG(SHELL,sh)
65 if test -z "$AR"; then
66 AC_CHECK_PROGS(AR,ar xar,:,$PATH)
70 dnl Export the AR macro so that it will be placed in the libtool file
75 echo ---------------------------------------------
77 echo ---------------------------------------------
84 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
89 echo ---------------------------------------------
91 echo ---------------------------------------------
93 dnl first, we set static to no!
94 dnl if we want it, use --enable-static
100 dnl Fix up the INSTALL macro if it s a relative path. We want the
101 dnl full-path to the binary instead.
104 INSTALL="${KERNEL_ROOT_DIR}/adm_local/unix/config_files/install-sh -c"
109 echo ---------------------------------------------
111 echo ---------------------------------------------
115 dnl inutil car libtool
119 AC_CXX_TEMPLATE_OPTIONS
121 # AC_CC_WARNINGS([ansi])
125 AC_CHECK_LIB(dl,dlopen)
127 dnl Library librt : for alpha/osf
128 AC_CHECK_LIB(rt,nanosleep)
130 dnl add library libm :
134 dnl Well we use sstream which is not in gcc pre-2.95.3
135 dnl We must test if it exists. If not, add it in include !
141 dnl ---------------------------------------------
143 dnl ---------------------------------------------
149 echo ---------------------------------------------
151 echo ---------------------------------------------
157 echo ---------------------------------------------
158 echo testing LEX \& YACC
159 echo ---------------------------------------------
168 echo ---------------------------------------------
170 echo ---------------------------------------------
178 dnl echo ---------------------------------------------
179 dnl echo testing java
180 dnl echo ---------------------------------------------
186 echo ---------------------------------------------
188 echo ---------------------------------------------
194 echo ---------------------------------------------
196 echo ---------------------------------------------
202 echo ---------------------------------------------
204 echo ---------------------------------------------
210 dnl echo ---------------------------------------------
211 dnl echo testing mico
212 dnl echo ---------------------------------------------
218 echo ---------------------------------------------
219 echo default ORB : omniORB
220 echo ---------------------------------------------
228 CORBA=adm_local/unix/$corba
231 echo ---------------------------------------------
233 echo ---------------------------------------------
239 if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
243 AM_CONDITIONAL(GHS3DPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
245 if test "${SalomeGUI_need}" == "yes"; then
246 if test "${FullGUI_ok}" != "yes"; then
247 AC_MSG_WARN(For configure GHS3DPLUGIN module necessary full GUI!)
249 elif test "${SalomeGUI_need}" == "auto"; then
250 if test "${FullGUI_ok}" != "yes"; then
251 AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
253 elif test "${SalomeGUI_need}" == "no"; then
254 echo Build without GUI option has been chosen
257 if test "${gui_ok}" = "yes"; then
260 echo ---------------------------------------------
262 echo ---------------------------------------------
268 echo ---------------------------------------------
270 echo ---------------------------------------------
277 echo ---------------------------------------------
279 echo ---------------------------------------------
285 echo ---------------------------------------------
287 echo ---------------------------------------------
293 echo ---------------------------------------------
295 echo ---------------------------------------------
301 echo ---------------------------------------------
302 echo Testing OpenCascade
303 echo ---------------------------------------------
309 echo ---------------------------------------------
310 echo Testing html generators
311 echo ---------------------------------------------
314 CHECK_HTML_GENERATORS
317 echo ---------------------------------------------
319 echo ---------------------------------------------
325 echo ---------------------------------------------
327 echo ---------------------------------------------
333 echo ---------------------------------------------
335 echo ---------------------------------------------
341 echo ---------------------------------------------
343 echo ---------------------------------------------
349 echo ---------------------------------------------
351 echo ---------------------------------------------
355 if test "${GHS3D_ok}" = "yes"; then
356 if test "x$GHS3D_VERSION" = "x"
358 GHS3D_VERSION=`ghs3d -u |grep "TETMESH-GHS3D SOFTWARE"|awk '{print $3}'|awk -F- '{print $1}'|awk -F. '{print $1$2}'`
360 AC_DEFINE_UNQUOTED(GHS3D_VERSION,${GHS3D_VERSION})
364 echo ---------------------------------------------
366 echo ---------------------------------------------
370 if test "${gui_ok}" = "yes"; then
371 variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok gui_ok Geom_ok Med_ok SMesh_ok GHS3D_ok OpenGL_ok qt_ok vtk_ok"
372 elif test "${SalomeGUI_need}" != "no"; then
373 variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok gui_ok Geom_ok Med_ok SMesh_ok GHS3D_ok vtk_ok"
375 variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok Geom_ok Med_ok SMesh_ok GHS3D_ok vtk_ok"
378 for var in $variables
380 printf " %10s : " `echo \$var | sed -e "s,_ok,,"`
385 echo "Default ORB : $DEFAULT_ORB"
388 dnl We don t need to say when we re entering directories if we re using
389 dnl GNU make becuase make does it for us.
390 if test "X$GMAKE" = "Xyes"; then
391 AC_SUBST(SETX) SETX=":"
393 AC_SUBST(SETX) SETX="set -x"
396 dnl Build with SMESH cancel compute feature
397 AC_DEFINE(WITH_SMESH_CANCEL_COMPUTE)
400 echo ---------------------------------------------
401 echo generating Makefiles and configure files
402 echo ---------------------------------------------
405 AC_OUTPUT_COMMANDS([ \
410 AC_CONFIG_COMMANDS([hack_libtool],[
411 sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
412 $(pwd)/hack_libtool \1 \"\$[@]\" \n\
414 CC=\"hack_libtool\"%g" libtool
415 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
416 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
417 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
420 # This list is initiated using autoscan and must be updated manually
421 # when adding a new file <filename>.in to manage. When you execute
422 # autoscan, the Makefile list is generated in the output file configure.scan.
423 # This could be helpfull to update de configuration.
426 adm_local/unix/Makefile \
427 adm_local/unix/config_files/Makefile \
430 GHS3DPLUGIN_version.h \
433 src/GHS3DPlugin/Makefile \